@lblod/ember-rdfa-editor-lblod-plugins 36.0.0 → 37.0.0

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/addon/components/citation-plugin/citation-card.hbs +1 -0
  3. package/addon/components/decision-plugin/decision-plugin-card.gts +4 -0
  4. package/addon/components/document-validation-plugin/card.gts +2 -0
  5. package/addon/components/location-plugin/insert.gts +27 -19
  6. package/addon/components/locked-placeholder-plugin/insert.gts +161 -0
  7. package/addon/components/locked-placeholder-plugin/nodeviews/block.gts +23 -0
  8. package/addon/components/locked-placeholder-plugin/nodeviews/inline.gts +23 -0
  9. package/addon/components/mandatee-table-plugin/configure.gts +1 -0
  10. package/addon/components/placeholder-utils-plugin/edit.gts +1 -0
  11. package/addon/components/roadsign-regulation-plugin/roadsigns-table.gts +1 -1
  12. package/addon/components/structure-plugin/control-card.gts +1 -0
  13. package/addon/components/template-comments-plugin/edit-card.hbs +1 -0
  14. package/addon/components/variable-plugin/address/edit.hbs +1 -0
  15. package/addon/components/variable-plugin/autofilled/edit.gts +1 -0
  16. package/addon/components/variable-plugin/codelist/edit.gts +1 -0
  17. package/addon/components/variable-plugin/date/edit.hbs +1 -0
  18. package/addon/components/variable-plugin/insert-variable-card.hbs +1 -0
  19. package/addon/components/variable-plugin/location/edit.hbs +1 -0
  20. package/addon/components/variable-plugin/number/nodeview.hbs +1 -0
  21. package/addon/components/variable-plugin/person/edit.hbs +1 -0
  22. package/addon/plugins/decision-plugin/commands/insert-article-container.ts +3 -0
  23. package/addon/plugins/decision-plugin/commands/insert-description.ts +4 -1
  24. package/addon/plugins/decision-plugin/commands/insert-motivation.ts +3 -1
  25. package/addon/plugins/decision-plugin/commands/insert-title.ts +3 -1
  26. package/addon/plugins/document-validation-plugin/common-fixes.ts +4 -0
  27. package/addon/plugins/location-plugin/contextual-actions/index.ts +84 -0
  28. package/addon/plugins/location-plugin/index.ts +88 -0
  29. package/addon/plugins/locked-placeholder-plugin/nodes/block-locked-placeholder.ts +68 -0
  30. package/addon/plugins/locked-placeholder-plugin/nodes/inline-locked-placeholder.ts +68 -0
  31. package/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts +89 -0
  32. package/addon/plugins/structure-plugin/monads/regenerate-rdfa-links.ts +113 -40
  33. package/addon/plugins/variable-plugin/contextual-actions/index.ts +1 -1
  34. package/addon/utils/set-utils.ts +18 -0
  35. package/app/components/locked-placeholder-plugin/insert.js +1 -0
  36. package/app/styles/locked-placeholder-plugin.scss +12 -0
  37. package/declarations/addon/components/location-plugin/insert.d.ts +2 -2
  38. package/declarations/addon/components/locked-placeholder-plugin/insert.d.ts +24 -0
  39. package/declarations/addon/components/locked-placeholder-plugin/nodeviews/block.d.ts +14 -0
  40. package/declarations/addon/components/locked-placeholder-plugin/nodeviews/inline.d.ts +14 -0
  41. package/declarations/addon/plugins/decision-plugin/commands/insert-article-container.d.ts +2 -1
  42. package/declarations/addon/plugins/decision-plugin/commands/insert-description.d.ts +2 -1
  43. package/declarations/addon/plugins/decision-plugin/commands/insert-motivation.d.ts +2 -1
  44. package/declarations/addon/plugins/decision-plugin/commands/insert-title.d.ts +2 -1
  45. package/declarations/addon/plugins/location-plugin/contextual-actions/index.d.ts +14 -0
  46. package/declarations/addon/plugins/location-plugin/index.d.ts +13 -0
  47. package/declarations/addon/plugins/locked-placeholder-plugin/nodes/block-locked-placeholder.d.ts +2 -0
  48. package/declarations/addon/plugins/locked-placeholder-plugin/nodes/inline-locked-placeholder.d.ts +2 -0
  49. package/declarations/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.d.ts +7 -0
  50. package/declarations/addon/plugins/structure-plugin/monads/regenerate-rdfa-links.d.ts +6 -0
  51. package/declarations/addon/plugins/variable-plugin/contextual-actions/index.d.ts +1 -1
  52. package/declarations/addon/utils/set-utils.d.ts +8 -0
  53. package/package.json +4 -4
  54. package/translations/en-US.yaml +16 -0
  55. package/translations/nl-BE.yaml +16 -0
