@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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PNode } from '@lblod/ember-rdfa-editor';
|
|
2
|
+
import { OutgoingTriple } from '@lblod/ember-rdfa-editor/core/rdfa-processor';
|
|
3
|
+
import { getSnippetIdFromUri } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
4
|
+
import { SAY } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
5
|
+
import { getOutgoingTripleList } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
6
|
+
|
|
7
|
+
export const SNIPPET_LIST_RDFA_PREDICATE = SAY('allowedSnippetList');
|
|
8
|
+
|
|
9
|
+
export const getSnippetListIdsProperties = (node: PNode) => {
|
|
10
|
+
return getOutgoingTripleList(node.attrs, SNIPPET_LIST_RDFA_PREDICATE);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const getAssignedSnippetListsIdsFromProperties = (
|
|
14
|
+
snippetListIdsProperty: OutgoingTriple[] | undefined,
|
|
15
|
+
) => {
|
|
16
|
+
if (!snippetListIdsProperty) {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const snippetListUris = snippetListIdsProperty
|
|
21
|
+
.map((property) => property.object.value)
|
|
22
|
+
.filter((object) => object !== undefined);
|
|
23
|
+
|
|
24
|
+
if (snippetListUris.length === 0) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const snippetListIds = snippetListUris
|
|
29
|
+
.map(getSnippetIdFromUri)
|
|
30
|
+
.filter((id) => id !== undefined);
|
|
31
|
+
|
|
32
|
+
return snippetListIds;
|
|
33
|
+
};
|
|
@@ -1,29 +1,38 @@
|
|
|
1
|
-
import { getRdfaAttrs, NodeSpec,
|
|
1
|
+
import { getRdfaAttrs, NodeSpec, rdfaAttrSpec } from '@lblod/ember-rdfa-editor';
|
|
2
|
+
import {
|
|
3
|
+
getRdfaContentElement,
|
|
4
|
+
hasRdfaContentChild,
|
|
5
|
+
renderRdfaAware,
|
|
6
|
+
sharedRdfaNodeSpec,
|
|
7
|
+
} from '@lblod/ember-rdfa-editor/core/schema';
|
|
2
8
|
import {
|
|
3
9
|
BESLUIT,
|
|
4
10
|
ELI,
|
|
5
11
|
PROV,
|
|
12
|
+
RDF,
|
|
6
13
|
SKOS,
|
|
7
14
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
8
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
hasBacklink,
|
|
17
|
+
hasOutgoingNamedNodeTriple,
|
|
18
|
+
hasRDFaAttribute,
|
|
19
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
9
20
|
import { StructureSpec } from '../../article-structure-plugin';
|
|
10
21
|
import { v4 as uuid } from 'uuid';
|
|
11
22
|
import { unwrap } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
|
|
12
23
|
import { getTranslationFunction } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/translation';
|
|
13
|
-
import {
|
|
14
|
-
getNumberAttributeFromElement,
|
|
15
|
-
getNumberAttributesFromNode,
|
|
16
|
-
getNumberDocSpecFromNode,
|
|
17
|
-
getNumberUtils,
|
|
18
|
-
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin/utils/structure';
|
|
24
|
+
import { getNumberUtils } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin/utils/structure';
|
|
19
25
|
|
|
26
|
+
const rdfaAware = true;
|
|
20
27
|
export const besluit_title: NodeSpec = {
|
|
21
28
|
content: 'paragraph+',
|
|
22
29
|
inline: false,
|
|
23
30
|
defining: true,
|
|
24
31
|
canSplit: false,
|
|
32
|
+
...sharedRdfaNodeSpec,
|
|
33
|
+
editable: true,
|
|
25
34
|
attrs: {
|
|
26
|
-
...
|
|
35
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
27
36
|
property: {
|
|
28
37
|
default: 'eli:title',
|
|
29
38
|
},
|
|
@@ -32,14 +41,43 @@ export const besluit_title: NodeSpec = {
|
|
|
32
41
|
},
|
|
33
42
|
},
|
|
34
43
|
toDOM(node) {
|
|
35
|
-
return
|
|
44
|
+
return renderRdfaAware({
|
|
45
|
+
renderable: node,
|
|
46
|
+
tag: 'h4',
|
|
47
|
+
rdfaContainerTag: 'span',
|
|
48
|
+
contentContainerTag: 'span',
|
|
49
|
+
attrs: {
|
|
50
|
+
...node.attrs,
|
|
51
|
+
class: 'say-editable',
|
|
52
|
+
},
|
|
53
|
+
content: 0,
|
|
54
|
+
});
|
|
36
55
|
},
|
|
37
56
|
parseDOM: [
|
|
57
|
+
{
|
|
58
|
+
tag: 'h1,h2,h3,h4,h5',
|
|
59
|
+
getAttrs(element: HTMLElement) {
|
|
60
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
61
|
+
if (
|
|
62
|
+
hasBacklink(rdfaAttrs, ELI('title')) &&
|
|
63
|
+
hasRdfaContentChild(element)
|
|
64
|
+
) {
|
|
65
|
+
return rdfaAttrs;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
},
|
|
69
|
+
contentElement: getRdfaContentElement,
|
|
70
|
+
},
|
|
71
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
38
72
|
{
|
|
39
73
|
tag: 'h1,h2,h3,h4,h5',
|
|
40
74
|
getAttrs(element: HTMLElement) {
|
|
41
75
|
if (hasRDFaAttribute(element, 'property', ELI('title'))) {
|
|
42
|
-
|
|
76
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
77
|
+
return {
|
|
78
|
+
...rdfaAttrs,
|
|
79
|
+
subject: element.getAttribute('resource'),
|
|
80
|
+
};
|
|
43
81
|
}
|
|
44
82
|
return false;
|
|
45
83
|
},
|
|
@@ -52,8 +90,10 @@ export const description: NodeSpec = {
|
|
|
52
90
|
content: 'block+',
|
|
53
91
|
inline: false,
|
|
54
92
|
canSplit: false,
|
|
93
|
+
...sharedRdfaNodeSpec,
|
|
94
|
+
editable: true,
|
|
55
95
|
attrs: {
|
|
56
|
-
...
|
|
96
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
57
97
|
property: {
|
|
58
98
|
default: 'eli:description',
|
|
59
99
|
},
|
|
@@ -62,14 +102,37 @@ export const description: NodeSpec = {
|
|
|
62
102
|
},
|
|
63
103
|
},
|
|
64
104
|
toDOM(node) {
|
|
65
|
-
return
|
|
105
|
+
return renderRdfaAware({
|
|
106
|
+
renderable: node,
|
|
107
|
+
tag: 'div',
|
|
108
|
+
attrs: {
|
|
109
|
+
...node.attrs,
|
|
110
|
+
class: 'say-editable',
|
|
111
|
+
},
|
|
112
|
+
content: 0,
|
|
113
|
+
});
|
|
66
114
|
},
|
|
67
115
|
parseDOM: [
|
|
116
|
+
{
|
|
117
|
+
tag: 'div,p',
|
|
118
|
+
getAttrs(element: HTMLElement) {
|
|
119
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
120
|
+
if (
|
|
121
|
+
hasBacklink(rdfaAttrs, ELI('description')) &&
|
|
122
|
+
hasRdfaContentChild(element)
|
|
123
|
+
) {
|
|
124
|
+
return rdfaAttrs;
|
|
125
|
+
}
|
|
126
|
+
return false;
|
|
127
|
+
},
|
|
128
|
+
contentElement: getRdfaContentElement,
|
|
129
|
+
},
|
|
130
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
68
131
|
{
|
|
69
132
|
tag: 'div,p',
|
|
70
133
|
getAttrs(element: HTMLElement) {
|
|
71
134
|
if (hasRDFaAttribute(element, 'property', ELI('description'))) {
|
|
72
|
-
return getRdfaAttrs(element);
|
|
135
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
73
136
|
}
|
|
74
137
|
return false;
|
|
75
138
|
},
|
|
@@ -81,8 +144,10 @@ export const motivering: NodeSpec = {
|
|
|
81
144
|
content: 'block+',
|
|
82
145
|
inline: false,
|
|
83
146
|
canSplit: false,
|
|
147
|
+
...sharedRdfaNodeSpec,
|
|
148
|
+
editable: true,
|
|
84
149
|
attrs: {
|
|
85
|
-
...
|
|
150
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
86
151
|
property: {
|
|
87
152
|
default: 'besluit:motivering',
|
|
88
153
|
},
|
|
@@ -91,14 +156,37 @@ export const motivering: NodeSpec = {
|
|
|
91
156
|
},
|
|
92
157
|
},
|
|
93
158
|
toDOM(node) {
|
|
94
|
-
return
|
|
159
|
+
return renderRdfaAware({
|
|
160
|
+
renderable: node,
|
|
161
|
+
tag: 'div',
|
|
162
|
+
attrs: {
|
|
163
|
+
...node.attrs,
|
|
164
|
+
class: 'say-editable',
|
|
165
|
+
},
|
|
166
|
+
content: 0,
|
|
167
|
+
});
|
|
95
168
|
},
|
|
96
169
|
parseDOM: [
|
|
170
|
+
{
|
|
171
|
+
tag: 'div',
|
|
172
|
+
getAttrs(element: HTMLElement) {
|
|
173
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
174
|
+
if (
|
|
175
|
+
hasBacklink(rdfaAttrs, BESLUIT('motivering')) &&
|
|
176
|
+
hasRdfaContentChild(element)
|
|
177
|
+
) {
|
|
178
|
+
return rdfaAttrs;
|
|
179
|
+
}
|
|
180
|
+
return false;
|
|
181
|
+
},
|
|
182
|
+
contentElement: getRdfaContentElement,
|
|
183
|
+
},
|
|
184
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
97
185
|
{
|
|
98
186
|
tag: 'div',
|
|
99
187
|
getAttrs(element: HTMLElement) {
|
|
100
188
|
if (hasRDFaAttribute(element, 'property', BESLUIT('motivering'))) {
|
|
101
|
-
return getRdfaAttrs(element);
|
|
189
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
102
190
|
}
|
|
103
191
|
return false;
|
|
104
192
|
},
|
|
@@ -111,8 +199,10 @@ export const article_container: NodeSpec = {
|
|
|
111
199
|
content: '(block|besluit_article)+',
|
|
112
200
|
inline: false,
|
|
113
201
|
canSplit: false,
|
|
202
|
+
...sharedRdfaNodeSpec,
|
|
203
|
+
editable: true,
|
|
114
204
|
attrs: {
|
|
115
|
-
...
|
|
205
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
116
206
|
property: {
|
|
117
207
|
default: 'prov:value',
|
|
118
208
|
},
|
|
@@ -121,14 +211,38 @@ export const article_container: NodeSpec = {
|
|
|
121
211
|
},
|
|
122
212
|
},
|
|
123
213
|
toDOM(node) {
|
|
124
|
-
return
|
|
214
|
+
return renderRdfaAware({
|
|
215
|
+
renderable: node,
|
|
216
|
+
tag: 'div',
|
|
217
|
+
attrs: {
|
|
218
|
+
...node.attrs,
|
|
219
|
+
class: 'say-editable',
|
|
220
|
+
},
|
|
221
|
+
content: 0,
|
|
222
|
+
});
|
|
125
223
|
},
|
|
126
224
|
parseDOM: [
|
|
225
|
+
{
|
|
226
|
+
tag: 'div',
|
|
227
|
+
getAttrs(element: HTMLElement) {
|
|
228
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
229
|
+
if (
|
|
230
|
+
hasBacklink(rdfaAttrs, PROV('value')) &&
|
|
231
|
+
hasRdfaContentChild(element)
|
|
232
|
+
) {
|
|
233
|
+
return rdfaAttrs;
|
|
234
|
+
}
|
|
235
|
+
return false;
|
|
236
|
+
},
|
|
237
|
+
context: 'besluit/',
|
|
238
|
+
contentElement: getRdfaContentElement,
|
|
239
|
+
},
|
|
240
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
127
241
|
{
|
|
128
242
|
tag: 'div',
|
|
129
243
|
getAttrs(element: HTMLElement) {
|
|
130
244
|
if (hasRDFaAttribute(element, 'property', PROV('value'))) {
|
|
131
|
-
return getRdfaAttrs(element);
|
|
245
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
132
246
|
}
|
|
133
247
|
return false;
|
|
134
248
|
},
|
|
@@ -141,20 +255,47 @@ export const besluit_article: NodeSpec = {
|
|
|
141
255
|
content:
|
|
142
256
|
'besluit_article_header{1}(language_node*)besluit_article_content{1}',
|
|
143
257
|
inline: false,
|
|
258
|
+
...sharedRdfaNodeSpec,
|
|
259
|
+
editable: true,
|
|
144
260
|
attrs: {
|
|
145
|
-
...
|
|
146
|
-
property: {
|
|
147
|
-
default: 'eli:has_part',
|
|
148
|
-
},
|
|
261
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
149
262
|
typeof: {
|
|
150
|
-
default: '
|
|
263
|
+
default: BESLUIT('Artikel').prefixed,
|
|
151
264
|
},
|
|
152
|
-
|
|
265
|
+
subject: {},
|
|
153
266
|
},
|
|
154
267
|
toDOM(node) {
|
|
155
|
-
return
|
|
268
|
+
return renderRdfaAware({
|
|
269
|
+
renderable: node,
|
|
270
|
+
tag: 'div',
|
|
271
|
+
attrs: {
|
|
272
|
+
...node.attrs,
|
|
273
|
+
class: 'say-editable',
|
|
274
|
+
},
|
|
275
|
+
content: 0,
|
|
276
|
+
});
|
|
156
277
|
},
|
|
157
278
|
parseDOM: [
|
|
279
|
+
{
|
|
280
|
+
tag: 'div',
|
|
281
|
+
getAttrs(element: HTMLElement) {
|
|
282
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
283
|
+
if (
|
|
284
|
+
hasBacklink(rdfaAttrs, ELI('has_part')) &&
|
|
285
|
+
hasOutgoingNamedNodeTriple(
|
|
286
|
+
rdfaAttrs,
|
|
287
|
+
RDF('type'),
|
|
288
|
+
BESLUIT('Artikel'),
|
|
289
|
+
) &&
|
|
290
|
+
hasRdfaContentChild(element)
|
|
291
|
+
) {
|
|
292
|
+
return rdfaAttrs;
|
|
293
|
+
}
|
|
294
|
+
return false;
|
|
295
|
+
},
|
|
296
|
+
contentElement: getRdfaContentElement,
|
|
297
|
+
},
|
|
298
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
158
299
|
{
|
|
159
300
|
tag: 'div',
|
|
160
301
|
getAttrs(element: HTMLElement) {
|
|
@@ -162,7 +303,7 @@ export const besluit_article: NodeSpec = {
|
|
|
162
303
|
hasRDFaAttribute(element, 'property', ELI('has_part')) &&
|
|
163
304
|
hasRDFaAttribute(element, 'typeof', BESLUIT('Artikel'))
|
|
164
305
|
) {
|
|
165
|
-
return getRdfaAttrs(element);
|
|
306
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
166
307
|
}
|
|
167
308
|
return false;
|
|
168
309
|
},
|
|
@@ -183,10 +324,13 @@ export const besluitArticleStructure: StructureSpec = {
|
|
|
183
324
|
limitTo: 'besluit',
|
|
184
325
|
constructor: ({ schema, number, content, intl, state }) => {
|
|
185
326
|
const translationWithDocLang = getTranslationFunction(state);
|
|
327
|
+
const articleRdfaId = uuid();
|
|
328
|
+
const subject = `http://data.lblod.info/articles/${articleRdfaId}`;
|
|
186
329
|
const node = schema.node(
|
|
187
330
|
`besluit_article`,
|
|
188
331
|
{
|
|
189
|
-
|
|
332
|
+
subject,
|
|
333
|
+
__rdfaId: articleRdfaId,
|
|
190
334
|
},
|
|
191
335
|
[
|
|
192
336
|
schema.node('besluit_article_header', {
|
|
@@ -211,18 +355,19 @@ export const besluitArticleStructure: StructureSpec = {
|
|
|
211
355
|
),
|
|
212
356
|
],
|
|
213
357
|
);
|
|
214
|
-
|
|
215
|
-
relativePos: number;
|
|
216
|
-
type: 'text' | 'node';
|
|
217
|
-
} = content
|
|
218
|
-
? { relativePos: 3, type: 'text' }
|
|
219
|
-
: { relativePos: 4, type: 'node' };
|
|
358
|
+
|
|
220
359
|
return {
|
|
221
360
|
node,
|
|
222
|
-
|
|
361
|
+
newResource: subject,
|
|
362
|
+
selectionConfig: {
|
|
363
|
+
type: content ? 'text' : 'node',
|
|
364
|
+
rdfaId: articleRdfaId,
|
|
365
|
+
},
|
|
223
366
|
};
|
|
224
367
|
},
|
|
225
|
-
...getNumberUtils(
|
|
368
|
+
...getNumberUtils({
|
|
369
|
+
offset: 1,
|
|
370
|
+
}),
|
|
226
371
|
content: ({ pos, state }) => {
|
|
227
372
|
const node = unwrap(state.doc.nodeAt(pos));
|
|
228
373
|
return unwrap(node.lastChild).content;
|
|
@@ -230,56 +375,52 @@ export const besluitArticleStructure: StructureSpec = {
|
|
|
230
375
|
continuous: false,
|
|
231
376
|
};
|
|
232
377
|
|
|
378
|
+
// TODO Fix this representation so it works well with RDFa editing tools.
|
|
233
379
|
export const besluit_article_header: NodeSpec = {
|
|
234
380
|
inline: false,
|
|
235
|
-
|
|
381
|
+
isLeaf: true,
|
|
382
|
+
...sharedRdfaNodeSpec,
|
|
236
383
|
attrs: {
|
|
237
|
-
...
|
|
384
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
238
385
|
number: {
|
|
239
386
|
default: 1,
|
|
240
387
|
},
|
|
241
|
-
numberDisplayStyle: {
|
|
242
|
-
default: 'decimal', // decimal, roman
|
|
243
|
-
},
|
|
244
|
-
startNumber: {
|
|
245
|
-
default: null,
|
|
246
|
-
},
|
|
247
388
|
},
|
|
248
389
|
toDOM(node) {
|
|
249
|
-
const
|
|
250
|
-
delete toplevelAttrs.number;
|
|
251
|
-
delete toplevelAttrs.datatype;
|
|
390
|
+
const { number, ...attrs } = node.attrs;
|
|
252
391
|
return [
|
|
253
392
|
'div',
|
|
254
|
-
{
|
|
255
|
-
...toplevelAttrs,
|
|
256
|
-
contenteditable: false,
|
|
257
|
-
...getNumberAttributesFromNode(node),
|
|
258
|
-
},
|
|
393
|
+
{ contenteditable: false },
|
|
259
394
|
'Artikel ',
|
|
260
|
-
|
|
395
|
+
renderRdfaAware({
|
|
396
|
+
renderable: node,
|
|
397
|
+
tag: 'span',
|
|
398
|
+
attrs: {
|
|
399
|
+
...attrs,
|
|
400
|
+
class: 'say-inline-rdfa',
|
|
401
|
+
},
|
|
402
|
+
content: (number as number).toString() ?? '1',
|
|
403
|
+
}),
|
|
261
404
|
];
|
|
262
405
|
},
|
|
263
406
|
parseDOM: [
|
|
264
407
|
{
|
|
265
408
|
tag: 'p,div',
|
|
409
|
+
context: 'besluit_article/',
|
|
266
410
|
getAttrs(element: HTMLElement) {
|
|
267
|
-
const
|
|
411
|
+
const numberNode = element.querySelector(
|
|
268
412
|
`span[property~='${ELI('number').prefixed}'],
|
|
269
413
|
span[property~='${ELI('number').full}']`,
|
|
270
414
|
);
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
if (numberAttributes) {
|
|
415
|
+
if (numberNode) {
|
|
416
|
+
const number = numberNode.textContent
|
|
417
|
+
? parseInt(numberNode.textContent, 10)
|
|
418
|
+
: 1;
|
|
277
419
|
return {
|
|
278
|
-
...getRdfaAttrs(
|
|
279
|
-
|
|
420
|
+
...getRdfaAttrs(numberNode as HTMLElement, { rdfaAware }),
|
|
421
|
+
number,
|
|
280
422
|
};
|
|
281
423
|
}
|
|
282
|
-
|
|
283
424
|
return false;
|
|
284
425
|
},
|
|
285
426
|
},
|
|
@@ -290,24 +431,47 @@ export const besluit_article_content: NodeSpec = {
|
|
|
290
431
|
group: 'block',
|
|
291
432
|
content: 'block+',
|
|
292
433
|
inline: false,
|
|
434
|
+
...sharedRdfaNodeSpec,
|
|
435
|
+
editable: true,
|
|
293
436
|
attrs: {
|
|
294
|
-
...
|
|
295
|
-
property: {
|
|
296
|
-
default: 'prov:value',
|
|
297
|
-
},
|
|
437
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
298
438
|
datatype: {
|
|
299
439
|
default: 'xsd:string',
|
|
300
440
|
},
|
|
301
441
|
},
|
|
302
442
|
toDOM(node) {
|
|
303
|
-
return
|
|
443
|
+
return renderRdfaAware({
|
|
444
|
+
renderable: node,
|
|
445
|
+
tag: 'div',
|
|
446
|
+
attrs: {
|
|
447
|
+
...node.attrs,
|
|
448
|
+
class: 'say-editable',
|
|
449
|
+
},
|
|
450
|
+
content: 0,
|
|
451
|
+
});
|
|
304
452
|
},
|
|
305
453
|
parseDOM: [
|
|
454
|
+
{
|
|
455
|
+
tag: 'div',
|
|
456
|
+
getAttrs(element: HTMLElement) {
|
|
457
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
458
|
+
if (
|
|
459
|
+
hasBacklink(rdfaAttrs, PROV('value')) &&
|
|
460
|
+
hasRdfaContentChild(element)
|
|
461
|
+
) {
|
|
462
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
463
|
+
}
|
|
464
|
+
return false;
|
|
465
|
+
},
|
|
466
|
+
contentElement: getRdfaContentElement,
|
|
467
|
+
context: 'besluit_article/',
|
|
468
|
+
},
|
|
469
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
306
470
|
{
|
|
307
471
|
tag: 'div',
|
|
308
472
|
getAttrs(element: HTMLElement) {
|
|
309
473
|
if (hasRDFaAttribute(element, 'property', PROV('value'))) {
|
|
310
|
-
return getRdfaAttrs(element);
|
|
474
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
311
475
|
}
|
|
312
476
|
return false;
|
|
313
477
|
},
|
|
@@ -321,22 +485,51 @@ export const besluit: NodeSpec = {
|
|
|
321
485
|
content: 'block*besluit_title?block*description?block*motivering?block*',
|
|
322
486
|
inline: false,
|
|
323
487
|
defining: true,
|
|
324
|
-
|
|
488
|
+
...sharedRdfaNodeSpec,
|
|
489
|
+
editable: true,
|
|
325
490
|
canSplit: false,
|
|
326
491
|
attrs: {
|
|
327
|
-
...
|
|
328
|
-
property: {
|
|
329
|
-
default: 'prov:generated',
|
|
330
|
-
},
|
|
492
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
331
493
|
typeof: {
|
|
332
494
|
default: 'besluit:Besluit ext:BesluitNieuweStijl',
|
|
333
495
|
},
|
|
334
|
-
|
|
496
|
+
subject: {},
|
|
335
497
|
},
|
|
336
498
|
toDOM(node) {
|
|
337
|
-
return
|
|
499
|
+
return renderRdfaAware({
|
|
500
|
+
renderable: node,
|
|
501
|
+
tag: 'div',
|
|
502
|
+
attrs: {
|
|
503
|
+
...node.attrs,
|
|
504
|
+
class: 'say-editable',
|
|
505
|
+
},
|
|
506
|
+
content: 0,
|
|
507
|
+
});
|
|
338
508
|
},
|
|
339
509
|
parseDOM: [
|
|
510
|
+
{
|
|
511
|
+
tag: 'div',
|
|
512
|
+
getAttrs(element: HTMLElement) {
|
|
513
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
514
|
+
if (
|
|
515
|
+
hasBacklink(rdfaAttrs, PROV('generated')) &&
|
|
516
|
+
hasOutgoingNamedNodeTriple(
|
|
517
|
+
rdfaAttrs,
|
|
518
|
+
RDF('type'),
|
|
519
|
+
BESLUIT('Besluit'),
|
|
520
|
+
) &&
|
|
521
|
+
hasRdfaContentChild(element)
|
|
522
|
+
) {
|
|
523
|
+
return {
|
|
524
|
+
typeof: element.getAttribute('typeof'),
|
|
525
|
+
...rdfaAttrs,
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
return false;
|
|
529
|
+
},
|
|
530
|
+
contentElement: getRdfaContentElement,
|
|
531
|
+
},
|
|
532
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
340
533
|
{
|
|
341
534
|
tag: 'div',
|
|
342
535
|
getAttrs(element: HTMLElement) {
|
|
@@ -344,7 +537,10 @@ export const besluit: NodeSpec = {
|
|
|
344
537
|
hasRDFaAttribute(element, 'property', PROV('generated')) &&
|
|
345
538
|
hasRDFaAttribute(element, 'typeof', BESLUIT('Besluit'))
|
|
346
539
|
) {
|
|
347
|
-
return
|
|
540
|
+
return {
|
|
541
|
+
typeof: element.getAttribute('typeof'),
|
|
542
|
+
...getRdfaAttrs(element, { rdfaAware }),
|
|
543
|
+
};
|
|
348
544
|
}
|
|
349
545
|
return false;
|
|
350
546
|
},
|
|
@@ -352,13 +548,15 @@ export const besluit: NodeSpec = {
|
|
|
352
548
|
],
|
|
353
549
|
};
|
|
354
550
|
|
|
551
|
+
// TODO this can most likely be removed as language can just be a property rather than needing a
|
|
552
|
+
// separate hidden node
|
|
355
553
|
export const language_node: NodeSpec = {
|
|
356
554
|
group: 'block',
|
|
357
555
|
content: '',
|
|
358
556
|
inline: false,
|
|
359
557
|
atom: true,
|
|
360
558
|
attrs: {
|
|
361
|
-
...
|
|
559
|
+
...rdfaAttrSpec({ rdfaAware }),
|
|
362
560
|
style: {
|
|
363
561
|
default: 'style="display:none;"',
|
|
364
562
|
},
|
|
@@ -368,7 +566,7 @@ export const language_node: NodeSpec = {
|
|
|
368
566
|
typeof: {
|
|
369
567
|
default: 'skos:Concept',
|
|
370
568
|
},
|
|
371
|
-
|
|
569
|
+
subject: {
|
|
372
570
|
default: 'http://publications.europa.eu/resource/authority/language/NLD',
|
|
373
571
|
},
|
|
374
572
|
},
|
|
@@ -376,6 +574,20 @@ export const language_node: NodeSpec = {
|
|
|
376
574
|
return ['span', node.attrs];
|
|
377
575
|
},
|
|
378
576
|
parseDOM: [
|
|
577
|
+
{
|
|
578
|
+
tag: 'span',
|
|
579
|
+
getAttrs(element: HTMLElement) {
|
|
580
|
+
const rdfaAttrs = getRdfaAttrs(element, { rdfaAware });
|
|
581
|
+
if (
|
|
582
|
+
hasBacklink(rdfaAttrs, ELI('language')) &&
|
|
583
|
+
hasOutgoingNamedNodeTriple(rdfaAttrs, RDF('type'), SKOS('Concept'))
|
|
584
|
+
) {
|
|
585
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
586
|
+
}
|
|
587
|
+
return false;
|
|
588
|
+
},
|
|
589
|
+
},
|
|
590
|
+
// Compatibility with pre-RDFa-aware HTML
|
|
379
591
|
{
|
|
380
592
|
tag: 'span',
|
|
381
593
|
getAttrs(element: HTMLElement) {
|
|
@@ -383,7 +595,7 @@ export const language_node: NodeSpec = {
|
|
|
383
595
|
hasRDFaAttribute(element, 'property', ELI('language')) &&
|
|
384
596
|
hasRDFaAttribute(element, 'typeof', SKOS('Concept'))
|
|
385
597
|
) {
|
|
386
|
-
return getRdfaAttrs(element);
|
|
598
|
+
return getRdfaAttrs(element, { rdfaAware });
|
|
387
599
|
}
|
|
388
600
|
return false;
|
|
389
601
|
},
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import TableOfContentsComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/table-of-contents-plugin/ember-nodes/table-of-contents';
|
|
12
12
|
import type { ComponentLike } from '@glint/template';
|
|
13
13
|
import { getTranslationFunction } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/translation';
|
|
14
|
+
import { unwrap } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
|
|
14
15
|
|
|
15
16
|
export const emberNodeConfig: (
|
|
16
17
|
config: TableOfContentsConfig,
|
|
@@ -31,10 +32,10 @@ export const emberNodeConfig: (
|
|
|
31
32
|
|
|
32
33
|
const { config } = node.attrs;
|
|
33
34
|
const entries = extractOutline({
|
|
34
|
-
node: state.doc,
|
|
35
|
+
node: unwrap(state).doc,
|
|
35
36
|
pos: -1,
|
|
36
37
|
config: config as TableOfContentsConfig,
|
|
37
|
-
state,
|
|
38
|
+
state: unwrap(state),
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
const title = t('table-of-contents-plugin.title', 'Inhoudstafel');
|
|
@@ -2,7 +2,11 @@ import {
|
|
|
2
2
|
DCT,
|
|
3
3
|
EXT,
|
|
4
4
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getOutgoingTriple,
|
|
7
|
+
hasRDFaAttribute,
|
|
8
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
9
|
+
import { RdfaAttrs } from '@lblod/ember-rdfa-editor/core/schema';
|
|
6
10
|
|
|
7
11
|
export function isVariable(element: HTMLElement) {
|
|
8
12
|
return hasRDFaAttribute(element, 'typeof', EXT('Mapping'));
|
|
@@ -13,6 +17,20 @@ export function parseVariableType(variableNode: HTMLElement) {
|
|
|
13
17
|
.find((el) => hasRDFaAttribute(el, 'property', DCT('type')))
|
|
14
18
|
?.getAttribute('content');
|
|
15
19
|
}
|
|
20
|
+
export function getRdfaVariableType(rdfaAttrs: RdfaAttrs): string | null {
|
|
21
|
+
const attr = getOutgoingTriple(rdfaAttrs, DCT('type'));
|
|
22
|
+
if (attr && attr.object.value) {
|
|
23
|
+
return attr.object.value;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
export function hasRdfaVariableType(rdfaAttrs: RdfaAttrs, type: string) {
|
|
28
|
+
const attrType = getRdfaVariableType(rdfaAttrs);
|
|
29
|
+
if (attrType) {
|
|
30
|
+
return attrType === type;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
16
34
|
|
|
17
35
|
export function parseVariableInstance(variableNode: HTMLElement) {
|
|
18
36
|
return [...variableNode.children]
|