@lblod/ember-rdfa-editor-lblod-plugins 0.4.0 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/addon/commands/article-structure-plugin/delete-structure.ts +85 -0
- package/addon/commands/article-structure-plugin/index.ts +4 -0
- package/addon/commands/article-structure-plugin/insert-article-structure.ts +137 -0
- package/addon/commands/article-structure-plugin/move-structure.ts +227 -0
- package/addon/commands/article-structure-plugin/recalculate-structure-numbers.ts +88 -0
- package/addon/commands/besluit-plugin/get-article-nodes-for-besluit.ts +30 -0
- package/addon/commands/besluit-plugin/index.ts +4 -0
- package/addon/commands/besluit-plugin/insert-article.ts +94 -0
- package/addon/commands/besluit-plugin/insert-title.ts +67 -0
- package/addon/commands/besluit-plugin/move-article.ts +69 -0
- package/addon/commands/besluit-plugin/recalculate-article-numbers.ts +44 -0
- package/addon/commands/modify-date-command.ts +48 -0
- package/addon/components/article-structure-plugin/article-structure-card.hbs +14 -0
- package/addon/components/article-structure-plugin/article-structure-card.ts +83 -0
- package/addon/components/article-structure-plugin/structure-card.hbs +42 -0
- package/addon/components/article-structure-plugin/structure-card.ts +140 -0
- package/addon/components/au-native-input.hbs +30 -0
- package/addon/components/au-native-input.ts +47 -0
- package/addon/components/besluit-plugin/besluit-context-card.hbs +44 -0
- package/addon/components/besluit-plugin/besluit-context-card.ts +144 -0
- package/addon/components/besluit-plugin/besluit-plugin-card.hbs +20 -0
- package/addon/components/besluit-plugin/besluit-plugin-card.ts +42 -0
- package/addon/components/besluit-type-plugin/{besluit-type-select.js → besluit-type-select.ts} +9 -4
- package/addon/components/besluit-type-plugin/toolbar-dropdown.hbs +2 -0
- package/addon/components/besluit-type-plugin/toolbar-dropdown.ts +216 -0
- package/addon/components/citation-plugin/citation-card.hbs +118 -0
- package/addon/components/citation-plugin/citation-card.ts +230 -0
- package/addon/components/citation-plugin/citation-insert.hbs +20 -0
- package/addon/components/citation-plugin/citation-insert.ts +102 -0
- package/addon/components/{citaten-plugin → citation-plugin}/citations/article-list.hbs +2 -2
- package/addon/components/{citaten-plugin → citation-plugin}/citations/article-preview.hbs +0 -0
- package/addon/components/{citaten-plugin → citation-plugin}/citations/decision-detail.hbs +9 -6
- package/addon/components/{citaten-plugin/citations/decision-detail.js → citation-plugin/citations/decision-detail.ts} +30 -31
- package/addon/components/{citaten-plugin → citation-plugin}/citations/decision-list.hbs +2 -2
- package/addon/components/{citaten-plugin → citation-plugin}/citations/decision-preview.hbs +0 -0
- package/addon/components/citation-plugin/citations/search-modal.hbs +254 -0
- package/addon/components/{citaten-plugin/citations/search-modal.js → citation-plugin/citations/search-modal.ts} +116 -89
- package/addon/components/{citaten-plugin → citation-plugin}/helpers/alert-load-error.hbs +1 -1
- package/addon/components/{citaten-plugin → citation-plugin}/helpers/alert-no-items.hbs +1 -1
- package/addon/components/import-snippet-plugin/card.ts +119 -0
- package/addon/components/insert-variable-plugin/insert-variable-card.hbs +2 -1
- package/addon/components/insert-variable-plugin/insert-variable-card.ts +134 -0
- package/addon/components/rdfa-date-plugin/{rdfa-date-plugin-card.hbs → card.hbs} +3 -1
- package/addon/components/rdfa-date-plugin/card.ts +72 -0
- package/addon/components/rdfa-date-plugin/{rdfa-date-time-picker.hbs → date-time-picker.hbs} +0 -0
- package/addon/components/rdfa-date-plugin/{rdfa-date-time-picker.js → date-time-picker.ts} +26 -12
- package/addon/components/rdfa-date-plugin/{rdfa-date-plugin-insert.hbs → insert.hbs} +0 -0
- package/addon/components/rdfa-date-plugin/insert.ts +44 -0
- package/addon/components/roadsign-regulation-plugin/expanded-measure.ts +58 -0
- package/addon/components/roadsign-regulation-plugin/measure-template.ts +35 -0
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.hbs +2 -2
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.ts +60 -0
- package/addon/components/roadsign-regulation-plugin/{roadsigns-modal.js → roadsigns-modal.ts} +101 -64
- package/addon/components/roadsign-regulation-plugin/{roadsigns-pagination.js → roadsigns-pagination.ts} +7 -3
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.ts +32 -0
- package/addon/components/standard-template-plugin/{template-card.hbs → card.hbs} +0 -0
- package/addon/components/standard-template-plugin/card.ts +11 -0
- package/addon/components/standard-template-plugin/template-provider.hbs +3 -1
- package/addon/components/standard-template-plugin/template-provider.ts +75 -0
- package/addon/components/table-of-contents-plugin/card.hbs +12 -1
- package/addon/components/table-of-contents-plugin/card.ts +60 -0
- package/addon/components/table-of-contents-plugin/{inline-components → ember-nodes}/outline.hbs +2 -2
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.hbs +9 -0
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.ts +95 -0
- package/addon/components/template-variable-plugin/template-variable-card.hbs +2 -1
- package/addon/components/template-variable-plugin/template-variable-card.ts +227 -0
- package/addon/{constants.js → constants.ts} +15 -3
- package/addon/ember-nodes/table-of-contents.ts +53 -0
- package/addon/helpers/{limit-text.js → limit-text.ts} +2 -2
- package/addon/initializers/plugin-initializer.js +0 -75
- package/addon/models/instruction.ts +18 -0
- package/addon/models/measure.ts +38 -0
- package/addon/models/sign.ts +36 -0
- package/addon/models/template.ts +14 -0
- package/addon/plugins/article-structure-plugin.ts +55 -0
- package/addon/plugins/besluit-plugin.ts +27 -0
- package/addon/plugins/besluit-type-plugin.ts +6 -0
- package/addon/plugins/citation-plugin/index.ts +216 -0
- package/addon/plugins/citation-plugin/marks/citation.ts +27 -0
- package/addon/plugins/citation-plugin/utils/cited-text.ts +17 -0
- package/addon/plugins/citation-plugin/utils/process-match.ts +135 -0
- package/addon/{utils/vlaamse-codex.js → plugins/citation-plugin/utils/vlaamse-codex.ts} +161 -42
- package/addon/plugins/import-snippet-plugin.ts +6 -0
- package/addon/plugins/insert-variable-plugin.ts +11 -0
- package/addon/plugins/rdfa-date-plugin.ts +11 -0
- package/addon/plugins/roadsign-regulation-plugin.ts +6 -0
- package/addon/plugins/standard-template-plugin.ts +6 -0
- package/addon/plugins/table-of-contents-plugin.ts +14 -0
- package/addon/plugins/template-variable-plugin.ts +6 -0
- package/addon/services/{import-rdfa-snippet.js → import-rdfa-snippet.ts} +48 -36
- package/addon/services/roadsign-registry.ts +288 -0
- package/addon/services/{standard-template-plugin.js → standard-template-plugin.ts} +17 -11
- package/addon/utils/article-structure-plugin/constants.ts +260 -0
- package/addon/utils/article-structure-plugin/defaults.ts +3 -0
- package/addon/utils/article-structure-plugin/options-with-defaults.ts +31 -0
- package/addon/utils/article-structure-plugin/validate-datastore.ts +23 -0
- package/addon/utils/besluit-plugin/get-title-for-decision.ts +35 -0
- package/addon/utils/{fetchBesluitTypes.js → fetchBesluitTypes.ts} +36 -16
- package/addon/utils/generate-template-plugin/{default-resources.js → default-resources.ts} +0 -0
- package/addon/utils/{instantiate-uuids.js → instantiate-uuids.ts} +9 -6
- package/addon/utils/{legislation-types.js → legislation-types.ts} +17 -3
- package/addon/utils/{memoize.js → memoize.ts} +4 -2
- package/addon/utils/option.ts +58 -0
- package/addon/utils/roadsign-regulation-plugin/{fetchData.js → fetchData.ts} +19 -2
- package/addon/utils/roadsign-regulation-plugin/includeInstructions.ts +16 -0
- package/addon/utils/romanize.ts +47 -0
- package/addon/utils/variable-plugins/{default-variable-types.js → default-variable-types.ts} +18 -7
- package/addon/utils/variable-plugins/{fetch-data.js → fetch-data.ts} +43 -15
- package/app/components/article-structure-plugin/article-structure-card.js +1 -0
- package/app/components/article-structure-plugin/structure-card.js +1 -0
- package/app/components/{citaten-plugin/citaat-card.js → au-native-input.js} +1 -1
- package/app/components/{citaten-plugin/citations/article-list.js → besluit-plugin/besluit-context-card.js} +1 -1
- package/app/components/besluit-plugin/besluit-plugin-card.js +1 -0
- package/app/components/{citaten-plugin/citations/modal.js → citation-plugin/citation-card.js} +1 -1
- package/app/components/citation-plugin/citation-insert.js +1 -0
- package/app/components/{citaten-plugin/citations/decision-list.js → citation-plugin/citations/article-list.js} +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/citations/article-preview.js +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/citations/decision-detail.js +1 -1
- package/app/components/citation-plugin/citations/decision-list.js +1 -0
- package/app/components/{citaten-plugin → citation-plugin}/citations/decision-preview.js +1 -1
- package/app/components/citation-plugin/citations/modal.js +1 -0
- package/app/components/{citaten-plugin → citation-plugin}/citations/search-modal.js +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/helpers/alert-load-error.js +1 -1
- package/app/components/{citaten-plugin → citation-plugin}/helpers/alert-no-items.js +1 -1
- package/app/components/{citaten-plugin/citaat-insert.js → rdfa-date-plugin/card.js} +1 -1
- package/app/components/rdfa-date-plugin/date-time-picker.js +1 -0
- package/app/components/rdfa-date-plugin/insert.js +1 -0
- package/app/components/standard-template-plugin/card.js +1 -0
- package/app/components/table-of-contents-plugin/ember-nodes/outline.js +1 -0
- package/app/components/table-of-contents-plugin/ember-nodes/table-of-contents.js +1 -0
- package/app/styles/citaten-plugin.scss +1 -1
- package/commands/article-structure-plugin/delete-structure.d.ts +4 -0
- package/commands/article-structure-plugin/index.d.ts +4 -0
- package/commands/article-structure-plugin/insert-article-structure.d.ts +6 -0
- package/commands/article-structure-plugin/move-structure.d.ts +5 -0
- package/commands/article-structure-plugin/recalculate-structure-numbers.d.ts +7 -0
- package/commands/besluit-plugin/get-article-nodes-for-besluit.d.ts +5 -0
- package/commands/besluit-plugin/index.d.ts +4 -0
- package/commands/besluit-plugin/insert-article.d.ts +3 -0
- package/commands/besluit-plugin/insert-title.d.ts +2 -0
- package/commands/besluit-plugin/move-article.d.ts +2 -0
- package/commands/besluit-plugin/recalculate-article-numbers.d.ts +2 -0
- package/commands/modify-date-command.d.ts +2 -0
- package/components/article-structure-plugin/article-structure-card.d.ts +36 -0
- package/components/article-structure-plugin/structure-card.d.ts +23 -0
- package/components/au-native-input.d.ts +20 -0
- package/components/besluit-plugin/besluit-context-card.d.ts +29 -0
- package/components/besluit-plugin/besluit-plugin-card.d.ts +14 -0
- package/components/besluit-type-plugin/besluit-type-select.d.ts +11 -0
- package/components/besluit-type-plugin/toolbar-dropdown.d.ts +46 -0
- package/components/citation-plugin/citation-card.d.ts +51 -0
- package/components/citation-plugin/citation-insert.d.ts +24 -0
- package/components/citation-plugin/citations/decision-detail.d.ts +26 -0
- package/components/citation-plugin/citations/search-modal.d.ts +67 -0
- package/components/import-snippet-plugin/card.d.ts +19 -0
- package/components/insert-variable-plugin/insert-variable-card.d.ts +31 -0
- package/components/rdfa-date-plugin/card.d.ts +20 -0
- package/components/rdfa-date-plugin/date-time-picker.d.ts +32 -0
- package/components/rdfa-date-plugin/insert.d.ts +12 -0
- package/components/roadsign-regulation-plugin/expanded-measure.d.ts +20 -0
- package/components/roadsign-regulation-plugin/measure-template.d.ts +14 -0
- package/components/roadsign-regulation-plugin/roadsign-regulation-card.d.ts +12 -0
- package/components/roadsign-regulation-plugin/roadsigns-modal.d.ts +57 -0
- package/components/roadsign-regulation-plugin/roadsigns-pagination.d.ts +19 -0
- package/components/roadsign-regulation-plugin/roadsigns-table.d.ts +9 -0
- package/components/standard-template-plugin/card.d.ts +9 -0
- package/components/standard-template-plugin/template-provider.d.ts +17 -0
- package/components/table-of-contents-plugin/card.d.ts +20 -0
- package/components/table-of-contents-plugin/ember-nodes/table-of-contents.d.ts +22 -0
- package/components/template-variable-plugin/template-variable-card.d.ts +27 -0
- package/constants.d.ts +11 -0
- package/ember-nodes/table-of-contents.d.ts +4 -0
- package/helpers/limit-text.d.ts +8 -0
- package/index.js +5 -0
- package/models/instruction.d.ts +8 -0
- package/models/measure.d.ts +14 -0
- package/models/sign.d.ts +12 -0
- package/models/template.d.ts +13 -0
- package/package.json +27 -8
- package/plugins/article-structure-plugin.d.ts +29 -0
- package/plugins/besluit-plugin.d.ts +9 -0
- package/plugins/besluit-type-plugin.d.ts +2 -0
- package/plugins/citation-plugin/index.d.ts +31 -0
- package/plugins/citation-plugin/marks/citation.d.ts +2 -0
- package/plugins/citation-plugin/utils/cited-text.d.ts +3 -0
- package/plugins/citation-plugin/utils/process-match.d.ts +23 -0
- package/plugins/citation-plugin/utils/vlaamse-codex.d.ts +56 -0
- package/plugins/import-snippet-plugin.d.ts +2 -0
- package/plugins/insert-variable-plugin.d.ts +2 -0
- package/plugins/rdfa-date-plugin.d.ts +3 -0
- package/plugins/roadsign-regulation-plugin.d.ts +2 -0
- package/plugins/standard-template-plugin.d.ts +2 -0
- package/plugins/table-of-contents-plugin.d.ts +3 -0
- package/plugins/template-variable-plugin.d.ts +2 -0
- package/services/import-rdfa-snippet.d.ts +99 -0
- package/services/roadsign-registry.d.ts +42 -0
- package/services/standard-template-plugin.d.ts +21 -0
- package/translations/en-US.yaml +47 -1
- package/translations/nl-BE.yaml +49 -3
- package/tsconfig.json +36 -9
- package/types/config/environment.d.ts +22 -0
- package/types/ember-mu-transform-helpers/transforms/string-set.d.ts +14 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/account.d.ts +10 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid-classificatie-code.d.ts +10 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid.d.ts +12 -0
- package/types/lblod/frontend-gelinkt-notuleren/models/gebruiker-model.d.ts +18 -0
- package/types/lblod/frontend-gelinkt-notuleren/services/current-session.d.ts +30 -0
- package/types/lblod/marawa/dom-helpers.d.ts +4 -0
- package/types/lblod/marawa/ember-object-mock.d.ts +3 -0
- package/types/lblod/marawa/node-walker.d.ts +18 -0
- package/types/lblod/marawa/range-helpers.d.ts +10 -0
- package/types/lblod/marawa/rdfa-attributes.d.ts +25 -0
- package/types/lblod/marawa/rdfa-block.d.ts +22 -0
- package/types/lblod/marawa/rdfa-context-scanner.d.ts +13 -0
- package/types/lblod/marawa/rdfa-helpers.d.ts +22 -0
- package/types/lblod/marawa/rich-node.d.ts +50 -0
- package/types/lblod/marawa/triple.d.ts +16 -0
- package/utils/article-structure-plugin/constants.d.ts +2 -0
- package/utils/article-structure-plugin/defaults.d.ts +4 -0
- package/utils/article-structure-plugin/options-with-defaults.d.ts +2 -0
- package/utils/article-structure-plugin/validate-datastore.d.ts +3 -0
- package/utils/besluit-plugin/get-title-for-decision.d.ts +10 -0
- package/utils/fetchBesluitTypes.d.ts +12 -0
- package/utils/generate-template-plugin/default-resources.d.ts +2 -0
- package/utils/instantiate-uuids.d.ts +1 -0
- package/utils/legislation-types.d.ts +24 -0
- package/utils/memoize.d.ts +1 -0
- package/utils/option.d.ts +14 -0
- package/utils/roadsign-regulation-plugin/fetchData.d.ts +8 -0
- package/utils/roadsign-regulation-plugin/includeInstructions.d.ts +2 -0
- package/utils/romanize.d.ts +2 -0
- package/utils/variable-plugins/default-variable-types.d.ts +7 -0
- package/utils/variable-plugins/fetch-data.d.ts +14 -0
- package/addon/commands/generate-template-command.js +0 -35
- package/addon/commands/insert-and-collapse.js +0 -32
- package/addon/commands/modify-date-command.js +0 -42
- package/addon/components/besluit-type-plugin/toolbar-dropdown.js +0 -188
- package/addon/components/citaten-plugin/citaat-card.hbs +0 -76
- package/addon/components/citaten-plugin/citaat-card.js +0 -286
- package/addon/components/citaten-plugin/citaat-insert.hbs +0 -20
- package/addon/components/citaten-plugin/citaat-insert.js +0 -68
- package/addon/components/citaten-plugin/citations/search-modal.hbs +0 -175
- package/addon/components/import-snippet-plugin/card.js +0 -95
- package/addon/components/insert-variable-plugin/insert-variable-card.js +0 -125
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-card.js +0 -64
- package/addon/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +0 -24
- package/addon/components/roadsign-regulation-plugin/expanded-measure.js +0 -38
- package/addon/components/roadsign-regulation-plugin/measure-template.js +0 -30
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.js +0 -101
- package/addon/components/roadsign-regulation-plugin/roadsigns-table.js +0 -24
- package/addon/components/standard-template-plugin/template-card.js +0 -7
- package/addon/components/standard-template-plugin/template-provider.js +0 -75
- package/addon/components/table-of-contents-plugin/card.js +0 -53
- package/addon/components/table-of-contents-plugin/inline-components/table-of-contents.hbs +0 -9
- package/addon/components/table-of-contents-plugin/inline-components/table-of-contents.js +0 -100
- package/addon/components/template-variable-plugin/template-variable-card.js +0 -230
- package/addon/inline-components/table-of-contents.js +0 -43
- package/addon/models/instruction.js +0 -19
- package/addon/models/measure.js +0 -46
- package/addon/models/sign.js +0 -37
- package/addon/models/template.js +0 -9
- package/addon/plugins/besluit-type-plugin.js +0 -16
- package/addon/plugins/citaten-plugin.js +0 -22
- package/addon/plugins/import-snippet-plugin.js +0 -16
- package/addon/plugins/insert-variable-plugin.js +0 -19
- package/addon/plugins/rdfa-date-plugin.js +0 -26
- package/addon/plugins/roadsign-regulation-plugin.js +0 -24
- package/addon/plugins/standard-template-plugin.js +0 -33
- package/addon/plugins/table-of-contents-plugin.js +0 -27
- package/addon/plugins/template-variable-plugin.js +0 -21
- package/addon/services/roadsign-registry.js +0 -240
- package/addon/utils/processMatch.js +0 -80
- package/addon/utils/roadsign-regulation-plugin/includeInstructions.js +0 -10
- package/app/components/rdfa-date-plugin/rdfa-date-plugin-card.js +0 -1
- package/app/components/rdfa-date-plugin/rdfa-date-plugin-insert.js +0 -1
- package/app/components/rdfa-date-plugin/rdfa-date-time-picker.js +0 -1
- package/app/components/standard-template-plugin/template-card.js +0 -1
- package/app/components/table-of-contents-plugin/inline-components/outline.js +0 -1
- package/app/components/table-of-contents-plugin/inline-components/table-of-contents.js +0 -1
- package/app/initializers/plugin-initializer.js +0 -4
- package/types/dummy/index.d.ts +0 -1
- package/types/ember-data/types/registries/model.d.ts +0 -6
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{{#if this.activeArticle}}
|
|
2
|
+
<AuCard
|
|
3
|
+
@shadow={{true}}
|
|
4
|
+
@size="flush" as |c|>
|
|
5
|
+
<c.header class="au-u-hidden-visually">
|
|
6
|
+
<AuHeading @level="3" @skin="6">
|
|
7
|
+
{{t "besluit-plugin.card.title"}}
|
|
8
|
+
</AuHeading>
|
|
9
|
+
</c.header>
|
|
10
|
+
<c.content class="au-c-content--small">
|
|
11
|
+
<AuList @divider={{true}} class="au-u-padding-top-tiny au-u-padding-bottom-tiny">
|
|
12
|
+
<AuList::Item>
|
|
13
|
+
<AuButton
|
|
14
|
+
@icon="bin"
|
|
15
|
+
@iconAlignment="left"
|
|
16
|
+
@skin="link"
|
|
17
|
+
{{on 'click' this.deleteArticle}}>
|
|
18
|
+
{{t "besluit-plugin.action.delete-article"}}
|
|
19
|
+
</AuButton>
|
|
20
|
+
</AuList::Item>
|
|
21
|
+
<AuList::Item>
|
|
22
|
+
<AuButton
|
|
23
|
+
@icon="nav-up"
|
|
24
|
+
@iconAlignment="left"
|
|
25
|
+
@skin="link"
|
|
26
|
+
@disabled={{this.disableMoveUp}}
|
|
27
|
+
{{on 'click' this.moveUpArticle}}>
|
|
28
|
+
{{t "besluit-plugin.action.article-up"}}
|
|
29
|
+
</AuButton>
|
|
30
|
+
</AuList::Item>
|
|
31
|
+
<AuList::Item>
|
|
32
|
+
<AuButton
|
|
33
|
+
@icon="nav-down"
|
|
34
|
+
@iconAlignment="left"
|
|
35
|
+
@skin="link"
|
|
36
|
+
@disabled={{this.disableMoveDown}}
|
|
37
|
+
{{on 'click' this.moveDownArticle}}>
|
|
38
|
+
{{t "besluit-plugin.action.article-down"}}
|
|
39
|
+
</AuButton>
|
|
40
|
+
</AuList::Item>
|
|
41
|
+
</AuList>
|
|
42
|
+
</c.content>
|
|
43
|
+
</AuCard>
|
|
44
|
+
{{/if}}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { tracked } from '@glimmer/tracking';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import {
|
|
5
|
+
moveArticle,
|
|
6
|
+
recalculateArticleNumbers,
|
|
7
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/commands/besluit-plugin';
|
|
8
|
+
import { ResolvedPNode } from '@lblod/ember-rdfa-editor/plugins/datastore';
|
|
9
|
+
import { DecisionOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-plugin';
|
|
10
|
+
import { ProseController } from '@lblod/ember-rdfa-editor';
|
|
11
|
+
|
|
12
|
+
interface ContextCardWidgetArgs {
|
|
13
|
+
options?: DecisionOptions;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface Args {
|
|
17
|
+
controller: ProseController;
|
|
18
|
+
widgetArgs: ContextCardWidgetArgs;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default class BesluitContextCardComponent extends Component<Args> {
|
|
22
|
+
@tracked articleElement?: ResolvedPNode;
|
|
23
|
+
|
|
24
|
+
constructor(parent: unknown, args: Args) {
|
|
25
|
+
super(parent, args);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
get controller() {
|
|
29
|
+
return this.args.controller;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
get doc() {
|
|
33
|
+
return this.controller.state.doc;
|
|
34
|
+
}
|
|
35
|
+
focus() {
|
|
36
|
+
this.controller.focus();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@action
|
|
40
|
+
deleteArticle() {
|
|
41
|
+
if (this.activeArticle && this.besluitURI) {
|
|
42
|
+
const { from, to } = this.activeArticle.range;
|
|
43
|
+
this.controller.withTransaction((tr) => {
|
|
44
|
+
return tr.delete(from, to);
|
|
45
|
+
});
|
|
46
|
+
this.focus();
|
|
47
|
+
recalculateArticleNumbers(this.controller, this.besluitURI);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@action
|
|
52
|
+
moveUpArticle() {
|
|
53
|
+
if (this.besluitURI && this.activeArticle) {
|
|
54
|
+
this.controller.doCommand(
|
|
55
|
+
moveArticle(
|
|
56
|
+
this.controller,
|
|
57
|
+
this.besluitURI,
|
|
58
|
+
this.activeArticle.uri,
|
|
59
|
+
true
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@action
|
|
66
|
+
moveDownArticle() {
|
|
67
|
+
if (this.besluitURI && this.activeArticle) {
|
|
68
|
+
this.controller.doCommand(
|
|
69
|
+
moveArticle(
|
|
70
|
+
this.controller,
|
|
71
|
+
this.besluitURI,
|
|
72
|
+
this.activeArticle.uri,
|
|
73
|
+
false
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
get disableMoveUp() {
|
|
80
|
+
if (this.besluitURI && this.activeArticle) {
|
|
81
|
+
return !this.controller.checkCommand(
|
|
82
|
+
moveArticle(
|
|
83
|
+
this.controller,
|
|
84
|
+
this.besluitURI,
|
|
85
|
+
this.activeArticle.uri,
|
|
86
|
+
true
|
|
87
|
+
)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
get disableMoveDown() {
|
|
94
|
+
if (this.besluitURI && this.activeArticle) {
|
|
95
|
+
return !this.controller.checkCommand(
|
|
96
|
+
moveArticle(
|
|
97
|
+
this.controller,
|
|
98
|
+
this.besluitURI,
|
|
99
|
+
this.activeArticle.uri,
|
|
100
|
+
false
|
|
101
|
+
)
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
get besluitURI() {
|
|
108
|
+
const { from, to } = this.controller.state.selection;
|
|
109
|
+
|
|
110
|
+
const limitedDatastore = this.controller.datastore.limitToRange(
|
|
111
|
+
this.controller.state,
|
|
112
|
+
from,
|
|
113
|
+
to
|
|
114
|
+
);
|
|
115
|
+
return limitedDatastore
|
|
116
|
+
.match(null, 'a', 'besluit:Besluit')
|
|
117
|
+
.asQuadResultSet()
|
|
118
|
+
.first()?.subject.value;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
get activeArticle() {
|
|
122
|
+
if (this.besluitURI) {
|
|
123
|
+
const { from, to } = this.controller.state.selection;
|
|
124
|
+
|
|
125
|
+
const limitedDatastore = this.controller.datastore.limitToRange(
|
|
126
|
+
this.controller.state,
|
|
127
|
+
from,
|
|
128
|
+
to
|
|
129
|
+
);
|
|
130
|
+
const dsResult = [
|
|
131
|
+
...limitedDatastore
|
|
132
|
+
.match(null, 'a', 'besluit:Artikel')
|
|
133
|
+
.asSubjectNodeMapping(),
|
|
134
|
+
][0];
|
|
135
|
+
if (dsResult) {
|
|
136
|
+
return {
|
|
137
|
+
uri: dsResult.term.value,
|
|
138
|
+
range: dsResult.nodes[0],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<AuList::Item>
|
|
2
|
+
<AuButton
|
|
3
|
+
@icon="add"
|
|
4
|
+
@iconAlignment="left"
|
|
5
|
+
@skin="link"
|
|
6
|
+
@disabled={{this.hasTitle}}
|
|
7
|
+
{{on 'click' this.insertTitle}}>
|
|
8
|
+
{{t "besluit-plugin.insert.decision-title"}}
|
|
9
|
+
</AuButton>
|
|
10
|
+
</AuList::Item>
|
|
11
|
+
<AuList::Item>
|
|
12
|
+
<AuButton
|
|
13
|
+
@icon="add"
|
|
14
|
+
@iconAlignment="left"
|
|
15
|
+
@skin="link"
|
|
16
|
+
@disabled={{this.disableArticleInsert}}
|
|
17
|
+
{{on "click" this.insertArticle}}>
|
|
18
|
+
{{t "besluit-plugin.insert.article"}}
|
|
19
|
+
</AuButton>
|
|
20
|
+
</AuList::Item>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { action } from '@ember/object';
|
|
3
|
+
import {
|
|
4
|
+
insertTitle,
|
|
5
|
+
insertArticle,
|
|
6
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/commands/besluit-plugin';
|
|
7
|
+
import { ProseController } from '@lblod/ember-rdfa-editor';
|
|
8
|
+
|
|
9
|
+
type Args = {
|
|
10
|
+
controller: ProseController;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default class BesluitPluginCardComponent extends Component<Args> {
|
|
14
|
+
get controller() {
|
|
15
|
+
return this.args.controller;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
focus() {
|
|
19
|
+
this.controller.focus();
|
|
20
|
+
}
|
|
21
|
+
@action
|
|
22
|
+
insertArticle() {
|
|
23
|
+
this.controller.checkAndDoCommand(insertArticle(this.controller, '', ''));
|
|
24
|
+
this.focus();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@action
|
|
28
|
+
insertTitle() {
|
|
29
|
+
this.controller.doCommand(insertTitle(this.controller, ''));
|
|
30
|
+
this.focus();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get hasTitle() {
|
|
34
|
+
return !this.controller.checkCommand(insertTitle(this.controller, ''));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
get disableArticleInsert() {
|
|
38
|
+
return !this.controller.checkCommand(
|
|
39
|
+
insertArticle(this.controller, '', '')
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
package/addon/components/besluit-type-plugin/{besluit-type-select.js → besluit-type-select.ts}
RENAMED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { BesluitType } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/fetchBesluitTypes';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
type Args = {
|
|
7
|
+
besluitTypes: BesluitType[];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default class BesluitTypePluginBesluitTypeSelectComponent extends Component<Args> {
|
|
6
11
|
@tracked besluitTypes;
|
|
7
|
-
constructor() {
|
|
8
|
-
super(
|
|
12
|
+
constructor(parent: unknown, args: Args) {
|
|
13
|
+
super(parent, args);
|
|
9
14
|
this.besluitTypes = this.args.besluitTypes.sort((a, b) =>
|
|
10
15
|
a.label > b.label ? 1 : -1
|
|
11
16
|
);
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
@action
|
|
15
|
-
search(term) {
|
|
20
|
+
search(term: string) {
|
|
16
21
|
const lowerTerm = term.toLowerCase();
|
|
17
22
|
return this.args.besluitTypes.filter((besluitType) =>
|
|
18
23
|
besluitType.label.toLowerCase().includes(lowerTerm)
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { tracked } from '@glimmer/tracking';
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import { task } from 'ember-concurrency';
|
|
5
|
+
import { getOwner } from '@ember/application';
|
|
6
|
+
import fetchBesluitTypes, { BesluitType } from '../../utils/fetchBesluitTypes';
|
|
7
|
+
import { inject as service } from '@ember/service';
|
|
8
|
+
import {
|
|
9
|
+
addType,
|
|
10
|
+
removeType,
|
|
11
|
+
} from '@lblod/ember-rdfa-editor/commands/type-commands';
|
|
12
|
+
import { ProseController } from '@lblod/ember-rdfa-editor/core/prosemirror';
|
|
13
|
+
import CurrentSessionService from '@lblod/frontend-gelinkt-notuleren/services/current-session';
|
|
14
|
+
import { ResolvedPNode } from '@lblod/ember-rdfa-editor/plugins/datastore';
|
|
15
|
+
import { unwrap } from '@lblod/ember-rdfa-editor/utils/option';
|
|
16
|
+
import { getRdfaAttribute } from '@lblod/ember-rdfa-editor/utils/rdfa-utils';
|
|
17
|
+
declare module 'ember__owner' {
|
|
18
|
+
export default interface Owner {
|
|
19
|
+
resolveRegistration(name: string): unknown;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type Args = {
|
|
24
|
+
controller: ProseController;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default class EditorPluginsToolbarDropdownComponent extends Component<Args> {
|
|
28
|
+
@service declare currentSession: CurrentSessionService;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Actual besluit type selected
|
|
32
|
+
* @property besluitType
|
|
33
|
+
* @type BesluitType
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
@tracked besluitType?: BesluitType;
|
|
37
|
+
@tracked previousBesluitType?: string;
|
|
38
|
+
@tracked types: BesluitType[] = [];
|
|
39
|
+
|
|
40
|
+
//used to update selections since the other vars dont seem to work in octane
|
|
41
|
+
@tracked besluit?: BesluitType;
|
|
42
|
+
@tracked subBesluit?: BesluitType;
|
|
43
|
+
@tracked subSubBesluit?: BesluitType;
|
|
44
|
+
|
|
45
|
+
@tracked cardExpanded = false;
|
|
46
|
+
@tracked loadDataTaskInstance;
|
|
47
|
+
|
|
48
|
+
constructor(parent: unknown, args: Args) {
|
|
49
|
+
super(parent, args);
|
|
50
|
+
this.loadDataTaskInstance = this.loadData.perform();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get controller() {
|
|
54
|
+
return this.args.controller;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get doc() {
|
|
58
|
+
return this.controller.state.doc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
loadData = task(async () => {
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/await-thenable
|
|
63
|
+
const bestuurseenheid = await this.currentSession.get('group');
|
|
64
|
+
const classificatie = await bestuurseenheid.get('classificatie');
|
|
65
|
+
const ENV = getOwner(this)?.resolveRegistration('config:environment') as {
|
|
66
|
+
besluitTypePlugin: { endpoint: string };
|
|
67
|
+
};
|
|
68
|
+
const types = await fetchBesluitTypes(classificatie.uri, ENV);
|
|
69
|
+
this.types = types;
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
get currentBesluitRange(): ResolvedPNode | undefined {
|
|
73
|
+
const selection = this.controller.state.selection;
|
|
74
|
+
const currentBesluitRange = [
|
|
75
|
+
...this.controller.datastore
|
|
76
|
+
.limitToRange(this.controller.state, selection.from, selection.to)
|
|
77
|
+
.match(null, 'a', '>http://data.vlaanderen.be/ns/besluit#Besluit')
|
|
78
|
+
.asSubjectNodeMapping()
|
|
79
|
+
.nodes(),
|
|
80
|
+
][0];
|
|
81
|
+
return currentBesluitRange;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
get currentBesluitURI() {
|
|
85
|
+
if (this.currentBesluitRange) {
|
|
86
|
+
const node = unwrap(this.doc.nodeAt(this.currentBesluitRange.from));
|
|
87
|
+
return getRdfaAttribute(node, 'resource').pop();
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
get showCard() {
|
|
93
|
+
return !!this.currentBesluitRange;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@action
|
|
97
|
+
updateBesluitTypes() {
|
|
98
|
+
if (!this.currentBesluitURI) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const besluitTypes = this.controller.datastore
|
|
102
|
+
.match(`>${this.currentBesluitURI}`, 'a', undefined)
|
|
103
|
+
.asQuads();
|
|
104
|
+
const besluitTypesUris = [...besluitTypes].map((quad) => quad.object.value);
|
|
105
|
+
const besluitTypeRelevant = besluitTypesUris.find((type) =>
|
|
106
|
+
type.includes('https://data.vlaanderen.be/id/concept/BesluitType/')
|
|
107
|
+
);
|
|
108
|
+
if (besluitTypeRelevant) {
|
|
109
|
+
this.previousBesluitType = besluitTypeRelevant;
|
|
110
|
+
const besluitType = this.findBesluitTypeByURI(besluitTypeRelevant);
|
|
111
|
+
|
|
112
|
+
const firstAncestor = this.findBesluitTypeParent(besluitType);
|
|
113
|
+
const secondAncestor = this.findBesluitTypeParent(firstAncestor);
|
|
114
|
+
if (firstAncestor && secondAncestor) {
|
|
115
|
+
this.besluit = secondAncestor;
|
|
116
|
+
this.subBesluit = firstAncestor;
|
|
117
|
+
this.subSubBesluit = besluitType;
|
|
118
|
+
} else if (firstAncestor) {
|
|
119
|
+
this.besluit = firstAncestor;
|
|
120
|
+
this.subBesluit = besluitType;
|
|
121
|
+
this.subSubBesluit = undefined;
|
|
122
|
+
} else {
|
|
123
|
+
this.besluit = besluitType;
|
|
124
|
+
this.subBesluit = undefined;
|
|
125
|
+
this.subSubBesluit = undefined;
|
|
126
|
+
}
|
|
127
|
+
this.cardExpanded = false;
|
|
128
|
+
} else {
|
|
129
|
+
this.cardExpanded = true;
|
|
130
|
+
this.besluit = undefined;
|
|
131
|
+
this.subBesluit = undefined;
|
|
132
|
+
this.subSubBesluit = undefined;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@action
|
|
137
|
+
updateBesluitType(selected: BesluitType) {
|
|
138
|
+
this.besluit = selected;
|
|
139
|
+
this.besluitType = selected;
|
|
140
|
+
this.subBesluit = undefined;
|
|
141
|
+
this.subSubBesluit = undefined;
|
|
142
|
+
if (!selected.subTypes || !selected.subTypes.length) this.insert();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@action
|
|
146
|
+
updateBesluitSubType(selected: BesluitType) {
|
|
147
|
+
this.subBesluit = selected;
|
|
148
|
+
this.besluitType = selected;
|
|
149
|
+
this.subSubBesluit = undefined;
|
|
150
|
+
if (!selected.subTypes || !selected.subTypes.length) this.insert();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@action
|
|
154
|
+
updateBesluitSubSubType(selected: BesluitType) {
|
|
155
|
+
this.subSubBesluit = selected;
|
|
156
|
+
this.besluitType = selected;
|
|
157
|
+
if (!selected.subTypes || !selected.subTypes.length) this.insert();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
findBesluitTypeParent(
|
|
161
|
+
besluitType?: BesluitType,
|
|
162
|
+
array: BesluitType[] = this.types,
|
|
163
|
+
parent?: BesluitType
|
|
164
|
+
): BesluitType | undefined {
|
|
165
|
+
if (!besluitType || !array) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
for (const type of array) {
|
|
169
|
+
if (type == besluitType) {
|
|
170
|
+
return parent;
|
|
171
|
+
} else if (type.subTypes?.length) {
|
|
172
|
+
parent = type;
|
|
173
|
+
return this.findBesluitTypeParent(besluitType, type.subTypes, parent);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
findBesluitTypeByURI(
|
|
180
|
+
uri: string,
|
|
181
|
+
types = this.types
|
|
182
|
+
): BesluitType | undefined {
|
|
183
|
+
if (uri) {
|
|
184
|
+
for (const besluitType of types) {
|
|
185
|
+
if (besluitType.uri === uri) {
|
|
186
|
+
return besluitType;
|
|
187
|
+
} else if (besluitType.subTypes && besluitType.subTypes.length) {
|
|
188
|
+
const subType = this.findBesluitTypeByURI(uri, besluitType.subTypes);
|
|
189
|
+
if (subType) {
|
|
190
|
+
return subType;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
insert() {
|
|
199
|
+
if (this.besluitType && this.currentBesluitRange) {
|
|
200
|
+
this.cardExpanded = false;
|
|
201
|
+
this.controller.checkAndDoCommand(
|
|
202
|
+
addType(this.currentBesluitRange.from, this.besluitType.uri)
|
|
203
|
+
);
|
|
204
|
+
if (this.previousBesluitType) {
|
|
205
|
+
this.controller.checkAndDoCommand(
|
|
206
|
+
removeType(this.currentBesluitRange.from, this.previousBesluitType)
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@action
|
|
213
|
+
toggleCard() {
|
|
214
|
+
this.cardExpanded = !this.cardExpanded;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{{#if this.showCard}}
|
|
2
|
+
<AuCard
|
|
3
|
+
@flex={{true}}
|
|
4
|
+
@divided={{true}}
|
|
5
|
+
@isOpenInitially={{true}}
|
|
6
|
+
@expandable={{true}}
|
|
7
|
+
@shadow={{true}}
|
|
8
|
+
@size='small'
|
|
9
|
+
{{did-update
|
|
10
|
+
this.resetToDocumentState
|
|
11
|
+
this.documentText
|
|
12
|
+
this.documentLegislationType
|
|
13
|
+
}}
|
|
14
|
+
as |c|
|
|
15
|
+
>
|
|
16
|
+
<c.header>
|
|
17
|
+
<AuHeading @level='3' @skin='6'>{{t
|
|
18
|
+
'citaten-plugin.card.title'
|
|
19
|
+
}}</AuHeading>
|
|
20
|
+
</c.header>
|
|
21
|
+
<c.content>
|
|
22
|
+
<div class='au-o-flow au-o-flow--small'>
|
|
23
|
+
<AuFormRow>
|
|
24
|
+
<AuLabel
|
|
25
|
+
for='typeofdocument'
|
|
26
|
+
@inline={{false}}
|
|
27
|
+
@required={{false}}
|
|
28
|
+
@error={{false}}
|
|
29
|
+
@warning={{false}}
|
|
30
|
+
>{{t 'citaten-plugin.search.type'}}</AuLabel>
|
|
31
|
+
<PowerSelect
|
|
32
|
+
id='typeofdocument'
|
|
33
|
+
@allowClear={{false}}
|
|
34
|
+
@disabled={{false}}
|
|
35
|
+
@searchEnabled={{true}}
|
|
36
|
+
@loadingMessage='{{t "citaten-plugin.alert.loading"}}'
|
|
37
|
+
@noMatchesMessage='{{t "citaten-plugin.alert.no-results"}}'
|
|
38
|
+
@searchMessage='{{t "citaten-plugin.search.placeholder"}}'
|
|
39
|
+
@options={{this.legislationTypes}}
|
|
40
|
+
@selected={{this.selectedLegislationTypeLabel}}
|
|
41
|
+
@onChange={{this.selectLegislationType}}
|
|
42
|
+
class='au-u-1-1'
|
|
43
|
+
as |type|
|
|
44
|
+
>
|
|
45
|
+
{{type}}
|
|
46
|
+
</PowerSelect>
|
|
47
|
+
</AuFormRow>
|
|
48
|
+
<AuFormRow>
|
|
49
|
+
<AuLabel
|
|
50
|
+
for='searchterm'
|
|
51
|
+
@inline={{false}}
|
|
52
|
+
@required={{false}}
|
|
53
|
+
@error={{false}}
|
|
54
|
+
@warning={{false}}
|
|
55
|
+
>{{t 'citaten-plugin.search.term'}}</AuLabel>
|
|
56
|
+
<AuNativeInput
|
|
57
|
+
@icon='search'
|
|
58
|
+
@type='text'
|
|
59
|
+
@width='block'
|
|
60
|
+
@iconAlignment='right'
|
|
61
|
+
id='searchterm'
|
|
62
|
+
value={{this.searchText}}
|
|
63
|
+
placeholder={{t 'citaten-plugin.search.placeholder'}}
|
|
64
|
+
{{on 'input' this.onCardTextChange}}
|
|
65
|
+
/>
|
|
66
|
+
</AuFormRow>
|
|
67
|
+
<AuFormRow>
|
|
68
|
+
<AuButton
|
|
69
|
+
@skin='link'
|
|
70
|
+
@icon='search'
|
|
71
|
+
@iconAlignment='left'
|
|
72
|
+
{{on 'click' this.openSearchModal}}
|
|
73
|
+
>{{t 'citaten-plugin.search.advanced'}}</AuButton>
|
|
74
|
+
</AuFormRow>
|
|
75
|
+
</div>
|
|
76
|
+
</c.content>
|
|
77
|
+
<c.footer class='au-u-background-gray-100 au-u-padding-none'>
|
|
78
|
+
{{#if this.decisionResource.isRunning}}
|
|
79
|
+
<AuLoader />
|
|
80
|
+
<span class='au-u-hidden-visually'>{{t
|
|
81
|
+
'citaten-plugin.alert.loading'
|
|
82
|
+
}}</span>
|
|
83
|
+
{{else}}
|
|
84
|
+
{{#if this.error}}
|
|
85
|
+
<CitationPlugin::Helpers::AlertLoadError
|
|
86
|
+
@fullSize={{false}}
|
|
87
|
+
@error={{this.error}}
|
|
88
|
+
/>
|
|
89
|
+
{{else}}
|
|
90
|
+
<AuToolbar @border='bottom' @skin='none' class='au-u-padding-small'>
|
|
91
|
+
<AuHeading @skin='6' @level='4'>{{t
|
|
92
|
+
'citaten-plugin.card.suggestions'
|
|
93
|
+
}}</AuHeading>
|
|
94
|
+
</AuToolbar>
|
|
95
|
+
<div
|
|
96
|
+
class='citaten--decision-list au-u-margin-none au-u-padding-top-tiny au-u-padding-bottom-tiny'
|
|
97
|
+
>
|
|
98
|
+
<CitationPlugin::Citations::DecisionList
|
|
99
|
+
@decisions={{this.decisionResource.value}}
|
|
100
|
+
@onCitationInsert={{this.insertDecisionCitation}}
|
|
101
|
+
@onCitationDetails={{this.openDecisionDetailModal}}
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
{{/if}}
|
|
105
|
+
{{/if}}
|
|
106
|
+
</c.footer>
|
|
107
|
+
</AuCard>
|
|
108
|
+
{{/if}}
|
|
109
|
+
|
|
110
|
+
<CitationPlugin::Citations::SearchModal
|
|
111
|
+
@open={{this.showModal}}
|
|
112
|
+
@closeModal={{this.closeModal}}
|
|
113
|
+
@insertDecisionCitation={{this.insertDecisionCitation}}
|
|
114
|
+
@insertArticleCitation={{this.insertArticleCitation}}
|
|
115
|
+
@selectedDecision={{this.decision}}
|
|
116
|
+
@legislationTypeUri={{this.legislationTypeUri}}
|
|
117
|
+
@text={{this.searchText}}
|
|
118
|
+
/>
|