Skip to content

Commit

Permalink
Merge branch 'master' of github.com:eyra/mono into dependabot/npm_and…
Browse files Browse the repository at this point in the history
…_yarn/core/assets/stylelint-15.10.1

# Conflicts:
#	core/assets/package-lock.json
  • Loading branch information
mellelieuwes committed Oct 11, 2023
2 parents a706771 + 743cd33 commit eae370a
Show file tree
Hide file tree
Showing 367 changed files with 10,815 additions and 8,588 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Eyra Mono

Primary collection of Eyra projects
Primary collection of Eyra projects

## Projects

Expand All @@ -19,7 +19,7 @@ Project implementing a SaaS platform based on interlinked modules called Systems
* Campaign
* Assignment
* Lab
* Survey
* Questionnaire
* Pool
* Data Donation
* ..
Expand All @@ -28,12 +28,12 @@ Project implementing a SaaS platform based on interlinked modules called Systems

* Next

Primary bundle with all features available except Link specific features.
Primary bundle with all features available except Link specific features.
Next is hosted on: https://eyra.co

* Link

Secundary bundle with only Panl specific features.
Secundary bundle with only Panl specific features.
Link is hosted on: https://researchpanl.eu

## Banking Proxy
Expand Down
2 changes: 0 additions & 2 deletions authorization_node.ex

This file was deleted.

2 changes: 1 addition & 1 deletion core/.credo.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# If you don't want TODO comments to cause `mix credo` to fail, just
# set this value to 0 (zero).
#
{Credo.Check.Design.TagTODO, [exit_status: 2]},
{Credo.Check.Design.TagTODO, [exit_status: 0]},
{Credo.Check.Design.TagFIXME, false},

#
Expand Down
3 changes: 3 additions & 0 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ gettext:

build: build-digest build-app

build-assets:
@cd .assets && npm run build

build-digest:
@mix phx.digest

Expand Down
34 changes: 0 additions & 34 deletions core/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,37 +127,3 @@
src: url("../static/fonts/Finador-BlackOblique.woff2") format("woff2"),
url("../static/fonts/Finador-BlackOblique.woff") format("woff");
}

.data-donation-extraction-results tbody tr:nth-child(even) {
background-color: #fafafa;
}

.data-donation-extraction-results thead {
background-color: #fafafa;
}

.data-donation-extraction-results thead tr {
font-family: "Finador-Bold";
font-size: 18px;
}

.data-donation-extraction-results tbody tr {
font-family: "Finador-Regular";
font-size: 14px;
}

.data-donation-extraction-results thead tr td,
th {
padding-top: 9px;
padding-bottom: 9px;
padding-left: 10px;
padding-right: 10px;
}

.data-donation-extraction-results tbody tr td,
th {
padding-top: 7px;
padding-bottom: 7px;
padding-left: 10px;
padding-right: 10px;
}
10 changes: 4 additions & 6 deletions core/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ import "./100vh-fix";
import { ViewportResize } from "./viewport_resize";
import { SidePanel } from "./side_panel";
import { Toggle } from "./toggle";
import { Cell } from "./cell";
import { LiveContent, LiveField } from "./live_content";
import { Tabbar, TabbarItem, TabbarFooterItem } from "./tabbar";
import { PythonUploader } from "./python_uploader";
import { Clipboard } from "./clipboard";
import { DataDonationHook } from "./data_donation_hook";
import { Port } from "./port";
import { FeldsparApp } from "./feldspar_app";

window.registerAPNSDeviceToken = registerAPNSDeviceToken;

Expand Down Expand Up @@ -96,15 +95,14 @@ let Hooks = {
ViewportResize,
SidePanel,
Toggle,
Cell,
LiveContent,
LiveField,
Tabbar,
TabbarItem,
TabbarFooterItem,
NativeWrapper,
PythonUploader,
DataDonationHook,
Port,
FeldsparApp,
};

let liveSocket = new LiveSocket("/live", Socket, {
Expand Down
82 changes: 82 additions & 0 deletions core/assets/js/cell.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
const COLLAPSED = "collapsed";
const EXPANDED = "expanded";

const COLLAPSED_VIEW = "cell-collapsed-view";
const EXPANDED_VIEW = "cell-expanded-view";

const COLLAPSE_BUTTON = "cell-collapse-button";
const EXPAND_BUTTON = "cell-expand-button";

export const Cell = {
mounted() {
this.collapseButton = this.el.getElementsByClassName(COLLAPSE_BUTTON)[0];
this.collapsedView = this.el.getElementsByClassName(COLLAPSED_VIEW)[0];

this.expandButton = this.el.getElementsByClassName(EXPAND_BUTTON)[0];
this.expandedView = this.el.getElementsByClassName(EXPANDED_VIEW)[0];

this.collapseButton.addEventListener("click", (event) => {
event.stopPropagation();
this.updateStatus(COLLAPSED);
});

this.expandButton.addEventListener("click", (event) => {
event.stopPropagation();
this.updateStatus(EXPANDED);
});

var initialStatus = this.el.dataset.initialStatus
? this.el.dataset.initialTab
: COLLAPSED;

var savedStatus = this.loadStatus();
this.status = savedStatus ? savedStatus : initialStatus;
this.updateUI();
},

updated() {
this.updateUI();
},

loadStatus() {
const key = this.getStatusKey();
const status = window.localStorage.getItem(key);
if (typeof status === "string") {
return status;
}
return undefined;
},

saveStatus() {
console.info("saveStatus ", this.status);
window.localStorage.setItem(this.getStatusKey(), this.status);
},

getStatusKey() {
return "cell://" + this.el.id + "/status";
},

updateStatus(status) {
this.status = status;
this.saveStatus();
this.updateUI();
},

updateUI() {
if (this.status == EXPANDED) {
this.hide(this.collapsedView);
this.show(this.expandedView);
} else {
this.show(this.collapsedView);
this.hide(this.expandedView);
}
},
hide(element) {
if (!element.classList.contains("hidden")) {
element.classList.add("hidden");
}
},
show(element) {
element.classList.remove("hidden");
},
};
17 changes: 0 additions & 17 deletions core/assets/js/data_donation_assembly.js

This file was deleted.

57 changes: 0 additions & 57 deletions core/assets/js/data_donation_hook.js

This file was deleted.

30 changes: 30 additions & 0 deletions core/assets/js/feldspar_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export const FeldsparApp = {
mounted() {
console.log("FeldsparApp MOUNTED");

const iframe = this.getIframe();
iframe.addEventListener("load", () => {
this.onFrameLoaded();
});
iframe.setAttribute("src", this.el.dataset.src);
},

getIframe() {
return this.el.querySelector("iframe");
},

onFrameLoaded() {
console.log("Initializing iframe app");
this.channel = new MessageChannel();
this.channel.port1.onmessage = (e) => {
this.handleMessage(e);
};
this.getIframe().contentWindow.postMessage("init", "*", [
this.channel.port2,
]);
},

handleMessage(e) {
this.pushEvent("app_event", e.data);
},
};
42 changes: 0 additions & 42 deletions core/assets/js/port.js

This file was deleted.

41 changes: 0 additions & 41 deletions core/assets/js/processing_engine.js

This file was deleted.

Loading

0 comments on commit eae370a

Please sign in to comment.