diff --git a/.earthlyignore b/.earthlyignore
new file mode 100644
index 00000000..53d80b30
--- /dev/null
+++ b/.earthlyignore
@@ -0,0 +1,4 @@
+node_modules
+build
+.git
+release.zip
\ No newline at end of file
diff --git a/.github/workflows/_build_release.yml b/.github/workflows/_build_release.yml
new file mode 100644
index 00000000..bd411929
--- /dev/null
+++ b/.github/workflows/_build_release.yml
@@ -0,0 +1,28 @@
+on:
+ workflow_call:
+ outputs:
+ archive:
+ description: "The name of the archive (ZIP)"
+ value: ${{jobs.release.outputs.archive}}
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ env:
+ MIX_ENV: prod
+ outputs:
+ archive: ${{ steps.tag.outputs.tag }}.zip
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Tag name
+ id: tag
+ run: echo "name=tag::v$(date +%F)_${{github.run_number}}" >> $GITHUB_OUTPUT
+
+ - uses: earthly/actions-setup@v1
+ with:
+ version: v0.7.8
+
+ - name: Build release
+ run: earthly +release --release_tag=${{steps.tag.outputs.tag}}
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 3896e894..004e3339 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -16,27 +16,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- - name: Set PUBLIC_URL in .env
- run: |
- REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
- echo "PUBLIC_URL=https://$(echo $GITHUB_REPOSITORY | cut -d'/' -f1).github.io/$REPO_NAME/" >> .env
-
- - name: Setup Node.js
- uses: actions/setup-node@v3
+ - uses: earthly/actions-setup@v1
with:
- node-version-file: ".tool-versions"
+ version: v0.7.8
- - name: Set up Python
- uses: actions/setup-python@v4
- with:
- python-version: 3.11
-
- - name: Install dependencies and build
- run: |
- npm install
- python -m pip install --upgrade pip
- python -m pip install poetry
- npm run dev:build
+ - name: Build release
+ run: earthly +release
+
+ - name: Unpack release
+ run: unzip release.zip -d build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..519b0421
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,18 @@
+name: Release
+
+on: workflow_dispatch
+
+jobs:
+ build_release:
+ uses: ./.github/workflows/_build_release.yml
+
+ tagged_release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: softprops/action-gh-release@v1
+ with:
+ tag_name: "${{ needs.build_release.outputs.archive }}"
+ prerelease: false
+ fail_on_unmatched_files: true
+ files: |
+ ${{ needs.release.outputs.archive }}
diff --git a/.gitignore b/.gitignore
index 4d29575d..8b69396a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+release.zip
+
# dependencies
/node_modules
/.pnp
diff --git a/.husky/pre-commit b/.husky/pre-commit
index e10a53ac..1549b6b5 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,9 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
-npm run prod:clean
-npm run prod
-npm run ci:test
+earthly +commit-hook
diff=$(git diff --name-only)
diff --git a/Earthfile b/Earthfile
new file mode 100644
index 00000000..ab91318f
--- /dev/null
+++ b/Earthfile
@@ -0,0 +1,42 @@
+VERSION 0.7
+FROM node:18-bookworm
+WORKDIR /code/
+ENV CI=true
+
+commit-hook:
+ BUILD +test
+ BUILD +lint
+
+setup-base:
+ COPY package.json package-lock.json ./
+ RUN npm ci
+ COPY --dir . ./
+
+test:
+ FROM +setup-base
+ RUN npm run test
+
+lint:
+ FROM +setup-base
+ RUN npm run lint
+
+build-py:
+ FROM python:3.11
+ WORKDIR /py
+ RUN python -m pip install poetry
+ COPY --dir src/framework/processing/py /
+ RUN poetry install
+ RUN poetry build --format wheel
+ SAVE ARTIFACT dist/
+
+release:
+ BUILD +build-py
+ ARG release_tag=release
+ FROM +setup-base
+ RUN apt-get update && apt install -y zip
+ COPY +build-py/dist/* public/
+ RUN npm run build:css
+ RUN --no-cache npx update-browserslist-db@latest
+ RUN npm run build:app
+ RUN npm run archive
+ SAVE ARTIFACT release.zip AS LOCAL $release_tag.zip
\ No newline at end of file
diff --git a/README.md b/README.md
index f1497424..be6a13d7 100644
--- a/README.md
+++ b/README.md
@@ -6,23 +6,23 @@
# Port: A frontend for data donation
-Port is a research tool that enables individuals to donate their digital trace data for academic research in a secure, transparent, and privacy-preserving way.
+Port is a research tool that enables individuals to donate their digital trace data for academic research in a secure, transparent, and privacy-preserving way.
Data donation allows researchers to invite participants to share their data download packages (DDPs).
-A major challenge is however that DDPs potentially contain very sensitive data, and often not all data is needed to answer the specific research question under investigation.
-To circumvent these challenges, an alternative framework was developed:
+A major challenge is however that DDPs potentially contain very sensitive data, and often not all data is needed to answer the specific research question under investigation.
+To circumvent these challenges, an alternative framework was developed:
1. The research participant requests their personal DDP at the platform of interest.
-2. They download it onto their own personal device.
-3. By means of local processing, only the features of interest to the researcher are extracted from that DDP.
-4. The participant inspects the extracted features after which they can consent (or decline) to donate.
+2. They download it onto their own personal device.
+3. By means of local processing, only the features of interest to the researcher are extracted from that DDP.
+4. The participant inspects the extracted features after which they can consent (or decline) to donate.
-To allow for the local processing (step 3) to take place, we developed the software Port.
-Port creates a frontend that guides participants through the data donation steps.
+To allow for the local processing (step 3) to take place, we developed the software Port.
+Port creates a frontend that guides participants through the data donation steps.
Port is open-source and allows for researchers to fully configure their own data donation study.
-*Note*: Port is only a frontend. In order for it to be used in a live study, it needs to be hosted with a server and integrate with a solution to store and retrieve the donated data.
+_Note_: Port is only a frontend. In order for it to be used in a live study, it needs to be hosted with a server and integrate with a solution to store and retrieve the donated data.
This repository will discuss a some readily available options.
## Installation
@@ -31,22 +31,23 @@ In order to start a local instance of Port go through the following steps:
0. Pre-requisites
- * Fork or clone this repo
- * Install [Node.js](https://nodejs.org/en)
- * Install [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/)
-
-1. Install dependencies:
+ - Fork or clone this repo
+ - Install [Node.js](https://nodejs.org/en)
+ - Install [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/)
- ```sh
- cd ./port
- npm install
- ```
+1. Install dependencies & tools:
-2. Start the local web server (with hotloading enabled):
+ ```sh
+ cd ./port
+ npm install
+ npm run prepare
+ ```
- ```sh
- npm run watch
- ```
+2. Start the local web server (with hot reloading enabled):
+
+ ```sh
+ npm run start
+ ```
3. You can now go to the browser: [`http://localhost:3000`](http://localhost:3000).
@@ -54,7 +55,7 @@ If the installation went correctly you should be greeted with a mock data donati
## How to use Port
-A researcher can implement their own data donation flow by writing a Python script.
+A researcher can implement their own data donation flow by altering the Python script.
The Python scripts has 2 main functions:
1. It determines the data donation flow. i.e. what screens (for example a file prompt) does the participant gets to see and when. You can use the Port API ([`props.py`](src/framework/processing/py/port/api/props.py)) for this.
@@ -66,7 +67,7 @@ A typical script includes the following steps:
2. Handling the submission from step 1. This is the step where you can extract the data you are interested in.
3. The extracted data is presented on screen accompanied with a consent button. After consent is given, the data is sent to a storage location of the researcher.
-A example such a script is included in this repo: [`script.py`](src/framework/processing/py/port/script.py).
+A example such a script is included in this repo: [`script.py`](src/framework/processing/py/port/script.py).
We recommend you use that script as starting point for your own data donation study.
You can find another example of such a script in this [repository](https://github.com/d3i-infra/port-d3i-pilot).
@@ -93,6 +94,7 @@ def process(sessionId):
```
[`ScriptWrapper`](src/framework/processing/py/port/main.py) and [py_worker](src/framework/processing/py_worker.js) using `send` to iterate over the commands one by one. For more information on yield and Generators: https://realpython.com/introduction-to-python-generators
+
@@ -102,6 +104,7 @@ def process(sessionId):
from port.api.props as props
from port.api.commands import (CommandUIRender, CommandUIDonate)
```
+
@@ -118,6 +121,7 @@ file_input_description = props.Translatable({
allowed_extensions = "application/zip, text/plain"
file_input = props.PropsUIPromptFileInput(file_input_description, allowed_extensions)
```
+
@@ -146,23 +150,25 @@ meta_tables = []
consent_form = props.PropsUIPromptConsentForm(tables, meta_tables)
```
+
Create donation page
-```Python
+```Python
header = props.PropsUIHeader(title)
footer = props.PropsUIFooter(progress)
body = props.PropsUIPromptFileInput(file_input_description, allowed_extensions)
page = props.PropsUIPageDonation(platform, header, body, footer)
```
+
Create page with radio buttons
-```Python
+```Python
header = props.PropsUIHeader(title)
footer = props.PropsUIFooter(progress)
body = props.PropsUIPromptRadioInput(title, description, [{"id": 0, "value": "Selection 1"}, {"id": 1, "value": "Selection 2"}])
@@ -190,6 +196,7 @@ if result.__type__ == "PayloadString":
else:
# No file selected
```
+
@@ -197,7 +204,7 @@ else:
```Python
platform = "Twitter"
-donation_key = f"{sessionId}-{platform}"
+donation_key = f"{sessionId}-{platform}"
page = props.PropsUIPageDonation(platform, header, consent_form, footer)
result = yield CommandUIRender(page)
@@ -206,257 +213,138 @@ if result.__type__ == "PayloadJSON":
# User gave consent
yield CommandSystemDonate(donation_key, result.value)
else:
- # User declined or skipped
+ # User declined or skipped
```
+
Track user behaviour
```Python
-tracking_key = f"{sessionId}-tracking"
+tracking_key = f"{sessionId}-tracking"
data = "any json string"
# Use the donate command to store tracking data
yield CommandSystemDonate(tracking_key, data)
```
-
-
-## Use Port in a data donation study
-
-Port is a frontend it creates the app that participants will end up interacting with: it determines the data donation flow and extraction logic.
-If you want to use Port in a data dontion study it needs to be hosted by a server an needs a way of storing donated data.
-
-In order to do a data donation study with Port you have several options:
-
-### Port + Next on the Azure Cloud (Recommended)
-
-1. Create production code
-
- ```sh
- npm run prod:clean && npm run prod:build
- ```
-
- The production code can now be found in the `dist` folder.
-
-2. Run Port on top of Next on the Azure cloud.
-
- For instructions on running [Next](https://github.com/d3i-infra/port-d3i-pilot) + Port see: https://github.com/eyra/mono/blob/d3i/latest/PORT.md
-### Port + Portserver (Not recommended)
-
-1. Create production code
-
- ```sh
- npm run prod:clean && npm run prod:build
- ```
-
- The production code can now be found in the `dist` folder.
-
-2. Run Port with [Portserver](https://github.com/trbKnl/portserver).
-
-This is a fairly minimal and cloud agnostic implementation of a server that can serve Port (just like Next it uses Elixir and Phoenix).
-It uses a database for storing donated data.
-
-### Data donation as a service
-
-Data donation very interesting but sounds like way too much work? Feel free to contact [Eyra](https://eyra.co/).
-
-### Implement your own server for Port
-
-You can also implement your own server for Port.
-If you want to use your own server solution, please check out these instuctions below:
-
-
-Add Port app as dependency
-
-Make sure to link your forked Port app as a dependency in your web server code. If `npm` is your dependency manager, add a dependency in `package.json` as follows:
-
-```json
-"dependencies": {
- "port": "github:/port",
-},
-```
-
-And resolve dependencies:
-
-```sh
-npm install
-```
-
-Import code from Port dist folder
-
-```Javascript
-import Assembly from "port/dist/framework/assembly";
-import Worker from "port/dist/framework/processing/py_worker.js";
-
-import "port/dist/port-0.0.0-py3-none-any.whl";
-import "port/dist/styles.css";
-```
-
-In this example above imports can be resolved by Webpack (worker-loader, css-loader, and file-loader). Make sure to include the correct config in your `webpack.config.js`:
-
-```Javascript
-module: {
- rules: [
- {
- test: /worker\.js$/,
- use: { loader: "worker-loader" },
- },
- {
- test: /\.css$/,
- use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"],
- },
- {
- test: /\.whl$/,
- use: [
- {
- loader: "file-loader",
- options: { name: "[name].[ext]", outputPath: "../" },
- },
- ],
- },
- ]
-}
-```
-
-
-
-Implement System callback interface
+## Use Port in a data donation study
-```Typescript
-// Typescript example
-import { CommandSystem, CommandSystemDonate, isCommandSystemDonate } from 'port/dist/framework/types/commands'
-import { System } from 'port/dist/framework/types/modules'
-
-export default class MySystem implements System {
- send (command: CommandSystem): void {
- if (isCommandSystemDonate(command)) {
- this.handleDonation(command)
- } else {
- console.log('[LocalSystem] received unknown command: ' + JSON.stringify(command))
- }
- }
-
- handleDonation (command: CommandSystemDonate): void {
- console.log(`[LocalSystem] received donation: ${command.key}=${command.json_string}`)
- }
-}
+Port serves as the frontend, providing the application with which participants
+engage. It defines the flow and logic for data donation. To utilize Port in a
+data donation study, it must be hosted on a server capable of storing the
+donated data.
+
+You can host Port by embedding it in an
+[iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe).
+After the iframe loads, send a message that includes a channel. The Port
+application will use this channel to relay messages with data ready for storage.
+Here's a JavaScript example:
+
+```javascript
+// ... wait until the iframe is loaded
+const channel = new MessageChannel();
+channel.port1.onmessage = (e) => {
+ console.log("Message receive from Port app", e);
+};
+// get the iframe via querySelector or another method
+iframe.contentWindow.postMessage("init", "*", [this.channel.port2]);
```
-
-
-
-Implement start donation session
-
-```Typescript
-// Typescript example
-import MySystem from "my_system.ts";
-import Assembly from "port/dist/framework/assembly";
-import Worker from "port/dist/framework/processing/py_worker.js";
-
-import "port/dist/port-0.0.0-py3-none-any.whl";
-import "port/dist/styles.css";
-
-const locale = 'en' // preferred locale
-const parent = 'parent_id' // parent DOM element id
-
-const worker = new Worker();
-const system = new MySystem();
-const container = document.getElementById(parent);
-this.assembly = new Assembly(worker, system);
-this.assembly.visualisationEngine.start(container, locale);
-this.assembly.processingEngine.start();
-```
-Workers can not be reused over sessions. Re-run code above for every new donation session.
+### Data donation as a service
-
+Data donation sounds intriguing but seems like a lot to handle? Don't hesitate
+to reach out to [Eyra](https://eyra.co/).
-### Previous studies done with Port
+### Previous studies done with Port
Here you can find a [list](https://github.com/eyra/port/wiki/Previous-data-donation-studies) of previous studies that were completed using Port. These studies can serve as inspiration or example for your own data donation study!
-# Technical details of Port
+# Technical specifications of Port
-You can use Port as is, but if your study has demand for something you are free to change the way Port works.
-Luckily Port is customizable, is this something you want? Use these technical details to your advantage.
+Port is ready for use out of the box (just update the Python script). However,
+if your study requires specific adjustments (new interactive elements etc.), you
+have the flexibility to modify Port's functionalities. If customization is what
+you're after, leverage the following technical insights to suit your needs.
## Data model
Port uses the following data model (also see: [src/framework/types](src/framework/types))
-* [Modules](src/framework/types/modules.ts)
+- [Modules](src/framework/types/modules.ts)
- | Module | Description |
- | ------------- | ------------- |
- | ProcessingEngine | Responsible for processing donation flows |
- | VisualizationEngine | Responsible for presenting the UI and accepting user input |
- | CommandHandler | Decoupling of ProcessingEngine and VisualizationEngine |
- | System | Callback interface for System Commands (e.g. Donation) |
+ | Module | Description |
+ | ------------------- | ---------------------------------------------------------- |
+ | ProcessingEngine | Responsible for processing donation flows |
+ | VisualizationEngine | Responsible for presenting the UI and accepting user input |
+ | CommandHandler | Decoupling of ProcessingEngine and VisualizationEngine |
+ | Storage | Callback interface for Storage Commands (e.g. Donation) |
-* [Pages](src/framework/types/pages.ts)
+- [Pages](src/framework/types/pages.ts)
- | Page | Description |
- | ------------- | ------------- |
- | SplashScreen | First page that is rendered before the Python script is loaded with GDPR consent logic |
- | Donation | Page that uses several prompts to get a file from the user and consent to donate the extracted data |
- | End | Final page with instructions on how to continue |
+ | Page | Description |
+ | ------------ | --------------------------------------------------------------------------------------------------- |
+ | SplashScreen | First page that is rendered before the Python script is loaded with GDPR consent logic |
+ | Donation | Page that uses several prompts to get a file from the user and consent to donate the extracted data |
+ | End | Final page with instructions on how to continue |
-* [Prompts](src/framework/types/prompts.ts)
+- [Prompts](src/framework/types/prompts.ts)
- | Prompt | Description |
- | ------------- | ------------- |
- | FileInput | File selection |
- | RadioInput | Multiple choice question |
- | ConsentForm | Displays extracted data in tables and asks for user consent |
- | Confirm | General dialog to ask for extra confirmation |
+ | Prompt | Description |
+ | ----------- | ----------------------------------------------------------- |
+ | FileInput | File selection |
+ | RadioInput | Multiple choice question |
+ | ConsentForm | Displays extracted data in tables and asks for user consent |
+ | Confirm | General dialog to ask for extra confirmation |
-* [Commands](src/framework/types/commands.ts)
+- [Commands](src/framework/types/commands.ts)
- | Command | Description |
- | ------------- | ------------- |
- | Render | Render the page |
- | Donate | Save the extracted data |
+ | Command | Description |
+ | ------- | ----------------------- |
+ | Render | Render the page |
+ | Donate | Save the extracted data |
- Commands can be send from the Python script using the `yield` keyword.
+ Commands can be send from the Python script using the `yield` keyword.
-* [Payloads](src/framework/types/commands.ts)
+- [Payloads](src/framework/types/commands.ts)
- | Payload | Description |
- | ------------- | ------------- |
- | Void | Command without user input as a response |
- | True | Positive user input (e.g. Ok button in confirm prompt) |
- | False | Negative user input (e.g. Cancel button in confirm prompt) |
- | Error | Unexpected problem when handling command |
- | String | String result |
- | File | Only used in Javascript. This is intercepted in [py_worker.js](src/framework/processing/py_worker.js) and translated into a String (filename), while the bytes of the file are written to the Pyodide file system |
- | JSON | User input structured as JSON, used to return the consent data from the consent form |
+ | Payload | Description |
+ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ | Void | Command without user input as a response |
+ | True | Positive user input (e.g. Ok button in confirm prompt) |
+ | False | Negative user input (e.g. Cancel button in confirm prompt) |
+ | Error | Unexpected problem when handling command |
+ | String | String result |
+ | File | Only used in Javascript. This is intercepted in [py_worker.js](src/framework/processing/py_worker.js) and translated into a String (filename), while the bytes of the file are written to the Pyodide file system |
+ | JSON | User input structured as JSON, used to return the consent data from the consent form |
- Payloads are part of a Response back to the Python script after sending commands:
+ Payloads are part of a Response back to the Python script after sending commands:
- ```Javascript
- export interface Response {
- __type__: 'Response'
- command: Command
- payload: Payload
- }
- ```
- Responses are intercepted in [py_worker.js](src/framework/processing/py_worker.js) and only the payload is returned to the Python script. Payloads don't have a Python representation in the [API](src/framework/processing/py/port/api) yet. They are translated into a dictionary (default Pyodide behaviour).
+ ```Javascript
+ export interface Response {
+ __type__: 'Response'
+ command: Command
+ payload: Payload
+ }
+ ```
+
+ Responses are intercepted in [py_worker.js](src/framework/processing/py_worker.js) and only the payload is returned to the Python script. Payloads don't have a Python representation in the [API](src/framework/processing/py/port/api) yet. They are translated into a dictionary (default Pyodide behaviour).
## Python-Javascript interoperability
See: [src/framework/processing/py/port](src/framework/processing/py/port)
-* [ScriptWrapper](src/framework/processing/py/port/main.py)
+- [ScriptWrapper](src/framework/processing/py/port/main.py)
- This object is used in [main](src/framework/processing/py/port/main.py) to wrap the `process` generator function in your script. It translates incoming Javascript and outgoing Python commands.
+ This object is used in [main](src/framework/processing/py/port/main.py) to wrap the `process` generator function in your script. It translates incoming Javascript and outgoing Python commands.
-* [API](src/framework/processing/py/port/api)
+- [API](src/framework/processing/py/port/api)
- - [commands.py](src/framework/processing/py/port/api/commands.py): Defines commands, pages and prompts that are used to communicate from the Python script to the `VisualisationEngine` and `System`.
- - [props.py](src/framework/processing/py/port/api/commands.py): Defines property objects for pages and prompts
+ - [commands.py](src/framework/processing/py/port/api/commands.py): Defines commands, pages and prompts that are used to communicate from the Python script to the `VisualisationEngine` and `Storage`.
+ - [props.py](src/framework/processing/py/port/api/commands.py): Defines property objects for pages and prompts
## Code instructions
@@ -467,8 +355,8 @@ These instructions give you some pointers on things you might like to change or
The app has two types of copy:
-* Dynamic copy: part of the [Python script](src/framework/processing/py/port/script.py)
-* Static copy: part of [React components](src/framework/visualisation/react/ui)
+- Dynamic copy: part of the [Python script](src/framework/processing/py/port/script.py)
+- Static copy: part of [React components](src/framework/visualisation/react/ui)
Currently two languages are supported (Dutch and English). The Translatable object plays a central role and has a [Python](src/framework/processing/py/port/api/props.py) and a [Typescript](src/framework/types/elements.ts) implementation
@@ -481,7 +369,7 @@ copy = Translatable({
"en": "English text",
"nl": "Nederlandse tekst"
})
-```
+```
In React components copy is handled as follows:
@@ -513,6 +401,7 @@ const staticCopy = (): Translatable => {
.add('nl', 'Nederlands')
}
```
+
@@ -586,6 +475,7 @@ const continueButtonLabel = (): Translatable => {
.add('nl', 'Verder')
}
```
+
@@ -595,7 +485,7 @@ Python packages are loaded using micropip:
```Python
await micropip.install("https://domain.com/path/to/python.whl", deps=False)
-```
+```
Add the above statement to the [py_worker.js](src/framework/processing/py_worker.js) file as follows:
@@ -608,7 +498,7 @@ function installPortPackage() {
await micropip.install("/port-0.0.0-py3-none-any.whl", deps=False)
import port
- `);
+ `);
}
```
@@ -650,7 +540,7 @@ Change implementation of [assembly.ts](src/framework/assembly.ts) to support you
```Typescript
import MyEngine from './visualisation/my/engine'
import WorkerProcessingEngine from './processing/worker_engine'
-import { VisualisationEngine, ProcessingEngine, System } from './types/modules'
+import { VisualisationEngine, ProcessingEngine, Storage } from './types/modules'
import CommandRouter from './command_router'
export default class Assembly {
@@ -658,14 +548,15 @@ export default class Assembly {
processingEngine: ProcessingEngine
router: CommandRouter
- constructor (worker: Worker, system: System) {
+ constructor (worker: Worker, system: Storage) {
const sessionId = String(Date.now())
this.visualisationEngine = new MyEngine()
this.router = new CommandRouter(system, this.visualisationEngine)
this.processingEngine = new WorkerProcessingEngine(sessionId, worker, this.router)
}
-}
+}
```
+
@@ -700,14 +591,14 @@ function runCycle (payload) {
console.log('[ProcessingWorker] runCycle ' + JSON.stringify(payload))
// Insert script code here:
// 1. Handle the payload
- // 2. Create next command, eg:
- nextCommand = new CommandUIRender(new PropsUIPageDonation(...))
+ // 2. Create next command, eg:
+ nextCommand = new CommandUIRender(new PropsUIPageDonation(...))
self.postMessage({
eventType: 'runCycleDone',
scriptEvent: nextCommand
})
}
-```
+```
Change the implementation of [index.tsx](src/index.tsx) to support your new worker file:
@@ -723,35 +614,35 @@ Make sure to add the worker to the `ts-standard` ignore list in [package.json](p
"src/framework/processing/my_worker.js"
]
}
-```
+```
Note: don't forget to import this new worker file in your server code
+
## Testing
1. Automatic
- [Jest](https://jestjs.io) is used as a testing framework. Tests can be found here: [src/test](src/test).
+ [Jest](https://jestjs.io) is used as a testing framework. Tests can be found here: [src/test](src/test).
- Run all unit tests:
+ Run all unit tests:
- ```sh
- npm run dev:test
- ```
+ ```sh
+ npm run dev:test
+ ```
2. Manual
-
- Start the local web server (with hotloading enabled):
- ```sh
- npm run dev:start
- ```
+ Start the local web server (with hotloading enabled):
-3. Integration with Next
+ ```sh
+ npm run dev:start
+ ```
- To run the Port app on top of Next locally see: https://github.com/eyra/mono/blob/d3i/latest/PORT.md
+3. Integration with Next
+ To run the Port app on top of Next locally see: https://github.com/eyra/mono/blob/d3i/latest/PORT.md
### Technical notes
@@ -761,7 +652,7 @@ Code in [Javascript types](src/framework/types) and [Python api](src/framework/p
#### React
-The project is a react app created by [create-react-app](https://create-react-app.dev). This is not set in stone for the future but it was a nice way to speed up the development process in the beginning. Using this strongly opinionated setup hides most of the configuration. It uses [webpack](https://webpack.js.org/concepts) to bundle and serve the app.
+The project is a react app created by [create-react-app](https://create-react-app.dev). This is not set in stone for the future but it was a nice way to speed up the development process in the beginning. Using this strongly opinionated setup hides most of the configuration. It uses [webpack](https://webpack.js.org/concepts) to bundle and serve the app.
#### Code style
@@ -771,19 +662,18 @@ The project uses [ts-standard](https://github.com/standard/ts-standard) for mana
Before committing to github [Husky](https://github.com/typicode/husky) runs all the necessary scripts to make sure the code conforms to `ts-standard`, all the tests run green, and the `dist` folder is up-to-date.
-
## Digital Data Donation Infrastructure (D3I)
Port is funded by the PDI-SSH and is a collaboration between six Dutch universities and Eyra.
The consortium is composed of researchers from:
-* University of Amsterdam
-* Radboud University Nijmegen
-* VU Amsterdam
-* Utrecht University
-* Tilburg University
-* Erasmus University Rotterdam
+- University of Amsterdam
+- Radboud University Nijmegen
+- VU Amsterdam
+- Utrecht University
+- Tilburg University
+- Erasmus University Rotterdam
### D3I Pilot
@@ -793,12 +683,9 @@ The first phase of the project ended in December 2022 and resulted in an MVP sol
We want to make contributing to this project as easy and transparent as possible, whether it's:
-* Reporting a bug
-* Discussing the current state of the code
-* Submitting a fix
-* Proposing new features
+- Reporting a bug
+- Discussing the current state of the code
+- Submitting a fix
+- Proposing new features
If you have any questions, find any bugs, or have any ideas, read how to contribute [here](https://github.com/eyra/port/blob/master/CONTRIBUTING.md).
-
-
-
diff --git a/dist/assets/images/back.svg b/dist/assets/images/back.svg
deleted file mode 100644
index 8d275e41..00000000
--- a/dist/assets/images/back.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/dist/assets/images/check.svg b/dist/assets/images/check.svg
deleted file mode 100644
index e53ea5db..00000000
--- a/dist/assets/images/check.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/dist/assets/images/check_active.svg b/dist/assets/images/check_active.svg
deleted file mode 100644
index 52c7b145..00000000
--- a/dist/assets/images/check_active.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/dist/assets/images/delete.svg b/dist/assets/images/delete.svg
deleted file mode 100644
index 7cbf916d..00000000
--- a/dist/assets/images/delete.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-
diff --git a/dist/assets/images/facebook.svg b/dist/assets/images/facebook.svg
deleted file mode 100644
index 041c273a..00000000
--- a/dist/assets/images/facebook.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-
diff --git a/dist/assets/images/forward.svg b/dist/assets/images/forward.svg
deleted file mode 100644
index 0b1cb8b9..00000000
--- a/dist/assets/images/forward.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/dist/assets/images/instagram.svg b/dist/assets/images/instagram.svg
deleted file mode 100644
index e82bb907..00000000
--- a/dist/assets/images/instagram.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/dist/assets/images/logo.svg b/dist/assets/images/logo.svg
deleted file mode 100644
index 75a03c70..00000000
--- a/dist/assets/images/logo.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-
diff --git a/dist/assets/images/radio.svg b/dist/assets/images/radio.svg
deleted file mode 100644
index 4ce24fc8..00000000
--- a/dist/assets/images/radio.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/dist/assets/images/radio_active.svg b/dist/assets/images/radio_active.svg
deleted file mode 100644
index 5edab1b4..00000000
--- a/dist/assets/images/radio_active.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/dist/assets/images/spinner.svg b/dist/assets/images/spinner.svg
deleted file mode 100644
index ef958cc3..00000000
--- a/dist/assets/images/spinner.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
\ No newline at end of file
diff --git a/dist/assets/images/twitter.svg b/dist/assets/images/twitter.svg
deleted file mode 100644
index f8c3aee2..00000000
--- a/dist/assets/images/twitter.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/dist/assets/images/undo.svg b/dist/assets/images/undo.svg
deleted file mode 100644
index 37f43636..00000000
--- a/dist/assets/images/undo.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/dist/assets/images/youtube.svg b/dist/assets/images/youtube.svg
deleted file mode 100644
index 7b84e3ed..00000000
--- a/dist/assets/images/youtube.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/dist/assets/lottie/spinner-dark.json b/dist/assets/lottie/spinner-dark.json
deleted file mode 100644
index d147f861..00000000
--- a/dist/assets/lottie/spinner-dark.json
+++ /dev/null
@@ -1 +0,0 @@
-{"v":"5.7.5","fr":30,"ip":0,"op":50,"w":20,"h":20,"nm":"Loading spinner BLUE","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[10,10,0],"ix":2,"l":2},"a":{"a":0,"k":[3.178,3.178,0],"ix":1,"l":2},"s":{"a":0,"k":[36.9132,36.9132,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[45.356,45.356],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.13333333333333333,0.13333333333333333,0.13333333333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":7,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3.178,3.178],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.335],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":15,"s":[0]},{"t":50,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.17],"y":[1]},"o":{"x":[0.362],"y":[0.158]},"t":0,"s":[0.1]},{"t":40,"s":[100]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.166],"y":[0.61]},"o":{"x":[0.75],"y":[0.35]},"t":0,"s":[0]},{"t":50,"s":[360]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/dist/assets/lottie/spinner-light.json b/dist/assets/lottie/spinner-light.json
deleted file mode 100644
index 0f515a19..00000000
--- a/dist/assets/lottie/spinner-light.json
+++ /dev/null
@@ -1 +0,0 @@
-{"v":"5.7.5","fr":30,"ip":0,"op":50,"w":20,"h":20,"nm":"Loading spinner BLUE","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[10,10,0],"ix":2,"l":2},"a":{"a":0,"k":[3.178,3.178,0],"ix":1,"l":2},"s":{"a":0,"k":[36.9132,36.9132,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[45.356,45.356],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":7,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3.178,3.178],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.335],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":15,"s":[0]},{"t":50,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.17],"y":[1]},"o":{"x":[0.362],"y":[0.158]},"t":0,"s":[0.1]},{"t":40,"s":[100]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.166],"y":[0.61]},"o":{"x":[0.75],"y":[0.35]},"t":0,"s":[0]},{"t":50,"s":[360]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/dist/assets/lottie/spinner-primary.json b/dist/assets/lottie/spinner-primary.json
deleted file mode 100644
index dea3d01e..00000000
--- a/dist/assets/lottie/spinner-primary.json
+++ /dev/null
@@ -1 +0,0 @@
-{"v":"5.7.5","fr":30,"ip":0,"op":50,"w":20,"h":20,"nm":"Loading spinner BLUE","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[10,10,0],"ix":2,"l":2},"a":{"a":0,"k":[3.178,3.178,0],"ix":1,"l":2},"s":{"a":0,"k":[36.9132,36.9132,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[45.356,45.356],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.25882352941176473,0.4470588235294118,0.9372549019607843,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":7,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3.178,3.178],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.335],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":15,"s":[0]},{"t":50,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.17],"y":[1]},"o":{"x":[0.362],"y":[0.158]},"t":0,"s":[0.1]},{"t":40,"s":[100]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.166],"y":[0.61]},"o":{"x":[0.75],"y":[0.35]},"t":0,"s":[0]},{"t":50,"s":[360]}],"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/dist/framework/assembly.d.ts b/dist/framework/assembly.d.ts
deleted file mode 100644
index 2cd59534..00000000
--- a/dist/framework/assembly.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { VisualisationEngine, ProcessingEngine, System } from './types/modules';
-import CommandRouter from './command_router';
-export default class Assembly {
- visualisationEngine: VisualisationEngine;
- processingEngine: ProcessingEngine;
- router: CommandRouter;
- constructor(worker: Worker, system: System);
-}
diff --git a/dist/framework/assembly.js b/dist/framework/assembly.js
deleted file mode 100644
index 6cb91871..00000000
--- a/dist/framework/assembly.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ReactEngine from './visualisation/react/engine';
-import ReactFactory from './visualisation/react/factory';
-import WorkerProcessingEngine from './processing/worker_engine';
-import CommandRouter from './command_router';
-var Assembly = /** @class */ (function () {
- function Assembly(worker, system) {
- var sessionId = String(Date.now());
- this.visualisationEngine = new ReactEngine(new ReactFactory());
- this.router = new CommandRouter(system, this.visualisationEngine);
- this.processingEngine = new WorkerProcessingEngine(sessionId, worker, this.router);
- }
- return Assembly;
-}());
-export default Assembly;
diff --git a/dist/framework/command_router.d.ts b/dist/framework/command_router.d.ts
deleted file mode 100644
index 9c6f2b94..00000000
--- a/dist/framework/command_router.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Command, Response, CommandUI, CommandSystem } from './types/commands';
-import { CommandHandler, System, VisualisationEngine } from './types/modules';
-export default class CommandRouter implements CommandHandler {
- system: System;
- visualisationEngine: VisualisationEngine;
- constructor(system: System, visualisationEngine: VisualisationEngine);
- onCommand(command: Command): Promise;
- onCommandSystem(command: CommandSystem, resolve: (response: Response) => void): void;
- onCommandUI(command: CommandUI, reject: (reason?: any) => void): void;
-}
diff --git a/dist/framework/command_router.js b/dist/framework/command_router.js
deleted file mode 100644
index 1eb3dfd6..00000000
--- a/dist/framework/command_router.js
+++ /dev/null
@@ -1,73 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-import { isCommandSystem, isCommandUI } from './types/commands';
-var CommandRouter = /** @class */ (function () {
- function CommandRouter(system, visualisationEngine) {
- this.system = system;
- this.visualisationEngine = visualisationEngine;
- }
- CommandRouter.prototype.onCommand = function (command) {
- return __awaiter(this, void 0, void 0, function () {
- var _this = this;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, new Promise(function (resolve, reject) {
- if (isCommandSystem(command)) {
- _this.onCommandSystem(command, resolve);
- }
- else if (isCommandUI(command)) {
- _this.onCommandUI(command, resolve);
- }
- else {
- reject(new TypeError('Unknown command' + JSON.stringify(command)));
- }
- })];
- case 1: return [2 /*return*/, _a.sent()];
- }
- });
- });
- };
- CommandRouter.prototype.onCommandSystem = function (command, resolve) {
- this.system.send(command);
- resolve({ __type__: 'Response', command: command, payload: { __type__: 'PayloadVoid', value: undefined } });
- };
- CommandRouter.prototype.onCommandUI = function (command, reject) {
- this.visualisationEngine.render(command).then(function (response) { reject(response); }, function () { });
- };
- return CommandRouter;
-}());
-export default CommandRouter;
diff --git a/dist/framework/helpers.d.ts b/dist/framework/helpers.d.ts
deleted file mode 100644
index fc2d8724..00000000
--- a/dist/framework/helpers.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { Omit } from 'lodash';
-export declare const isInstanceOf: (arg: any, type: string, properties: (keyof T)[]) => arg is T;
-export declare const isLike: (arg: any, properties: (keyof T)[]) => arg is T;
-export declare function assert(condition: unknown, msg?: string): asserts condition;
-export declare type Weak = Omit;
diff --git a/dist/framework/helpers.js b/dist/framework/helpers.js
deleted file mode 100644
index 9832bcf0..00000000
--- a/dist/framework/helpers.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export var isInstanceOf = function (arg, type, properties) {
- return (arg === null || arg === void 0 ? void 0 : arg.__type__) === type && isLike(arg, properties);
-};
-export var isLike = function (arg, properties) {
- properties.forEach(function (property) { return assert(arg[property] !== undefined, "Property ".concat(String(property), " is required")); });
- return true;
-};
-export function assert(condition, msg) {
- if (condition === false)
- throw new Error(msg);
-}
diff --git a/dist/framework/processing/py_worker.d.ts b/dist/framework/processing/py_worker.d.ts
deleted file mode 100644
index e5f614ef..00000000
--- a/dist/framework/processing/py_worker.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-declare function runCycle(payload: any): void;
-declare function unwrap(response: any): Promise;
-declare function copyFileToPyFS(file: any, resolve: any): void;
-declare function initialise(): any;
-declare function startPyodide(): any;
-declare function loadPackages(): any;
-declare function installPortPackage(): any;
-declare let pyScript: any;
diff --git a/dist/framework/processing/py_worker.js b/dist/framework/processing/py_worker.js
deleted file mode 100644
index 76a5cd5e..00000000
--- a/dist/framework/processing/py_worker.js
+++ /dev/null
@@ -1,86 +0,0 @@
-var pyScript;
-onmessage = function (event) {
- var eventType = event.data.eventType;
- switch (eventType) {
- case 'initialise':
- initialise().then(function () {
- self.postMessage({ eventType: 'initialiseDone' });
- });
- break;
- case 'firstRunCycle':
- pyScript = self.pyodide.runPython("port.start(".concat(event.data.sessionId, ")"));
- runCycle(null);
- break;
- case 'nextRunCycle':
- var response = event.data.response;
- unwrap(response).then(function (userInput) {
- runCycle(userInput);
- });
- break;
- default:
- console.log('[ProcessingWorker] Received unsupported event: ', eventType);
- }
-};
-function runCycle(payload) {
- console.log('[ProcessingWorker] runCycle ' + JSON.stringify(payload));
- scriptEvent = pyScript.send(payload);
- self.postMessage({
- eventType: 'runCycleDone',
- scriptEvent: scriptEvent.toJs({
- create_proxies: false,
- dict_converter: Object.fromEntries
- })
- });
-}
-function unwrap(response) {
- console.log('[ProcessingWorker] unwrap response: ' + JSON.stringify(response.payload));
- return new Promise(function (resolve) {
- switch (response.payload.__type__) {
- case 'PayloadFile':
- copyFileToPyFS(response.payload.value, resolve);
- break;
- default:
- resolve(response.payload);
- }
- });
-}
-function copyFileToPyFS(file, resolve) {
- var reader = file.stream().getReader();
- var pyFile = self.pyodide.FS.open(file.name, 'w');
- var writeToPyFS = function (_a) {
- var done = _a.done, value = _a.value;
- if (done) {
- resolve({ __type__: 'PayloadString', value: file.name });
- }
- else {
- self.pyodide.FS.write(pyFile, value, 0, value.length);
- reader.read().then(writeToPyFS);
- }
- };
- reader.read().then(writeToPyFS);
-}
-function initialise() {
- console.log('[ProcessingWorker] initialise');
- return startPyodide().then(function (pyodide) {
- self.pyodide = pyodide;
- return loadPackages();
- })
- .then(function () {
- return installPortPackage();
- });
-}
-function startPyodide() {
- importScripts('https://cdn.jsdelivr.net/pyodide/v0.21.2/full/pyodide.js');
- console.log('[ProcessingWorker] loading Pyodide');
- return loadPyodide({
- indexURL: 'https://cdn.jsdelivr.net/pyodide/v0.21.2/full/'
- });
-}
-function loadPackages() {
- console.log('[ProcessingWorker] loading packages');
- return self.pyodide.loadPackage(['micropip', 'numpy', 'pandas']);
-}
-function installPortPackage() {
- console.log('[ProcessingWorker] load port package');
- return self.pyodide.runPythonAsync("\n import micropip\n await micropip.install(\"../../port-0.0.0-py3-none-any.whl\", deps=False)\n import port\n ");
-}
diff --git a/dist/framework/processing/worker_engine.d.ts b/dist/framework/processing/worker_engine.d.ts
deleted file mode 100644
index 9766fed8..00000000
--- a/dist/framework/processing/worker_engine.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { CommandHandler, ProcessingEngine } from '../types/modules';
-import { Response } from '../types/commands';
-export default class WorkerProcessingEngine implements ProcessingEngine {
- sessionId: String;
- worker: Worker;
- commandHandler: CommandHandler;
- resolveInitialized: () => void;
- resolveContinue: () => void;
- constructor(sessionId: string, worker: Worker, commandHandler: CommandHandler);
- trackUserStart(sessionId: string): void;
- handleEvent(event: any): void;
- start(): void;
- waitForInitialization(): Promise;
- waitForSplashScreen(): Promise;
- renderSplashScreen(): void;
- firstRunCycle(): void;
- nextRunCycle(response: Response): void;
- terminate(): void;
- handleRunCycle(command: any): void;
-}
diff --git a/dist/framework/processing/worker_engine.js b/dist/framework/processing/worker_engine.js
deleted file mode 100644
index c546c376..00000000
--- a/dist/framework/processing/worker_engine.js
+++ /dev/null
@@ -1,132 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-import { isCommand } from '../types/commands';
-var WorkerProcessingEngine = /** @class */ (function () {
- function WorkerProcessingEngine(sessionId, worker, commandHandler) {
- var _this = this;
- this.sessionId = sessionId;
- this.commandHandler = commandHandler;
- this.worker = worker;
- this.worker.onerror = console.log;
- this.worker.onmessage = function (event) {
- console.log('[WorkerProcessingEngine] Received event from worker: ', event.data.eventType);
- _this.handleEvent(event);
- };
- this.trackUserStart(sessionId);
- }
- WorkerProcessingEngine.prototype.trackUserStart = function (sessionId) {
- var key = "".concat(sessionId, "-tracking");
- var jsonString = JSON.stringify({ message: 'user started' });
- var command = { __type__: 'CommandSystemDonate', key: key, json_string: jsonString };
- this.commandHandler.onCommand(command).then(function () { }, function () { });
- };
- WorkerProcessingEngine.prototype.handleEvent = function (event) {
- var eventType = event.data.eventType;
- console.log('[ReactEngine] received eventType: ', eventType);
- switch (eventType) {
- case 'initialiseDone':
- console.log('[ReactEngine] received: initialiseDone');
- this.resolveInitialized();
- break;
- case 'runCycleDone':
- console.log('[ReactEngine] received: event', event.data.scriptEvent);
- this.handleRunCycle(event.data.scriptEvent);
- break;
- default:
- console.log('[ReactEngine] received unsupported flow event: ', eventType);
- }
- };
- WorkerProcessingEngine.prototype.start = function () {
- var _this = this;
- console.log('[WorkerProcessingEngine] started');
- var waitForInitialization = this.waitForInitialization();
- var waitForSplashScreen = this.waitForSplashScreen();
- Promise.all([waitForInitialization, waitForSplashScreen]).then(function () { _this.firstRunCycle(); }, function () { });
- };
- WorkerProcessingEngine.prototype.waitForInitialization = function () {
- return __awaiter(this, void 0, void 0, function () {
- var _this = this;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, new Promise(function (resolve) {
- _this.resolveInitialized = resolve;
- _this.worker.postMessage({ eventType: 'initialise' });
- })];
- case 1: return [2 /*return*/, _a.sent()];
- }
- });
- });
- };
- WorkerProcessingEngine.prototype.waitForSplashScreen = function () {
- return __awaiter(this, void 0, void 0, function () {
- var _this = this;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, new Promise(function (resolve) {
- _this.resolveContinue = resolve;
- _this.renderSplashScreen();
- })];
- case 1: return [2 /*return*/, _a.sent()];
- }
- });
- });
- };
- WorkerProcessingEngine.prototype.renderSplashScreen = function () {
- var _this = this;
- var command = { __type__: 'CommandUIRender', page: { __type__: 'PropsUIPageSplashScreen' } };
- if (isCommand(command)) {
- this.commandHandler.onCommand(command).then(function (_response) { return _this.resolveContinue(); }, function () { });
- }
- };
- WorkerProcessingEngine.prototype.firstRunCycle = function () {
- this.worker.postMessage({ eventType: 'firstRunCycle', sessionId: this.sessionId });
- };
- WorkerProcessingEngine.prototype.nextRunCycle = function (response) {
- this.worker.postMessage({ eventType: 'nextRunCycle', response: response });
- };
- WorkerProcessingEngine.prototype.terminate = function () {
- this.worker.terminate();
- };
- WorkerProcessingEngine.prototype.handleRunCycle = function (command) {
- var _this = this;
- if (isCommand(command)) {
- this.commandHandler.onCommand(command).then(function (response) { return _this.nextRunCycle(response); }, function () { });
- }
- };
- return WorkerProcessingEngine;
-}());
-export default WorkerProcessingEngine;
diff --git a/dist/framework/text_bundle.d.ts b/dist/framework/text_bundle.d.ts
deleted file mode 100644
index 8680859e..00000000
--- a/dist/framework/text_bundle.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Translatable } from './types/elements';
-export default class TextBundle implements Translatable {
- translations: {
- [key: string]: string;
- };
- defaultLocale: string;
- add(locale: string, text: string): TextBundle;
- translate(locale: string): string;
- resolve(locale: string): string;
-}
diff --git a/dist/framework/text_bundle.js b/dist/framework/text_bundle.js
deleted file mode 100644
index e1a581b4..00000000
--- a/dist/framework/text_bundle.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import _ from 'lodash';
-var TextBundle = /** @class */ (function () {
- function TextBundle() {
- this.translations = {};
- this.defaultLocale = 'nl';
- }
- TextBundle.prototype.add = function (locale, text) {
- this.translations[locale] = text;
- return this;
- };
- TextBundle.prototype.translate = function (locale) {
- return _.escape(this.resolve(locale));
- };
- TextBundle.prototype.resolve = function (locale) {
- var text = this.translations[locale];
- if (text !== null) {
- return text;
- }
- var defaultText = this.translations[this.defaultLocale];
- if (defaultText !== null) {
- return defaultText;
- }
- if (Object.values(this.translations).length > 0) {
- return Object.values(this.translations)[0];
- }
- return '?text?';
- };
- return TextBundle;
-}());
-export default TextBundle;
diff --git a/dist/framework/translator.d.ts b/dist/framework/translator.d.ts
deleted file mode 100644
index 501e19e4..00000000
--- a/dist/framework/translator.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { Text } from './types/elements';
-export declare const Translator: {
- translate: (text: Text, locale: string) => string;
-};
diff --git a/dist/framework/translator.js b/dist/framework/translator.js
deleted file mode 100644
index 798e0e57..00000000
--- a/dist/framework/translator.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import { isTranslatable } from './types/elements';
-export var Translator = (function () {
- var defaultLocale = 'nl';
- function translate(text, locale) {
- if (typeof text === 'string') {
- return text;
- }
- if (isTranslatable(text)) {
- return resolve(text, locale);
- }
- throw new TypeError('Unknown text type');
- }
- function resolve(translatable, locale) {
- var text = translatable.translations[locale];
- if (text !== null) {
- return text;
- }
- var defaultText = translatable.translations[defaultLocale];
- if (defaultText !== null) {
- return defaultText;
- }
- if (Object.values(translatable.translations).length > 0) {
- return Object.values(translatable.translations)[0];
- }
- return '?text?';
- }
- return {
- translate: translate
- };
-})();
diff --git a/dist/framework/types/commands.d.ts b/dist/framework/types/commands.d.ts
deleted file mode 100644
index 2adc1366..00000000
--- a/dist/framework/types/commands.d.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { PropsUIPage } from './pages';
-export interface Table {
- __type__: 'Table';
- id: string;
- title: Text;
- data: any;
-}
-export declare function isTable(arg: any): arg is Table;
-export interface Response {
- __type__: 'Response';
- command: Command;
- payload: Payload;
-}
-export declare function isResponse(arg: any): arg is Response;
-export declare type Payload = PayloadResolved | PayloadRejected;
-export declare type PayloadRejected = PayloadFalse | PayloadError;
-export interface PayloadFalse {
- __type__: 'PayloadFalse';
- value: false;
-}
-export interface PayloadError {
- __type__: 'PayloadError';
- value: string;
-}
-export declare type PayloadResolved = PayloadVoid | PayloadTrue | PayloadString | PayloadFile | PayloadJSON;
-export interface PayloadVoid {
- __type__: 'PayloadVoid';
- value: undefined;
-}
-export interface PayloadTrue {
- __type__: 'PayloadTrue';
- value: true;
-}
-export interface PayloadString {
- __type__: 'PayloadString';
- value: string;
-}
-export interface PayloadFile {
- __type__: 'PayloadFile';
- value: File;
-}
-export interface PayloadJSON {
- __type__: 'PayloadJSON';
- value: string;
-}
-export declare function isPayloadJSON(arg: any): arg is PayloadJSON;
-export declare type Command = CommandUI | CommandSystem;
-export declare function isCommand(arg: any): arg is Command;
-export declare type CommandSystem = CommandSystemDonate;
-export declare function isCommandSystem(arg: any): arg is CommandSystem;
-export declare type CommandUI = CommandUIRender;
-export declare function isCommandUI(arg: any): arg is CommandUI;
-export interface CommandSystemDonate {
- __type__: 'CommandSystemDonate';
- key: string;
- json_string: string;
-}
-export declare function isCommandSystemDonate(arg: any): arg is CommandSystemDonate;
-export interface CommandUIRender {
- __type__: 'CommandUIRender';
- page: PropsUIPage;
-}
-export declare function isCommandUIRender(arg: any): arg is CommandUIRender;
diff --git a/dist/framework/types/commands.js b/dist/framework/types/commands.js
deleted file mode 100644
index 4645a484..00000000
--- a/dist/framework/types/commands.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import { isInstanceOf } from '../helpers';
-import { isPropsUIPage } from './pages';
-export function isTable(arg) {
- return isInstanceOf(arg, 'Table', ['id', 'title', 'data']);
-}
-export function isResponse(arg) {
- return isInstanceOf(arg, 'Response', ['command', 'payload']) && isCommand(arg.command);
-}
-export function isPayloadJSON(arg) {
- return isInstanceOf(arg, 'PayloadJSON', ['value']);
-}
-export function isCommand(arg) {
- return isCommandUI(arg) || isCommandSystem(arg);
-}
-export function isCommandSystem(arg) {
- return isCommandSystemDonate(arg);
-}
-export function isCommandUI(arg) {
- return isCommandUIRender(arg);
-}
-export function isCommandSystemDonate(arg) {
- return isInstanceOf(arg, 'CommandSystemDonate', ['key', 'json_string']);
-}
-export function isCommandUIRender(arg) {
- return isInstanceOf(arg, 'CommandUIRender', ['page']) && isPropsUIPage(arg.page);
-}
diff --git a/dist/framework/types/elements.d.ts b/dist/framework/types/elements.d.ts
deleted file mode 100644
index 3bc3c53d..00000000
--- a/dist/framework/types/elements.d.ts
+++ /dev/null
@@ -1,224 +0,0 @@
-import { PropsUIPage } from './pages';
-import { PropsUIPrompt } from './prompts';
-export declare type PropsUI = PropsUIText | PropsUIButton | PropsUICheckBox | PropsUIRadioItem | PropsUISpinner | PropsUIProgress | PropsUIHeader | PropsUITable | PropsUISearchBar | PropsUIPage | PropsUIPrompt;
-export declare type PropsUIText = PropsUITextTitle0 | PropsUITextTitle1 | PropsUITextTitle2 | PropsUITextTitle3 | PropsUITextTitle6 | PropsUITextBodyLarge | PropsUITextLabel;
-export declare type PropsUIButton = PropsUIButtonPrimary | PropsUIButtonSecundary | PropsUIButtonBack | PropsUIButtonForward | PropsUIButtonIconBack | PropsUIButtonIconForward | PropsUIButtonIcon | PropsUIButtonLabel | PropsUIButtonIconLabel;
-export declare function isPropsUI(arg: any): arg is PropsUI;
-export declare function isPropsUIText(arg: any): arg is PropsUIText;
-export interface PropsUITextLabel {
- __type__: 'PropsUITextLabel';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextLabel(arg: any): arg is PropsUITextLabel;
-export interface PropsUITextCaption {
- __type__: 'PropsUITextCaption';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextCaption(arg: any): arg is PropsUITextCaption;
-export interface PropsUITextBodyLarge {
- __type__: 'PropsUITextBodyLarge';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextBodyLarge(arg: any): arg is PropsUITextBodyLarge;
-export interface PropsUITextBodyMedium {
- __type__: 'PropsUITextBodyMedium';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextBodyMedium(arg: any): arg is PropsUITextBodyMedium;
-export interface PropsUITextBodySmall {
- __type__: 'PropsUITextBodySmall';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextBodySmall(arg: any): arg is PropsUITextBodySmall;
-export interface PropsUITextTitle0 {
- __type__: 'PropsUITextTitle0';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextTitle0(arg: any): arg is PropsUITextTitle0;
-export interface PropsUITextTitle1 {
- __type__: 'PropsUITextTitle1';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextTitle1(arg: any): arg is PropsUITextTitle1;
-export interface PropsUITextTitle2 {
- __type__: 'PropsUITextTitle2';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextTitle2(arg: any): arg is PropsUITextTitle2;
-export interface PropsUITextTitle3 {
- __type__: 'PropsUITextTitle3';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextTitle3(arg: any): arg is PropsUITextTitle3;
-export interface PropsUITextTitle4 {
- __type__: 'PropsUITextTitle4';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextTitle4(arg: any): arg is PropsUITextTitle4;
-export interface PropsUITextTitle6 {
- __type__: 'PropsUITextTitle6';
- text: string;
- color?: string;
- margin?: string;
-}
-export declare function isPropsUITextTitle6(arg: any): arg is PropsUITextTitle6;
-export declare function isPropsUIButton(arg: any): arg is PropsUIButton;
-export interface PropsUIButtonPrimary {
- __type__: 'PropsUIButtonPrimary';
- label: string;
- color?: string;
- enabled?: boolean;
- spinning?: boolean;
- onClick: () => void;
-}
-export declare function isPropsUIButtonPrimary(arg: any): arg is PropsUIButtonPrimary;
-export interface PropsUIButtonSecundary {
- __type__: 'PropsUIButtonSecundary';
- label: string;
- color?: string;
- onClick: () => void;
-}
-export declare function isPropsUIButtonSecundary(arg: any): arg is PropsUIButtonSecundary;
-export interface PropsUIButtonBack {
- __type__: 'PropsUIButtonBack';
- label: string;
- onClick: () => void;
-}
-export declare function isPropsUIButtonBack(arg: any): arg is PropsUIButtonBack;
-export interface PropsUIButtonForward {
- __type__: 'PropsUIButtonForward';
- label: string;
- onClick: () => void;
-}
-export declare function isPropsUIButtonForward(arg: any): arg is PropsUIButtonForward;
-export interface PropsUIButtonIconBack {
- __type__: 'PropsUIButtonIconBack';
- onClick: () => void;
-}
-export declare function isPropsUIButtonIconBack(arg: any): arg is PropsUIButtonIconBack;
-export interface PropsUIButtonIconForward {
- __type__: 'PropsUIButtonIconForward';
- onClick: () => void;
-}
-export declare function isPropsUIButtonIconForward(arg: any): arg is PropsUIButtonIconForward;
-export interface PropsUIButtonIcon {
- __type__: 'PropsUIButtonIcon';
- icon: string;
- onClick: () => void;
-}
-export declare function isPropsUIButtonIcon(arg: any): arg is PropsUIButtonIcon;
-export interface PropsUIButtonIconLabel {
- __type__: 'PropsUIButtonIconLabel';
- icon: string;
- label: string;
- color?: string;
- alignment?: string;
- onClick: () => void;
-}
-export declare function isPropsUIButtonIconLabel(arg: any): arg is PropsUIButtonIconLabel;
-export interface PropsUIButtonLabel {
- __type__: 'PropsUIButtonLabel';
- label: string;
- color?: string;
- onClick: () => void;
-}
-export declare function isPropsUIButtonLabel(arg: any): arg is PropsUIButtonLabel;
-export interface PropsUIRadioItem {
- id: number;
- value: string;
- selected: boolean;
- onSelect: () => void;
-}
-export declare function isPropsUIRadioItem(arg: any): arg is PropsUIRadioItem;
-export interface PropsUICheckBox {
- id: string;
- selected: boolean;
- onSelect: () => void;
-}
-export declare function isPropsUICheckBox(arg: any): arg is PropsUICheckBox;
-export interface PropsUISpinner {
- __type__: 'PropsUISpinner';
- spinning?: boolean;
- color?: string;
-}
-export declare function isPropsUISpinner(arg: any): arg is PropsUISpinner;
-export interface PropsUIProgress {
- __type__: 'PropsUIProgress';
- percentage: number;
-}
-export declare function isPropsUIProgress(arg: any): arg is PropsUIProgress;
-export interface PropsUIHeader {
- __type__: 'PropsUIHeader';
- title: Text;
-}
-export declare function isPropsUIHeader(arg: any): arg is PropsUIHeader;
-export interface PropsUIFooter {
- __type__: 'PropsUIFooter';
- progressPercentage: number;
-}
-export declare function isPropsUIFooter(arg: any): arg is PropsUIFooter;
-export interface PropsUITable {
- __type__: 'PropsUITable';
- id: string;
- head: PropsUITableHead;
- body: PropsUITableBody;
- readOnly?: boolean;
- pageSize?: number;
-}
-export declare function isPropsUITable(arg: any): arg is PropsUITable;
-export interface PropsUITableHead {
- __type__: 'PropsUITableHead';
- cells: PropsUITableCell[];
-}
-export declare function isPropsUITableHead(arg: any): arg is PropsUITableHead;
-export interface PropsUITableBody {
- __type__: 'PropsUITableBody';
- rows: PropsUITableRow[];
-}
-export declare function isPropsUITableBody(arg: any): arg is PropsUITableBody;
-export interface PropsUITableRow {
- __type__: 'PropsUITableRow';
- id: string;
- cells: PropsUITableCell[];
-}
-export declare function isPropsUITableRow(arg: any): arg is PropsUITableRow;
-export interface PropsUITableCell {
- __type__: 'PropsUITableCell';
- text: string;
-}
-export declare function isPropsUITableCell(arg: any): arg is PropsUITableCell;
-export interface PropsUISearchBar {
- __type__: 'PropsUISearchBar';
- placeholder: string;
- debounce?: number;
- onSearch: (words: string[]) => void;
-}
-export declare function isPropsUISearchBar(arg: any): arg is PropsUISearchBar;
-export declare type Text = Translatable | string;
-export declare function isText(arg: any): arg is Text;
-export interface Translatable {
- translations: {
- [locale: string]: string;
- };
-}
-export declare function isTranslatable(arg: any): arg is Translatable;
diff --git a/dist/framework/types/elements.js b/dist/framework/types/elements.js
deleted file mode 100644
index 3f66acee..00000000
--- a/dist/framework/types/elements.js
+++ /dev/null
@@ -1,142 +0,0 @@
-import { isInstanceOf, isLike } from '../helpers';
-import { isPropsUIPage } from './pages';
-import { isPropsUIPrompt } from './prompts';
-// UI
-export function isPropsUI(arg) {
- return isPropsUIText(arg) ||
- isPropsUIButton(arg) ||
- isPropsUISpinner(arg) ||
- isPropsUIProgress(arg) ||
- isPropsUIHeader(arg) ||
- isPropsUITable(arg) ||
- isPropsUIPage(arg) ||
- isPropsUIPrompt(arg);
-}
-// TEXTS
-export function isPropsUIText(arg) {
- return isPropsUITextTitle0(arg) ||
- isPropsUITextTitle0(arg) ||
- isPropsUITextTitle1(arg) ||
- isPropsUITextTitle2(arg) ||
- isPropsUITextTitle3(arg) ||
- isPropsUITextTitle4(arg) ||
- isPropsUITextTitle6(arg) ||
- isPropsUITextBodyLarge(arg) ||
- isPropsUITextBodyMedium(arg) ||
- isPropsUITextLabel(arg) ||
- isPropsUITextCaption(arg);
-}
-export function isPropsUITextLabel(arg) {
- return isInstanceOf(arg, 'PropsUITextLabel', ['text', 'color', 'margin']);
-}
-export function isPropsUITextCaption(arg) {
- return isInstanceOf(arg, 'PropsUITextCaption', ['text', 'color', 'margin']);
-}
-export function isPropsUITextBodyLarge(arg) {
- return isInstanceOf(arg, 'PropsUITextBodyLarge', ['text', 'color', 'margin']);
-}
-export function isPropsUITextBodyMedium(arg) {
- return isInstanceOf(arg, 'PropsUITextBodyMedium', ['text', 'color', 'margin']);
-}
-export function isPropsUITextBodySmall(arg) {
- return isInstanceOf(arg, 'PropsUITextBodySmall', ['text', 'color', 'margin']);
-}
-export function isPropsUITextTitle0(arg) {
- return isInstanceOf(arg, 'PropsUITextTitle0', ['text', 'color', 'margin']);
-}
-export function isPropsUITextTitle1(arg) {
- return isInstanceOf(arg, 'PropsUITextTitle1', ['text', 'color', 'margin']);
-}
-export function isPropsUITextTitle2(arg) {
- return isInstanceOf(arg, 'PropsUITextTitle2', ['text', 'color', 'margin']);
-}
-export function isPropsUITextTitle3(arg) {
- return isInstanceOf(arg, 'PropsUITextTitle3', ['text', 'color', 'margin']);
-}
-export function isPropsUITextTitle4(arg) {
- return isInstanceOf(arg, 'PropsUITextTitle4', ['text', 'color', 'margin']);
-}
-export function isPropsUITextTitle6(arg) {
- return isInstanceOf(arg, 'PropsUITextTitle6', ['text', 'color', 'margin']);
-}
-// BUTTONS
-export function isPropsUIButton(arg) {
- return isPropsUIButtonPrimary(arg) ||
- isPropsUIButtonSecundary(arg) ||
- isPropsUIButtonBack(arg) ||
- isPropsUIButtonForward(arg) ||
- isPropsUIButtonIconBack(arg) ||
- isPropsUIButtonIconForward(arg) ||
- isPropsUIButtonIcon(arg) ||
- isPropsUIButtonLabel(arg) ||
- isPropsUIButtonIconLabel(arg);
-}
-export function isPropsUIButtonPrimary(arg) {
- return isInstanceOf(arg, 'PropsUIButtonPrimary', ['label', 'color', 'onClick']);
-}
-export function isPropsUIButtonSecundary(arg) {
- return isInstanceOf(arg, 'PropsUIButtonSecundary', ['label', 'color', 'onClick']);
-}
-export function isPropsUIButtonBack(arg) {
- return isInstanceOf(arg, 'PropsUIButtonBack', ['label', 'onClick']);
-}
-export function isPropsUIButtonForward(arg) {
- return isInstanceOf(arg, 'PropsUIButtonForward', ['label', 'onClick']);
-}
-export function isPropsUIButtonIconBack(arg) {
- return isInstanceOf(arg, 'PropsUIButtonIconBack', ['onClick']);
-}
-export function isPropsUIButtonIconForward(arg) {
- return isInstanceOf(arg, 'PropsUIButtonIconForward', ['onClick']);
-}
-export function isPropsUIButtonIcon(arg) {
- return isInstanceOf(arg, 'PropsUIButtonIcon', ['icon', 'onClick']);
-}
-export function isPropsUIButtonIconLabel(arg) {
- return isInstanceOf(arg, 'PropsUIButtonIconLabel', ['icon', 'label', 'color', 'alignment', 'onClick']);
-}
-export function isPropsUIButtonLabel(arg) {
- return isInstanceOf(arg, 'PropsUIButtonLabel', ['label', 'onClick']);
-}
-export function isPropsUIRadioItem(arg) {
- return isInstanceOf(arg, 'PropsUIRadioItem', ['id', 'value', 'selected', 'onSelect']);
-}
-export function isPropsUICheckBox(arg) {
- return isInstanceOf(arg, 'PropsUICheckBox', ['id', 'selected', 'onSelect']);
-}
-export function isPropsUISpinner(arg) {
- return isInstanceOf(arg, 'PropsUISpinner', ['color', 'spinning']);
-}
-export function isPropsUIProgress(arg) {
- return isInstanceOf(arg, 'PropsUIProgress', ['percentage']);
-}
-export function isPropsUIHeader(arg) {
- return isInstanceOf(arg, 'PropsUIHeader', ['title']);
-}
-export function isPropsUIFooter(arg) {
- return isInstanceOf(arg, 'PropsUIFooter', ['progressPercentage']);
-}
-export function isPropsUITable(arg) {
- return isInstanceOf(arg, 'PropsUITable', ['readOnly', 'pageSize', 'id', 'head', 'body']);
-}
-export function isPropsUITableHead(arg) {
- return isInstanceOf(arg, 'PropsUITableHead', ['cells']);
-}
-export function isPropsUITableBody(arg) {
- return isInstanceOf(arg, 'PropsUITableBody', ['rows']);
-}
-export function isPropsUITableRow(arg) {
- return isInstanceOf(arg, 'PropsUITableRow', ['id', 'cells']);
-}
-export function isPropsUITableCell(arg) {
- return isInstanceOf(arg, 'PropsUITableCell', ['text']);
-}
-export function isPropsUISearchBar(arg) {
- return isInstanceOf(arg, 'PropsUISearchBar', ['placeholder']);
-}
-export function isText(arg) {
- return typeof arg === 'string' || isTranslatable(arg);
-}
-export function isTranslatable(arg) {
- return isLike(arg, ['translations']);
-}
diff --git a/dist/framework/types/modules.d.ts b/dist/framework/types/modules.d.ts
deleted file mode 100644
index 1410820b..00000000
--- a/dist/framework/types/modules.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Command, Response, CommandSystem, CommandUI } from './commands';
-export interface ProcessingEngine {
- start: () => void;
- commandHandler: CommandHandler;
- terminate: () => void;
-}
-export interface VisualisationEngine {
- start: (rootElement: HTMLElement, locale: string) => void;
- render: (command: CommandUI) => Promise;
- terminate: () => void;
-}
-export interface System {
- send: (command: CommandSystem) => void;
-}
-export interface CommandHandler {
- onCommand: (command: Command) => Promise;
-}
diff --git a/dist/framework/types/modules.js b/dist/framework/types/modules.js
deleted file mode 100644
index cb0ff5c3..00000000
--- a/dist/framework/types/modules.js
+++ /dev/null
@@ -1 +0,0 @@
-export {};
diff --git a/dist/framework/types/pages.d.ts b/dist/framework/types/pages.d.ts
deleted file mode 100644
index 2cb3935d..00000000
--- a/dist/framework/types/pages.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { PropsUIFooter, PropsUIHeader } from './elements';
-import { PropsUIPromptFileInput, PropsUIPromptConfirm, PropsUIPromptConsentForm, PropsUIPromptRadioInput } from './prompts';
-export declare type PropsUIPage = PropsUIPageSplashScreen | PropsUIPageDonation | PropsUIPageEnd;
-export declare function isPropsUIPage(arg: any): arg is PropsUIPage;
-export interface PropsUIPageSplashScreen {
- __type__: 'PropsUIPageSplashScreen';
-}
-export declare function isPropsUIPageSplashScreen(arg: any): arg is PropsUIPageSplashScreen;
-export interface PropsUIPageDonation {
- __type__: 'PropsUIPageDonation';
- platform: string;
- header: PropsUIHeader;
- body: PropsUIPromptFileInput | PropsUIPromptConfirm | PropsUIPromptConsentForm | PropsUIPromptRadioInput;
- footer: PropsUIFooter;
-}
-export declare function isPropsUIPageDonation(arg: any): arg is PropsUIPageDonation;
-export interface PropsUIPageEnd {
- __type__: 'PropsUIPageEnd';
-}
-export declare function isPropsUIPageEnd(arg: any): arg is PropsUIPageEnd;
diff --git a/dist/framework/types/pages.js b/dist/framework/types/pages.js
deleted file mode 100644
index 2a678fb9..00000000
--- a/dist/framework/types/pages.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { isInstanceOf } from '../helpers';
-export function isPropsUIPage(arg) {
- return (isPropsUIPageSplashScreen(arg) ||
- isPropsUIPageDonation(arg) ||
- isPropsUIPageEnd(arg));
-}
-export function isPropsUIPageSplashScreen(arg) {
- return isInstanceOf(arg, 'PropsUIPageSplashScreen', []);
-}
-export function isPropsUIPageDonation(arg) {
- return isInstanceOf(arg, 'PropsUIPageDonation', ['platform', 'header', 'body', 'footer']);
-}
-export function isPropsUIPageEnd(arg) {
- return isInstanceOf(arg, 'PropsUIPageEnd', []);
-}
diff --git a/dist/framework/types/prompts.d.ts b/dist/framework/types/prompts.d.ts
deleted file mode 100644
index 9b106b78..00000000
--- a/dist/framework/types/prompts.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { PropsUIRadioItem, Text } from './elements';
-export declare type PropsUIPrompt = PropsUIPromptFileInput | PropsUIPromptRadioInput | PropsUIPromptConsentForm | PropsUIPromptConfirm;
-export declare function isPropsUIPrompt(arg: any): arg is PropsUIPrompt;
-export interface PropsUIPromptConfirm {
- __type__: 'PropsUIPromptConfirm';
- text: Text;
- ok: Text;
- cancel: Text;
-}
-export declare function isPropsUIPromptConfirm(arg: any): arg is PropsUIPromptConfirm;
-export interface PropsUIPromptFileInput {
- __type__: 'PropsUIPromptFileInput';
- description: Text;
- extensions: string;
-}
-export declare function isPropsUIPromptFileInput(arg: any): arg is PropsUIPromptFileInput;
-export interface PropsUIPromptRadioInput {
- __type__: 'PropsUIPromptRadioInput';
- title: Text;
- description: Text;
- items: PropsUIRadioItem[];
-}
-export declare function isPropsUIPromptRadioInput(arg: any): arg is PropsUIPromptRadioInput;
-export interface PropsUIPromptConsentForm {
- __type__: 'PropsUIPromptConsentForm';
- tables: PropsUIPromptConsentFormTable[];
- metaTables: PropsUIPromptConsentFormTable[];
-}
-export declare function isPropsUIPromptConsentForm(arg: any): arg is PropsUIPromptConsentForm;
-export interface PropsUIPromptConsentFormTable {
- __type__: 'PropsUIPromptConsentFormTable';
- id: string;
- title: Text;
- description: Text;
- data_frame: any;
-}
-export declare function isPropsUIPromptConsentFormTable(arg: any): arg is PropsUIPromptConsentFormTable;
diff --git a/dist/framework/types/prompts.js b/dist/framework/types/prompts.js
deleted file mode 100644
index d4147e07..00000000
--- a/dist/framework/types/prompts.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { isInstanceOf } from '../helpers';
-export function isPropsUIPrompt(arg) {
- return isPropsUIPromptFileInput(arg) ||
- isPropsUIPromptRadioInput(arg) ||
- isPropsUIPromptConsentForm(arg);
-}
-export function isPropsUIPromptConfirm(arg) {
- return isInstanceOf(arg, 'PropsUIPromptConfirm', ['text', 'ok', 'cancel']);
-}
-export function isPropsUIPromptFileInput(arg) {
- return isInstanceOf(arg, 'PropsUIPromptFileInput', ['description', 'extensions']);
-}
-export function isPropsUIPromptRadioInput(arg) {
- return isInstanceOf(arg, 'PropsUIPromptRadioInput', ['title', 'description', 'items']);
-}
-export function isPropsUIPromptConsentForm(arg) {
- return isInstanceOf(arg, 'PropsUIPromptConsentForm', ['tables', 'metaTables']);
-}
-export function isPropsUIPromptConsentFormTable(arg) {
- return isInstanceOf(arg, 'PropsUIPromptConsentFormTable', ['id', 'title', 'description', 'data_frame']);
-}
diff --git a/dist/framework/visualisation/react/engine.d.ts b/dist/framework/visualisation/react/engine.d.ts
deleted file mode 100644
index 25cc0394..00000000
--- a/dist/framework/visualisation/react/engine.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-///
-import * as ReactDOM from 'react-dom/client';
-import { VisualisationEngine } from '../../types/modules';
-import { Response, CommandUIRender } from '../../types/commands';
-import { PropsUIPage } from '../../types/pages';
-import VisualisationFactory from './factory';
-export default class ReactEngine implements VisualisationEngine {
- factory: VisualisationFactory;
- locale: string;
- root: ReactDOM.Root;
- constructor(factory: VisualisationFactory);
- start(rootElement: HTMLElement, locale: string): void;
- render(command: CommandUIRender): Promise;
- renderPage(props: PropsUIPage): Promise;
- terminate(): void;
- renderElements(elements: JSX.Element[]): void;
-}
diff --git a/dist/framework/visualisation/react/engine.js b/dist/framework/visualisation/react/engine.js
deleted file mode 100644
index 2a832ebc..00000000
--- a/dist/framework/visualisation/react/engine.js
+++ /dev/null
@@ -1,88 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-import * as ReactDOM from 'react-dom/client';
-import { Main } from './main';
-var ReactEngine = /** @class */ (function () {
- function ReactEngine(factory) {
- this.factory = factory;
- }
- ReactEngine.prototype.start = function (rootElement, locale) {
- console.log('[ReactEngine] started');
- this.root = ReactDOM.createRoot(rootElement);
- this.locale = locale;
- };
- ReactEngine.prototype.render = function (command) {
- return __awaiter(this, void 0, void 0, function () {
- var _this = this;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, new Promise(function (resolve) {
- _this.renderPage(command.page).then(function (payload) {
- resolve({ __type__: 'Response', command: command, payload: payload });
- }, function () { });
- })];
- case 1: return [2 /*return*/, _a.sent()];
- }
- });
- });
- };
- ReactEngine.prototype.renderPage = function (props) {
- return __awaiter(this, void 0, void 0, function () {
- var _this = this;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0: return [4 /*yield*/, new Promise(function (resolve) {
- var context = { locale: _this.locale, resolve: resolve };
- var page = _this.factory.createPage(props, context);
- _this.renderElements([page]);
- })];
- case 1: return [2 /*return*/, _a.sent()];
- }
- });
- });
- };
- ReactEngine.prototype.terminate = function () {
- console.log('[ReactEngine] stopped');
- this.root.unmount();
- };
- ReactEngine.prototype.renderElements = function (elements) {
- this.root.render(_jsx(Main, { elements: elements }));
- };
- return ReactEngine;
-}());
-export default ReactEngine;
diff --git a/dist/framework/visualisation/react/factory.d.ts b/dist/framework/visualisation/react/factory.d.ts
deleted file mode 100644
index 43f93412..00000000
--- a/dist/framework/visualisation/react/factory.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-///
-import { PropsUIPage } from '../../types/pages';
-import { Payload } from '../../types/commands';
-export interface ReactFactoryContext {
- locale: string;
- resolve?: (payload: Payload) => void;
-}
-export default class ReactFactory {
- createPage(page: PropsUIPage, context: ReactFactoryContext): JSX.Element;
-}
diff --git a/dist/framework/visualisation/react/factory.js b/dist/framework/visualisation/react/factory.js
deleted file mode 100644
index 3b44c471..00000000
--- a/dist/framework/visualisation/react/factory.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-import { EndPage } from './ui/pages/end_page';
-import { isPropsUIPageEnd, isPropsUIPageDonation, isPropsUIPageSplashScreen } from '../../types/pages';
-import { DonationPage } from './ui/pages/donation_page';
-import { SplashScreen } from './ui/pages/splash_screen';
-var ReactFactory = /** @class */ (function () {
- function ReactFactory() {
- }
- ReactFactory.prototype.createPage = function (page, context) {
- if (isPropsUIPageSplashScreen(page)) {
- return _jsx(SplashScreen, __assign({}, page, context));
- }
- if (isPropsUIPageEnd(page)) {
- return _jsx(EndPage, __assign({}, page, context));
- }
- if (isPropsUIPageDonation(page)) {
- return _jsx(DonationPage, __assign({}, page, context));
- }
- throw TypeError('Unknown page: ' + JSON.stringify(page));
- };
- return ReactFactory;
-}());
-export default ReactFactory;
diff --git a/dist/framework/visualisation/react/main.d.ts b/dist/framework/visualisation/react/main.d.ts
deleted file mode 100644
index 17ae6b1c..00000000
--- a/dist/framework/visualisation/react/main.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-///
-interface MainProps {
- elements: JSX.Element[];
-}
-export declare const Main: ({ elements }: MainProps) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/main.js b/dist/framework/visualisation/react/main.js
deleted file mode 100644
index cef41dd1..00000000
--- a/dist/framework/visualisation/react/main.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-export var Main = function (_a) {
- var elements = _a.elements;
- elements = elements.map(function (element, index) { return __assign(__assign({}, element), { key: "".concat(index) }); });
- return (_jsx("div", __assign({ className: 'w-full h-full' }, { children: elements })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/bullet.d.ts b/dist/framework/visualisation/react/ui/elements/bullet.d.ts
deleted file mode 100644
index 2acedfd7..00000000
--- a/dist/framework/visualisation/react/ui/elements/bullet.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-///
-interface PropsUIBullet {
- color?: string;
- children: JSX.Element;
- frameSize?: string;
-}
-export declare const Bullet: ({ color, frameSize, children }: PropsUIBullet) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/bullet.js b/dist/framework/visualisation/react/ui/elements/bullet.js
deleted file mode 100644
index 918a6598..00000000
--- a/dist/framework/visualisation/react/ui/elements/bullet.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-export var Bullet = function (_a) {
- var _b = _a.color, color = _b === void 0 ? 'bg-primary' : _b, _c = _a.frameSize, frameSize = _c === void 0 ? 'w-7 h-9' : _c, children = _a.children;
- return (_jsxs("div", __assign({ className: 'flex flex-row' }, { children: [_jsx("div", __assign({ className: "flex flex-row items-center flex-shrink-0 ".concat(frameSize) }, { children: _jsx("div", { className: "w-10px h-10px rounded-full overflow-hidden ".concat(color) }) })), children] })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/button.d.ts b/dist/framework/visualisation/react/ui/elements/button.d.ts
deleted file mode 100644
index 8fefec09..00000000
--- a/dist/framework/visualisation/react/ui/elements/button.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIButtonBack, PropsUIButtonForward, PropsUIButtonIcon, PropsUIButtonIconBack, PropsUIButtonIconForward, PropsUIButtonIconLabel, PropsUIButtonLabel, PropsUIButtonPrimary, PropsUIButtonSecundary } from '../../../../types/elements';
-export declare const PrimaryButton: ({ label, spinning, enabled, color, onClick }: Weak) => JSX.Element;
-export declare const SecondaryButton: ({ label, color, onClick }: Weak) => JSX.Element;
-export declare const BackButton: ({ label, onClick }: Weak) => JSX.Element;
-export declare const ForwardButton: ({ label, onClick }: Weak) => JSX.Element;
-export declare const BackIconButton: ({ onClick }: Weak) => JSX.Element;
-export declare const ForwardIconButton: ({ onClick }: Weak) => JSX.Element;
-export declare const IconButton: ({ icon, onClick }: Weak) => JSX.Element;
-export declare const IconLabelButton: ({ icon, label, color, alignment, onClick }: Weak) => JSX.Element;
-export declare const LabelButton: ({ label, color, onClick }: Weak) => JSX.Element;
diff --git a/dist/framework/visualisation/react/ui/elements/button.js b/dist/framework/visualisation/react/ui/elements/button.js
deleted file mode 100644
index 1fe5dc21..00000000
--- a/dist/framework/visualisation/react/ui/elements/button.js
+++ /dev/null
@@ -1,57 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-import BackSvg from '../../../../../assets/images/back.svg';
-import ForwardSvg from '../../../../../assets/images/forward.svg';
-import { Spinner } from './spinner';
-function spinnerColor(buttonColor) {
- if (buttonColor.includes('bg-tertiary')) {
- return 'dark';
- }
- return 'light';
-}
-export var PrimaryButton = function (_a) {
- var label = _a.label, _b = _a.spinning, spinning = _b === void 0 ? false : _b, _c = _a.enabled, enabled = _c === void 0 ? true : _c, _d = _a.color, color = _d === void 0 ? 'bg-primary text-white' : _d, onClick = _a.onClick;
- return (_jsxs("div", __assign({ className: 'relative min-w-button' }, { children: [_jsx("div", __assign({ className: "flex flex-col items-center leading-none font-button text-button rounded ".concat(enabled ? 'cursor-pointer active:shadow-top4px' : '', " ").concat(color), onClick: onClick }, { children: _jsx("div", __assign({ id: 'confirm-button', className: "pt-15px pb-15px pr-4 pl-4 ".concat(enabled ? 'active:pt-4 active:pb-14px' : '', " ").concat(spinning ? 'opacity-0' : '') }, { children: label })) })), _jsx("div", __assign({ className: "absolute top-0 h-full w-full flex flex-col justify-center items-center ".concat(spinning ? '' : 'hidden') }, { children: _jsx("div", __assign({ className: 'w-5 h-5' }, { children: _jsx(Spinner, { color: spinnerColor(color), spinning: spinning }) })) }))] })));
-};
-export var SecondaryButton = function (_a) {
- var label = _a.label, _b = _a.color, color = _b === void 0 ? 'bg-delete text-delete' : _b, onClick = _a.onClick;
- return (_jsx("div", __assign({ className: 'relative min-w-button' }, { children: _jsx("div", __assign({ className: "flex flex-col items-center active:shadow-top2px border-2 font-button text-button rounded bg-opacity-0 cursor-pointer ".concat(color), onClick: onClick }, { children: _jsx("div", __assign({ className: 'pt-13px pb-13px pr-4 pl-4 active:pt-14px active:pb-3' }, { children: label })) })) })));
-};
-export var BackButton = function (_a) {
- var label = _a.label, onClick = _a.onClick;
- return _jsx(IconLabelButton, { icon: BackSvg, label: label, onClick: onClick });
-};
-export var ForwardButton = function (_a) {
- var label = _a.label, onClick = _a.onClick;
- return _jsx(IconLabelButton, { icon: ForwardSvg, label: label, onClick: onClick, alignment: 'right' });
-};
-export var BackIconButton = function (_a) {
- var onClick = _a.onClick;
- return _jsx(IconButton, { icon: BackSvg, onClick: onClick });
-};
-export var ForwardIconButton = function (_a) {
- var onClick = _a.onClick;
- return _jsx(IconButton, { icon: ForwardSvg, onClick: onClick });
-};
-export var IconButton = function (_a) {
- var icon = _a.icon, onClick = _a.onClick;
- return (_jsx("div", __assign({ className: 'active:pt-5px active:pb-3px focus:outline-none cursor-pointer w-6 h-6', onClick: onClick }, { children: _jsxs("div", __assign({ className: 'flex flex-col items-center h-full w-full' }, { children: [_jsx("div", { className: 'flex-grow' }), _jsx("div", { children: _jsx("img", { className: '-mt-2px', src: icon }) }), _jsx("div", { className: 'flex-grow' })] })) })));
-};
-export var IconLabelButton = function (_a) {
- var icon = _a.icon, label = _a.label, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.alignment, alignment = _c === void 0 ? 'left' : _c, onClick = _a.onClick;
- return (_jsx("div", __assign({ className: 'pt-1 pb-1 active:pt-5px active:pb-3px rounded bg-opacity-0 focus:outline-none cursor-pointer ', onClick: onClick }, { children: _jsxs("div", __assign({ className: 'flex items-center' }, { children: [_jsx("div", __assign({ className: "".concat(alignment === 'left' ? '' : 'hidden') }, { children: _jsx("img", { className: 'mr-2 -mt-2px', src: icon, alt: label }) })), _jsx("div", __assign({ className: 'focus:outline-none' }, { children: _jsx("div", __assign({ className: 'flex flex-col justify-center h-full items-center' }, { children: _jsx("div", __assign({ className: "flex-wrap text-button font-button ".concat(color) }, { children: label })) })) })), _jsx("div", __assign({ className: "".concat(alignment !== 'left' ? '' : 'hidden') }, { children: _jsx("img", { className: 'ml-2 -mt-2px', src: icon, alt: label }) }))] })) })));
-};
-export var LabelButton = function (_a) {
- var label = _a.label, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, onClick = _a.onClick;
- return (_jsx("div", __assign({ className: "pt-15px pb-15px active:pt-4 active:pb-14px leading-none font-button text-button rounded pr-4 pl-4 cursor-pointer bg-opacity-0 ".concat(color), onClick: onClick }, { children: _jsx("div", __assign({ id: 'confirm-button', className: 'flex-wrap' }, { children: label })) })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/check_box.d.ts b/dist/framework/visualisation/react/ui/elements/check_box.d.ts
deleted file mode 100644
index 6c336663..00000000
--- a/dist/framework/visualisation/react/ui/elements/check_box.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-///
-import { PropsUICheckBox } from '../../../../types/elements';
-export declare const CheckBox: ({ id, selected, onSelect }: PropsUICheckBox) => JSX.Element;
diff --git a/dist/framework/visualisation/react/ui/elements/check_box.js b/dist/framework/visualisation/react/ui/elements/check_box.js
deleted file mode 100644
index 36bdebc3..00000000
--- a/dist/framework/visualisation/react/ui/elements/check_box.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-import CheckSvg from '../../../../../assets/images/check.svg';
-import CheckActiveSvg from '../../../../../assets/images/check_active.svg';
-export var CheckBox = function (_a) {
- var id = _a.id, selected = _a.selected, onSelect = _a.onSelect;
- return (_jsx("div", __assign({ id: id, className: 'radio-item flex flex-row gap-3 items-center cursor-pointer', onClick: onSelect }, { children: _jsxs("div", __assign({ className: 'flex-shrink-0' }, { children: [_jsx("img", { src: CheckSvg, id: "".concat(id, "-off"), className: selected ? 'hidden' : '' }), _jsx("img", { src: CheckActiveSvg, id: "".concat(id, "-on"), className: selected ? '' : 'hidden' })] })) })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/header.d.ts b/dist/framework/visualisation/react/ui/elements/header.d.ts
deleted file mode 100644
index a99d97e1..00000000
--- a/dist/framework/visualisation/react/ui/elements/header.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIHeader } from '../../../../types/elements';
-import { ReactFactoryContext } from '../../factory';
-declare type Props = Weak & ReactFactoryContext;
-export declare const Header: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/header.js b/dist/framework/visualisation/react/ui/elements/header.js
deleted file mode 100644
index 912419fe..00000000
--- a/dist/framework/visualisation/react/ui/elements/header.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import { jsx as _jsx } from "react/jsx-runtime";
-import { Translator } from '../../../../translator';
-import { Title1 } from './text';
-function prepareCopy(_a) {
- var title = _a.title, locale = _a.locale;
- return {
- title: Translator.translate(title, locale)
- };
-}
-export var Header = function (props) {
- var title = prepareCopy(props).title;
- return (_jsx(Title1, { text: title }));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/instructions.d.ts b/dist/framework/visualisation/react/ui/elements/instructions.d.ts
deleted file mode 100644
index 283daaab..00000000
--- a/dist/framework/visualisation/react/ui/elements/instructions.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-///
-import { ReactFactoryContext } from '../../factory';
-interface InstructionsProps {
- platform: string;
- locale: string;
-}
-declare type Props = InstructionsProps & ReactFactoryContext;
-export declare const Instructions: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/instructions.js b/dist/framework/visualisation/react/ui/elements/instructions.js
deleted file mode 100644
index ff112309..00000000
--- a/dist/framework/visualisation/react/ui/elements/instructions.js
+++ /dev/null
@@ -1,136 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
-import { Translator } from '../../../../translator';
-import { Title3 } from './text';
-import TwitterSvg from '../../../../../assets/images/twitter.svg';
-import FacebookSvg from '../../../../../assets/images/facebook.svg';
-import InstagramSvg from '../../../../../assets/images/instagram.svg';
-import YoutubeSvg from '../../../../../assets/images/youtube.svg';
-import TextBundle from '../../../../text_bundle';
-import { Bullet } from './bullet';
-var linkTwitter = 'https://eyra.co';
-var linkFacebook = 'https://eyra.co';
-var linkInstagram = 'https://eyra.co';
-var linkYoutube = 'https://eyra.co';
-export var Instructions = function (props) {
- var title = prepareCopy(props).title;
- var locale = props.locale;
- var platform = props.platform.toLowerCase();
- function renderBullets(bullets) {
- return bullets.map(function (bullet) { return renderBullet(bullet); });
- }
- function renderContent() {
- return (_jsx(_Fragment, { children: _jsxs("div", __assign({ className: 'flex flex-col gap-4 text-bodymedium font-body text-grey2' }, { children: [renderBullets(bullets[platform][locale]), links[platform][locale]] })) }));
- }
- return (_jsxs("div", __assign({ className: 'flex flex-col gap-6 p-8 border-2 border-grey4 rounded' }, { children: [_jsxs("div", __assign({ className: 'flex flex-row gap-8 items-center' }, { children: [_jsx("div", __assign({ className: 'flex-grow' }, { children: _jsx(Title3, { text: title, margin: '' }) })), _jsx("div", __assign({ className: 'h-12' }, { children: _jsx("img", { className: 'h-12', src: icon[platform] }) }))] })), renderContent()] })));
-};
-function prepareCopy(_a) {
- var platform = _a.platform, locale = _a.locale;
- return {
- title: Translator.translate(title, locale)
- };
-}
-var title = new TextBundle()
- .add('en', 'Download')
- .add('nl', 'Download');
-function renderBullet(text) {
- return (_jsx(Bullet, __assign({ frameSize: 'w-5 h-30px' }, { children: _jsx("div", { children: text }) })));
-}
-var bulletsTwitterEn = [
- 'Check the email that you received from Twitter',
- 'Click on the download link and store the file',
- 'Choose the stored file and continue'
-];
-var bulletsTwitterNl = [
- 'Ga naar de email die u ontvangen heeft van Twitter.',
- 'Klik op de link "gedownload” en sla het bestand op',
- 'Kies het bestand en ga verder.'
-];
-var bulletsFacebookEn = [
- 'Check the email that you received from Facebook',
- 'Click on the download link and store the file',
- 'Choose the stored file and continue'
-];
-var bulletsFacebookNl = [
- 'Ga naar de email die u ontvangen heeft van Facebook.',
- 'Klik op de link “Je gegevens downloaden” en sla het bestand op.',
- 'Kies het bestand en ga verder.'
-];
-var bulletsInstagramEn = [
- 'Check the email that you received from Instagram',
- 'Click on the download link and store the file',
- 'Choose the stored file and continue'
-];
-var bulletsInstagramNl = [
- 'Ga naar de email die u ontvangen heeft van Instagram.',
- 'Klik op de link “Gegevens downloaden” en sla het bestand op.',
- 'Kies het bestand en ga verder.'
-];
-var bulletsYoutubeEn = [
- 'Check the email that you received from Google Takeout',
- 'Click on the download link and store the file',
- 'Choose the stored file and continue'
-];
-var bulletsYoutubeNl = [
- 'Ga naar de email die u ontvangen heeft van Google Takeout.',
- 'Klik op de link “Je bestanden downloaden” en sla het bestand op.',
- 'Kies het bestand en ga verder.'
-];
-var bullets = {
- twitter: {
- en: bulletsTwitterEn,
- nl: bulletsTwitterNl
- },
- facebook: {
- en: bulletsFacebookEn,
- nl: bulletsFacebookNl
- },
- instagram: {
- en: bulletsInstagramEn,
- nl: bulletsInstagramNl
- },
- youtube: {
- en: bulletsYoutubeEn,
- nl: bulletsYoutubeNl
- }
-};
-function linkEn(link) {
- return _jsxs("div", { children: ["Click ", _jsx("span", __assign({ className: 'text-primary underline' }, { children: _jsx("a", __assign({ href: link, target: '_blank', rel: 'noreferrer' }, { children: "here" })) })), " for more extensive instructions"] });
-}
-function linkNl(link) {
- return _jsxs("div", { children: ["Klik ", _jsx("span", __assign({ className: 'text-primary underline' }, { children: _jsx("a", __assign({ href: link, target: '_blank', rel: 'noreferrer' }, { children: "hier" })) })), " voor uitgebreidere instructies"] });
-}
-var links = {
- twitter: {
- en: linkEn(linkTwitter),
- nl: linkNl(linkTwitter)
- },
- facebook: {
- en: linkEn(linkFacebook),
- nl: linkNl(linkFacebook)
- },
- instagram: {
- en: linkEn(linkInstagram),
- nl: linkNl(linkInstagram)
- },
- youtube: {
- en: linkEn(linkYoutube),
- nl: linkNl(linkYoutube)
- }
-};
-var icon = {
- twitter: TwitterSvg,
- facebook: FacebookSvg,
- instagram: InstagramSvg,
- youtube: YoutubeSvg
-};
diff --git a/dist/framework/visualisation/react/ui/elements/page_icon.d.ts b/dist/framework/visualisation/react/ui/elements/page_icon.d.ts
deleted file mode 100644
index ae40a797..00000000
--- a/dist/framework/visualisation/react/ui/elements/page_icon.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-///
-interface PropsUIPageIcon {
- index: number;
- selected: boolean;
- onClick: () => void;
-}
-declare type Props = PropsUIPageIcon;
-export declare const PageIcon: ({ index, selected, onClick }: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/page_icon.js b/dist/framework/visualisation/react/ui/elements/page_icon.js
deleted file mode 100644
index 2d52fb3c..00000000
--- a/dist/framework/visualisation/react/ui/elements/page_icon.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-export var PageIcon = function (_a) {
- var index = _a.index, selected = _a.selected, onClick = _a.onClick;
- function width() {
- if (index > 999)
- return 'w-10';
- if (index > 99)
- return 'w-9';
- return 'w-8';
- }
- return (_jsx("div", __assign({ className: "rounded ".concat(width(), " h-8 cursor-pointer flex-shrink-0 overflow-hidden ").concat(selected ? 'bg-primary' : 'bg-grey5 '), onClick: onClick }, { children: _jsx("div", __assign({ className: 'flex flex-row items-center justify-center w-full h-full' }, { children: _jsx("div", __assign({ className: "text-label font-label ".concat(selected ? 'text-white' : 'text-grey2') }, { children: "".concat(index) })) })) })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/progress.d.ts b/dist/framework/visualisation/react/ui/elements/progress.d.ts
deleted file mode 100644
index b8d3b69a..00000000
--- a/dist/framework/visualisation/react/ui/elements/progress.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIProgress } from '../../../../types/elements';
-declare type Props = Weak;
-export declare const Progress: ({ percentage }: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/progress.js b/dist/framework/visualisation/react/ui/elements/progress.js
deleted file mode 100644
index 0802dc2c..00000000
--- a/dist/framework/visualisation/react/ui/elements/progress.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-export var Progress = function (_a) {
- var percentage = _a.percentage;
- return (_jsxs("div", __assign({ id: 'progress', className: 'relative w-full overflow-hidden rounded-full' }, { children: [_jsx("div", __assign({ className: 'flex flex-row items-center gap-4' }, { children: _jsx("div", { className: 'flex-grow h-4 bg-primarylight' }) })), _jsx("div", { className: 'absolute top-0 h-4 bg-primary', style: { width: "".concat(percentage, "%") } })] })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/radio_item.d.ts b/dist/framework/visualisation/react/ui/elements/radio_item.d.ts
deleted file mode 100644
index 4badcf62..00000000
--- a/dist/framework/visualisation/react/ui/elements/radio_item.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-///
-import { PropsUIRadioItem } from '../../../../types/elements';
-export declare const RadioItem: ({ id, value, selected, onSelect }: PropsUIRadioItem) => JSX.Element;
diff --git a/dist/framework/visualisation/react/ui/elements/radio_item.js b/dist/framework/visualisation/react/ui/elements/radio_item.js
deleted file mode 100644
index 63607e3e..00000000
--- a/dist/framework/visualisation/react/ui/elements/radio_item.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-import RadioSvg from '../../../../../assets/images/radio.svg';
-import RadioActiveSvg from '../../../../../assets/images/radio_active.svg';
-export var RadioItem = function (_a) {
- var id = _a.id, value = _a.value, selected = _a.selected, onSelect = _a.onSelect;
- return (_jsxs("div", __assign({ id: "".concat(id), className: 'radio-item flex flex-row gap-3 items-center cursor-pointer', onClick: onSelect }, { children: [_jsxs("div", { children: [_jsx("img", { src: RadioSvg, id: "".concat(id, "-off"), className: selected ? 'hidden' : '' }), _jsx("img", { src: RadioActiveSvg, id: "".concat(id, "-on"), className: selected ? '' : 'hidden' })] }), _jsx("div", __assign({ className: 'text-grey1 text-label font-label select-none mt-1' }, { children: value }))] })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/search_bar.d.ts b/dist/framework/visualisation/react/ui/elements/search_bar.d.ts
deleted file mode 100644
index 123fff70..00000000
--- a/dist/framework/visualisation/react/ui/elements/search_bar.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUISearchBar } from '../../../../types/elements';
-export declare const SearchBar: ({ placeholder, debounce, onSearch }: Weak) => JSX.Element;
diff --git a/dist/framework/visualisation/react/ui/elements/search_bar.js b/dist/framework/visualisation/react/ui/elements/search_bar.js
deleted file mode 100644
index 856a15e2..00000000
--- a/dist/framework/visualisation/react/ui/elements/search_bar.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-import { useMemo } from 'react';
-import _ from 'lodash';
-export var SearchBar = function (_a) {
- var placeholder = _a.placeholder, _b = _a.debounce, debounce = _b === void 0 ? 1000 : _b, onSearch = _a.onSearch;
- function handleKeyPress(event) {
- if (event.key === 'Enter') {
- event.preventDefault();
- }
- }
- function handleChange(event) {
- var words = event.target.value.split(/\s+/);
- onSearch(words);
- }
- var handleChangeDebounced = useMemo(function () { return _.debounce(handleChange, 300); }, []);
- return (_jsx("form", { children: _jsx("div", __assign({ className: 'flex flex-row' }, { children: _jsx("input", { className: 'text-grey1 text-bodymedium font-body pl-3 pr-3 w-full border-2 border-solid border-grey3 focus:outline-none focus:border-primary rounded h-48px', placeholder: placeholder, name: 'query', type: 'search', onChange: handleChangeDebounced, onKeyPress: handleKeyPress }) })) }));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/spinner.d.ts b/dist/framework/visualisation/react/ui/elements/spinner.d.ts
deleted file mode 100644
index 7148f1b5..00000000
--- a/dist/framework/visualisation/react/ui/elements/spinner.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUISpinner } from '../../../../types/elements';
-declare type Props = Weak;
-export declare const Spinner: ({ spinning, color }: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/spinner.js b/dist/framework/visualisation/react/ui/elements/spinner.js
deleted file mode 100644
index f2aa8105..00000000
--- a/dist/framework/visualisation/react/ui/elements/spinner.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-import Lottie from 'lottie-react';
-import spinnerLight from '../../../../../assets/lottie/spinner-light.json';
-import spinnerDark from '../../../../../assets/lottie/spinner-dark.json';
-export var Spinner = function (_a) {
- var _b = _a.spinning, spinning = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? 'light' : _c;
- function animationData() {
- if (color === 'dark') {
- return spinnerDark;
- }
- return spinnerLight;
- }
- return (_jsx("div", __assign({ id: 'spinner', className: 'flex flex-row items-center gap-4' }, { children: _jsx("div", __assign({ className: 'w-5 h-5' }, { children: _jsx(Lottie, { animationData: animationData(), loop: spinning }) })) })));
-};
diff --git a/dist/framework/visualisation/react/ui/elements/table.d.ts b/dist/framework/visualisation/react/ui/elements/table.d.ts
deleted file mode 100644
index 1db63268..00000000
--- a/dist/framework/visualisation/react/ui/elements/table.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUITable, PropsUITableRow } from '../../../../types/elements';
-import { ReactFactoryContext } from '../../factory';
-declare type Props = Weak & TableContext & ReactFactoryContext;
-export interface TableContext {
- onChange: (id: string, rows: PropsUITableRow[]) => void;
-}
-export declare const Table: ({ id, head, body, readOnly, pageSize, locale, onChange }: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/elements/table.js b/dist/framework/visualisation/react/ui/elements/table.js
deleted file mode 100644
index 6e1f0300..00000000
--- a/dist/framework/visualisation/react/ui/elements/table.js
+++ /dev/null
@@ -1,344 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
-import _ from 'lodash';
-import React from 'react';
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import { BackIconButton, ForwardIconButton, IconLabelButton } from './button';
-import { CheckBox } from './check_box';
-import { SearchBar } from './search_bar';
-import { Caption, Label, Title3 } from './text';
-import UndoSvg from '../../../../../assets/images/undo.svg';
-import DeleteSvg from '../../../../../assets/images/delete.svg';
-import { PageIcon } from './page_icon';
-export var Table = function (_a) {
- var id = _a.id, head = _a.head, body = _a.body, _b = _a.readOnly, readOnly = _b === void 0 ? false : _b, _c = _a.pageSize, pageSize = _c === void 0 ? 7 : _c, locale = _a.locale, onChange = _a.onChange;
- var pageWindowLegSize = 3;
- var query = React.useRef([]);
- var alteredRows = React.useRef(body.rows);
- var filteredRows = React.useRef(alteredRows.current);
- var initialState = {
- edit: false,
- pageCount: getPageCount(),
- page: 0,
- pageWindow: updatePageWindow(0),
- rows: updateRows(0),
- selected: [],
- deletedCount: 0,
- visibility: {
- search: alteredRows.current.length > pageSize,
- delete: false,
- undo: false,
- table: filteredRows.current.length > 0,
- noData: filteredRows.current.length === 0,
- noDataLeft: false,
- noResults: false
- }
- };
- var _d = React.useState(initialState), state = _d[0], setState = _d[1];
- var copy = prepareCopy(locale);
- function display(element) {
- return visible(element) ? '' : 'hidden';
- }
- function visible(element) {
- if (typeof state.visibility[element] === 'boolean') {
- return state.visibility[element];
- }
- return false;
- }
- function updatePageWindow(currentPage) {
- var pageWindowSize = (pageWindowLegSize * 2) + 1;
- var pageCount = getPageCount();
- var range = [];
- if (pageWindowSize >= pageCount && pageCount > 0) {
- range = _.range(0, Math.min(pageCount, pageWindowSize));
- }
- else if (pageWindowSize < pageCount) {
- var maxIndex = pageCount - 1;
- var start = void 0;
- var end = void 0;
- if (currentPage < pageWindowLegSize) {
- // begin
- start = 0;
- end = Math.min(pageCount, pageWindowSize);
- }
- else if (maxIndex - currentPage <= pageWindowLegSize) {
- // end
- start = maxIndex - (pageWindowSize - 1);
- end = maxIndex + 1;
- }
- else {
- // middle
- start = currentPage - pageWindowLegSize;
- end = currentPage + pageWindowLegSize + 1;
- }
- range = _.range(start, end);
- }
- return range;
- }
- function getPageCount() {
- if (filteredRows.current.length === 0) {
- return 0;
- }
- return Math.ceil(filteredRows.current.length / pageSize);
- }
- function updateRows(currentPage) {
- var offset = currentPage * pageSize;
- return filteredRows.current.slice(offset, offset + pageSize);
- }
- function renderHeadRow(props) {
- return (_jsxs("tr", { children: [state.edit ? renderHeadCheck() : '', props.cells.map(function (cell, index) { return renderHeadCell(cell, index); })] }));
- }
- function renderHeadCheck() {
- var selected = state.selected.length > 0 && state.selected.length === state.rows.length;
- return (_jsx("td", __assign({ className: 'pl-4 w-10' }, { children: _jsx(CheckBox, { id: '-1', selected: selected, onSelect: function () { return handleSelectHead(); } }) }), 'check-head'));
- }
- function renderHeadCell(props, index) {
- return (_jsx("th", __assign({ className: 'h-12 px-4 text-left' }, { children: _jsx("div", __assign({ className: 'font-table-header text-table text-grey1' }, { children: props.text })) }), "".concat(index)));
- }
- function renderRows() {
- return state.rows.map(function (row, index) { return renderRow(row, index); });
- }
- function renderRow(row, rowIndex) {
- return (_jsxs("tr", __assign({ className: 'hover:bg-grey6' }, { children: [state.edit ? renderRowCheck(row.id) : '', row.cells.map(function (cell, cellIndex) { return renderRowCell(cell, cellIndex); })] }), "".concat(rowIndex)));
- }
- function renderRowCheck(rowId) {
- var selected = state.selected.includes(rowId);
- return (_jsx("td", __assign({ className: 'pl-4' }, { children: _jsx(CheckBox, { id: rowId, selected: selected, onSelect: function () { return handleSelectRow(rowId); } }) }), "check-".concat(rowId)));
- }
- function renderRowCell(_a, cellIndex) {
- var text = _a.text;
- var body = isValidHttpUrl(text) ? renderRowLink(text) : renderRowText(text);
- return (_jsx("td", __assign({ className: 'h-12 px-4' }, { children: body }), "".concat(cellIndex)));
- }
- function renderRowText(text) {
- return _jsx("div", __assign({ className: 'font-table-row text-table text-grey1' }, { children: text }));
- }
- function renderRowLink(href) {
- return (_jsx("div", __assign({ className: 'font-table-row text-table text-primary underline' }, { children: _jsx("a", __assign({ href: href, target: '_blank', rel: 'noreferrer', title: href }, { children: copy.link })) })));
- }
- function isValidHttpUrl(value) {
- var url;
- try {
- url = new URL(value);
- }
- catch (_) {
- return false;
- }
- return url.protocol === 'http:' || url.protocol === 'https:';
- }
- function renderPageIcons() {
- return (_jsx("div", __assign({ className: 'flex flex-row gap-2' }, { children: state.pageWindow.map(function (page) { return renderPageIcon(page); }) })));
- }
- function renderPageIcon(index) {
- return _jsx(PageIcon, { index: index + 1, selected: state.page === index, onClick: function () { return handleNewPage(index); } }, "page-".concat(index));
- }
- function filterRows() {
- if (query.current.length === 0) {
- return alteredRows.current;
- }
- return alteredRows.current.filter(function (row) { return matchRow(row, query.current); });
- }
- function matchRow(row, query) {
- var rowText = row.cells.map(function (cell) { return cell.text; }).join(' ');
- return query.find(function (word) { return !rowText.includes(word); }) === undefined;
- }
- function handleSelectHead() {
- var allRowsSelected = state.selected.length === state.rows.length;
- if (allRowsSelected) {
- setState(function (state) {
- return __assign(__assign({}, state), { selected: [] });
- });
- }
- else {
- handleSelectAll();
- }
- }
- function handleSelectRow(rowId) {
- setState(function (state) {
- var selected = state.selected.slice(0);
- var index = selected.indexOf(rowId);
- if (index === -1) {
- selected.push(rowId);
- }
- else {
- selected.splice(index, 1);
- }
- return __assign(__assign({}, state), { selected: selected });
- });
- }
- function handleSelectAll() {
- setState(function (state) {
- var selected = state.rows.map(function (row) { return row.id; });
- return __assign(__assign({}, state), { selected: selected });
- });
- }
- function handlePrevious() {
- setState(function (state) {
- var page = state.page === 0 ? state.pageCount - 1 : state.page - 1;
- var pageWindow = updatePageWindow(page);
- var rows = updateRows(page);
- return __assign(__assign({}, state), { page: page, pageWindow: pageWindow, rows: rows });
- });
- }
- function handleNext() {
- setState(function (state) {
- var page = state.page === state.pageCount - 1 ? 0 : state.page + 1;
- var pageWindow = updatePageWindow(page);
- var rows = updateRows(page);
- return __assign(__assign({}, state), { page: page, pageWindow: pageWindow, rows: rows });
- });
- }
- function handleDeleteSelected() {
- var currentSelectedRows = state.selected.slice(0);
- if (currentSelectedRows.length === 0)
- return;
- var newAlteredRows = alteredRows.current.slice(0);
- var _loop_1 = function (rowId) {
- var index = newAlteredRows.findIndex(function (row) { return row.id === rowId; });
- if (index !== -1) {
- newAlteredRows.splice(index, 1);
- }
- };
- for (var _i = 0, currentSelectedRows_1 = currentSelectedRows; _i < currentSelectedRows_1.length; _i++) {
- var rowId = currentSelectedRows_1[_i];
- _loop_1(rowId);
- }
- alteredRows.current = newAlteredRows;
- filteredRows.current = filterRows();
- setState(function (state) {
- var pageCount = getPageCount();
- var page = Math.max(0, Math.min(pageCount - 1, state.page));
- var pageWindow = updatePageWindow(page);
- var rows = updateRows(page);
- var deletedCount = body.rows.length - alteredRows.current.length;
- var visibility = __assign(__assign({}, state.visibility), { undo: deletedCount > 0, table: filteredRows.current.length > 0, noData: false, noDataLeft: alteredRows.current.length === 0, noResults: alteredRows.current.length > 0 && filteredRows.current.length === 0 });
- return __assign(__assign({}, state), { page: page, pageCount: pageCount, pageWindow: pageWindow, rows: rows, deletedCount: deletedCount, selected: [], visibility: visibility });
- });
- onChange(id, alteredRows.current);
- }
- function handleUndo() {
- alteredRows.current = body.rows;
- filteredRows.current = filterRows();
- setState(function (state) {
- var pageCount = getPageCount();
- var page = Math.min(pageCount, state.page);
- var pageWindow = updatePageWindow(page);
- var rows = updateRows(state.page);
- var visibility = __assign(__assign({}, state.visibility), { undo: false, table: filteredRows.current.length > 0, noData: false, noDataLeft: false, noResults: filteredRows.current.length === 0 });
- return __assign(__assign({}, state), { page: page, pageCount: pageCount, pageWindow: pageWindow, rows: rows, deletedCount: 0, selected: [], visibility: visibility });
- });
- onChange(id, body.rows);
- }
- function handleSearch(newQuery) {
- query.current = newQuery;
- filteredRows.current = filterRows();
- setState(function (state) {
- var pageCount = getPageCount();
- var page = Math.min(pageCount, state.page);
- var pageWindow = updatePageWindow(page);
- var rows = updateRows(state.page);
- var visibility = __assign(__assign({}, state.visibility), { table: filteredRows.current.length > 0, noData: body.rows.length === 0, noDataLeft: body.rows.length > 0 && alteredRows.current.length === 0, noResults: body.rows.length > 0 && alteredRows.current.length > 0 && filteredRows.current.length === 0 });
- return __assign(__assign({}, state), { page: page, pageCount: pageCount, pageWindow: pageWindow, rows: rows, visibility: visibility });
- });
- }
- function handleNewPage(page) {
- setState(function (state) {
- var rows = updateRows(page);
- return __assign(__assign({}, state), { page: page, rows: rows });
- });
- }
- function handleEditToggle() {
- setState(function (state) {
- var edit = !state.edit;
- var visibility = __assign(__assign({}, state.visibility), { delete: edit });
- return __assign(__assign({}, state), { edit: edit, visibility: visibility });
- });
- }
- return (_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: 'flex flex-row gap-4 items-center' }, { children: [_jsxs("div", __assign({ className: "flex flex-row items-center gap-2 mt-2 ".concat(body.rows.length <= pageSize ? 'hidden' : '', " ") }, { children: [_jsx(BackIconButton, { onClick: handlePrevious }), _jsx("div", { children: renderPageIcons() }), _jsx(ForwardIconButton, { onClick: handleNext })] })), _jsx("div", { className: 'flex-grow' }), _jsx(Caption, { text: copy.pages, color: 'text-grey2', margin: '' }), _jsx("div", __assign({ className: "".concat(display('search')) }, { children: _jsx(SearchBar, { placeholder: copy.searchPlaceholder, onSearch: function (query) { return handleSearch(query); } }) }))] })), _jsx("div", __assign({ className: "flex flex-col gap-4 justify-center h-full ".concat(display('table')) }, { children: _jsxs("table", __assign({ className: 'text-grey1 table-fixed divide-y divide-grey4' }, { children: [_jsx("thead", { children: renderHeadRow(head) }), _jsx("tbody", __assign({ className: 'divide-y divide-grey4' }, { children: renderRows() }))] })) })), _jsx("div", __assign({ className: "flex flex-col justify-center items-center w-full h-table bg-grey6 ".concat(display('noData')) }, { children: _jsx(Title3, { text: copy.noData, color: 'text-grey3', margin: '' }) })), _jsx("div", __assign({ className: "flex flex-col justify-center items-center w-full h-table bg-grey6 ".concat(display('noDataLeft')) }, { children: _jsx(Title3, { text: copy.noDataLeft, color: 'text-grey3', margin: '' }) })), _jsx("div", __assign({ className: "flex flex-col justify-center items-center w-full h-table bg-grey6 ".concat(display('noResults')) }, { children: _jsx(Title3, { text: copy.noResults, color: 'text-grey3', margin: '' }) })), _jsxs("div", __assign({ className: "flex flex-row items-center gap-6 mt-2 h-8 ".concat(body.rows.length === 0 ? 'hidden' : '', " ") }, { children: [_jsxs("div", __assign({ className: 'flex flex-row gap-4 items-center' }, { children: [_jsx(CheckBox, { id: 'edit', selected: state.edit, onSelect: handleEditToggle }), _jsx(Label, { text: copy.edit, margin: 'mt-1px' })] })), _jsx("div", __assign({ className: "".concat(display('delete'), " mt-1px") }, { children: _jsx(IconLabelButton, { label: copy.delete, color: 'text-delete', icon: DeleteSvg, onClick: handleDeleteSelected }) })), _jsx("div", { className: 'flex-grow' }), _jsx(Label, { text: copy.deleted }), _jsx("div", __assign({ className: "".concat(display('undo')) }, { children: _jsx(IconLabelButton, { label: copy.undo, color: 'text-primary', icon: UndoSvg, onClick: handleUndo }) }))] }))] }));
- function prepareCopy(locale) {
- return {
- edit: Translator.translate(editLabel, locale),
- undo: Translator.translate(undoLabel, locale),
- noData: Translator.translate(noDataLabel, locale),
- noDataLeft: Translator.translate(noDataLeftLabel, locale),
- noResults: Translator.translate(noResultsLabel, locale),
- pages: Translator.translate(pagesLabel(state.pageCount), locale),
- delete: Translator.translate(deleteLabel, locale),
- deleted: Translator.translate(deletedLabel(body.rows.length - alteredRows.current.length), locale),
- searchPlaceholder: Translator.translate(searchPlaceholder, locale),
- link: Translator.translate(link, locale)
- };
- }
-};
-var link = new TextBundle()
- .add('en', 'Check out')
- .add('nl', 'Bekijk');
-var searchPlaceholder = new TextBundle()
- .add('en', 'Search')
- .add('nl', 'Zoeken');
-var noDataLabel = new TextBundle()
- .add('en', 'No data found')
- .add('nl', 'Geen gegevens gevonden');
-var noDataLeftLabel = new TextBundle()
- .add('en', 'All data removed')
- .add('nl', 'Alle gegevens verwijderd');
-var noResultsLabel = new TextBundle()
- .add('en', 'No search results')
- .add('nl', 'Geen zoek resultaten');
-var editLabel = new TextBundle()
- .add('en', 'Adjust')
- .add('nl', 'Aanpassen');
-var undoLabel = new TextBundle()
- .add('en', 'Undo')
- .add('nl', 'Herstel');
-var deleteLabel = new TextBundle()
- .add('en', 'Delete selected')
- .add('nl', 'Verwijder selectie');
-function deletedNoneRowLabel() {
- return new TextBundle()
- .add('en', 'No adjustments')
- .add('nl', 'Geen aanpassingen');
-}
-function deletedRowLabel(amount) {
- return new TextBundle()
- .add('en', "".concat(amount, " row deleted"))
- .add('nl', "".concat(amount, " rij verwijderd"));
-}
-function deletedRowsLabel(amount) {
- return new TextBundle()
- .add('en', "".concat(amount, " rows deleted"))
- .add('nl', "".concat(amount, " rijen verwijderd"));
-}
-function deletedLabel(amount) {
- if (amount === 0)
- return deletedNoneRowLabel();
- if (amount === 1)
- return deletedRowLabel(amount);
- return deletedRowsLabel(amount);
-}
-function singlePageLabel() {
- return new TextBundle()
- .add('en', '1 page')
- .add('nl', '1 pagina');
-}
-function multiplePagesLabel(amount) {
- return new TextBundle()
- .add('en', "".concat(amount, " pages"))
- .add('nl', "".concat(amount, " pagina's"));
-}
-function pagesLabel(amount) {
- if (amount === 1)
- return singlePageLabel();
- return multiplePagesLabel(amount);
-}
diff --git a/dist/framework/visualisation/react/ui/elements/text.d.ts b/dist/framework/visualisation/react/ui/elements/text.d.ts
deleted file mode 100644
index 357fff2c..00000000
--- a/dist/framework/visualisation/react/ui/elements/text.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUITextBodyLarge, PropsUITextBodyMedium, PropsUITextBodySmall, PropsUITextLabel, PropsUITextCaption, PropsUITextTitle0, PropsUITextTitle1, PropsUITextTitle2, PropsUITextTitle3, PropsUITextTitle4, PropsUITextTitle6 } from '../../../../types/elements';
-export declare const BodyLarge: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const BodyMedium: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const BodySmall: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Title0: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Title1: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Title2: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Title3: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Title4: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Title6: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Label: ({ text, color, margin }: Weak) => JSX.Element;
-export declare const Caption: ({ text, color, margin }: Weak) => JSX.Element;
diff --git a/dist/framework/visualisation/react/ui/elements/text.js b/dist/framework/visualisation/react/ui/elements/text.js
deleted file mode 100644
index 9a922335..00000000
--- a/dist/framework/visualisation/react/ui/elements/text.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx } from "react/jsx-runtime";
-export var BodyLarge = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-6 md:mb-8 lg:mb-10' : _c;
- return (_jsx("div", __assign({ className: "text-bodylarge font-body ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var BodyMedium = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-6 md:mb-8 lg:mb-10' : _c;
- return (_jsx("div", __assign({ className: "text-bodymedium font-body ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var BodySmall = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? '' : _c;
- return (_jsx("div", __assign({ className: "text-bodysmall font-body ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Title0 = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-6 md:mb-8 lg:mb-10' : _c;
- return (_jsx("div", __assign({ className: "text-title4 font-title4 sm:text-title2 sm:font-title2 lg:text-title0 lg:font-title0 ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Title1 = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-6 md:mb-8' : _c;
- return (_jsx("div", __assign({ className: "text-title3 font-title3 sm:text-title2 lg:text-title1 lg:font-title1 ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Title2 = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-6 md:mb-8 lg:mb-10' : _c;
- return (_jsx("div", __assign({ className: "text-title4 font-title4 sm:text-title3 sm:font-title3 lg:text-title2 lg:font-title2 ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Title3 = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-3 md:mb-5 lg:mb-6' : _c;
- return (_jsx("div", __assign({ className: "text-title5 font-title5 sm:text-title4 sm:font-title4 lg:text-title3 lg:font-title3 ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Title4 = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-3 md:mb-5 lg:mb-6' : _c;
- return (_jsx("div", __assign({ className: "text-title6 font-title6 sm:text-title5 sm:font-title5 lg:text-title4 lg:font-title4 ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Title6 = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? 'mb-2' : _c;
- return (_jsx("div", __assign({ className: "text-title6 font-title6 ".concat(margin, " ").concat(color) }, { children: text })));
-};
-export var Label = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? '' : _c;
- return (_jsx("div", __assign({ className: "text-label font-label ".concat(color, " ").concat(margin) }, { children: text })));
-};
-export var Caption = function (_a) {
- var text = _a.text, _b = _a.color, color = _b === void 0 ? 'text-grey1' : _b, _c = _a.margin, margin = _c === void 0 ? '' : _c;
- return (_jsx("div", __assign({ className: "text-caption font-caption ".concat(color, " ").concat(margin) }, { children: text })));
-};
diff --git a/dist/framework/visualisation/react/ui/pages/donation_page.d.ts b/dist/framework/visualisation/react/ui/pages/donation_page.d.ts
deleted file mode 100644
index 6213bcf2..00000000
--- a/dist/framework/visualisation/react/ui/pages/donation_page.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIPageDonation } from '../../../../types/pages';
-import { ReactFactoryContext } from '../../factory';
-declare type Props = Weak & ReactFactoryContext;
-export declare const DonationPage: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/pages/donation_page.js b/dist/framework/visualisation/react/ui/pages/donation_page.js
deleted file mode 100644
index 06ec5c03..00000000
--- a/dist/framework/visualisation/react/ui/pages/donation_page.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import { isPropsUIPromptConfirm, isPropsUIPromptConsentForm, isPropsUIPromptFileInput, isPropsUIPromptRadioInput } from '../../../../types/prompts';
-import { ForwardButton } from '../elements/button';
-import { Title1 } from '../elements/text';
-import { Confirm } from '../prompts/confirm';
-import { ConsentForm } from '../prompts/consent_form';
-import { FileInput } from '../prompts/file_input';
-import { RadioInput } from '../prompts/radio_input';
-import { Footer } from './templates/footer';
-import { Sidebar } from './templates/sidebar';
-import LogoSvg from '../../../../../assets/images/logo.svg';
-import { Page } from './templates/page';
-import { Progress } from '../elements/progress';
-import { Instructions } from '../elements/instructions';
-export var DonationPage = function (props) {
- var _a = prepareCopy(props), title = _a.title, forwardButton = _a.forwardButton;
- var platform = props.platform, locale = props.locale, resolve = props.resolve;
- function renderBody(props) {
- var context = { locale: locale, resolve: props.resolve };
- var body = props.body;
- if (isPropsUIPromptFileInput(body)) {
- return _jsx(FileInput, __assign({}, body, context));
- }
- if (isPropsUIPromptConfirm(body)) {
- return _jsx(Confirm, __assign({}, body, context));
- }
- if (isPropsUIPromptConsentForm(body)) {
- return _jsx(ConsentForm, __assign({}, body, context));
- }
- if (isPropsUIPromptRadioInput(body)) {
- return _jsx(RadioInput, __assign({}, body, context));
- }
- throw new TypeError('Unknown body type');
- }
- function handleSkip() {
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadFalse', value: false });
- }
- var footer = (_jsx(Footer, { middle: _jsx(Progress, { percentage: props.footer.progressPercentage }), right: _jsxs("div", __assign({ className: 'flex flex-row' }, { children: [_jsx("div", { className: 'flex-grow' }), _jsx(ForwardButton, { label: forwardButton, onClick: handleSkip })] })) }));
- var sidebar = (_jsx(Sidebar, { logo: LogoSvg, content: _jsx(Instructions, { platform: platform, locale: locale }) }));
- var body = (_jsxs(_Fragment, { children: [_jsx(Title1, { text: title }), renderBody(props)] }));
- return (_jsx(Page, { body: body, sidebar: sidebar, footer: footer }));
-};
-function prepareCopy(_a) {
- var title = _a.header.title, locale = _a.locale;
- return {
- title: Translator.translate(title, locale),
- forwardButton: Translator.translate(forwardButtonLabel(), locale)
- };
-}
-var forwardButtonLabel = function () {
- return new TextBundle()
- .add('en', 'Skip')
- .add('nl', 'Overslaan');
-};
diff --git a/dist/framework/visualisation/react/ui/pages/end_page.d.ts b/dist/framework/visualisation/react/ui/pages/end_page.d.ts
deleted file mode 100644
index 7e0b4d75..00000000
--- a/dist/framework/visualisation/react/ui/pages/end_page.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIPageEnd } from '../../../../types/pages';
-import { ReactFactoryContext } from '../../factory';
-declare type Props = Weak & ReactFactoryContext;
-export declare const EndPage: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/pages/end_page.js b/dist/framework/visualisation/react/ui/pages/end_page.js
deleted file mode 100644
index a6bfc4dd..00000000
--- a/dist/framework/visualisation/react/ui/pages/end_page.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
-import { Footer } from './templates/footer';
-import { Sidebar } from './templates/sidebar';
-import LogoSvg from '../../../../../assets/images/logo.svg';
-import { Page } from './templates/page';
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import { BodyLarge, Title1 } from '../elements/text';
-export var EndPage = function (props) {
- var _a = prepareCopy(props), title = _a.title, text = _a.text;
- var footer = _jsx(Footer, {});
- var sidebar = _jsx(Sidebar, { logo: LogoSvg });
- var body = (_jsxs(_Fragment, { children: [_jsx(Title1, { text: title }), _jsx(BodyLarge, { text: text })] }));
- return (_jsx(Page, { body: body, sidebar: sidebar, footer: footer }));
-};
-function prepareCopy(_a) {
- var locale = _a.locale;
- return {
- title: Translator.translate(title, locale),
- text: Translator.translate(text, locale)
- };
-}
-var title = new TextBundle()
- .add('en', 'Thank you')
- .add('nl', 'Bedankt');
-var text = new TextBundle()
- .add('en', 'Thank you for your participation. You can now close the page or refresh to restart the donation flow.')
- .add('nl', 'Hartelijk dank voor uw deelname. U kunt deze pagina nu sluiten of de pagina verversen om de flow nogmaals te doorlopen.');
diff --git a/dist/framework/visualisation/react/ui/pages/splash_screen.d.ts b/dist/framework/visualisation/react/ui/pages/splash_screen.d.ts
deleted file mode 100644
index 2f9206a7..00000000
--- a/dist/framework/visualisation/react/ui/pages/splash_screen.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIPageSplashScreen } from '../../../../types/pages';
-import { ReactFactoryContext } from '../../factory';
-declare type Props = Weak & ReactFactoryContext;
-export declare const SplashScreen: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/pages/splash_screen.js b/dist/framework/visualisation/react/ui/pages/splash_screen.js
deleted file mode 100644
index 60125bd0..00000000
--- a/dist/framework/visualisation/react/ui/pages/splash_screen.js
+++ /dev/null
@@ -1,66 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-import React from 'react';
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import { PrimaryButton } from '../elements/button';
-import { CheckBox } from '../elements/check_box';
-import { Label, Title1 } from '../elements/text';
-import LogoSvg from '../../../../../assets/images/logo.svg';
-import { Footer } from './templates/footer';
-import { Page } from './templates/page';
-import { Sidebar } from './templates/sidebar';
-import { Bullet } from '../elements/bullet';
-function prepareCopy(_a) {
- var locale = _a.locale;
- return {
- title: Translator.translate(title, locale),
- continueButton: Translator.translate(continueButton, locale),
- privacyLabel: Translator.translate(privacyLabel, locale)
- };
-}
-export var SplashScreen = function (props) {
- var _a = React.useState(false), checked = _a[0], setChecked = _a[1];
- var _b = React.useState(false), waiting = _b[0], setWaiting = _b[1];
- var _c = prepareCopy(props), title = _c.title, continueButton = _c.continueButton, privacyLabel = _c.privacyLabel;
- var locale = props.locale, resolve = props.resolve;
- function handleContinue() {
- if (checked && !waiting) {
- setWaiting(true);
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadVoid', value: undefined });
- }
- }
- function handleCheck() {
- setChecked(true);
- }
- function renderDescription() {
- if (locale === 'nl')
- return nlDescription;
- return enDescription;
- }
- var enDescription = (_jsx(_Fragment, { children: _jsxs("div", __assign({ className: 'text-bodylarge font-body text-grey1' }, { children: [_jsx("div", __assign({ className: 'mb-4 text-bodylarge font-body text-grey1' }, { children: "You are about to start the process of donating your data to a research institute. The data that we ask you to donate will be used for academic research to gain insight into how platforms work." })), _jsx("div", __assign({ className: 'mb-4 text-bodylarge font-body text-grey1' }, { children: "We will walk you through this process step by step. During this process no data is stored or sent to a server. You can delete rows from the data before donating. Data will only be donated and stored when you click the button \u201CYes, donate\u201D on the page that shows your data." })), _jsxs("div", __assign({ className: 'mb-6 text-bodylarge font-body text-grey1' }, { children: ["By clicking the button \u201C", _jsx("span", __assign({ className: 'font-bodybold' }, { children: "Yes, donate" })), "\u201D:"] })), _jsxs("div", __assign({ className: 'flex flex-col gap-3 mb-6' }, { children: [_jsx(Bullet, { children: _jsx("div", { children: "you fully and voluntarily agree to donate your data for this research." }) }), _jsx(Bullet, { children: _jsx("div", { children: "you are aware that when your data is used for academic publications, or made publicly available in some other form, this will be anonymous." }) }), _jsx(Bullet, { children: _jsx("div", { children: "you are aware that you have the right to withdraw your permission." }) })] })), _jsx("div", __assign({ className: 'mb-10' }, { children: "This website keeps track of your activity - for example on which pages of this website you click - as part of this research. More information can be found on our privacy page." }))] })) }));
- var nlDescription = (_jsx(_Fragment, { children: _jsxs("div", __assign({ className: 'text-bodylarge font-body text-grey1' }, { children: [_jsx("div", __assign({ className: 'mb-4' }, { children: "U kunt zo uw gegevens gaan doneren voor een onderzoek van een onderzoeksinstituut. De gegevens die we u vragen te doneren worden gebruikt voor wetenschappelijke onderzoek om inzicht te krijgen in de werkwijze van sociale media." })), _jsx("div", __assign({ className: 'mb-4' }, { children: "We leggen u stap voor stap wat er van u verwacht wordt. Tijdens deze stappen worden geen gegevens opgeslagen of naar een server verstuurd. U kunt zelf rijen uit uw data verwijderen die u niet wilt doneren. Pas als u de vraag krijgt of u de gegevens wilt doneren en u op de knop \u201CJa, doneer\u201D klikt, worden de gegevens gedoneerd en opgeslagen." })), _jsxs("div", __assign({ className: 'mb-4' }, { children: ["Door op de knop \u201C", _jsx("span", __assign({ className: 'font-bodybold' }, { children: "Ja, doneer" })), "\u201D te klikken:"] })), _jsxs("div", __assign({ className: 'flex flex-col gap-3 mb-6' }, { children: [_jsx(Bullet, { children: _jsx("div", { children: "Geeft u volledig en vrijwillig toestemming om uw data te doneren voor dit onderzoek.'" }) }), _jsx(Bullet, { children: _jsx("div", { children: "Geeft u aan te weten dat als uw gegevens worden gebruikt in wetenschappelijke publicaties, of deze op een andere manier openbaar worden gemaakt, dit dan anoniem gebeurt." }) }), _jsx(Bullet, { children: _jsx("div", { children: "Geeft u aan te weten dat u het recht hebt om uw toestemming binnen in te trekken." }) })] })), _jsx("div", __assign({ className: 'mb-10' }, { children: "Deze website houdt ook uw activiteiten bij \u2013 bijvoorbeeld op welke pagina\u2019s van deze website u klikt \u2013 als deel van dit onderzoek. U kunt meer informatie op onze privacy pagina vinden." }))] })) }));
- var footer = _jsx(Footer, {});
- var sidebar = _jsx(Sidebar, { logo: LogoSvg });
- var body = (_jsxs(_Fragment, { children: [_jsx(Title1, { text: title }), renderDescription(), _jsxs("div", __assign({ className: 'flex flex-col gap-8' }, { children: [_jsxs("div", __assign({ className: 'flex flex-row gap-4 items-center' }, { children: [_jsx(CheckBox, { id: '0', selected: checked, onSelect: function () { return handleCheck(); } }), _jsx(Label, { text: privacyLabel })] })), _jsx("div", __assign({ className: "flex flex-row gap-4 ".concat(checked ? '' : 'opacity-30') }, { children: _jsx(PrimaryButton, { label: continueButton, onClick: handleContinue, enabled: checked, spinning: waiting }) }))] }))] }));
- return (_jsx(Page, { body: body, sidebar: sidebar, footer: footer }));
-};
-var title = new TextBundle()
- .add('en', 'Welcome')
- .add('nl', 'Welkom');
-var continueButton = new TextBundle()
- .add('en', 'Start')
- .add('nl', 'Start');
-var privacyLabel = new TextBundle()
- .add('en', 'I have read and agree with the above terms.')
- .add('nl', 'Ik heb deze voorwaarden gelezen en ben hiermee akkoord.');
diff --git a/dist/framework/visualisation/react/ui/pages/templates/footer.d.ts b/dist/framework/visualisation/react/ui/pages/templates/footer.d.ts
deleted file mode 100644
index e08c3640..00000000
--- a/dist/framework/visualisation/react/ui/pages/templates/footer.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-///
-interface FooterProps {
- left?: JSX.Element;
- middle?: JSX.Element;
- right?: JSX.Element;
-}
-export declare const Footer: ({ left, middle, right }: FooterProps) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/pages/templates/footer.js b/dist/framework/visualisation/react/ui/pages/templates/footer.js
deleted file mode 100644
index 19e420eb..00000000
--- a/dist/framework/visualisation/react/ui/pages/templates/footer.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-function footerLinks() {
- return (_jsxs("div", __assign({ className: 'flex flex-row gap-4 text-link font-link' }, { children: [_jsx("div", __assign({ className: ' text-primary underline' }, { children: _jsx("a", __assign({ href: 'https://eyra.co', target: '_blank', rel: 'noreferrer' }, { children: "Privacy" })) })), _jsx("div", { className: 'bg-grey3 w-1px' }), _jsx("div", __assign({ className: ' text-primary underline' }, { children: _jsx("a", __assign({ href: 'https://eyra.co', target: '_blank', rel: 'noreferrer' }, { children: "Support" })) }))] })));
-}
-export var Footer = function (_a) {
- var _b = _a.left, left = _b === void 0 ? footerLinks() : _b, middle = _a.middle, right = _a.right;
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: 'bg-grey4 h-px' }), _jsx("div", __assign({ className: 'h-full flex flex-col justify-center' }, { children: _jsxs("div", __assign({ className: 'flex flex-row gap-4 px-14' }, { children: [_jsx("div", __assign({ className: 'w-1/3' }, { children: left })), _jsx("div", __assign({ className: 'w-1/3' }, { children: middle })), _jsx("div", __assign({ className: 'w-1/3' }, { children: right }))] })) }))] }));
-};
diff --git a/dist/framework/visualisation/react/ui/pages/templates/page.d.ts b/dist/framework/visualisation/react/ui/pages/templates/page.d.ts
deleted file mode 100644
index 5f6909d0..00000000
--- a/dist/framework/visualisation/react/ui/pages/templates/page.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-///
-interface PageProps {
- body: JSX.Element;
- sidebar: JSX.Element;
- footer: JSX.Element;
-}
-export declare const Page: (props: PageProps) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/pages/templates/page.js b/dist/framework/visualisation/react/ui/pages/templates/page.js
deleted file mode 100644
index 55a31cca..00000000
--- a/dist/framework/visualisation/react/ui/pages/templates/page.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-export var Page = function (props) {
- return (_jsxs("div", __assign({ className: 'flex flex-col w-full h-full gap-4' }, { children: [_jsxs("div", __assign({ className: 'flex flex-row w-full gap-10 pt-20 pr-14' }, { children: [_jsx("div", __assign({ className: 'flex-1 pl-14' }, { children: props.body })), _jsx("div", __assign({ className: 'w-sidebar flex-shrink-0' }, { children: props.sidebar }))] })), _jsx("div", { className: 'flex-grow' }), _jsx("div", __assign({ className: 'h-footer flex-shrink-0' }, { children: props.footer }))] })));
-};
diff --git a/dist/framework/visualisation/react/ui/pages/templates/sidebar.d.ts b/dist/framework/visualisation/react/ui/pages/templates/sidebar.d.ts
deleted file mode 100644
index 215dff6a..00000000
--- a/dist/framework/visualisation/react/ui/pages/templates/sidebar.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-interface SidebarProps {
- logo: string;
- content?: JSX.Element;
-}
-export declare const Sidebar: (props: SidebarProps) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/pages/templates/sidebar.js b/dist/framework/visualisation/react/ui/pages/templates/sidebar.js
deleted file mode 100644
index d33addae..00000000
--- a/dist/framework/visualisation/react/ui/pages/templates/sidebar.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
-export var Sidebar = function (props) {
- return (_jsxs("div", __assign({ className: 'flex flex-col gap-10' }, { children: [_jsxs("div", __assign({ className: 'flex-wrap flex flex-row' }, { children: [_jsx("div", { className: 'flex-grow' }), _jsx("div", __assign({ className: 'h-logo' }, { children: _jsx("img", { src: props.logo }) })), _jsx("div", { className: 'flex-grow' })] })), _jsx("div", { children: props.content })] })));
-};
diff --git a/dist/framework/visualisation/react/ui/prompts/confirm.d.ts b/dist/framework/visualisation/react/ui/prompts/confirm.d.ts
deleted file mode 100644
index 6dc7ad12..00000000
--- a/dist/framework/visualisation/react/ui/prompts/confirm.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { ReactFactoryContext } from '../../factory';
-import { PropsUIPromptConfirm } from '../../../../types/prompts';
-declare type Props = Weak & ReactFactoryContext;
-export declare const Confirm: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/prompts/confirm.js b/dist/framework/visualisation/react/ui/prompts/confirm.js
deleted file mode 100644
index 287dece5..00000000
--- a/dist/framework/visualisation/react/ui/prompts/confirm.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-import { Translator } from '../../../../translator';
-import { BodyLarge } from '../elements/text';
-import { PrimaryButton } from '../elements/button';
-export var Confirm = function (props) {
- var resolve = props.resolve;
- var _a = prepareCopy(props), text = _a.text, ok = _a.ok, cancel = _a.cancel;
- function handleOk() {
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadTrue', value: true });
- }
- function handleCancel() {
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadFalse', value: false });
- }
- return (_jsxs(_Fragment, { children: [_jsx(BodyLarge, { text: text, margin: 'mb-4' }), _jsxs("div", __assign({ className: 'flex flex-row gap-4' }, { children: [_jsx(PrimaryButton, { label: ok, onClick: handleOk, color: 'text-grey1 bg-tertiary' }), _jsx(PrimaryButton, { label: cancel, onClick: handleCancel, color: 'text-white bg-primary' })] }))] }));
-};
-function prepareCopy(_a) {
- var text = _a.text, ok = _a.ok, cancel = _a.cancel, locale = _a.locale;
- return {
- text: Translator.translate(text, locale),
- ok: Translator.translate(ok, locale),
- cancel: Translator.translate(cancel, locale)
- };
-}
diff --git a/dist/framework/visualisation/react/ui/prompts/consent_form.d.ts b/dist/framework/visualisation/react/ui/prompts/consent_form.d.ts
deleted file mode 100644
index 85f55b3c..00000000
--- a/dist/framework/visualisation/react/ui/prompts/consent_form.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { PropsUIPromptConsentForm } from '../../../../types/prompts';
-import { ReactFactoryContext } from '../../factory';
-declare type Props = Weak & ReactFactoryContext;
-export declare const ConsentForm: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/prompts/consent_form.js b/dist/framework/visualisation/react/ui/prompts/consent_form.js
deleted file mode 100644
index e64b9942..00000000
--- a/dist/framework/visualisation/react/ui/prompts/consent_form.js
+++ /dev/null
@@ -1,157 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-import { assert } from '../../../../helpers';
-import { Table } from '../elements/table';
-import { LabelButton, PrimaryButton } from '../elements/button';
-import { BodyLarge, Title4 } from '../elements/text';
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import React from 'react';
-import _ from 'lodash';
-export var ConsentForm = function (props) {
- var tablesIn = React.useRef(parseTables(props.tables));
- var metaTables = React.useRef(parseTables(props.metaTables));
- var tablesOut = React.useRef(tablesIn.current);
- var locale = props.locale, resolve = props.resolve;
- var _a = prepareCopy(props), description = _a.description, donateQuestion = _a.donateQuestion, donateButton = _a.donateButton, cancelButton = _a.cancelButton;
- function rowCell(dataFrame, column, row) {
- var text = String(dataFrame[column]["".concat(row)]);
- return { __type__: 'PropsUITableCell', text: text };
- }
- function headCell(dataFrame, column) {
- return { __type__: 'PropsUITableCell', text: column };
- }
- function columnNames(dataFrame) {
- return Object.keys(dataFrame);
- }
- function columnCount(dataFrame) {
- return columnNames(dataFrame).length;
- }
- function rowCount(dataFrame) {
- if (columnCount(dataFrame) === 0) {
- return 0;
- }
- else {
- var firstColumn = dataFrame[columnNames(dataFrame)[0]];
- return Object.keys(firstColumn).length - 1;
- }
- }
- function rows(data) {
- var result = [];
- var _loop_1 = function (row) {
- var id = "".concat(row);
- var cells = columnNames(data).map(function (column) { return rowCell(data, column, row); });
- result.push({ __type__: 'PropsUITableRow', id: id, cells: cells });
- };
- for (var row = 0; row <= rowCount(data); row++) {
- _loop_1(row);
- }
- return result;
- }
- function parseTables(tablesData) {
- console.log('parseTables');
- return tablesData.map(function (table) { return parseTable(table); });
- }
- function parseTable(tableData) {
- var id = tableData.id;
- var title = Translator.translate(tableData.title, props.locale);
- var deletedRowCount = 0;
- var dataFrame = JSON.parse(tableData.data_frame);
- var headCells = columnNames(dataFrame).map(function (column) { return headCell(dataFrame, column); });
- var head = { __type__: 'PropsUITableHead', cells: headCells };
- var body = { __type__: 'PropsUITableBody', rows: rows(dataFrame) };
- return { __type__: 'PropsUITable', id: id, head: head, body: body, title: title, deletedRowCount: deletedRowCount };
- }
- function renderTable(table, readOnly) {
- if (readOnly === void 0) { readOnly = false; }
- return (_jsxs("div", __assign({ className: 'flex flex-col gap-4 mb-4' }, { children: [_jsx(Title4, { text: table.title, margin: '' }), _jsx(Table, __assign({}, table, { readOnly: readOnly, locale: locale, onChange: handleTableChange }))] }), table.id));
- }
- function handleTableChange(id, rows) {
- var tablesCopy = tablesOut.current.slice(0);
- var index = tablesCopy.findIndex(function (table) { return table.id === id; });
- if (index > -1) {
- var _a = tablesCopy[index], title = _a.title, head = _a.head, oldBody = _a.body, oldDeletedRowCount = _a.deletedRowCount;
- var body = { __type__: 'PropsUITableBody', rows: rows };
- var deletedRowCount = oldDeletedRowCount + (oldBody.rows.length - rows.length);
- tablesCopy[index] = { __type__: 'PropsUITable', id: id, head: head, body: body, title: title, deletedRowCount: deletedRowCount };
- }
- tablesOut.current = tablesCopy;
- }
- function handleDonate() {
- var value = serializeConsentData();
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadJSON', value: value });
- }
- function handleCancel() {
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadFalse', value: false });
- }
- function serializeConsentData() {
- var array = serializeTables().concat(serializeMetaData());
- return JSON.stringify(array);
- }
- function serializeMetaData() {
- return serializeMetaTables().concat(serializeDeletedMetaData());
- }
- function serializeTables() {
- return tablesOut.current.map(function (table) { return serializeTable(table); });
- }
- function serializeMetaTables() {
- return metaTables.current.map(function (table) { return serializeTable(table); });
- }
- function serializeDeletedMetaData() {
- var rawData = tablesOut.current
- .filter(function (_a) {
- var deletedRowCount = _a.deletedRowCount;
- return deletedRowCount > 0;
- })
- .map(function (_a) {
- var id = _a.id, deletedRowCount = _a.deletedRowCount;
- return "User deleted ".concat(deletedRowCount, " rows from table: ").concat(id);
- });
- var data = JSON.stringify(rawData);
- return { user_omissions: data };
- }
- function serializeTable(_a) {
- var _b;
- var id = _a.id, head = _a.head, rows = _a.body.rows;
- var data = rows.map(function (row) { return serializeRow(row, head); });
- return _b = {}, _b[id] = data, _b;
- }
- function serializeRow(row, head) {
- assert(row.cells.length === head.cells.length, "Number of cells in row (".concat(row.cells.length, ") should be equals to number of cells in head (").concat(head.cells.length, ")"));
- var keys = head.cells.map(function (cell) { return cell.text; });
- var values = row.cells.map(function (cell) { return cell.text; });
- return _.fromPairs(_.zip(keys, values));
- }
- return (_jsxs(_Fragment, { children: [_jsx(BodyLarge, { text: description }), _jsxs("div", __assign({ className: 'flex flex-col gap-8' }, { children: [tablesIn.current.map(function (table) { return renderTable(table); }), _jsxs("div", { children: [_jsx(BodyLarge, { margin: '', text: donateQuestion }), _jsxs("div", __assign({ className: 'flex flex-row gap-4 mt-4 mb-4' }, { children: [_jsx(PrimaryButton, { label: donateButton, onClick: handleDonate, color: 'bg-success text-white' }), _jsx(LabelButton, { label: cancelButton, onClick: handleCancel, color: 'text-grey1' })] }))] })] }))] }));
-};
-function prepareCopy(_a) {
- var locale = _a.locale;
- return {
- description: Translator.translate(description, locale),
- donateQuestion: Translator.translate(donateQuestionLabel, locale),
- donateButton: Translator.translate(donateButtonLabel, locale),
- cancelButton: Translator.translate(cancelButtonLabel, locale)
- };
-}
-var donateQuestionLabel = new TextBundle()
- .add('en', 'Do you want to donate the above data?')
- .add('nl', 'Wilt u de bovenstaande gegevens doneren?');
-var donateButtonLabel = new TextBundle()
- .add('en', 'Yes, donate')
- .add('nl', 'Ja, doneer');
-var cancelButtonLabel = new TextBundle()
- .add('en', 'No')
- .add('nl', 'Nee');
-var description = new TextBundle()
- .add('en', 'Determine whether you would like to donate the data below. Carefully check the data and adjust when required. With your donation you contribute to the previously described research. Thank you in advance.')
- .add('nl', 'Bepaal of u de onderstaande gegevens wilt doneren. Bekijk de gegevens zorgvuldig en pas zo nodig aan. Met uw donatie draagt u bij aan het eerder beschreven onderzoek. Alvast hartelijk dank.');
diff --git a/dist/framework/visualisation/react/ui/prompts/file_input.d.ts b/dist/framework/visualisation/react/ui/prompts/file_input.d.ts
deleted file mode 100644
index bb60eedf..00000000
--- a/dist/framework/visualisation/react/ui/prompts/file_input.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { ReactFactoryContext } from '../../factory';
-import { PropsUIPromptFileInput } from '../../../../types/prompts';
-declare type Props = Weak & ReactFactoryContext;
-export declare const FileInput: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/prompts/file_input.js b/dist/framework/visualisation/react/ui/prompts/file_input.js
deleted file mode 100644
index 2875209f..00000000
--- a/dist/framework/visualisation/react/ui/prompts/file_input.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-import * as React from 'react';
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import { PrimaryButton } from '../elements/button';
-import { BodyLarge, BodySmall } from '../elements/text';
-export var FileInput = function (props) {
- var _a;
- var _b = React.useState(false), waiting = _b[0], setWaiting = _b[1];
- var _c = React.useState(), selectedFile = _c[0], setSelectedFile = _c[1];
- var input = React.useRef(null);
- var resolve = props.resolve;
- var _d = prepareCopy(props), description = _d.description, note = _d.note, placeholder = _d.placeholder, extensions = _d.extensions, selectButton = _d.selectButton, continueButton = _d.continueButton;
- function handleClick() {
- var _a;
- (_a = input.current) === null || _a === void 0 ? void 0 : _a.click();
- }
- function handleSelect(event) {
- var files = event.target.files;
- if (files != null && files.length > 0) {
- setSelectedFile(files[0]);
- }
- else {
- console.log('[FileInput] Error selecting file: ' + JSON.stringify(files));
- }
- }
- function handleConfirm() {
- if (selectedFile !== undefined && !waiting) {
- setWaiting(true);
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadFile', value: selectedFile });
- }
- }
- return (_jsx(_Fragment, { children: _jsxs("div", __assign({ id: 'select-panel' }, { children: [_jsx("div", __assign({ className: 'flex-wrap text-bodylarge font-body text-grey1 text-left' }, { children: description })), _jsx("div", { className: 'mt-8' }), _jsxs("div", __assign({ className: 'p-6 border-grey4 border-2 rounded' }, { children: [_jsx("input", { ref: input, id: 'input', type: 'file', className: 'hidden', accept: extensions, onChange: handleSelect }), _jsxs("div", __assign({ className: 'flex flex-row gap-4 items-center' }, { children: [_jsx(BodyLarge, { text: (_a = selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.name) !== null && _a !== void 0 ? _a : placeholder, margin: '', color: selectedFile === undefined ? 'text-grey2' : 'textgrey1' }), _jsx("div", { className: 'flex-grow' }), _jsx(PrimaryButton, { onClick: handleClick, label: selectButton, color: 'bg-tertiary text-grey1' })] }))] })), _jsx("div", { className: 'mt-4' }), _jsxs("div", __assign({ className: "".concat(selectedFile === undefined ? 'opacity-30' : 'opacity-100') }, { children: [_jsx(BodySmall, { text: note, margin: '' }), _jsx("div", { className: 'mt-8' }), _jsx("div", __assign({ className: 'flex flex-row gap-4' }, { children: _jsx(PrimaryButton, { label: continueButton, onClick: handleConfirm, enabled: selectedFile !== undefined, spinning: waiting }) }))] }))] })) }));
-};
-function prepareCopy(_a) {
- var description = _a.description, extensions = _a.extensions, locale = _a.locale;
- return {
- description: Translator.translate(description, locale),
- note: Translator.translate(note(), locale),
- placeholder: Translator.translate(placeholder(), locale),
- extensions: extensions,
- selectButton: Translator.translate(selectButtonLabel(), locale),
- continueButton: Translator.translate(continueButtonLabel(), locale)
- };
-}
-var continueButtonLabel = function () {
- return new TextBundle()
- .add('en', 'Continue')
- .add('nl', 'Verder');
-};
-var selectButtonLabel = function () {
- return new TextBundle()
- .add('en', 'Choose file')
- .add('nl', 'Kies bestand');
-};
-var note = function () {
- return new TextBundle()
- .add('en', 'Note: The process to extract the correct data from the file is done on your own computer. No data is stored or sent yet.')
- .add('nl', 'NB: Het proces om de juiste gegevens uit het bestand te halen gebeurt op uw eigen computer. Er worden nog geen gegevens opgeslagen of verstuurd.');
-};
-var placeholder = function () {
- return new TextBundle()
- .add('en', 'Choose a file')
- .add('nl', 'Kies een bestand');
-};
diff --git a/dist/framework/visualisation/react/ui/prompts/radio_input.d.ts b/dist/framework/visualisation/react/ui/prompts/radio_input.d.ts
deleted file mode 100644
index 2d18605e..00000000
--- a/dist/framework/visualisation/react/ui/prompts/radio_input.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-///
-import { Weak } from '../../../../helpers';
-import { ReactFactoryContext } from '../../factory';
-import { PropsUIPromptRadioInput } from '../../../../types/prompts';
-declare type Props = Weak & ReactFactoryContext;
-export declare const RadioInput: (props: Props) => JSX.Element;
-export {};
diff --git a/dist/framework/visualisation/react/ui/prompts/radio_input.js b/dist/framework/visualisation/react/ui/prompts/radio_input.js
deleted file mode 100644
index 435e073f..00000000
--- a/dist/framework/visualisation/react/ui/prompts/radio_input.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
-import * as React from 'react';
-import TextBundle from '../../../../text_bundle';
-import { Translator } from '../../../../translator';
-import { RadioItem } from '../elements/radio_item';
-function prepareCopy(_a) {
- var title = _a.title, description = _a.description, locale = _a.locale;
- return {
- title: Translator.translate(title, locale),
- description: Translator.translate(description, locale),
- continueButton: Translator.translate(continueButtonLabel(), locale)
- };
-}
-export var RadioInput = function (props) {
- var _a = React.useState(-1), selectedId = _a[0], setSelectedId = _a[1];
- var _b = React.useState(true), confirmHidden = _b[0], setConfirmHidden = _b[1];
- var items = props.items, resolve = props.resolve;
- var _c = prepareCopy(props), title = _c.title, description = _c.description, continueButton = _c.continueButton;
- function handleSelect(id) {
- setSelectedId(id);
- setConfirmHidden(false);
- }
- function handleConfirm() {
- var item = items.at(selectedId);
- if (item !== undefined) {
- resolve === null || resolve === void 0 ? void 0 : resolve({ __type__: 'PayloadString', value: item.value });
- }
- }
- function renderItems(items) {
- return items.map(function (item, index) { return _jsx(RadioItem, { onSelect: function () { return handleSelect(index); }, id: index, value: item.value, selected: selectedId === index }, index); });
- }
- return (_jsxs(_Fragment, { children: [_jsx("div", __assign({ className: 'text-title5 font-title5 sm:text-title4 sm:font-title4 lg:text-title3 lg:font-title3 text-grey1' }, { children: title })), _jsx("div", { className: 'mt-8' }), _jsxs("div", __assign({ id: 'select-panel' }, { children: [_jsx("div", __assign({ className: 'flex-wrap text-bodylarge font-body text-grey1 text-left' }, { children: description })), _jsx("div", { className: 'mt-4' }), _jsx("div", { children: _jsx("div", __assign({ id: 'radio-group', className: 'flex flex-col gap-3' }, { children: renderItems(items) })) })] })), _jsx("div", { className: 'mt-8' }), _jsx("div", __assign({ className: "flex flex-row ".concat(confirmHidden ? 'hidden' : '') }, { children: _jsx("div", __assign({ className: 'pt-15px pb-15px active:shadow-top4px active:pt-4 active:pb-14px leading-none font-button text-button rounded pr-4 pl-4 bg-primary text-white cursor-pointer', onClick: handleConfirm }, { children: _jsx("div", __assign({ id: 'confirm-button', className: 'flex-wrap' }, { children: continueButton })) })) }))] }));
-};
-var continueButtonLabel = function () {
- return new TextBundle()
- .add('en', 'Continue')
- .add('nl', 'Doorgaan');
-};
diff --git a/dist/port-0.0.0-py3-none-any.whl b/dist/port-0.0.0-py3-none-any.whl
deleted file mode 100644
index 1c47d9cb..00000000
Binary files a/dist/port-0.0.0-py3-none-any.whl and /dev/null differ
diff --git a/dist/styles.css b/dist/styles.css
deleted file mode 100644
index 06a115c6..00000000
--- a/dist/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.-mt-2px{margin-top:-2px}.mr-2{margin-right:.5rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-1px{margin-top:1px}.mb-6{margin-bottom:1.5rem}.mb-3{margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-10{margin-bottom:2.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.flex{display:flex}.table{display:table}.hidden{display:none}.h-full{height:100%}.h-9{height:2.25rem}.h-10px{height:10px}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-12{height:3rem}.h-30px{height:30px}.h-8{height:2rem}.h-4{height:1rem}.h-48px{height:48px}.h-table{height:384px}.h-px{height:1px}.h-footer{height:88px}.h-logo{height:110px}.w-full{width:100%}.w-7{width:1.75rem}.w-10px{width:10px}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-10{width:2.5rem}.w-9{width:2.25rem}.w-8{width:2rem}.w-1px{width:1px}.w-1\/3{width:33.333333%}.w-sidebar{width:320px}.min-w-button{min-width:200px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.table-fixed{table-layout:fixed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-2{gap:.5rem}.gap-10{gap:2.5rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-grey4>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(238 238 238/var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:9999px}.rounded{border-radius:.25rem}.border-2{border-width:2px}.border-solid{border-style:solid}.border-grey4{--tw-border-opacity:1;border-color:rgb(238 238 238/var(--tw-border-opacity))}.border-grey3{--tw-border-opacity:1;border-color:rgb(204 204 204/var(--tw-border-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(66 114 239/var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity:1;background-color:rgb(255 207 96/var(--tw-bg-opacity))}.bg-delete{--tw-bg-opacity:1;background-color:rgb(219 30 30/var(--tw-bg-opacity))}.bg-grey5{--tw-bg-opacity:1;background-color:rgb(246 246 246/var(--tw-bg-opacity))}.bg-primarylight{--tw-bg-opacity:1;background-color:rgb(227 234 253/var(--tw-bg-opacity))}.bg-grey6{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-success{--tw-bg-opacity:1;background-color:rgb(111 202 55/var(--tw-bg-opacity))}.bg-grey3{--tw-bg-opacity:1;background-color:rgb(204 204 204/var(--tw-bg-opacity))}.bg-grey4{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.bg-opacity-0{--tw-bg-opacity:0}.p-8{padding:2rem}.p-6{padding:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-14{padding-left:3.5rem;padding-right:3.5rem}.pt-15px{padding-top:15px}.pb-15px{padding-bottom:15px}.pr-4{padding-right:1rem}.pl-4{padding-left:1rem}.pt-13px{padding-top:13px}.pb-13px{padding-bottom:13px}.pt-1{padding-top:.25rem}.pb-1{padding-bottom:.25rem}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pt-20{padding-top:5rem}.pr-14{padding-right:3.5rem}.pl-14{padding-left:3.5rem}.text-left{text-align:left}.font-button{font-family:Finador-Bold,sans-serif}.font-body{font-family:Finador-Light,sans-serif}.font-label,.font-table-header{font-family:Finador-Bold,sans-serif}.font-table-row{font-family:Finador-Regular,sans-serif}.font-title3,.font-title4{font-family:Finador-Black,sans-serif}.font-title5,.font-title6{font-family:Finador-Bold,sans-serif}.font-bodybold,.font-caption,.font-link{font-family:Finador-Medium,sans-serif}.text-button{font-size:18px;line-height:18px}.text-bodymedium{font-size:20px;line-height:30px}.text-label{font-size:16px;line-height:16px}.text-table{font-size:14px;line-height:14px}.text-bodylarge{font-size:24px;line-height:36px}.text-bodysmall{font-size:16px;line-height:24px}.text-title4{font-size:28px;line-height:32px}.text-title3{font-size:32px;line-height:38px}.text-title5{font-size:24px;line-height:26px}.text-title6{font-size:20px;line-height:22px}.text-caption{font-size:14px;line-height:18px}.text-link{font-size:16px;line-height:24px}.leading-none{line-height:1}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-delete{--tw-text-opacity:1;color:rgb(219 30 30/var(--tw-text-opacity))}.text-grey1{--tw-text-opacity:1;color:rgb(34 34 34/var(--tw-text-opacity))}.text-grey2{--tw-text-opacity:1;color:rgb(153 153 153/var(--tw-text-opacity))}.text-primary{--tw-text-opacity:1;color:rgb(66 114 239/var(--tw-text-opacity))}.text-grey3{--tw-text-opacity:1;color:rgb(204 204 204/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-100{opacity:1}.filter{-webkit-filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:bg-grey6:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.focus\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(66 114 239/var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.active\:pt-4:active{padding-top:1rem}.active\:pb-14px:active{padding-bottom:14px}.active\:pt-14px:active{padding-top:14px}.active\:pb-3:active{padding-bottom:.75rem}.active\:pt-5px:active{padding-top:5px}.active\:pb-3px:active{padding-bottom:3px}.active\:shadow-top4px:active{--tw-shadow:inset 0 4px 0 0 rgba(0,0,0,.15);--tw-shadow-colored:inset 0 4px 0 0 var(--tw-shadow-color)}.active\:shadow-top2px:active,.active\:shadow-top4px:active{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.active\:shadow-top2px:active{--tw-shadow:inset 0 2px 0 0 rgba(0,0,0,.15);--tw-shadow-colored:inset 0 2px 0 0 var(--tw-shadow-color)}@media (min-width:640px){.sm\:font-title2,.sm\:font-title3,.sm\:font-title4{font-family:Finador-Black,sans-serif}.sm\:font-title5{font-family:Finador-Bold,sans-serif}.sm\:text-title2{font-size:40px;line-height:44px}.sm\:text-title3{font-size:32px;line-height:38px}.sm\:text-title4{font-size:28px;line-height:32px}.sm\:text-title5{font-size:24px;line-height:26px}}@media (min-width:768px){.md\:mb-8{margin-bottom:2rem}.md\:mb-5{margin-bottom:1.25rem}}@media (min-width:1024px){.lg\:mb-10{margin-bottom:2.5rem}.lg\:mb-6{margin-bottom:1.5rem}.lg\:font-title0,.lg\:font-title1,.lg\:font-title2,.lg\:font-title3,.lg\:font-title4{font-family:Finador-Black,sans-serif}.lg\:text-title0{font-size:64px;line-height:68px}.lg\:text-title1{font-size:50px;line-height:50px}.lg\:text-title2{font-size:40px;line-height:44px}.lg\:text-title3{font-size:32px;line-height:38px}.lg\:text-title4{font-size:28px;line-height:32px}}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index ab87217c..c2631e78 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,7 @@
"@types/node": "^16.11.59",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
+ "concurrently": "^8.2.1",
"lodash": "^4.17.21",
"lottie-react": "^2.3.1",
"typescript": "^4.4.3",
@@ -1993,11 +1994,11 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.19.0",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz",
- "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==",
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz",
+ "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==",
"dependencies": {
- "regenerator-runtime": "^0.13.4"
+ "regenerator-runtime": "^0.14.0"
},
"engines": {
"node": ">=6.9.0"
@@ -2016,6 +2017,11 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@babel/runtime/node_modules/regenerator-runtime": {
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
+ "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
+ },
"node_modules/@babel/template": {
"version": "7.18.10",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
@@ -5622,6 +5628,84 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true
},
+ "node_modules/concurrently": {
+ "version": "8.2.1",
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz",
+ "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==",
+ "dependencies": {
+ "chalk": "^4.1.2",
+ "date-fns": "^2.30.0",
+ "lodash": "^4.17.21",
+ "rxjs": "^7.8.1",
+ "shell-quote": "^1.8.1",
+ "spawn-command": "0.0.2",
+ "supports-color": "^8.1.1",
+ "tree-kill": "^1.2.2",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "conc": "dist/bin/concurrently.js",
+ "concurrently": "dist/bin/concurrently.js"
+ },
+ "engines": {
+ "node": "^14.13.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
+ }
+ },
+ "node_modules/concurrently/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/concurrently/node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/concurrently/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/concurrently/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/confusing-browser-globals": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz",
@@ -6236,6 +6320,21 @@
"node": ">=10"
}
},
+ "node_modules/date-fns": {
+ "version": "2.30.0",
+ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
+ "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
+ "dependencies": {
+ "@babel/runtime": "^7.21.0"
+ },
+ "engines": {
+ "node": ">=0.11"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/date-fns"
+ }
+ },
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -6793,7 +6892,6 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
- "dev": true,
"engines": {
"node": ">=6"
}
@@ -8426,7 +8524,6 @@
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true,
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
@@ -9250,7 +9347,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -14129,7 +14225,8 @@
"node_modules/regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
- "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
+ "dev": true
},
"node_modules/regenerator-transform": {
"version": "0.15.0",
@@ -14245,7 +14342,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -14482,6 +14578,14 @@
"queue-microtask": "^1.2.2"
}
},
+ "node_modules/rxjs": {
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
+ "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
+ "dependencies": {
+ "tslib": "^2.1.0"
+ }
+ },
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@@ -14798,10 +14902,12 @@
}
},
"node_modules/shell-quote": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
- "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==",
- "dev": true
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
+ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
"node_modules/side-channel": {
"version": "1.0.4",
@@ -14957,6 +15063,11 @@
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
"dev": true
},
+ "node_modules/spawn-command": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",
+ "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ=="
+ },
"node_modules/spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
@@ -15149,7 +15260,6 @@
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -15162,8 +15272,7 @@
"node_modules/string-width/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"node_modules/string.prototype.matchall": {
"version": "4.0.7",
@@ -15247,7 +15356,6 @@
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
"dependencies": {
"ansi-regex": "^5.0.1"
},
@@ -15859,6 +15967,14 @@
"node": ">=8"
}
},
+ "node_modules/tree-kill": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
+ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
+ "bin": {
+ "tree-kill": "cli.js"
+ }
+ },
"node_modules/tryer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
@@ -16489,8 +16605,7 @@
"node_modules/tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
- "dev": true
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
},
"node_modules/tsutils": {
"version": "3.21.0",
@@ -17641,7 +17756,6 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
@@ -17727,7 +17841,6 @@
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "dev": true,
"engines": {
"node": ">=10"
}
@@ -19146,11 +19259,18 @@
}
},
"@babel/runtime": {
- "version": "7.19.0",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.0.tgz",
- "integrity": "sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==",
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz",
+ "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==",
"requires": {
- "regenerator-runtime": "^0.13.4"
+ "regenerator-runtime": "^0.14.0"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
+ "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
+ }
}
},
"@babel/runtime-corejs3": {
@@ -21865,6 +21985,61 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true
},
+ "concurrently": {
+ "version": "8.2.1",
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.1.tgz",
+ "integrity": "sha512-nVraf3aXOpIcNud5pB9M82p1tynmZkrSGQ1p6X/VY8cJ+2LMVqAgXsJxYYefACSHbTYlm92O1xuhdGTjwoEvbQ==",
+ "requires": {
+ "chalk": "^4.1.2",
+ "date-fns": "^2.30.0",
+ "lodash": "^4.17.21",
+ "rxjs": "^7.8.1",
+ "shell-quote": "^1.8.1",
+ "spawn-command": "0.0.2",
+ "supports-color": "^8.1.1",
+ "tree-kill": "^1.2.2",
+ "yargs": "^17.7.2"
+ },
+ "dependencies": {
+ "cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "requires": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ }
+ },
+ "yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="
+ }
+ }
+ },
"confusing-browser-globals": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz",
@@ -22293,6 +22468,14 @@
"whatwg-url": "^8.0.0"
}
},
+ "date-fns": {
+ "version": "2.30.0",
+ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
+ "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
+ "requires": {
+ "@babel/runtime": "^7.21.0"
+ }
+ },
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -22726,8 +22909,7 @@
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
- "dev": true
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
},
"escape-html": {
"version": "1.0.3",
@@ -23923,8 +24105,7 @@
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-intrinsic": {
"version": "1.1.3",
@@ -24516,8 +24697,7 @@
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"is-generator-fn": {
"version": "2.1.0",
@@ -28018,7 +28198,8 @@
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
- "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
+ "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
+ "dev": true
},
"regenerator-transform": {
"version": "0.15.0",
@@ -28111,8 +28292,7 @@
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
- "dev": true
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="
},
"require-from-string": {
"version": "2.0.2",
@@ -28268,6 +28448,14 @@
"queue-microtask": "^1.2.2"
}
},
+ "rxjs": {
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
+ "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
+ "requires": {
+ "tslib": "^2.1.0"
+ }
+ },
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@@ -28519,10 +28707,9 @@
"dev": true
},
"shell-quote": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
- "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==",
- "dev": true
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
+ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA=="
},
"side-channel": {
"version": "1.0.4",
@@ -28645,6 +28832,11 @@
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
"dev": true
},
+ "spawn-command": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",
+ "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ=="
+ },
"spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
@@ -28794,7 +28986,6 @@
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -28804,8 +28995,7 @@
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
}
}
},
@@ -28873,7 +29063,6 @@
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
@@ -29329,6 +29518,11 @@
"punycode": "^2.1.1"
}
},
+ "tree-kill": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
+ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="
+ },
"tryer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
@@ -29743,8 +29937,7 @@
"tslib": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
- "dev": true
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
},
"tsutils": {
"version": "3.21.0",
@@ -30660,7 +30853,6 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
@@ -30719,8 +30911,7 @@
"y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "dev": true
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
},
"yallist": {
"version": "4.0.0",
diff --git a/package.json b/package.json
index 07b69332..0992473d 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "port",
"version": "0.1.0",
"private": true,
+ "homepage": ".",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
@@ -10,28 +11,30 @@
"@types/node": "^16.11.59",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
+ "concurrently": "^8.2.1",
"lodash": "^4.17.21",
"lottie-react": "^2.3.1",
"typescript": "^4.4.3",
"web-vitals": "^2.1.4"
},
"scripts": {
- "dev:fix:ts": "ts-standard --env jest --fix",
- "dev:build:py": "cd src/framework/processing/py && poetry build --format wheel",
- "dev:build:ts": "react-scripts build",
- "dev:install:py": "cp -R src/framework/processing/py/dist/. ./public",
- "dev:build": "run-s dev:fix:ts dev:build:ts dev:build:py dev:install:py",
- "dev:start": "react-scripts start",
- "dev:test": "react-scripts test",
- "prod:clean": "rm -rf ./dist",
- "prod:build:css": "NODE_ENV=production tailwindcss build -i ./src/framework/styles.css -o ./dist/styles.css --minify",
- "prod:build:ts": "tsc -d --project tsconfig.prod.json",
- "prod:cp:assets": "cp -R ./src/assets ./dist",
- "prod:cp:py": "cp -R src/framework/processing/py/dist/. ./dist",
- "prod": "run-s dev:fix:ts dev:build:py prod:build:ts prod:build:css prod:cp:py prod:cp:assets",
- "ci:fix": "run-s dev:fix:ts",
- "ci:test": "CI=true react-scripts test",
- "watch": "npm run dev:start & nodemon --ext py --exec \"npm run dev:build:py && npm run dev:install:py\""
+ "prepare": "husky install",
+ "check:ts": "ts-standard --env jest",
+ "fix:ts": "ts-standard --env jest --fix",
+ "clean": "rm -rf ./build",
+ "build:css": "NODE_ENV=production tailwindcss build -i ./src/framework/styles.css -o ./build/styles.css --minify",
+ "build:wheel": "cd src/framework/processing/py && poetry build --format wheel",
+ "build:install-wheel": "cp -R src/framework/processing/py/dist/. ./public",
+ "build:py": "npm run build:wheel && npm run build:install-wheel",
+ "build:app": "react-scripts build",
+ "start:py": "nodemon --ext py --exec \"run-s build:py\"",
+ "start:app": "react-scripts start",
+ "start": "concurrently 'run-s start:py' 'run-s start:app'",
+ "build": "npm run build:py && npm run build:app && npm run build:css",
+ "archive": "cd build && zip -r ../release.zip .",
+ "release": "npm run build && npm run archive",
+ "test": "react-scripts test",
+ "lint": "npm run fix:ts"
},
"browserslist": {
"production": [
@@ -50,7 +53,6 @@
"autoprefixer": "^10.4.12",
"husky": "^8.0.1",
"nodemon": "^2.0.20",
- "npm-run-all": "^4.1.5",
"postcss": "^8.4.16",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@@ -65,4 +67,4 @@
"src/framework/processing/py_worker.js"
]
}
-}
+}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 5213c094..842e5723 100644
--- a/public/index.html
+++ b/public/index.html
@@ -14,7 +14,7 @@
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
-
+