@@ -0,0 +1,14 @@
1
+ import Component from '@glimmer/component';
2
+ import { PNode } from '@lblod/ember-rdfa-editor';
3
+ interface Sig {
4
+ Args: {
5
+ node: PNode;
6
+ };
7
+ Blocks: {
8
+ default: [];
9
+ };
10
+ }
11
+ export default class InlineLockedPlaceholder extends Component<Sig> {
12
+ get label(): any;
13
+ }
14
+ export {};
@@ -6,6 +6,7 @@ interface InsertArticleContainerArgs {
6
6
  decisionUri: string;
7
7
  articleUriGenerator?: () => string;
8
8
  decisionLocation: NodeWithPos;
9
+ label?: string;
9
10
  }
10
- export default function insertArticleContainer({ decisionUri, articleUriGenerator, decisionLocation, }: InsertArticleContainerArgs): Command;
11
+ export default function insertArticleContainer({ decisionUri, articleUriGenerator, decisionLocation, label, }: InsertArticleContainerArgs): Command;
11
12
  export {};
@@ -3,6 +3,7 @@ import { NodeWithPos } from '@curvenote/prosemirror-utils';
3
3
  interface InsertDescriptionArgs {
4
4
  placeholderText: string;
5
5
  decisionLocation: NodeWithPos;
6
+ label?: string;
6
7
  }
7
- export default function insertDescription({ placeholderText, decisionLocation, }: InsertDescriptionArgs): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
8
+ export default function insertDescription({ placeholderText, decisionLocation, label, }: InsertDescriptionArgs): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
8
9
  export {};
@@ -4,6 +4,7 @@ import { NodeWithPos } from '@curvenote/prosemirror-utils';
4
4
  interface InsertMotivationArgs {
5
5
  intl: IntlService;
6
6
  decisionLocation: NodeWithPos;
7
+ label?: string;
7
8
  }
8
- export default function insertMotivation({ intl, decisionLocation, }: InsertMotivationArgs): Command;
9
+ export default function insertMotivation({ intl, decisionLocation, label, }: InsertMotivationArgs): Command;
9
10
  export {};
@@ -3,6 +3,7 @@ import { NodeWithPos } from '@curvenote/prosemirror-utils';
3
3
  interface InsertTitleArgs {
4
4
  placeholderText: string;
5
5
  decisionLocation: NodeWithPos;
6
+ label?: string;
6
7
  }
7
- export default function insertTitle({ placeholderText, decisionLocation, }: InsertTitleArgs): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
8
+ export default function insertTitle({ placeholderText, decisionLocation, label, }: InsertTitleArgs): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
8
9
  export {};
@@ -0,0 +1,14 @@
1
+ import { EditorState } from '@lblod/ember-rdfa-editor';
2
+ import { LocationType } from '@lblod/ember-rdfa-editor-lblod-plugins/components/location-plugin/map';
3
+ export declare function getContextualActions(): (state: EditorState, searchQuery?: string) => {
4
+ id: string;
5
+ group: string;
6
+ command: (state: EditorState, dispatch: (tr: import("@lblod/ember-rdfa-editor").Transaction) => void) => void;
7
+ label: string;
8
+ locationType: LocationType;
9
+ icon: string;
10
+ }[];
11
+ export declare function getContextualActionGroups(): (state: EditorState) => {
12
+ id: string;
13
+ label: string;
14
+ }[];
@@ -0,0 +1,13 @@
1
+ import { ProsePlugin, PluginKey, EditorState, EditorView, Transaction } from '@lblod/ember-rdfa-editor';
2
+ import { LocationType } from '@lblod/ember-rdfa-editor-lblod-plugins/components/location-plugin/map';
3
+ type PluginState = {
4
+ modalOpen: boolean;
5
+ locationType: LocationType | null;
6
+ };
7
+ export declare const locationModalsPluginKey: PluginKey<PluginState>;
8
+ export declare function closeLocationModal(view: EditorView): void;
9
+ export declare function openLocationModal(view: EditorView, locationType?: LocationType): void;
10
+ export declare function openLocationModalCommand(locationType: LocationType): (state: EditorState, dispatch: (tr: Transaction) => void) => void;
11
+ export declare function locationModalsPlugin(): ProsePlugin<PluginState>;
12
+ export declare function getLocationModalsPluginState(state: EditorState): PluginState | undefined;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const blockLockedPlaceholder: import("@lblod/ember-rdfa-editor/core/say-node-spec").default;
2
+ export declare const blockLockedPlaceholderView: (controller: import("@lblod/ember-rdfa-editor").SayController) => import("@lblod/ember-rdfa-editor/utils/ember-node").SayNodeViewConstructor;
@@ -0,0 +1,2 @@
1
+ export declare const inlineLockedPlaceholder: import("@lblod/ember-rdfa-editor/core/say-node-spec").default;
2
+ export declare const inlineLockedPlaceholderView: (controller: import("@lblod/ember-rdfa-editor").SayController) => import("@lblod/ember-rdfa-editor/utils/ember-node").SayNodeViewConstructor;
@@ -0,0 +1,7 @@
1
+ import { EditorState } from '@lblod/ember-rdfa-editor';
2
+ import { type TransactionCombinatorResult } from '@lblod/ember-rdfa-editor/utils/transaction-utils';
3
+ type ReplacementValues = {
4
+ [key: string]: string;
5
+ };
6
+ export default function replaceLockedPlaceholderContent(initialState: EditorState, values: ReplacementValues | ((state: EditorState) => ReplacementValues)): TransactionCombinatorResult<boolean>;
7
+ export {};
@@ -1,2 +1,8 @@
1
1
  import { type TransactionMonad } from '@lblod/ember-rdfa-editor/utils/transaction-utils';
