@lblod/ember-rdfa-editor-lblod-plugins 13.0.0 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/README.md +1 -1
- 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/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/variable-plugin/address/edit.hbs +13 -11
- package/addon/components/variable-plugin/address/edit.ts +88 -22
- package/addon/components/variable-plugin/date/edit.hbs +12 -10
- package/addon/components/variable-plugin/date/edit.ts +7 -0
- 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/standard-template-plugin/index.ts +2 -0
- package/addon/plugins/standard-template-plugin/utils/instantiate-uuids.ts +5 -13
- package/addon/plugins/variable-plugin/utils/address-helpers.ts +19 -5
- package/addon/plugins/variable-plugin/variables/date.ts +15 -2
- package/addon/utils/memoize.ts +11 -3
- 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/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/variable-plugin/address/edit.d.ts +5 -3
- package/components/variable-plugin/date/edit.d.ts +1 -0
- package/models/template.d.ts +1 -7
- package/package.json +2 -9
- package/plugins/besluit-type-plugin/index.d.ts +1 -0
- package/plugins/citation-plugin/utils/types.d.ts +5 -4
- package/plugins/standard-template-plugin/index.d.ts +1 -0
- package/plugins/variable-plugin/utils/address-helpers.d.ts +3 -2
- package/translations/en-US.yaml +2 -0
- package/translations/nl-BE.yaml +2 -0
- package/utils/memoize.d.ts +6 -1
- package/addon/services/standard-template-plugin.ts +0 -55
- package/app/services/standard-template-plugin.js +0 -1
- 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/utils/memoize.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Return memoized version of the passed function.
|
|
3
|
+
* Memoization is done on the JSON stringified arguments, passing no args, undefined, or any number
|
|
4
|
+
* of only undefined arguments does not do any caching.
|
|
5
|
+
*/
|
|
6
|
+
export default function memoize<T>(func: (...a: unknown[]) => T) {
|
|
7
|
+
const cache: Record<string, T> = {};
|
|
3
8
|
return (...args: unknown[]) => {
|
|
9
|
+
if (args.length === 0 || args.every((arg) => arg === undefined)) {
|
|
10
|
+
return func(...args);
|
|
11
|
+
}
|
|
4
12
|
const serializedArgs = JSON.stringify(args);
|
|
5
|
-
cache[serializedArgs] = cache[serializedArgs] || func(args);
|
|
13
|
+
cache[serializedArgs] = cache[serializedArgs] || func(...args);
|
|
6
14
|
return cache[serializedArgs];
|
|
7
15
|
};
|
|
8
16
|
}
|
package/app/components/citation-plugin/citations/{decision-list.js → legal-document-detail.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/citation-plugin/citations/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/citation-plugin/citations/legal-document-detail';
|
package/app/components/citation-plugin/citations/{decision-detail.js → legal-document-list.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/citation-plugin/citations/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/citation-plugin/citations/legal-document-list';
|
package/app/components/citation-plugin/citations/{decision-preview.js → legal-document-preview.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/citation-plugin/citations/
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/citation-plugin/citations/legal-document-preview';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
-
import CurrentSessionService from '@lblod/frontend-gelinkt-notuleren/services/current-session';
|
|
4
3
|
import { ResolvedPNode } from '@lblod/ember-rdfa-editor/plugins/datastore';
|
|
5
4
|
import { BesluitType } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-type-plugin/utils/fetchBesluitTypes';
|
|
6
5
|
import { BesluitTypePluginOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-type-plugin';
|
|
@@ -14,7 +13,6 @@ type Args = {
|
|
|
14
13
|
options: BesluitTypePluginOptions;
|
|
15
14
|
};
|
|
16
15
|
export default class EditorPluginsToolbarDropdownComponent extends Component<Args> {
|
|
17
|
-
currentSession: CurrentSessionService;
|
|
18
16
|
/**
|
|
19
17
|
* Actual besluit type selected
|
|
20
18
|
* @property besluitType
|
|
@@ -14,10 +14,9 @@ export default class CitationCardComponent extends Component<Args> {
|
|
|
14
14
|
pageSize: number;
|
|
15
15
|
totalSize: number;
|
|
16
16
|
totalCount: number;
|
|
17
|
-
decisions: never[];
|
|
18
17
|
error: unknown;
|
|
19
18
|
showModal: boolean;
|
|
20
|
-
|
|
19
|
+
legalDocument: LegalDocument | null;
|
|
21
20
|
cardText: string | null;
|
|
22
21
|
cardLegislationType: string | null;
|
|
23
22
|
documentLegislationType: Option<string>;
|
|
@@ -30,7 +29,7 @@ export default class CitationCardComponent extends Component<Args> {
|
|
|
30
29
|
get decorations(): import("prosemirror-view").DecorationSet | undefined;
|
|
31
30
|
get activeDecoration(): Option<CitationDecoration>;
|
|
32
31
|
get searchText(): string;
|
|
33
|
-
get legislationTypes(): ("
|
|
32
|
+
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")[];
|
|
34
33
|
get selectedLegislationType(): {
|
|
35
34
|
label: string;
|
|
36
35
|
value: string;
|
|
@@ -39,14 +38,15 @@ export default class CitationCardComponent extends Component<Args> {
|
|
|
39
38
|
get selectedLegislationTypeUri(): string;
|
|
40
39
|
resetToDocumentState(): void;
|
|
41
40
|
onCardTextChange(event: InputEvent): void;
|
|
41
|
+
get governmentName(): string | undefined;
|
|
42
42
|
resourceSearch: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, () => Promise<LegalDocument[]>>;
|
|
43
|
-
|
|
43
|
+
legalDocumentsResource: import("ember-resources/util/ember-concurrency").TaskInstance<unknown>;
|
|
44
44
|
selectLegislationType(type: string): void;
|
|
45
|
-
|
|
45
|
+
openLegalDocumentDetailModal(legalDocument: LegalDocument): void;
|
|
46
46
|
openSearchModal(): Promise<void>;
|
|
47
47
|
closeModal(lastSearchType: string, lastSearchTerm: string): void;
|
|
48
|
-
|
|
49
|
-
insertArticleCitation(
|
|
48
|
+
insertLegalDocumentCitation(legalDocument: LegalDocument): void;
|
|
49
|
+
insertArticleCitation(legalDocument: LegalDocument, article: Article): void;
|
|
50
50
|
focus(): void;
|
|
51
51
|
willDestroy(): void;
|
|
52
52
|
}
|
|
@@ -23,7 +23,7 @@ export default class EditorPluginsCitationInsertComponent extends Component<Args
|
|
|
23
23
|
get controller(): SayController;
|
|
24
24
|
openModal(): void;
|
|
25
25
|
closeModal(): void;
|
|
26
|
-
|
|
27
|
-
insertArticleCitation(
|
|
26
|
+
insertLegalDocumentCitation(legalDocument: LegalDocument): void;
|
|
27
|
+
insertArticleCitation(legalDocument: LegalDocument, article: Article): void;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { Article } from '../../../plugins/citation-plugin/utils/article';
|
|
3
|
+
interface Args {
|
|
4
|
+
article: Article;
|
|
5
|
+
}
|
|
6
|
+
export default class ArticlePreviewComponent extends Component<Args> {
|
|
7
|
+
get content(): import("@ember/template/-private/handlebars").SafeString;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
package/components/citation-plugin/citations/{decision-detail.d.ts → legal-document-detail.d.ts}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { LegalDocument } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin/utils/legal-documents';
|
|
3
3
|
interface Args {
|
|
4
|
-
|
|
4
|
+
legalDocument: LegalDocument;
|
|
5
5
|
close: () => void;
|
|
6
6
|
config: {
|
|
7
7
|
endpoint: string;
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
export default class
|
|
10
|
+
export default class LegalDocumentDetailComponent extends Component<Args> {
|
|
11
11
|
error: unknown;
|
|
12
12
|
pageNumber: number;
|
|
13
13
|
pageSize: number;
|
package/components/citation-plugin/citations/{decision-preview.d.ts → legal-document-preview.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { LegalDocument } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin/utils/legal-documents';
|
|
3
3
|
interface Args {
|
|
4
|
-
|
|
4
|
+
legalDocument: LegalDocument;
|
|
5
5
|
}
|
|
6
|
-
export default class
|
|
6
|
+
export default class LegalDocumentPreviewComponent extends Component<Args> {
|
|
7
7
|
get isBesluit(): boolean;
|
|
8
8
|
get hasPublicationLink(): unknown;
|
|
9
9
|
}
|
|
@@ -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 {};
|
|
@@ -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;
|
|
@@ -41,6 +43,6 @@ export default class AddressEditComponent extends Component<Args> {
|
|
|
41
43
|
updateBusnumber(event: InputEvent): void;
|
|
42
44
|
get controller(): SayController;
|
|
43
45
|
searchMunicipality: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, (term: string) => Promise<string[]>>;
|
|
44
|
-
searchStreet: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, (term: string) => Promise<string[]>>;
|
|
46
|
+
searchStreet: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, (term: string) => Promise<(string | undefined)[]>>;
|
|
45
47
|
}
|
|
46
48
|
export {};
|
|
@@ -25,6 +25,7 @@ export default class DateEditComponent extends Component<Args> {
|
|
|
25
25
|
get documentDateFormat(): Option<string>;
|
|
26
26
|
get documentDateFormatType(): Option<DateFormat>;
|
|
27
27
|
get isCustom(): boolean;
|
|
28
|
+
get isCustomAllowed(): boolean;
|
|
28
29
|
get dateFormatType(): string;
|
|
29
30
|
get customDateFormatError(): ValidationError | null;
|
|
30
31
|
get humanError(): string | null;
|
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.1.0",
|
|
4
4
|
"description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -93,11 +93,6 @@
|
|
|
93
93
|
"@types/ember__template": "^4.0.1",
|
|
94
94
|
"@types/ember__test": "^4.0.1",
|
|
95
95
|
"@types/ember__utils": "^4.0.2",
|
|
96
|
-
"@types/ember-data": "^4.4.7",
|
|
97
|
-
"@types/ember-data__adapter": "^4.0.1",
|
|
98
|
-
"@types/ember-data__model": "^4.0.0",
|
|
99
|
-
"@types/ember-data__serializer": "^4.0.1",
|
|
100
|
-
"@types/ember-data__store": "^4.0.2",
|
|
101
96
|
"@types/ember-resolver": "^5.0.13",
|
|
102
97
|
"@types/prosemirror-dev-tools": "^3.0.3",
|
|
103
98
|
"@types/qunit": "^2.19.3",
|
|
@@ -118,7 +113,6 @@
|
|
|
118
113
|
"ember-cli-sri": "^2.1.1",
|
|
119
114
|
"ember-cli-terser": "^4.0.2",
|
|
120
115
|
"ember-cli-typescript": "^5.2.1",
|
|
121
|
-
"ember-data": "^4.12.0",
|
|
122
116
|
"ember-disable-prototype-extensions": "^1.1.3",
|
|
123
117
|
"ember-functions-as-helper-polyfill": "^2.1.1",
|
|
124
118
|
"ember-intl": "^5.7.2",
|
|
@@ -132,7 +126,7 @@
|
|
|
132
126
|
"ember-template-lint": "^4.16.1",
|
|
133
127
|
"ember-try": "^2.0.0",
|
|
134
128
|
"eslint": "^8.44.0",
|
|
135
|
-
"eslint-config-prettier": "^
|
|
129
|
+
"eslint-config-prettier": "^9.0.0",
|
|
136
130
|
"eslint-plugin-ember": "^11.1.0",
|
|
137
131
|
"eslint-plugin-node": "^11.1.0",
|
|
138
132
|
"eslint-plugin-prettier": "^5.0.0",
|
|
@@ -153,7 +147,6 @@
|
|
|
153
147
|
"@glint/template": "^1.1.0",
|
|
154
148
|
"@lblod/ember-rdfa-editor": "^6.0.0",
|
|
155
149
|
"ember-concurrency": "^2.3.7",
|
|
156
|
-
"ember-data": "^3.28.0 || ^4.0.0",
|
|
157
150
|
"ember-modifier": "^3.2.7",
|
|
158
151
|
"ember-source": "^3.28.0 || ^4.0.0"
|
|
159
152
|
},
|
|
@@ -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;
|
|
@@ -10,11 +10,12 @@ 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[]>;
|
|
17
|
-
export declare function fetchStreets(term: string, municipality: string): Promise<string[]>;
|
|
18
|
+
export declare function fetchStreets(term: string, municipality: string): Promise<(string | undefined)[]>;
|
|
18
19
|
type StreetInfo = {
|
|
19
20
|
municipality: string;
|
|
20
21
|
street: string;
|
package/translations/en-US.yaml
CHANGED
|
@@ -371,6 +371,8 @@ editor-plugins:
|
|
|
371
371
|
address-found: Address found.
|
|
372
372
|
errors:
|
|
373
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}"
|
|
374
376
|
http-error: "Something went wrong while resolving this address, status code: {status}."
|
|
375
377
|
contact: In case of persisting issues, contact <a href="mailto:{email}">{email}</a>.
|
|
376
378
|
nodeview:
|
package/translations/nl-BE.yaml
CHANGED
|
@@ -375,6 +375,8 @@ editor-plugins:
|
|
|
375
375
|
address-found: Adres gevonden.
|
|
376
376
|
errors:
|
|
377
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}"
|
|
378
380
|
http-error: "Er is iets mis gelopen bij het opvragen van dit adres, statuscode: {status}."
|
|
379
381
|
contact: Bij blijvende problemen, contacteer <a href="mailto:{email}">{email}</a>.
|
|
380
382
|
nodeview:
|
package/utils/memoize.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Return memoized version of the passed function.
|
|
3
|
+
* Memoization is done on the JSON stringified arguments, passing no args, undefined, or any number
|
|
4
|
+
* of only undefined arguments does not do any caching.
|
|
5
|
+
*/
|
|
6
|
+
export default function memoize<T>(func: (...a: unknown[]) => T): (...args: unknown[]) => T;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import Store from '@ember-data/store';
|
|
2
|
-
// eslint-disable-next-line ember/use-ember-data-rfc-395-imports
|
|
3
|
-
import Service, { inject as service } from '@ember/service';
|
|
4
|
-
import { task, Task, waitForProperty } from 'ember-concurrency';
|
|
5
|
-
import { tracked } from '@glimmer/tracking';
|
|
6
|
-
import TemplateModel from '../models/template';
|
|
7
|
-
|
|
8
|
-
const BLACKLISTED_TEMPLATES = new Set(['Citeeropschrift']);
|
|
9
|
-
|
|
10
|
-
export default class StandardTemplatePluginService extends Service {
|
|
11
|
-
@service declare store: Store;
|
|
12
|
-
@tracked declare templates: TemplateModel[];
|
|
13
|
-
|
|
14
|
-
constructor() {
|
|
15
|
-
// eslint-disable-next-line prefer-rest-params
|
|
16
|
-
super(...arguments);
|
|
17
|
-
void this.loadTemplates();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
fetchTemplates: Task<TemplateModel[], []> = task(async () => {
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
await waitForProperty(this, 'templates');
|
|
24
|
-
return this.templates;
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
async loadTemplates() {
|
|
28
|
-
const templates = await this.store.query('template', {
|
|
29
|
-
fields: { templates: 'title,contexts,matches,disabled-in-contexts' },
|
|
30
|
-
});
|
|
31
|
-
this.templates = templates.filter(
|
|
32
|
-
(template) => !BLACKLISTED_TEMPLATES.has(template.title),
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
Filter the valid templates for a context.
|
|
38
|
-
@method templatesForContext
|
|
39
|
-
@param {Array} Array of templates
|
|
40
|
-
@param {Array} The path of rdfaContext objects from the root till the current context
|
|
41
|
-
@return {Array} Array of templates (filtered)
|
|
42
|
-
@private
|
|
43
|
-
*/
|
|
44
|
-
templatesForContext(templates: TemplateModel[], rdfaTypes: string[]) {
|
|
45
|
-
const isMatchingForContext = (template: TemplateModel) => {
|
|
46
|
-
return (
|
|
47
|
-
rdfaTypes.filter((e) => template.get('contexts').includes(e)).length >
|
|
48
|
-
0 &&
|
|
49
|
-
rdfaTypes.filter((e) => template.get('disabledInContexts').includes(e))
|
|
50
|
-
.length === 0
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
return templates.filter(isMatchingForContext);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/services/standard-template-plugin';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Store from '@ember-data/store';
|
|
2
|
-
import Service from '@ember/service';
|
|
3
|
-
import { Task } from 'ember-concurrency';
|
|
4
|
-
import TemplateModel from '../models/template';
|
|
5
|
-
export default class StandardTemplatePluginService extends Service {
|
|
6
|
-
store: Store;
|
|
7
|
-
templates: TemplateModel[];
|
|
8
|
-
constructor();
|
|
9
|
-
fetchTemplates: Task<TemplateModel[], []>;
|
|
10
|
-
loadTemplates(): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
Filter the valid templates for a context.
|
|
13
|
-
@method templatesForContext
|
|
14
|
-
@param {Array} Array of templates
|
|
15
|
-
@param {Array} The path of rdfaContext objects from the root till the current context
|
|
16
|
-
@return {Array} Array of templates (filtered)
|
|
17
|
-
@private
|
|
18
|
-
*/
|
|
19
|
-
templatesForContext(templates: TemplateModel[], rdfaTypes: string[]): TemplateModel[];
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare module '@lblod/frontend-gelinkt-notuleren/models/account' {
|
|
2
|
-
import Model, { AsyncBelongsTo } from '@ember-data/model';
|
|
3
|
-
import GebruikerModel from '@lblod/frontend-gelinkt-notuleren/models/gebruiker';
|
|
4
|
-
|
|
5
|
-
export default class AccountModel extends Model {
|
|
6
|
-
voId: string;
|
|
7
|
-
provider: string;
|
|
8
|
-
gebruiker: AsyncBelongsTo<GebruikerModel>;
|
|
9
|
-
}
|
|
10
|
-
}
|
package/types/lblod/frontend-gelinkt-notuleren/models/bestuurseenheid-classificatie-code.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare module '@lblod/frontend-gelinkt-notuleren/models/bestuurseenheid-classificatie' {
|
|
2
|
-
import Model from '@ember-data/model';
|
|
3
|
-
export default class BestuurseenheidClassificatieCodeModel extends Model {
|
|
4
|
-
label: string;
|
|
5
|
-
scopeNote: string;
|
|
6
|
-
uri: string;
|
|
7
|
-
|
|
8
|
-
rdfaBindings: Record<string, string>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare module '@lblod/frontend-gelinkt-notuleren/models/bestuurseenheid' {
|
|
2
|
-
import Model, { AsyncBelongsTo } from '@ember-data/model';
|
|
3
|
-
import BestuurseenheidClassificatieCodeModel from '@lblod/frontend-gelinkt-notuleren/models/bestuurseenheid-classificatie';
|
|
4
|
-
export default class BestuurseenheidModel extends Model {
|
|
5
|
-
naam: string;
|
|
6
|
-
uri: string;
|
|
7
|
-
|
|
8
|
-
classificatie: AsyncBelongsTo<BestuurseenheidClassificatieCodeModel>;
|
|
9
|
-
|
|
10
|
-
rdfaBindings: Record<string, string>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare module '@lblod/frontend-gelinkt-notuleren/models/gebruiker' {
|
|
2
|
-
import Model, { AsyncHasMany } from '@ember-data/model';
|
|
3
|
-
import AccountModel from '@lblod/frontend-gelinkt-notuleren/models/account';
|
|
4
|
-
import BestuurseenheidModel from '@lblod/frontend-gelinkt-notuleren/models/bestuurseenheid';
|
|
5
|
-
export default class GebruikerModel extends Model {
|
|
6
|
-
voornaam: string;
|
|
7
|
-
achternaam: string;
|
|
8
|
-
rijksregisterNummer: string;
|
|
9
|
-
|
|
10
|
-
account: AsyncHasMany<AccountModel>;
|
|
11
|
-
|
|
12
|
-
bestuurseenheden: AsyncHasMany<BestuurseenheidModel>;
|
|
13
|
-
|
|
14
|
-
// this is only used for mock login afaik
|
|
15
|
-
get group(): BestuurseenheidModel;
|
|
16
|
-
get fullName(): string;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
declare module '@lblod/frontend-gelinkt-notuleren/services/current-session' {
|
|
2
|
-
import Service from '@ember/service';
|
|
3
|
-
// eslint-disable-next-line ember/use-ember-data-rfc-395-imports
|
|
4
|
-
import DS from 'ember-data';
|
|
5
|
-
import AccountModel from '@lblod/frontend-gelinkt-notuleren/models/account';
|
|
6
|
-
import GebruikerModel from '@lblod/frontend-gelinkt-notuleren/models/gebruiker';
|
|
7
|
-
import BestuurseenheidModel from '@lblod/frontend-gelinkt-notuleren/models/bestuurseenheid';
|
|
8
|
-
|
|
9
|
-
export default class CurrentSessionService extends Service {
|
|
10
|
-
session: Service;
|
|
11
|
-
store: DS.Store;
|
|
12
|
-
|
|
13
|
-
account: AccountModel;
|
|
14
|
-
user: GebruikerModel;
|
|
15
|
-
group: BestuurseenheidModel;
|
|
16
|
-
roles: unknown[];
|
|
17
|
-
|
|
18
|
-
get canRead(): boolean;
|
|
19
|
-
|
|
20
|
-
get canWrite(): boolean;
|
|
21
|
-
|
|
22
|
-
get canPublish(): boolean;
|
|
23
|
-
|
|
24
|
-
get canSign(): boolean;
|
|
25
|
-
|
|
26
|
-
hasRole(role: unknown): boolean;
|
|
27
|
-
|
|
28
|
-
load(): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
}
|