ngx-material-entity 15.1.6 → 15.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/classes/base.builder.d.ts +2 -0
  2. package/components/edit-page/edit-page.component.d.ts +8 -1
  3. package/components/input/input.component.d.ts +117 -6
  4. package/components/input/input.module.d.ts +4 -1
  5. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +8 -1
  6. package/components/table/table-data.builder.d.ts +15 -4
  7. package/components/table/table-data.d.ts +4 -4
  8. package/decorators/base/decorator-types.enum.d.ts +3 -1
  9. package/decorators/base/property-decorator-internal.data.d.ts +2 -0
  10. package/decorators/base/property-decorator.data.d.ts +5 -0
  11. package/decorators/has-many/has-many-decorator-internal.data.d.ts +17 -0
  12. package/decorators/has-many/has-many-decorator.data.d.ts +38 -0
  13. package/decorators/has-many/has-many.decorator.d.ts +9 -0
  14. package/encapsulation/lodash.utilities.d.ts +2 -2
  15. package/esm2020/classes/base.builder.mjs +3 -1
  16. package/esm2020/classes/entity.model.mjs +2 -3
  17. package/esm2020/components/confirm-dialog/confirm-dialog-data.builder.mjs +3 -3
  18. package/esm2020/components/edit-page/edit-page.component.mjs +15 -5
  19. package/esm2020/components/edit-page/page-edit-data.builder.mjs +4 -4
  20. package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +3 -3
  21. package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +3 -3
  22. package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +3 -3
  23. package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +3 -3
  24. package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +3 -3
  25. package/esm2020/components/input/input.component.mjs +420 -51
  26. package/esm2020/components/input/input.module.mjs +16 -4
  27. package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +3 -3
  28. package/esm2020/components/input/relations/references-many-input/references-many-input.component.mjs +3 -3
  29. package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +3 -3
  30. package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +16 -6
  31. package/esm2020/components/table/edit-dialog/edit-entity.builder.mjs +3 -3
  32. package/esm2020/components/table/table-data.builder.mjs +48 -50
  33. package/esm2020/components/table/table-data.mjs +1 -1
  34. package/esm2020/components/table/table.component.mjs +3 -3
  35. package/esm2020/decorators/base/decorator-types.enum.mjs +2 -1
  36. package/esm2020/decorators/base/property-decorator-internal.data.mjs +16 -1
  37. package/esm2020/decorators/base/property-decorator.data.mjs +1 -1
  38. package/esm2020/decorators/custom/custom-decorator-internal.data.mjs +3 -2
  39. package/esm2020/decorators/has-many/has-many-decorator-internal.data.mjs +32 -0
  40. package/esm2020/decorators/has-many/has-many-decorator.data.mjs +2 -0
  41. package/esm2020/decorators/has-many/has-many.decorator.mjs +13 -0
  42. package/esm2020/encapsulation/lodash.utilities.mjs +1 -1
  43. package/esm2020/public-api.mjs +3 -1
  44. package/esm2020/services/entity.service.mjs +31 -13
  45. package/esm2020/utilities/entity.utilities.mjs +58 -13
  46. package/fesm2015/ngx-material-entity.mjs +704 -193
  47. package/fesm2015/ngx-material-entity.mjs.map +1 -1
  48. package/fesm2020/ngx-material-entity.mjs +693 -189
  49. package/fesm2020/ngx-material-entity.mjs.map +1 -1
  50. package/package.json +1 -1
  51. package/public-api.d.ts +2 -0
  52. package/services/entity.service.d.ts +19 -4
  53. package/utilities/entity.utilities.d.ts +16 -1
@@ -1,4 +1,6 @@
1
1
  import { BaseEntityType } from './entity.model';
2
+ export declare const defaultTrue: () => boolean;
3
+ export declare const defaultFalse: () => boolean;
2
4
  /**
3
5
  * The abstract BaseBuilder class.
4
6
  */
@@ -68,10 +68,17 @@ export declare class NgxMatEntityEditPageComponent<EntityType extends BaseEntity
68
68
  data: PageEditDataInternal<EntityType>;
69
69
  isEntityValid: boolean;
70
70
  isEntityDirty: boolean;
71
- isReadOnly: boolean;
71
+ isEntityReadOnly: boolean;
72
72
  private inConfirmNavigation;
73
73
  get hasUnsavedChanges(): boolean;
74
74
  constructor(dialog: MatDialog, location: Location, route: ActivatedRoute, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageEditData<EntityType>);
75
+ /**
76
+ * Checks if the input with the given key is readonly.
77
+ *
78
+ * @param key - The key for the input to check.
79
+ * @returns Whether or not the input for the key is read only.
80
+ */
81
+ isReadOnly(key: keyof EntityType): boolean;
75
82
  ngOnInit(): Promise<void>;