2
+ /**
3
+ * Generate monads to update the rdfa-hierarchy of all structure nodes to match their document hierarchy
4
+ * @see {@link linkAllChildrenToParent} for more details
5
+ *
6
+ * @returns list of monads to perform the update on the whole doc
7
+ */
2
8
  export declare const regenerateRdfaLinks: TransactionMonad<boolean>;
@@ -8,7 +8,7 @@ export declare function getContextualActions({ zonalLocationCodelistUri, nonZona
8
8
  id: string;
9
9
  label: string;
10
10
  group: string;
11
- command: (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
11
+ command: (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;
12
12
  }[]>;
13
13
  export declare function getContextualActionGroups(): (state: EditorState) => {
14
14
  id: string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Calculate the set difference a - b between two sets
3
+ *
4
+ * @param a set a, or the left hand side of the operation
5
+ * @param b set b, or the right hand sidde of the operation
6
+ * @returns a-b
7
+ */
8
+ export declare function difference<T>(a: Set<T>, b: Set<T>): Set<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "36.0.0",
3
+ "version": "37.0.0",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -92,7 +92,7 @@
92
92
  "zod": "^3.24.1"
93
93
  },
94
94
  "devDependencies": {
95
- "@appuniversum/ember-appuniversum": "~3.17.0",
95
+ "@appuniversum/ember-appuniversum": "~4.2.2",
96
96
  "@changesets/changelog-github": "^0.5.0",
97
97
  "@changesets/cli": "^2.27.7",
98
98
  "@ember/optional-features": "^2.3.0",
@@ -111,7 +111,7 @@
111
111
  "@glint/ember-tsc": "^1.5.0",
112
112
  "@glint/environment-ember-loose": "^1.5.0",
113
113
  "@glint/environment-ember-template-imports": "^1.5.0",
114
- "@lblod/ember-rdfa-editor": "13.7.1",
114
+ "@lblod/ember-rdfa-editor": "13.8.0",
115
115
  "@glint/template": "^1.7.7",
116
116
  "@rdfjs/to-ntriples": "^3.0.1",
117
117
  "@rdfjs/types": "^1.1.0",
@@ -184,7 +184,7 @@
184
184
  "@appuniversum/ember-appuniversum": "^3.12.0",
185
185
  "@ember/string": "3.x",
186
186
  "@glint/template": "^1.4.0",
187
- "@lblod/ember-rdfa-editor": "^13.7.1",
187
+ "@lblod/ember-rdfa-editor": "^13.8.0",
188
188
  "ember-concurrency": "^4.0.2",
189
189
  "ember-element-helper": "^0.8.6",
190
190
  "ember-intl": "^7.0.0",
@@ -447,6 +447,11 @@ location-plugin:
447
447
  checkbox-helptext: Checking this will remove the zipcode and municipality from the address.
448
448
  nodeview:
449
449
  placeholder: Insert location
450
+ context-actions:
451
+ insert-address: Insert Address
452
+ insert-point-on-map: Insert a point on the map
453
+ insert-area: Insert area
454
+ other-elements: Other elements
450
455
  types:
451
456
  address: Address
452
457
  place: Place
@@ -534,3 +539,14 @@ placeholder-utils-plugin:
534
539
  card-title: Edit placeholder
535
540
  button-title: Insert placeholder
536
541
  placeholder-text: Placeholder Text
542
+
543
+ locked-placeholder-plugin:
544
+ insert-title: Insert locked placeholder
545
+ key: Key
546
+ keyPlaceholder: Key
547
+ label: Label
548
+ labelPlaceholder: Label
549
+ type: Type
550
+ inline: Inline
551
+ block: Block
552
+ button: Insert
@@ -444,6 +444,11 @@ location-plugin:
444
444
  checkbox-helptext: Aanvinken verwijdert de postcode en gemeente van het adres.
445
445
  nodeview:
446
446
  placeholder: Voeg locatie in
447
+ context-actions:
448
+ insert-address: Adres invoegen
449
+ insert-point-on-map: Punt op de kaart invoegen
450
+ insert-area: Gebied invoegen
451
+ other-elements: Andere elementen
447
452
  types:
448
453
  address: Adres
449
454
  place: Plaats
@@ -531,3 +536,14 @@ placeholder-utils-plugin:
531
536
  card-title: Plaatshouder bewerken
532
537
  button-title: Plaatshouder invoegen
533
538
  placeholder-text: Plaatshoudertekst
539
+
540
+ locked-placeholder-plugin:
541
+ insert-title: Samenvoegveld invoegen
542
+ key: Key
543
+ keyPlaceholder: Key
544
+ label: Label
545
+ labelPlaceholder: Label
546
+ type: Type
547
+ inline: Inline
548
+ block: Blok
549
+ button: Invoegen