ngx-material-entity 16.0.7 → 16.0.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/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +10 -5
  2. package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +4 -2
  3. package/components/input/input.component.d.ts +28 -8
  4. package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +12 -2
  5. package/components/input/relations/references-many-input/references-many-input.component.d.ts +10 -2
  6. package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +4 -2
  7. package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +12 -2
  8. package/components/input/string/string-password-input/string-password-input.component.d.ts +12 -0
  9. package/components/table/create-dialog/create-entity-dialog.component.d.ts +1 -1
  10. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +1 -1
  11. package/components/table/table-data.builder.d.ts +2 -1
  12. package/components/table/table-data.d.ts +10 -0
  13. package/decorators/array/array-decorator-internal.data.d.ts +2 -1
  14. package/decorators/array/array-decorator.data.d.ts +3 -1
  15. package/decorators/string/string-decorator-internal.data.d.ts +3 -1
  16. package/decorators/string/string-decorator.data.d.ts +7 -1
  17. package/directives/dynamic-style-class.directive.d.ts +25 -0
  18. package/directives/included-in.directive.d.ts +1 -1
  19. package/esm2022/components/create-page/create-page.component.mjs +8 -5
  20. package/esm2022/components/edit-page/edit-page.component.mjs +8 -5
  21. package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +28 -15
  22. package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +14 -19
  23. package/esm2022/components/input/base-input.component.mjs +7 -2
  24. package/esm2022/components/input/input.component.mjs +73 -27
  25. package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +36 -8
  26. package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +29 -5
  27. package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +17 -10
  28. package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +36 -8
  29. package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +57 -3
  30. package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +4 -4
  31. package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +9 -5
  32. package/esm2022/components/table/table-data.builder.mjs +5 -1
  33. package/esm2022/components/table/table-data.mjs +1 -1
  34. package/esm2022/components/table/table.component.mjs +6 -4
  35. package/esm2022/decorators/array/array-decorator-internal.data.mjs +11 -3
  36. package/esm2022/decorators/array/array-decorator.data.mjs +1 -1
  37. package/esm2022/decorators/string/string-decorator-internal.data.mjs +14 -3
  38. package/esm2022/decorators/string/string-decorator.data.mjs +1 -1
  39. package/esm2022/directives/dynamic-style-class.directive.mjs +51 -0
  40. package/esm2022/directives/included-in.directive.mjs +2 -3
  41. package/esm2022/encapsulation/reflect.utilities.mjs +6 -2
  42. package/esm2022/functions/default-style-classes.function.mjs +7 -0
  43. package/esm2022/public-api.mjs +6 -1
  44. package/esm2022/services/entity.service.mjs +3 -1
  45. package/esm2022/utilities/entity.utilities.mjs +37 -33
  46. package/esm2022/utilities/validation.utilities.mjs +46 -12
  47. package/fesm2022/ngx-material-entity.mjs +485 -158
  48. package/fesm2022/ngx-material-entity.mjs.map +1 -1
  49. package/functions/default-style-classes.function.d.ts +6 -0
  50. package/package.json +1 -1
  51. package/public-api.d.ts +4 -0
  52. package/utilities/entity.utilities.d.ts +4 -3
  53. package/utilities/validation.utilities.d.ts +7 -3
@@ -1,25 +1,30 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EnvironmentInjector, OnInit } from '@angular/core';
2
+ import { NgModel } from '@angular/forms';
2
3
  import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
3
4
  import { BaseEntityType } from '../../../../classes/entity.model';
4
5
  import { AutocompleteStringChipsArrayDecoratorConfigInternal } from '../../../../decorators/array/array-decorator-internal.data';