76
83
  /**
77
84
  * Whether the page can be left without confirmation (of unsaved changes).
@@ -1,17 +1,22 @@
1
1
  import { SelectionModel } from '@angular/cdk/collections';
2
- import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
+ import { EnvironmentInjector, EventEmitter, OnInit, TemplateRef } from '@angular/core';
3
3
  import { NgModel } from '@angular/forms';
4
4
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
5
+ import { MatPaginator } from '@angular/material/paginator';
6
+ import { MatSort } from '@angular/material/sort';
5
7
  import { MatTableDataSource } from '@angular/material/table';
8
+ import { Router } from '@angular/router';
6
9
  import { BaseEntityType } from '../../classes/entity.model';
7
10
  import { EditArrayItemDialogDataInternal, EntityArrayDecoratorConfigInternal } from '../../decorators/array/array-decorator-internal.data';
8
11
  import { DecoratorTypes } from '../../decorators/base/decorator-types.enum';
9
12
  import { PropertyDecoratorConfigInternal } from '../../decorators/base/property-decorator-internal.data';
13
+ import { HasManyDecoratorConfigInternal } from '../../decorators/has-many/has-many-decorator-internal.data';
10
14
  import { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';
11
15
  import { DateUtilities } from '../../utilities/date.utilities';
12
16
  import { EntityTab, EntityUtilities } from '../../utilities/entity.utilities';
13
17
  import { SelectionUtilities } from '../../utilities/selection.utilities';
14
18
  import { CreateDialogDataInternal } from '../table/create-dialog/create-dialog-data.builder';
19
+ import { MultiSelectAction } from '../table/table-data';
15
20
  import * as i0 from "@angular/core";
16
21
  /**
17
22
  * The default input component. It gets the metadata of the property from the given @Input "entity" and @Input "propertyKey"
@@ -23,6 +28,8 @@ import * as i0 from "@angular/core";
23
28
  */
