@lblod/ember-rdfa-editor-lblod-plugins 12.1.0 → 14.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 +59 -0
- package/README.md +215 -164
- package/addon/components/besluit-type-plugin/toolbar-dropdown.ts +1 -8
- package/addon/components/citation-plugin/citation-card.hbs +7 -7
- package/addon/components/citation-plugin/citation-card.ts +21 -16
- package/addon/components/citation-plugin/citation-insert.hbs +1 -1
- package/addon/components/citation-plugin/citation-insert.ts +8 -8
- package/addon/components/citation-plugin/citations/article-preview.hbs +1 -1
- package/addon/components/citation-plugin/citations/article-preview.ts +13 -0
- package/addon/components/citation-plugin/citations/{decision-detail.hbs → legal-document-detail.hbs} +6 -6
- package/addon/components/citation-plugin/citations/{decision-detail.ts → legal-document-detail.ts} +6 -3
- package/addon/components/citation-plugin/citations/{decision-list.hbs → legal-document-list.hbs} +6 -6
- package/addon/components/citation-plugin/citations/{decision-preview.hbs → legal-document-preview.hbs} +5 -5
- package/addon/components/citation-plugin/citations/{decision-preview.ts → legal-document-preview.ts} +4 -4
- package/addon/components/citation-plugin/citations/search-modal.hbs +12 -12
- package/addon/components/citation-plugin/citations/search-modal.ts +22 -19
- 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/standard-template-plugin/card.hbs +1 -1
- package/addon/components/standard-template-plugin/card.ts +5 -0
- package/addon/components/standard-template-plugin/template-provider.hbs +1 -2
- package/addon/components/standard-template-plugin/template-provider.ts +6 -14
- 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/edit.hbs +13 -11
- package/addon/components/variable-plugin/address/edit.ts +88 -22
- 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/models/template.ts +6 -13
- package/addon/plugins/besluit-type-plugin/index.ts +1 -0
- package/addon/plugins/citation-plugin/index.ts +1 -1
- package/addon/plugins/citation-plugin/utils/legal-documents.ts +3 -3
- package/addon/plugins/citation-plugin/utils/public-decisions.ts +6 -4
- package/addon/plugins/citation-plugin/utils/types.ts +7 -3
- 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/utils/address-helpers.ts +13 -1
- 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/citation-plugin/citations/{decision-list.js → legal-document-detail.js} +1 -1
- package/app/components/citation-plugin/citations/{decision-detail.js → legal-document-list.js} +1 -1
- package/app/components/citation-plugin/citations/{decision-preview.js → legal-document-preview.js} +1 -1
- package/app/components/{rdfa-date-plugin/card.js → variable-plugin/date/date-time-picker.js} +1 -1
- package/app/components/{rdfa-date-plugin/date.js → variable-plugin/date/edit.js} +1 -1
- package/app/components/{rdfa-date-plugin/insert.js → 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/help-modal.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/besluit-type-plugin/toolbar-dropdown.d.ts +0 -2
- package/components/citation-plugin/citation-card.d.ts +7 -7
- package/components/citation-plugin/citation-insert.d.ts +2 -2
- package/components/citation-plugin/citations/article-preview.d.ts +9 -0
- package/components/citation-plugin/citations/{decision-detail.d.ts → legal-document-detail.d.ts} +2 -2
- package/components/citation-plugin/citations/{decision-preview.d.ts → legal-document-preview.d.ts} +2 -2
- package/components/citation-plugin/citations/search-modal.d.ts +10 -11
- package/components/standard-template-plugin/card.d.ts +3 -0
- package/components/standard-template-plugin/template-provider.d.ts +5 -7
- package/components/template-comments-plugin/template-comment.d.ts +6 -0
- package/components/variable-plugin/address/edit.d.ts +4 -2
- 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/models/template.d.ts +1 -7
- package/package.json +7 -12
- package/plugins/besluit-type-plugin/index.d.ts +1 -0
- package/plugins/citation-plugin/utils/types.d.ts +5 -4
- package/plugins/table-of-contents-plugin/utils/index.d.ts +3 -2
- package/plugins/variable-plugin/utils/address-helpers.d.ts +2 -1
- 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 +13 -0
- package/translations/nl-BE.yaml +14 -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/addon/services/standard-template-plugin.ts +0 -55
- package/app/services/standard-template-plugin.js +0 -1
- package/components/rdfa-date-plugin/insert.d.ts +0 -16
- package/plugins/rdfa-date-plugin/index.d.ts +0 -15
- package/services/standard-template-plugin.d.ts +0 -20
- package/types/lblod/frontend-gelinkt-notuleren/models/account.d.ts +0 -10
- package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid-classificatie-code.d.ts +0 -10
- package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid.d.ts +0 -12
- package/types/lblod/frontend-gelinkt-notuleren/models/gebruiker-model.d.ts +0 -18
- package/types/lblod/frontend-gelinkt-notuleren/services/current-session.d.ts +0 -30
- /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
|
@@ -4,11 +4,11 @@ import IntlService from 'ember-intl/services/intl';
|
|
|
4
4
|
import { Article } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin/utils/article';
|
|
5
5
|
import { LegalDocument } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin/utils/legal-documents';
|
|
6
6
|
interface Args {
|
|
7
|
-
|
|
7
|
+
selectedLegalDocument: LegalDocument;
|
|
8
8
|
legislationTypeUri: string;
|
|
9
9
|
text: string;
|
|
10
|
-
|
|
11
|
-
insertArticleCitation: (
|
|
10
|
+
insertLegalDocumentCitation: (legalDocument: LegalDocument) => void;
|
|
11
|
+
insertArticleCitation: (legalDocument: LegalDocument, article: Article) => void;
|
|
12
12
|
closeModal: (legislationTypeUri?: string, text?: string) => void;
|
|
13
13
|
config: CitationPluginEmberComponentConfig;
|
|
14
14
|
}
|
|
@@ -17,9 +17,8 @@ export default class EditorPluginsCitationsSearchModalComponent extends Componen
|
|
|
17
17
|
pageNumber: number;
|
|
18
18
|
pageSize: number;
|
|
19
19
|
totalCount: number;
|
|
20
|
-
decisions: never[];
|
|
21
20
|
error: unknown;
|
|
22
|
-
|
|
21
|
+
selectedLegalDocument: LegalDocument | null;
|
|
23
22
|
documentDateFrom: Date | null;
|
|
24
23
|
documentDateTo: Date | null;
|
|
25
24
|
publicationDateFrom: Date | null;
|
|
@@ -43,14 +42,14 @@ export default class EditorPluginsCitationsSearchModalComponent extends Componen
|
|
|
43
42
|
monthNames: string[];
|
|
44
43
|
monthNamesShort: string[];
|
|
45
44
|
};
|
|
46
|
-
get legislationTypes(): ("
|
|
45
|
+
get legislationTypes(): ("Decreet" | "Koninklijk besluit" | "Wet" | "Ministerieel besluit" | "Besluit van de vlaamse regering" | "Omzendbrief" | "Verdrag" | "Grondwet" | "Grondwetswijziging" | "Samenwerkingsakkoord" | "Wetboek" | "Gecoördineerde wetten" | "Bijzondere wet" | "Genummerd koninklijk besluit" | "Protocol" | "Gemeentebesluit")[];
|
|
47
46
|
get legislationSelected(): string;
|
|
48
47
|
get text(): string;
|
|
49
48
|
get config(): CitationPluginEmberComponentConfig;
|
|
50
49
|
get searchText(): string;
|
|
51
50
|
get governmentSearchText(): string | undefined;
|
|
52
51
|
resourceSearch: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, () => Promise<LegalDocument[]>>;
|
|
53
|
-
|
|
52
|
+
legalDocumentResource: import("ember-resources/util/ember-concurrency").TaskInstance<unknown>;
|
|
54
53
|
get isBesluitType(): boolean;
|
|
55
54
|
setInputSearchText(event: InputEvent): void;
|
|
56
55
|
setGovernmentSearchText(event: InputEvent): void;
|
|
@@ -58,11 +57,11 @@ export default class EditorPluginsCitationsSearchModalComponent extends Componen
|
|
|
58
57
|
updateDocumentDateTo(_isoDate: unknown, date: Date): void;
|
|
59
58
|
updatePublicationDateFrom(_isoDate: unknown, date: Date): void;
|
|
60
59
|
updatePublicationDateTo(_isoDate: unknown, date: Date): void;
|
|
61
|
-
|
|
62
|
-
insertArticleCitation(
|
|
60
|
+
insertLegalDocumentCitation(legalDocument: LegalDocument): Promise<void>;
|
|
61
|
+
insertArticleCitation(legalDocument: LegalDocument, article: Article): Promise<void>;
|
|
63
62
|
closeModal(legislationTypeUri?: string, text?: string): Promise<void>;
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
openLegalDocumentDetail(legalDocument: LegalDocument): void;
|
|
64
|
+
closeLegalDocumentDetail(): void;
|
|
66
65
|
previousPage(): void;
|
|
67
66
|
nextPage(): void;
|
|
68
67
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import StandardTemplate from '@lblod/ember-rdfa-editor-lblod-plugins/models/template';
|
|
3
4
|
type Args = {
|
|
4
5
|
controller: SayController;
|
|
6
|
+
templates: StandardTemplate[];
|
|
5
7
|
};
|
|
6
8
|
export default class StandardTemplatePluginCardComponent extends Component<Args> {
|
|
7
9
|
get controller(): SayController;
|
|
10
|
+
get templates(): StandardTemplate[];
|
|
8
11
|
}
|
|
9
12
|
export {};
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import StandardTemplatePluginService from '@lblod/ember-rdfa-editor-lblod-plugins/services/standard-template-plugin';
|
|
3
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
4
|
-
import
|
|
3
|
+
import StandardTemplate from '@lblod/ember-rdfa-editor-lblod-plugins/models/template';
|
|
5
4
|
import { PNode, ResolvedPos } from '@lblod/ember-rdfa-editor';
|
|
6
5
|
type Args = {
|
|
7
6
|
controller: SayController;
|
|
7
|
+
templates: StandardTemplate[];
|
|
8
8
|
};
|
|
9
9
|
export declare function findAncestors(pos: ResolvedPos, predicate?: (node: PNode) => boolean): {
|
|
10
10
|
node: PNode;
|
|
11
11
|
pos: number;
|
|
12
12
|
}[];
|
|
13
13
|
export default class TemplateProviderComponent extends Component<Args> {
|
|
14
|
-
standardTemplatePlugin: StandardTemplatePluginService;
|
|
15
|
-
get busy(): boolean;
|
|
16
14
|
get controller(): SayController;
|
|
17
15
|
get hasApplicableTemplates(): boolean;
|
|
18
|
-
get applicableTemplates():
|
|
19
|
-
templateIsApplicable(template:
|
|
20
|
-
insert(template:
|
|
16
|
+
get applicableTemplates(): StandardTemplate[];
|
|
17
|
+
templateIsApplicable(template: StandardTemplate): boolean | 0;
|
|
18
|
+
insert(template: StandardTemplate): void;
|
|
21
19
|
}
|
|
22
20
|
export {};
|
|
@@ -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
|
}
|
|
@@ -31,9 +31,11 @@ export default class AddressEditComponent extends Component<Args> {
|
|
|
31
31
|
get canUpdateHousenumber(): string | undefined;
|
|
32
32
|
get canUpdateBusnumber(): string | undefined;
|
|
33
33
|
get showCard(): boolean;
|
|
34
|
-
get
|
|
34
|
+
get alternativeAddressFromError(): Address | undefined;
|
|
35
|
+
get addressToInsert(): Address | null | undefined;
|
|
36
|
+
get canUpdateAddressVariable(): boolean;
|
|
35
37
|
resolveAddressTask: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, () => Promise<Address | undefined>>;
|
|
36
|
-
newAddress: import("ember-resources/util/ember-concurrency").TaskInstance<
|
|
38
|
+
newAddress: import("ember-resources/util/ember-concurrency").TaskInstance<Address | undefined>;
|
|
37
39
|
updateAddressVariable(): void;
|
|
38
40
|
selectMunicipality(municipality: string): void;
|
|
39
41
|
selectStreet(street: string): void;
|
|
@@ -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/models/template.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare module 'ember-data/types/registries/model' {
|
|
3
|
-
export default interface ModelRegistry {
|
|
4
|
-
template: TemplateModel;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export default class TemplateModel extends Model {
|
|
1
|
+
export default interface StandardTemplate {
|
|
8
2
|
title: string;
|
|
9
3
|
matches: string[];
|
|
10
4
|
body: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/ember-rdfa-editor-lblod-plugins",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.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",
|
|
@@ -92,11 +93,6 @@
|
|
|
92
93
|
"@types/ember__template": "^4.0.1",
|
|
93
94
|
"@types/ember__test": "^4.0.1",
|
|
94
95
|
"@types/ember__utils": "^4.0.2",
|
|
95
|
-
"@types/ember-data": "^4.4.7",
|
|
96
|
-
"@types/ember-data__adapter": "^4.0.1",
|
|
97
|
-
"@types/ember-data__model": "^4.0.0",
|
|
98
|
-
"@types/ember-data__serializer": "^4.0.1",
|
|
99
|
-
"@types/ember-data__store": "^4.0.2",
|
|
100
96
|
"@types/ember-resolver": "^5.0.13",
|
|
101
97
|
"@types/prosemirror-dev-tools": "^3.0.3",
|
|
102
98
|
"@types/qunit": "^2.19.3",
|
|
@@ -111,13 +107,12 @@
|
|
|
111
107
|
"broccoli-asset-rev": "^3.0.0",
|
|
112
108
|
"changesets-release-it-plugin": "^0.1.1",
|
|
113
109
|
"ember-cli": "~4.12.0",
|
|
114
|
-
"ember-cli-typescript": "^5.2.1",
|
|
115
110
|
"ember-cli-dependency-checker": "^3.3.1",
|
|
116
111
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
117
112
|
"ember-cli-sass": "^11.0.1",
|
|
118
113
|
"ember-cli-sri": "^2.1.1",
|
|
119
114
|
"ember-cli-terser": "^4.0.2",
|
|
120
|
-
"ember-
|
|
115
|
+
"ember-cli-typescript": "^5.2.1",
|
|
121
116
|
"ember-disable-prototype-extensions": "^1.1.3",
|
|
122
117
|
"ember-functions-as-helper-polyfill": "^2.1.1",
|
|
123
118
|
"ember-intl": "^5.7.2",
|
|
@@ -149,11 +144,11 @@
|
|
|
149
144
|
},
|
|
150
145
|
"peerDependencies": {
|
|
151
146
|
"@appuniversum/ember-appuniversum": "^2.4.2",
|
|
152
|
-
"@
|
|
147
|
+
"@glint/template": "^1.1.0",
|
|
148
|
+
"@lblod/ember-rdfa-editor": "^6.0.0",
|
|
153
149
|
"ember-concurrency": "^2.3.7",
|
|
154
150
|
"ember-modifier": "^3.2.7",
|
|
155
|
-
"ember-source": "^3.28.0 || ^4.0.0"
|
|
156
|
-
"ember-data": "^3.28.0 || ^4.0.0"
|
|
151
|
+
"ember-source": "^3.28.0 || ^4.0.0"
|
|
157
152
|
},
|
|
158
153
|
"overrides": {
|
|
159
154
|
"ember-intl": {
|
|
@@ -14,11 +14,12 @@ export declare const LEGISLATION_TYPES: {
|
|
|
14
14
|
'bijzondere wet': string;
|
|
15
15
|
'genummerd koninklijk besluit': string;
|
|
16
16
|
protocol: string;
|
|
17
|
-
|
|
17
|
+
gemeentebesluit: string;
|
|
18
18
|
};
|
|
19
|
-
export declare const legislationKeysCapitalized: ["
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
19
|
+
export declare const legislationKeysCapitalized: ["Decreet" | "Koninklijk besluit" | "Wet" | "Ministerieel besluit" | "Besluit van de vlaamse regering" | "Omzendbrief" | "Verdrag" | "Grondwet" | "Grondwetswijziging" | "Samenwerkingsakkoord" | "Wetboek" | "Gecoördineerde wetten" | "Bijzondere wet" | "Genummerd koninklijk besluit" | "Protocol" | "Gemeentebesluit"];
|
|
20
|
+
export declare const legislationKeysCapitalizedWithoutGemeentebesluit: ("Decreet" | "Koninklijk besluit" | "Wet" | "Ministerieel besluit" | "Besluit van de vlaamse regering" | "Omzendbrief" | "Verdrag" | "Grondwet" | "Grondwetswijziging" | "Samenwerkingsakkoord" | "Wetboek" | "Gecoördineerde wetten" | "Bijzondere wet" | "Genummerd koninklijk besluit" | "Protocol" | "Gemeentebesluit")[];
|
|
21
|
+
export declare const isLegislationType: (type: string) => type is "decreet" | "koninklijk besluit" | "wet" | "ministerieel besluit" | "besluit van de vlaamse regering" | "omzendbrief" | "verdrag" | "grondwet" | "grondwetswijziging" | "samenwerkingsakkoord" | "wetboek" | "gecoördineerde wetten" | "bijzondere wet" | "genummerd koninklijk besluit" | "protocol" | "gemeentebesluit";
|
|
22
|
+
export declare const isGemeenteBesluitType: (type: string) => boolean;
|
|
22
23
|
export declare const LEGISLATION_TYPE_CONCEPTS: {
|
|
23
24
|
label: string;
|
|
24
25
|
value: string;
|
|
@@ -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 {};
|
|
@@ -10,7 +10,8 @@ type AddressSearchResult = {
|
|
|
10
10
|
export declare class AddressError extends Error {
|
|
11
11
|
translation: string;
|
|
12
12
|
status?: number;
|
|
13
|
-
|
|
13
|
+
alternativeAddress?: Address;
|
|
14
|
+
constructor({ message, translation, status, alternativeAddress, }: Pick<AddressError, 'message' | 'translation' | 'status' | 'alternativeAddress'>);
|
|
14
15
|
}
|
|
15
16
|
export declare const replaceAccents: (string: string) => string;
|
|
16
17
|
export declare function fetchMunicipalities(term: string): Promise<string[]>;
|
|
@@ -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
|
|
@@ -360,6 +371,8 @@ editor-plugins:
|
|
|
360
371
|
address-found: Address found.
|
|
361
372
|
errors:
|
|
362
373
|
address-not-found: We could not resolve the provided address
|
|
374
|
+
address-not-found-short: Address not found
|
|
375
|
+
alternative-address: "Provide another input or proceed with the following address: {address}"
|
|
363
376
|
http-error: "Something went wrong while resolving this address, status code: {status}."
|
|
364
377
|
contact: In case of persisting issues, contact <a href="mailto:{email}">{email}</a>.
|
|
365
378
|
nodeview:
|
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
|
|
@@ -363,6 +375,8 @@ editor-plugins:
|
|
|
363
375
|
address-found: Adres gevonden.
|
|
364
376
|
errors:
|
|
365
377
|
address-not-found: We konden het adres niet terugvinden.
|
|
378
|
+
address-not-found-short: Adres niet gevonden
|
|
379
|
+
alternative-address: "Geef een ander adres op of ga verder met het volgende adres: {address}"
|
|
366
380
|
http-error: "Er is iets mis gelopen bij het opvragen van dit adres, statuscode: {status}."
|
|
367
381
|
contact: Bij blijvende problemen, contacteer <a href="mailto:{email}">{email}</a>.
|
|
368
382
|
nodeview:
|
|
@@ -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
|
-
}
|