5
6
  import { ArrayStringChipsInputComponent } from '../array-string-chips-input/array-string-chips-input.component';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class ArrayStringAutocompleteChipsComponent<EntityType extends BaseEntityType<EntityType>> extends ArrayStringChipsInputComponent<EntityType> implements OnInit {
9
+ private readonly injector;
8
10
  filteredAutocompleteStrings: string[];
9
- get autocompleteStrings(): string[];
11
+ autocompleteStrings: string[];
10
12
  get autocompleteMetadata(): AutocompleteStringChipsArrayDecoratorConfigInternal;
11
- ngOnInit(): void;
13
+ constructor(injector: EnvironmentInjector);
14
+ ngOnInit(): Promise<void>;
12
15
  /**
13
16
  * Handles adding a string to the array when an autocomplete value has been selected.
14
17
  * @param event - The autocomplete selected event.
15
18
  * @param chipsInput - The element where the user typed the value.
19
+ * @param model - The model of the string array.
20
+ * @param chipsModel - The model of the single string input.
16
21
  */
17
- selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement): void;
22
+ selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement, model: NgModel, chipsModel: NgModel): void;
18
23
  /**
19
24
  * Dynamically filters the Autocomplete options when the user inputs something.
20
25
  * @param input - The input of the user.
21
26
  */
22
- filterAutocompleteStrings(input: unknown): void;
27
+ filterAutocompleteStrings(input: string): void;
23
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ArrayStringAutocompleteChipsComponent<any>, never>;
24
29
  static ɵcmp: i0.ɵɵComponentDeclaration<ArrayStringAutocompleteChipsComponent<any>, "array-string-autocomplete-chips", never, {}, {}, never, never, false, never>;
25
30
  }
@@ -1,4 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
+ import { NgModel } from '@angular/forms';
2
3
  import { MatChipInputEvent } from '@angular/material/chips';
3
4
  import { BaseEntityType } from '../../../../classes/entity.model';
4
5
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
@@ -16,8 +17,9 @@ export declare class ArrayStringChipsInputComponent<EntityType extends BaseEntit
16
17
  * it contains values, we can set it to undefined when the last element is removed
17
18
  * (removeStringChipArrayValue). That way we can use the "required" validator.
18
19
  * @param event - The event that fires when a new chip is completed.
20
+ * @param invalid - Whether or not the input is invalid.
19
21
  */
20
- addStringChipArrayValue(event: MatChipInputEvent): void;
22
+ addStringChipArrayValue(event: MatChipInputEvent, invalid: boolean): void;
21
23
  /**
22
24
  * Removes the given value from the array.
23
25
  * Sets the array to undefined if it is now empty.
@@ -28,7 +30,7 @@ export declare class ArrayStringChipsInputComponent<EntityType extends BaseEntit
28
30
  * @param value - The string to remove from the array.
29
31
  */
30
32
  removeStringChipArrayValue(value: string): void;
31
- protected validateAndSetPropertyValue(value: string): void;
33
+ setValidationErrors(model: NgModel, chipsModel: NgModel): void;
32
34
  static ɵfac: i0.ɵɵFactoryDeclaration<ArrayStringChipsInputComponent<any>, never>;
33
35
  static ɵcmp: i0.ɵɵComponentDeclaration<ArrayStringChipsInputComponent<any>, "array-string-chips-input", never, {}, {}, never, never, false, never>;
34
36
  }
@@ -270,7 +270,11 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
270
270
  /**
271
271
  * The possible references one dropdown values.
272
272
  */
273
- referencesOneDropdownValues: DropdownValue<string>[];
273
+ private referencesOneDropdownValues;
274
+ /**
275
+ * The filtered dropdown values that get displayed in the references one dropdown input.
276
+ */
277
+ filteredReferencesOneDropdownValues: DropdownValue<string>[];
274
278
  /**
275
279
  * A unique input name for the references one property.
276
280
  */
@@ -291,6 +295,17 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
291
295
  * Provides functionality around material selections inside of tables.
292
296
  */
293
297
  SelectionUtilities: typeof SelectionUtilities;