24
29
  export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit {
25
30
  private readonly dialog;
31
+ private readonly injector;
32
+ private readonly router;
26
33
  protected readonly defaultGetValidationErrorMessage: (model: NgModel) => string;
27
34
  /**
28
35
  * The entity on which the property exists. Used in conjunction with the "propertyKey"
@@ -77,20 +84,49 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
77
84
  arrayItem: EntityType;
78
85
  arrayItemPriorChanges: EntityType;
79
86
  arrayItemInlineTabs: EntityTab<EntityType>[];
80
- dataSource: MatTableDataSource<EntityType>;
81
- selection: SelectionModel<EntityType>;
82
- displayedColumns: string[];
87
+ entityArrayDataSource: MatTableDataSource<EntityType>;
88
+ entityArraySelection: SelectionModel<EntityType>;
89
+ entityArrayDisplayedColumns: string[];
83
90
  isArrayItemValid: boolean;
84
91
  isArrayItemDirty: boolean;
85
92
  indexOfEditedArrayItem: number;
86
93
  addArrayItemDialogData: CreateDialogDataInternal;
87
94
  arrayItemDialogTabs: EntityTab<EntityType>[];
88
95
  editArrayItemDialogData: EditArrayItemDialogDataInternal<EntityType>;
96
+ metadataHasMany: HasManyDecoratorConfigInternal<EntityType, EntityType>;
97
+ hasManyIsLoading: boolean;
98
+ hasManyPaginator: MatPaginator;
99
+ hasManySort: MatSort;
100
+ hasManyFilter: string;
101
+ displayedHasManyColumns: string[];
102
+ hasManyDataSource: MatTableDataSource<EntityType>;
103
+ hasManySelection: SelectionModel<EntityType>;
104
+ hasManyImportAction: Omit<MultiSelectAction<EntityType>, 'confirmationDialog'>;
105
+ private hasManyEntityService;
106
+ createHasManyDialog: TemplateRef<unknown>;
107
+ createHasManyDialogRef: MatDialogRef<unknown>;
108
+ editHasManyDialog: TemplateRef<unknown>;
109
+ editHasManyDialogRef: MatDialogRef<unknown>;
110
+ hasManyEntity: EntityType;
111
+ hasManyEntityPriorChanges: EntityType;
112
+ isHasManyEntityValid: boolean;
113
+ isHasManyEntityDirty: boolean;
114
+ hasManyCreateTabs: EntityTab<EntityType>[];
115
+ hasManyUpdateTabs: EntityTab<EntityType>[];
116
+ private createBaseUrl;
89
117
  readonly DecoratorTypes: typeof DecoratorTypes;
90
118
  EntityUtilities: typeof EntityUtilities;
91
119
  DateUtilities: typeof DateUtilities;
92
120
  SelectionUtilities: typeof SelectionUtilities;
93
- constructor(dialog: MatDialog, defaultGetValidationErrorMessage: (model: NgModel) => string);
121
+ constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string);
122
+ /**
123
+ * Checks if the input with the given key on the given property is readonly.
124
+ *
125
+ * @param property - The property on which to check the input.
126
+ * @param key - The key for the input to check.
127
+ * @returns Whether or not the input is read only.
128
+ */
129
+ isPropertyReadOnly(property: EntityType, key: keyof EntityType): boolean;
94
130
  /**
95
131
  * This is needed for the inputs to work inside an ngFor.
96
132
  *
@@ -99,8 +135,83 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
99
135
  */
100
136
  trackByFn(index: unknown): unknown;
101
137
  ngOnInit(): void;
138
+ private initHasMany;
102
139
  private initEntityArray;
103
140
  private initObjectInput;
141
+ private startImportJson;
142
+ private importJson;
143
+ /**
144
+ * Edits an entity. This either calls the edit-Method provided by the user or uses a default edit-dialog.
145
+ *
146
+ * @param entity - The entity that should be updated.
147
+ * @throws When no EntityClass was provided, as a new call is needed to initialize metadata.
148
+ */
149
+ editHasManyEntity(entity: EntityType): void;
150
+ private editHasManyDefaultPage;
151
+ private editHasManyDefaultDialog;
152
+ /**
153
+ * Tries to save the changes and close the dialog afterwards.
154
+ * Also handles the confirmation if required.
155
+ */
156
+ dialogEditHasMany(): void;
157
+ private dialogConfirmEditHasMany;
158
+ /**
159
+ * Tries to delete the entity and close the dialog afterwards.
160
+ * Also handles the confirmation if required.
161
+ */
162
+ deleteHasManyEntity(): void;
163
+ private confirmDeleteHasManyEntity;
164
+ /**
165
+ * Cancels the editing of the has many entity and closes the dialog.
166
+ */
167
+ dialogCancelEditHasMany(): void;
168
+ /**
169
+ * Creates a new Entity. This either calls the create-Method provided by the user or uses a default create-dialog.
170
+ *
171
+ * @throws When no EntityClass was provided, as a new call is needed to initialize metadata.
172
+ */
173
+ createHasManyEntity(): void;
174
+ private createHasManyDefault;
175
+ /**
176
+ * Creates the has many entity over the dialog.
177
+ */
178
+ dialogCreateHasMany(): void;
179
+ private dialogConfirmCreateHasMany;
180
+ /**
181
+ * Cancels the creating of the has many entity and closes the dialog.
182
+ */
183
+ dialogCancelCreateHasMany(): void;
184
+ /**
185
+ * Runs the MultiAction for all selected entries.
186
+ * Also handles confirmation with an additional dialog if configured.
187
+ *
188
+ * @param action - The MultiAction to run.
189
+ */
190
+ runHasManyMultiAction(action: MultiSelectAction<EntityType>): void;
191
+ private confirmRunHasManyMultiAction;
192
+ /**
193
+ * Checks if an MultiAction is disabled (e.g. Because no entries have been selected).
194
+ *
195
+ * @param action - The MultiAction to check.
196
+ * @returns Whether or not the Action can be used.
197
+ */
198
+ hasManyMultiActionDisabled(action: MultiSelectAction<EntityType>): boolean;
199
+ /**
200
+ * Applies the search input to filter the table entries.
201
+ *
202
+ * @param event - The keyup-event which contains the search-string of the user.
203
+ */
204
+ applyHasManyFilter(event: Event): void;
205
+ /**
206
+ * Checks if the entity is valid for updating and if it is dirty.
207
+ */
208
+ checkHasManyEntity(): Promise<void>;
209
+ /**
210
+ * Checks if the entity is valid.
211
+ *
212
+ * @param omit - Whether values omitted for create or update should be left out.
213
+ */
214
+ checkIsHasManyEntityValid(omit: 'create' | 'update'): void;
104
215
  /**
105
216
  * Checks whether the array item is valid and if the array item is dirty.
106
217
  */
@@ -148,7 +259,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
148
259
  /**
149
260
  * Removes all selected entries from the entity array.
150
261
  */
151
- remove(): void;
262
+ removeFromEntityArray(): void;
152
263
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputComponent<any>, never>;
153
264
  static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": "entity"; "propertyKey": "propertyKey"; "getValidationErrorMessage": "getValidationErrorMessage"; "hideOmitForCreate": "hideOmitForCreate"; "hideOmitForEdit": "hideOmitForEdit"; "isReadOnly": "isReadOnly"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
154
265
  }
@@ -41,8 +41,11 @@ import * as i39 from "@angular/material/button";
41
41
  import * as i40 from "@angular/material/datepicker";
42
42
  import * as i41 from "@angular/material/slider";
43
43
  import * as i42 from "@angular/material/tabs";
