@lblod/ember-rdfa-editor-lblod-plugins 0.4.1 → 1.0.0-alpha.2
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 +46 -0
- package/addon/components/article-structure-plugin/article-structure-card.hbs +10 -0
- package/addon/components/article-structure-plugin/article-structure-card.ts +33 -0
- package/addon/components/article-structure-plugin/structure-card.hbs +46 -0
- package/addon/components/article-structure-plugin/structure-card.ts +124 -0
- package/addon/components/au-native-input.hbs +30 -0
- package/addon/components/au-native-input.ts +47 -0
- package/addon/components/besluit-plugin/besluit-context-card.hbs +44 -0
- package/addon/components/besluit-plugin/besluit-context-card.ts +138 -0
- package/addon/components/besluit-plugin/besluit-plugin-card.hbs +20 -0
- package/addon/components/besluit-plugin/besluit-plugin-card.ts +40 -0
- package/addon/components/besluit-type-plugin/{besluit-type-select.js → besluit-type-select.ts} +8 -4
- package/addon/components/besluit-type-plugin/toolbar-dropdown.hbs +2 -0
- package/addon/components/besluit-type-plugin/toolbar-dropdown.ts +218 -0
- package/addon/components/citation-plugin/citation-card.hbs +118 -0
- package/addon/components/citation-plugin/citation-card.ts +230 -0
- package/addon/components/citation-plugin/citation-insert.hbs +20 -0
- package/addon/components/citation-plugin/citation-insert.ts +102 -0
- package/addon/components/{citaten-plugin → citation-plugin}/citations/article-list.hbs +2 -2
- package/addon/components/{citaten-plugin → citation-plugin}/citations/article-preview.hbs +0 -0
- package/addon/components/{citaten-plugin → citation-plugin}/citations/decision-detail.hbs +9 -6
- package/addon/components/{citaten-plugin/citations/decision-detail.js → citation-plugin/citations/decision-detail.ts} +30 -31
- package/addon/components/{citaten-plugin → citation-plugin}/citations/decision-list.hbs +2 -2
- package/addon/components/{citaten-plugin → citation-plugin}/citations/decision-preview.hbs +0 -0
- package/addon/components/citation-plugin/citations/search-modal.hbs +254 -0
- package/addon/components/{citaten-plugin/citations/search-modal.js → citation-plugin/citations/search-modal.ts} +117 -90
- package/addon/components/{citaten-plugin → citation-plugin}/helpers/alert-load-error.hbs +0 -0
- package/addon/components/{citaten-plugin → citation-plugin}/helpers/alert-no-items.hbs +0 -0
- package/addon/components/import-snippet-plugin/card.ts +119 -0
- package/addon/components/insert-variable-plugin/insert-variable-card.hbs +2 -1
- package/addon/components/insert-variable-plugin/insert-variable-card.ts +134 -0
- package/addon/components/rdfa-date-plugin/{rdfa-date-plugin-card.hbs → card.hbs} +3 -1
- package/addon/components/rdfa-date-plugin/card.ts +72 -0
- package/addon/components/rdfa-date-plugin/{rdfa-date-time-picker.hbs → date-time-picker.hbs} +0 -0
- package/addon/components/rdfa-date-plugin/{rdfa-date-time-picker.js → date-time-picker.ts} +26 -12
- package/addon/components/rdfa-date-plugin/{rdfa-date-plugin-insert.hbs → insert.hbs} +0 -0
- package/addon/components/rdfa-date-plugin/insert.ts +45 -0
- package/addon/components/roadsign-regulation-plugin/expanded-measure.ts +58 -0
- package/addon/components/roadsign-regulation-plugin/measure-template.ts +35 -0
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.hbs +2 -2
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.ts +60 -0
- package/addon/components/roadsign-regulation-plugin/{roadsigns-modal.js → roadsigns-modal.ts} +103 -66
- package/addon/components/roadsign-regulation-plugin/{roadsigns-pagination.js → roadsigns-pagination.ts} +7 -3
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.ts +32 -0
- package/addon/components/standard-template-plugin/{template-card.hbs → card.hbs} +0 -0
- package/addon/components/standard-template-plugin/card.ts +11 -0
- package/addon/components/standard-template-plugin/template-provider.hbs +3 -1
- package/addon/components/standard-template-plugin/template-provider.ts +75 -0
- package/addon/components/table-of-contents-plugin/card.hbs +12 -1
- package/addon/components/table-of-contents-plugin/card.ts +60 -0
- package/addon/components/table-of-contents-plugin/{inline-components → ember-nodes}/outline.hbs +2 -2
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.hbs +9 -0
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.ts +95 -0
- package/addon/components/template-variable-plugin/template-variable-card.hbs +2 -1
- package/addon/components/template-variable-plugin/template-variable-card.ts +227 -0
- package/addon/helpers/{limit-text.js → limit-text.ts} +2 -2
- package/addon/models/instruction.ts +18 -0
- package/addon/models/measure.ts +38 -0
- package/addon/models/sign.ts +36 -0
- package/addon/models/template.ts +14 -0
- package/addon/plugins/article-structure-plugin/commands/index.ts +6 -0
- package/addon/plugins/article-structure-plugin/commands/insert-structure.ts +80 -0
- package/addon/plugins/article-structure-plugin/commands/move-selected-structure.ts +130 -0
- package/addon/plugins/article-structure-plugin/commands/recalculate-structure-numbers.ts +26 -0
- package/addon/plugins/article-structure-plugin/commands/remove-structure.ts +21 -0
- package/addon/plugins/article-structure-plugin/commands/unwrap-structure.ts +40 -0
- package/addon/plugins/article-structure-plugin/commands/wrap-structure-content.ts +66 -0
- package/addon/plugins/article-structure-plugin/constants.ts +11 -0
- package/addon/plugins/article-structure-plugin/index.ts +70 -0
- package/addon/plugins/article-structure-plugin/structures/article-paragraph.ts +94 -0
- package/addon/plugins/article-structure-plugin/structures/article.ts +129 -0
- package/addon/plugins/article-structure-plugin/structures/chapter.ts +83 -0
- package/addon/plugins/article-structure-plugin/structures/index.ts +33 -0
- package/addon/plugins/article-structure-plugin/structures/section.ts +82 -0
- package/addon/plugins/article-structure-plugin/structures/structure-header.ts +65 -0
- package/addon/plugins/article-structure-plugin/structures/subsection.ts +83 -0
- package/addon/plugins/article-structure-plugin/structures/title.ts +83 -0
- package/addon/plugins/article-structure-plugin/utils/namespace.ts +25 -0
- package/addon/plugins/article-structure-plugin/utils/structure.ts +162 -0
- package/addon/plugins/besluit-plugin/commands/get-article-nodes-for-besluit.ts +30 -0
- package/addon/plugins/besluit-plugin/commands/index.ts +4 -0
- package/addon/plugins/besluit-plugin/commands/insert-article.ts +70 -0
- package/addon/plugins/besluit-plugin/commands/insert-title.ts +67 -0
- package/addon/plugins/besluit-plugin/commands/move-article.ts +69 -0
- package/addon/plugins/besluit-plugin/commands/recalculate-article-numbers.ts +44 -0
- package/addon/plugins/besluit-plugin/index.ts +11 -0
- package/addon/plugins/besluit-plugin/utils/get-title-for-decision.ts +35 -0
- package/addon/plugins/besluit-type-plugin/index.ts +6 -0
- package/addon/{utils/fetchBesluitTypes.js → plugins/besluit-type-plugin/utils/fetchBesluitTypes.ts} +35 -16
- package/addon/plugins/citation-plugin/index.ts +216 -0
- package/addon/plugins/citation-plugin/marks/citation.ts +27 -0
- package/addon/plugins/citation-plugin/utils/cited-text.ts +17 -0
- package/addon/{utils/legislation-types.js → plugins/citation-plugin/utils/legislation-types.ts} +17 -3
- package/addon/plugins/citation-plugin/utils/process-match.ts +132 -0
- package/addon/{utils/vlaamse-codex.js → plugins/citation-plugin/utils/vlaamse-codex.ts} +160 -41
- package/addon/plugins/import-snippet-plugin.ts +6 -0
- package/addon/plugins/insert-variable-plugin/index.ts +11 -0
- package/addon/{utils/variable-plugins/default-variable-types.js → plugins/insert-variable-plugin/utils/constants.ts} +18 -7
- package/addon/plugins/insert-variable-plugin/utils/fetch-data.ts +41 -0
- package/addon/plugins/rdfa-date-plugin/commands/index.ts +1 -0
- package/addon/plugins/rdfa-date-plugin/commands/modify-date.ts +48 -0
- package/addon/plugins/rdfa-date-plugin/index.ts +11 -0
- package/addon/plugins/roadsign-regulation-plugin/index.ts +6 -0
- package/addon/plugins/roadsign-regulation-plugin/utils/constants.ts +8 -0
- package/addon/{utils/roadsign-regulation-plugin/fetchData.js → plugins/roadsign-regulation-plugin/utils/fetchData.ts} +20 -3
- package/addon/plugins/roadsign-regulation-plugin/utils/includeInstructions.ts +16 -0
- package/addon/plugins/standard-template-plugin/index.ts +6 -0
- package/addon/plugins/standard-template-plugin/utils/instantiate-uuids.ts +48 -0
- package/addon/plugins/table-of-contents-plugin/index.ts +14 -0
- package/addon/plugins/table-of-contents-plugin/nodes/index.ts +1 -0
- package/addon/plugins/table-of-contents-plugin/nodes/table-of-contents.ts +53 -0
- package/addon/plugins/table-of-contents-plugin/utils/constants.ts +17 -0
- package/addon/plugins/template-variable-plugin/index.ts +6 -0
- package/addon/plugins/template-variable-plugin/utils/constants.ts +2 -0
- package/addon/plugins/template-variable-plugin/utils/fetch-data.ts +62 -0
- package/addon/services/{import-rdfa-snippet.js → import-rdfa-snippet.ts} +48 -36
- package/addon/services/roadsign-registry.ts +288 -0
- package/addon/services/{standard-template-plugin.js → standard-template-plugin.ts} +17 -11
- package/addon/utils/memoize.ts +8 -0
- package/addon/utils/option.ts +58 -0
- package/addon/utils/sparql-helpers.ts +27 -0
- package/app/components/article-structure-plugin/article-structure-card.js +1 -0
- package/app/components/article-structure-plugin/structure-card.js +1 -0
- package/app/components/{citaten-plugin/citaat-card.js → au-native-input.js} +1 -1
- package/app/components/{citaten-plugin/citations/article-list.js → besluit-plugin/besluit-context-card.js} +1 -1
- package/app/components/besluit-plugin/besluit-plugin-card.js +1 -0
- package/app/components/{citaten-plugin/citations/modal.js → citation-plugin/citation-card.js} +1 -1
- package/app/components/citation-plugin/citation-insert.js +1 -0
- package/app/components/{citaten-plugin/citations/decision-list.js → citation-plugin/citations/article-list.js} +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/citations/article-preview.js +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/citations/decision-detail.js +1 -1
- package/app/components/citation-plugin/citations/decision-list.js +1 -0
- package/app/components/{citaten-plugin → citation-plugin}/citations/decision-preview.js +1 -1
- package/app/components/citation-plugin/citations/modal.js +1 -0
- package/app/components/{citaten-plugin → citation-plugin}/citations/search-modal.js +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/helpers/alert-load-error.js +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/helpers/alert-no-items.js +1 -1
- package/app/components/{citaten-plugin/citaat-insert.js → rdfa-date-plugin/card.js} +1 -1
- package/app/components/rdfa-date-plugin/date-time-picker.js +1 -0
- package/app/components/rdfa-date-plugin/insert.js +1 -0
- package/app/components/standard-template-plugin/card.js +1 -0
- package/app/components/table-of-contents-plugin/ember-nodes/outline.js +1 -0
- package/app/components/table-of-contents-plugin/ember-nodes/table-of-contents.js +1 -0
- package/app/styles/citaten-plugin.scss +1 -1
- package/components/article-structure-plugin/article-structure-card.d.ts +17 -0
- package/components/article-structure-plugin/structure-card.d.ts +32 -0
- package/components/au-native-input.d.ts +20 -0
- package/components/besluit-plugin/besluit-context-card.d.ts +24 -0
- package/components/besluit-plugin/besluit-plugin-card.d.ts +14 -0
- package/components/besluit-type-plugin/besluit-type-select.d.ts +11 -0
- package/components/besluit-type-plugin/toolbar-dropdown.d.ts +46 -0
- package/components/citation-plugin/citation-card.d.ts +51 -0
- package/components/citation-plugin/citation-insert.d.ts +24 -0
- package/components/citation-plugin/citations/decision-detail.d.ts +26 -0
- package/components/citation-plugin/citations/search-modal.d.ts +67 -0
- package/components/import-snippet-plugin/card.d.ts +19 -0
- package/components/insert-variable-plugin/insert-variable-card.d.ts +31 -0
- package/components/rdfa-date-plugin/card.d.ts +20 -0
- package/components/rdfa-date-plugin/date-time-picker.d.ts +32 -0
- package/components/rdfa-date-plugin/insert.d.ts +12 -0
- package/components/roadsign-regulation-plugin/expanded-measure.d.ts +20 -0
- package/components/roadsign-regulation-plugin/measure-template.d.ts +14 -0
- package/components/roadsign-regulation-plugin/roadsign-regulation-card.d.ts +12 -0
- package/components/roadsign-regulation-plugin/roadsigns-modal.d.ts +57 -0
- package/components/roadsign-regulation-plugin/roadsigns-pagination.d.ts +19 -0
- package/components/roadsign-regulation-plugin/roadsigns-table.d.ts +9 -0
- package/components/standard-template-plugin/card.d.ts +9 -0
- package/components/standard-template-plugin/template-provider.d.ts +17 -0
- package/components/table-of-contents-plugin/card.d.ts +20 -0
- package/components/table-of-contents-plugin/ember-nodes/table-of-contents.d.ts +22 -0
- package/components/template-variable-plugin/template-variable-card.d.ts +27 -0
- package/helpers/limit-text.d.ts +8 -0
- package/index.js +5 -0
- package/models/instruction.d.ts +8 -0
- package/models/measure.d.ts +14 -0
- package/models/sign.d.ts +12 -0
- package/models/template.d.ts +13 -0
- package/package.json +29 -8
- package/plugins/article-structure-plugin/commands/index.d.ts +6 -0
- package/plugins/article-structure-plugin/commands/insert-structure.d.ts +5 -0
- package/plugins/article-structure-plugin/commands/move-selected-structure.d.ts +10 -0
- package/plugins/article-structure-plugin/commands/recalculate-structure-numbers.d.ts +3 -0
- package/plugins/article-structure-plugin/commands/remove-structure.d.ts +7 -0
- package/plugins/article-structure-plugin/commands/unwrap-structure.d.ts +8 -0
- package/plugins/article-structure-plugin/commands/wrap-structure-content.d.ts +8 -0
- package/plugins/article-structure-plugin/constants.d.ts +5 -0
- package/plugins/article-structure-plugin/index.d.ts +41 -0
- package/plugins/article-structure-plugin/structures/article-paragraph.d.ts +4 -0
- package/plugins/article-structure-plugin/structures/article.d.ts +6 -0
- package/plugins/article-structure-plugin/structures/chapter.d.ts +4 -0
- package/plugins/article-structure-plugin/structures/index.d.ts +17 -0
- package/plugins/article-structure-plugin/structures/section.d.ts +4 -0
- package/plugins/article-structure-plugin/structures/structure-header.d.ts +2 -0
- package/plugins/article-structure-plugin/structures/subsection.d.ts +4 -0
- package/plugins/article-structure-plugin/structures/title.d.ts +4 -0
- package/plugins/article-structure-plugin/utils/namespace.d.ts +6 -0
- package/plugins/article-structure-plugin/utils/structure.d.ts +20 -0
- package/plugins/besluit-plugin/commands/get-article-nodes-for-besluit.d.ts +5 -0
- package/plugins/besluit-plugin/commands/index.d.ts +4 -0
- package/plugins/besluit-plugin/commands/insert-article.d.ts +3 -0
- package/plugins/besluit-plugin/commands/insert-title.d.ts +2 -0
- package/plugins/besluit-plugin/commands/move-article.d.ts +2 -0
- package/plugins/besluit-plugin/commands/recalculate-article-numbers.d.ts +2 -0
- package/plugins/besluit-plugin/index.d.ts +3 -0
- package/plugins/besluit-plugin/utils/get-title-for-decision.d.ts +10 -0
- package/plugins/besluit-type-plugin/index.d.ts +2 -0
- package/plugins/besluit-type-plugin/utils/fetchBesluitTypes.d.ts +12 -0
- package/plugins/citation-plugin/index.d.ts +31 -0
- package/plugins/citation-plugin/marks/citation.d.ts +2 -0
- package/plugins/citation-plugin/utils/cited-text.d.ts +3 -0
- package/plugins/citation-plugin/utils/legislation-types.d.ts +24 -0
- package/plugins/citation-plugin/utils/process-match.d.ts +23 -0
- package/plugins/citation-plugin/utils/vlaamse-codex.d.ts +56 -0
- package/plugins/import-snippet-plugin.d.ts +2 -0
- package/plugins/insert-variable-plugin/index.d.ts +2 -0
- package/plugins/insert-variable-plugin/utils/constants.d.ts +7 -0
- package/plugins/insert-variable-plugin/utils/fetch-data.d.ts +5 -0
- package/plugins/rdfa-date-plugin/commands/index.d.ts +1 -0
- package/plugins/rdfa-date-plugin/commands/modify-date.d.ts +2 -0
- package/plugins/rdfa-date-plugin/index.d.ts +3 -0
- package/plugins/roadsign-regulation-plugin/index.d.ts +2 -0
- package/plugins/roadsign-regulation-plugin/utils/constants.d.ts +3 -0
- package/plugins/roadsign-regulation-plugin/utils/fetchData.d.ts +8 -0
- package/plugins/roadsign-regulation-plugin/utils/includeInstructions.d.ts +2 -0
- package/plugins/standard-template-plugin/index.d.ts +2 -0
- package/plugins/standard-template-plugin/utils/instantiate-uuids.d.ts +15 -0
- package/plugins/table-of-contents-plugin/index.d.ts +3 -0
- package/plugins/table-of-contents-plugin/nodes/index.d.ts +1 -0
- package/plugins/table-of-contents-plugin/nodes/table-of-contents.d.ts +4 -0
- package/plugins/table-of-contents-plugin/utils/constants.d.ts +7 -0
- package/plugins/template-variable-plugin/index.d.ts +2 -0
- package/plugins/template-variable-plugin/utils/constants.d.ts +1 -0
- package/plugins/template-variable-plugin/utils/fetch-data.d.ts +9 -0
- package/services/import-rdfa-snippet.d.ts +99 -0
- package/services/roadsign-registry.d.ts +42 -0
- package/services/standard-template-plugin.d.ts +21 -0
- package/translations/en-US.yaml +64 -1
- package/translations/nl-BE.yaml +66 -3
- package/tsconfig.json +34 -9
- package/types/config/environment.d.ts +22 -0
- package/types/ember-mu-transform-helpers/transforms/string-set.d.ts +14 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/account.d.ts +10 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid-classificatie-code.d.ts +10 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid.d.ts +12 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/gebruiker-model.d.ts +18 -0
- package/types/lblod/frontend-gelinkt-notuleren/services/current-session.d.ts +30 -0
- package/types/lblod/marawa/dom-helpers.d.ts +4 -0
- package/types/lblod/marawa/ember-object-mock.d.ts +3 -0
- package/types/lblod/marawa/node-walker.d.ts +18 -0
- package/types/lblod/marawa/range-helpers.d.ts +10 -0
- package/types/lblod/marawa/rdfa-attributes.d.ts +25 -0
- package/types/lblod/marawa/rdfa-block.d.ts +22 -0
- package/types/lblod/marawa/rdfa-context-scanner.d.ts +13 -0
- package/types/lblod/marawa/rdfa-helpers.d.ts +22 -0
- package/types/lblod/marawa/rich-node.d.ts +50 -0
- package/types/lblod/marawa/triple.d.ts +16 -0
- package/utils/memoize.d.ts +1 -0
- package/utils/option.d.ts +14 -0
- package/utils/sparql-helpers.d.ts +7 -0
- package/addon/commands/generate-template-command.js +0 -35
- package/addon/commands/insert-and-collapse.js +0 -32
- package/addon/commands/modify-date-command.js +0 -42
- package/addon/components/besluit-type-plugin/toolbar-dropdown.js +0 -188
- package/addon/components/citaten-plugin/citaat-card.hbs +0 -76
- package/addon/components/citaten-plugin/citaat-card.js +0 -286
- package/addon/components/citaten-plugin/citaat-insert.hbs +0 -20
- package/addon/components/citaten-plugin/citaat-insert.js +0 -68
- package/addon/components/citaten-plugin/citations/search-modal.hbs +0 -175
- package/addon/components/import-snippet-plugin/card.js +0 -95
- package/addon/components/insert-variable-plugin/insert-variable-card.js +0 -125
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-card.js +0 -71
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +0 -24
- package/addon/components/roadsign-regulation-plugin/expanded-measure.js +0 -38
- package/addon/components/roadsign-regulation-plugin/measure-template.js +0 -30
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.js +0 -101
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.js +0 -24
- package/addon/components/standard-template-plugin/template-card.js +0 -7
- package/addon/components/standard-template-plugin/template-provider.js +0 -75
- package/addon/components/table-of-contents-plugin/card.js +0 -53
- package/addon/components/table-of-contents-plugin/inline-components/table-of-contents.hbs +0 -9
- package/addon/components/table-of-contents-plugin/inline-components/table-of-contents.js +0 -100
- package/addon/components/template-variable-plugin/template-variable-card.js +0 -230
- package/addon/constants.js +0 -24
- package/addon/initializers/plugin-initializer.js +0 -75
- package/addon/inline-components/table-of-contents.js +0 -43
- package/addon/marks/citaten-mark.js +0 -32
- package/addon/models/instruction.js +0 -19
- package/addon/models/measure.js +0 -46
- package/addon/models/sign.js +0 -37
- package/addon/models/template.js +0 -9
- package/addon/plugins/besluit-type-plugin.js +0 -16
- package/addon/plugins/citaten-plugin.js +0 -22
- package/addon/plugins/generate-template-plugin.js +0 -16
- package/addon/plugins/import-snippet-plugin.js +0 -16
- package/addon/plugins/insert-variable-plugin.js +0 -19
- package/addon/plugins/rdfa-date-plugin.js +0 -26
- package/addon/plugins/roadsign-regulation-plugin.js +0 -24
- package/addon/plugins/standard-template-plugin.js +0 -33
- package/addon/plugins/table-of-contents-plugin.js +0 -27
- package/addon/plugins/template-variable-plugin.js +0 -21
- package/addon/services/roadsign-registry.js +0 -240
- package/addon/utils/generate-template-plugin/default-resources.js +0 -9
- package/addon/utils/instantiate-uuids.js +0 -34
- package/addon/utils/memoize.js +0 -8
- package/addon/utils/processMatch.js +0 -80
- package/addon/utils/roadsign-regulation-plugin/includeInstructions.js +0 -10
- package/addon/utils/variable-plugins/fetch-data.js +0 -98
- package/app/components/rdfa-date-plugin/rdfa-date-plugin-card.js +0 -1
- package/app/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +0 -1
- package/app/components/rdfa-date-plugin/rdfa-date-time-picker.js +0 -1
- package/app/components/standard-template-plugin/template-card.js +0 -1
- package/app/components/table-of-contents-plugin/inline-components/outline.js +0 -1
- package/app/components/table-of-contents-plugin/inline-components/table-of-contents.js +0 -1
- package/app/initializers/plugin-initializer.js +0 -4
- package/types/dummy/index.d.ts +0 -1
- package/types/ember-data/types/registries/model.d.ts +0 -6
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { action } from '@ember/object';
|
|
4
|
-
import { getOwner } from '@ember/application';
|
|
5
|
-
import { task } from 'ember-concurrency';
|
|
6
|
-
|
|
7
|
-
import { fetchCodeListOptions } from '../../utils/variable-plugins/fetch-data';
|
|
8
|
-
import { MULTI_SELECT_CODELIST_TYPE, ZONAL_URI } from '../../constants';
|
|
9
|
-
|
|
10
|
-
export default class EditorPluginsTemplateVariableCardComponent extends Component {
|
|
11
|
-
@tracked variableOptions = [];
|
|
12
|
-
@tracked selectedVariable;
|
|
13
|
-
@tracked showCard = false;
|
|
14
|
-
@tracked multiSelect = false;
|
|
15
|
-
mappingUri;
|
|
16
|
-
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
const config = getOwner(this).resolveRegistration('config:environment');
|
|
20
|
-
this.zonalLocationCodelistUri =
|
|
21
|
-
config.templateVariablePlugin.zonalLocationCodelistUri;
|
|
22
|
-
this.endpoint = config.templateVariablePlugin.endpoint;
|
|
23
|
-
this.nonZonalLocationCodelistUri =
|
|
24
|
-
config.templateVariablePlugin.nonZonalLocationCodelistUri;
|
|
25
|
-
this.args.controller.onEvent('selectionChanged', this.selectionChanged);
|
|
26
|
-
this.liveHighlights = this.args.controller.createLiveMarkSet({
|
|
27
|
-
datastoreQuery: (datastore) => {
|
|
28
|
-
const limitedDataset = datastore.transformDataset(
|
|
29
|
-
(dataset, termconverter) => {
|
|
30
|
-
const mappings = dataset.match(
|
|
31
|
-
null,
|
|
32
|
-
termconverter('a'),
|
|
33
|
-
termconverter('ext:Mapping')
|
|
34
|
-
);
|
|
35
|
-
const locations = dataset.match(
|
|
36
|
-
null,
|
|
37
|
-
termconverter('>http://purl.org/dc/terms/type'),
|
|
38
|
-
termconverter('@en-US"location')
|
|
39
|
-
);
|
|
40
|
-
const codelists = dataset.match(
|
|
41
|
-
null,
|
|
42
|
-
termconverter('>http://purl.org/dc/terms/type'),
|
|
43
|
-
termconverter('@en-US"codelist')
|
|
44
|
-
);
|
|
45
|
-
const supportedMappings = locations.union(codelists);
|
|
46
|
-
return mappings.filter(
|
|
47
|
-
(quad) => supportedMappings.match(quad.subject).size !== 0
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
const matches = limitedDataset.searchTextIn(
|
|
52
|
-
'subject',
|
|
53
|
-
new RegExp('.*')
|
|
54
|
-
);
|
|
55
|
-
return matches;
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
liveMarkSpecs: ['highlighted'],
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@action
|
|
63
|
-
insert() {
|
|
64
|
-
const selectedRange = this.args.controller.selection.lastRange;
|
|
65
|
-
if (!selectedRange) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const limitedDatastore = this.args.controller.datastore.limitToRange(
|
|
69
|
-
selectedRange,
|
|
70
|
-
'rangeIsInside'
|
|
71
|
-
);
|
|
72
|
-
const mapping = limitedDatastore
|
|
73
|
-
.match(`>${this.mappingUri}`, 'ext:content', null)
|
|
74
|
-
.asSubjectNodes()
|
|
75
|
-
.next().value;
|
|
76
|
-
const mappingNode = [...mapping.nodes][0];
|
|
77
|
-
let mappingContentNode;
|
|
78
|
-
for (let child of mappingNode.children) {
|
|
79
|
-
if (child.attributeMap.get('property') === 'ext:content') {
|
|
80
|
-
mappingContentNode = child;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
let textToInsert = '';
|
|
85
|
-
if (this.selectedVariable.length) {
|
|
86
|
-
textToInsert = this.selectedVariable
|
|
87
|
-
.map((variable) => variable.value)
|
|
88
|
-
.join(', ');
|
|
89
|
-
} else {
|
|
90
|
-
textToInsert = this.selectedVariable.value;
|
|
91
|
-
}
|
|
92
|
-
textToInsert = this.wrapVariableInHighlight(textToInsert);
|
|
93
|
-
this.args.controller.executeCommand(
|
|
94
|
-
'insert-and-collapse',
|
|
95
|
-
this.args.controller,
|
|
96
|
-
textToInsert,
|
|
97
|
-
mappingContentNode
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
wrapVariableInHighlight(text) {
|
|
102
|
-
return text.replace(
|
|
103
|
-
/\$\{(.+?)\}/g,
|
|
104
|
-
'<span class="mark-highlight-manual">${$1}</span>'
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@action
|
|
109
|
-
selectionChanged() {
|
|
110
|
-
this.showCard = false;
|
|
111
|
-
this.selectedVariable = undefined;
|
|
112
|
-
const selectedRange = this.args.controller.selection.lastRange;
|
|
113
|
-
if (!selectedRange) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
const fullDatastore = this.args.controller.datastore;
|
|
117
|
-
const limitedDatastore = this.args.controller.datastore.limitToRange(
|
|
118
|
-
selectedRange,
|
|
119
|
-
'rangeIsInside'
|
|
120
|
-
);
|
|
121
|
-
const mapping = limitedDatastore
|
|
122
|
-
.match(null, 'a', 'ext:Mapping')
|
|
123
|
-
.asQuads()
|
|
124
|
-
.next().value;
|
|
125
|
-
console.log('MAPPING: ', mapping);
|
|
126
|
-
if (mapping) {
|
|
127
|
-
const mappingUri = mapping.subject.value;
|
|
128
|
-
this.mappingUri = mappingUri;
|
|
129
|
-
const mappingTypeTriple = fullDatastore
|
|
130
|
-
.match(`>${mappingUri}`, 'dct:type', null)
|
|
131
|
-
.asQuads()
|
|
132
|
-
.next().value;
|
|
133
|
-
console.log('TRIPLE: ', mappingTypeTriple);
|
|
134
|
-
if (mappingTypeTriple) {
|
|
135
|
-
const mappingType = mappingTypeTriple.object.value;
|
|
136
|
-
if (mappingType === 'codelist') {
|
|
137
|
-
const codelistTriple = fullDatastore
|
|
138
|
-
.match(`>${mappingUri}`, 'ext:codelist', null)
|
|
139
|
-
.asQuads()
|
|
140
|
-
.next().value;
|
|
141
|
-
const codelistSource = this.getCodelistSource(
|
|
142
|
-
fullDatastore,
|
|
143
|
-
mappingUri
|
|
144
|
-
);
|
|
145
|
-
this.showCard = true;
|
|
146
|
-
const codelistUri = codelistTriple.object.value;
|
|
147
|
-
this.fetchCodeListOptions.perform(codelistSource, codelistUri);
|
|
148
|
-
} else if (mappingType === 'location') {
|
|
149
|
-
const codelistSource = this.getCodelistSource(
|
|
150
|
-
fullDatastore,
|
|
151
|
-
mappingUri
|
|
152
|
-
);
|
|
153
|
-
const measureTriple = limitedDatastore
|
|
154
|
-
.match(
|
|
155
|
-
null,
|
|
156
|
-
'a',
|
|
157
|
-
'>https://data.vlaanderen.be/ns/mobiliteit#Mobiliteitsmaatregel'
|
|
158
|
-
)
|
|
159
|
-
.asQuads()
|
|
160
|
-
.next().value;
|
|
161
|
-
const measureUri = measureTriple.subject.value;
|
|
162
|
-
const zonalityTriple = fullDatastore
|
|
163
|
-
.match(`>${measureUri}`, 'ext:zonality', null)
|
|
164
|
-
.asQuads()
|
|
165
|
-
.next().value;
|
|
166
|
-
const zonalityUri = zonalityTriple.object.value;
|
|
167
|
-
if (zonalityUri === ZONAL_URI) {
|
|
168
|
-
this.fetchCodeListOptions.perform(
|
|
169
|
-
codelistSource,
|
|
170
|
-
this.zonalLocationCodelistUri,
|
|
171
|
-
true
|
|
172
|
-
);
|
|
173
|
-
} else {
|
|
174
|
-
this.fetchCodeListOptions.perform(
|
|
175
|
-
codelistSource,
|
|
176
|
-
this.nonZonalLocationCodelistUri,
|
|
177
|
-
true
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
this.showCard = true;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
getCodelistSource(fullDatastore, mappingUri) {
|
|
187
|
-
const codelistSourceTriple = fullDatastore
|
|
188
|
-
.match(`>${mappingUri}`, 'dct:source', null)
|
|
189
|
-
.asQuads()
|
|
190
|
-
.next();
|
|
191
|
-
|
|
192
|
-
if (codelistSourceTriple && codelistSourceTriple.value) {
|
|
193
|
-
const codelistSourceTripleValue = codelistSourceTriple.value;
|
|
194
|
-
return codelistSourceTripleValue.object.value;
|
|
195
|
-
} else {
|
|
196
|
-
return this.endpoint;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@action
|
|
201
|
-
updateVariable(variable) {
|
|
202
|
-
this.selectedVariable = variable;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
@task
|
|
206
|
-
*fetchCodeListOptions(endpoint, codelistUri, isLocation) {
|
|
207
|
-
const { type, options } = yield fetchCodeListOptions(endpoint, codelistUri);
|
|
208
|
-
if (isLocation) {
|
|
209
|
-
this.variableOptions = options.map((option) => ({
|
|
210
|
-
label: option.label,
|
|
211
|
-
value: this.wrapInLocation(option.value),
|
|
212
|
-
}));
|
|
213
|
-
} else {
|
|
214
|
-
this.variableOptions = options;
|
|
215
|
-
}
|
|
216
|
-
if (type === MULTI_SELECT_CODELIST_TYPE) {
|
|
217
|
-
this.multiSelect = true;
|
|
218
|
-
} else {
|
|
219
|
-
this.multiSelect = false;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
wrapInLocation(value) {
|
|
224
|
-
return `
|
|
225
|
-
<span property="https://data.vlaanderen.be/ns/mobiliteit#plaatsbepaling">
|
|
226
|
-
${value}
|
|
227
|
-
</span>
|
|
228
|
-
`;
|
|
229
|
-
}
|
|
230
|
-
}
|
package/addon/constants.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export const TABLE_OF_CONTENTS_DEFAULT_CONFIG = [
|
|
2
|
-
{
|
|
3
|
-
sectionPredicate: 'https://say.data.gift/ns/hasPart',
|
|
4
|
-
value: {
|
|
5
|
-
predicate: 'https://say.data.gift/ns/heading',
|
|
6
|
-
},
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
sectionPredicate: 'https://say.data.gift/ns/hasParagraph',
|
|
10
|
-
value: '§',
|
|
11
|
-
},
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
export const ZONAL_URI =
|
|
15
|
-
'http://lblod.data.gift/concepts/c81c6b96-736a-48cf-b003-6f5cc3dbc55d';
|
|
16
|
-
|
|
17
|
-
export const POTENTIALLY_ZONAL_URI =
|
|
18
|
-
'http://lblod.data.gift/concepts/8f9367b2-c717-4be7-8833-4c75bbb4ae1f';
|
|
19
|
-
|
|
20
|
-
export const NON_ZONAL_URI =
|
|
21
|
-
'http://lblod.data.gift/concepts/b651931b-923c-477c-8da9-fc7dd841fdcc';
|
|
22
|
-
|
|
23
|
-
export const MULTI_SELECT_CODELIST_TYPE =
|
|
24
|
-
'http://lblod.data.gift/concepts/57C93E12-A02C-4D4B-8B95-666B6701286C';
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import BesluitTypePlugin from '../plugins/besluit-type-plugin';
|
|
2
|
-
import CitatenPlugin from '../plugins/citaten-plugin';
|
|
3
|
-
import StandardTemplatePlugin from '../plugins/standard-template-plugin';
|
|
4
|
-
import GenerateTemplatePlugin from '../plugins/generate-template-plugin';
|
|
5
|
-
import RoadSignRegulationPlugin from '../plugins/roadsign-regulation-plugin';
|
|
6
|
-
import TableOfContentsPlugin from '../plugins/table-of-contents-plugin';
|
|
7
|
-
import RdfaDatePlugin from '../plugins/rdfa-date-plugin';
|
|
8
|
-
import ImportSnippetPlugin from '../plugins/import-snippet-plugin';
|
|
9
|
-
import TemplateVariablePlugin from '../plugins/template-variable-plugin';
|
|
10
|
-
import InsertVariablePlugin from '../plugins/insert-variable-plugin';
|
|
11
|
-
|
|
12
|
-
function pluginFactory(plugin) {
|
|
13
|
-
return {
|
|
14
|
-
create: (initializers) => {
|
|
15
|
-
const pluginInstance = new plugin();
|
|
16
|
-
Object.assign(pluginInstance, initializers);
|
|
17
|
-
return pluginInstance;
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function initialize(application) {
|
|
23
|
-
application.register('plugin:citaten', pluginFactory(CitatenPlugin), {
|
|
24
|
-
singleton: false,
|
|
25
|
-
});
|
|
26
|
-
application.register(
|
|
27
|
-
'plugin:standard-template',
|
|
28
|
-
pluginFactory(StandardTemplatePlugin),
|
|
29
|
-
{ singleton: false }
|
|
30
|
-
);
|
|
31
|
-
application.register(
|
|
32
|
-
'plugin:besluit-type',
|
|
33
|
-
pluginFactory(BesluitTypePlugin),
|
|
34
|
-
{ singleton: false }
|
|
35
|
-
);
|
|
36
|
-
application.register(
|
|
37
|
-
'plugin:table-of-contents',
|
|
38
|
-
pluginFactory(TableOfContentsPlugin),
|
|
39
|
-
{ singleton: false }
|
|
40
|
-
);
|
|
41
|
-
application.register(
|
|
42
|
-
'plugin:generate-template',
|
|
43
|
-
pluginFactory(GenerateTemplatePlugin),
|
|
44
|
-
{ singleton: false }
|
|
45
|
-
);
|
|
46
|
-
application.register(
|
|
47
|
-
'plugin:roadsign-regulation',
|
|
48
|
-
pluginFactory(RoadSignRegulationPlugin),
|
|
49
|
-
{ singleton: false }
|
|
50
|
-
);
|
|
51
|
-
application.register('plugin:rdfa-date', pluginFactory(RdfaDatePlugin), {
|
|
52
|
-
singleton: false,
|
|
53
|
-
});
|
|
54
|
-
application.register(
|
|
55
|
-
'plugin:import-snippet',
|
|
56
|
-
pluginFactory(ImportSnippetPlugin),
|
|
57
|
-
{
|
|
58
|
-
singleton: false,
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
application.register(
|
|
62
|
-
'plugin:template-variable',
|
|
63
|
-
pluginFactory(TemplateVariablePlugin),
|
|
64
|
-
{ singleton: false }
|
|
65
|
-
);
|
|
66
|
-
application.register(
|
|
67
|
-
'plugin:insert-variable',
|
|
68
|
-
pluginFactory(InsertVariablePlugin),
|
|
69
|
-
{ singleton: false }
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default {
|
|
74
|
-
initialize,
|
|
75
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { InlineComponentSpec } from '@lblod/ember-rdfa-editor/model/inline-components/model-inline-component';
|
|
2
|
-
import { isElement } from '@lblod/ember-rdfa-editor/utils/dom-helpers';
|
|
3
|
-
import { TABLE_OF_CONTENTS_DEFAULT_CONFIG } from '../constants';
|
|
4
|
-
export default class TableOfContentsSpec extends InlineComponentSpec {
|
|
5
|
-
matcher = {
|
|
6
|
-
tag: this.tag,
|
|
7
|
-
attributeBuilder: (node) => {
|
|
8
|
-
if (isElement(node)) {
|
|
9
|
-
if (
|
|
10
|
-
(node.classList.contains('inline-component') &&
|
|
11
|
-
(node.classList.contains(this.name) ||
|
|
12
|
-
node.classList.contains(
|
|
13
|
-
'inline-components/table-of-contents'
|
|
14
|
-
))) ||
|
|
15
|
-
node.dataset.inlineComponent === this.name ||
|
|
16
|
-
node.dataset.inlineComponent === 'inline-components/table-of-contents'
|
|
17
|
-
) {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
properties = {
|
|
26
|
-
config: {
|
|
27
|
-
serializable: true,
|
|
28
|
-
defaultValue: TABLE_OF_CONTENTS_DEFAULT_CONFIG,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
_renderStatic() {
|
|
33
|
-
// TODO: should be implemented when static version of inline components work correctly
|
|
34
|
-
return '';
|
|
35
|
-
}
|
|
36
|
-
constructor(controller) {
|
|
37
|
-
super(
|
|
38
|
-
'table-of-contents-plugin/inline-components/table-of-contents',
|
|
39
|
-
'div',
|
|
40
|
-
controller
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const citatenMarkSpec = {
|
|
2
|
-
matchers: [
|
|
3
|
-
{
|
|
4
|
-
tag: 'span',
|
|
5
|
-
attributeBuilder: (node) => {
|
|
6
|
-
if (
|
|
7
|
-
node.dataset &&
|
|
8
|
-
Object.prototype.hasOwnProperty.call(node.dataset, 'citatenText')
|
|
9
|
-
) {
|
|
10
|
-
return {
|
|
11
|
-
text: node.dataset.citatenText,
|
|
12
|
-
legislationTypeUri: node.dataset.legislationTypeUri,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
name: 'citaten',
|
|
19
|
-
priority: 100,
|
|
20
|
-
renderSpec(mark) {
|
|
21
|
-
return {
|
|
22
|
-
tag: 'span',
|
|
23
|
-
attributes: {
|
|
24
|
-
'data-citaten-text': mark.attributes.text,
|
|
25
|
-
'data-legislation-type-uri': mark.attributes.legislationTypeUri,
|
|
26
|
-
},
|
|
27
|
-
children: [0],
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default citatenMarkSpec;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default class Instruction {
|
|
2
|
-
name;
|
|
3
|
-
template;
|
|
4
|
-
annotatedTemplate;
|
|
5
|
-
|
|
6
|
-
static fromBinding(binding) {
|
|
7
|
-
return new Instruction(
|
|
8
|
-
binding.name.value,
|
|
9
|
-
binding.template.value,
|
|
10
|
-
binding.annotatedTemplate.value
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
constructor(name, template, annotatedTemplate) {
|
|
15
|
-
this.name = name;
|
|
16
|
-
this.template = template;
|
|
17
|
-
this.annotatedTemplate = annotatedTemplate;
|
|
18
|
-
}
|
|
19
|
-
}
|
package/addon/models/measure.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { tracked } from '@glimmer/tracking';
|
|
2
|
-
|
|
3
|
-
export default class Measure {
|
|
4
|
-
label;
|
|
5
|
-
@tracked signs = [];
|
|
6
|
-
template;
|
|
7
|
-
classifications = new Set();
|
|
8
|
-
annotatedTemplate;
|
|
9
|
-
zonality;
|
|
10
|
-
temporal;
|
|
11
|
-
|
|
12
|
-
static fromBinding(binding) {
|
|
13
|
-
const uri = binding.uri.value;
|
|
14
|
-
const label = binding.label.value;
|
|
15
|
-
const template = binding.basicTemplate.value;
|
|
16
|
-
const temporal = binding.temporal ? binding.temporal.value : false;
|
|
17
|
-
const annotatedTemplate = binding.annotatedTemplate.value;
|
|
18
|
-
const zonality = binding.zonality.value;
|
|
19
|
-
return new Measure(
|
|
20
|
-
uri,
|
|
21
|
-
label,
|
|
22
|
-
template,
|
|
23
|
-
annotatedTemplate,
|
|
24
|
-
zonality,
|
|
25
|
-
temporal
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
constructor(
|
|
30
|
-
uri,
|
|
31
|
-
label,
|
|
32
|
-
template,
|
|
33
|
-
annotatedTemplate,
|
|
34
|
-
zonality,
|
|
35
|
-
temporal,
|
|
36
|
-
signs = null
|
|
37
|
-
) {
|
|
38
|
-
this.label = label;
|
|
39
|
-
this.uri = uri;
|
|
40
|
-
this.template = template;
|
|
41
|
-
this.zonality = zonality;
|
|
42
|
-
this.annotatedTemplate = annotatedTemplate;
|
|
43
|
-
this.signs = signs;
|
|
44
|
-
this.temporal = temporal;
|
|
45
|
-
}
|
|
46
|
-
}
|
package/addon/models/sign.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export default class Sign {
|
|
2
|
-
code;
|
|
3
|
-
image;
|
|
4
|
-
classifications = [];
|
|
5
|
-
uri;
|
|
6
|
-
order;
|
|
7
|
-
zonality;
|
|
8
|
-
static fromBinding(binding) {
|
|
9
|
-
const code = binding.code.value;
|
|
10
|
-
const image = Sign.processImage(binding.image.value, binding.imageBaseUrl);
|
|
11
|
-
|
|
12
|
-
const uri = binding.uri.value;
|
|
13
|
-
const order = binding.order.value;
|
|
14
|
-
const classifications = binding.classifications
|
|
15
|
-
? binding.classifications.value.split('|')
|
|
16
|
-
: [];
|
|
17
|
-
const zonality = binding.zonality.value;
|
|
18
|
-
return new Sign(code, image, classifications, uri, order, zonality);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
constructor(code, image, classifications, uri, order, zonality) {
|
|
22
|
-
this.code = code;
|
|
23
|
-
this.image = image;
|
|
24
|
-
this.classifications = classifications;
|
|
25
|
-
this.uri = uri;
|
|
26
|
-
this.order = order;
|
|
27
|
-
this.zonality = zonality;
|
|
28
|
-
}
|
|
29
|
-
static processImage(url, imageBaseUrl) {
|
|
30
|
-
const isAbsoluteRegex = new RegExp('^(?:[a-z]+:)?//', 'i');
|
|
31
|
-
if (isAbsoluteRegex.test(url)) {
|
|
32
|
-
return url;
|
|
33
|
-
} else {
|
|
34
|
-
return `${imageBaseUrl}${url}`;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
package/addon/models/template.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import Model, { attr } from '@ember-data/model';
|
|
2
|
-
|
|
3
|
-
export default class TemplateModel extends Model {
|
|
4
|
-
@attr title;
|
|
5
|
-
@attr('string-set', { defaultValue: () => [] }) matches;
|
|
6
|
-
@attr body;
|
|
7
|
-
@attr('string-set', { defaultValue: () => [] }) contexts;
|
|
8
|
-
@attr('string-set', { defaultValue: () => [] }) disabledInContexts;
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default class BesluitTypePlugin {
|
|
2
|
-
controller;
|
|
3
|
-
|
|
4
|
-
get name() {
|
|
5
|
-
return 'besluit-type-plugin';
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
initialize(controller) {
|
|
9
|
-
this.controller = controller;
|
|
10
|
-
controller.registerWidget({
|
|
11
|
-
componentName: 'besluit-type-plugin/toolbar-dropdown',
|
|
12
|
-
identifier: 'besluit-type-plugin/dropdown',
|
|
13
|
-
desiredLocation: 'toolbar',
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import CitatenMark from '../marks/citaten-mark';
|
|
2
|
-
export default class CitatenPlugin {
|
|
3
|
-
controller;
|
|
4
|
-
|
|
5
|
-
get name() {
|
|
6
|
-
return 'citaten-plugin';
|
|
7
|
-
}
|
|
8
|
-
async initialize(controller) {
|
|
9
|
-
this.controller = controller;
|
|
10
|
-
controller.registerWidget({
|
|
11
|
-
desiredLocation: 'sidebar',
|
|
12
|
-
componentName: 'citaten-plugin/citaat-card',
|
|
13
|
-
identifier: 'citaten-plugin/citaat-card',
|
|
14
|
-
});
|
|
15
|
-
controller.registerWidget({
|
|
16
|
-
desiredLocation: 'insertSidebar',
|
|
17
|
-
componentName: 'citaten-plugin/citaat-insert',
|
|
18
|
-
identifier: 'citaten-plugin/citaat-insert',
|
|
19
|
-
});
|
|
20
|
-
controller.registerMark(CitatenMark);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import GenerateTemplateCommand from '../commands/generate-template-command';
|
|
2
|
-
|
|
3
|
-
export default class GenerateTemplatePlugin {
|
|
4
|
-
controller;
|
|
5
|
-
|
|
6
|
-
get name() {
|
|
7
|
-
return 'generate-template-plugin';
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
initialize(controller) {
|
|
11
|
-
this.controller = controller;
|
|
12
|
-
controller.registerCommand(
|
|
13
|
-
new GenerateTemplateCommand(controller._rawEditor._model)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default class ImportSnippetPlugin {
|
|
2
|
-
controller;
|
|
3
|
-
|
|
4
|
-
get name() {
|
|
5
|
-
return 'import-snippet-plugin';
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
initialize(controller) {
|
|
9
|
-
this.controller = controller;
|
|
10
|
-
controller.registerWidget({
|
|
11
|
-
componentName: 'import-snippet-plugin/card',
|
|
12
|
-
identifier: 'import-snippet-plugin/card',
|
|
13
|
-
desiredLocation: 'sidebar',
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default class InsertVariablePlugin {
|
|
2
|
-
controller;
|
|
3
|
-
|
|
4
|
-
get name() {
|
|
5
|
-
return 'insert-variable-plugin';
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
initialize(controller, options) {
|
|
9
|
-
this.controller = controller;
|
|
10
|
-
controller.registerWidget({
|
|
11
|
-
componentName: 'insert-variable-plugin/insert-variable-card',
|
|
12
|
-
identifier: 'insert-variable-plugin/card',
|
|
13
|
-
desiredLocation: 'sidebar',
|
|
14
|
-
widgetArgs: {
|
|
15
|
-
options: options,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import ModifyDateCommand from '../commands/modify-date-command';
|
|
2
|
-
|
|
3
|
-
export default class RdfaDatePlugin {
|
|
4
|
-
controller;
|
|
5
|
-
|
|
6
|
-
get name() {
|
|
7
|
-
return 'rdfa-date-plugin';
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
initialize(controller) {
|
|
11
|
-
this.controller = controller;
|
|
12
|
-
controller.registerWidget({
|
|
13
|
-
componentName: 'rdfa-date-plugin/rdfa-date-plugin-card',
|
|
14
|
-
identifier: 'rdfa-date-plugin/card',
|
|
15
|
-
desiredLocation: 'sidebar',
|
|
16
|
-
});
|
|
17
|
-
controller.registerWidget({
|
|
18
|
-
componentName: 'rdfa-date-plugin/rdfa-date-plugin-insert',
|
|
19
|
-
identifier: 'rdfa-date-plugin/insert',
|
|
20
|
-
desiredLocation: 'insertSidebar',
|
|
21
|
-
});
|
|
22
|
-
controller.registerCommand(
|
|
23
|
-
new ModifyDateCommand(controller._rawEditor._model)
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entrypoint for the roadsign regulation plugin.
|
|
3
|
-
*/
|
|
4
|
-
export default class RoadSignRegulationPlugin {
|
|
5
|
-
controller;
|
|
6
|
-
|
|
7
|
-
get name() {
|
|
8
|
-
return 'roadsign-regulation-plugin';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Gets called when the editor loads.
|
|
13
|
-
* Can optionally be async if needed.
|
|
14
|
-
* @param controller
|
|
15
|
-
*/
|
|
16
|
-
initialize(controller) {
|
|
17
|
-
this.controller = controller;
|
|
18
|
-
controller.registerWidget({
|
|
19
|
-
componentName: 'roadsign-regulation-plugin/roadsign-regulation-card',
|
|
20
|
-
identifier: 'roadsign-regulation-plugin/roadsign-regulation-card',
|
|
21
|
-
desiredLocation: 'insertSidebar',
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|