298
+ /**
299
+ * Gets the currently selected dropdown value for references one.
300
+ * Is needed so that the dropdown value will still be displayed,
301
+ * even when the filter method removes the value from the selectable dropdown values.
302
+ */
303
+ get currentReferencesOneDropdownValue(): DropdownValue<string> | undefined;
304
+ /**
305
+ * Whether or not the currently selected references one value should be shown,
306
+ * although it would have been filtered out by the search.
307
+ */
308
+ get shouldDisplayCurrentReferencesOneDropdownValue(): boolean;
294
309
  constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string, globalConfig: NgxGlobalDefaultValues, http: HttpClient);
295
310
  /**
296
311
  * Checks if the input with the given key on the given property is readonly.
@@ -315,6 +330,11 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
315
330
  getDisplayColumnValue(entity: EntityType, displayColumn: DisplayColumn<EntityType>): unknown;
316
331
  ngOnInit(): void;
317
332
  private initReferencesOne;
333
+ /**
334
+ * Filters the references one dropdown values.
335
+ * @param searchInput - The search input to filter for.
336
+ */
337
+ filterReferencesOneValues(searchInput: string): void;
318
338
  private initHasMany;
319
339
  private initEntityArray;
320
340
  private initObjectInput;
@@ -421,11 +441,11 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
421
441
  * Checks if the entity is valid.
422
442
  * @param omit - Whether values omitted for create or update should be left out.
423
443
  */
424
- checkIsHasManyEntityValid(omit: 'create' | 'update'): void;
444
+ checkIsHasManyEntityValid(omit: 'create' | 'update'): Promise<void>;
425
445
  /**
426
446
  * Checks whether the array item is valid and if the array item is dirty.
427
447
  */
428
- checkArrayItem(): void;
448
+ checkArrayItem(): Promise<void>;
429
449
  /**
430
450
  * Checks if the array item is dirty.
431
451
  */
@@ -433,7 +453,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
433
453
  /**
434
454
  * Checks if the arrayItem is valid.
435
455
  */
436
- checkIsArrayItemValid(): void;
456
+ checkIsArrayItemValid(): Promise<void>;
437
457
  /**
438
458
  * Emits that a the value has been changed.
439
459
  */
@@ -447,17 +467,17 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
447
467
  /**
448
468
  * Adds the array item defined in the dialog.
449
469
  */
450
- addArrayItem(): void;
470
+ addArrayItem(): Promise<void>;
451
471
  /**
452
472
  * Cancels adding the array item defined in the dialog.
453
473
  */
454
- closeAddArrayItemDialog(): void;
474
+ closeAddArrayItemDialog(): Promise<void>;
455
475
  /**
456
476
  * Edits an entity array item.
457
477
  * @param entity - The entity that has been clicked.
458
478
  * @param dCol - The display column that was clicked on.
459
479
  */
460
- editArrayItem(entity: EntityType, dCol: DisplayColumn<EntityType>): void;
480
+ editArrayItem(entity: EntityType, dCol: DisplayColumn<EntityType>): Promise<void>;
461
481
  /**
462
482
  * Saves changes on the array item in the dialog.
463
483
  */
@@ -465,7 +485,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
465
485
  /**
466
486
  * Closes the edit array item dialog and resets changes.
467
487
  */
468
- closeEditArrayItemDialog(): void;
488
+ closeEditArrayItemDialog(): Promise<void>;
469
489
  /**
470
490
  * Removes all selected entries from the entity array.
471
491
  */
@@ -1,12 +1,22 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EnvironmentInjector, OnInit } from '@angular/core';
2
2
  import { BaseEntityType } from '../../../../classes/entity.model';
3
3
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
4
4
  import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
