@lblod/ember-rdfa-editor-lblod-plugins 11.0.0 → 11.1.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 (40) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/README.md +5 -1
  3. package/addon/components/generic-rdfa-variable/insert-menu.hbs +1 -0
  4. package/addon/components/generic-rdfa-variable/insert-menu.ts +12 -10
  5. package/addon/components/loading-alert.hbs +28 -0
  6. package/addon/components/loading-alert.ts +3 -0
  7. package/addon/components/template-comments-plugin/edit-card.ts +38 -15
  8. package/addon/components/variable-plugin/address/edit.hbs +79 -29
  9. package/addon/components/variable-plugin/address/edit.ts +176 -39
  10. package/addon/components/variable-plugin/address/nodeview.ts +1 -1
  11. package/addon/components/variable-plugin/number/insert.hbs +2 -0
  12. package/addon/components/variable-plugin/number/insert.ts +30 -8
  13. package/addon/plugins/article-structure-plugin/commands/wrap-structure-content.ts +86 -11
  14. package/addon/plugins/article-structure-plugin/structures/article.ts +1 -0
  15. package/addon/plugins/article-structure-plugin/structures/structure-header.ts +2 -1
  16. package/addon/plugins/article-structure-plugin/structures/title.ts +2 -0
  17. package/addon/plugins/article-structure-plugin/utils/structure.ts +4 -0
  18. package/addon/plugins/document-title-plugin/nodes/document-title.ts +1 -0
  19. package/addon/plugins/generic-rdfa-variable/commands/index.ts +1 -0
  20. package/addon/plugins/generic-rdfa-variable/commands/insert-generic-rdfa.ts +25 -0
  21. package/addon/plugins/snippet-plugin/utils/fetch-data.ts +3 -1
  22. package/addon/plugins/variable-plugin/utils/address-helpers.ts +220 -69
  23. package/addon/plugins/variable-plugin/variables/address.ts +118 -147
  24. package/addon/utils/constants.ts +4 -0
  25. package/addon/utils/find-insertion-contentmatch.ts +61 -0
  26. package/app/components/loading-alert.js +1 -0
  27. package/components/generic-rdfa-variable/insert-menu.d.ts +1 -0
  28. package/components/loading-alert.d.ts +3 -0
  29. package/components/variable-plugin/address/edit.d.ts +31 -8
  30. package/components/variable-plugin/number/insert.d.ts +18 -2
  31. package/package.json +3 -3
  32. package/plugins/article-structure-plugin/utils/structure.d.ts +2 -0
  33. package/plugins/generic-rdfa-variable/commands/index.d.ts +1 -0
  34. package/plugins/generic-rdfa-variable/commands/insert-generic-rdfa.d.ts +2 -0
  35. package/plugins/variable-plugin/utils/address-helpers.d.ts +30 -3
  36. package/plugins/variable-plugin/variables/address.d.ts +6 -14
  37. package/translations/en-US.yaml +25 -6
  38. package/translations/nl-BE.yaml +25 -6
  39. package/utils/constants.d.ts +1 -0
  40. package/utils/find-insertion-contentmatch.d.ts +23 -0
@@ -331,10 +331,29 @@ editor-plugins:
331
331
  insert: Insert address
332
332
  edit:
333
333
  title: Search for an address
334
- no-results: No addresses found
335
- search-message: Type to search
336
- include-housenumber: Include housenumber
337
- placeholder-with-number: Street housenumber, municipality
338
- placeholder-without-number: Street, municipality
334
+ municipality:
335
+ label: Municipality
336
+ placeholder: Municipality
337
+ search-message: Type to search for a municipality
338
+ no-results: No municipalities found
339
+ street:
340
+ label: Street
341
+ placeholder: Street
342
+ search-message: Type to search for a street
343
+ no-results: No streets found
344
+ housenumber:
345
+ label: Housenumber
346
+ placeholder: Housenumber
347
+ busnumber:
348
+ label: Busnumber
349
+ placeholder: Busnumber
350
+ loading: Resolving address.
351
+ success:
352
+ address-found: Address found.
353
+ errors:
354
+ address-not-found: We could not resolve the provided address
355
+ http-error: "Something went wrong while resolving this address, status code: {status}."
356
+ contact: In case of persisting issues, contact <a href="mailto:{email}">{email}</a>.
339
357
  nodeview:
340
- placeholder: Insert address
358
+ placeholder: Insert address
359
+
@@ -334,10 +334,29 @@ editor-plugins:
334
334
  insert: Adres invoegen
335
335
  edit:
336
336
  title: Zoek een adres
337
- no-results: Geen adressen gevonden
338
- search-message: Typ om te zoeken
339
- include-housenumber: Inclusief huisnummer
340
- placeholder-with-number: Straatnaam huisnummer, gemeente
341
- placeholder-without-number: Straatnaam, gemeente
337
+ municipality:
338
+ label: Gemeente
339
+ placeholder: Gemeente
340
+ search-message: Typ om een gemeente op te zoeken
341
+ no-results: Geen gemeenten gevonden
342
+ street:
343
+ label: Straatnaam
344
+ placeholder: Straatnaam
345
+ search-message: Typ om een straatnaam op te zoeken
346
+ no-results: Geen straatnamen gevonden
347
+ housenumber:
348
+ label: Huisnummer
349
+ placeholder: Huisnummer
350
+ busnumber:
351
+ label: Busnummer
352
+ placeholder: Busnummer
353
+ loading: Adres aan het opzoeken.
354
+ success:
355
+ address-found: Adres gevonden.
356
+ errors:
357
+ address-not-found: We konden het adres niet terugvinden.
358
+ http-error: "Er is iets mis gelopen bij het opvragen van dit adres, statuscode: {status}."
359
+ contact: Bij blijvende problemen, contacteer <a href="mailto:{email}">{email}</a>.
342
360
  nodeview:
343
- placeholder: Voeg adres in
361
+ placeholder: Voeg adres in
362
+
@@ -11,3 +11,4 @@ export declare const MOBILITEIT: (s: string) => import("@lblod/ember-rdfa-editor
11
11
  export declare const ADRES: (s: string) => import("@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace").Resource;
12
12
  export declare const GENERIEK: (s: string) => import("@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace").Resource;
13
13
  export declare const GEO: (s: string) => import("@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace").Resource;
14
+ export declare const GEOSPARQL: (s: string) => import("@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace").Resource;
@@ -0,0 +1,23 @@
1
+ import { NodeType, PNode, ResolvedPos } from '@lblod/ember-rdfa-editor';
2
+ /**
3
+ * Find the first match in document order, from left to right
4
+ * where a node can be inserted without any problem, by using ContentMatching
5
+ * This goes "down" when looking at the document.
6
+ * @param mainDoc the document to search in.
7
+ * @param $startPos The start position to start the search from
8
+ * @param type the type to match for ContentMatching
9
+ * @predicatePos an _opional_ predicate to check together with the content match
10
+ * @returns the global position (in reference to `mainDoc`) of the position between nodes that the given type can be inserted,
11
+ */
12
+ export declare function findContentMatchPosRight(mainDoc: PNode, $startPos: ResolvedPos, type: NodeType, predicatePos?: (pos: number) => boolean): number | void;
13
+ /**
14
+ * Find the first match in document order, from right to left
15
+ * where a node can be inserted without any problem, by using ContentMatching
16
+ * This goes "up" when looking at the document.
17
+ * @param mainDoc the document to search in.
18
+ * @param $startPos The start position to start the search from
19
+ * @param type the type to match for ContentMatching
20
+ * @predicatePos an _opional_ predicate to check together with the content match
21
+ * @returns the global position (in reference to `mainDoc`) of the position between nodes that the given type can be inserted,
22
+ */
23
+ export declare function findContentMatchPosLeft(mainDoc: PNode, startPos: number, type: NodeType, predicatePos?: ($pos: ResolvedPos) => boolean): number | void;