44
+ import * as i43 from "@angular/material/menu";
45
+ import * as i44 from "@angular/material/progress-spinner";
46
+ import * as i45 from "@angular/material/paginator";
44
47
  export declare class NgxMatEntityInputModule {
45
48
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputModule, never>;
46
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.StringPasswordInputComponent, typeof i6.BooleanCheckboxInputComponent, typeof i7.BooleanToggleInputComponent, typeof i8.BooleanDropdownInputComponent, typeof i9.NumberInputComponent, typeof i10.NumberDropdownInputComponent, typeof i11.NumberSliderInputComponent, typeof i12.ArrayStringChipsInputComponent, typeof i13.ArrayStringAutocompleteChipsComponent, typeof i14.DateInputComponent, typeof i15.DateRangeInputComponent, typeof i16.DateTimeInputComponent, typeof i17.ArrayDateInputComponent, typeof i18.ArrayDateTimeInputComponent, typeof i19.ArrayDateRangeInputComponent, typeof i20.FileInputComponent, typeof i21.FileImageInputComponent, typeof i22.FileDefaultInputComponent, typeof i23.DragDropDirective, typeof i24.ReferencesManyInputComponent, typeof i25.CustomInputComponent, typeof i26.NgxMatEntityInputComponent], [typeof i27.CommonModule, typeof i28.MatInputModule, typeof i29.FormsModule, typeof i30.MatFormFieldModule, typeof i31.MatSelectModule, typeof i32.MatAutocompleteModule, typeof i33.MatCheckboxModule, typeof i34.MatSlideToggleModule, typeof i35.MatChipsModule, typeof i36.MatIconModule, typeof i37.MatTableModule, typeof i38.MatDialogModule, typeof i39.MatButtonModule, typeof i40.MatDatepickerModule, typeof i41.MatSliderModule, typeof i42.MatTabsModule], [typeof i26.NgxMatEntityInputComponent]>;
49
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInputModule, [typeof i1.StringInputComponent, typeof i2.StringTextboxInputComponent, typeof i3.StringAutocompleteInputComponent, typeof i4.StringDropdownInputComponent, typeof i5.StringPasswordInputComponent, typeof i6.BooleanCheckboxInputComponent, typeof i7.BooleanToggleInputComponent, typeof i8.BooleanDropdownInputComponent, typeof i9.NumberInputComponent, typeof i10.NumberDropdownInputComponent, typeof i11.NumberSliderInputComponent, typeof i12.ArrayStringChipsInputComponent, typeof i13.ArrayStringAutocompleteChipsComponent, typeof i14.DateInputComponent, typeof i15.DateRangeInputComponent, typeof i16.DateTimeInputComponent, typeof i17.ArrayDateInputComponent, typeof i18.ArrayDateTimeInputComponent, typeof i19.ArrayDateRangeInputComponent, typeof i20.FileInputComponent, typeof i21.FileImageInputComponent, typeof i22.FileDefaultInputComponent, typeof i23.DragDropDirective, typeof i24.ReferencesManyInputComponent, typeof i25.CustomInputComponent, typeof i26.NgxMatEntityInputComponent], [typeof i27.CommonModule, typeof i28.MatInputModule, typeof i29.FormsModule, typeof i30.MatFormFieldModule, typeof i31.MatSelectModule, typeof i32.MatAutocompleteModule, typeof i33.MatCheckboxModule, typeof i34.MatSlideToggleModule, typeof i35.MatChipsModule, typeof i36.MatIconModule, typeof i37.MatTableModule, typeof i38.MatDialogModule, typeof i39.MatButtonModule, typeof i40.MatDatepickerModule, typeof i41.MatSliderModule, typeof i42.MatTabsModule, typeof i43.MatMenuModule, typeof i44.MatProgressSpinnerModule, typeof i45.MatPaginatorModule], [typeof i26.NgxMatEntityInputComponent]>;
47
50
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInputModule>;
48
51
  }
@@ -24,9 +24,16 @@ export declare class NgxMatEntityEditDialogComponent<EntityType extends BaseEnti
24
24
  data: EditEntityDataInternal<EntityType>;
25
25
  isEntityValid: boolean;
26
26
  isEntityDirty: boolean;
27
- isReadOnly: boolean;
27
+ isEntityReadOnly: boolean;
28
28
  constructor(inputData: EditEntityData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>, injector: Injector, dialog: MatDialog);
29
29
  ngOnInit(): void;
30
+ /**
31
+ * Checks if the input with the given key is readonly.
32
+ *
33
+ * @param key - The key for the input to check.
34
+ * @returns Whether or not the input for the key is read only.
35
+ */
36
+ isReadOnly(key: keyof EntityType): boolean;
30
37
  /**
31
38
  * Checks if the entity has become invalid or dirty.
32
39
  */
@@ -33,9 +33,9 @@ export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityTy
33
33
  defaultEdit: 'dialog' | 'page';
34
34
  searchString: (entity: EntityType) => string;
35
35
  allowCreate: () => boolean;
36
- allowRead: (entity: EntityType) => boolean;
37
- allowUpdate: (entity: EntityType) => boolean;
38
- allowDelete: (entity: EntityType) => boolean;
36
+ allowRead: (entity?: EntityType) => boolean;
37
+ allowUpdate: (entity?: EntityType) => boolean;
38
+ allowDelete: (entity?: EntityType) => boolean;
39
39
  multiSelectActions: MultiSelectAction<EntityType>[];
40
40
  multiSelectLabel: string;
41
41
  displayLoadingSpinner: boolean;
@@ -44,7 +44,8 @@ export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityTy
44
44
  EntityClass?: EntityClassNewable<EntityType>;
45
45
  edit?: (entity: EntityType) => unknown;