5
5
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class NumberDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.NUMBER_DROPDOWN, number> implements OnInit {
8
- dropdownValues: DropdownValue<number | undefined>[];
8
+ private readonly injector;
9
+ private dropdownValues;
10
+ filteredDropdownValues: DropdownValue<number | undefined>[];
11
+ get currentDropdownValue(): DropdownValue<number | undefined> | undefined;
12
+ get shouldDisplayCurrentValue(): boolean;
13
+ constructor(injector: EnvironmentInjector);
9
14
  ngOnInit(): Promise<void>;
15
+ /**
16
+ * Filters the dropdown values.
17
+ * @param searchInput - The search input to filter for.
18
+ */
19
+ filterDropdownValues(searchInput: string): void;
10
20
  static ɵfac: i0.ɵɵFactoryDeclaration<NumberDropdownInputComponent<any>, never>;
11
21
  static ɵcmp: i0.ɵɵComponentDeclaration<NumberDropdownInputComponent<any>, "number-dropdown-input", never, {}, {}, never, never, false, never>;
12
22
  }
@@ -12,16 +12,24 @@ import * as i0 from "@angular/core";
12
12
  export declare class ReferencesManyInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.REFERENCES_MANY, string[]> implements OnInit {
13
13
  private readonly injector;
14
14
  private readonly globalConfig;
15
- allReferencedEntities: EntityType[];
16
- allDropdownValues: DropdownValue<string>[];
15
+ private allReferencedEntities;
16
+ private allDropdownValues;
17
17
  dropdownValues: DropdownValue<string>[];
18
+ filteredDropdownValues: DropdownValue<string>[];
18
19
  input: string;
19
20
  referencedEntitiesDataSource: MatTableDataSource<string>;
20
21
  displayedColumns: string[];
21
22
  selection: SelectionModel<string>;
22
23
  SelectionUtilities: typeof SelectionUtilities;
24
+ get currentDropdownValue(): DropdownValue<string> | undefined;
25
+ get shouldDisplayCurrentValue(): boolean;
23
26
  constructor(injector: EnvironmentInjector, globalConfig: NgxGlobalDefaultValues);
24
27
  ngOnInit(): Promise<void>;
28
+ /**
29
+ * Filters the dropdown values.
30
+ * @param searchInput - The search input to filter for.
31
+ */
32
+ filterDropdownValues(searchInput: string): void;
25
33
  /**
26
34
  * Gets the value to display in the column.
27
35
  * Runs in environment context to enable injection.
@@ -1,12 +1,14 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EnvironmentInjector, OnInit } from '@angular/core';
2
2
  import { BaseEntityType } from '../../../../classes/entity.model';
3
3
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
4
4
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class StringAutocompleteInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_AUTOCOMPLETE, string> implements OnInit {
7
+ private readonly injector;
7
8
  autocompleteStrings: string[];
8
9
  filteredAutocompleteStrings: string[];
9
- ngOnInit(): void;
10
+ constructor(injector: EnvironmentInjector);
11
+ ngOnInit(): Promise<void>;
10
12
  /**
11
13
  * Dynamically filters the Autocomplete options when the user inputs something.
12
14
  * @param input - The input of the user.
@@ -1,12 +1,22 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EnvironmentInjector, OnInit } from '@angular/core';
2
2
  import { BaseEntityType } from '../../../../classes/entity.model';
3
3
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
4
4
  import { DropdownValue } from '../../../../decorators/base/dropdown-value.interface';
5
5
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class StringDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_DROPDOWN, string> implements OnInit {
8
- dropdownValues: DropdownValue<string | undefined>[];
8
+ private readonly injector;
9
+ private dropdownValues;
10
+ filteredDropdownValues: DropdownValue<string | undefined>[];
11
+ get currentDropdownValue(): DropdownValue<string | undefined> | undefined;
12
+ get shouldDisplayCurrentValue(): boolean;
13
+ constructor(injector: EnvironmentInjector);
9
14
  ngOnInit(): Promise<void>;
15
+ /**
16
+ * Filters the dropdown values.
17
+ * @param searchInput - The search input to filter for.
18
+ */
19
+ filterDropdownValues(searchInput: string): void;
10
20
  static ɵfac: i0.ɵɵFactoryDeclaration<StringDropdownInputComponent<any>, never>;
11
21
  static ɵcmp: i0.ɵɵComponentDeclaration<StringDropdownInputComponent<any>, "string-dropdown-input", never, {}, {}, never, never, false, never>;
12
22
  }
