From 3d79b8000403cc9a9fb9973e972cc99d7d6b683b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?=
Date: Thu, 5 Aug 2021 21:22:53 -0300
Subject: [PATCH 1/4] fix (translator): adjust in the image caption translation
---
src/adonisjs/public/translator/translator.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/adonisjs/public/translator/translator.js b/src/adonisjs/public/translator/translator.js
index d841e52c..1c82429b 100644
--- a/src/adonisjs/public/translator/translator.js
+++ b/src/adonisjs/public/translator/translator.js
@@ -2457,7 +2457,7 @@ class Translator {
mark: /^[ \t]*>[ \t]*/im
},
image: {
- mark: /([ \t]*)!\[([\w \t]*)\]\(([\w:.\/\?\-~]+)>?[ \t]*(?:=(\d*(?:\.\d+[^x \t"\)])?)(?:x(\d*(?:\.\d+[^ \t"\)])?))?)?[ \t]*(?:"([\w ]*)")?\)/im,
+ mark: /([ \t]*)!\[([^\]\n\r\f]*)\]\(([\w:.\/\?\-~]+)>?[ \t]*(?:=(\d*(?:\.\d+[^x \t"\)])?)(?:x(\d*(?:\.\d+[^ \t"\)])?))?)?[ \t]*(?:"([\w ]*)")?\)/im,
inline: true
},
media: {
From cf6e216354c3211725aa9c2ebceb7e3b16908084 Mon Sep 17 00:00:00 2001
From: Heitor Mattosinho
Date: Fri, 6 Aug 2021 12:47:36 -0300
Subject: [PATCH 2/4] fix (vulnerabilty): axios and kramdown version
---
Gemfile.lock | 2 +-
src/adonisjs/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index 7f34d320..6f785da5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -67,7 +67,7 @@ GEM
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
- kramdown (= 2.3.0)
+ kramdown (= 2.3.1)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
diff --git a/src/adonisjs/package.json b/src/adonisjs/package.json
index d5474563..c15d483e 100644
--- a/src/adonisjs/package.json
+++ b/src/adonisjs/package.json
@@ -27,7 +27,7 @@
"@adonisjs/session": "^1.0.29",
"@adonisjs/shield": "^1.0.8",
"@adonisjs/validator": "^5.0.6",
- "axios": "^0.19.2",
+ "axios": "^0.21.1",
"form-data": "^3.0.0",
"mysql": "^2.16.0",
"npm": "^6.14.7"
From e74aad17d3badcd13a19f50ef59da24826c8a170 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?=
Date: Tue, 10 Aug 2021 13:04:59 -0300
Subject: [PATCH 3/4] fix (author/dcc): conditional errors
---
src/adonisjs/public/author/js/author.js | 2 +-
.../dccs/components/control/dcc-compute.js | 3 +-
src/adonisjs/public/infra/README.md | 163 +-----------------
3 files changed, 11 insertions(+), 157 deletions(-)
diff --git a/src/adonisjs/public/author/js/author.js b/src/adonisjs/public/author/js/author.js
index 328716a9..1b235699 100644
--- a/src/adonisjs/public/author/js/author.js
+++ b/src/adonisjs/public/author/js/author.js
@@ -793,7 +793,7 @@ class AuthorManager {
// finding the next nonblank node
let pos
- if (position = 'previous') { pos = (contentSel[elSel - 1].type == 'linefeed') ? elSel - 2 : elSel - 1 } else { pos = (contentSel[elSel + 1].type == 'linefeed') ? elSel + 2 : elSel + 1 }
+ if (position == 'previous') { pos = (contentSel[elSel - 1].type == 'linefeed') ? elSel - 2 : elSel - 1 } else { pos = (contentSel[elSel + 1].type == 'linefeed') ? elSel + 2 : elSel + 1 }
// exchanging sequence ids
const elSeq = contentSel[elSel].seq
diff --git a/src/adonisjs/public/dccs/components/control/dcc-compute.js b/src/adonisjs/public/dccs/components/control/dcc-compute.js
index dc59cf0c..a72cb5d3 100644
--- a/src/adonisjs/public/dccs/components/control/dcc-compute.js
+++ b/src/adonisjs/public/dccs/components/control/dcc-compute.js
@@ -14,13 +14,14 @@ class DCCCompute extends DCCBase {
if (this.hasAttribute('expression')) {
this._compiled =
DCCCompute.compileStatementSet(this.expression.toLowerCase())
- if (this._compiled != null && this.onload)
+ if (this._compiled != null && this.onload) {
await this.update()
if (this.active) {
const variables = DCCCompute.filterVariables(this._compiled, false)
for (let v of variables)
MessageBus.ext.subscribe('var/' + v + '/set', this.update)
}
+ }
}
if (this.hasAttribute('id'))
diff --git a/src/adonisjs/public/infra/README.md b/src/adonisjs/public/infra/README.md
index 3313babd..ae0d318b 100644
--- a/src/adonisjs/public/infra/README.md
+++ b/src/adonisjs/public/infra/README.md
@@ -1,159 +1,12 @@
-# Harena Message Protocol
-## Topic Structure and Wildcards
-The wildcards standard is based in the MQTT 3.1.1, as specified in the document: [MQTT Version 3.1.1](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html), Section 4.7.1 Topic wildcards.
+# Harena General Specifications
-Extra information is based on:
-The HiveMQ Team. MQTT Essentials Part 5: MQTT Topics & Best Practices. February 9, 2015. online: https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/.
-## Topic Name Structure
+## Message Protocols
-Whenever a message is published or subscribed a **Topic Name** is specified. It is a hierarchical structure composed by one or more **Topic Levels** separated by slashes `/` (the **Topic Level Separators**).
-
-* **Topic Level** - Is a label formed with alphanumeric characters, and can also have: white space, underscore and minus.
-
-## Best Practices
-The following best practices have been adopted in the Harena project and must be followed by all developers. They are derived from [MQTT Essentials Part 5: MQTT Topics & Best Practices](https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/).
-
-* **Never use a leading forward slash** - A Topic Name can optionally start and/or end by a slash `/`, but it adds an extra unnecessary level, therefore they are not adopted in Harena.
-
-* **Never use spaces in a topic** - Even though MQTT supports spaces, they are not used in Harena.
-
-## Topic Filters and Wildcards
-
-In the subscription process, it is possible to specify a specific Topic Name or a Topic Filter, which works as a regular expression representing a set of possible Topic Names.
-
-Wildcards are represented by the special `#` and/or `+` characters, appearing inside a Topic Name in the subscription process. They enable the subscription of a set of topics, since they generically represent one or more Topic Levels, according to the following rules:
-
-### Multilevel Wildcard `#`
-
-The wildcard `#` can be used only in two positions in the Topic Filter:
-* alone (the filter is only a `#`) - matches any Topic Name with any number of levels;
-* end of the Topic Name (always preceded by a `/ `) - matches any number of Topic Levels with the prefix specified before the wildcard.
-
-### Single Level Wildcard `+`
-Only a single Topic Level can be matched by the wildcard `+`, which represents any possible complete Topic Level Label. The `+` wildcard can appear only in four positions:
-* alone (the filter is only a `+`) - matches any Topic Label in a single level (without slashes);
-* beginning of the Topic Filter, always followed by a slash;
-* end of the Topic Filter, always preceded by a slash;
-* middle of the Topic Filter, always between two slashes.
-
-# Message Paths in the Bus
-
-## Control Actions
-
-General protocol: `control//`.
-
-Most of the control actions trigger the final action, for example, the `control/case/load` control action is the start of the process to trigger the `case//load` action.
-
-Levels of detail:
-* `case`
-* `knot`
-* `element`
-
-
-* `control/case/load`
-* `control/case/selected`
-
-* `control/case/save`
-* `control/case/play`
-* `control/knot/edit`
-* `control/config/edit`
-
-## Persisted Messages
-
-All the internal paths are mapped to the external paths prefixing the path by: `/execution/`, where `` is the id of the case instance that is being executed.
-
-### Entity: `template_family`
-* `template_family/*/get` - Returns the list of the available template families.
-
- response topic: `template_family/*`
- message: `{: }`
-
-### Entity: `template`
-* `data/theme/./get` - Loads and returns the HTML of the template.
-
- response topic: `data/theme/.`
- message: ``
-
-
-### Entity: `case`
-* `case/*/get` - Returns the list of the available cases.
-
- response topic: `case/*`
- message: `{: }`
-
-* `case//get` - Loads and returns the markdown of the case.
-
- response topic: `case/`
- message: ``
-
-* `case//set` - Saves the case in a markdown or object format (according to the format specified in the message).
-
- message: `{format: "markdown" | "json", source: }`
-
- * markdown format
-
- response topic: `case//version`
- message: `` - id of the previous case version.
-
- * object format
-
- response topic: `case//set/status`
- message: `` - status of the opperation.
-
-### Entity: `knot`
-`` - The title given by the author to the knot in the case.
-`` - Uniquely identifies a knot. Derived from the knot title replacing spaces for underscores (as we do not use spaces in the topics).
-
-* `knot//selected` - A knot has been selected in the authoring environment.
-
- message: ``
-
-* `knot//navigate` - The player navigates to a specific knot.
-* `knot//input/ready`
- * `var//typed`
- * `var//changed`
- * `var//set`
- * `var//input/end`
-
-#### Details
-
-* `var//typed` - Notifies that the user typed part of an input.
-
- message: `{sourceType: "dcc-input", value: }`
-
-* `var//changed` - Notifies a change em the input variable.
-
- message: `{sourceType: "dcc-input", value: }`
-
-* `var//set` - Notifies the input of a value by the user related to a ``.
-
- message: `{sourceType: "dcc-input", value: ""}`
-
-## Messages Not Persisted
-
-Messages to coordinate DCCs.
-
-### Entity: `dcc-block`
-
-Operations:
-* `get xstyle` \[`/dcc-block/get/xstyle`\] - Requests to a DCC Styler the styling policy.
-
- return: \[`/dcc-block/xstyle`\] - one of the following values:
- * `in ` - default style defined inside the DCC;
- * `none` - no style defined;
- * `out` - style defined externally.
-
-### Entity: `dcc-state-select`
-
-Operations:
-* `get states` \[`/dcc-state-select/get/states`\] - Requests for an upper level DCC (e.g., an aggregattor DCC) or a group coordinator DCC the set of possible states present in the selector.
-
- return: \[`/dcc-state-select/states`\] - List of states separated by commas.
+The general rules to build Harena messages is based on:
+* [DCCs Message Protocol](/harena-docs/dccs/message/)
+The Harena specific message protocol:
+* [Harena Message Protocol](message/)
+The Development Guides has a section explaining Javascript implementation details of exchanging messages through the bus:
+* [DCCs Development Guide](/harena-docs/dccs/development/)
From 2e192e13652f451cc86d06dadacaaf38b37d1226 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Santanch=C3=A8?=
Date: Wed, 11 Aug 2021 17:44:11 -0300
Subject: [PATCH 4/4] refactor (comments): new comments layouts
---
src/adonisjs/public/dccs/base/dcc-block.js | 6 +-
.../simple/case/pocus_training-static.md | 1 +
.../simple/knot/comments/pt_abdomen.html | 280 +-
.../simple/knot/comments/pt_aorta.html | 423 +-
.../simple/knot/comments/pt_articulate.html | 249 +-
.../simple/knot/comments/pt_cava.html | 232 +-
.../simple/knot/comments/pt_conclusion.html | 213 +-
.../simple/knot/comments/pt_efast.html | 574 +-
.../simple/knot/comments/pt_extra.html | 9 +
.../simple/knot/comments/pt_heart.html | 1178 ++--
.../simple/knot/comments/pt_llv.html | 843 +--
.../simple/knot/comments/pt_lungs.html | 5120 ++++++-----------
.../simple/knot/comments/pt_ocular.html | 259 +-
.../simple/knot/comments/pt_presentation.html | 3 +-
.../simple/knot/comments/pt_soft.html | 314 +-
.../simple/knot/comments/pt_urinary.html | 754 +--
.../simple/knot/comments/pt_vesicle.html | 396 +-
.../public/templates/simple/knot/pt_extra.md | 19 +
18 files changed, 4781 insertions(+), 6092 deletions(-)
create mode 100644 src/adonisjs/public/templates/simple/knot/comments/pt_extra.html
create mode 100644 src/adonisjs/public/templates/simple/knot/pt_extra.md
diff --git a/src/adonisjs/public/dccs/base/dcc-block.js b/src/adonisjs/public/dccs/base/dcc-block.js
index 637e73dd..da8e7f86 100644
--- a/src/adonisjs/public/dccs/base/dcc-block.js
+++ b/src/adonisjs/public/dccs/base/dcc-block.js
@@ -34,7 +34,11 @@ class DCCBlock extends DCCVisual {
this.location = locationM.message
}
- if (document.readyState === 'complete') { this._renderInterface() } else { window.addEventListener('load', this._renderInterface) }
+ if (document.readyState === 'complete') {
+ this._renderInterface()
+ } else {
+ window.addEventListener('load', this._renderInterface)
+ }
}
/* Attribute Handling */
diff --git a/src/adonisjs/public/templates/simple/case/pocus_training-static.md b/src/adonisjs/public/templates/simple/case/pocus_training-static.md
index 99f1a513..3d7ae4a9 100644
--- a/src/adonisjs/public/templates/simple/case/pocus_training-static.md
+++ b/src/adonisjs/public/templates/simple/case/pocus_training-static.md
@@ -23,3 +23,4 @@ ___ Data ___
* Soft Parts: simple/knot/pt_soft
* Articulate: simple/knot/pt_articulate
* Ocular: simple/knot/pt_ocular
+ * Extra: simple/knot/pt_extra
diff --git a/src/adonisjs/public/templates/simple/knot/comments/pt_abdomen.html b/src/adonisjs/public/templates/simple/knot/comments/pt_abdomen.html
index 205e7663..5106ae67 100644
--- a/src/adonisjs/public/templates/simple/knot/comments/pt_abdomen.html
+++ b/src/adonisjs/public/templates/simple/knot/comments/pt_abdomen.html
@@ -2,243 +2,259 @@
+
+