46
46
  create?: (entity: EntityType) => unknown;
47
- constructor(title: string, displayColumns: DisplayColumn<EntityType>[], EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>, searchLabel: string, createButtonLabel: string, defaultEdit: 'dialog' | 'page', searchString: (entity: EntityType) => string, allowCreate: () => boolean, allowRead: (entity: EntityType) => boolean, allowUpdate: (entity: EntityType) => boolean, allowDelete: (entity: EntityType) => boolean, multiSelectActions: MultiSelectAction<EntityType>[], multiSelectLabel: string, displayLoadingSpinner: boolean, allowJsonImport: boolean, importActionData: Omit<MultiSelectAction<EntityType>, 'action' | 'requireConfirmDialog'>, EntityClass?: EntityClassNewable<EntityType>, edit?: (entity: EntityType) => unknown, create?: (entity: EntityType) => unknown);
47
+ constructor(data: BaseData<EntityType>);
48
+ private allowDataToFunction;
48
49
  }
49
50
  /**
50
51
  * The Builder for the complete TableData. Sets default values and validates user input.
@@ -54,3 +55,13 @@ export declare class TableDataBuilder<EntityType extends BaseEntityType<EntityTy
54
55
  protected generateBaseData(data: TableData<EntityType>): TableDataInternal<EntityType>;
55
56
  protected validateInput(data: TableData<EntityType>): void;
56
57
  }
58
+ /**
59
+ * The default search function taken from googles mat table.
60
+ * This will be used if no custom search function is provided by the configuration.
61
+ *
62
+ * It generates a string from an entity which is then used to compare it to the search input.
63
+ *
64
+ * @param entity - An entity that is in the search.
65
+ * @returns The generated string of the given entity used for comparison with the search input.
66
+ */
67
+ export declare function defaultSearchFunction<EntityType extends BaseEntityType<EntityType>>(entity: EntityType): string;
@@ -99,25 +99,25 @@ export interface BaseData<EntityType extends BaseEntityType<EntityType>> {
99
99
  *
100
100
  * @default () => true
101
101
  */
102
- allowCreate?: () => boolean;
102
+ allowCreate?: boolean | (() => boolean);
103
103
  /**
104
104
  * Defines whether or not the user can view the specific entity.
105
105
  *
106
106
  * @default () => true
107
107
  */
108
- allowRead?: (entity: EntityType) => boolean;
108
+ allowRead?: boolean | ((entity?: EntityType) => boolean);
109
109
  /**
110
110
  * Defines whether or not the user can edit the specific entity.
111
111
  *
112
112
  * @default () => true
113
113
  */
114
- allowUpdate?: (entity: EntityType) => boolean;
114
+ allowUpdate?: boolean | ((entity?: EntityType) => boolean);
115
115
  /**
116
116
  * Whether or not the user can delete this specific entity.
117
117
  *
118
118
  * @default () => true
119
119
  */
120
- allowDelete?: (entity: EntityType) => boolean;
120
+ allowDelete?: boolean | ((entity?: EntityType) => boolean);
121
121
  /**
122
122
  * All Actions that you want to run on multiple entities can be defined here.
123
123
  * (e.g. Download as zip-file or mass delete).
@@ -3,6 +3,7 @@ import { CheckboxBooleanDecoratorConfigInternal, DropdownBooleanDecoratorConfigI
3
3
  import { CustomDecoratorConfigInternal } from '../custom/custom-decorator-internal.data';
4
4
  import { DateRangeDateDecoratorConfigInternal, DateTimeDateDecoratorConfigInternal, DefaultDateDecoratorConfigInternal } from '../date/date-decorator-internal.data';
5
5
  import { DefaultFileDecoratorConfigInternal, ImageFileDecoratorConfigInternal } from '../file/file-decorator-internal.data';
6
+ import { HasManyDecoratorConfigInternal } from '../has-many/has-many-decorator-internal.data';
6
7
  import { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal, SliderNumberDecoratorConfigInternal } from '../number/number-decorator-internal.data';
7
8
  import { DefaultObjectDecoratorConfigInternal } from '../object/object-decorator-internal.data';
8
9
  import { ReferencesManyDecoratorConfigInternal } from '../references-many/references-many-decorator-internal.data';
@@ -35,9 +36,10 @@ export declare enum DecoratorTypes {
35
36
  FILE_DEFAULT = "fileDefault",
36
37
  FILE_IMAGE = "fileImage",
37
38
  REFERENCES_MANY = "referencesMany",
39
+ HAS_MANY = "hasMany",
38
40
  CUSTOM = "custom"
39
41
  }
40
42
  /**
41
43
  * Gives the metadata-config Type based on the DecoratorTypes enum.
42
44
  */
43
- export declare type DecoratorType<T, CustomMetadataType extends Record<string, unknown>> = T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_PASSWORD ? PasswordStringDecoratorConfigInternal : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_SLIDER ? SliderNumberDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY_DATE ? DateArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_TIME ? DateTimeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_RANGE ? DateRangeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.DATE ? DefaultDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_RANGE ? DateRangeDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_TIME ? DateTimeDateDecoratorConfigInternal : T extends DecoratorTypes.FILE_DEFAULT ? DefaultFileDecoratorConfigInternal : T extends DecoratorTypes.FILE_IMAGE ? ImageFileDecoratorConfigInternal : T extends DecoratorTypes.REFERENCES_MANY ? ReferencesManyDecoratorConfigInternal<any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
45
+ export declare type DecoratorType<T, CustomMetadataType extends Record<string, unknown>> = T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_PASSWORD ? PasswordStringDecoratorConfigInternal : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_SLIDER ? SliderNumberDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY_DATE ? DateArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_TIME ? DateTimeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_RANGE ? DateRangeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.DATE ? DefaultDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_RANGE ? DateRangeDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_TIME ? DateTimeDateDecoratorConfigInternal : T extends DecoratorTypes.FILE_DEFAULT ? DefaultFileDecoratorConfigInternal : T extends DecoratorTypes.FILE_IMAGE ? ImageFileDecoratorConfigInternal : T extends DecoratorTypes.REFERENCES_MANY ? ReferencesManyDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
@@ -21,6 +21,8 @@ export declare abstract class PropertyDecoratorConfigInternal implements Propert
21
21
  omitForUpdate: boolean;
22
22
  defaultWidths: [Col, Col, Col];
23
23
  position: PositionInternal;
24
+ isReadOnly: (entity: any) => boolean;
24
25
  constructor(data: PropertyDecoratorConfig);
26
+ private isReadOnlyToFunction;
25
27
  }