@@ -3,14 +3,26 @@ import { BaseEntityType } from '../../../../classes/entity.model';
3
3
  import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
4
4
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
5
5
  import * as i0 from "@angular/core";
6
+ export declare enum PasswordStrength {
7
+ WEAK = "weak",
8
+ MEDIUM = "medium",
9
+ STRONG = "strong"
10
+ }
6
11
  export declare class StringPasswordInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.STRING_PASSWORD, string> implements OnInit {
7
12
  hide: boolean;
8
13
  hideConfirm: boolean;
9
14
  confirmRequired: boolean;
15
+ passwordStrength?: PasswordStrength;
16
+ PasswordStrength: typeof PasswordStrength;
10
17
  get confirmPassword(): string | undefined;
11
18
  set confirmPassword(value: string | undefined);
12
19
  ngOnInit(): void;
13
20
  passwordInput(): void;
21
+ private setPasswordStrength;
22
+ private isPasswordStrong;
23
+ private isPasswordMedium;
24
+ private isPasswordWeak;
25
+ private isPasswordComplex;
14
26
  static ɵfac: i0.ɵɵFactoryDeclaration<StringPasswordInputComponent<any>, never>;
15
27
  static ɵcmp: i0.ɵɵComponentDeclaration<StringPasswordInputComponent<any>, "string-password-input", never, {}, {}, never, never, false, never>;
16
28
  }
@@ -53,7 +53,7 @@ export declare class NgxMatEntityCreateDialogComponent<EntityType extends BaseEn
53
53
  /**
54
54
  * Checks if the entity is valid.
55
55
  */
56
- checkIsEntityValid(): void;
56
+ checkIsEntityValid(): Promise<void>;
57
57
  /**
58
58
  * Tries add the new entity and close the dialog afterwards.
59
59
  * Also handles the confirmation if required.
@@ -2,13 +2,13 @@ import { HttpClient } from '@angular/common/http';
2
2
  import { EnvironmentInjector, OnInit } from '@angular/core';
3
3
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
4
4
  import { BaseEntityType } from '../../../classes/entity.model';
5
+ import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
5
6
  import { EntityService } from '../../../services/entity.service';
6
7
  import { EntityTab, EntityUtilities } from '../../../utilities/entity.utilities';
7
8
  import { ValidationError } from '../../../utilities/validation.utilities';
8
9
  import { EditActionInternal } from './edit-data.builder';
9
10
  import { EditEntityData } from './edit-entity-data';
10
11
  import { EditEntityDataInternal } from './edit-entity.builder';
11
- import { NgxGlobalDefaultValues } from '../../../global-configuration-values';
12
12
  import * as i0 from "@angular/core";
13
13
  /**
14
14
  * The default dialog used to edit an existing entity based on the configuration passed in the MAT_DIALOG_DATA "inputData".
@@ -4,7 +4,7 @@ import { NgxGlobalDefaultValues } from '../../global-configuration-values';
4
4
  import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
5
5
  import { CreateDataInternal } from './create-dialog/create-data.builder';
6
6
  import { EditDataInternal } from './edit-dialog/edit-data.builder';
7
- import { BaseData, BaseTableAction, DisplayColumn, MultiSelectAction, TableData } from './table-data';
7
+ import { BaseData, BaseTableAction, DisplayColumn, DynamicStyleClasses, MultiSelectAction, TableData } from './table-data';
8
8
  /**
9
9
  * The internal BaseTableAction. Sets default values.
10
10
  */
@@ -75,6 +75,7 @@ export declare class BaseDataInternal<EntityType extends BaseEntityType<EntityTy
75
75
  displayLoadingSpinner: boolean;
76
76
  allowJsonImport: boolean;
77
77
  importActionData: Omit<BaseTableActionInternal, 'action'>;
78
+ dynamicRowStyleClasses: DynamicStyleClasses<EntityType>;
78
79
  EntityClass?: EntityClassNewable<EntityType>;
