ngx-material-entity 20.0.4 → 20.0.5
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/fesm2022/ngx-material-entity.mjs +251 -153
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/index.d.ts +29 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1241,6 +1241,7 @@ interface DateTimeDateDecoratorConfig extends DateDecoratorConfig<Date> {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
|
|
1243
1243
|
type StringDropdownValues = DropdownValue<string | undefined>[] | ((entity: any) => DropdownValue<string | undefined>[]) | ((entity: any) => Promise<DropdownValue<string | undefined>[]>);
|
|
1244
|
+
type RequiredStringDropdownValues = DropdownValue<string>[] | ((entity: any) => DropdownValue<string>[]) | ((entity: any) => Promise<DropdownValue<string>[]>);
|
|
1244
1245
|
type StringAutocompleteValues = string[] | ((entity: any) => string[]) | ((entity: any) => Promise<string[]>);
|
|
1245
1246
|
/**
|
|
1246
1247
|
* Definition for the @string metadata.
|
|
@@ -1594,6 +1595,17 @@ interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecoratorConf
|
|
|
1594
1595
|
*/
|
|
1595
1596
|
restrictToOptions?: boolean;
|
|
1596
1597
|
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Definition for an array of strings displayed in a dropdown.
|
|
1600
|
+
*/
|
|
1601
|
+
interface StringDropdownArrayDecoratorConfig extends ArrayDecoratorConfig<string[]> {
|
|
1602
|
+
itemType: DecoratorTypes.STRING_DROPDOWN;
|
|
1603
|
+
/**
|
|
1604
|
+
* The values of the dropdown, consisting of a name to display and the actual value
|
|
1605
|
+
* Can also receive a function to determine the values.
|
|
1606
|
+
*/
|
|
1607
|
+
dropdownValues: RequiredStringDropdownValues;
|
|
1608
|
+
}
|
|
1597
1609
|
|
|
1598
1610
|
/**
|
|
1599
1611
|
* The internal Position. Sets default values and validates user input.
|
|
@@ -1752,6 +1764,14 @@ declare class AutocompleteStringChipsArrayDecoratorConfigInternal extends Proper
|
|
|
1752
1764
|
constructor(data: AutocompleteStringChipsArrayDecoratorConfig, globalConfig: NgxGlobalDefaultValues);
|
|
1753
1765
|
private autocompleteValuesToFunction;
|
|
1754
1766
|
}
|
|
1767
|
+
/**
|
|
1768
|
+
* The internal StringDropdownArrayDecoratorConfig. Sets default values.
|
|
1769
|
+
*/
|
|
1770
|
+
declare class StringDropdownArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal<string[]> implements StringDropdownArrayDecoratorConfig {
|
|
1771
|
+
itemType: DecoratorTypes.STRING_DROPDOWN;
|
|
1772
|
+
dropdownValues: (entity: any) => Promise<DropdownValue<string>[]>;
|
|
1773
|
+
constructor(data: StringDropdownArrayDecoratorConfig);
|
|
1774
|
+
}
|
|
1755
1775
|
|
|
1756
1776
|
/**
|
|
1757
1777
|
* The Definition for the @boolean metadata.
|
|
@@ -2629,6 +2649,7 @@ declare enum DecoratorTypes {
|
|
|
2629
2649
|
ARRAY_DATE_RANGE = "arrayDateRange",
|
|
2630
2650
|
ARRAY_STRING_CHIPS = "arrayStringChips",
|
|
2631
2651
|
ARRAY_STRING_AUTOCOMPLETE_CHIPS = "arrayStringAutocompleteChips",
|
|
2652
|
+
ARRAY_STRING_DROPDOWN = "arrayStringDropdown",
|
|
2632
2653
|
DATE = "date",
|
|
2633
2654
|
DATE_RANGE = "dateRange",
|
|
2634
2655
|
DATE_TIME = "dateTime",
|
|
@@ -2642,7 +2663,7 @@ declare enum DecoratorTypes {
|
|
|
2642
2663
|
/**
|
|
2643
2664
|
* Gives the metadata-config Type based on the DecoratorTypes enum.
|
|
2644
2665
|
*/
|
|
2645
|
-
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.OBJECT_DROPDOWN ? DropdownObjectDecoratorConfigInternal<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.REFERENCES_ONE ? ReferencesOneDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
|
|
2666
|
+
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.OBJECT_DROPDOWN ? DropdownObjectDecoratorConfigInternal<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.ARRAY_STRING_DROPDOWN ? StringDropdownArrayDecoratorConfigInternal : 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.REFERENCES_ONE ? ReferencesOneDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
|
|
2646
2667
|
|
|
2647
2668
|
/**
|
|
2648
2669
|
* Shows information about differences between two entities.
|
|
@@ -2652,6 +2673,10 @@ interface Difference<EntityType extends BaseEntityType<EntityType>> {
|
|
|
2652
2673
|
* The key where the two entities have different values.
|
|
2653
2674
|
*/
|
|
2654
2675
|
key: keyof EntityType;
|
|
2676
|
+
/**
|
|
2677
|
+
* The display name resolved from metadata.
|
|
2678
|
+
*/
|
|
2679
|
+
name: string | undefined;
|
|
2655
2680
|
/**
|
|
2656
2681
|
* The value before any changes.
|
|
2657
2682
|
*/
|
|
@@ -2921,6 +2946,7 @@ declare abstract class ValidationUtilities {
|
|
|
2921
2946
|
*/
|
|
2922
2947
|
static getPropertyValidationError<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, key: keyof EntityType, omit?: 'create' | 'update'): Promise<ValidationError | undefined>;
|
|
2923
2948
|
private static getArrayStringAutocompleteChipsValidationError;
|
|
2949
|
+
private static getArrayStringDropdownValidationError;
|
|
2924
2950
|
private static getBooleanValidationError;
|
|
2925
2951
|
private static getStringValidationError;
|
|
2926
2952
|
private static getAutocompleteStringValidationError;
|
|
@@ -4310,7 +4336,7 @@ declare class TooltipComponent {
|
|
|
4310
4336
|
* @returns The method that defines the metadata.
|
|
4311
4337
|
* @throws When the given type of the array-items is unknown.
|
|
4312
4338
|
*/
|
|
4313
|
-
declare function array<EntityType extends BaseEntityType<EntityType>>(metadata: EntityArrayDecoratorConfig<EntityType> | StringChipsArrayDecoratorConfig | AutocompleteStringChipsArrayDecoratorConfig | DateArrayDecoratorConfig | DateTimeArrayDecoratorConfig | DateRangeArrayDecoratorConfig): (target: object, propertyKey: string) => void;
|
|
4339
|
+
declare function array<EntityType extends BaseEntityType<EntityType>>(metadata: EntityArrayDecoratorConfig<EntityType> | StringChipsArrayDecoratorConfig | AutocompleteStringChipsArrayDecoratorConfig | StringDropdownArrayDecoratorConfig | DateArrayDecoratorConfig | DateTimeArrayDecoratorConfig | DateRangeArrayDecoratorConfig): (target: object, propertyKey: string) => void;
|
|
4314
4340
|
|
|
4315
4341
|
/**
|
|
4316
4342
|
* Decorator for setting and getting boolean property metadata.
|
|
@@ -4568,4 +4594,4 @@ declare abstract class FileUtilities {
|
|
|
4568
4594
|
}
|
|
4569
4595
|
|
|
4570
4596
|
export { ArrayDecoratorConfig, DateUtilities, DecoratorTypes, DynamicStyleClassDirective, Entity, EntityService, EntityUtilities, FileUtilities, IncludedInValidatorDirective, NGX_COMPLETE_GLOBAL_DEFAULT_VALUES, NGX_CREATE_DATA, NGX_CREATE_DATA_ENTITY, NGX_CREATE_DATA_ENTITY_SERVICE, NGX_EDIT_DATA, NGX_EDIT_DATA_ENTITY, NGX_EDIT_DATA_ENTITY_SERVICE, NGX_GET_VALIDATION_ERROR_MESSAGE, NGX_GLOBAL_DEFAULT_VALUES, NgxChangesTooltipTitle, NgxMatEntityBaseDisplayColumnValueComponent, NgxMatEntityBaseInputComponent, NgxMatEntityConfirmDialogComponent, NgxMatEntityCreateDialogComponent, NgxMatEntityCreatePageComponent, NgxMatEntityEditDialogComponent, NgxMatEntityEditPageComponent, NgxMatEntityFormComponent, NgxMatEntityInputComponent, NgxMatEntityTableComponent, NgxValidationErrorsTooltipTitle, NumberDirective, TooltipComponent, TooltipDirective, UnsavedChangesGuard, ValidationUtilities, array, boolean, custom, date, defaultCreateDataRoute, defaultEditDataRoute, exportAsCsvMultiAction, exportAsJsonMultiAction, exportAsXmlMultiAction, file, getChangesTooltipContent, getValidationErrorsTooltipContent, hasMany, importFromJsonMultiAction, number, object, referencesMany, referencesOne, string };
|
|
4571
|
-
export type { AutocompleteStringChipsArrayDecoratorConfig, AutocompleteStringDecoratorConfig, BaseData, BaseEntityType, BaseTableAction, CheckboxBooleanDecoratorConfig, Col, ConfirmDialogData, ConfirmDialogTypes, CreateData, CreateDataRoute, CreateEntityData, CustomDecoratorConfig, DateArrayDecoratorConfig, DateRange, DateRangeArrayDecoratorConfig, DateRangeDateDecoratorConfig, DateTimeArrayDecoratorConfig, DateTimeDateDecoratorConfig, DecoratorType, DefaultDateDecoratorConfig, DefaultFileDecoratorConfig, DefaultNumberDecoratorConfig, DefaultObjectDecoratorConfig, DefaultStringDecoratorConfig, Difference, DisplayColumn, DropdownBooleanDecoratorConfig, DropdownNumberDecoratorConfig, DropdownObjectDecoratorConfig, DropdownStringDecoratorConfig, DropdownValue, DynamicStyleClasses, EditAction, EditArrayItemDialogData, EditData, EditDataRoute, EditEntityData, EntityArrayDecoratorConfig, EntityClassNewable, EntityRow, EntityServiceClassNewable, EntityTab, FileData, HasManyDecoratorConfig, Hour, ImageFileDecoratorConfig, Minute, MultiSelectAction, NgxGlobalDefaultValues, NumberDropdownValues, ObjectDropdownValues, PageCreateData, PageEditData, PasswordStringDecoratorConfig, Position, ReferencesManyDecoratorConfig, ReferencesOneDecoratorConfig, SliderNumberDecoratorConfig, StringAutocompleteValues, StringChipsArrayDecoratorConfig, StringDropdownValues, TableAction, TableColumnValue, TableData, TextboxStringDecoratorConfig, Time, ToggleBooleanDecoratorConfig, UnsavedChangesPage, ValidationError };
|
|
4597
|
+
export type { AutocompleteStringChipsArrayDecoratorConfig, AutocompleteStringDecoratorConfig, BaseData, BaseEntityType, BaseTableAction, CheckboxBooleanDecoratorConfig, Col, ConfirmDialogData, ConfirmDialogTypes, CreateData, CreateDataRoute, CreateEntityData, CustomDecoratorConfig, DateArrayDecoratorConfig, DateRange, DateRangeArrayDecoratorConfig, DateRangeDateDecoratorConfig, DateTimeArrayDecoratorConfig, DateTimeDateDecoratorConfig, DecoratorType, DefaultDateDecoratorConfig, DefaultFileDecoratorConfig, DefaultNumberDecoratorConfig, DefaultObjectDecoratorConfig, DefaultStringDecoratorConfig, Difference, DisplayColumn, DropdownBooleanDecoratorConfig, DropdownNumberDecoratorConfig, DropdownObjectDecoratorConfig, DropdownStringDecoratorConfig, DropdownValue, DynamicStyleClasses, EditAction, EditArrayItemDialogData, EditData, EditDataRoute, EditEntityData, EntityArrayDecoratorConfig, EntityClassNewable, EntityRow, EntityServiceClassNewable, EntityTab, FileData, HasManyDecoratorConfig, Hour, ImageFileDecoratorConfig, Minute, MultiSelectAction, NgxGlobalDefaultValues, NumberDropdownValues, ObjectDropdownValues, PageCreateData, PageEditData, PasswordStringDecoratorConfig, Position, ReferencesManyDecoratorConfig, ReferencesOneDecoratorConfig, RequiredStringDropdownValues, SliderNumberDecoratorConfig, StringAutocompleteValues, StringChipsArrayDecoratorConfig, StringDropdownArrayDecoratorConfig, StringDropdownValues, TableAction, TableColumnValue, TableData, TextboxStringDecoratorConfig, Time, ToggleBooleanDecoratorConfig, UnsavedChangesPage, ValidationError };
|