26
28
  export {};
@@ -48,6 +48,11 @@ export declare abstract class PropertyDecoratorConfig {
48
48
  * @default { row: -1, order: -1} (Adds the property at the end)
49
49
  */
50
50
  position?: Position;
51
+ /**
52
+ * Whether or not this property is readonly.
53
+ * Can either be a boolean or a function returning a boolean.
54
+ */
55
+ isReadOnly?: boolean | ((entity: any) => boolean);
51
56
  }
52
57
  /**
53
58
  * The options for positioning a property when using default create/edit dialogs.
@@ -0,0 +1,17 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { BaseEntityType } from '../../classes/entity.model';
3
+ import { TableDataInternal } from '../../components/table/table-data.builder';
4
+ import { EntityService } from '../../services/entity.service';
5
+ import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';
6
+ import { HasManyDecoratorConfig } from './has-many-decorator.data';
7
+ /**
8
+ * The internal HasManyDecoratorConfig. Sets default values.
9
+ */
10
+ export declare class HasManyDecoratorConfigInternal<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfigInternal implements HasManyDecoratorConfig<EntityType, RelatedBaseEntityType> {
11
+ omitForCreate: true;
12
+ tableData: TableDataInternal<EntityType>;
13
+ RelatedEntityServiceClass: new (httpClient: HttpClient) => EntityService<RelatedBaseEntityType>;
14
+ createBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
15
+ readBaseUrl: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
16
+ constructor(data: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>);
17
+ }
@@ -0,0 +1,38 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { BaseEntityType } from '../../classes/entity.model';
3
+ import { TableData } from '../../components/table/table-data';
4
+ import { EntityService } from '../../services/entity.service';
5
+ import { PropertyDecoratorConfig } from '../base/property-decorator.data';
6
+ /**
7
+ * Definition for the @hasMany metadata.
8
+ */
9
+ export interface HasManyDecoratorConfig<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>> extends PropertyDecoratorConfig {
10
+ /**
11
+ * Whether or not the property gets omitted when creating new Entities.
12
+ *
13
+ * For the hasMany property this is always true, as entities can't be created for a non existing base entity.
14
+ */
15
+ omitForCreate?: true;
16
+ /**
17
+ * The configuration for the table with the hasMany entities.
18
+ */
19
+ tableData: TableData<EntityType>;
20
+ /**
21
+ * The service class for the base entity that the has hasMany entities belong to.
22
+ * This is used to generate the create and read base urls, eg. "customers/{id}/invoices".
23
+ * If you want to override that behavior you can provide a custom createBaseUrl and readBaseUrl function.
24
+ */
25
+ RelatedEntityServiceClass: new (httpClient: HttpClient) => EntityService<RelatedBaseEntityType>;
26
+ /**
27
+ * A function that generates a base url for create requests.
28
+ *
29
+ * @default `{baseEntityUrl}/{id}/{lastHasManyEntityUrlSegment}`
30
+ */
31
+ createBaseUrl?: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
32
+ /**
33
+ * A function that generates a base url for read requests.
34
+ *
35
+ * @default `{baseEntityUrl}/{id}/{lastHasManyEntityUrlSegment}`
36
+ */
37
+ readBaseUrl?: (baseEntity: RelatedBaseEntityType, metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>) => string;
38
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseEntityType } from '../../classes/entity.model';
2
+ import { HasManyDecoratorConfig } from './has-many-decorator.data';
3
+ /**
4
+ * Decorator for setting and getting has many property metadata.
5
+ *
6
+ * @param metadata - The metadata of the has many property.
7
+ * @returns The method that defines the metadata.
8
+ */
9
+ export declare function hasMany<EntityType extends BaseEntityType<EntityType>, RelatedBaseEntityType extends BaseEntityType<RelatedBaseEntityType>>(metadata: HasManyDecoratorConfig<EntityType, RelatedBaseEntityType>): (target: object, propertyKey: string) => void;
@@ -1,4 +1,4 @@
1
- import { Dictionary, Many, ValueKeyIteratee } from 'lodash';
1
+ import { Many, PartialObject, ValueKeyIteratee } from 'lodash';
2
2
  /**
3
3
  * Encapsulates all functionality of lodash.
4
4
  */