79
80
  edit?: (entity: EntityType) => unknown;
80
81
  create?: (entity: EntityType) => unknown;
@@ -25,6 +25,10 @@ export interface DisplayColumn<EntityType extends BaseEntityType<EntityType>> {
25
25
  */
26
26
  disableClick?: boolean;
27
27
  }
28
+ /**
29
+ * Dynamic css class that should be applied based on a condition.
30
+ */
31
+ export type DynamicStyleClasses<EntityType extends BaseEntityType<EntityType>> = (entity: EntityType) => string[];
28
32
  /**
29
33
  * A table action that will run regardless if something has been selected in the table.
30
34
  */
@@ -189,6 +193,12 @@ export interface BaseData<EntityType extends BaseEntityType<EntityType>> {
189
193
  * Data to customize the json import action.
190
194
  */
191
195
  importActionData?: Omit<BaseTableAction, 'action' | 'requireConfirmDialog' | 'type'>;
196
+ /**
197
+ * Configuration for css classes that should be applied to table rows based on a condition.
198
+ * This could be used to eg. Set the background color to green when an item has the status completed etc.
199
+ * INFO: You need to use ng-deep or apply the styling in the styles.scss.
200
+ */
201
+ dynamicRowStyleClasses?: DynamicStyleClasses<EntityType>;
192
202
  }
193
203
  /**
194
204
  * The data of the default create-dialog.
@@ -110,7 +110,7 @@ export declare class StringChipsArrayDecoratorConfigInternal extends PropertyDec
110
110
  * The internal AutocompleteStringChipsArrayDecoratorConfig. Sets default values.
111
111
  */
112
112
  export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string[]> implements AutocompleteStringChipsArrayDecoratorConfig {
113
- autocompleteValues: string[];
113
+ autocompleteValues: (entity: any) => Promise<string[]>;
114
114
  itemType: DecoratorTypes.STRING_AUTOCOMPLETE;
115
115
  allowDuplicates: boolean;
116
116
  duplicatesErrorDialog: ConfirmDialogData;
@@ -120,4 +120,5 @@ export declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends
120
120
  regex?: RegExp;
121
121
  restrictToOptions?: boolean;
122
122
  constructor(data: AutocompleteStringChipsArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
123
+ private autocompleteValuesToFunction;
123
124
  }
@@ -7,6 +7,7 @@ import { DecoratorTypes } from '../base/decorator-types.enum';
7
7
  import { DropdownValue } from '../base/dropdown-value.interface';
8
8
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
9
9
  import { DateRange } from '../date/date-decorator.data';
10
+ import { StringAutocompleteValues } from '../string/string-decorator.data';
10
11
  /**
11
12
  * Interface definition for the @array metadata.
12
13
  */
@@ -273,7 +274,7 @@ export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecora
273
274
  /**
274
275
  * The autocomplete values.
275
276
  */
276
- autocompleteValues: string[];
277
+ autocompleteValues: StringAutocompleteValues;
277
278
  /**
278
279
  * The minimum required length of the string.
279
280
  */
@@ -288,6 +289,7 @@ export interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecora
288
289
  regex?: RegExp;
289
290
  /**
290
291
  * Whether or not valid inputs should be restricted to the autocomplete options.
292
+ * @default false
291
293
  */
292
294
  restrictToOptions?: boolean;
293
295
  }
@@ -34,12 +34,13 @@ export declare class TextboxStringDecoratorConfigInternal extends PropertyDecora
34
34
  */
35
35
  export declare class AutocompleteStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string> implements AutocompleteStringDecoratorConfig {
36
36
  displayStyle: 'autocomplete';
37
- autocompleteValues: string[];
37
+ autocompleteValues: (entity: any) => Promise<string[]>;
38
38
  minLength?: number;
39
39
  maxLength?: number;
40
40
  regex?: RegExp;
41
41
  restrictToOptions?: boolean;
42
42
  constructor(data: AutocompleteStringDecoratorConfig);
43
+ private autocompleteValuesToFunction;
43
44
  }
