@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,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type BindingObject,
|
|
3
|
+
executeQuery,
|
|
4
|
+
sparqlEscapeString,
|
|
5
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/sparql-helpers';
|
|
6
|
+
import { AdministrativeUnit, WorshipPluginConfig } from '../';
|
|
7
|
+
|
|
8
|
+
export interface FetchAdministrativeUnitsArgs {
|
|
9
|
+
config: WorshipPluginConfig;
|
|
10
|
+
search: string;
|
|
11
|
+
abortSignal?: AbortSignal;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const emptyUnit: AdministrativeUnit = {
|
|
15
|
+
uri: '',
|
|
16
|
+
label: '',
|
|
17
|
+
};
|
|
18
|
+
const selectUnit = Object.keys(emptyUnit)
|
|
19
|
+
.map((key) => `?${key}`)
|
|
20
|
+
.join(' ');
|
|
21
|
+
|
|
22
|
+
export async function fetchAdministrativeUnits({
|
|
23
|
+
config: { endpoint },
|
|
24
|
+
search,
|
|
25
|
+
abortSignal,
|
|
26
|
+
}: FetchAdministrativeUnitsArgs): Promise<AdministrativeUnit[]> {
|
|
27
|
+
const filterQuery = !search
|
|
28
|
+
? ''
|
|
29
|
+
: `FILTER(CONTAINS(LCASE(?label), LCASE(${sparqlEscapeString(search)})))`;
|
|
30
|
+
|
|
31
|
+
const query = `
|
|
32
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
33
|
+
PREFIX erediensten: <http://data.lblod.info/vocabularies/erediensten/>
|
|
34
|
+
|
|
35
|
+
SELECT DISTINCT ${selectUnit} WHERE {
|
|
36
|
+
?uri erediensten:betrokkenBestuur ?targetUri;
|
|
37
|
+
skos:prefLabel ?label.
|
|
38
|
+
${filterQuery}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
const queryResult = await executeQuery<BindingObject<AdministrativeUnit>>({
|
|
43
|
+
endpoint,
|
|
44
|
+
query,
|
|
45
|
+
abortSignal,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return queryResult.results.bindings.map<AdministrativeUnit>((binding) => ({
|
|
49
|
+
uri: binding.uri.value,
|
|
50
|
+
label: binding.label.value,
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import RSVP from 'rsvp';
|
|
2
|
+
import {
|
|
3
|
+
type BindingObject,
|
|
4
|
+
executeCountQuery,
|
|
5
|
+
executeQuery,
|
|
6
|
+
sparqlEscapeString,
|
|
7
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/sparql-helpers';
|
|
8
|
+
import { WorshipPluginConfig } from '../';
|
|
9
|
+
|
|
10
|
+
export type WorshipService = {
|
|
11
|
+
uri: string;
|
|
12
|
+
label: string;
|
|
13
|
+
};
|
|
14
|
+
export interface WorshipServiceResponse {
|
|
15
|
+
results: WorshipService[];
|
|
16
|
+
totalCount: number;
|
|
17
|
+
}
|
|
18
|
+
export type SearchSort = [keyof WorshipService, 'ASC' | 'DESC'] | false;
|
|
19
|
+
export interface SearchMeta {
|
|
20
|
+
filter?: Partial<WorshipService>;
|
|
21
|
+
sort?: SearchSort;
|
|
22
|
+
pageSize: number;
|
|
23
|
+
page: number;
|
|
24
|
+
abortSignal: AbortSignal;
|
|
25
|
+
}
|
|
26
|
+
export interface FetchWorshipServicesArgs {
|
|
27
|
+
administrativeUnitURI?: string;
|
|
28
|
+
searchMeta: SearchMeta;
|
|
29
|
+
config: WorshipPluginConfig;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const emptyWorshipService: WorshipService = {
|
|
33
|
+
uri: '',
|
|
34
|
+
label: '',
|
|
35
|
+
};
|
|
36
|
+
const selectWorshipService = Object.keys(emptyWorshipService)
|
|
37
|
+
.map((key) => `?${key}`)
|
|
38
|
+
.join(' ');
|
|
39
|
+
|
|
40
|
+
export async function fetchWorshipServices({
|
|
41
|
+
administrativeUnitURI,
|
|
42
|
+
config: { endpoint },
|
|
43
|
+
searchMeta: { abortSignal, filter, pageSize, page, sort },
|
|
44
|
+
}: FetchWorshipServicesArgs): Promise<WorshipServiceResponse> {
|
|
45
|
+
const unitQuery = !administrativeUnitURI
|
|
46
|
+
? ''
|
|
47
|
+
: `<${administrativeUnitURI}> erediensten:betrokkenBestuur/org:organization ?uri.`;
|
|
48
|
+
const sortQuery = !sort ? '' : `ORDER BY ${sort[1]}(?${sort[0]})`;
|
|
49
|
+
const filterQuery = !filter
|
|
50
|
+
? ''
|
|
51
|
+
: Object.entries(filter)
|
|
52
|
+
.map(([field, search]) =>
|
|
53
|
+
search?.length > 0
|
|
54
|
+
? `FILTER(CONTAINS(LCASE(?${field}), LCASE(${sparqlEscapeString(
|
|
55
|
+
search,
|
|
56
|
+
)})))`
|
|
57
|
+
: undefined,
|
|
58
|
+
)
|
|
59
|
+
.filter(Boolean)
|
|
60
|
+
.join('; ');
|
|
61
|
+
|
|
62
|
+
const query = `
|
|
63
|
+
PREFIX org: <http://www.w3.org/ns/org#>
|
|
64
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
65
|
+
PREFIX erediensten: <http://data.lblod.info/vocabularies/erediensten/>
|
|
66
|
+
|
|
67
|
+
SELECT ${selectWorshipService} WHERE {
|
|
68
|
+
?uri a erediensten:BestuurVanDeEredienst;
|
|
69
|
+
skos:prefLabel ?label.
|
|
70
|
+
${unitQuery}
|
|
71
|
+
${filterQuery}
|
|
72
|
+
}
|
|
73
|
+
${sortQuery} LIMIT ${pageSize} OFFSET ${page * pageSize}
|
|
74
|
+
`;
|
|
75
|
+
const countQuery = `
|
|
76
|
+
PREFIX org: <http://www.w3.org/ns/org#>
|
|
77
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
78
|
+
PREFIX erediensten: <http://data.lblod.info/vocabularies/erediensten/>
|
|
79
|
+
|
|
80
|
+
SELECT (count(?uri) as ?count) WHERE {
|
|
81
|
+
?uri a erediensten:BestuurVanDeEredienst;
|
|
82
|
+
skos:prefLabel ?label.
|
|
83
|
+
${unitQuery}
|
|
84
|
+
${filterQuery}
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
|
|
88
|
+
const totalCountPromise = executeCountQuery({
|
|
89
|
+
endpoint,
|
|
90
|
+
query: countQuery,
|
|
91
|
+
abortSignal,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const resultsPromise = executeQuery<BindingObject<WorshipService>>({
|
|
95
|
+
endpoint,
|
|
96
|
+
query,
|
|
97
|
+
abortSignal,
|
|
98
|
+
}).then((queryResult) =>
|
|
99
|
+
queryResult.results.bindings.map<WorshipService>((binding) => ({
|
|
100
|
+
uri: binding.uri.value,
|
|
101
|
+
label: binding.label.value,
|
|
102
|
+
})),
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
return RSVP.hash({
|
|
106
|
+
results: resultsPromise,
|
|
107
|
+
totalCount: totalCountPromise,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
2
|
+
import { WorshipService } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/worship-plugin/utils/fetchWorshipServices';
|
|
3
|
+
|
|
4
|
+
export function insertWorshipService(
|
|
5
|
+
controller: SayController,
|
|
6
|
+
worshipService: WorshipService,
|
|
7
|
+
) {
|
|
8
|
+
const node = controller.schema.text(worshipService.label);
|
|
9
|
+
|
|
10
|
+
controller.withTransaction(
|
|
11
|
+
(tr) => {
|
|
12
|
+
return tr.replaceSelectionWith(node);
|
|
13
|
+
},
|
|
14
|
+
{ view: controller.mainEditorView },
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -3,23 +3,36 @@ import { NodeType, PNode, ResolvedPos, Schema } from '@lblod/ember-rdfa-editor';
|
|
|
3
3
|
import { containsOnlyPlaceholder } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin/utils/structure';
|
|
4
4
|
import { findNodes } from '@lblod/ember-rdfa-editor/utils/position-utils';
|
|
5
5
|
|
|
6
|
+
type Return = {
|
|
7
|
+
from: number;
|
|
8
|
+
to: number;
|
|
9
|
+
containerNode: PNode;
|
|
10
|
+
};
|
|
6
11
|
export function findInsertionRange(args: {
|
|
7
12
|
doc: PNode;
|
|
8
13
|
$from: ResolvedPos;
|
|
9
14
|
nodeType: NodeType;
|
|
10
15
|
schema: Schema;
|
|
11
16
|
limitTo?: string;
|
|
12
|
-
}) {
|
|
17
|
+
}): Return | null {
|
|
13
18
|
const { doc, $from, nodeType, schema, limitTo } = args;
|
|
14
19
|
for (let currentDepth = $from.depth; currentDepth >= 0; currentDepth--) {
|
|
15
20
|
const currentAncestor = $from.node(currentDepth);
|
|
16
21
|
const index = $from.index(currentDepth);
|
|
17
22
|
if (currentAncestor.canReplaceWith(index, index, nodeType)) {
|
|
18
23
|
if (containsOnlyPlaceholder(schema, currentAncestor)) {
|
|
19
|
-
return {
|
|
24
|
+
return {
|
|
25
|
+
from: $from.start(currentDepth),
|
|
26
|
+
to: $from.end(currentDepth),
|
|
27
|
+
containerNode: currentAncestor,
|
|
28
|
+
};
|
|
20
29
|
} else {
|
|
21
30
|
const insertPos = $from.after(currentDepth + 1);
|
|
22
|
-
return {
|
|
31
|
+
return {
|
|
32
|
+
from: insertPos,
|
|
33
|
+
to: insertPos,
|
|
34
|
+
containerNode: currentAncestor,
|
|
35
|
+
};
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
}
|
|
@@ -67,9 +80,9 @@ export function findInsertionRange(args: {
|
|
|
67
80
|
const containerNode = doc.nodeAt(from);
|
|
68
81
|
if (containerNode) {
|
|
69
82
|
if (containsOnlyPlaceholder(schema, containerNode)) {
|
|
70
|
-
return { from: from + 1, to: to - 1 };
|
|
83
|
+
return { from: from + 1, to: to - 1, containerNode };
|
|
71
84
|
} else {
|
|
72
|
-
return { from: to - 1, to: to - 1 };
|
|
85
|
+
return { from: to - 1, to: to - 1, containerNode };
|
|
73
86
|
}
|
|
74
87
|
}
|
|
75
88
|
}
|
package/addon/utils/namespace.ts
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OutgoingTriple } from '@lblod/ember-rdfa-editor/core/rdfa-processor';
|
|
2
|
+
import { isRdfaAttrs, RdfaAttrs } from '@lblod/ember-rdfa-editor/core/schema';
|
|
3
|
+
import {
|
|
4
|
+
sayDataFactory,
|
|
5
|
+
type SayNamedNode,
|
|
6
|
+
} from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
7
|
+
import { Option } from './option';
|
|
8
|
+
import { Attrs } from '@lblod/ember-rdfa-editor';
|
|
2
9
|
|
|
3
10
|
export class Resource {
|
|
4
11
|
full: string;
|
|
5
12
|
prefixed: string;
|
|
13
|
+
namedNode: SayNamedNode;
|
|
6
14
|
|
|
7
15
|
constructor(full: string, prefixed: string) {
|
|
8
16
|
this.full = full;
|
|
9
17
|
this.prefixed = prefixed;
|
|
18
|
+
this.namedNode = sayDataFactory.namedNode(full);
|
|
10
19
|
}
|
|
11
20
|
|
|
12
21
|
toString() {
|
|
13
22
|
return this.full;
|
|
14
23
|
}
|
|
24
|
+
|
|
25
|
+
matches(fullOrPrefixed: string) {
|
|
26
|
+
return this.full === fullOrPrefixed || this.prefixed === fullOrPrefixed;
|
|
27
|
+
}
|
|
15
28
|
}
|
|
16
29
|
|
|
17
30
|
export function namespace(uri: string, prefix: string) {
|
|
@@ -32,6 +45,55 @@ export function hasRDFaAttribute(
|
|
|
32
45
|
return false;
|
|
33
46
|
}
|
|
34
47
|
|
|
48
|
+
export function hasOutgoingNamedNodeTriple(
|
|
49
|
+
rdfaAttrs: Attrs | false,
|
|
50
|
+
predicate: Resource,
|
|
51
|
+
object: Resource | string,
|
|
52
|
+
) {
|
|
53
|
+
if (
|
|
54
|
+
!rdfaAttrs ||
|
|
55
|
+
!isRdfaAttrs(rdfaAttrs) ||
|
|
56
|
+
rdfaAttrs.rdfaNodeType !== 'resource'
|
|
57
|
+
) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return rdfaAttrs.properties.some((prop) => {
|
|
61
|
+
return (
|
|
62
|
+
prop.object.termType === 'NamedNode' &&
|
|
63
|
+
predicate.matches(prop.predicate) &&
|
|
64
|
+
(typeof object === 'string'
|
|
65
|
+
? prop.object.value === object
|
|
66
|
+
: object.matches(prop.object.value))
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function getOutgoingTriple(rdfaAttrs: Attrs, predicate: Resource) {
|
|
72
|
+
return (isRdfaAttrs(rdfaAttrs) &&
|
|
73
|
+
rdfaAttrs.rdfaNodeType === 'resource' &&
|
|
74
|
+
rdfaAttrs.properties.find((prop) =>
|
|
75
|
+
predicate.matches(prop.predicate),
|
|
76
|
+
)) as Option<OutgoingTriple>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function getOutgoingTripleList(rdfaAttrs: Attrs, predicate: Resource) {
|
|
80
|
+
return (
|
|
81
|
+
(isRdfaAttrs(rdfaAttrs) &&
|
|
82
|
+
rdfaAttrs.rdfaNodeType === 'resource' &&
|
|
83
|
+
rdfaAttrs.properties.filter((prop) =>
|
|
84
|
+
predicate.matches(prop.predicate),
|
|
85
|
+
)) ||
|
|
86
|
+
[]
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function hasBacklink(rdfaAttrs: RdfaAttrs | false, predicate: Resource) {
|
|
91
|
+
return (
|
|
92
|
+
rdfaAttrs &&
|
|
93
|
+
rdfaAttrs.backlinks.some((bl) => predicate.matches(bl.predicate))
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
35
97
|
export function findChildWithRdfaAttribute(
|
|
36
98
|
element: Element,
|
|
37
99
|
attr: string,
|
|
@@ -43,18 +105,6 @@ export function findChildWithRdfaAttribute(
|
|
|
43
105
|
});
|
|
44
106
|
}
|
|
45
107
|
|
|
46
|
-
export function pnodeHasRdfaAttribute(
|
|
47
|
-
node: PNode,
|
|
48
|
-
attr: string,
|
|
49
|
-
value: Resource,
|
|
50
|
-
) {
|
|
51
|
-
const result = (node.attrs[attr] as string | null)?.split(' ');
|
|
52
|
-
if (result) {
|
|
53
|
-
return result.includes(value.full) || result.includes(value.prefixed);
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
108
|
export function expandPrefixedString(
|
|
59
109
|
base: string,
|
|
60
110
|
prefix: string,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as RDF from '@rdfjs/types';
|
|
2
2
|
import { optionMapOr } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
|
|
3
3
|
|
|
4
|
+
export type BindingObject<Obj extends Record<string, string>> = Record<
|
|
5
|
+
keyof Obj,
|
|
6
|
+
{ value: string }
|
|
7
|
+
>;
|
|
8
|
+
|
|
4
9
|
export interface QueryResult<Binding = Record<string, RDF.Term>> {
|
|
5
10
|
results: {
|
|
6
11
|
bindings: Binding[];
|
|
@@ -13,6 +18,9 @@ interface QueryConfig {
|
|
|
13
18
|
abortSignal?: AbortSignal;
|
|
14
19
|
}
|
|
15
20
|
|
|
21
|
+
export const sparqlEscapeString = (value: string) =>
|
|
22
|
+
'"""' + value.replace(/[\\"]/g, (match) => '\\' + match) + '"""';
|
|
23
|
+
|
|
16
24
|
export async function executeQuery<Binding = Record<string, RDF.Term>>({
|
|
17
25
|
query,
|
|
18
26
|
endpoint,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/common/search/alert-load-error';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/common/search/alert-no-items';
|
package/app/components/{snippet-plugin/helpers/alert-load-error.js → common/search/loading.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/common/search/loading';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-insert-rdfa';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-list-select-rdfa';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/worship-plugin/administrative-unit-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/worship-plugin/insert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/worship-plugin/list';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/worship-plugin/search-modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/worship-plugin/sortable-table-header';
|
|
@@ -1,7 +1,110 @@
|
|
|
1
|
-
[typeof=
|
|
1
|
+
[typeof='say:Paragraph'] {
|
|
2
2
|
display: flex;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
> [data-content-container='true'] {
|
|
5
|
+
display: flex;
|
|
6
|
+
// align-items: flex-start;
|
|
7
|
+
|
|
8
|
+
> span:first-child {
|
|
9
|
+
display: inline-block;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[property='eli:number'],
|
|
14
|
+
[contenteditable='false'],
|
|
15
|
+
[property='say:body'] {
|
|
5
16
|
margin-top: 0;
|
|
6
17
|
}
|
|
7
|
-
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rdfa-editing .say-editable {
|
|
21
|
+
outline: 0.1rem solid var(--au-gray-300);
|
|
22
|
+
padding-top: 2px;
|
|
23
|
+
padding-bottom: 2px;
|
|
24
|
+
padding-left: 0;
|
|
25
|
+
padding-right: 0;
|
|
26
|
+
margin-right: 0;
|
|
27
|
+
margin-top: 2px;
|
|
28
|
+
margin-bottom: 2px;
|
|
29
|
+
border-radius: 0;
|
|
30
|
+
background-color: white;
|
|
31
|
+
[property='say:body'] {
|
|
32
|
+
outline: 0;
|
|
33
|
+
}
|
|
34
|
+
&[typeof='say:Title'],
|
|
35
|
+
&[typeof='say:Chapter'],
|
|
36
|
+
&[typeof='say:Section'],
|
|
37
|
+
&[typeof='say:Subsection'],
|
|
38
|
+
&[typeof='say:Article'] {
|
|
39
|
+
background-color: var(--au-gray-200);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
|
|
42
|
+
h1,
|
|
43
|
+
h2,
|
|
44
|
+
h3,
|
|
45
|
+
h4,
|
|
46
|
+
h5,
|
|
47
|
+
h6,
|
|
48
|
+
[property='say:heading'] {
|
|
49
|
+
background-color: var(--au-gray-100);
|
|
50
|
+
margin-bottom: 0;
|
|
51
|
+
padding-left: 1em;
|
|
52
|
+
cursor: auto;
|
|
53
|
+
}
|
|
54
|
+
span[property='say:heading'] {
|
|
55
|
+
width: 100%;
|
|
56
|
+
display: inline-block;
|
|
57
|
+
}
|
|
58
|
+
[property='say:body'] {
|
|
59
|
+
cursor: auto;
|
|
60
|
+
padding-left: 0.5em;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
&[typeof='say:Article'] [property='say:heading'] {
|
|
64
|
+
font-weight: bold;
|
|
65
|
+
}
|
|
66
|
+
&.say-active {
|
|
67
|
+
outline: 0.2rem solid var(--au-blue-500);
|
|
68
|
+
}
|
|
69
|
+
&.ProseMirror-selectednode {
|
|
70
|
+
background-color: var(--au-blue-200);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
[typeof='say:Paragraph'] > [data-content-container='true'] {
|
|
74
|
+
background-color: var(--au-gray-200);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
width: 100%;
|
|
77
|
+
margin: 0;
|
|
78
|
+
.article-header-number {
|
|
79
|
+
display: inline-block;
|
|
80
|
+
width: auto;
|
|
81
|
+
}
|
|
82
|
+
> span {
|
|
83
|
+
display: inline-block;
|
|
84
|
+
width: 2em;
|
|
85
|
+
}
|
|
86
|
+
.say-active {
|
|
87
|
+
outline: 0;
|
|
88
|
+
}
|
|
89
|
+
[property='say:body'] {
|
|
90
|
+
background-color: white;
|
|
91
|
+
cursor: auto;
|
|
92
|
+
padding-left: 0.5em;
|
|
93
|
+
width: 100%;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
.say-editable[typeof='say:Paragraph'] {
|
|
97
|
+
padding: 0 !important;
|
|
98
|
+
margin: 0;
|
|
99
|
+
margin-bottom: 0.5em;
|
|
100
|
+
.say-editable[property='say:body'] {
|
|
101
|
+
padding: 0.5em;
|
|
102
|
+
margin: 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
.rdfa-annotations [property] {
|
|
106
|
+
border-bottom-style: none !important;
|
|
107
|
+
}
|
|
108
|
+
.rdfa-annotations [typeof] {
|
|
109
|
+
border-bottom-style: none !important;
|
|
110
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.worship-modal {
|
|
2
|
+
&--main-container {
|
|
3
|
+
height: 100% !important;
|
|
4
|
+
|
|
5
|
+
#content {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&--list-container {
|
|
12
|
+
overflow: auto;
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.error-code {
|
|
17
|
+
font-family: var(--au-font-tertiary);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as replaceSelectionWithAndSelectNode } from './replace-selection-and-select-node';
|
|
@@ -7,6 +7,7 @@ type Args = {
|
|
|
7
7
|
options: ArticleStructurePluginOptions;
|
|
8
8
|
};
|
|
9
9
|
export default class EditorPluginsArticleStructureCardComponent extends Component<Args> {
|
|
10
|
+
AddIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/add").AddIconSignature>;
|
|
10
11
|
intl: IntlService;
|
|
11
12
|
get structureTypes(): ArticleStructurePluginOptions;
|
|
12
13
|
get controller(): SayController;
|
package/{components → declarations/addon/components}/article-structure-plugin/structure-card.d.ts
RENAMED
|
@@ -7,19 +7,22 @@ type Args = {
|
|
|
7
7
|
options: ArticleStructurePluginOptions;
|
|
8
8
|
};
|
|
9
9
|
export default class EditorPluginsStructureCardComponent extends Component<Args> {
|
|
10
|
+
BinIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/bin").BinIconSignature>;
|
|
11
|
+
ChevronDownIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/chevron-down").ChevronDownIconSignature>;
|
|
12
|
+
ChevronUpIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/chevron-up").ChevronUpIconSignature>;
|
|
10
13
|
intl: IntlService;
|
|
11
14
|
removeStructureContent: boolean;
|
|
12
15
|
startNumber: number | null;
|
|
13
16
|
get controller(): SayController;
|
|
14
17
|
moveStructure(direction: 'up' | 'down'): void;
|
|
18
|
+
removeStructure(withContent: boolean): void;
|
|
19
|
+
setRemoveStructureContent(value: boolean): void;
|
|
15
20
|
setStructureStartNumber(): void;
|
|
16
21
|
resetStructureStartNumber(): void;
|
|
17
22
|
get structureNumber(): number | null | undefined;
|
|
18
23
|
get structureStartNumber(): number | null | undefined;
|
|
19
24
|
get startNumberInputValue(): number | "";
|
|
20
25
|
onStartNumberChange: (event: InputEvent) => void;
|
|
21
|
-
removeStructure(withContent: boolean): void;
|
|
22
|
-
setRemoveStructureContent(value: boolean): void;
|
|
23
26
|
get structureTypes(): ArticleStructurePluginOptions;
|
|
24
27
|
get structureNodeSpecs(): import("prosemirror-model").NodeType[];
|
|
25
28
|
get structure(): {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
+
import { ComponentLike } from '@glint/template';
|
|
2
3
|
interface Args {
|
|
3
4
|
width?: 'block';
|
|
4
5
|
iconAlignment?: 'left' | 'right';
|
|
@@ -6,7 +7,7 @@ interface Args {
|
|
|
6
7
|
warning?: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
type?: string;
|
|
9
|
-
icon?:
|
|
10
|
+
icon?: ComponentLike;
|
|
10
11
|
}
|
|
11
12
|
export default class AuNativeInput extends Component<Args> {
|
|
12
13
|
constructor(owner: unknown, args: Args);
|
package/{components → declarations/addon/components}/besluit-type-plugin/besluit-type-select.d.ts
RENAMED
|
@@ -4,6 +4,7 @@ type Args = {
|
|
|
4
4
|
besluitTypes: BesluitType[];
|
|
5
5
|
};
|
|
6
6
|
export default class BesluitTypePluginBesluitTypeSelectComponent extends Component<Args> {
|
|
7
|
+
AlertTriangleIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/alert-triangle").AlertTriangleIconSignature>;
|
|
7
8
|
besluitTypes: BesluitType[];
|
|
8
9
|
constructor(parent: unknown, args: Args);
|
|
9
10
|
search(term: string): BesluitType[];
|
package/{components → declarations/addon/components}/besluit-type-plugin/toolbar-dropdown.d.ts
RENAMED
|
@@ -3,16 +3,15 @@ import { SayController } from '@lblod/ember-rdfa-editor';
|
|
|
3
3
|
import { ResolvedPNode } from '@lblod/ember-rdfa-editor/plugins/datastore';
|
|
4
4
|
import { BesluitType } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-type-plugin/utils/fetchBesluitTypes';
|
|
5
5
|
import { BesluitTypePluginOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-type-plugin';
|
|
6
|
-
declare module 'ember__owner' {
|
|
7
|
-
export default interface Owner {
|
|
8
|
-
resolveRegistration(name: string): unknown;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
6
|
type Args = {
|
|
12
7
|
controller: SayController;
|
|
13
8
|
options: BesluitTypePluginOptions;
|
|
14
9
|
};
|
|
15
10
|
export default class EditorPluginsToolbarDropdownComponent extends Component<Args> {
|
|
11
|
+
CircleIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/circle-x").CircleXIconSignature>;
|
|
12
|
+
MailIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/mail").MailIconSignature>;
|
|
13
|
+
CrossIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/cross").CrossIconSignature>;
|
|
14
|
+
AlertTriangleIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/alert-triangle").AlertTriangleIconSignature>;
|
|
16
15
|
/**
|
|
17
16
|
* Actual besluit type selected
|
|
18
17
|
* @property besluitType
|