@@ -51,7 +51,7 @@ export declare abstract class LodashUtilities {
51
51
  * @param predicate - The function invoked per property.
52
52
  * @returns Returns the new object.
53
53
  */
54
- static omitBy<T>(object: Dictionary<T> | null | undefined, predicate?: ValueKeyIteratee<T>): Dictionary<T>;
54
+ static omitBy<T extends object>(object: T | null | undefined, predicate: ValueKeyIteratee<T[keyof T]>): PartialObject<T>;
55
55
  /**
56
56
  * Checks if value is classified as an Array object.
57
57
  *
@@ -1,3 +1,5 @@
1
+ export const defaultTrue = () => true;
2
+ export const defaultFalse = () => false;
1
3
  /**
2
4
  * The abstract BaseBuilder class.
3
5
  */
@@ -39,4 +41,4 @@ export class BaseBuilder {
39
41
  return this.data;
40
42
  }
41
43
  }
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5idWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY2xhc3Nlcy9iYXNlLmJ1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7O0dBRUc7QUFDSCxNQUFNLE9BQWdCLF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24gaXMgZG9uZVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFNldHMgdGhlIHZhbHVlIGZvciB0aGUgZ2l2ZW4ga2V5IGlmIG5vIHVzZXIgdmFsdWUgd2FzIHByb3ZpZGVkLlxuICAgICAqXG4gICAgICogQHBhcmFtIGtleSAtIFRoZSBrZXkgdG8gc2V0IHRoZSBkZWZhdWx0IHZhbHVlIGZvci5cbiAgICAgKiBAcGFyYW0gdmFsdWUgLSBUaGUgdmFsdWUgdG8gc2V0IHdoZW4gbm90aGluZyB3YXMgcHJvdmlkZWQuXG4gICAgICogQHJldHVybnMgVGhlIEJ1aWxkZXIuXG4gICAgICovXG4gICAgd2l0aERlZmF1bHQoa2V5OiBrZXlvZiBJbnB1dFR5cGUsIHZhbHVlOiBPbWl0PEludGVybmFsVHlwZVtrZXlvZiBJbnB1dFR5cGVdLCAndW5kZWZpbmVkJz4pOiBCYXNlQnVpbGRlcjxJbnRlcm5hbFR5cGUsIElucHV0VHlwZT4ge1xuICAgICAgICBpZiAodGhpcy5pbnB1dERhdGEgPT0gbnVsbCB8fCB0aGlzLmlucHV0RGF0YVtrZXldID09IG51bGwpIHtcbiAgICAgICAgICAgIHRoaXMuZGF0YVtrZXldID0gdmFsdWUgYXMgSW50ZXJuYWxUeXBlW2tleW9mIElucHV0VHlwZV07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogTWV0aG9kIHVzZWQgdG8gZ2V0IHRoZSBmaW5hbCBidWlsZCB2YWx1ZSBhZnRlciBhcHBseWluZyBhbGwgY2hhaW5pbmcuXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyBUaGUgYnVpbGQgdmFsdWUuXG4gICAgICovXG4gICAgZ2V0UmVzdWx0KCk6IEludGVybmFsVHlwZSB7XG4gICAgICAgIHJldHVybiB0aGlzLmRhdGE7XG4gICAgfVxufSJdfQ==
44
+ //# sourceMappingURL=data:application/json;base64,eyJ2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5hbFR5cGUsIElucHV0VHlwZT4ge1xuICAgICAgICBpZiAodGhpcy5pbnB1dERhdGEgPT0gbnVsbCB8fCB0aGlzLmlucHV0RGF0YVtrZXldID09IG51bGwpIHtcbiAgICAgICAgICAgIHRoaXMuZGF0YVtrZXldID0gdmFsdWUgYXMgSW50ZXJuYWxUeXBlW2tleW9mIElucHV0VHlwZV07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogTWV0aG9kIHVzZWQgdG8gZ2V0IHRoZSBmaW5hbCBidWlsZCB2YWx1ZSBhZnRlciBhcHBseWluZyBhbGwgY2hhaW5pbmcuXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyBUaGUgYnVpbGQgdmFsdWUuXG4gICAgICovXG4gICAgZ2V0UmVzdWx0KCk6IEludGVybmFsVHlwZSB7XG4gICAgICAgIHJldHVybiB0aGlzLmRhdGE7XG4gICAgfVxufSJdfQ==
@@ -1,12 +1,11 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { string } from '../decorators/string/string.decorator';
3
- import { EntityUtilities } from '../utilities/entity.utilities';
4
3
  /**
5
4
  * A base Entity class with a builtin id.
6
5
  */