44
45
  /**
45
46
  * The internal PasswordStringDecoratorConfig. Sets default values.
@@ -51,5 +52,6 @@ export declare class PasswordStringDecoratorConfigInternal extends PropertyDecor
51
52
  regex?: RegExp;
52
53
  needsConfirmation: boolean;
53
54
  confirmationDisplayName: string;
55
+ displayPasswordStrength: boolean;
54
56
  constructor(data: PasswordStringDecoratorConfig);
55
57
  }
@@ -1,6 +1,7 @@
1
1
  import { DropdownValue } from '../base/dropdown-value.interface';
2
2
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
3
3
  export type StringDropdownValues = DropdownValue<string | undefined>[] | ((entity: any) => DropdownValue<string | undefined>[]) | ((entity: any) => Promise<DropdownValue<string | undefined>[]>);
4
+ export type StringAutocompleteValues = string[] | ((entity: any) => string[]) | ((entity: any) => Promise<string[]>);
4
5
  /**
5
6
  * Definition for the @string metadata.
6
7
  */
@@ -61,7 +62,7 @@ export interface AutocompleteStringDecoratorConfig extends StringDecoratorConfig
61
62
  /**
62
63
  * The autocomplete values.
63
64
  */
64
- autocompleteValues: string[];
65
+ autocompleteValues: StringAutocompleteValues;
65
66
  /**
66
67
  * The minimum required length of the string.
67
68
  */
@@ -101,6 +102,11 @@ export interface PasswordStringDecoratorConfig extends StringDecoratorConfig {
101
102
  * @default true
102
103
  */
103
104
  needsConfirmation?: boolean;
105
+ /**
106
+ * Whether or not the password strength should be displayed.
107
+ * @default true
108
+ */
109
+ displayPasswordStrength?: boolean;
104
110
  /**
105
111
  * The display name of the confirmation password input.
106
112
  * @default 'Confirm Password'
@@ -0,0 +1,25 @@
1
+ import { ElementRef, OnChanges, Renderer2 } from '@angular/core';
2
+ import { BaseEntityType } from '../classes/entity.model';
3
+ import { DynamicStyleClasses } from '../components/table/table-data';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Dynamically applies css classes based on a provided function.
7
+ */
8
+ export declare class DynamicStyleClassDirective<EntityType extends BaseEntityType<EntityType>> implements OnChanges {
9
+ private readonly element;
10
+ private readonly renderer;
11
+ private styleClassesApplied;
12
+ /**
13
+ * The function that gets the css classes to dynamically apply.
14
+ */
15
+ dynamicStyleClasses: DynamicStyleClasses<EntityType>;
16
+ /**
17
+ * The input for the dynamic style classes function.
18
+ */
19
+ entity: EntityType;
20
+ constructor(element: ElementRef, renderer: Renderer2);
21
+ ngOnChanges(): void;
22
+ private applyDynamicClasses;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicStyleClassDirective<any>, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicStyleClassDirective<any>, "[dynamicStyleClasses]", never, { "dynamicStyleClasses": { "alias": "dynamicStyleClasses"; "required": true; }; "entity": { "alias": "entity"; "required": true; }; }, {}, never, never, true, never>;
25
+ }
@@ -8,7 +8,7 @@ export declare class IncludedInValidatorDirective implements Validator {
8
8
  * The values that are valid for the input.
9
9
  */
10
10
  includedIn: unknown[] | undefined;
11
- validate(control: AbstractControl): ValidationErrors | null;
11
+ validate(control: AbstractControl<unknown>): ValidationErrors | null;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<IncludedInValidatorDirective, never>;
13
13
  static ɵdir: i0.ɵɵDirectiveDeclaration<IncludedInValidatorDirective, "[includedIn]", never, { "includedIn": { "alias": "includedIn"; "required": false; }; }, {}, never, never, true, never>;
14
14
  }