@lblod/ember-rdfa-editor-lblod-plugins 26.5.0 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -0
- package/addon/components/article-structure-plugin/article-structure-card.gts +76 -0
- package/addon/components/article-structure-plugin/structure-card.gts +15 -0
- package/addon/components/decision-plugin/decision-plugin-card.gts +6 -2
- package/addon/components/decision-plugin/insert-article.gts +30 -23
- package/addon/components/generic-rdfa-variable/insert-menu.ts +2 -2
- package/addon/components/pagination/pagination-view.gts +16 -9
- package/addon/components/roadsign-regulation-plugin/expanded-measure.gts +156 -0
- package/addon/components/roadsign-regulation-plugin/measure-preview.gts +18 -0
- package/addon/components/roadsign-regulation-plugin/{roadsign-regulation-card.ts → roadsign-regulation-card.gts} +36 -22
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.gts +519 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.gts +161 -0
- package/addon/components/snippet-plugin/nodes/snippet.gts +1 -1
- package/addon/components/structure-plugin/_private/structure.gts +49 -19
- package/addon/components/structure-plugin/{_private/control-card.gts → control-card.gts} +132 -31
- package/addon/components/template-comments-plugin/edit-card.ts +1 -2
- package/addon/components/template-comments-plugin/insert.ts +7 -0
- package/addon/components/variable-plugin/autofilled/edit.gts +4 -4
- package/addon/components/variable-plugin/autofilled/insert.gts +14 -49
- package/addon/components/variable-plugin/codelist/edit.ts +3 -3
- package/addon/components/variable-plugin/codelist/insert.ts +15 -54
- package/addon/components/variable-plugin/date/edit.ts +5 -5
- package/addon/components/variable-plugin/date/insert-variable.ts +12 -39
- package/addon/components/variable-plugin/date/insert.ts +12 -37
- package/addon/components/variable-plugin/date/nodeview.ts +9 -6
- package/addon/components/variable-plugin/location/edit.ts +40 -13
- package/addon/components/variable-plugin/location/insert.ts +13 -18
- package/addon/components/variable-plugin/number/insert.ts +16 -46
- package/addon/components/variable-plugin/number/nodeview.ts +8 -5
- package/addon/components/variable-plugin/text/insert.ts +15 -46
- package/addon/components/variable-plugin/variable/nodeview.ts +2 -2
- package/addon/plugins/article-structure-plugin/structures/index.ts +32 -39
- package/addon/plugins/citation-plugin/index.ts +1 -0
- package/addon/plugins/confidentiality-plugin/marks/redacted.ts +5 -1
- package/addon/plugins/decision-plugin/{commands/insert-article-command.ts → actions/insert-article.ts} +43 -42
- package/addon/plugins/decision-plugin/commands/insert-article-container.ts +17 -16
- package/addon/plugins/decision-plugin/utils/build-article-structure.ts +54 -20
- package/addon/plugins/location-plugin/node.ts +2 -1
- package/addon/plugins/roadsign-regulation-plugin/actions/insert-measure.ts +251 -0
- package/addon/plugins/roadsign-regulation-plugin/actions/resolve-template.ts +66 -0
- package/addon/plugins/roadsign-regulation-plugin/constants.ts +37 -0
- package/addon/plugins/roadsign-regulation-plugin/queries/mobility-measure-concept.ts +167 -0
- package/addon/plugins/roadsign-regulation-plugin/queries/mobility-template.ts +57 -0
- package/addon/plugins/roadsign-regulation-plugin/queries/road-sign-category.ts +39 -0
- package/addon/plugins/roadsign-regulation-plugin/queries/sign-codes.ts +100 -0
- package/addon/plugins/roadsign-regulation-plugin/queries/sign-concept.ts +75 -0
- package/addon/plugins/roadsign-regulation-plugin/queries/variable.ts +59 -0
- package/addon/plugins/roadsign-regulation-plugin/schemas/mobility-measure-concept.ts +16 -0
- package/addon/plugins/roadsign-regulation-plugin/schemas/mobility-template.ts +8 -0
- package/addon/plugins/roadsign-regulation-plugin/schemas/road-sign-category.ts +8 -0
- package/addon/plugins/roadsign-regulation-plugin/schemas/sign-code.ts +8 -0
- package/addon/plugins/roadsign-regulation-plugin/schemas/sign-concept.ts +13 -0
- package/addon/plugins/roadsign-regulation-plugin/schemas/variable.ts +47 -0
- package/addon/plugins/snippet-plugin/commands/insert-snippet.ts +1 -1
- package/addon/plugins/snippet-plugin/nodes/snippet.ts +7 -3
- package/addon/plugins/structure-plugin/commands/insert-structure.ts +36 -0
- package/addon/plugins/structure-plugin/{move-structure.ts → commands/move-structure.ts} +19 -9
- package/addon/plugins/structure-plugin/monads/insert-structure.ts +158 -0
- package/addon/plugins/structure-plugin/monads/recalculate-structure-numbers.ts +54 -0
- package/addon/plugins/structure-plugin/monads/regenerate-rdfa-links.ts +84 -0
- package/addon/plugins/structure-plugin/node.ts +195 -50
- package/addon/plugins/structure-plugin/structure-types.ts +155 -0
- package/addon/plugins/table-of-contents-plugin/nodes/table-of-contents.ts +2 -2
- package/addon/plugins/variable-plugin/actions/create-autofilled-variable.ts +77 -0
- package/addon/plugins/variable-plugin/actions/create-classic-location-variable.ts +78 -0
- package/addon/plugins/variable-plugin/actions/create-codelist-variable.ts +88 -0
- package/addon/plugins/variable-plugin/actions/create-date-variable.ts +80 -0
- package/addon/plugins/variable-plugin/actions/create-number-variable.ts +73 -0
- package/addon/plugins/variable-plugin/actions/create-text-variable.ts +67 -0
- package/addon/plugins/variable-plugin/utils/recreate-variable-uris.ts +5 -29
- package/addon/plugins/variable-plugin/utils/variable-helpers.ts +17 -0
- package/addon/plugins/variable-plugin/variables/address.ts +2 -1
- package/addon/plugins/variable-plugin/variables/autofilled.ts +41 -63
- package/addon/plugins/variable-plugin/variables/codelist.ts +75 -68
- package/addon/plugins/variable-plugin/variables/date.ts +80 -89
- package/addon/plugins/variable-plugin/variables/location.ts +71 -42
- package/addon/plugins/variable-plugin/variables/number.ts +80 -53
- package/addon/plugins/variable-plugin/variables/text.ts +66 -45
- package/addon/utils/_private/find-ancestor.ts +37 -0
- package/addon/utils/_private/find-insertion-range.ts +10 -3
- package/addon/utils/_private/object.ts +8 -0
- package/addon/utils/_private/set.ts +5 -0
- package/addon/utils/constants.ts +5 -0
- package/addon/utils/dom-utils.ts +7 -0
- package/addon/utils/namespace.ts +19 -12
- package/addon/utils/nested-prosemirror.ts +32 -5
- package/addon/utils/option.ts +1 -1
- package/addon/utils/sparql-helpers.ts +11 -1
- package/addon/utils/types.ts +4 -0
- package/app/components/roadsign-regulation-plugin/{measure-template.js → measure-preview.js} +1 -1
- package/app/styles/citaten-plugin.scss +11 -153
- package/app/styles/confidentiality-plugin.scss +23 -26
- package/app/styles/roadsign-regulation-table.scss +3 -0
- package/app/styles/snippet-plugin.scss +1 -5
- package/app/styles/structure-plugin.scss +57 -17
- package/declarations/addon/components/article-structure-plugin/article-structure-card.d.ts +6 -6
- package/declarations/addon/components/article-structure-plugin/structure-card.d.ts +8 -40
- package/declarations/addon/components/auto-resizing-text-area.d.ts +1 -1
- package/declarations/addon/components/decision-plugin/decision-plugin-card.d.ts +1 -0
- package/declarations/addon/components/decision-plugin/insert-article.d.ts +4 -7
- package/declarations/addon/components/hover-tooltip.d.ts +1 -1
- package/declarations/addon/components/pagination/pagination-view.d.ts +14 -2
- package/declarations/addon/components/roadsign-regulation-plugin/expanded-measure.d.ts +20 -13
- package/declarations/addon/components/roadsign-regulation-plugin/measure-preview.d.ts +8 -0
- package/declarations/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.d.ts +6 -6
- package/declarations/addon/components/roadsign-regulation-plugin/roadsigns-modal.d.ts +95 -41
- package/declarations/addon/components/roadsign-regulation-plugin/roadsigns-table.d.ts +11 -9
- package/declarations/addon/components/structure-plugin/_private/structure.d.ts +13 -7
- package/declarations/addon/components/structure-plugin/{_private/control-card.d.ts → control-card.d.ts} +6 -1
- package/declarations/addon/components/template-comments-plugin/edit-card.d.ts +1 -1
- package/declarations/addon/components/variable-plugin/number/insert.d.ts +2 -2
- package/declarations/addon/plugins/article-structure-plugin/structures/index.d.ts +9 -17
- package/declarations/addon/plugins/besluit-topic-plugin/commands/update-besluit-topic-resource.d.ts +2 -2
- package/declarations/addon/plugins/decision-plugin/actions/insert-article.d.ts +13 -0
- package/declarations/addon/plugins/decision-plugin/commands/insert-article-container.d.ts +2 -3
- package/declarations/addon/plugins/decision-plugin/utils/build-article-structure.d.ts +19 -1
- package/declarations/addon/plugins/decision-plugin/utils/get-title-for-decision.d.ts +1 -1
- package/declarations/addon/plugins/roadsign-regulation-plugin/actions/insert-measure.d.ts +17 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/actions/resolve-template.d.ts +12 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/constants.d.ts +29 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/mobility-measure-concept.d.ts +29 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/mobility-template.d.ts +10 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/road-sign-category.d.ts +8 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/sign-codes.d.ts +12 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/sign-concept.d.ts +14 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/queries/variable.d.ts +44 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/mobility-measure-concept.d.ts +72 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/mobility-template.d.ts +12 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/road-sign-category.d.ts +12 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/sign-code.d.ts +12 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/sign-concept.d.ts +33 -0
- package/declarations/addon/plugins/roadsign-regulation-plugin/schemas/variable.d.ts +117 -0
- package/declarations/addon/plugins/snippet-plugin/utils/rdfa-predicate.d.ts +3 -3
- package/declarations/addon/plugins/structure-plugin/commands/insert-structure.d.ts +3 -0
- package/declarations/addon/plugins/structure-plugin/monads/insert-structure.d.ts +7 -0
- package/declarations/addon/plugins/structure-plugin/monads/regenerate-rdfa-links.d.ts +2 -0
- package/declarations/addon/plugins/structure-plugin/node.d.ts +4 -9
- package/declarations/addon/plugins/structure-plugin/structure-types.d.ts +40 -0
- package/declarations/addon/plugins/variable-plugin/actions/create-autofilled-variable.d.ts +24 -0
- package/declarations/addon/plugins/variable-plugin/actions/create-classic-location-variable.d.ts +19 -0
- package/declarations/addon/plugins/variable-plugin/actions/create-codelist-variable.d.ts +22 -0
- package/declarations/addon/plugins/variable-plugin/actions/create-date-variable.d.ts +26 -0
- package/declarations/addon/plugins/variable-plugin/actions/create-number-variable.d.ts +24 -0
- package/declarations/addon/plugins/variable-plugin/actions/create-text-variable.d.ts +18 -0
- package/declarations/addon/plugins/variable-plugin/utils/variable-helpers.d.ts +4 -0
- package/declarations/addon/utils/_private/find-ancestor.d.ts +11 -0
- package/declarations/addon/utils/_private/find-insertion-range.d.ts +2 -2
- package/declarations/addon/utils/_private/object.d.ts +1 -0
- package/declarations/addon/utils/_private/set.d.ts +1 -0
- package/declarations/addon/utils/constants.d.ts +23 -22
- package/declarations/addon/utils/dom-utils.d.ts +1 -0
- package/declarations/addon/utils/namespace.d.ts +6 -6
- package/declarations/addon/utils/nested-prosemirror.d.ts +3 -2
- package/declarations/addon/utils/option.d.ts +1 -1
- package/declarations/addon/utils/sparql-helpers.d.ts +2 -1
- package/declarations/addon/utils/types.d.ts +5 -0
- package/declarations/app/helpers/pagination.d.ts +1 -0
- package/package.json +7 -5
- package/pnpm-lock.yaml +336 -234
- package/translations/en-US.yaml +14 -65
- package/translations/nl-BE.yaml +14 -65
- package/tsconfig.main.json +1 -1
- package/addon/components/article-structure-plugin/article-structure-card.hbs +0 -16
- package/addon/components/article-structure-plugin/article-structure-card.ts +0 -41
- package/addon/components/article-structure-plugin/structure-card.hbs +0 -132
- package/addon/components/article-structure-plugin/structure-card.ts +0 -216
- package/addon/components/roadsign-regulation-plugin/expanded-measure.hbs +0 -80
- package/addon/components/roadsign-regulation-plugin/expanded-measure.ts +0 -50
- package/addon/components/roadsign-regulation-plugin/measure-template.hbs +0 -6
- package/addon/components/roadsign-regulation-plugin/measure-template.ts +0 -33
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.hbs +0 -18
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.hbs +0 -102
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.ts +0 -374
- package/addon/components/roadsign-regulation-plugin/roadsigns-pagination.hbs +0 -47
- package/addon/components/roadsign-regulation-plugin/roadsigns-pagination.ts +0 -64
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.hbs +0 -119
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.ts +0 -34
- package/addon/models/instruction.ts +0 -18
- package/addon/models/measure.ts +0 -38
- package/addon/models/sign.ts +0 -37
- package/addon/plugins/article-structure-plugin/commands/index.ts +0 -7
- package/addon/plugins/article-structure-plugin/commands/insert-structure.ts +0 -138
- package/addon/plugins/article-structure-plugin/commands/move-selected-structure.ts +0 -156
- package/addon/plugins/article-structure-plugin/commands/recalculate-structure-numbers.ts +0 -101
- package/addon/plugins/article-structure-plugin/commands/remove-structure.ts +0 -21
- package/addon/plugins/article-structure-plugin/commands/set-structure-start-number.ts +0 -37
- package/addon/plugins/article-structure-plugin/commands/unwrap-structure.ts +0 -40
- package/addon/plugins/article-structure-plugin/commands/wrap-structure-content.ts +0 -256
- package/addon/plugins/article-structure-plugin/structures/article-paragraph.ts +0 -267
- package/addon/plugins/article-structure-plugin/structures/article.ts +0 -147
- package/addon/plugins/article-structure-plugin/structures/chapter.ts +0 -136
- package/addon/plugins/article-structure-plugin/structures/section.ts +0 -135
- package/addon/plugins/article-structure-plugin/structures/structure-header-number.ts +0 -56
- package/addon/plugins/article-structure-plugin/structures/structure-header-title.ts +0 -38
- package/addon/plugins/article-structure-plugin/structures/structure-header.ts +0 -101
- package/addon/plugins/article-structure-plugin/structures/subsection.ts +0 -130
- package/addon/plugins/article-structure-plugin/structures/title.ts +0 -140
- package/addon/plugins/article-structure-plugin/utils/structure.ts +0 -366
- package/addon/plugins/roadsign-regulation-plugin/utils/constants.ts +0 -8
- package/addon/plugins/roadsign-regulation-plugin/utils/fetchData.ts +0 -95
- package/addon/plugins/roadsign-regulation-plugin/utils/includeInstructions.ts +0 -16
- package/addon/plugins/structure-plugin/recalculate-structure-numbers.ts +0 -36
- package/addon/services/roadsign-registry.ts +0 -295
- package/app/components/roadsign-regulation-plugin/roadsigns-pagination.js +0 -1
- package/app/styles/article-structure-plugin.scss +0 -116
- package/app/styles/document-title-plugin.scss +0 -11
- package/declarations/addon/components/roadsign-regulation-plugin/measure-template.d.ts +0 -14
- package/declarations/addon/components/roadsign-regulation-plugin/roadsigns-pagination.d.ts +0 -21
- package/declarations/addon/models/instruction.d.ts +0 -8
- package/declarations/addon/models/measure.d.ts +0 -14
- package/declarations/addon/models/sign.d.ts +0 -13
- package/declarations/addon/plugins/article-structure-plugin/commands/index.d.ts +0 -7
- package/declarations/addon/plugins/article-structure-plugin/commands/insert-structure.d.ts +0 -5
- package/declarations/addon/plugins/article-structure-plugin/commands/move-selected-structure.d.ts +0 -17
- package/declarations/addon/plugins/article-structure-plugin/commands/recalculate-structure-numbers.d.ts +0 -3
- package/declarations/addon/plugins/article-structure-plugin/commands/remove-structure.d.ts +0 -7
- package/declarations/addon/plugins/article-structure-plugin/commands/set-structure-start-number.d.ts +0 -7
- package/declarations/addon/plugins/article-structure-plugin/commands/unwrap-structure.d.ts +0 -8
- package/declarations/addon/plugins/article-structure-plugin/commands/wrap-structure-content.d.ts +0 -5
- package/declarations/addon/plugins/article-structure-plugin/structures/article-paragraph.d.ts +0 -6
- package/declarations/addon/plugins/article-structure-plugin/structures/article.d.ts +0 -5
- package/declarations/addon/plugins/article-structure-plugin/structures/chapter.d.ts +0 -4
- package/declarations/addon/plugins/article-structure-plugin/structures/section.d.ts +0 -4
- package/declarations/addon/plugins/article-structure-plugin/structures/structure-header-number.d.ts +0 -2
- package/declarations/addon/plugins/article-structure-plugin/structures/structure-header-title.d.ts +0 -2
- package/declarations/addon/plugins/article-structure-plugin/structures/structure-header.d.ts +0 -17
- package/declarations/addon/plugins/article-structure-plugin/structures/subsection.d.ts +0 -4
- package/declarations/addon/plugins/article-structure-plugin/structures/title.d.ts +0 -4
- package/declarations/addon/plugins/article-structure-plugin/utils/structure.d.ts +0 -48
- package/declarations/addon/plugins/decision-plugin/commands/insert-article-command.d.ts +0 -13
- package/declarations/addon/plugins/roadsign-regulation-plugin/utils/constants.d.ts +0 -3
- package/declarations/addon/plugins/roadsign-regulation-plugin/utils/fetchData.d.ts +0 -8
- package/declarations/addon/plugins/roadsign-regulation-plugin/utils/includeInstructions.d.ts +0 -2
- package/declarations/addon/services/roadsign-registry.d.ts +0 -40
- /package/addon/plugins/{article-structure-plugin → structure-plugin}/utils/romanize.ts +0 -0
- /package/declarations/addon/plugins/structure-plugin/{move-structure.d.ts → commands/move-structure.d.ts} +0 -0
- /package/declarations/addon/plugins/structure-plugin/{recalculate-structure-numbers.d.ts → monads/recalculate-structure-numbers.d.ts} +0 -0
- /package/declarations/addon/plugins/{article-structure-plugin → structure-plugin}/utils/romanize.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,146 @@
|
|
|
1
1
|
# @lblod/ember-rdfa-editor-lblod-plugins
|
|
2
2
|
|
|
3
|
+
## 27.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: adjustments to `roadsign-regulation-plugin/roadsigns-table` component
|
|
8
|
+
|
|
9
|
+
- converted to `gts` format
|
|
10
|
+
- component signature changed to:
|
|
11
|
+
```ts
|
|
12
|
+
type Signature = {
|
|
13
|
+
Args: {
|
|
14
|
+
options: RoadsignRegulationPluginOptions;
|
|
15
|
+
content?: MobilityMeasureConcept[];
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
insert: InsertMobilityMeasureTask;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: adjustments to `roadsign-regulation-plugin/roadsigns-modal` component
|
|
23
|
+
|
|
24
|
+
- converted to `gts` format
|
|
25
|
+
- usage of more modern data-fetching practices (using `ember-concurrency` and `reactiveweb`)
|
|
26
|
+
- rewired to use new query functions and `zod` schemas
|
|
27
|
+
- inclusion of search on the content of mobility measure concepts
|
|
28
|
+
|
|
29
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`e07b07b`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/e07b07baa5d1f2da1186059c119a5fd050d8b5b2) Thanks [@elpoelma](https://github.com/elpoelma)! - Rework pagination of `roadsign-regulation` plugin:
|
|
30
|
+
|
|
31
|
+
- Removal of `roadsign-regulation-plugin/roadsigns-pagination` components.
|
|
32
|
+
This component has been replaced by the more generic `pagination/pagination-view` component.
|
|
33
|
+
- Slightly rework the pagination of the `fetchMeasures` task:
|
|
34
|
+
- It accepts an (optional) `pageNumber` instead of a `pageStart` argument
|
|
35
|
+
- It accepts an (optional) `pageSize` argument (default: 10)
|
|
36
|
+
|
|
37
|
+
- [#542](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/542) [`ac240e5`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/ac240e5246e7c1e611718e1ff8804d8a9023a5f4) Thanks [@piemonkey](https://github.com/piemonkey)! - Update to Ember v2 addon version of @lblod/ember-rdfa-editor
|
|
38
|
+
|
|
39
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `variables` plugin: follow new data model defined at https://data.test-vlaanderen.be/doc/applicatieprofiel/besluit-mobiliteit/#Variabele
|
|
40
|
+
Variable types/node-specs included are:
|
|
41
|
+
|
|
42
|
+
- `text_variable`
|
|
43
|
+
- `number`
|
|
44
|
+
- `date`
|
|
45
|
+
- `autofilled`
|
|
46
|
+
- `codelist`
|
|
47
|
+
- `location`
|
|
48
|
+
|
|
49
|
+
Additionally, some internal improvements are added to make maintainability of variables easier.
|
|
50
|
+
Older variable formats are automatically converted to the new format.
|
|
51
|
+
|
|
52
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`8259870`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/8259870261f988183db032f75f347fe0c8856112) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove `insertArticle` prosemirror command in favour of `insertArticle` transaction-monad
|
|
53
|
+
|
|
54
|
+
- [#529](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/529) [`728b90e`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/728b90ee4c49548207935cbbb6d9977cbdd9f5cf) Thanks [@elpoelma](https://github.com/elpoelma)! - Adapt `confidentiality-plugin` SASS stylesheet:
|
|
55
|
+
|
|
56
|
+
- Remove dependency on legacy 'rdfa-annotation' system
|
|
57
|
+
- Introduction of 'say-redacted' class
|
|
58
|
+
|
|
59
|
+
- [#529](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/529) [`1ecae64`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/1ecae645888566e79c805fc67d6a8eb5d0e945d4) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove obsolete/unused `article-structure-plugin` SASS stylesheet
|
|
60
|
+
This obsolete stylesheet was used with the (older) `article-structure-plugin` and relied on the legacy 'rdfa-annotation' system.
|
|
61
|
+
|
|
62
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: adjustments to `roadsign-regulation-plugin/measure-template` component
|
|
63
|
+
|
|
64
|
+
- converted to `gts` format
|
|
65
|
+
- renamed to `roadsign-regulation-plugin/measure-preview`
|
|
66
|
+
- component signature has changed to:
|
|
67
|
+
```ts
|
|
68
|
+
type Args = {
|
|
69
|
+
concept: MobilityMeasureConcept;
|
|
70
|
+
limitText?: boolean;
|
|
71
|
+
};
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: reworked data-fetching logic
|
|
75
|
+
|
|
76
|
+
- removal of obsolete `roadsign-registry` ember service
|
|
77
|
+
- introduction of seperate SPARQL queries to fetch necessary resources/data
|
|
78
|
+
- introduction of [zod](https://zod.dev/) schemas to replace previously used `model` definitions
|
|
79
|
+
- follows new datamodel defined at https://data.test-vlaanderen.be/doc/applicatieprofiel/besluit-mobiliteit/
|
|
80
|
+
|
|
81
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: reworked mobility measure node
|
|
82
|
+
|
|
83
|
+
- `roadsign_regulation` node is no longer used (but still supported for legacy reasons)
|
|
84
|
+
- mobility measure is now represented by generic `block_rdfa` and `inline_rdfa` nodes
|
|
85
|
+
|
|
86
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: adjustments to `roadsign-regulation-plugin/expanded-measure` component
|
|
87
|
+
|
|
88
|
+
- converted to the `gts` format
|
|
89
|
+
- component signature has changed to:
|
|
90
|
+
```ts
|
|
91
|
+
type Signature = {
|
|
92
|
+
Args: {
|
|
93
|
+
concept: MobilityMeasureConcept;
|
|
94
|
+
selectRow: (uri: string) => void;
|
|
95
|
+
insert: InsertMobilityMeasureTask;
|
|
96
|
+
endpoint: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- [#535](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/535) [`8a014cc`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/8a014ccdde85c4797f376f638ff422658f4a1210) Thanks [@piemonkey](https://github.com/piemonkey)! - Update `@lblod/ember-rdfa-editor` peerdependency requirement to `^11.0.0`
|
|
102
|
+
|
|
103
|
+
- [#529](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/529) [`695d57b`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/695d57ba0344e6bc5c4cad2f5f133998003322c0) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove obsolete `document-title-plugin` SASS stylesheet
|
|
104
|
+
This stylesheet relied on the legacy rdfa-annotations system
|
|
105
|
+
|
|
106
|
+
- [#529](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/529) [`aadb6a5`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/aadb6a512aba9ff98cf974fe5160d2374d144915) Thanks [@elpoelma](https://github.com/elpoelma)! - Adapt `snippet-plugin` SASS stylesheet:
|
|
107
|
+
|
|
108
|
+
- Remove dependency on legacy 'rdfa-annotation' system
|
|
109
|
+
|
|
110
|
+
- [#529](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/529) [`75ccd64`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/75ccd64fb0042014d947147dc38f2f2302d001c8) Thanks [@elpoelma](https://github.com/elpoelma)! - Adapt `citation-plugin` SASS stylesheet:
|
|
111
|
+
|
|
112
|
+
- Remove dependency on legacy 'rdfa-annotation' system
|
|
113
|
+
- Introduction of `say-citation-hint` class
|
|
114
|
+
|
|
115
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`d9b41c0`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/d9b41c088a3c8cbc1ba78bd75adb08105b8611bc) Thanks [@elpoelma](https://github.com/elpoelma)! - `roadsign-regulation` plugin: reworked to follow new `mobiliteit` data model defined at https://data.test-vlaanderen.be/doc/applicatieprofiel/besluit-mobiliteit/
|
|
116
|
+
The rework includes:
|
|
117
|
+
- adjustments to data fetching
|
|
118
|
+
- adjustments to mobility measure editor node
|
|
119
|
+
- adjustments to inner workings of the related ember components
|
|
120
|
+
|
|
121
|
+
### Minor Changes
|
|
122
|
+
|
|
123
|
+
- [#535](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/535) [`fec93c3`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/fec93c3f34c09dae564d22a4b9b843c839190458) Thanks [@piemonkey](https://github.com/piemonkey)! - Move article structure plugin to use the structure plugin
|
|
124
|
+
|
|
125
|
+
- [#538](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/538) [`53bec98`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/53bec988d44c6324b2770b748d2f3d35e2f21d1d) Thanks [@piemonkey](https://github.com/piemonkey)! - Migrate use of article-structure-plugin to structure-plugin if that plugin is present (and has higher priority in the list of node specs in the schema).
|
|
126
|
+
|
|
127
|
+
- [#539](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/539) [`b1e8d74`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/b1e8d74f12088bcbb5072f786114fb498fe2e505) Thanks [@piemonkey](https://github.com/piemonkey)! - Remove unused code from article-structure-plugin
|
|
128
|
+
:warning: breaks the functionality of the table-of-contents-plugin
|
|
129
|
+
|
|
130
|
+
- [#539](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/539) [`826b697`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/826b69736e87cab82c9d08860eace57681cb0ab9) Thanks [@piemonkey](https://github.com/piemonkey)! - Move use of article-structure control-card to use the structure-plugin equivalent
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- [#537](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/537) [`1f6b492`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/1f6b492123687269e731af84fa498aa6246b7dc4) Thanks [@piemonkey](https://github.com/piemonkey)! - Include ability to modify start numbers in structure plugin
|
|
135
|
+
|
|
136
|
+
- [#540](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/540) [`5d29b74`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/5d29b7435fb064d2eb9c3bbd69ce93617bbcc2d1) Thanks [@abeforgit](https://github.com/abeforgit)! - Fix history and rendering issues when inserting structures
|
|
137
|
+
|
|
138
|
+
- [#536](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/536) [`63a569a`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/63a569a57b83e8b74ebfb9d31ebfaaf4026adac3) Thanks [@abeforgit](https://github.com/abeforgit)! - Rework the css of the structures to make their behavior more intuitive
|
|
139
|
+
|
|
140
|
+
- [#537](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/537) [`671a822`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/671a8229a88702f3098f5efc005f170ac5557333) Thanks [@piemonkey](https://github.com/piemonkey)! - Add support for moving article structures to generic structure plugin
|
|
141
|
+
|
|
142
|
+
- [#534](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/534) [`be3ea0c`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/be3ea0cd4638918df2dff8912b78cfd28366137d) Thanks [@elpoelma](https://github.com/elpoelma)! - internal: modernize roadsigns-modal component using `trackedFunction`
|
|
143
|
+
|
|
3
144
|
## 26.5.0
|
|
4
145
|
|
|
5
146
|
### Minor Changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { service } from '@ember/service';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { on } from '@ember/modifier';
|
|
6
|
+
import { fn } from '@ember/helper';
|
|
7
|
+
import { not } from 'ember-truth-helpers';
|
|
8
|
+
import AuButton from '@appuniversum/ember-appuniversum/components/au-button';
|
|
9
|
+
import { AddIcon } from '@appuniversum/ember-appuniversum/components/icons/add';
|
|
10
|
+
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
11
|
+
import { insertStructure } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/structure-plugin/commands/insert-structure';
|
|
12
|
+
import {
|
|
13
|
+
structureTypes,
|
|
14
|
+
type StructurePluginOptions,
|
|
15
|
+
type StructureType,
|
|
16
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/structure-plugin/structure-types';
|
|
17
|
+
import { capitalize } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/strings';
|
|
18
|
+
|
|
19
|
+
type Args = {
|
|
20
|
+
controller: SayController;
|
|
21
|
+
options: StructurePluginOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default class EditorPluginsArticleStructureCardComponent extends Component<Args> {
|
|
25
|
+
@service declare intl: IntlService;
|
|
26
|
+
|
|
27
|
+
get controller() {
|
|
28
|
+
return this.args.controller;
|
|
29
|
+
}
|
|
30
|
+
get uriGenerator() {
|
|
31
|
+
return this.args.options.uriGenerator ?? 'uuid4';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
getTranslation = (type: StructureType) =>
|
|
35
|
+
capitalize(
|
|
36
|
+
this.intl.t('structure-plugin.insert', {
|
|
37
|
+
structureName: this.intl
|
|
38
|
+
.t(`structure-plugin.types.${type}`)
|
|
39
|
+
.toLocaleLowerCase(),
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
@action
|
|
44
|
+
insertStructure(type: StructureType) {
|
|
45
|
+
this.args.controller.doCommand(insertStructure(type, this.uriGenerator), {
|
|
46
|
+
view: this.controller.mainEditorView,
|
|
47
|
+
});
|
|
48
|
+
this.args.controller.focus();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
canInsertStructure = (type: StructureType) =>
|
|
52
|
+
this.args.controller.checkCommand(
|
|
53
|
+
insertStructure(type, this.uriGenerator),
|
|
54
|
+
{
|
|
55
|
+
view: this.controller.mainEditorView,
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<div>
|
|
61
|
+
{{#each structureTypes as |structureType|}}
|
|
62
|
+
<li class='au-c-list__item'>
|
|
63
|
+
<AuButton
|
|
64
|
+
@icon={{AddIcon}}
|
|
65
|
+
@iconAlignment='left'
|
|
66
|
+
@skin='link'
|
|
67
|
+
@disabled={{not (this.canInsertStructure structureType)}}
|
|
68
|
+
{{on 'click' (fn this.insertStructure structureType)}}
|
|
69
|
+
>
|
|
70
|
+
{{this.getTranslation structureType}}
|
|
71
|
+
</AuButton>
|
|
72
|
+
</li>
|
|
73
|
+
{{/each}}
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TemplateOnlyComponent } from '@ember/component/template-only';
|
|
2
|
+
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import StructureControlCardComponent from '../structure-plugin/control-card';
|
|
4
|
+
|
|
5
|
+
interface Sig {
|
|
6
|
+
Args: { controller: SayController };
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** @deprecated This has been deprecated in favour of structure-plugin/control-card */
|
|
10
|
+
const EditorPluginsStructureCardComponent: TemplateOnlyComponent<Sig> =
|
|
11
|
+
<template>
|
|
12
|
+
<StructureControlCardComponent @controller={{@controller}} />
|
|
13
|
+
</template>;
|
|
14
|
+
|
|
15
|
+
export default EditorPluginsStructureCardComponent;
|
|
@@ -55,6 +55,10 @@ export default class DecisionPluginCard extends Component<Sig> {
|
|
|
55
55
|
: null;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
get decisionUri(): string | undefined {
|
|
59
|
+
return this.decisionNodeLocation?.node.attrs.subject;
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
@action
|
|
59
63
|
focus() {
|
|
60
64
|
this.controller.focus();
|
|
@@ -141,11 +145,11 @@ export default class DecisionPluginCard extends Component<Sig> {
|
|
|
141
145
|
}
|
|
142
146
|
@action
|
|
143
147
|
insertArticleBlock() {
|
|
144
|
-
if (this.
|
|
148
|
+
if (this.decisionUri) {
|
|
145
149
|
this.controller.doCommand(
|
|
146
150
|
insertArticleContainer({
|
|
147
151
|
intl: this.intl,
|
|
148
|
-
|
|
152
|
+
decisionUri: this.decisionUri,
|
|
149
153
|
articleUriGenerator: this.args.options?.articleUriGenerator,
|
|
150
154
|
}),
|
|
151
155
|
{
|
|
@@ -5,18 +5,18 @@ import Component from '@glimmer/component';
|
|
|
5
5
|
import { AddIcon } from '@appuniversum/ember-appuniversum/components/icons/add';
|
|
6
6
|
import { PNode, SayController } from '@lblod/ember-rdfa-editor';
|
|
7
7
|
import { getCurrentBesluitRange } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-topic-plugin/utils/helpers';
|
|
8
|
-
import insertArticle from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/decision-plugin/commands/insert-article-command';
|
|
9
8
|
import { buildArticleStructure } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/decision-plugin/utils/build-article-structure';
|
|
10
9
|
import { not } from 'ember-truth-helpers';
|
|
11
10
|
import { service } from '@ember/service';
|
|
12
11
|
import IntlService from 'ember-intl/services/intl';
|
|
12
|
+
import { insertArticle } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/decision-plugin/actions/insert-article';
|
|
13
|
+
import { StructurePluginOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/structure-plugin/structure-types';
|
|
13
14
|
|
|
14
|
-
export
|
|
15
|
-
uriGenerator?: () => string;
|
|
15
|
+
export type InsertArticleOptions = StructurePluginOptions & {
|
|
16
16
|
insertFreely?: boolean;
|
|
17
17
|
/** Pass a decision URI instead of finding one in the document. Implies `insertFreely`. */
|
|
18
18
|
decisionUri?: string;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
interface Sig {
|
|
21
21
|
Args: {
|
|
22
22
|
controller: SayController;
|
|
@@ -24,6 +24,7 @@ interface Sig {
|
|
|
24
24
|
options?: InsertArticleOptions;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
+
|
|
27
28
|
export default class InsertArticleComponent extends Component<Sig> {
|
|
28
29
|
@service declare intl: IntlService;
|
|
29
30
|
|
|
@@ -47,10 +48,8 @@ export default class InsertArticleComponent extends Component<Sig> {
|
|
|
47
48
|
return getCurrentBesluitRange(this.controller);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
get
|
|
51
|
-
return this.decisionRange
|
|
52
|
-
? { pos: this.decisionRange.from, node: this.decisionRange.node }
|
|
53
|
-
: null;
|
|
51
|
+
get decisionUri(): string | undefined {
|
|
52
|
+
return this.decisionRange?.node.attrs.subject;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
get canInsertFreely() {
|
|
@@ -66,16 +65,17 @@ export default class InsertArticleComponent extends Component<Sig> {
|
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
get canInsertInDecision() {
|
|
69
|
-
if (!this.
|
|
68
|
+
if (!this.decisionUri) {
|
|
70
69
|
return false;
|
|
71
70
|
}
|
|
72
71
|
const article = buildArticleStructure(
|
|
73
72
|
this.schema,
|
|
74
73
|
this.args.options?.uriGenerator,
|
|
75
74
|
);
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
return insertArticle({
|
|
76
|
+
node: article,
|
|
77
|
+
decisionUri: this.decisionUri,
|
|
78
|
+
})(this.controller.mainEditorState).result;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
@action
|
|
@@ -94,25 +94,32 @@ export default class InsertArticleComponent extends Component<Sig> {
|
|
|
94
94
|
|
|
95
95
|
@action
|
|
96
96
|
insertFreely(node: PNode) {
|
|
97
|
-
this.controller.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
this.controller.withTransaction(
|
|
98
|
+
() => {
|
|
99
|
+
return insertArticle({
|
|
100
|
+
node,
|
|
101
|
+
insertFreely: true,
|
|
102
|
+
})(this.controller.mainEditorState).transaction;
|
|
103
|
+
},
|
|
104
|
+
{ view: this.controller.mainEditorView },
|
|
102
105
|
);
|
|
103
106
|
this.controller.focus();
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
@action
|
|
107
110
|
insertInDecision(node: PNode) {
|
|
108
|
-
|
|
111
|
+
const { decisionUri } = this;
|
|
112
|
+
if (!decisionUri) {
|
|
109
113
|
return;
|
|
110
114
|
}
|
|
111
|
-
this.controller.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
this.controller.withTransaction(
|
|
116
|
+
() => {
|
|
117
|
+
return insertArticle({
|
|
118
|
+
node,
|
|
119
|
+
decisionUri,
|
|
120
|
+
})(this.controller.mainEditorState).transaction;
|
|
121
|
+
},
|
|
122
|
+
{ view: this.controller.mainEditorView },
|
|
116
123
|
);
|
|
117
124
|
this.controller.focus();
|
|
118
125
|
}
|
|
@@ -2,10 +2,10 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
3
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
4
4
|
import { tracked } from 'tracked-built-ins';
|
|
5
|
-
import { basicSetup
|
|
5
|
+
import { basicSetup } from 'codemirror';
|
|
6
6
|
import { EditorState } from '@codemirror/state';
|
|
7
7
|
import { html } from '@codemirror/lang-html';
|
|
8
|
-
import { tooltips } from '@codemirror/view';
|
|
8
|
+
import { EditorView, tooltips } from '@codemirror/view';
|
|
9
9
|
import { HtmlPlusIcon } from '@appuniversum/ember-appuniversum/components/icons/html-plus';
|
|
10
10
|
|
|
11
11
|
import { insertGenericRdfa } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/generic-rdfa-variable/commands/insert-generic-rdfa';
|
|
@@ -4,8 +4,20 @@ import AuToolbar from '@appuniversum/ember-appuniversum/components/au-toolbar';
|
|
|
4
4
|
import AuButton from '@appuniversum/ember-appuniversum/components/au-button';
|
|
5
5
|
import { NavLeftIcon } from '@appuniversum/ember-appuniversum/components/icons/nav-left';
|
|
6
6
|
import { NavRightIcon } from '@appuniversum/ember-appuniversum/components/icons/nav-right';
|
|
7
|
+
import { TOC } from '@ember/component/template-only';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
type Signature = {
|
|
10
|
+
Args: {
|
|
11
|
+
rangeStart: number;
|
|
12
|
+
rangeEnd: number;
|
|
13
|
+
totalCount: number;
|
|
14
|
+
isFirstPage: boolean;
|
|
15
|
+
isLastPage: boolean;
|
|
16
|
+
onPreviousPage: () => void;
|
|
17
|
+
onNextPage: () => void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const PaginationView: TOC<Signature> = <template>
|
|
9
21
|
<div class='au-u-background-gray-100'>
|
|
10
22
|
<AuToolbar @border='top' @size='large' @nowrap={{true}}>
|
|
11
23
|
<div class='au-c-pagination'>
|
|
@@ -13,36 +25,29 @@ import { NavRightIcon } from '@appuniversum/ember-appuniversum/components/icons/
|
|
|
13
25
|
<span class='au-u-hidden-visually'>
|
|
14
26
|
{{t 'pagination.results'}}</span>
|
|
15
27
|
<strong>
|
|
16
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
17
28
|
{{@rangeStart}}
|
|
18
29
|
-
|
|
19
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
20
30
|
{{@rangeEnd}}
|
|
21
31
|
</strong>
|
|
22
32
|
{{t 'pagination.of'}}
|
|
23
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
24
33
|
{{@totalCount}}
|
|
25
34
|
</p>
|
|
26
35
|
<div class='au-u-flex'>
|
|
27
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
28
36
|
{{#unless @isFirstPage}}
|
|
29
37
|
<AuButton
|
|
30
38
|
@skin='link'
|
|
31
39
|
@icon={{NavLeftIcon}}
|
|
32
40
|
@iconAlignment='left'
|
|
33
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
34
41
|
{{on 'click' @onPreviousPage}}
|
|
35
42
|
>
|
|
36
43
|
{{t 'pagination.previous'}}
|
|
37
44
|
</AuButton>
|
|
38
45
|
{{/unless}}
|
|
39
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
40
46
|
{{#unless @isLastPage}}
|
|
41
47
|
<AuButton
|
|
42
48
|
@skin='link'
|
|
43
49
|
@icon={{NavRightIcon}}
|
|
44
50
|
@iconAlignment='right'
|
|
45
|
-
{{! @glint-expect-error: not typesafe yet }}
|
|
46
51
|
{{on 'click' @onNextPage}}
|
|
47
52
|
>
|
|
48
53
|
{{t 'pagination.next'}}
|
|
@@ -52,4 +57,6 @@ import { NavRightIcon } from '@appuniversum/ember-appuniversum/components/icons/
|
|
|
52
57
|
</div>
|
|
53
58
|
</AuToolbar>
|
|
54
59
|
</div>
|
|
55
|
-
</template
|
|
60
|
+
</template>;
|
|
61
|
+
|
|
62
|
+
export default PaginationView;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import AuHeading from '@appuniversum/ember-appuniversum/components/au-heading';
|
|
2
|
+
import AuPill from '@appuniversum/ember-appuniversum/components/au-pill';
|
|
3
|
+
import Component from '@glimmer/component';
|
|
4
|
+
import { tracked } from '@glimmer/tracking';
|
|
5
|
+
import t from 'ember-intl/helpers/t';
|
|
6
|
+
import MeasurePreview from './measure-preview';
|
|
7
|
+
import AuRadioGroup from '@appuniversum/ember-appuniversum/components/au-radio-group';
|
|
8
|
+
import AuButtonGroup from '@appuniversum/ember-appuniversum/components/au-button-group';
|
|
9
|
+
import AuButton from '@appuniversum/ember-appuniversum/components/au-button';
|
|
10
|
+
import { MobilityMeasureConcept } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/schemas/mobility-measure-concept';
|
|
11
|
+
import { action } from '@ember/object';
|
|
12
|
+
import { on } from '@ember/modifier';
|
|
13
|
+
import { ZONALITY_OPTIONS } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/constants';
|
|
14
|
+
import { Task } from 'ember-concurrency';
|
|
15
|
+
|
|
16
|
+
export type InsertMobilityMeasureTask = Task<
|
|
17
|
+
void,
|
|
18
|
+
[
|
|
19
|
+
MobilityMeasureConcept,
|
|
20
|
+
typeof ZONALITY_OPTIONS.ZONAL | typeof ZONALITY_OPTIONS.NON_ZONAL,
|
|
21
|
+
boolean,
|
|
22
|
+
]
|
|
23
|
+
>;
|
|
24
|
+
type Signature = {
|
|
25
|
+
Args: {
|
|
26
|
+
concept: MobilityMeasureConcept;
|
|
27
|
+
selectRow: (uri: string) => void;
|
|
28
|
+
insert: InsertMobilityMeasureTask;
|
|
29
|
+
endpoint: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default class ExpandedMeasure extends Component<Signature> {
|
|
34
|
+
@tracked zonalityValue?:
|
|
35
|
+
| typeof ZONALITY_OPTIONS.ZONAL
|
|
36
|
+
| typeof ZONALITY_OPTIONS.NON_ZONAL;
|
|
37
|
+
@tracked temporalValue?: boolean;
|
|
38
|
+
|
|
39
|
+
get isPotentiallyZonal() {
|
|
40
|
+
return this.args.concept.zonality === ZONALITY_OPTIONS.POTENTIALLY_ZONAL;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get insertButtonDisabled() {
|
|
44
|
+
return this.isPotentiallyZonal && !this.zonalityValue;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@action
|
|
48
|
+
changeZonality(
|
|
49
|
+
zonality: typeof ZONALITY_OPTIONS.ZONAL | typeof ZONALITY_OPTIONS.NON_ZONAL,
|
|
50
|
+
) {
|
|
51
|
+
this.zonalityValue = zonality;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@action
|
|
55
|
+
changeTemporality(temporality: 'true' | 'false') {
|
|
56
|
+
this.temporalValue = temporality === 'true';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@action
|
|
60
|
+
insert() {
|
|
61
|
+
this.args.insert.perform(
|
|
62
|
+
this.args.concept,
|
|
63
|
+
(this.zonalityValue ?? this.args.concept.zonality) as
|
|
64
|
+
| typeof ZONALITY_OPTIONS.ZONAL
|
|
65
|
+
| typeof ZONALITY_OPTIONS.NON_ZONAL,
|
|
66
|
+
this.temporalValue ?? false,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@action
|
|
71
|
+
unselectRow() {
|
|
72
|
+
this.args.selectRow(this.args.concept.uri);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
<template>
|
|
76
|
+
<tr class='au-c-data-table__detail'>
|
|
77
|
+
<td colspan='5' class='au-o-flow au-o-flow--small'>
|
|
78
|
+
<AuHeading @level='6' @skin='6'>
|
|
79
|
+
{{t
|
|
80
|
+
'editor-plugins.roadsign-regulation.expanded-measure.insert-measure'
|
|
81
|
+
}}
|
|
82
|
+
</AuHeading>
|
|
83
|
+
<p>
|
|
84
|
+
<AuPill>
|
|
85
|
+
<MeasurePreview @concept={{@concept}} />
|
|
86
|
+
</AuPill>
|
|
87
|
+
</p>
|
|
88
|
+
{{#if this.isPotentiallyZonal}}
|
|
89
|
+
<AuHeading @level='6' @skin='6'>
|
|
90
|
+
{{t
|
|
91
|
+
'editor-plugins.roadsign-regulation.expanded-measure.select-zonality.label'
|
|
92
|
+
}}
|
|
93
|
+
</AuHeading>
|
|
94
|
+
<div class='au-c-form'>
|
|
95
|
+
<AuRadioGroup
|
|
96
|
+
@name='zonal'
|
|
97
|
+
@selected={{this.zonalityValue}}
|
|
98
|
+
@onChange={{this.changeZonality}}
|
|
99
|
+
as |Group|
|
|
100
|
+
>
|
|
101
|
+
<Group.Radio @value={{ZONALITY_OPTIONS.ZONAL}}>
|
|
102
|
+
{{t
|
|
103
|
+
'editor-plugins.roadsign-regulation.expanded-measure.select-zonality.zonal'
|
|
104
|
+
}}
|
|
105
|
+
</Group.Radio>
|
|
106
|
+
<Group.Radio @value={{ZONALITY_OPTIONS.NON_ZONAL}}>
|
|
107
|
+
{{t
|
|
108
|
+
'editor-plugins.roadsign-regulation.expanded-measure.select-zonality.non-zonal'
|
|
109
|
+
}}
|
|
110
|
+
</Group.Radio>
|
|
111
|
+
</AuRadioGroup>
|
|
112
|
+
</div>
|
|
113
|
+
{{/if}}
|
|
114
|
+
{{#if @concept.variableSignage}}
|
|
115
|
+
<AuHeading @level='6' @skin='6'>
|
|
116
|
+
{{t
|
|
117
|
+
'editor-plugins.roadsign-regulation.expanded-measure.varying-signalisation.label'
|
|
118
|
+
}}
|
|
119
|
+
</AuHeading>
|
|
120
|
+
<div class='au-c-form'>
|
|
121
|
+
<AuRadioGroup
|
|
122
|
+
@name='temporal'
|
|
123
|
+
@selected={{this.temporalValue}}
|
|
124
|
+
@onChange={{this.changeTemporality}}
|
|
125
|
+
as |Group|
|
|
126
|
+
>
|
|
127
|
+
<Group.Radio @value='true'>
|
|
128
|
+
{{t
|
|
129
|
+
'editor-plugins.roadsign-regulation.expanded-measure.varying-signalisation.varying'
|
|
130
|
+
}}
|
|
131
|
+
</Group.Radio>
|
|
132
|
+
<Group.Radio @value='false'>
|
|
133
|
+
{{t
|
|
134
|
+
'editor-plugins.roadsign-regulation.expanded-measure.varying-signalisation.non-varying'
|
|
135
|
+
}}
|
|
136
|
+
</Group.Radio>
|
|
137
|
+
</AuRadioGroup>
|
|
138
|
+
</div>
|
|
139
|
+
{{/if}}
|
|
140
|
+
<AuButtonGroup>
|
|
141
|
+
<AuButton
|
|
142
|
+
{{on 'click' this.insert}}
|
|
143
|
+
@loading={{@insert.isRunning}}
|
|
144
|
+
@loadingMessage={{t 'common.loading'}}
|
|
145
|
+
@disabled={{this.insertButtonDisabled}}
|
|
146
|
+
>
|
|
147
|
+
{{t 'editor-plugins.utils.insert'}}
|
|
148
|
+
</AuButton>
|
|
149
|
+
<AuButton @skin='secondary' {{on 'click' this.unselectRow}}>
|
|
150
|
+
{{t 'editor-plugins.utils.cancel'}}
|
|
151
|
+
</AuButton>
|
|
152
|
+
</AuButtonGroup>
|
|
153
|
+
</td>
|
|
154
|
+
</tr>
|
|
155
|
+
</template>
|
|
156
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import limitText from '@lblod/ember-rdfa-editor-lblod-plugins/helpers/limit-text';
|
|
2
|
+
import { TOC } from '@ember/component/template-only';
|
|
3
|
+
import { MobilityMeasureConcept } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/schemas/mobility-measure-concept';
|
|
4
|
+
|
|
5
|
+
type Args = {
|
|
6
|
+
concept: MobilityMeasureConcept;
|
|
7
|
+
limitText?: boolean;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const MeasurePreview: TOC<Args> = <template>
|
|
11
|
+
{{#if @limitText}}
|
|
12
|
+
{{limitText @concept.preview}}
|
|
13
|
+
{{else}}
|
|
14
|
+
{{@concept.preview}}
|
|
15
|
+
{{/if}}
|
|
16
|
+
</template>;
|
|
17
|
+
|
|
18
|
+
export default MeasurePreview;
|