@lblod/ember-rdfa-editor-lblod-plugins 12.1.0 → 13.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 +29 -0
- package/README.md +215 -164
- package/addon/components/decision-plugin/decision-plugin-card.hbs +3 -3
- package/addon/components/snippet-plugin/snippet-list/snippet-list-view.hbs +2 -2
- package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.ts +1 -0
- package/addon/components/template-comments-plugin/template-comment.hbs +4 -4
- package/addon/components/template-comments-plugin/template-comment.ts +16 -0
- package/addon/components/variable-plugin/address/insert-variable.ts +14 -1
- package/addon/components/variable-plugin/address/insert.ts +15 -1
- package/addon/components/variable-plugin/address/nodeview.hbs +1 -1
- package/addon/components/variable-plugin/address/nodeview.ts +23 -1
- package/addon/components/variable-plugin/codelist/insert.ts +10 -1
- package/addon/components/{rdfa-date-plugin → variable-plugin/date}/date-time-picker.ts +1 -1
- package/addon/components/{rdfa-date-plugin/card.hbs → variable-plugin/date/edit.hbs} +3 -3
- package/addon/components/{rdfa-date-plugin/card.ts → variable-plugin/date/edit.ts} +10 -10
- package/addon/components/{rdfa-date-plugin → variable-plugin/date}/help-modal.ts +2 -2
- package/addon/components/variable-plugin/date/insert-variable.hbs +9 -0
- package/addon/components/variable-plugin/date/insert-variable.ts +57 -0
- package/addon/components/variable-plugin/date/insert.hbs +9 -9
- package/addon/components/variable-plugin/date/insert.ts +13 -10
- package/addon/components/{rdfa-date-plugin/date.ts → variable-plugin/date/nodeview.ts} +20 -6
- package/addon/components/variable-plugin/location/insert.ts +11 -2
- package/addon/components/variable-plugin/number/insert.hbs +1 -1
- package/addon/components/variable-plugin/number/insert.ts +9 -1
- package/addon/components/variable-plugin/number/nodeview.hbs +1 -1
- package/addon/components/variable-plugin/number/nodeview.ts +17 -0
- package/addon/components/variable-plugin/text/insert.ts +14 -2
- package/addon/plugins/table-of-contents-plugin/nodes/table-of-contents.ts +8 -13
- package/addon/plugins/table-of-contents-plugin/utils/index.ts +7 -4
- package/addon/plugins/template-comments-plugin/node.ts +12 -3
- package/addon/plugins/variable-plugin/variables/address.ts +15 -8
- package/addon/plugins/variable-plugin/variables/codelist.ts +4 -4
- package/addon/plugins/variable-plugin/variables/date.ts +200 -0
- package/addon/plugins/variable-plugin/variables/index.ts +1 -0
- package/addon/plugins/variable-plugin/variables/location.ts +4 -4
- package/addon/plugins/variable-plugin/variables/number.ts +11 -8
- package/addon/plugins/variable-plugin/variables/text.ts +4 -4
- package/addon/utils/translation.ts +19 -0
- package/app/components/{rdfa-date-plugin/date.js → variable-plugin/date/date-time-picker.js} +1 -1
- package/app/components/{rdfa-date-plugin/card.js → variable-plugin/date/edit.js} +1 -1
- package/app/components/{rdfa-date-plugin → variable-plugin/date}/help-modal.js +1 -1
- package/app/components/{rdfa-date-plugin/date-time-picker.js → variable-plugin/date/insert-variable.js} +1 -1
- package/app/components/{rdfa-date-plugin/insert.js → variable-plugin/date/nodeview.js} +1 -1
- package/app/styles/besluit-plugin.scss +2 -2
- package/app/styles/date-plugin.scss +0 -20
- package/app/styles/snippet-plugin.scss +1 -1
- package/app/styles/template-comments-plugin.scss +4 -4
- package/app/styles/variable-plugin.scss +2 -2
- package/components/template-comments-plugin/template-comment.d.ts +6 -0
- package/components/variable-plugin/address/insert-variable.d.ts +3 -0
- package/components/variable-plugin/address/insert.d.ts +3 -0
- package/components/variable-plugin/address/nodeview.d.ts +7 -0
- package/components/variable-plugin/codelist/insert.d.ts +1 -0
- package/components/{rdfa-date-plugin → variable-plugin/date}/date-time-picker.d.ts +1 -1
- package/components/{rdfa-date-plugin/card.d.ts → variable-plugin/date/edit.d.ts} +3 -3
- package/components/{rdfa-date-plugin → variable-plugin/date}/help-modal.d.ts +1 -1
- package/components/variable-plugin/date/insert-variable.d.ts +16 -0
- package/components/variable-plugin/date/insert.d.ts +4 -3
- package/components/{rdfa-date-plugin/date.d.ts → variable-plugin/date/nodeview.d.ts} +5 -1
- package/components/variable-plugin/location/insert.d.ts +1 -0
- package/components/variable-plugin/number/insert.d.ts +1 -0
- package/components/variable-plugin/number/nodeview.d.ts +5 -0
- package/components/variable-plugin/text/insert.d.ts +3 -0
- package/package.json +8 -6
- package/plugins/table-of-contents-plugin/utils/index.d.ts +3 -2
- package/plugins/{rdfa-date-plugin/nodes → variable-plugin/variables}/date.d.ts +10 -1
- package/plugins/variable-plugin/variables/index.d.ts +1 -0
- package/translations/en-US.yaml +11 -0
- package/translations/nl-BE.yaml +12 -0
- package/utils/translation.d.ts +3 -0
- package/addon/components/rdfa-date-plugin/insert.hbs +0 -9
- package/addon/components/rdfa-date-plugin/insert.ts +0 -52
- package/addon/plugins/rdfa-date-plugin/index.ts +0 -28
- package/addon/plugins/rdfa-date-plugin/nodes/date.ts +0 -167
- package/components/rdfa-date-plugin/insert.d.ts +0 -16
- package/plugins/rdfa-date-plugin/index.d.ts +0 -15
- /package/addon/components/{rdfa-date-plugin → variable-plugin/date}/date-time-picker.hbs +0 -0
- /package/addon/components/{rdfa-date-plugin → variable-plugin/date}/help-modal.hbs +0 -0
- /package/addon/components/{rdfa-date-plugin/date.hbs → variable-plugin/date/nodeview.hbs} +0 -0
- /package/addon/plugins/{rdfa-date-plugin/utils.ts → variable-plugin/utils/date-helpers.ts} +0 -0
- /package/plugins/{rdfa-date-plugin/utils.d.ts → variable-plugin/utils/date-helpers.d.ts} +0 -0
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
span.date {
|
|
3
|
-
border-radius: 0.3rem;
|
|
4
|
-
margin-right: 0.5rem !important;
|
|
5
|
-
padding: 0 0.2rem !important;
|
|
6
|
-
line-height: 1.2rem !important;
|
|
7
|
-
transition: border 0.1s ease-in-out, background-color 0.1s ease-in-out;
|
|
8
|
-
|
|
9
|
-
&::selection {
|
|
10
|
-
background-color: var(--au-blue-200);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
user-select: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
span.date.ProseMirror-selectednode {
|
|
17
|
-
background-color: var(--au-blue-200);
|
|
18
|
-
outline: 2px solid var(--au-blue-500);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
1
|
#date-plugin-time-info-tooltip {
|
|
22
2
|
z-index: 3;
|
|
23
3
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "ember-appuniversum";
|
|
2
2
|
|
|
3
|
-
.template-comment {
|
|
3
|
+
.say-template-comment {
|
|
4
4
|
color: var(--au-blue-900);
|
|
5
5
|
|
|
6
6
|
.au-c-alert__content {
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.default-cursor {
|
|
34
|
+
.say-default-cursor {
|
|
35
35
|
cursor: default;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.text-cursor {
|
|
38
|
+
.say-text-cursor {
|
|
39
39
|
cursor: text;
|
|
40
|
-
}
|
|
40
|
+
}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.number-settings {
|
|
85
|
+
.say-number-settings {
|
|
86
86
|
display: grid;
|
|
87
87
|
grid-template-columns: repeat(3, 1fr);
|
|
88
88
|
grid-template-rows: 1fr;
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
// add top padding starting from second element
|
|
130
130
|
* :not(*:nth-child(1)) {
|
|
131
131
|
margin-top: 5px;
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
+
import IntlService from 'ember-intl/services/intl';
|
|
2
3
|
import { EmberNodeArgs } from '@lblod/ember-rdfa-editor/utils/ember-node';
|
|
3
4
|
export default class TemplateCommentsPluginTemplateCommentComponent extends Component<EmberNodeArgs> {
|
|
5
|
+
intl: IntlService;
|
|
4
6
|
get controller(): import("@lblod/ember-rdfa-editor").SayController;
|
|
7
|
+
get documentLanguage(): string;
|
|
8
|
+
get translation(): {
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
5
11
|
get selectionInside(): boolean;
|
|
6
12
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
3
4
|
type Args = {
|
|
4
5
|
controller: SayController;
|
|
5
6
|
};
|
|
6
7
|
export default class VariablePluginAddressInsertVariableComponent extends Component<Args> {
|
|
8
|
+
intl: IntlService;
|
|
7
9
|
label?: string;
|
|
8
10
|
get controller(): SayController;
|
|
11
|
+
get documentLanguage(): string;
|
|
9
12
|
updateLabel(event: InputEvent): void;
|
|
10
13
|
insertAddress(): void;
|
|
11
14
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
3
4
|
type Args = {
|
|
4
5
|
controller: SayController;
|
|
5
6
|
};
|
|
6
7
|
export default class InsertAddressComponent extends Component<Args> {
|
|
8
|
+
intl: IntlService;
|
|
7
9
|
get controller(): SayController;
|
|
10
|
+
get documentLanguage(): string;
|
|
8
11
|
insertAddress(): void;
|
|
9
12
|
get canInsertAddress(): boolean;
|
|
10
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
+
import IntlService from 'ember-intl/services/intl';
|
|
2
3
|
import { PNode, SayController } from '@lblod/ember-rdfa-editor';
|
|
3
4
|
import { Address } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/variables/address';
|
|
4
5
|
type Args = {
|
|
@@ -7,6 +8,12 @@ type Args = {
|
|
|
7
8
|
controller: SayController;
|
|
8
9
|
};
|
|
9
10
|
export default class AddressNodeviewComponent extends Component<Args> {
|
|
11
|
+
intl: IntlService;
|
|
12
|
+
get controller(): SayController;
|
|
13
|
+
get documentLanguage(): string;
|
|
14
|
+
get translations(): {
|
|
15
|
+
placeholder: string;
|
|
16
|
+
};
|
|
10
17
|
get node(): PNode;
|
|
11
18
|
get address(): Address | null;
|
|
12
19
|
selectThisNode(): void;
|
|
@@ -20,6 +20,7 @@ export default class CodelistInsertComponent extends Component<Args> {
|
|
|
20
20
|
label?: string;
|
|
21
21
|
selectedStyleValue: string;
|
|
22
22
|
get controller(): SayController;
|
|
23
|
+
get documentLanguage(): string;
|
|
23
24
|
get schema(): import("prosemirror-model").Schema<any, any>;
|
|
24
25
|
get publisher(): string | undefined;
|
|
25
26
|
get endpoint(): string;
|
|
@@ -4,7 +4,7 @@ type Args = {
|
|
|
4
4
|
value?: Date;
|
|
5
5
|
onChange: (date: Date) => void;
|
|
6
6
|
};
|
|
7
|
-
export default class
|
|
7
|
+
export default class DateTimePickerComponent extends Component<Args> {
|
|
8
8
|
intl: Intl;
|
|
9
9
|
date?: Date;
|
|
10
10
|
get hours(): number | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
3
|
import { PNode } from '@lblod/ember-rdfa-editor';
|
|
4
|
-
import { DateFormat, DateOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin';
|
|
5
|
-
import { ValidationError } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin/utils';
|
|
6
4
|
import IntlService from 'ember-intl/services/intl';
|
|
7
5
|
import { Option } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
|
|
6
|
+
import { DateFormat, DateOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/variables/date';
|
|
7
|
+
import { ValidationError } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/utils/date-helpers';
|
|
8
8
|
type Args = {
|
|
9
9
|
controller: SayController;
|
|
10
10
|
options: DateOptions;
|
|
11
11
|
};
|
|
12
|
-
export default class
|
|
12
|
+
export default class DateEditComponent extends Component<Args> {
|
|
13
13
|
intl: IntlService;
|
|
14
14
|
helpModalOpen: boolean;
|
|
15
15
|
tooltipOpen: boolean;
|
|
@@ -3,7 +3,7 @@ interface Args {
|
|
|
3
3
|
modalOpen: boolean;
|
|
4
4
|
closeModal: () => void;
|
|
5
5
|
}
|
|
6
|
-
export default class
|
|
6
|
+
export default class DateHelpComponent extends Component<Args> {
|
|
7
7
|
exampleDate: Date;
|
|
8
8
|
formatExample(format: string): string;
|
|
9
9
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
4
|
+
type Args = {
|
|
5
|
+
controller: SayController;
|
|
6
|
+
};
|
|
7
|
+
export default class DateInsertVariableComponent extends Component<Args> {
|
|
8
|
+
intl: IntlService;
|
|
9
|
+
label?: string;
|
|
10
|
+
get controller(): SayController;
|
|
11
|
+
get schema(): import("prosemirror-model").Schema<any, any>;
|
|
12
|
+
get documentLanguage(): string;
|
|
13
|
+
updateLabel(event: InputEvent): void;
|
|
14
|
+
insert(): void;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
3
4
|
type Args = {
|
|
4
5
|
controller: SayController;
|
|
5
6
|
};
|
|
6
|
-
export default class
|
|
7
|
-
|
|
7
|
+
export default class DateInsertComponent extends Component<Args> {
|
|
8
|
+
intl: IntlService;
|
|
8
9
|
get controller(): SayController;
|
|
9
10
|
get schema(): import("prosemirror-model").Schema<any, any>;
|
|
10
|
-
|
|
11
|
+
get documentLanguage(): string;
|
|
11
12
|
insert(): void;
|
|
12
13
|
}
|
|
13
14
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { DecorationSource, PNode, SayController, SayView } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
3
4
|
type Args = {
|
|
4
5
|
getPos: () => number | undefined;
|
|
5
6
|
node: PNode;
|
|
@@ -9,7 +10,10 @@ type Args = {
|
|
|
9
10
|
selected: boolean;
|
|
10
11
|
contentDecorations?: DecorationSource;
|
|
11
12
|
};
|
|
12
|
-
export default class
|
|
13
|
+
export default class DateNodeviewComponent extends Component<Args> {
|
|
14
|
+
intl: IntlService;
|
|
15
|
+
get controller(): SayController;
|
|
16
|
+
get documentLanguage(): string;
|
|
13
17
|
onClick(): void;
|
|
14
18
|
get humanReadableDate(): string;
|
|
15
19
|
}
|
|
@@ -13,6 +13,7 @@ export default class LocationInsertComponent extends Component<Args> {
|
|
|
13
13
|
intl: IntlService;
|
|
14
14
|
get controller(): SayController;
|
|
15
15
|
get schema(): import("prosemirror-model").Schema<any, any>;
|
|
16
|
+
get documentLanguage(): string;
|
|
16
17
|
get endpoint(): string;
|
|
17
18
|
updateLabel(event: InputEvent): void;
|
|
18
19
|
insert(): void;
|
|
@@ -27,6 +27,7 @@ export default class NumberInsertComponent extends Component<Args> {
|
|
|
27
27
|
}>;
|
|
28
28
|
get controller(): SayController;
|
|
29
29
|
get schema(): import("prosemirror-model").Schema<any, any>;
|
|
30
|
+
get documentLanguage(): string;
|
|
30
31
|
get numberVariableError(): string;
|
|
31
32
|
updateLabel(event: InputEvent): void;
|
|
32
33
|
updateMinimumValue: (event: InputEvent) => void;
|
|
@@ -16,6 +16,11 @@ export default class NumberNodeviewComponent extends Component<Args> {
|
|
|
16
16
|
intl: intlService;
|
|
17
17
|
cursorPositionKeyDown: number | null;
|
|
18
18
|
focus(element: HTMLInputElement): void;
|
|
19
|
+
get controller(): SayController;
|
|
20
|
+
get documentLanguage(): string;
|
|
21
|
+
get translations(): {
|
|
22
|
+
placeholder: string;
|
|
23
|
+
};
|
|
19
24
|
get node(): PNode;
|
|
20
25
|
get formattedNumber(): string;
|
|
21
26
|
get selected(): boolean;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import IntlService from 'ember-intl/services/intl';
|
|
3
4
|
type Args = {
|
|
4
5
|
controller: SayController;
|
|
5
6
|
};
|
|
6
7
|
export default class TextVariableInsertComponent extends Component<Args> {
|
|
8
|
+
intl: IntlService;
|
|
7
9
|
label?: string;
|
|
8
10
|
get controller(): SayController;
|
|
9
11
|
get schema(): import("prosemirror-model").Schema<any, any>;
|
|
12
|
+
get documentLanguage(): string;
|
|
10
13
|
updateLabel(event: InputEvent): void;
|
|
11
14
|
insert(): void;
|
|
12
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/ember-rdfa-editor-lblod-plugins",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"@embroider/test-setup": "^3.0.1",
|
|
71
71
|
"@glimmer/component": "^1.1.2",
|
|
72
72
|
"@glimmer/tracking": "^1.1.2",
|
|
73
|
-
"@
|
|
73
|
+
"@glint/template": "^1.1.0",
|
|
74
|
+
"@lblod/ember-rdfa-editor": "^6.1.0",
|
|
74
75
|
"@rdfjs/types": "^1.1.0",
|
|
75
76
|
"@release-it/keep-a-changelog": "^3.1.0",
|
|
76
77
|
"@tsconfig/ember": "^3.0.0",
|
|
@@ -111,12 +112,12 @@
|
|
|
111
112
|
"broccoli-asset-rev": "^3.0.0",
|
|
112
113
|
"changesets-release-it-plugin": "^0.1.1",
|
|
113
114
|
"ember-cli": "~4.12.0",
|
|
114
|
-
"ember-cli-typescript": "^5.2.1",
|
|
115
115
|
"ember-cli-dependency-checker": "^3.3.1",
|
|
116
116
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
117
117
|
"ember-cli-sass": "^11.0.1",
|
|
118
118
|
"ember-cli-sri": "^2.1.1",
|
|
119
119
|
"ember-cli-terser": "^4.0.2",
|
|
120
|
+
"ember-cli-typescript": "^5.2.1",
|
|
120
121
|
"ember-data": "^4.12.0",
|
|
121
122
|
"ember-disable-prototype-extensions": "^1.1.3",
|
|
122
123
|
"ember-functions-as-helper-polyfill": "^2.1.1",
|
|
@@ -149,11 +150,12 @@
|
|
|
149
150
|
},
|
|
150
151
|
"peerDependencies": {
|
|
151
152
|
"@appuniversum/ember-appuniversum": "^2.4.2",
|
|
152
|
-
"@
|
|
153
|
+
"@glint/template": "^1.1.0",
|
|
154
|
+
"@lblod/ember-rdfa-editor": "^6.0.0",
|
|
153
155
|
"ember-concurrency": "^2.3.7",
|
|
156
|
+
"ember-data": "^3.28.0 || ^4.0.0",
|
|
154
157
|
"ember-modifier": "^3.2.7",
|
|
155
|
-
"ember-source": "^3.28.0 || ^4.0.0"
|
|
156
|
-
"ember-data": "^3.28.0 || ^4.0.0"
|
|
158
|
+
"ember-source": "^3.28.0 || ^4.0.0"
|
|
157
159
|
},
|
|
158
160
|
"overrides": {
|
|
159
161
|
"ember-intl": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PNode } from '@lblod/ember-rdfa-editor';
|
|
1
|
+
import { EditorState, PNode } from '@lblod/ember-rdfa-editor';
|
|
2
2
|
export type OutlineEntry = {
|
|
3
3
|
content: string;
|
|
4
4
|
pos: number;
|
|
@@ -8,9 +8,10 @@ export declare function createTableOfContents(entries: OutlineEntry[]): [string,
|
|
|
8
8
|
type Config = {
|
|
9
9
|
nodeHierarchy: string[];
|
|
10
10
|
}[];
|
|
11
|
-
export declare function extractOutline({ node, pos, config, }: {
|
|
11
|
+
export declare function extractOutline({ node, pos, config, state, }: {
|
|
12
12
|
node: PNode;
|
|
13
13
|
pos: number;
|
|
14
14
|
config: Config;
|
|
15
|
+
state: EditorState;
|
|
15
16
|
}): OutlineEntry[];
|
|
16
17
|
export {};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
export type DateFormat = {
|
|
2
|
+
label?: string;
|
|
3
|
+
key: string;
|
|
4
|
+
dateFormat: string;
|
|
5
|
+
dateTimeFormat: string;
|
|
6
|
+
};
|
|
7
|
+
export type DateOptions = {
|
|
8
|
+
formats: DateFormat[];
|
|
9
|
+
allowCustomFormat: boolean;
|
|
10
|
+
};
|
|
2
11
|
export declare const date: (options: DateOptions) => import("@lblod/ember-rdfa-editor/core/say-node-spec").default;
|
|
3
12
|
export declare const dateView: (options: DateOptions) => (controller: import("@lblod/ember-rdfa-editor").SayController) => import("prosemirror-view").NodeViewConstructor;
|
package/translations/en-US.yaml
CHANGED
|
@@ -192,6 +192,7 @@ document-title-plugin:
|
|
|
192
192
|
variable:
|
|
193
193
|
number:
|
|
194
194
|
placeholder: Insert number
|
|
195
|
+
label: number
|
|
195
196
|
type-number: Type a number...
|
|
196
197
|
error-not-integer: Only integers are allowed
|
|
197
198
|
error-not-number: Only numbers are allowed
|
|
@@ -203,6 +204,15 @@ variable:
|
|
|
203
204
|
codelist:
|
|
204
205
|
single-select: Single selection
|
|
205
206
|
multi-select: Multiple selection
|
|
207
|
+
label: codelist
|
|
208
|
+
location:
|
|
209
|
+
label: location
|
|
210
|
+
text:
|
|
211
|
+
label: text
|
|
212
|
+
date:
|
|
213
|
+
label: date
|
|
214
|
+
address:
|
|
215
|
+
label: address
|
|
206
216
|
variable-plugin:
|
|
207
217
|
insert-variable: Insert variable
|
|
208
218
|
button: Insert
|
|
@@ -283,6 +293,7 @@ template-comments-plugin:
|
|
|
283
293
|
remove: Remove template comment or example
|
|
284
294
|
move-up: Move comment up
|
|
285
295
|
move-down: Move comment down
|
|
296
|
+
heading: comment or example
|
|
286
297
|
|
|
287
298
|
pagination:
|
|
288
299
|
next: Next page
|
package/translations/nl-BE.yaml
CHANGED
|
@@ -203,6 +203,7 @@ table-of-contents-plugin:
|
|
|
203
203
|
variable:
|
|
204
204
|
number:
|
|
205
205
|
placeholder: Voeg getal in
|
|
206
|
+
label: nummer
|
|
206
207
|
type-number: typ een nummer...
|
|
207
208
|
error-not-integer: Enkel gehele getallen zijn toegelaten
|
|
208
209
|
error-not-number: Enkel getallen zijn toegelaten
|
|
@@ -214,6 +215,15 @@ variable:
|
|
|
214
215
|
codelist:
|
|
215
216
|
single-select: Enkelvoudige selectie
|
|
216
217
|
multi-select: Meervoudige selectie
|
|
218
|
+
label: codelijst
|
|
219
|
+
location:
|
|
220
|
+
label: locatie
|
|
221
|
+
text:
|
|
222
|
+
label: tekst
|
|
223
|
+
date:
|
|
224
|
+
label: datum
|
|
225
|
+
address:
|
|
226
|
+
label: adres
|
|
217
227
|
variable-plugin:
|
|
218
228
|
insert-variable: Voeg variabele in
|
|
219
229
|
button: Voeg in
|
|
@@ -287,6 +297,8 @@ template-comments-plugin:
|
|
|
287
297
|
remove: Verwijder Toelichtings- of voorbeeldbepaling
|
|
288
298
|
move-down: Toelichtings- of voorbeeldbepaling naar onder
|
|
289
299
|
move-up: Toelichtings- of voorbeeldbepaling naar boven
|
|
300
|
+
heading: toelichtingsbepaling
|
|
301
|
+
|
|
290
302
|
pagination:
|
|
291
303
|
next: Volgende pagina
|
|
292
304
|
previous: Vorige pagina
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { action } from '@ember/object';
|
|
3
|
-
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
4
|
-
import { NodeSelection } from '@lblod/ember-rdfa-editor';
|
|
5
|
-
import {
|
|
6
|
-
DateFormat,
|
|
7
|
-
DateOptions,
|
|
8
|
-
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin';
|
|
9
|
-
import { Option } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
|
|
10
|
-
|
|
11
|
-
type Args = {
|
|
12
|
-
controller: SayController;
|
|
13
|
-
options: DateOptions;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default class RdfaDatePluginInsertComponent extends Component<Args> {
|
|
17
|
-
get controller() {
|
|
18
|
-
return this.args.controller;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
get schema() {
|
|
22
|
-
return this.controller.schema;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
get formats(): DateFormat[] {
|
|
26
|
-
return this.args.options.formats;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
get defaultDateFormat(): Option<string> {
|
|
30
|
-
return this.formats[0].dateFormat;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@action
|
|
34
|
-
insertDate() {
|
|
35
|
-
this.controller.withTransaction((tr) => {
|
|
36
|
-
tr.replaceSelectionWith(
|
|
37
|
-
this.schema.node('date', {
|
|
38
|
-
onlyDate: true,
|
|
39
|
-
format: this.defaultDateFormat,
|
|
40
|
-
value: new Date().toISOString(),
|
|
41
|
-
}),
|
|
42
|
-
);
|
|
43
|
-
if (tr.selection.$anchor.nodeBefore) {
|
|
44
|
-
const resolvedPos = tr.doc.resolve(
|
|
45
|
-
tr.selection.anchor - tr.selection.$anchor.nodeBefore?.nodeSize,
|
|
46
|
-
);
|
|
47
|
-
tr.setSelection(new NodeSelection(resolvedPos));
|
|
48
|
-
}
|
|
49
|
-
return tr;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export const defaultDateFormats: DateFormat[] = [
|
|
2
|
-
{
|
|
3
|
-
key: 'short',
|
|
4
|
-
dateFormat: 'dd/MM/yy',
|
|
5
|
-
dateTimeFormat: 'dd/MM/yy HH:mm',
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
key: 'long',
|
|
9
|
-
dateFormat: 'EEEE dd MMMM yyyy',
|
|
10
|
-
dateTimeFormat: 'PPPPp',
|
|
11
|
-
},
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
export type DateFormat = {
|
|
15
|
-
label?: string;
|
|
16
|
-
key: string;
|
|
17
|
-
dateFormat: string;
|
|
18
|
-
dateTimeFormat: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export type DateOptions = {
|
|
22
|
-
placeholder: {
|
|
23
|
-
insertDate: string;
|
|
24
|
-
insertDateTime: string;
|
|
25
|
-
};
|
|
26
|
-
formats: DateFormat[];
|
|
27
|
-
allowCustomFormat: boolean;
|
|
28
|
-
};
|