@lblod/ember-rdfa-editor-lblod-plugins 16.3.0 → 17.0.0-dev.f473cdfb5868261b49cdae52ea2558970c082d01
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/.changeset/afraid-tips-visit.md +5 -0
- package/.changeset/chilly-ravens-think.md +6 -0
- package/.changeset/hot-owls-laugh.md +5 -0
- package/.changeset/olive-pets-cheer.md +5 -0
- package/.changeset/smooth-fireants-doubt.md +5 -0
- package/.changeset/tall-carrots-ring.md +5 -0
- package/.changeset/wet-baboons-serve.md +5 -0
- package/.changeset/witty-suns-speak.md +5 -0
- package/.woodpecker/.release-commit.yml +18 -0
- package/.woodpecker/.release.yml +21 -0
- package/.woodpecker/.verify-pr.yml +30 -0
- package/CHANGELOG.md +20 -0
- package/Dockerfile +6 -4
- package/addon/commands/index.ts +1 -0
- package/addon/commands/replace-selection-and-select-node.ts +24 -0
- package/addon/components/article-structure-plugin/article-structure-card.hbs +2 -1
- package/addon/components/article-structure-plugin/article-structure-card.ts +2 -0
- package/addon/components/article-structure-plugin/structure-card.hbs +7 -6
- package/addon/components/article-structure-plugin/structure-card.ts +49 -35
- package/addon/components/au-native-input.hbs +1 -0
- package/addon/components/au-native-input.ts +2 -1
- package/addon/components/besluit-type-plugin/besluit-type-select.hbs +3 -2
- package/addon/components/besluit-type-plugin/besluit-type-select.ts +4 -0
- package/addon/components/besluit-type-plugin/toolbar-dropdown.hbs +5 -4
- package/addon/components/besluit-type-plugin/toolbar-dropdown.ts +48 -20
- package/addon/components/citation-plugin/citation-card.hbs +4 -3
- package/addon/components/citation-plugin/citation-card.ts +9 -2
- package/addon/components/citation-plugin/citation-insert.hbs +2 -1
- package/addon/components/citation-plugin/citation-insert.ts +3 -0
- package/addon/components/citation-plugin/citations/article-list.hbs +2 -2
- package/addon/components/citation-plugin/citations/article-preview.hbs +3 -2
- package/addon/components/citation-plugin/citations/article-preview.ts +2 -0
- package/addon/components/citation-plugin/citations/legal-document-detail.hbs +19 -11
- package/addon/components/citation-plugin/citations/legal-document-detail.ts +18 -1
- package/addon/components/citation-plugin/citations/legal-document-list.hbs +2 -2
- package/addon/components/citation-plugin/citations/legal-document-preview.hbs +10 -9
- package/addon/components/citation-plugin/citations/legal-document-preview.ts +9 -0
- package/addon/components/citation-plugin/citations/search-modal.hbs +7 -8
- package/addon/components/citation-plugin/citations/search-modal.ts +3 -0
- package/addon/components/common/search/alert-load-error.gts +34 -0
- package/addon/components/common/search/alert-no-items.gts +18 -0
- package/addon/components/common/search/loading.hbs +4 -0
- package/addon/components/confidentiality-plugin/redact.gts +13 -0
- package/addon/components/decision-plugin/decision-plugin-card.hbs +4 -3
- package/addon/components/decision-plugin/decision-plugin-card.ts +3 -0
- package/addon/components/document-title-plugin/insert-title-card.hbs +8 -1
- package/addon/components/document-title-plugin/insert-title-card.ts +3 -0
- package/addon/components/generic-rdfa-variable/insert-menu.hbs +2 -1
- package/addon/components/generic-rdfa-variable/insert-menu.ts +3 -1
- package/addon/components/hover-tooltip.hbs +1 -0
- package/addon/components/import-snippet-plugin/card.hbs +1 -0
- package/addon/components/import-snippet-plugin/card.ts +7 -2
- package/addon/components/loading-alert.hbs +2 -1
- package/addon/components/loading-alert.ts +5 -2
- package/addon/components/pagination/pagination-view.gts +55 -0
- package/addon/components/roadsign-regulation-plugin/expanded-measure.hbs +28 -37
- package/addon/components/roadsign-regulation-plugin/expanded-measure.ts +4 -13
- package/addon/components/roadsign-regulation-plugin/measure-template.hbs +1 -0
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.hbs +2 -1
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.ts +3 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.hbs +1 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-pagination.hbs +9 -4
- package/addon/components/roadsign-regulation-plugin/roadsigns-pagination.ts +5 -0
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.hbs +7 -6
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.ts +5 -0
- package/addon/components/snippet-plugin/search-modal.hbs +5 -6
- package/addon/components/snippet-plugin/snippet-insert-rdfa.hbs +7 -0
- package/addon/components/snippet-plugin/snippet-insert-rdfa.ts +78 -0
- package/addon/components/snippet-plugin/snippet-insert.hbs +3 -1
- package/addon/components/snippet-plugin/snippet-insert.ts +25 -4
- package/addon/components/snippet-plugin/snippet-list/snippet-list-modal.hbs +4 -6
- package/addon/components/snippet-plugin/snippet-list/snippet-list-modal.ts +3 -3
- package/addon/components/snippet-plugin/snippet-list/snippet-list-view.hbs +3 -2
- package/addon/components/snippet-plugin/snippet-list-select-rdfa.hbs +8 -0
- package/addon/components/snippet-plugin/snippet-list-select-rdfa.ts +69 -0
- package/addon/components/snippet-plugin/snippet-list-select.hbs +2 -1
- package/addon/components/snippet-plugin/snippet-list-select.ts +2 -1
- package/addon/components/snippet-plugin/snippets/snippet-preview.hbs +1 -0
- package/addon/components/standard-template-plugin/card.hbs +2 -1
- package/addon/components/standard-template-plugin/card.ts +2 -0
- package/addon/components/standard-template-plugin/template-provider.hbs +1 -0
- package/addon/components/standard-template-plugin/template-provider.ts +10 -4
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.hbs +1 -0
- package/addon/components/table-of-contents-plugin/toolbar-button.hbs +1 -0
- package/addon/components/template-comments-plugin/edit-card.hbs +4 -3
- package/addon/components/template-comments-plugin/edit-card.ts +7 -0
- package/addon/components/template-comments-plugin/insert.hbs +2 -1
- package/addon/components/template-comments-plugin/insert.ts +3 -0
- package/addon/components/template-comments-plugin/template-comment.hbs +2 -1
- package/addon/components/template-comments-plugin/template-comment.ts +3 -0
- package/addon/components/validation-plugin/validation-card.hbs +1 -0
- package/addon/components/validation-plugin/validation-item.hbs +1 -0
- package/addon/components/validation-plugin/validation-item.ts +7 -4
- package/addon/components/variable-plugin/address/edit.hbs +1 -0
- package/addon/components/variable-plugin/address/edit.ts +5 -3
- package/addon/components/variable-plugin/address/insert-variable.hbs +1 -0
- package/addon/components/variable-plugin/address/insert.hbs +3 -2
- package/addon/components/variable-plugin/address/insert.ts +3 -0
- package/addon/components/variable-plugin/address/nodeview.hbs +4 -3
- package/addon/components/variable-plugin/address/nodeview.ts +9 -0
- package/addon/components/variable-plugin/address/utils.ts +28 -3
- package/addon/components/variable-plugin/codelist/edit.hbs +1 -0
- package/addon/components/variable-plugin/codelist/edit.ts +24 -7
- package/addon/components/variable-plugin/codelist/insert.hbs +1 -0
- package/addon/components/variable-plugin/codelist/insert.ts +52 -17
- package/addon/components/variable-plugin/date/date-time-picker.hbs +1 -0
- package/addon/components/variable-plugin/date/edit.hbs +27 -31
- package/addon/components/variable-plugin/date/edit.ts +47 -8
- package/addon/components/variable-plugin/date/help-modal.hbs +1 -0
- package/addon/components/variable-plugin/date/insert-variable.hbs +1 -0
- package/addon/components/variable-plugin/date/insert-variable.ts +36 -10
- package/addon/components/variable-plugin/date/insert.hbs +2 -1
- package/addon/components/variable-plugin/date/insert.ts +38 -10
- package/addon/components/variable-plugin/date/nodeview.hbs +4 -3
- package/addon/components/variable-plugin/date/nodeview.ts +11 -1
- package/addon/components/variable-plugin/insert-variable-card.hbs +1 -0
- package/addon/components/variable-plugin/insert-variable-card.ts +9 -1
- package/addon/components/variable-plugin/location/edit.hbs +1 -0
- package/addon/components/variable-plugin/location/edit.ts +1 -9
- package/addon/components/variable-plugin/location/insert.hbs +1 -0
- package/addon/components/variable-plugin/location/insert.ts +4 -7
- package/addon/components/variable-plugin/location/nodeview.hbs +19 -8
- package/addon/components/variable-plugin/location/nodeview.ts +37 -9
- package/addon/components/variable-plugin/number/insert.hbs +1 -0
- package/addon/components/variable-plugin/number/insert.ts +34 -10
- package/addon/components/variable-plugin/number/nodeview.hbs +7 -5
- package/addon/components/variable-plugin/number/nodeview.ts +32 -5
- package/addon/components/variable-plugin/text/insert.hbs +1 -0
- package/addon/components/variable-plugin/text/insert.ts +40 -12
- package/addon/components/variable-plugin/variable/nodeview.hbs +12 -8
- package/addon/components/variable-plugin/variable/nodeview.ts +16 -9
- package/addon/components/worship-plugin/administrative-unit-picker.hbs +16 -0
- package/addon/components/worship-plugin/administrative-unit-picker.ts +38 -0
- package/addon/components/worship-plugin/insert.hbs +18 -0
- package/addon/components/worship-plugin/insert.ts +41 -0
- package/addon/components/worship-plugin/list.hbs +46 -0
- package/addon/components/worship-plugin/search-modal.hbs +79 -0
- package/addon/components/worship-plugin/search-modal.ts +131 -0
- package/addon/components/worship-plugin/sortable-table-header.hbs +36 -0
- package/addon/components/worship-plugin/sortable-table-header.ts +45 -0
- package/addon/plugins/article-structure-plugin/commands/insert-structure.ts +82 -15
- package/addon/plugins/article-structure-plugin/commands/move-selected-structure.ts +2 -1
- package/addon/plugins/article-structure-plugin/commands/recalculate-structure-numbers.ts +70 -2
- package/addon/plugins/article-structure-plugin/commands/remove-structure.ts +1 -1
- package/addon/plugins/article-structure-plugin/commands/set-structure-start-number.ts +5 -14
- package/addon/plugins/article-structure-plugin/commands/unwrap-structure.ts +1 -1
- package/addon/plugins/article-structure-plugin/commands/wrap-structure-content.ts +197 -105
- package/addon/plugins/article-structure-plugin/index.ts +16 -7
- package/addon/plugins/article-structure-plugin/structures/article-paragraph.ts +181 -71
- package/addon/plugins/article-structure-plugin/structures/article.ts +91 -98
- package/addon/plugins/article-structure-plugin/structures/chapter.ts +89 -39
- package/addon/plugins/article-structure-plugin/structures/index.ts +12 -1
- package/addon/plugins/article-structure-plugin/structures/section.ts +88 -39
- package/addon/plugins/article-structure-plugin/structures/structure-header-number.ts +56 -0
- package/addon/plugins/article-structure-plugin/structures/structure-header-title.ts +38 -0
- package/addon/plugins/article-structure-plugin/structures/structure-header.ts +87 -73
- package/addon/plugins/article-structure-plugin/structures/subsection.ts +81 -39
- package/addon/plugins/article-structure-plugin/structures/title.ts +91 -39
- package/addon/plugins/article-structure-plugin/utils/structure.ts +223 -127
- package/addon/plugins/citation-plugin/utils/cited-text.ts +38 -8
- package/addon/plugins/confidentiality-plugin/marks/redacted.ts +1 -1
- package/addon/plugins/document-title-plugin/nodes/document-title.ts +4 -3
- package/addon/plugins/roadsign-regulation-plugin/nodes.ts +4 -3
- package/addon/plugins/snippet-plugin/commands/index.ts +1 -0
- package/addon/plugins/snippet-plugin/commands/update-snippet-ids.ts +55 -0
- package/addon/plugins/snippet-plugin/index.ts +6 -1
- package/addon/plugins/snippet-plugin/utils/fetch-data.ts +1 -3
- package/addon/plugins/snippet-plugin/utils/rdfa-predicate.ts +33 -0
- package/addon/plugins/standard-template-plugin/utils/nodes.ts +293 -81
- package/addon/plugins/table-of-contents-plugin/nodes/table-of-contents.ts +3 -2
- package/addon/plugins/variable-plugin/utils/attribute-parsers.ts +19 -1
- package/addon/plugins/variable-plugin/utils/dom-constructors.ts +3 -3
- package/addon/plugins/variable-plugin/variables/address.ts +93 -26
- package/addon/plugins/variable-plugin/variables/codelist.ts +99 -50
- package/addon/plugins/variable-plugin/variables/date.ts +143 -53
- package/addon/plugins/variable-plugin/variables/location.ts +1 -0
- package/addon/plugins/variable-plugin/variables/number.ts +99 -52
- package/addon/plugins/variable-plugin/variables/text.ts +80 -28
- package/addon/plugins/worship-plugin/index.ts +9 -0
- package/addon/plugins/worship-plugin/utils/fetchAdministrativeUnits.ts +52 -0
- package/addon/plugins/worship-plugin/utils/fetchWorshipServices.ts +109 -0
- package/addon/plugins/worship-plugin/utils/insertWorshipService.ts +16 -0
- package/addon/utils/_private/find-insertion-range.ts +18 -5
- package/addon/utils/dom-utils.ts +4 -0
- package/addon/utils/namespace.ts +63 -13
- package/addon/utils/sparql-helpers.ts +8 -0
- package/app/components/{citation-plugin/helpers/alert-no-items.js → common/search/alert-load-error.js} +1 -1
- package/app/components/{snippet-plugin/helpers → common/search}/alert-no-items.js +1 -1
- package/app/components/{snippet-plugin/helpers/alert-load-error.js → common/search/loading.js} +1 -1
- package/app/components/{citation-plugin/helpers/alert-load-error.js → snippet-plugin/snippet-list-insert-rdfa.js} +1 -1
- package/app/components/snippet-plugin/snippet-list-select-rdfa.js +1 -0
- package/app/components/worship-plugin/administrative-unit-picker.js +1 -0
- package/app/components/worship-plugin/insert.js +1 -0
- package/app/components/worship-plugin/list.js +1 -0
- package/app/components/worship-plugin/search-modal.js +1 -0
- package/app/components/worship-plugin/sortable-table-header.js +1 -0
- package/app/styles/article-structure-plugin.scss +106 -3
- package/app/styles/citaten-plugin.scss +1 -1
- package/app/styles/snippet-plugin.scss +1 -1
- package/app/styles/worship-plugin.scss +19 -0
- package/declarations/addon/commands/index.d.ts +1 -0
- package/declarations/addon/commands/replace-selection-and-select-node.d.ts +3 -0
- package/{components → declarations/addon/components}/article-structure-plugin/article-structure-card.d.ts +1 -0
- package/{components → declarations/addon/components}/article-structure-plugin/structure-card.d.ts +5 -2
- package/{components → declarations/addon/components}/au-native-input.d.ts +2 -1
- package/{components → declarations/addon/components}/besluit-type-plugin/besluit-type-select.d.ts +1 -0
- package/{components → declarations/addon/components}/besluit-type-plugin/toolbar-dropdown.d.ts +4 -5
- package/{components → declarations/addon/components}/citation-plugin/citation-card.d.ts +3 -2
- package/{components → declarations/addon/components}/citation-plugin/citation-insert.d.ts +1 -0
- package/declarations/addon/components/citation-plugin/citations/article-list.d.ts +1 -0
- package/{components → declarations/addon/components}/citation-plugin/citations/article-preview.d.ts +2 -1
- package/{components → declarations/addon/components}/citation-plugin/citations/legal-document-detail.d.ts +8 -1
- package/declarations/addon/components/citation-plugin/citations/legal-document-list.d.ts +1 -0
- package/declarations/addon/components/citation-plugin/citations/legal-document-preview.d.ts +14 -0
- package/{components → declarations/addon/components}/citation-plugin/citations/search-modal.d.ts +1 -0
- package/declarations/addon/components/common/search/alert-load-error.d.ts +4 -0
- package/declarations/addon/components/common/search/alert-no-items.d.ts +4 -0
- package/declarations/addon/components/common/search/loading.d.ts +1 -0
- package/declarations/addon/components/confidentiality-plugin/redact.d.ts +4 -0
- package/declarations/addon/components/confidentiality-plugin/toolbar.d.ts +1 -0
- package/{components → declarations/addon/components}/decision-plugin/decision-plugin-card.d.ts +1 -0
- package/{components → declarations/addon/components}/document-title-plugin/insert-title-card.d.ts +1 -0
- package/{components → declarations/addon/components}/generic-rdfa-variable/insert-menu.d.ts +1 -0
- package/{components → declarations/addon/components}/import-snippet-plugin/card.d.ts +6 -5
- package/{components → declarations/addon/components}/loading-alert.d.ts +1 -0
- package/declarations/addon/components/pagination/pagination-view.d.ts +4 -0
- package/{components → declarations/addon/components}/roadsign-regulation-plugin/expanded-measure.d.ts +2 -2
- package/{components → declarations/addon/components}/roadsign-regulation-plugin/roadsign-regulation-card.d.ts +1 -0
- package/{components → declarations/addon/components}/roadsign-regulation-plugin/roadsigns-pagination.d.ts +2 -0
- package/{components → declarations/addon/components}/roadsign-regulation-plugin/roadsigns-table.d.ts +2 -0
- package/declarations/addon/components/snippet-plugin/snippet-insert-rdfa.d.ts +19 -0
- package/{components → declarations/addon/components}/snippet-plugin/snippet-insert.d.ts +3 -0
- package/declarations/addon/components/snippet-plugin/snippet-list-select-rdfa.d.ts +21 -0
- package/{components → declarations/addon/components}/snippet-plugin/snippet-list-select.d.ts +1 -0
- package/declarations/addon/components/snippet-plugin/snippets/snippet-list.d.ts +1 -0
- package/{components → declarations/addon/components}/standard-template-plugin/card.d.ts +1 -0
- package/declarations/addon/components/table-of-contents-plugin/ember-nodes/outline.d.ts +1 -0
- package/{components → declarations/addon/components}/template-comments-plugin/edit-card.d.ts +3 -0
- package/{components → declarations/addon/components}/template-comments-plugin/insert.d.ts +1 -0
- package/{components → declarations/addon/components}/template-comments-plugin/template-comment.d.ts +1 -0
- package/{components → declarations/addon/components}/validation-plugin/validation-item.d.ts +2 -2
- package/{components → declarations/addon/components}/variable-plugin/address/edit.d.ts +2 -2
- package/{components → declarations/addon/components}/variable-plugin/address/insert.d.ts +1 -0
- package/{components → declarations/addon/components}/variable-plugin/address/nodeview.d.ts +2 -0
- package/{components → declarations/addon/components}/variable-plugin/date/edit.d.ts +4 -2
- package/{components → declarations/addon/components}/variable-plugin/date/insert.d.ts +1 -0
- package/{components → declarations/addon/components}/variable-plugin/date/nodeview.d.ts +2 -0
- package/{components → declarations/addon/components}/variable-plugin/insert-variable-card.d.ts +9 -1
- package/{components → declarations/addon/components}/variable-plugin/location/edit.d.ts +0 -1
- package/declarations/addon/components/variable-plugin/location/nodeview.d.ts +11 -0
- package/{components → declarations/addon/components}/variable-plugin/number/nodeview.d.ts +4 -1
- package/{components → declarations/addon/components}/variable-plugin/text/insert.d.ts +1 -1
- package/declarations/addon/components/variable-plugin/utils/label-input.d.ts +1 -0
- package/declarations/addon/components/variable-plugin/variable/nodeview.d.ts +11 -0
- package/declarations/addon/components/worship-plugin/administrative-unit-picker.d.ts +12 -0
- package/declarations/addon/components/worship-plugin/insert.d.ts +17 -0
- package/declarations/addon/components/worship-plugin/list.d.ts +1 -0
- package/declarations/addon/components/worship-plugin/search-modal.d.ts +30 -0
- package/declarations/addon/components/worship-plugin/sortable-table-header.d.ts +16 -0
- package/declarations/addon/plugins/article-structure-plugin/commands/recalculate-structure-numbers.d.ts +3 -0
- package/declarations/addon/plugins/article-structure-plugin/commands/set-structure-start-number.d.ts +7 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/index.d.ts +15 -7
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/structures/article-paragraph.d.ts +2 -0
- package/declarations/addon/plugins/article-structure-plugin/structures/article.d.ts +5 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/structures/index.d.ts +4 -0
- package/declarations/addon/plugins/article-structure-plugin/structures/structure-header-number.d.ts +2 -0
- package/declarations/addon/plugins/article-structure-plugin/structures/structure-header-title.d.ts +2 -0
- package/declarations/addon/plugins/article-structure-plugin/structures/structure-header.d.ts +17 -0
- package/declarations/addon/plugins/article-structure-plugin/utils/structure.d.ts +42 -0
- package/declarations/addon/plugins/confidentiality-plugin/marks/redacted.d.ts +2 -0
- package/declarations/addon/plugins/snippet-plugin/commands/index.d.ts +1 -0
- package/declarations/addon/plugins/snippet-plugin/commands/update-snippet-ids.d.ts +8 -0
- package/{plugins → declarations/addon/plugins}/snippet-plugin/index.d.ts +2 -0
- package/declarations/addon/plugins/snippet-plugin/utils/rdfa-predicate.d.ts +5 -0
- package/{plugins → declarations/addon/plugins}/table-of-contents-plugin/nodes/table-of-contents.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/template-comments-plugin/node.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/variable-plugin/utils/attribute-parsers.d.ts +3 -0
- package/{plugins → declarations/addon/plugins}/variable-plugin/variables/address.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/variable-plugin/variables/codelist.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/variable-plugin/variables/date.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/variable-plugin/variables/location.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/variable-plugin/variables/number.d.ts +1 -1
- package/{plugins → declarations/addon/plugins}/variable-plugin/variables/text.d.ts +1 -1
- package/declarations/addon/plugins/worship-plugin/index.d.ts +8 -0
- package/declarations/addon/plugins/worship-plugin/utils/fetchAdministrativeUnits.d.ts +7 -0
- package/declarations/addon/plugins/worship-plugin/utils/fetchWorshipServices.d.ts +23 -0
- package/declarations/addon/plugins/worship-plugin/utils/insertWorshipService.d.ts +3 -0
- package/declarations/addon/serializers/application.d.ts +3 -0
- package/{services → declarations/addon/services}/import-rdfa-snippet.d.ts +2 -0
- package/{utils → declarations/addon/utils}/_private/find-insertion-range.d.ts +7 -4
- package/declarations/addon/utils/dom-utils.d.ts +2 -0
- package/declarations/addon/utils/namespace.d.ts +21 -0
- package/{utils → declarations/addon/utils}/sparql-helpers.d.ts +4 -0
- package/package.json +54 -19
- package/pnpm-lock.yaml +17788 -0
- package/scripts/generate-type-declarations.sh +16 -0
- package/translations/en-US.yaml +27 -12
- package/translations/nl-BE.yaml +27 -12
- package/tsconfig.declarations.json +15 -0
- package/tsconfig.json +7 -57
- package/tsconfig.main.json +62 -0
- package/types/ember-intl.d.ts +15 -0
- package/types/graphy/memory.dataset.fast.d.ts +74 -0
- package/.woodpecker/.test.yml +0 -49
- package/addon/components/citation-plugin/helpers/alert-load-error.hbs +0 -21
- package/addon/components/citation-plugin/helpers/alert-no-items.hbs +0 -10
- package/addon/components/confidentiality-plugin/redact.hbs +0 -6
- package/addon/components/pagination/pagination-view.hbs +0 -39
- package/addon/components/snippet-plugin/helpers/alert-load-error.hbs +0 -22
- package/addon/components/snippet-plugin/helpers/alert-no-items.hbs +0 -8
- package/components/citation-plugin/citations/legal-document-preview.d.ts +0 -10
- package/components/variable-plugin/location/nodeview.d.ts +0 -12
- package/components/variable-plugin/variable/nodeview.d.ts +0 -11
- package/plugins/article-structure-plugin/commands/recalculate-structure-numbers.d.ts +0 -3
- package/plugins/article-structure-plugin/commands/set-structure-start-number.d.ts +0 -4
- package/plugins/article-structure-plugin/structures/article.d.ts +0 -6
- package/plugins/article-structure-plugin/structures/structure-header.d.ts +0 -2
- package/plugins/article-structure-plugin/utils/structure.d.ts +0 -36
- package/plugins/confidentiality-plugin/marks/redacted.d.ts +0 -2
- package/utils/namespace.d.ts +0 -12
- package/{components → declarations/addon/components}/hover-tooltip.d.ts +0 -0
- package/{components → declarations/addon/components}/roadsign-regulation-plugin/measure-template.d.ts +0 -0
- package/{components → declarations/addon/components}/roadsign-regulation-plugin/roadsigns-modal.d.ts +0 -0
- package/{components → declarations/addon/components}/snippet-plugin/search-modal.d.ts +0 -0
- package/{components → declarations/addon/components}/snippet-plugin/snippet-list/snippet-list-modal.d.ts +0 -0
- package/{components → declarations/addon/components}/snippet-plugin/snippet-list/snippet-list-view.d.ts +0 -0
- package/{components → declarations/addon/components}/snippet-plugin/snippets/snippet-preview.d.ts +0 -0
- package/{components → declarations/addon/components}/standard-template-plugin/template-provider.d.ts +0 -0
- package/{components → declarations/addon/components}/table-of-contents-plugin/ember-nodes/table-of-contents.d.ts +0 -0
- package/{components → declarations/addon/components}/table-of-contents-plugin/toolbar-button.d.ts +0 -0
- package/{components → declarations/addon/components}/validation-plugin/validation-card.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/address/insert-variable.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/address/utils.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/codelist/edit.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/codelist/insert.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/date/date-time-picker.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/date/help-modal.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/date/insert-variable.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/location/insert.d.ts +0 -0
- package/{components → declarations/addon/components}/variable-plugin/number/insert.d.ts +0 -0
- package/{helpers → declarations/addon/helpers}/capitalize.d.ts +0 -0
- package/{helpers → declarations/addon/helpers}/in-array.d.ts +0 -0
- package/{helpers → declarations/addon/helpers}/limit-text.d.ts +0 -0
- package/{helpers → declarations/addon/helpers}/pagination.d.ts +0 -0
- package/{models → declarations/addon/models}/instruction.d.ts +0 -0
- package/{models → declarations/addon/models}/measure.d.ts +0 -0
- package/{models → declarations/addon/models}/sign.d.ts +0 -0
- package/{models → declarations/addon/models}/template.d.ts +0 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/commands/index.d.ts +0 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/commands/insert-structure.d.ts +0 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/commands/move-selected-structure.d.ts +0 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/commands/remove-structure.d.ts +0 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/commands/unwrap-structure.d.ts +0 -0
- package/{plugins → declarations/addon/plugins}/article-structure-plugin/commands/wrap-structure-content.d.ts +1 -1
- /package/{plugins → declarations/addon/plugins}/article-structure-plugin/structures/chapter.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/article-structure-plugin/structures/section.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/article-structure-plugin/structures/subsection.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/article-structure-plugin/structures/title.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/article-structure-plugin/utils/romanize.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/besluit-type-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/besluit-type-plugin/utils/fetchBesluitTypes.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/article.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/cache.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/cited-text.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/legal-documents.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/process-match.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/public-decisions.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/types.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/utils.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/citation-plugin/utils/vlaamse-codex.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/confidentiality-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/commands/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/commands/insert-article-container.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/commands/insert-description.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/commands/insert-motivation.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/commands/insert-title.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/utils/get-title-for-decision.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/decision-plugin/utils/validation-rules.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/document-title-plugin/commands/insert-document-title.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/document-title-plugin/nodes/document-title.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/document-title-plugin/nodes/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/generic-rdfa-variable/commands/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/generic-rdfa-variable/commands/insert-generic-rdfa.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/roadsign-regulation-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/roadsign-regulation-plugin/nodes.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/roadsign-regulation-plugin/utils/constants.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/roadsign-regulation-plugin/utils/fetchData.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/roadsign-regulation-plugin/utils/includeInstructions.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/snippet-plugin/utils/fetch-data.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/standard-template-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/standard-template-plugin/utils/instantiate-uuids.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/standard-template-plugin/utils/nodes.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/table-of-contents-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/table-of-contents-plugin/nodes/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/table-of-contents-plugin/utils/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/template-comments-plugin/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/validation/index.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/validation/utils/transaction-complies-with-shapes.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/address-helpers.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/codelist-utils.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/constants.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/date-helpers.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/dom-constructors.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/fetch-data.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/utils/number-to-words.d.ts +0 -0
- /package/{plugins → declarations/addon/plugins}/variable-plugin/variables/index.d.ts +0 -0
- /package/{services → declarations/addon/services}/roadsign-registry.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/changed-descendants.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/constants.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/dom-output-spec-helpers.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/find-insertion-contentmatch.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/find-insertion-pos-in-ancestor-of-type.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/memoize.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/option.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/strings.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/translation.d.ts +0 -0
- /package/{utils → declarations/addon/utils}/types.d.ts +0 -0
|
@@ -2,6 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
5
|
+
import { sayDataFactory } from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
5
6
|
import {
|
|
6
7
|
CodeList,
|
|
7
8
|
fetchCodeListsByPublisher,
|
|
@@ -10,6 +11,12 @@ import { service } from '@ember/service';
|
|
|
10
11
|
import IntlService from 'ember-intl/services/intl';
|
|
11
12
|
import { trackedFunction } from 'ember-resources/util/function';
|
|
12
13
|
import { v4 as uuidv4 } from 'uuid';
|
|
14
|
+
import {
|
|
15
|
+
DCT,
|
|
16
|
+
EXT,
|
|
17
|
+
RDF,
|
|
18
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
19
|
+
import { replaceSelectionWithAndSelectNode } from '@lblod/ember-rdfa-editor-lblod-plugins/commands';
|
|
13
20
|
|
|
14
21
|
export type CodelistInsertOptions = {
|
|
15
22
|
publisher?: string;
|
|
@@ -83,19 +90,51 @@ export default class CodelistInsertComponent extends Component<Args> {
|
|
|
83
90
|
insert() {
|
|
84
91
|
const mappingResource = `http://data.lblod.info/mappings/${uuidv4()}`;
|
|
85
92
|
const variableInstance = `http://data.lblod.info/variables/${uuidv4()}`;
|
|
93
|
+
const codelistResource = this.selectedCodelist?.uri;
|
|
94
|
+
const label =
|
|
95
|
+
this.label ??
|
|
96
|
+
this.selectedCodelist?.label ??
|
|
97
|
+
this.intl.t('variable.codelist.label', {
|
|
98
|
+
locale: this.documentLanguage,
|
|
99
|
+
});
|
|
100
|
+
const source = this.endpoint;
|
|
101
|
+
const variableId = uuidv4();
|
|
86
102
|
const node = this.schema.nodes.codelist.create(
|
|
87
103
|
{
|
|
88
|
-
mappingResource,
|
|
89
|
-
variableInstance,
|
|
90
|
-
codelistResource: this.selectedCodelist?.uri,
|
|
91
|
-
label:
|
|
92
|
-
this.label ??
|
|
93
|
-
this.selectedCodelist?.label ??
|
|
94
|
-
this.intl.t('variable.codelist.label', {
|
|
95
|
-
locale: this.documentLanguage,
|
|
96
|
-
}),
|
|
97
|
-
source: this.endpoint,
|
|
98
104
|
selectionStyle: this.selectedStyleValue,
|
|
105
|
+
subject: mappingResource,
|
|
106
|
+
rdfaNodeType: 'resource',
|
|
107
|
+
__rdfaId: variableId,
|
|
108
|
+
properties: [
|
|
109
|
+
{
|
|
110
|
+
predicate: RDF('type').full,
|
|
111
|
+
object: sayDataFactory.namedNode(EXT('Mapping').full),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
predicate: EXT('instance').full,
|
|
115
|
+
object: sayDataFactory.namedNode(variableInstance),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
predicate: EXT('label').full,
|
|
119
|
+
object: sayDataFactory.literal(label),
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
predicate: EXT('codelist').full,
|
|
123
|
+
object: sayDataFactory.namedNode(codelistResource || ''),
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
predicate: DCT('source').full,
|
|
127
|
+
object: sayDataFactory.namedNode(source),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
predicate: DCT('type').full,
|
|
131
|
+
object: sayDataFactory.literal('codelist'),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
predicate: EXT('content').full,
|
|
135
|
+
object: sayDataFactory.contentLiteral(),
|
|
136
|
+
},
|
|
137
|
+
],
|
|
99
138
|
},
|
|
100
139
|
this.schema.node('placeholder', {
|
|
101
140
|
placeholderText: this.selectedCodelist?.label,
|
|
@@ -103,13 +142,9 @@ export default class CodelistInsertComponent extends Component<Args> {
|
|
|
103
142
|
);
|
|
104
143
|
|
|
105
144
|
this.label = undefined;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return tr.replaceSelectionWith(node);
|
|
110
|
-
},
|
|
111
|
-
{ view: this.controller.mainEditorView },
|
|
112
|
-
);
|
|
145
|
+
this.controller.doCommand(replaceSelectionWithAndSelectNode(node), {
|
|
146
|
+
view: this.controller.mainEditorView,
|
|
147
|
+
});
|
|
113
148
|
}
|
|
114
149
|
|
|
115
150
|
@action
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
{{! @glint-nocheck: not typesafe yet }}
|
|
1
2
|
<div>
|
|
2
3
|
{{#if this.showCard}}
|
|
3
4
|
<AuCard @shadow={{true}} @size="flush" as |c|>
|
|
@@ -14,17 +15,19 @@
|
|
|
14
15
|
>
|
|
15
16
|
|
|
16
17
|
<AuFormRow @alignment="inline">
|
|
17
|
-
<
|
|
18
|
-
@
|
|
18
|
+
<AuCheckbox
|
|
19
|
+
@name="include-time"
|
|
19
20
|
@disabled={{eq this.dateFormatType "custom"}}
|
|
20
21
|
@checked={{not this.onlyDate}}
|
|
21
22
|
@onChange={{this.changeIncludeTime}}
|
|
22
|
-
|
|
23
|
+
>
|
|
24
|
+
{{t 'date-plugin.card.include-time'}}
|
|
25
|
+
</AuCheckbox>
|
|
23
26
|
{{#if this.isCustom}}
|
|
24
27
|
<this.Velcro @placement="top" @offsetOptions={{hash mainAxis=10}} as |velcro|>
|
|
25
28
|
<AuBadge
|
|
26
29
|
@size="small"
|
|
27
|
-
@icon=
|
|
30
|
+
@icon={{this.InfoCircleIcon}}
|
|
28
31
|
aria-describedby="date-plugin-time-info-tooltip"
|
|
29
32
|
{{velcro.hook}}
|
|
30
33
|
{{on "mouseenter" this.showTooltip }}
|
|
@@ -44,33 +47,26 @@
|
|
|
44
47
|
{{/if}}
|
|
45
48
|
</AuFormRow>
|
|
46
49
|
</VariablePlugin::Date::DateTimePicker>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@name="dateFormat"
|
|
65
|
-
@value="custom"
|
|
66
|
-
checked={{eq this.dateFormatType "custom"}}
|
|
67
|
-
@onChange={{this.setDateFormatFromKey}}
|
|
68
|
-
/>
|
|
69
|
-
</AuFormRow>
|
|
70
|
-
{{/if}}
|
|
50
|
+
<AuRadioGroup
|
|
51
|
+
@name="dateFormat"
|
|
52
|
+
@selected={{this.dateFormatType}}
|
|
53
|
+
@onChange={{this.setDateFormatFromKey}}
|
|
54
|
+
as |Group|
|
|
55
|
+
>
|
|
56
|
+
{{#each this.formats as |format|}}
|
|
57
|
+
<Group.Radio @value={{format.key}}>
|
|
58
|
+
{{if format.label format.label (if this.onlyDate format.dateFormat format.dateTimeFormat)}}
|
|
59
|
+
</Group.Radio>
|
|
60
|
+
{{/each}}
|
|
61
|
+
{{#if this.isCustomAllowed}}
|
|
62
|
+
<Group.Radio @value="custom">
|
|
63
|
+
{{t "date-plugin.card.custom-date" }}
|
|
64
|
+
</Group.Radio>
|
|
65
|
+
{{/if}}
|
|
66
|
+
</AuRadioGroup>
|
|
71
67
|
{{#if (eq this.dateFormatType "custom")}}
|
|
72
68
|
<AuFormRow @alignment="post">
|
|
73
|
-
<AuButton @skin="secondary" @icon=
|
|
69
|
+
<AuButton @skin="secondary" @icon={{this.InfoCircleIcon}}
|
|
74
70
|
{{on 'click' this.toggleHelpModal}}>
|
|
75
71
|
</AuButton>
|
|
76
72
|
<AuNativeInput
|
|
@@ -80,7 +76,7 @@
|
|
|
80
76
|
/>
|
|
81
77
|
</AuFormRow>
|
|
82
78
|
{{#if this.humanError}}
|
|
83
|
-
<AuPill @skin="error" @icon=
|
|
79
|
+
<AuPill @skin="error" @icon={{this.CrossIcon}}>{{this.humanError}}</AuPill>
|
|
84
80
|
{{/if}}
|
|
85
81
|
{{/if}}
|
|
86
82
|
</div>
|
|
@@ -88,4 +84,4 @@
|
|
|
88
84
|
</AuCard>
|
|
89
85
|
{{/if}}
|
|
90
86
|
</div>
|
|
91
|
-
<VariablePlugin::Date::HelpModal @modalOpen={{this.helpModalOpen}} @closeModal={{this.toggleHelpModal}} />
|
|
87
|
+
<VariablePlugin::Date::HelpModal @modalOpen={{this.helpModalOpen}} @closeModal={{this.toggleHelpModal}} />
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
SayController,
|
|
6
|
+
Selection,
|
|
7
|
+
Transaction,
|
|
8
|
+
} from '@lblod/ember-rdfa-editor';
|
|
5
9
|
import { NodeSelection, PNode } from '@lblod/ember-rdfa-editor';
|
|
10
|
+
import { sayDataFactory } from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
6
11
|
import { service } from '@ember/service';
|
|
7
12
|
import IntlService from 'ember-intl/services/intl';
|
|
8
13
|
import {
|
|
@@ -23,6 +28,14 @@ import {
|
|
|
23
28
|
validateDateFormat,
|
|
24
29
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/utils/date-helpers';
|
|
25
30
|
import { Velcro } from 'ember-velcro';
|
|
31
|
+
import {
|
|
32
|
+
EXT,
|
|
33
|
+
XSD,
|
|
34
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
35
|
+
import { OutgoingTriple } from '@lblod/ember-rdfa-editor/core/rdfa-processor';
|
|
36
|
+
import { getOutgoingTriple } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
37
|
+
import { InfoCircleIcon } from '@appuniversum/ember-appuniversum/components/icons/info-circle';
|
|
38
|
+
import { CrossIcon } from '@appuniversum/ember-appuniversum/components/icons/cross';
|
|
26
39
|
|
|
27
40
|
type Args = {
|
|
28
41
|
controller: SayController;
|
|
@@ -30,6 +43,8 @@ type Args = {
|
|
|
30
43
|
};
|
|
31
44
|
const SECONDS_REGEX = new RegExp('[sStT]|p{2,}');
|
|
32
45
|
export default class DateEditComponent extends Component<Args> {
|
|
46
|
+
CrossIcon = CrossIcon;
|
|
47
|
+
InfoCircleIcon = InfoCircleIcon;
|
|
33
48
|
Velcro = Velcro;
|
|
34
49
|
|
|
35
50
|
@service
|
|
@@ -47,7 +62,7 @@ export default class DateEditComponent extends Component<Args> {
|
|
|
47
62
|
return this.args.controller;
|
|
48
63
|
}
|
|
49
64
|
|
|
50
|
-
get selection() {
|
|
65
|
+
get selection(): Selection {
|
|
51
66
|
return this.controller.activeEditorState.selection;
|
|
52
67
|
}
|
|
53
68
|
|
|
@@ -63,11 +78,16 @@ export default class DateEditComponent extends Component<Args> {
|
|
|
63
78
|
}
|
|
64
79
|
|
|
65
80
|
get documentDate(): Option<Date> {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
if (this.selectedDateNode) {
|
|
82
|
+
const dateVal = getOutgoingTriple(
|
|
83
|
+
this.selectedDateNode.attrs,
|
|
84
|
+
EXT('content'),
|
|
85
|
+
)?.object.value as Option<string>;
|
|
86
|
+
if (dateVal) {
|
|
87
|
+
return new Date(dateVal);
|
|
88
|
+
}
|
|
69
89
|
}
|
|
70
|
-
return
|
|
90
|
+
return;
|
|
71
91
|
}
|
|
72
92
|
|
|
73
93
|
get documentDatePos(): Option<number> {
|
|
@@ -184,8 +204,27 @@ export default class DateEditComponent extends Component<Args> {
|
|
|
184
204
|
changeDate(date: Date) {
|
|
185
205
|
const pos = this.documentDatePos;
|
|
186
206
|
if (pos) {
|
|
187
|
-
this.controller.withTransaction((tr) => {
|
|
188
|
-
|
|
207
|
+
this.controller.withTransaction((tr: Transaction) => {
|
|
208
|
+
const node = tr.doc.nodeAt(pos);
|
|
209
|
+
if (!node) {
|
|
210
|
+
return tr;
|
|
211
|
+
}
|
|
212
|
+
const properties = node.attrs.properties as OutgoingTriple[];
|
|
213
|
+
const newProperties = properties.filter((prop) => {
|
|
214
|
+
return !(
|
|
215
|
+
prop.object.termType === 'Literal' &&
|
|
216
|
+
EXT('content').matches(prop.predicate)
|
|
217
|
+
);
|
|
218
|
+
});
|
|
219
|
+
const datatype = this.onlyDate ? XSD('date') : XSD('dateTime');
|
|
220
|
+
newProperties.push({
|
|
221
|
+
predicate: EXT('content').full,
|
|
222
|
+
object: sayDataFactory.literal(
|
|
223
|
+
date.toISOString(),
|
|
224
|
+
datatype.namedNode,
|
|
225
|
+
),
|
|
226
|
+
});
|
|
227
|
+
return tr.setNodeAttribute(pos, 'properties', newProperties);
|
|
189
228
|
});
|
|
190
229
|
}
|
|
191
230
|
}
|
|
@@ -5,6 +5,14 @@ import { service } from '@ember/service';
|
|
|
5
5
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
7
|
import IntlService from 'ember-intl/services/intl';
|
|
8
|
+
import { sayDataFactory } from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
9
|
+
import {
|
|
10
|
+
DCT,
|
|
11
|
+
EXT,
|
|
12
|
+
RDF,
|
|
13
|
+
XSD,
|
|
14
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
15
|
+
import { replaceSelectionWithAndSelectNode } from '@lblod/ember-rdfa-editor-lblod-plugins/commands';
|
|
8
16
|
|
|
9
17
|
type Args = {
|
|
10
18
|
controller: SayController;
|
|
@@ -34,24 +42,42 @@ export default class DateInsertVariableComponent extends Component<Args> {
|
|
|
34
42
|
@action
|
|
35
43
|
insert() {
|
|
36
44
|
const mappingResource = `http://data.lblod.info/mappings/${uuidv4()}`;
|
|
45
|
+
const variableInstance = `http://data.lblod.info/variables/${uuidv4()}`;
|
|
37
46
|
|
|
38
47
|
const defaultLabel = this.intl.t('variable.date.label', {
|
|
39
48
|
locale: this.documentLanguage,
|
|
40
49
|
});
|
|
50
|
+
const label = this.label ?? defaultLabel;
|
|
51
|
+
const variableId = uuidv4();
|
|
41
52
|
|
|
42
53
|
const node = this.schema.nodes.date.create({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
rdfaNodeType: 'resource',
|
|
55
|
+
subject: mappingResource,
|
|
56
|
+
__rdfaId: variableId,
|
|
57
|
+
properties: [
|
|
58
|
+
{
|
|
59
|
+
predicate: RDF('type').full,
|
|
60
|
+
object: sayDataFactory.namedNode(EXT('Mapping').full),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
predicate: EXT('instance').full,
|
|
64
|
+
object: sayDataFactory.namedNode(variableInstance),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
predicate: EXT('label').full,
|
|
68
|
+
object: sayDataFactory.literal(label),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
predicate: DCT('type').full,
|
|
72
|
+
object: sayDataFactory.literal('date', XSD('date').namedNode),
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
backlinks: [],
|
|
46
76
|
});
|
|
47
77
|
|
|
48
78
|
this.label = undefined;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return tr.replaceSelectionWith(node);
|
|
53
|
-
},
|
|
54
|
-
{ view: this.controller.mainEditorView },
|
|
55
|
-
);
|
|
79
|
+
this.controller.doCommand(replaceSelectionWithAndSelectNode(node), {
|
|
80
|
+
view: this.controller.mainEditorView,
|
|
81
|
+
});
|
|
56
82
|
}
|
|
57
83
|
}
|
|
@@ -4,12 +4,22 @@ import { service } from '@ember/service';
|
|
|
4
4
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
5
5
|
import IntlService from 'ember-intl/services/intl';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
|
+
import { sayDataFactory } from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
8
|
+
import {
|
|
9
|
+
DCT,
|
|
10
|
+
EXT,
|
|
11
|
+
RDF,
|
|
12
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
13
|
+
import { replaceSelectionWithAndSelectNode } from '@lblod/ember-rdfa-editor-lblod-plugins/commands';
|
|
14
|
+
import { AddIcon } from '@appuniversum/ember-appuniversum/components/icons/add';
|
|
7
15
|
|
|
8
16
|
type Args = {
|
|
9
17
|
controller: SayController;
|
|
10
18
|
};
|
|
11
19
|
|
|
12
20
|
export default class DateInsertComponent extends Component<Args> {
|
|
21
|
+
AddIcon = AddIcon;
|
|
22
|
+
|
|
13
23
|
@service declare intl: IntlService;
|
|
14
24
|
|
|
15
25
|
get controller() {
|
|
@@ -28,21 +38,39 @@ export default class DateInsertComponent extends Component<Args> {
|
|
|
28
38
|
insert() {
|
|
29
39
|
const mappingResource = `http://data.lblod.info/mappings/${uuidv4()}`;
|
|
30
40
|
|
|
41
|
+
const variableInstance = `http://data.lblod.info/variables/${uuidv4()}`;
|
|
31
42
|
const defaultLabel = this.intl.t('variable.date.label', {
|
|
32
43
|
locale: this.documentLanguage,
|
|
33
44
|
});
|
|
45
|
+
const label = defaultLabel;
|
|
34
46
|
|
|
47
|
+
const variableId = uuidv4();
|
|
35
48
|
const node = this.schema.nodes.date.create({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
rdfaNodeType: 'resource',
|
|
50
|
+
subject: mappingResource,
|
|
51
|
+
__rdfaId: variableId,
|
|
52
|
+
properties: [
|
|
53
|
+
{
|
|
54
|
+
predicate: RDF('type').full,
|
|
55
|
+
object: sayDataFactory.namedNode(EXT('Mapping').full),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
predicate: EXT('instance').full,
|
|
59
|
+
object: sayDataFactory.namedNode(variableInstance),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
predicate: EXT('label').full,
|
|
63
|
+
object: sayDataFactory.literal(label),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
predicate: DCT('type').full,
|
|
67
|
+
object: sayDataFactory.literal('date'),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
backlinks: [],
|
|
71
|
+
});
|
|
72
|
+
this.controller.doCommand(replaceSelectionWithAndSelectNode(node), {
|
|
73
|
+
view: this.controller.mainEditorView,
|
|
39
74
|
});
|
|
40
|
-
|
|
41
|
-
this.controller.withTransaction(
|
|
42
|
-
(tr) => {
|
|
43
|
-
return tr.replaceSelectionWith(node);
|
|
44
|
-
},
|
|
45
|
-
{ view: this.controller.mainEditorView },
|
|
46
|
-
);
|
|
47
75
|
}
|
|
48
76
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
{{! @glint-nocheck: not typesafe yet }}
|
|
2
|
+
<AuPill @icon={{this.PencilIcon}} @iconAlignment="right" class="variable atomic" {{on 'click' this.onClick}}>
|
|
2
3
|
|
|
3
4
|
{{this.humanReadableDate}}
|
|
4
|
-
{{#if
|
|
5
|
+
{{#if this.label}}
|
|
5
6
|
<span class="label">
|
|
6
|
-
({{
|
|
7
|
+
({{this.label}})
|
|
7
8
|
</span>
|
|
8
9
|
{{/if}}
|
|
9
10
|
</AuPill>
|
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
formatDate,
|
|
14
14
|
validateDateFormat,
|
|
15
15
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/utils/date-helpers';
|
|
16
|
+
import { getOutgoingTriple } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
17
|
+
import { EXT } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
18
|
+
import { PencilIcon } from '@appuniversum/ember-appuniversum/components/icons/pencil';
|
|
16
19
|
|
|
17
20
|
type Args = {
|
|
18
21
|
getPos: () => number | undefined;
|
|
@@ -25,6 +28,8 @@ type Args = {
|
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
export default class DateNodeviewComponent extends Component<Args> {
|
|
31
|
+
PencilIcon = PencilIcon;
|
|
32
|
+
|
|
28
33
|
@service declare intl: IntlService;
|
|
29
34
|
|
|
30
35
|
get controller() {
|
|
@@ -48,7 +53,8 @@ export default class DateNodeviewComponent extends Component<Args> {
|
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
get humanReadableDate() {
|
|
51
|
-
const value = this.args.node.attrs
|
|
56
|
+
const value = getOutgoingTriple(this.args.node.attrs, EXT('content'))
|
|
57
|
+
?.object.value;
|
|
52
58
|
const format = this.args.node.attrs.format as string;
|
|
53
59
|
if (value) {
|
|
54
60
|
if (validateDateFormat(format).type === 'ok') {
|
|
@@ -66,4 +72,8 @@ export default class DateNodeviewComponent extends Component<Args> {
|
|
|
66
72
|
});
|
|
67
73
|
}
|
|
68
74
|
}
|
|
75
|
+
|
|
76
|
+
get label() {
|
|
77
|
+
return getOutgoingTriple(this.args.node.attrs, EXT('label'))?.object.value;
|
|
78
|
+
}
|
|
69
79
|
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
|
+
import { type ComponentLike } from '@glint/template';
|
|
4
5
|
import { NodeSelection, SayController } from '@lblod/ember-rdfa-editor';
|
|
5
6
|
import { hasGroups } from '@lblod/ember-rdfa-editor/utils/node-utils';
|
|
6
7
|
import { service } from '@ember/service';
|
|
7
8
|
import IntlService from 'ember-intl/services/intl';
|
|
8
9
|
|
|
10
|
+
type VariableComponentArgs = {
|
|
11
|
+
Args: {
|
|
12
|
+
Named: {
|
|
13
|
+
controller: SayController;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
9
17
|
export type VariableConfig = {
|
|
10
18
|
label: string;
|
|
11
|
-
component:
|
|
19
|
+
component: ComponentLike<VariableComponentArgs>;
|
|
12
20
|
options?: unknown;
|
|
13
21
|
};
|
|
14
22
|
|
|
@@ -98,7 +98,7 @@ export default class LocationEditComponent extends Component<Args> {
|
|
|
98
98
|
);
|
|
99
99
|
result.options = result.options.map((option) => ({
|
|
100
100
|
label: option.label,
|
|
101
|
-
value:
|
|
101
|
+
value: unwrap(option.value),
|
|
102
102
|
}));
|
|
103
103
|
return result;
|
|
104
104
|
});
|
|
@@ -111,12 +111,4 @@ export default class LocationEditComponent extends Component<Args> {
|
|
|
111
111
|
updateLocationOption(locationOption: CodeListOption | CodeListOption[]) {
|
|
112
112
|
this.selectedLocationOption = locationOption;
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
wrapInLocation(value: string) {
|
|
116
|
-
return `
|
|
117
|
-
<span property="https://data.vlaanderen.be/ns/mobiliteit#plaatsbepaling">
|
|
118
|
-
${value}
|
|
119
|
-
</span>
|
|
120
|
-
`;
|
|
121
|
-
}
|
|
122
114
|
}
|
|
@@ -5,6 +5,7 @@ import { SayController } from '@lblod/ember-rdfa-editor';
|
|
|
5
5
|
import { service } from '@ember/service';
|
|
6
6
|
import IntlService from 'ember-intl/services/intl';
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
+
import { replaceSelectionWithAndSelectNode } from '@lblod/ember-rdfa-editor-lblod-plugins/commands';
|
|
8
9
|
|
|
9
10
|
export type LocationInsertOptions = {
|
|
10
11
|
endpoint: string;
|
|
@@ -63,12 +64,8 @@ export default class LocationInsertComponent extends Component<Args> {
|
|
|
63
64
|
);
|
|
64
65
|
|
|
65
66
|
this.label = undefined;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return tr.replaceSelectionWith(node);
|
|
70
|
-
},
|
|
71
|
-
{ view: this.controller.mainEditorView },
|
|
72
|
-
);
|
|
67
|
+
this.controller.doCommand(replaceSelectionWithAndSelectNode(node), {
|
|
68
|
+
view: this.controller.mainEditorView,
|
|
69
|
+
});
|
|
73
70
|
}
|
|
74
71
|
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
{{! @glint-nocheck: not typesafe yet }}
|
|
2
|
+
<AuPill @icon={{this.PencilIcon}} @iconAlignment="right" class="variable" {{on 'click' this.onClick}}>
|
|
3
|
+
<EmberNode::EmbeddedEditor
|
|
4
|
+
@controller={{@controller}}
|
|
5
|
+
@node={{@node}}
|
|
6
|
+
@view={{@view}}
|
|
7
|
+
@getPos={{@getPos}}
|
|
8
|
+
@selected={{@selected}}
|
|
9
|
+
@initEditor={{this.initEditor}}
|
|
10
|
+
@plugins={{this.plugins}}
|
|
11
|
+
@decorations={{@decorations}}
|
|
12
|
+
@contentDecorations={{@contentDecorations}}
|
|
13
|
+
/>
|
|
14
|
+
{{#if this.label}}
|
|
15
|
+
<span class="label">
|
|
16
|
+
({{this.label}})
|
|
17
|
+
</span>
|
|
18
|
+
{{/if}}
|
|
19
|
+
</AuPill>
|