@lblod/ember-rdfa-editor-lblod-plugins 14.1.0 → 15.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.
- package/CHANGELOG.md +103 -0
- package/README.md +43 -30
- package/addon/components/article-structure-plugin/article-structure-card.hbs +2 -2
- package/addon/components/article-structure-plugin/article-structure-card.ts +1 -1
- package/addon/components/article-structure-plugin/structure-card.ts +1 -1
- package/addon/components/citation-plugin/citation-insert.hbs +2 -2
- package/addon/components/citation-plugin/citations/article-list.hbs +3 -3
- package/addon/components/citation-plugin/citations/legal-document-list.hbs +3 -3
- package/addon/components/citation-plugin/citations/search-modal.ts +1 -1
- package/addon/components/decision-plugin/decision-plugin-card.ts +1 -1
- package/addon/components/document-title-plugin/insert-title-card.hbs +2 -2
- package/addon/components/document-title-plugin/insert-title-card.ts +3 -1
- package/addon/components/hover-tooltip.hbs +2 -2
- package/addon/components/hover-tooltip.ts +2 -0
- package/addon/components/import-snippet-plugin/card.ts +1 -1
- package/addon/components/roadsign-regulation-plugin/measure-template.ts +1 -1
- package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.hbs +2 -2
- package/addon/components/roadsign-regulation-plugin/roadsigns-modal.ts +1 -1
- package/addon/components/snippet-plugin/snippet-insert.hbs +2 -2
- package/addon/components/snippet-plugin/snippets/snippet-list.hbs +3 -3
- package/addon/components/standard-template-plugin/card.hbs +2 -2
- package/addon/components/table-of-contents-plugin/ember-nodes/outline.hbs +3 -3
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.ts +1 -1
- package/addon/components/template-comments-plugin/insert.hbs +2 -2
- package/addon/components/validation-plugin/validation-item.ts +1 -1
- package/addon/components/variable-plugin/address/edit.ts +1 -1
- package/addon/components/variable-plugin/address/insert.hbs +2 -2
- package/addon/components/variable-plugin/codelist/insert.ts +1 -1
- package/addon/components/variable-plugin/date/date-time-picker.ts +1 -1
- package/addon/components/variable-plugin/date/edit.hbs +3 -3
- package/addon/components/variable-plugin/date/edit.ts +4 -1
- package/addon/components/variable-plugin/date/insert.hbs +2 -2
- package/addon/components/variable-plugin/insert-variable-card.hbs +4 -5
- package/addon/components/variable-plugin/insert-variable-card.ts +3 -5
- package/addon/components/variable-plugin/location/insert.ts +1 -1
- package/addon/components/variable-plugin/number/insert.ts +1 -1
- package/addon/components/variable-plugin/number/nodeview.hbs +2 -2
- package/addon/components/variable-plugin/number/nodeview.ts +5 -2
- package/addon/helpers/capitalize.ts +1 -0
- package/addon/helpers/in-array.ts +1 -1
- package/addon/helpers/limit-text.ts +3 -2
- package/addon/plugins/article-structure-plugin/commands/insert-structure.ts +1 -1
- package/addon/plugins/article-structure-plugin/commands/move-selected-structure.ts +5 -1
- package/addon/plugins/article-structure-plugin/commands/wrap-structure-content.ts +1 -0
- package/addon/plugins/article-structure-plugin/index.ts +1 -0
- package/addon/plugins/article-structure-plugin/structures/article-paragraph.ts +7 -2
- package/addon/plugins/article-structure-plugin/structures/article.ts +11 -3
- package/addon/plugins/article-structure-plugin/structures/chapter.ts +11 -3
- package/addon/plugins/article-structure-plugin/structures/section.ts +11 -3
- package/addon/plugins/article-structure-plugin/structures/subsection.ts +11 -3
- package/addon/plugins/article-structure-plugin/structures/title.ts +11 -3
- package/addon/plugins/decision-plugin/commands/insert-motivation.ts +28 -6
- package/addon/plugins/standard-template-plugin/utils/nodes.ts +7 -2
- package/addon/plugins/variable-plugin/utils/number-to-words.ts +8 -3
- package/addon/plugins/variable-plugin/variables/number.ts +2 -2
- package/addon/utils/translation.ts +9 -5
- package/components/hover-tooltip.d.ts +2 -0
- package/components/variable-plugin/date/edit.d.ts +2 -0
- package/components/variable-plugin/insert-variable-card.d.ts +2 -4
- package/components/variable-plugin/number/nodeview.d.ts +2 -0
- package/helpers/capitalize.d.ts +2 -0
- package/helpers/in-array.d.ts +1 -0
- package/helpers/limit-text.d.ts +1 -0
- package/index.js +3 -0
- package/package.json +11 -10
- package/plugins/article-structure-plugin/index.d.ts +1 -0
- package/plugins/variable-plugin/utils/number-to-words.d.ts +1 -0
- package/types/global.d.ts +0 -17
- package/types/n2words/index.d.ts +6 -0
- package/types/tracked-toolbox/index.d.ts +11 -0
- package/utils/translation.d.ts +1 -1
- package/webpack-config.js +22 -0
- package/.woodpecker/.scenarios.yml +0 -13
- package/app/components/citation-plugin/citations/modal.js +0 -1
- package/app/components/template-comments-plugin/comment-editor.js +0 -1
- package/app/components/template-comments-plugin/insert-template-comment.js +0 -1
- package/app/services/rdfa-editor-roadsign-regulation-plugin.js +0 -1
- package/types/ember-mu-transform-helpers/transforms/string-set.d.ts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,108 @@
|
|
|
1
1
|
# @lblod/ember-rdfa-editor-lblod-plugins
|
|
2
2
|
|
|
3
|
+
## 15.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#323](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/323) [`5bedaab`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/5bedaabb7efa05626012333e63095671309e9f97) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove usage of `component` helper in preparation of embroider-compatibility.
|
|
8
|
+
|
|
9
|
+
This removal also causes a change in the variable-plugin insert-component API, the insert-components now need to be passed directly (instead of their path).
|
|
10
|
+
|
|
11
|
+
Before:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
get variableTypes(): VariableConfig[] {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
label: 'text',
|
|
18
|
+
component: {
|
|
19
|
+
path: 'variable-plugin/text/insert',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'location',
|
|
24
|
+
component: {
|
|
25
|
+
path: 'variable-plugin/location/insert',
|
|
26
|
+
options: {
|
|
27
|
+
endpoint: 'https://dev.roadsigns.lblod.info/sparql',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
After:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import TextVariableInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/text/insert';
|
|
39
|
+
import LocationInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/location/insert';
|
|
40
|
+
...
|
|
41
|
+
get variableTypes() {
|
|
42
|
+
return [
|
|
43
|
+
{
|
|
44
|
+
label: 'text',
|
|
45
|
+
component: TextVariableInsertComponent,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: 'location',
|
|
49
|
+
component: LocationInsertComponent,
|
|
50
|
+
options: {
|
|
51
|
+
endpoint: 'https://dev.roadsigns.lblod.info/sparql',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- [#333](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/333) [`04ea965`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/04ea96580189ee0a9440fe77618b8b2c1d9941a5) Thanks [@elpoelma](https://github.com/elpoelma)! - Drop support for ember 3.28
|
|
59
|
+
The minimum required version of `ember-source` is now 4.8.0.
|
|
60
|
+
The 5.x range remains untested.
|
|
61
|
+
|
|
62
|
+
### Minor Changes
|
|
63
|
+
|
|
64
|
+
- [#332](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/332) [`cf7082f`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/cf7082fdd89c862936276cfb562a0a07e5a49c4b) Thanks [@elpoelma](https://github.com/elpoelma)! - Expose a Webpack config for Embroidered apps
|
|
65
|
+
|
|
66
|
+
- [#332](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/332) [`cf7082f`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/cf7082fdd89c862936276cfb562a0a07e5a49c4b) Thanks [@elpoelma](https://github.com/elpoelma)! - Specify `@ember/string` 3.x as a peerdep
|
|
67
|
+
|
|
68
|
+
- [#334](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/334) [`fd271a1`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/fd271a1dd9b32e4081707ea416f35be70f57aa30) Thanks [@elpoelma](https://github.com/elpoelma)! - Add support for the ember-concurrency 3.x range
|
|
69
|
+
|
|
70
|
+
- [#332](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/332) [`cf7082f`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/cf7082fdd89c862936276cfb562a0a07e5a49c4b) Thanks [@elpoelma](https://github.com/elpoelma)! - Specify `ember-power-select` 6.x|7.x as a peerdep
|
|
71
|
+
|
|
72
|
+
- [#325](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/325) [`4c402d2`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/4c402d21f6e45a03436fd5155bb508ce6c3fb091) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove redundant types for `string-set` ember-data transform
|
|
73
|
+
|
|
74
|
+
- [#324](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/324) [`95634ed`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/95634eda12927736fa16945ff85b80876b7c0058) Thanks [@elpoelma](https://github.com/elpoelma)! - Remove direct usages of aulist::item in order to ensure compatibility with `@appuniversum/ember-appuniversum` 2.16.0
|
|
75
|
+
|
|
76
|
+
- [#325](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/325) [`4c402d2`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/4c402d21f6e45a03436fd5155bb508ce6c3fb091) Thanks [@elpoelma](https://github.com/elpoelma)! - Fix internal types for tracked-toolbox
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- [#331](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/331) [`910ec85`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/910ec8596b602a0ff408da0fcec4222ad81fb75a) Thanks [@piemonkey](https://github.com/piemonkey)! - Small internal changes to allow for embroider builds
|
|
81
|
+
|
|
82
|
+
## 14.2.0
|
|
83
|
+
|
|
84
|
+
### Minor Changes
|
|
85
|
+
|
|
86
|
+
- [#322](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/322) [`a168dc5`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/a168dc54b5ddc0a4a5b3bf8c521ccb914bb91b7a) Thanks [@x-m-el](https://github.com/x-m-el)! - For article-structure plugin
|
|
87
|
+
|
|
88
|
+
- The `StructureSpec`'s `constructor` now also contains the optional argument `state` (an EditorState)
|
|
89
|
+
- The existing structures' placeholders are translated using the document language
|
|
90
|
+
- This is only the case if emberApplication plugin is configured.
|
|
91
|
+
**Recommended change**: activate emberApplication plugin
|
|
92
|
+
- Will fallback to translating based on browser locale (=old logic) if emberApplication plugin is not configured
|
|
93
|
+
|
|
94
|
+
- [#322](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/322) [`690738f`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/690738f56692555880c5ad29c25c76f400a48bcb) Thanks [@x-m-el](https://github.com/x-m-el)! - For decision-plugin and standard-template-plugin
|
|
95
|
+
|
|
96
|
+
Make use of `state` argument to translate placeholders based on document language instead of browser locale
|
|
97
|
+
Depending on the place where placeholders are defined either of the following logic happens:
|
|
98
|
+
|
|
99
|
+
- will always use document language
|
|
100
|
+
- will use document language if emberApplication plugin is active. If not, defaults to browser locale (like before)
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- [#322](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/322) [`5ceca68`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/5ceca68ec271477dfcf75c7d9fba35c21880642e) Thanks [@x-m-el](https://github.com/x-m-el)! - Using "show as words" for a number variable will convert the number to a string in the language in the document, instead of always showing Dutch.
|
|
105
|
+
|
|
3
106
|
## 14.1.0
|
|
4
107
|
|
|
5
108
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@ related to the LBLOD Project.
|
|
|
5
5
|
|
|
6
6
|
## Compatibility
|
|
7
7
|
|
|
8
|
-
- Ember.js
|
|
9
|
-
|
|
8
|
+
- Ember.js 4.8+
|
|
9
|
+
The 5.x range is currently untested and not officially supported, but we accept issues and PRs to do so.
|
|
10
10
|
|
|
11
11
|
- Embroider or ember-auto-import v2
|
|
12
12
|
- Node 18 or above
|
|
@@ -140,6 +140,7 @@ export type StructureSpec = {
|
|
|
140
140
|
number?: number;
|
|
141
141
|
intl?: IntlService;
|
|
142
142
|
content?: PNode | Fragment;
|
|
143
|
+
state?: EditorState;
|
|
143
144
|
}) => {
|
|
144
145
|
node: PNode;
|
|
145
146
|
selectionConfig: {
|
|
@@ -367,7 +368,7 @@ This plugin provides an Ember service, `import-rdfa-snippet` which allows you to
|
|
|
367
368
|
manner:
|
|
368
369
|
|
|
369
370
|
```js
|
|
370
|
-
import {
|
|
371
|
+
import { service } from '@ember/service';
|
|
371
372
|
|
|
372
373
|
// An entry point to download the resouce (e.g a route) in your host app.
|
|
373
374
|
// (...)
|
|
@@ -562,7 +563,7 @@ The `variable-plugin/insert-variable-card` can be easily configured: it expects
|
|
|
562
563
|
- `controller`: An instance of the `SayController` class
|
|
563
564
|
- `variableTypes`: A list of `VariableConfig` objects. With each `VariableConfig` containing:
|
|
564
565
|
- the `label` which should be displayed in the variable-select dropdown
|
|
565
|
-
- the `
|
|
566
|
+
- the `component`: class of the component which should be displayed upon selecting the variable type.
|
|
566
567
|
- _optionally_ an `options` argument object which should be passed to the insert-variable component.
|
|
567
568
|
|
|
568
569
|
* The `VariableConfig` type is defined as follows:
|
|
@@ -570,10 +571,8 @@ The `variable-plugin/insert-variable-card` can be easily configured: it expects
|
|
|
570
571
|
```js
|
|
571
572
|
type VariableConfig = {
|
|
572
573
|
label: string;
|
|
573
|
-
component:
|
|
574
|
-
|
|
575
|
-
options?: unknown;
|
|
576
|
-
};
|
|
574
|
+
component: ComponentLike;
|
|
575
|
+
options?: unknown;
|
|
577
576
|
};
|
|
578
577
|
```
|
|
579
578
|
|
|
@@ -591,49 +590,44 @@ To allows users to insert variables into a document, add the following to the ed
|
|
|
591
590
|
`this.controller` is an instance of `SayController` and `this.variableTypes` is the list of `VariableConfig` objects which should be defined in your controller/component class:
|
|
592
591
|
|
|
593
592
|
```js
|
|
593
|
+
import TextVariableInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/text/insert';
|
|
594
|
+
import NumberInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/number/insert';
|
|
595
|
+
import DateInsertVariableComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/date/insert-variable';
|
|
596
|
+
import LocationInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/location/insert';
|
|
597
|
+
import CodelistInsertComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/codelist/insert';
|
|
598
|
+
import VariablePluginAddressInsertVariableComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/variable-plugin/address/insert-variable';
|
|
599
|
+
...
|
|
594
600
|
get variableTypes() {
|
|
595
601
|
return [
|
|
596
602
|
{
|
|
597
603
|
label: 'text',
|
|
598
|
-
component:
|
|
599
|
-
path: 'variable-plugin/text/insert',
|
|
600
|
-
},
|
|
604
|
+
component: TextVariableInsertComponent,
|
|
601
605
|
},
|
|
602
606
|
{
|
|
603
607
|
label: 'number',
|
|
604
|
-
component:
|
|
605
|
-
path: 'variable-plugin/number/insert',
|
|
606
|
-
},
|
|
608
|
+
component: NumberInsertComponent,
|
|
607
609
|
},
|
|
608
610
|
{
|
|
609
611
|
label: 'date',
|
|
610
|
-
component:
|
|
611
|
-
path: 'variable-plugin/date/insert',
|
|
612
|
-
},
|
|
612
|
+
component: DateInsertVariableComponent
|
|
613
613
|
},
|
|
614
614
|
{
|
|
615
615
|
label: 'location',
|
|
616
|
-
component:
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
endpoint: 'https://dev.roadsigns.lblod.info/sparql',
|
|
620
|
-
},
|
|
616
|
+
component: LocationInsertComponent,
|
|
617
|
+
options: {
|
|
618
|
+
endpoint: 'https://dev.roadsigns.lblod.info/sparql',
|
|
621
619
|
},
|
|
622
620
|
},
|
|
623
621
|
{
|
|
624
622
|
label: 'codelist',
|
|
625
|
-
component:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
endpoint: 'https://dev.roadsigns.lblod.info/sparql',
|
|
629
|
-
},
|
|
623
|
+
component: CodelistInsertComponent,
|
|
624
|
+
options: {
|
|
625
|
+
endpoint: 'https://dev.roadsigns.lblod.info/sparql',
|
|
630
626
|
},
|
|
631
627
|
},
|
|
632
628
|
{
|
|
633
629
|
label: 'address',
|
|
634
|
-
component:
|
|
635
|
-
path: 'variable-plugin/address/insert-variable',
|
|
636
|
-
},
|
|
630
|
+
component: VariablePluginAddressInsertVariableComponent,
|
|
637
631
|
},
|
|
638
632
|
];
|
|
639
633
|
}
|
|
@@ -816,6 +810,25 @@ Template comments have a specific style that can be imported in the stylesheet w
|
|
|
816
810
|
@import 'template-comments-plugin';
|
|
817
811
|
```
|
|
818
812
|
|
|
813
|
+
## Embroider
|
|
814
|
+
To use `@lblod/ember-rdfa-editor-lblod-plugins` with Embroider some extra Webpack configuration is needed, which you can import like this:
|
|
815
|
+
|
|
816
|
+
```js
|
|
817
|
+
// ember-cli-build.js
|
|
818
|
+
// ...
|
|
819
|
+
const { Webpack } = require('@embroider/webpack');
|
|
820
|
+
return require('@embroider/compat').compatBuild(app, Webpack, {
|
|
821
|
+
// other Embroider options
|
|
822
|
+
packagerOptions: {
|
|
823
|
+
webpackConfig: require('@lblod/ember-rdfa-editor-lblod-plugins/webpack-config'),
|
|
824
|
+
},
|
|
825
|
+
extraPublicTrees: [],
|
|
826
|
+
});
|
|
827
|
+
};
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
If you already provide some Webpack configuration, you can deep merge that with the config object we provide.
|
|
831
|
+
|
|
819
832
|
## Contributing
|
|
820
833
|
|
|
821
834
|
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<div>
|
|
2
2
|
{{#each this.structureTypes as |structureType|}}
|
|
3
|
-
<
|
|
3
|
+
<li class="au-c-list__item">
|
|
4
4
|
<AuButton @icon="add" @iconAlignment="left" @skin="link" @disabled={{not (this.canInsertStructure structureType)}}
|
|
5
5
|
{{on 'click' (fn this.insertStructure structureType)}}>
|
|
6
6
|
{{t structureType.translations.insert}}
|
|
7
7
|
</AuButton>
|
|
8
|
-
</
|
|
8
|
+
</li>
|
|
9
9
|
{{/each}}
|
|
10
10
|
</div>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { ArticleStructurePluginOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin';
|
|
10
10
|
import { findAncestorOfType } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin/utils/structure';
|
|
11
11
|
import { tracked } from '@glimmer/tracking';
|
|
12
|
-
import {
|
|
12
|
+
import { service } from '@ember/service';
|
|
13
13
|
import IntlService from 'ember-intl/services/intl';
|
|
14
14
|
|
|
15
15
|
type Args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<
|
|
1
|
+
<li class="au-c-list__item">
|
|
2
2
|
<AuButton
|
|
3
3
|
@icon='add'
|
|
4
4
|
@iconAlignment='left'
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
>
|
|
9
9
|
{{t 'citaten-plugin.insert.title'}}
|
|
10
10
|
</AuButton>
|
|
11
|
-
</
|
|
11
|
+
</li>
|
|
12
12
|
|
|
13
13
|
<CitationPlugin::Citations::SearchModal
|
|
14
14
|
@open={{this.showModal}}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{{#if @articles.length}}
|
|
2
|
-
<AuList @direction="vertical" @divider={{true}}
|
|
2
|
+
<AuList @direction="vertical" @divider={{true}} as |Item|>
|
|
3
3
|
{{#each @articles as |article|}}
|
|
4
|
-
<
|
|
4
|
+
<Item>
|
|
5
5
|
<CitationPlugin::Citations::ArticlePreview
|
|
6
6
|
@insertArticleCitation={{fn @insertArticleCitation article}}
|
|
7
7
|
@article={{article}} />
|
|
8
|
-
</
|
|
8
|
+
</Item>
|
|
9
9
|
{{/each}}
|
|
10
10
|
</AuList>
|
|
11
11
|
{{else}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{{#if @legalDocuments.length}}
|
|
2
|
-
<AuList @direction="vertical" @divider={{true}}
|
|
2
|
+
<AuList @direction="vertical" @divider={{true}} as |Item|>
|
|
3
3
|
{{#each @legalDocuments as |legalDocument|}}
|
|
4
|
-
<
|
|
4
|
+
<Item class="au-u-padding-left-small au-u-padding-right-small">
|
|
5
5
|
<CitationPlugin::Citations::LegalDocumentPreview
|
|
6
6
|
@legalDocument={{legalDocument}}
|
|
7
7
|
@onCitationInsert={{fn @onCitationInsert legalDocument}}
|
|
8
8
|
@onCitationDetails={{fn @onCitationDetails legalDocument}}
|
|
9
9
|
@fullSize={{@fullSize}} />
|
|
10
|
-
</
|
|
10
|
+
</Item>
|
|
11
11
|
{{/each}}
|
|
12
12
|
</AuList>
|
|
13
13
|
{{else}}
|
|
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { tracked } from '@glimmer/tracking';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { restartableTask, timeout } from 'ember-concurrency';
|
|
5
|
-
import {
|
|
5
|
+
import { service } from '@ember/service';
|
|
6
6
|
import { capitalize } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/strings';
|
|
7
7
|
import { task as trackedTask } from 'ember-resources/util/ember-concurrency';
|
|
8
8
|
import {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
insertArticleContainer,
|
|
6
6
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/decision-plugin/commands';
|
|
7
7
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
8
|
-
import {
|
|
8
|
+
import { service } from '@ember/service';
|
|
9
9
|
import IntlService from 'ember-intl/services/intl';
|
|
10
10
|
import { VALIDATION_KEY } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/validation';
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
-
import {
|
|
3
|
+
import { service } from '@ember/service';
|
|
4
4
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
5
5
|
import IntlService from 'ember-intl/services/intl';
|
|
6
6
|
import insertDocumentTitle from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/document-title-plugin/commands/insert-document-title';
|
|
@@ -17,6 +17,7 @@ export default class InsertTitleCardComponent extends Component<Args> {
|
|
|
17
17
|
insertDocumentTitle({
|
|
18
18
|
placeholder: this.intl.t(
|
|
19
19
|
'document-title-plugin.document-title-placeholder',
|
|
20
|
+
{ locale: this.args.controller.documentLanguage },
|
|
20
21
|
),
|
|
21
22
|
}),
|
|
22
23
|
{
|
|
@@ -31,6 +32,7 @@ export default class InsertTitleCardComponent extends Component<Args> {
|
|
|
31
32
|
insertDocumentTitle({
|
|
32
33
|
placeholder: this.intl.t(
|
|
33
34
|
'document-title-plugin.document-title-placeholder',
|
|
35
|
+
{ locale: this.args.controller.documentLanguage },
|
|
34
36
|
),
|
|
35
37
|
}),
|
|
36
38
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<Velcro @placement={{this.placement}} as |velcro|>
|
|
1
|
+
<this.Velcro @placement={{this.placement}} as |velcro|>
|
|
2
2
|
{{#let velcro.loop as |loop|}}
|
|
3
3
|
{{yield (hash velcroHook=velcro.hook handleHover=(modifier this.hover)) to='hover' }}
|
|
4
4
|
{{#if this.tooltipOpen}}
|
|
5
5
|
{{yield loop to='tooltip'}}
|
|
6
6
|
{{/if}}
|
|
7
7
|
{{/let}}
|
|
8
|
-
</Velcro>
|
|
8
|
+
</this.Velcro>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { modifier } from 'ember-modifier';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { Velcro } from 'ember-velcro';
|
|
4
5
|
|
|
5
6
|
interface Args {
|
|
6
7
|
placement?: string;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export default class HoverTooltip extends Component<Args> {
|
|
11
|
+
Velcro = Velcro;
|
|
10
12
|
hover = modifier(
|
|
11
13
|
(element) => {
|
|
12
14
|
element.addEventListener('mouseenter', this.showTooltip);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import {
|
|
2
|
+
import { service } from '@ember/service';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { ProseParser } from '@lblod/ember-rdfa-editor';
|
|
5
5
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import {
|
|
2
|
+
import { service } from '@ember/service';
|
|
3
3
|
import includeInstructions from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/utils/includeInstructions';
|
|
4
4
|
import RoadsignRegistryService from '@lblod/ember-rdfa-editor-lblod-plugins/services/roadsign-registry';
|
|
5
5
|
import { trackedFunction } from 'ember-resources/util/function';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<
|
|
1
|
+
<li class="au-c-list__item">
|
|
2
2
|
<AuButton
|
|
3
3
|
@skin="link"
|
|
4
4
|
@icon="add"
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
>
|
|
9
9
|
{{t "editor-plugins.roadsign-regulation.card.insert-measure"}}
|
|
10
10
|
</AuButton>
|
|
11
|
-
</
|
|
11
|
+
</li>
|
|
12
12
|
<RoadsignRegulationPlugin::RoadsignsModal @modalOpen={{this.modalOpen}} @closeModal={{this.closeModal}} @controller={{@controller}} @options={{@options}}/>
|
|
@@ -3,7 +3,7 @@ import Component from '@glimmer/component';
|
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
4
|
import { task } from 'ember-concurrency';
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
|
-
import {
|
|
6
|
+
import { service } from '@ember/service';
|
|
7
7
|
import includeInstructions from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/roadsign-regulation-plugin/utils/includeInstructions';
|
|
8
8
|
import {
|
|
9
9
|
NON_ZONAL_URI,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<
|
|
1
|
+
<li class="au-c-list__item">
|
|
2
2
|
<AuButton
|
|
3
3
|
@icon='add'
|
|
4
4
|
@iconAlignment='left'
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
>
|
|
8
8
|
{{t 'snippet-plugin.insert.title'}}
|
|
9
9
|
</AuButton>
|
|
10
|
-
</
|
|
10
|
+
</li>
|
|
11
11
|
|
|
12
12
|
<SnippetPlugin::SearchModal
|
|
13
13
|
@open={{this.showModal}}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{{#if @snippets.length}}
|
|
2
|
-
<AuList @direction='vertical'
|
|
2
|
+
<AuList @direction='vertical' as |Item|>
|
|
3
3
|
{{#each @snippets as |snippet|}}
|
|
4
|
-
<
|
|
4
|
+
<Item>
|
|
5
5
|
<SnippetPlugin::Snippets::SnippetPreview
|
|
6
6
|
@snippet={{snippet}}
|
|
7
7
|
@onInsert={{@onInsert}}
|
|
8
8
|
/>
|
|
9
|
-
</
|
|
9
|
+
</Item>
|
|
10
10
|
{{/each}}
|
|
11
11
|
</AuList>
|
|
12
12
|
{{/if}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<StandardTemplatePlugin::TemplateProvider @controller={{@controller}} @templates={{@templates}} as |provider|>
|
|
2
2
|
{{#if provider.hasApplicableTemplates}}
|
|
3
3
|
{{#each provider.applicableTemplates as |template|}}
|
|
4
|
-
<
|
|
4
|
+
<li class="au-c-list__item">
|
|
5
5
|
<AuButton
|
|
6
6
|
@skin="link"
|
|
7
7
|
@icon="add"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
>
|
|
11
11
|
{{template.title}}
|
|
12
12
|
</AuButton>
|
|
13
|
-
</
|
|
13
|
+
</li>
|
|
14
14
|
{{/each}}
|
|
15
15
|
{{/if}}
|
|
16
16
|
</StandardTemplatePlugin::TemplateProvider>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<AuList @divider={{true}} class='table-of-contents'
|
|
1
|
+
<AuList @divider={{true}} class='table-of-contents' as |Item|>
|
|
2
2
|
{{#each @entries as |outlineEntry|}}
|
|
3
|
-
<
|
|
3
|
+
<Item>
|
|
4
4
|
<AuButton
|
|
5
5
|
@wrap={{true}}
|
|
6
6
|
{{! template-lint-disable no-capital-arguments }}
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
@onEntryClick={{@onEntryClick}}
|
|
17
17
|
/>
|
|
18
18
|
{{/if}}
|
|
19
|
-
</
|
|
19
|
+
</Item>
|
|
20
20
|
{{/each}}
|
|
21
21
|
</AuList>
|
|
@@ -4,7 +4,7 @@ import { EmberNodeArgs } from '@lblod/ember-rdfa-editor/utils/ember-node';
|
|
|
4
4
|
import { Selection } from '@lblod/ember-rdfa-editor';
|
|
5
5
|
import { TableOfContentsConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/table-of-contents-plugin';
|
|
6
6
|
import { extractOutline } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/table-of-contents-plugin/utils';
|
|
7
|
-
import {
|
|
7
|
+
import { service } from '@ember/service';
|
|
8
8
|
import IntlService from 'ember-intl/services/intl';
|
|
9
9
|
export default class TableOfContentsComponent extends Component<EmberNodeArgs> {
|
|
10
10
|
@service declare intl: IntlService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
3
|
import { ValidationResult } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/validation';
|
|
4
|
-
import {
|
|
4
|
+
import { service } from '@ember/service';
|
|
5
5
|
import IntlService from 'ember-intl/services/intl';
|
|
6
6
|
|
|
7
7
|
interface Args {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { restartableTask, timeout } from 'ember-concurrency';
|
|
13
13
|
import { trackedReset } from 'tracked-toolbox';
|
|
14
14
|
import { trackedTask } from 'ember-resources/util/ember-concurrency';
|
|
15
|
-
import {
|
|
15
|
+
import { service } from '@ember/service';
|
|
16
16
|
import IntlService from 'ember-intl/services/intl';
|
|
17
17
|
|
|
18
18
|
type Args = {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
CodeList,
|
|
7
7
|
fetchCodeListsByPublisher,
|
|
8
8
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/utils/fetch-data';
|
|
9
|
-
import {
|
|
9
|
+
import { service } from '@ember/service';
|
|
10
10
|
import IntlService from 'ember-intl/services/intl';
|
|
11
11
|
import { trackedFunction } from 'ember-resources/util/function';
|
|
12
12
|
import { v4 as uuidv4 } from 'uuid';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
-
import {
|
|
3
|
+
import { service } from '@ember/service';
|
|
4
4
|
import { localCopy } from 'tracked-toolbox';
|
|
5
5
|
import Intl from 'ember-intl/services/intl';
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@onChange={{this.changeIncludeTime}}
|
|
22
22
|
/>
|
|
23
23
|
{{#if this.isCustom}}
|
|
24
|
-
<Velcro @placement="top" @offsetOptions={{hash mainAxis=10}} as |velcro|>
|
|
24
|
+
<this.Velcro @placement="top" @offsetOptions={{hash mainAxis=10}} as |velcro|>
|
|
25
25
|
<AuBadge
|
|
26
26
|
@size="small"
|
|
27
27
|
@icon="info-circle"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
{{t 'date-plugin.card.info-custom-time'}}
|
|
41
41
|
</AuPill>
|
|
42
42
|
{{/if}}
|
|
43
|
-
</Velcro>
|
|
43
|
+
</this.Velcro>
|
|
44
44
|
{{/if}}
|
|
45
45
|
</AuFormRow>
|
|
46
46
|
</VariablePlugin::Date::DateTimePicker>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
@onChange={{this.setDateFormatFromKey}}
|
|
68
68
|
/>
|
|
69
69
|
</AuFormRow>
|
|
70
|
-
{{/if}}
|
|
70
|
+
{{/if}}
|
|
71
71
|
{{#if (eq this.dateFormatType "custom")}}
|
|
72
72
|
<AuFormRow @alignment="post">
|
|
73
73
|
<AuButton @skin="secondary" @icon="info-circle"
|