7
6
  export class Entity {
8
7
  constructor(entity) {
9
- EntityUtilities.new(this, entity);
8
+ this.id = entity?.id;
10
9
  }
11
10
  }
12
11
  __decorate([
@@ -20,4 +19,4 @@ __decorate([
20
19
  }),
21
20
  __metadata("design:type", String)
22
21
  ], Entity.prototype, "id", void 0);
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5Lm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY2xhc3Nlcy9lbnRpdHkubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUF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EBzdHJpbmcoe1xuICAgICAgICBvbWl0Rm9yQ3JlYXRlOiB0cnVlLFxuICAgICAgICBvbWl0Rm9yVXBkYXRlOiB0cnVlLFxuICAgICAgICBkaXNwbGF5OiBmYWxzZSxcbiAgICAgICAgZGlzcGxheVN0eWxlOiAnbGluZScsXG4gICAgICAgIGRpc3BsYXlOYW1lOiAnSUQnLFxuICAgICAgICByZXF1aXJlZDogdHJ1ZVxuICAgIH0pXG4gICAgcmVhZG9ubHkgaWQhOiBzdHJpbmc7XG5cbiAgICBjb25zdHJ1Y3RvcihlbnRpdHk/OiBFbnRpdHkpIHtcbiAgICAgICAgdGhpcy5pZCA9IGVudGl0eT8uaWQgYXMgc3RyaW5nO1xuICAgIH1cbn0iXX0=
@@ -30,8 +30,8 @@ export class ConfirmDialogDataBuilder extends BaseBuilder {
30
30
  return;
31
31
  }
32
32
  if (data.requireConfirmation === true && !data.confirmationText) {
33
- throw new Error(`Missing required Input data "confirmationText".
34
- You can only omit this value when "requireConfirmation" is false.`);
33
+ // eslint-disable-next-line max-len
34
+ throw new Error('Missing required Input data "confirmationText". You can only omit this value when "requireConfirmation" is false.');
35
35
  }
36
36
  if (data.requireConfirmation !== true && data.confirmationText) {
37
37
  throw new Error('The "confirmationText" will never be shown because "requireConfirmation" is not set to true');
@@ -41,4 +41,4 @@ export class ConfirmDialogDataBuilder extends BaseBuilder {
41
41
  }
42
42
  }
43
43
  }
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1kaWFsb2ctZGF0YS5idWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY29tcG9uZW50cy9jb25maXJtLWRpYWxvZy9jb25maXJtLWRpYWxvZy1kYXRhLmJ1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQU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AgICAgICAgICBkYXRhPy50ZXh0ID8/IFsnRG8geW91IHJlYWxseSB3YW50IHRvIGRvIHRoaXM/J10sXG4gICAgICAgICAgICBkYXRhPy50eXBlID8/ICdkZWZhdWx0JyxcbiAgICAgICAgICAgIGRhdGE/LmNvbmZpcm1CdXR0b25MYWJlbCA/PyAnQ29uZmlybScsXG4gICAgICAgICAgICBkYXRhPy5jYW5jZWxCdXR0b25MYWJlbCA/PyAnQ2FuY2VsJyxcbiAgICAgICAgICAgIGRhdGE/LnRpdGxlID8/ICdDb25maXJtYXRpb24nLFxuICAgICAgICAgICAgZGF0YT8ucmVxdWlyZUNvbmZpcm1hdGlvbiA/PyBmYWxzZSxcbiAgICAgICAgICAgIGRhdGE/LmNvbmZpcm1hdGlvblRleHRcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUganNkb2MvcmVxdWlyZS1qc2RvY1xuICAgIHByb3RlY3RlZCBvdmVycmlkZSB2YWxpZGF0ZUlucHV0KGRhdGE/OiBDb25maXJtRGlhbG9nRGF0YSk6IHZvaWQge1xuICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZGF0YS5yZXF1aXJlQ29uZmlybWF0aW9uID09PSB0cnVlICYmICFkYXRhLmNvbmZpcm1hdGlvblRleHQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgTWlzc2luZyByZXF1aXJlZCBJbnB1dCBkYXRhIFwiY29uZmlybWF0aW9uVGV4dFwiLlxuICAgICAgICAgICAgWW91IGNhbiBvbmx5IG9taXQgdGhpcyB2YWx1ZSB3aGVuIFwicmVxdWlyZUNvbmZpcm1hdGlvblwiIGlzIGZhbHNlLmApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChkYXRhLnJlcXVpcmVDb25maXJtYXRpb24gIT09IHRydWUgJiYgZGF0YS5jb25maXJtYXRpb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