ngx-material-entity 16.0.3 → 16.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/classes/base.builder.d.ts +6 -1
- package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +2 -1
- package/components/confirm-dialog/confirm-dialog.component.d.ts +3 -1
- package/components/edit-page/edit-page.component.d.ts +3 -1
- package/components/edit-page/page-edit-data.builder.d.ts +2 -1
- package/components/input/array/array-date-input/array-date-input.component.d.ts +7 -1
- package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +6 -1
- package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +6 -1
- package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +4 -0
- package/components/input/date/date-range-input/date-range-input.component.d.ts +3 -0
- package/components/input/date/date-time-input/date-time-input.component.d.ts +3 -0
- package/components/input/input.component.d.ts +9 -2
- package/components/input/input.module.d.ts +3 -1
- package/components/input/relations/references-many-input/references-many-input.component.d.ts +3 -1
- package/components/table/create-dialog/create-dialog-data.builder.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +2 -1
- package/components/table/create-dialog/create-entity-dialog.component.d.ts +3 -1
- package/components/table/edit-dialog/edit-data.builder.d.ts +5 -3
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +3 -1
- package/components/table/edit-dialog/edit-entity.builder.d.ts +2 -1
- package/components/table/table-data.builder.d.ts +9 -5
- package/components/table/table.component.d.ts +3 -1
- package/decorators/array/array-decorator-internal.data.d.ts +8 -7
- package/decorators/boolean/boolean-decorator-internal.data.d.ts +2 -1
- package/decorators/date/date-decorator-internal.data.d.ts +3 -2
- package/decorators/has-many/has-many-decorator-internal.data.d.ts +2 -1
- package/decorators/references-many/references-many-decorator-internal.data.d.ts +2 -1
- package/default-global-configuration-values.d.ts +6 -0
- package/directives/tooltip.directive.d.ts +0 -1
- package/esm2022/classes/base.builder.mjs +9 -3
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +7 -5
- package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +13 -7
- package/esm2022/components/edit-page/edit-page.component.mjs +22 -16
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +9 -9
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +33 -13
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +29 -12
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +32 -15
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +18 -4
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +16 -4
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +17 -5
- package/esm2022/components/input/input.component.mjs +89 -60
- package/esm2022/components/input/input.module.mjs +11 -4
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +15 -5
- package/esm2022/components/table/create-dialog/create-dialog-data.builder.mjs +10 -8
- package/esm2022/components/table/create-dialog/create-entity-dialog-data.builder.mjs +5 -4
- package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +15 -9
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +35 -21
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +21 -13
- package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +4 -4
- package/esm2022/components/table/table-data.builder.mjs +54 -30
- package/esm2022/components/table/table.component.mjs +18 -12
- package/esm2022/decorators/array/array-decorator-internal.data.mjs +42 -43
- package/esm2022/decorators/array/array.decorator.mjs +8 -7
- package/esm2022/decorators/base/property-decorator-internal.data.mjs +4 -4
- package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +5 -4
- package/esm2022/decorators/boolean/boolean.decorator.mjs +3 -2
- package/esm2022/decorators/date/date-decorator-internal.data.mjs +7 -6
- package/esm2022/decorators/date/date.decorator.mjs +4 -3
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +4 -4
- package/esm2022/decorators/has-many/has-many.decorator.mjs +3 -2
- package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +7 -6
- package/esm2022/decorators/references-many/references-many.decorator.mjs +3 -2
- package/esm2022/default-global-configuration-values.mjs +89 -0
- package/esm2022/directives/tooltip.directive.mjs +5 -11
- package/esm2022/functions/get-config-value.function.mjs +15 -0
- package/esm2022/functions/get-validation-errors-tooltip-content.function.ts.mjs +4 -8
- package/esm2022/global-configuration-values.mjs +10 -0
- package/esm2022/public-api.mjs +3 -1
- package/esm2022/utilities/entity.utilities.mjs +1 -23
- package/fesm2022/ngx-material-entity.mjs +1380 -1142
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/functions/get-config-value.function.d.ts +8 -0
- package/global-configuration-values.d.ts +216 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/utilities/entity.utilities.d.ts +0 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets either the provided value or the default value, depending on if and what has been provided.
|
|
3
|
+
*
|
|
4
|
+
* @param defaultValue - The default value to fallback when nothing has been provided.
|
|
5
|
+
* @param value - The specific value configured by the user.
|
|
6
|
+
* @returns Value if it is not null and not the CONFIG_NEEDS_UPDATE_KEY, defaultValue otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getConfigValue<ValueType>(defaultValue: ValueType, value?: ValueType): ValueType;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* All configurable default values.
|
|
4
|
+
*/
|
|
5
|
+
export interface NgxGlobalDefaultValues {
|
|
6
|
+
/**
|
|
7
|
+
* The label for create buttons.
|
|
8
|
+
*
|
|
9
|
+
* @default 'Create'
|
|
10
|
+
*/
|
|
11
|
+
createLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* The label for edit buttons.
|
|
14
|
+
*
|
|
15
|
+
* @default 'Edit'
|
|
16
|
+
*/
|
|
17
|
+
editLabel: string;
|
|
18
|
+
/**
|
|
19
|
+
* The label for save buttons.
|
|
20
|
+
*
|
|
21
|
+
* @default 'Save'
|
|
22
|
+
*/
|
|
23
|
+
saveLabel: string;
|
|
24
|
+
/**
|
|
25
|
+
* The label for cancel buttons.
|
|
26
|
+
*
|
|
27
|
+
* @default 'Cancel'
|
|
28
|
+
*/
|
|
29
|
+
cancelLabel: string;
|
|
30
|
+
/**
|
|
31
|
+
* The label for add buttons.
|
|
32
|
+
*
|
|
33
|
+
* @default 'Add'
|
|
34
|
+
*/
|
|
35
|
+
addLabel: string;
|
|
36
|
+
/**
|
|
37
|
+
* The label for delete buttons.
|
|
38
|
+
*
|
|
39
|
+
* @default 'Delete'
|
|
40
|
+
*/
|
|
41
|
+
deleteLabel: string;
|
|
42
|
+
/**
|
|
43
|
+
* The label for back buttons.
|
|
44
|
+
*
|
|
45
|
+
* @default 'Back'
|
|
46
|
+
*/
|
|
47
|
+
backLabel: string;
|
|
48
|
+
/**
|
|
49
|
+
* The label for actions.
|
|
50
|
+
*
|
|
51
|
+
* @default 'Actions'
|
|
52
|
+
*/
|
|
53
|
+
actionsLabel: string;
|
|
54
|
+
/**
|
|
55
|
+
* The label for searches.
|
|
56
|
+
*
|
|
57
|
+
* @default 'Search'
|
|
58
|
+
*/
|
|
59
|
+
searchLabel: string;
|
|
60
|
+
/**
|
|
61
|
+
* The display value for the "true" value in dropdowns.
|
|
62
|
+
*
|
|
63
|
+
* @default 'Yes'
|
|
64
|
+
*/
|
|
65
|
+
dropdownTrue: string;
|
|
66
|
+
/**
|
|
67
|
+
* The display value for the "false" value in dropdowns.
|
|
68
|
+
*
|
|
69
|
+
* @default 'No'
|
|
70
|
+
*/
|
|
71
|
+
dropdownFalse: string;
|
|
72
|
+
/**
|
|
73
|
+
* The label for confirm buttons.
|
|
74
|
+
*
|
|
75
|
+
* @default 'Confirm'
|
|
76
|
+
*/
|
|
77
|
+
confirmLabel: string;
|
|
78
|
+
/**
|
|
79
|
+
* The title for a confirm dialog.
|
|
80
|
+
*
|
|
81
|
+
* @default 'Confirmation'
|
|
82
|
+
*/
|
|
83
|
+
defaultConfirmDialogTitle: string;
|
|
84
|
+
/**
|
|
85
|
+
* The text for a confirm dialog.
|
|
86
|
+
*
|
|
87
|
+
* @default ['Do you really want to do this?']
|
|
88
|
+
*/
|
|
89
|
+
defaultConfirmDialogText: string[];
|
|
90
|
+
/**
|
|
91
|
+
* The text for confirming a save action.
|
|
92
|
+
*
|
|
93
|
+
* @default ['Do you really want to save all changes?']
|
|
94
|
+
*/
|
|
95
|
+
confirmSaveText: string[];
|
|
96
|
+
/**
|
|
97
|
+
* The text for confirming a delete action.
|
|
98
|
+
*
|
|
99
|
+
* @default ['Do you really want to delete this entity?']
|
|
100
|
+
*/
|
|
101
|
+
confirmDeleteText: string[];
|
|
102
|
+
/**
|
|
103
|
+
* The label for the button to leave without changes.
|
|
104
|
+
*
|
|
105
|
+
* @default 'Leave'
|
|
106
|
+
*/
|
|
107
|
+
confirmUnsavedChangesLabel: string;
|
|
108
|
+
/**
|
|
109
|
+
* The title for confirming to leave without changes.
|
|
110
|
+
*
|
|
111
|
+
* @default 'Unsaved Changes'
|
|
112
|
+
*/
|
|
113
|
+
confirmUnsavedChangesTitle: string;
|
|
114
|
+
/**
|
|
115
|
+
* The text for confirming to leave without changes.
|
|
116
|
+
*
|
|
117
|
+
* @default ['You have unsaved changes that will be deleted when you leave this page.', 'Continue?']
|
|
118
|
+
*/
|
|
119
|
+
confirmUnsavedChangesText: string[];
|
|
120
|
+
/**
|
|
121
|
+
* The title for the add array item dialog.
|
|
122
|
+
*
|
|
123
|
+
* @default 'Add to array'
|
|
124
|
+
*/
|
|
125
|
+
addArrayItemTitle: string;
|
|
126
|
+
/**
|
|
127
|
+
* The text for confirming a create action.
|
|
128
|
+
*
|
|
129
|
+
* @default ['Do you really want to create this entity?']
|
|
130
|
+
*/
|
|
131
|
+
confirmCreateText: string[];
|
|
132
|
+
/**
|
|
133
|
+
* The text for confirming a multi select action.
|
|
134
|
+
*
|
|
135
|
+
* @default selectedEntries => [`Do you really want to run this action on ${selectedEntries.length} entries?`]
|
|
136
|
+
*/
|
|
137
|
+
confirmMultiSelectActionText: (selectedEntries: unknown[]) => string[];
|
|
138
|
+
/**
|
|
139
|
+
* The text for confirming a base action.
|
|
140
|
+
*
|
|
141
|
+
* @default ['Do you really want to run this action?']
|
|
142
|
+
*/
|
|
143
|
+
confirmBaseActionText: string[];
|
|
144
|
+
/**
|
|
145
|
+
* The text for confirming the json import.
|
|
146
|
+
*
|
|
147
|
+
* @default ['Do you really want to import entities from the provided file?']
|
|
148
|
+
*/
|
|
149
|
+
confirmImportJsonText: string[];
|
|
150
|
+
/**
|
|
151
|
+
* How table entities are edited by default.
|
|
152
|
+
*
|
|
153
|
+
* @default 'dialog'
|
|
154
|
+
*/
|
|
155
|
+
defaultEditMethod: 'dialog' | 'page';
|
|
156
|
+
/**
|
|
157
|
+
* The error message to display when an array property is required and empty.
|
|
158
|
+
*/
|
|
159
|
+
emptyArrayErrorMessage: string;
|
|
160
|
+
/**
|
|
161
|
+
* The label for remove actions.
|
|
162
|
+
*
|
|
163
|
+
* @default 'Remove'
|
|
164
|
+
*/
|
|
165
|
+
removeLabel: string;
|
|
166
|
+
/**
|
|
167
|
+
* The label for time values.
|
|
168
|
+
* Mainly used inside date properties.
|
|
169
|
+
*
|
|
170
|
+
* @default 'Time'
|
|
171
|
+
*/
|
|
172
|
+
timeLabel: string;
|
|
173
|
+
/**
|
|
174
|
+
* The label for the date range start.
|
|
175
|
+
*
|
|
176
|
+
* @default 'Start'
|
|
177
|
+
*/
|
|
178
|
+
startLabel: string;
|
|
179
|
+
/**
|
|
180
|
+
* The label for the date range end.
|
|
181
|
+
*
|
|
182
|
+
* @default 'End'
|
|
183
|
+
*/
|
|
184
|
+
endLabel: string;
|
|
185
|
+
/**
|
|
186
|
+
* The error text for duplicate entries inside an array.
|
|
187
|
+
*
|
|
188
|
+
* @default ['Adding duplicate entries to the array is not allowed.']
|
|
189
|
+
*/
|
|
190
|
+
duplicateErrorText: string[];
|
|
191
|
+
/**
|
|
192
|
+
* The error title for duplicate entries inside an array.
|
|
193
|
+
*
|
|
194
|
+
* @default 'Error adding duplicate item'
|
|
195
|
+
*/
|
|
196
|
+
duplicateErrorTitle: string;
|
|
197
|
+
/**
|
|
198
|
+
* The title for editing an entities.
|
|
199
|
+
*
|
|
200
|
+
* @default () => 'Edit'
|
|
201
|
+
*/
|
|
202
|
+
editTitle: (entity: unknown) => string;
|
|
203
|
+
/**
|
|
204
|
+
* The label for an select action, eg. Dropdowns.
|
|
205
|
+
*
|
|
206
|
+
* @default 'Select'
|
|
207
|
+
*/
|
|
208
|
+
selectLabel: string;
|
|
209
|
+
/**
|
|
210
|
+
* The label for an "Add all" button.
|
|
211
|
+
*
|
|
212
|
+
* @default 'Add all'
|
|
213
|
+
*/
|
|
214
|
+
addAllLabel: string;
|
|
215
|
+
}
|
|
216
|
+
export declare const NGX_GLOBAL_DEFAULT_VALUES: InjectionToken<Partial<NgxGlobalDefaultValues>>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -153,13 +153,6 @@ export declare abstract class EntityUtilities {
|
|
|
153
153
|
* @returns The differences as an array consisting of key, before and after.
|
|
154
154
|
*/
|
|
155
155
|
static getDifferencesBetweenEntities<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType, http: HttpClient): Promise<Difference<EntityType>[]>;
|
|
156
|
-
/**
|
|
157
|
-
* Compares two Entities and returns their difference in an object.
|
|
158
|
-
*
|
|
159
|
-
* @param entity - The first entity to compare.
|
|
160
|
-
* @param entityPriorChanges - The second entity to compare.
|
|
161
|
-
* @returns The difference between the two Entities in form of a Partial.
|
|
162
|
-
*/
|
|
163
156
|
/**
|
|
164
157
|
* Checks if two given values are equal.
|
|
165
158
|
* It uses the isEqual method from LodashUtilities and extends it with functionality regarding Dates.
|