ngx-material-entity 16.0.8 → 16.0.9
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/directives/tooltip.directive.d.ts +9 -0
- package/esm2022/classes/entity.model.mjs +1 -1
- package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +1 -2
- package/esm2022/components/create-page/create-data.route.mjs +1 -1
- package/esm2022/components/create-page/create-page.component.mjs +4 -6
- package/esm2022/components/create-page/page-create-data.builder.mjs +1 -2
- package/esm2022/components/edit-page/edit-data.route.mjs +1 -1
- package/esm2022/components/edit-page/edit-page.component.mjs +4 -6
- package/esm2022/components/edit-page/page-edit-data.builder.mjs +1 -2
- package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +1 -1
- package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +1 -1
- package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +1 -1
- package/esm2022/components/input/base-input.component.mjs +1 -2
- package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +1 -1
- package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +1 -1
- package/esm2022/components/input/custom/custom.component.mjs +1 -1
- package/esm2022/components/input/date/date-input/date-input.component.mjs +1 -1
- package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +1 -1
- package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +1 -1
- package/esm2022/components/input/file/file-input/file-input.component.mjs +1 -2
- package/esm2022/components/input/input.component.mjs +1 -15
- package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/number/number-input/number-input.component.mjs +1 -1
- package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +1 -1
- package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-input/string-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +1 -1
- package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +1 -1
- package/esm2022/components/table/create-dialog/create-data.builder.mjs +1 -2
- package/esm2022/components/table/display-column-value/display-column-value.component.mjs +1 -1
- package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +1 -2
- package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +1 -4
- package/esm2022/components/table/table-data.builder.mjs +1 -3
- package/esm2022/components/table/table-data.mjs +1 -1
- package/esm2022/decorators/base/base-property.decorator.mjs +1 -2
- package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +2 -2
- package/esm2022/decorators/custom/custom-decorator.data.mjs +1 -1
- package/esm2022/decorators/file/file-decorator-internal.data.mjs +1 -3
- package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +1 -2
- package/esm2022/default-global-configuration-values.mjs +1 -2
- package/esm2022/directives/tooltip.directive.mjs +36 -9
- package/esm2022/functions/get-validation-error-message.function.mjs +1 -2
- package/esm2022/global-configuration-values.mjs +1 -2
- package/esm2022/mocks/placeholder-data.png.mjs +2 -2
- package/esm2022/services/entity.service.mjs +1 -3
- package/esm2022/utilities/date.utilities.mjs +1 -2
- package/esm2022/utilities/entity.utilities.mjs +1 -4
- package/esm2022/utilities/validation.utilities.mjs +2 -6
- package/fesm2022/ngx-material-entity.mjs +44 -64
- package/fesm2022/ngx-material-entity.mjs.map +1 -1
- package/package.json +1 -2
|
@@ -253,7 +253,6 @@ function defaultTrue() {
|
|
|
253
253
|
return true;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
// eslint-disable-next-line constCase/uppercase
|
|
257
256
|
const DAY_IN_MS = 1000 * 60 * 60 * 24;
|
|
258
257
|
/**
|
|
259
258
|
* Contains Helper Functions for handling date properties.
|
|
@@ -709,7 +708,6 @@ class EntityUtilities {
|
|
|
709
708
|
for (const key in entity) {
|
|
710
709
|
const type = this.getPropertyType(entity, key);
|
|
711
710
|
if (type === DecoratorTypes.FILE_DEFAULT || type === DecoratorTypes.FILE_IMAGE) {
|
|
712
|
-
// eslint-disable-next-line max-len
|
|
713
711
|
const metadata = this.getPropertyMetadata(entity, key);
|
|
714
712
|
if (!(metadata.omitForCreate && omit === 'create') && !(metadata.omitForUpdate && omit === 'update')) {
|
|
715
713
|
res.push(key);
|
|
@@ -932,7 +930,6 @@ class EntityUtilities {
|
|
|
932
930
|
if (dateRange?.start && dateRange.end) {
|
|
933
931
|
dateRange.values = DateUtilities.getDatesBetween(dateRange.start, dateRange.end, filter);
|
|
934
932
|
}
|
|
935
|
-
// eslint-disable-next-line max-len
|
|
936
933
|
const dateRangePriorChanges = LodashUtilities.cloneDeep(valuePriorChanges);
|
|
937
934
|
if (dateRangePriorChanges?.start) {
|
|
938
935
|
dateRangePriorChanges.start = new Date(dateRangePriorChanges.start);
|
|
@@ -1081,7 +1078,6 @@ class EntityUtilities {
|
|
|
1081
1078
|
const keys = this.keysOf(entity, injector, hideOmitForCreate, hideOmitForEdit)
|
|
1082
1079
|
.filter(k => !additionalOmitValues.includes(k));
|
|
1083
1080
|
const numberOfTabs = this.getNumberOfTabs(keys, entity);
|
|
1084
|
-
// eslint-disable-next-line max-len
|
|
1085
1081
|
const firstTabRows = this.getEntityRows(entity, -1, hideOmitForCreate, hideOmitForEdit, additionalOmitValues, injector);
|
|
1086
1082
|
if (firstTabRows.length) {
|
|
1087
1083
|
const firstTab = {
|
|
@@ -1179,7 +1175,6 @@ function baseProperty(metadata, type, metadataKeysToReset) {
|
|
|
1179
1175
|
return function (target, propertyKey) {
|
|
1180
1176
|
ReflectUtilities.defineMetadata('metadata', metadata, target, propertyKey);
|
|
1181
1177
|
ReflectUtilities.defineMetadata('type', type, target, propertyKey);
|
|
1182
|
-
// eslint-disable-next-line max-len
|
|
1183
1178
|
ReflectUtilities.defineMetadata(EntityUtilities.METADATA_KEYS_TO_RESET_KEY, metadataKeysToReset, target, propertyKey);
|
|
1184
1179
|
};
|
|
1185
1180
|
}
|
|
@@ -1464,7 +1459,6 @@ __decorate([
|
|
|
1464
1459
|
/**
|
|
1465
1460
|
* The provider for global configuration values.
|
|
1466
1461
|
*/
|
|
1467
|
-
// eslint-disable-next-line max-len, constCase/uppercase
|
|
1468
1462
|
const NGX_GLOBAL_DEFAULT_VALUES = new InjectionToken('NGX_GLOBAL_DEFAULT_VALUES', {
|
|
1469
1463
|
providedIn: 'root',
|
|
1470
1464
|
factory: () => {
|
|
@@ -1562,7 +1556,6 @@ const needsUpdateGlobalDefaults = {
|
|
|
1562
1556
|
/**
|
|
1563
1557
|
* The internal values consisting of default ones and values provided by the user in NGX_GLOBAL_DEFAULT_VALUES.
|
|
1564
1558
|
*/
|
|
1565
|
-
// eslint-disable-next-line constCase/uppercase
|
|
1566
1559
|
const NGX_INTERNAL_GLOBAL_DEFAULT_VALUES = new InjectionToken('NGX_INTERNAL_GLOBAL_DEFAULT_VALUES', {
|
|
1567
1560
|
providedIn: 'root',
|
|
1568
1561
|
factory: () => {
|
|
@@ -1676,7 +1669,6 @@ class ConfirmDialogDataBuilder extends BaseBuilder {
|
|
|
1676
1669
|
return;
|
|
1677
1670
|
}
|
|
1678
1671
|
if (data.requireConfirmation === true && !data.confirmationText) {
|
|
1679
|
-
// eslint-disable-next-line max-len
|
|
1680
1672
|
throw new Error('Missing required Input data "confirmationText". You can only omit this value when "requireConfirmation" is false.');
|
|
1681
1673
|
}
|
|
1682
1674
|
if (data.requireConfirmation !== true && data.confirmationText) {
|
|
@@ -1897,7 +1889,6 @@ class EntityService {
|
|
|
1897
1889
|
const formData = new FormData();
|
|
1898
1890
|
formData.append('body', JSON.stringify(LodashUtilities.omit(body, filePropertyKeys)));
|
|
1899
1891
|
for (const key of filePropertyKeys) {
|
|
1900
|
-
// eslint-disable-next-line max-len
|
|
1901
1892
|
if (EntityUtilities.getPropertyMetadata(entity, key, DecoratorTypes.FILE_DEFAULT).multiple) {
|
|
1902
1893
|
const fileDataValues = body[key];
|
|
1903
1894
|
for (const value of fileDataValues) {
|
|
@@ -2005,7 +1996,6 @@ class EntityService {
|
|
|
2005
1996
|
const formData = new FormData();
|
|
2006
1997
|
formData.append('body', JSON.stringify(LodashUtilities.omit(body, filePropertyKeys)));
|
|
2007
1998
|
for (const key of filePropertyKeys) {
|
|
2008
|
-
// eslint-disable-next-line max-len
|
|
2009
1999
|
if (EntityUtilities.getPropertyMetadata(entity, key, DecoratorTypes.FILE_DEFAULT).multiple) {
|
|
2010
2000
|
const fileDataValues = body[key];
|
|
2011
2001
|
for (const value of fileDataValues) {
|
|
@@ -2165,7 +2155,6 @@ class ValidationUtilities {
|
|
|
2165
2155
|
return this.getStringValidationError(entityString, stringMetadata);
|
|
2166
2156
|
case DecoratorTypes.STRING_AUTOCOMPLETE:
|
|
2167
2157
|
const entityAutocompleteString = entity[key];
|
|
2168
|
-
// eslint-disable-next-line max-len
|
|
2169
2158
|
const stringAutocompleteMetadata = metadata;
|
|
2170
2159
|
return this.getAutocompleteStringValidationError(entity, entityAutocompleteString, stringAutocompleteMetadata);
|
|
2171
2160
|
case DecoratorTypes.STRING_TEXTBOX:
|
|
@@ -2203,9 +2192,7 @@ class ValidationUtilities {
|
|
|
2203
2192
|
break;
|
|
2204
2193
|
case DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS:
|
|
2205
2194
|
const stringAutocompleteArray = entity[key];
|
|
2206
|
-
// eslint-disable-next-line max-len
|
|
2207
2195
|
const stringAutocompleteArrayMetadata = metadata;
|
|
2208
|
-
// eslint-disable-next-line max-len
|
|
2209
2196
|
return await this.getArrayStringAutocompleteChipsValidationError(entity, stringAutocompleteArrayMetadata, stringAutocompleteArray);
|
|
2210
2197
|
case DecoratorTypes.ARRAY_STRING_CHIPS:
|
|
2211
2198
|
case DecoratorTypes.ARRAY_DATE:
|
|
@@ -2213,7 +2200,6 @@ class ValidationUtilities {
|
|
|
2213
2200
|
case DecoratorTypes.ARRAY_DATE_RANGE:
|
|
2214
2201
|
case DecoratorTypes.ARRAY:
|
|
2215
2202
|
const entityArray = entity[key];
|
|
2216
|
-
// eslint-disable-next-line max-len
|
|
2217
2203
|
const arrayMetadata = metadata;
|
|
2218
2204
|
if (arrayMetadata.required(entity) && !entityArray.length) {
|
|
2219
2205
|
return {
|
|
@@ -2245,7 +2231,7 @@ class ValidationUtilities {
|
|
|
2245
2231
|
case DecoratorTypes.HAS_MANY:
|
|
2246
2232
|
break;
|
|
2247
2233
|
case DecoratorTypes.CUSTOM:
|
|
2248
|
-
// eslint-disable-next-line typescript/no-explicit-any
|
|
2234
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
2249
2235
|
const customMetadata = metadata;
|
|
2250
2236
|
if (!customMetadata.isValid(entity[key], omit)) {
|
|
2251
2237
|
return {
|
|
@@ -2786,10 +2772,24 @@ class TooltipDirective {
|
|
|
2786
2772
|
tooltip;
|
|
2787
2773
|
tooltipElement;
|
|
2788
2774
|
closeListeners = [];
|
|
2775
|
+
openedByClick = false;
|
|
2789
2776
|
constructor(el, renderer) {
|
|
2790
2777
|
this.el = el;
|
|
2791
2778
|
this.renderer = renderer;
|
|
2792
2779
|
}
|
|
2780
|
+
/**
|
|
2781
|
+
* Toggles the tooltip.
|
|
2782
|
+
*/
|
|
2783
|
+
onClick() {
|
|
2784
|
+
if (!this.tooltipElement) {
|
|
2785
|
+
this.showTooltip();
|
|
2786
|
+
this.registerCloseListeners();
|
|
2787
|
+
this.openedByClick = true;
|
|
2788
|
+
return;
|
|
2789
|
+
}
|
|
2790
|
+
this.hideTooltip();
|
|
2791
|
+
this.removeCloseListeners();
|
|
2792
|
+
}
|
|
2793
2793
|
/**
|
|
2794
2794
|
* Shows the tooltip.
|
|
2795
2795
|
*/
|
|
@@ -2797,16 +2797,28 @@ class TooltipDirective {
|
|
|
2797
2797
|
if (!this.tooltipElement) {
|
|
2798
2798
|
this.showTooltip();
|
|
2799
2799
|
this.registerCloseListeners();
|
|
2800
|
+
return;
|
|
2800
2801
|
}
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
this.removeCloseListeners();
|
|
2802
|
+
if (this.openedByClick) {
|
|
2803
|
+
return;
|
|
2804
2804
|
}
|
|
2805
|
+
this.hideTooltip();
|
|
2806
|
+
this.removeCloseListeners();
|
|
2805
2807
|
}
|
|
2806
2808
|
/**
|
|
2807
2809
|
* Hides the tooltip.
|
|
2808
2810
|
*/
|
|
2809
2811
|
onMouseLeave() {
|
|
2812
|
+
if (this.openedByClick) {
|
|
2813
|
+
return;
|
|
2814
|
+
}
|
|
2815
|
+
this.hideTooltip();
|
|
2816
|
+
this.removeCloseListeners();
|
|
2817
|
+
}
|
|
2818
|
+
/**
|
|
2819
|
+
* Hides the tooltip.
|
|
2820
|
+
*/
|
|
2821
|
+
onResize() {
|
|
2810
2822
|
this.hideTooltip();
|
|
2811
2823
|
this.removeCloseListeners();
|
|
2812
2824
|
}
|
|
@@ -2849,12 +2861,13 @@ class TooltipDirective {
|
|
|
2849
2861
|
listener();
|
|
2850
2862
|
}
|
|
2851
2863
|
this.closeListeners = [];
|
|
2864
|
+
this.openedByClick = false;
|
|
2852
2865
|
}
|
|
2853
2866
|
ngOnDestroy() {
|
|
2854
2867
|
this.removeCloseListeners();
|
|
2855
2868
|
}
|
|
2856
2869
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2857
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip" }, host: { listeners: { "
|
|
2870
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.0", type: TooltipDirective, isStandalone: true, selector: "[tooltip]", inputs: { tooltip: "tooltip" }, host: { listeners: { "click": "onClick()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "window:resize": "onResize()" } }, ngImport: i0 });
|
|
2858
2871
|
}
|
|
2859
2872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
2860
2873
|
type: Directive,
|
|
@@ -2864,16 +2877,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
2864
2877
|
}]
|
|
2865
2878
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltip: [{
|
|
2866
2879
|
type: Input
|
|
2880
|
+
}], onClick: [{
|
|
2881
|
+
type: HostListener,
|
|
2882
|
+
args: ['click']
|
|
2867
2883
|
}], onMouseEnter: [{
|
|
2868
2884
|
type: HostListener,
|
|
2869
2885
|
args: ['mouseenter']
|
|
2870
|
-
}, {
|
|
2871
|
-
type: HostListener,
|
|
2872
|
-
args: ['click']
|
|
2873
2886
|
}], onMouseLeave: [{
|
|
2874
2887
|
type: HostListener,
|
|
2875
2888
|
args: ['mouseleave']
|
|
2876
|
-
}, {
|
|
2889
|
+
}], onResize: [{
|
|
2877
2890
|
type: HostListener,
|
|
2878
2891
|
args: ['window:resize']
|
|
2879
2892
|
}] } });
|
|
@@ -3308,7 +3321,6 @@ class NgxMatEntityBaseInputComponent {
|
|
|
3308
3321
|
*/
|
|
3309
3322
|
name;
|
|
3310
3323
|
ngOnInit() {
|
|
3311
|
-
// eslint-disable-next-line max-len
|
|
3312
3324
|
const foundMetadata = EntityUtilities.getPropertyMetadata(this.entity, this.key);
|
|
3313
3325
|
if (!foundMetadata) {
|
|
3314
3326
|
throw new Error(`No metadata was found for the key "${String(this.key)}"`);
|
|
@@ -4174,7 +4186,6 @@ class FileInputComponent {
|
|
|
4174
4186
|
}
|
|
4175
4187
|
async downloadAll() {
|
|
4176
4188
|
if (this.propertyValue.length) {
|
|
4177
|
-
// eslint-disable-next-line max-len
|
|
4178
4189
|
void FileUtilities.downloadMultipleFiles(this.metadata.displayName, LodashUtilities.cloneDeep(this.propertyValue), this.http);
|
|
4179
4190
|
}
|
|
4180
4191
|
}
|
|
@@ -4215,7 +4226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
|
|
|
4215
4226
|
args: [{ selector: 'file-default-input', template: "<div [class.file-input]=\"metadata.dragAndDrop\" [class.mat-elevation-z8]=\"metadata.dragAndDrop\">\n <file-input\n [propertyValue]=\"propertyValue\"\n [metadata]=\"metadata\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [isReadOnly]=\"isReadOnly\"\n [entity]=\"entity\"\n [key]=\"key\"\n (fileDataChangeEvent)=\"refreshFileData($event)\"\n >\n </file-input>\n</div>", styles: [".file-input{margin-top:15px;margin-bottom:15px;padding:15px;border-radius:5px}\n"] }]
|
|
4216
4227
|
}] });
|
|
4217
4228
|
|
|
4218
|
-
// eslint-disable-next-line
|
|
4229
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4219
4230
|
const PLACEHOLDER = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAMgCAMAAAAEPmswAAAANlBMVEXx8/XCy9LFztXu8PPs7/Lp7e/W3OHL0tnZ3+PN1NrS2d7i5urn6u7f5OjI0Nfc4ebP1tzk6excnoRZAAAXh0lEQVR42uzUAQ0AAAzDoN+/6eloAiK4B4gQFpAhLCBDWECGsI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wXhxXQpGE6znMpOZdlmY+TVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDJHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwBwcCAAAAAED+r42gqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqirswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cCAAAAAAIMjfepArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKcAnTNeiLeG1rEAAAAASUVORK5CYII=';
|
|
4220
4231
|
|
|
4221
4232
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
@@ -4355,7 +4366,6 @@ class CreateDataBuilder extends BaseBuilder {
|
|
|
4355
4366
|
}
|
|
4356
4367
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4357
4368
|
generateBaseData(data) {
|
|
4358
|
-
// eslint-disable-next-line max-len
|
|
4359
4369
|
const confirmCreateDialogData = new ConfirmDialogDataBuilder(this.globalConfig, data?.confirmCreateDialogData)
|
|
4360
4370
|
.withDefault('confirmButtonLabel', this.globalConfig.createLabel)
|
|
4361
4371
|
.withDefault('text', this.globalConfig.confirmCreateText)
|
|
@@ -4391,7 +4401,6 @@ let EditActionInternal = class EditActionInternal {
|
|
|
4391
4401
|
.withDefault('text', globalConfig.confirmBaseActionText)
|
|
4392
4402
|
.getResult();
|
|
4393
4403
|
}
|
|
4394
|
-
// eslint-disable-next-line max-len
|
|
4395
4404
|
functionToAsync(originalFunction) {
|
|
4396
4405
|
if (isAsyncFunction(originalFunction)) {
|
|
4397
4406
|
return originalFunction;
|
|
@@ -4549,7 +4558,6 @@ let MultiSelectActionInternal = class MultiSelectActionInternal {
|
|
|
4549
4558
|
.withDefault('text', globalConfig.confirmBaseActionText)
|
|
4550
4559
|
.getResult();
|
|
4551
4560
|
}
|
|
4552
|
-
// eslint-disable-next-line max-len
|
|
4553
4561
|
functionToAsync(originalFunction) {
|
|
4554
4562
|
if (isAsyncFunction(originalFunction)) {
|
|
4555
4563
|
return originalFunction;
|
|
@@ -4657,7 +4665,6 @@ let BaseDataInternal = class BaseDataInternal {
|
|
|
4657
4665
|
this.searchString = data.searchString ?? defaultSearchFunction;
|
|
4658
4666
|
if (data.tableActions) {
|
|
4659
4667
|
this.tableActions = data.tableActions.map(tA => {
|
|
4660
|
-
// eslint-disable-next-line max-len
|
|
4661
4668
|
return tA.type === 'default' ? new BaseTableActionInternal(tA, globalConfig) : new MultiSelectActionInternal(tA, globalConfig);
|
|
4662
4669
|
});
|
|
4663
4670
|
}
|
|
@@ -4792,7 +4799,6 @@ class HasManyDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
|
4792
4799
|
/* istanbul ignore next */
|
|
4793
4800
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
4794
4801
|
function defaultCreateBaseUrl(baseEntity, metadata) {
|
|
4795
|
-
// eslint-disable-next-line max-len
|
|
4796
4802
|
const baseEntityService = inject(metadata.RelatedEntityServiceClass);
|
|
4797
4803
|
const entityService = inject(metadata.tableData.baseData.EntityServiceClass);
|
|
4798
4804
|
const baseUrlSegments = entityService.baseUrl.split('/');
|
|
@@ -4802,7 +4808,6 @@ function defaultCreateBaseUrl(baseEntity, metadata) {
|
|
|
4802
4808
|
/**
|
|
4803
4809
|
* Provider for the default getValidationErrorMessage.
|
|
4804
4810
|
*/
|
|
4805
|
-
// eslint-disable-next-line constCase/uppercase
|
|
4806
4811
|
const NGX_GET_VALIDATION_ERROR_MESSAGE = new InjectionToken('Provider for the default getValidationErrorMessage.', {
|
|
4807
4812
|
providedIn: 'root',
|
|
4808
4813
|
factory: () => getValidationErrorMessage
|
|
@@ -5635,12 +5640,9 @@ class NgxMatEntityInputComponent {
|
|
|
5635
5640
|
}
|
|
5636
5641
|
this.type = foundType;
|
|
5637
5642
|
if (this.validEmpty === true) {
|
|
5638
|
-
// eslint-disable-next-line max-len
|
|
5639
5643
|
const currentMetadata = ReflectUtilities.getMetadata('metadata', this.internalEntity, this.internalPropertyKey);
|
|
5640
|
-
// eslint-disable-next-line max-len
|
|
5641
5644
|
ReflectUtilities.defineMetadata('metadata', { ...currentMetadata, required: defaultFalse }, this.internalEntity, this.internalPropertyKey);
|
|
5642
5645
|
}
|
|
5643
|
-
// eslint-disable-next-line max-len
|
|
5644
5646
|
const foundMetadata = EntityUtilities.getPropertyMetadata(this.internalEntity, this.internalPropertyKey, this.type);
|
|
5645
5647
|
if (!foundMetadata) {
|
|
5646
5648
|
throw new Error(`No metadata was found for the key "${String(this.internalPropertyKey)}"`);
|
|
@@ -5668,7 +5670,6 @@ class NgxMatEntityInputComponent {
|
|
|
5668
5670
|
this.referencesOneName = this.internalPropertyKey.toString() + 'input' + UUIDUtilities.create();
|
|
5669
5671
|
void runInInjectionContext(this.injector, (async () => {
|
|
5670
5672
|
this.referencesOneAllReferencedEntities = await this.metadataReferencesOne.getReferencedEntities();
|
|
5671
|
-
// eslint-disable-next-line max-len
|
|
5672
5673
|
this.referencesOneDropdownValues = this.metadataReferencesOne.getDropdownValues(LodashUtilities.cloneDeep(this.referencesOneAllReferencedEntities));
|
|
5673
5674
|
this.filteredReferencesOneDropdownValues = LodashUtilities.cloneDeep(this.referencesOneDropdownValues);
|
|
5674
5675
|
this.setReferencesOneObject();
|
|
@@ -5706,7 +5707,6 @@ class NgxMatEntityInputComponent {
|
|
|
5706
5707
|
}
|
|
5707
5708
|
this.hasManyDataSource.sortingDataAccessor = (entity, header) => {
|
|
5708
5709
|
return runInInjectionContext(this.injector, () => {
|
|
5709
|
-
// eslint-disable-next-line max-len
|
|
5710
5710
|
return this.metadataHasMany.tableData.baseData.displayColumns.find((dp) => dp.displayName === header)?.value(entity);
|
|
5711
5711
|
});
|
|
5712
5712
|
};
|
|
@@ -5777,7 +5777,6 @@ class NgxMatEntityInputComponent {
|
|
|
5777
5777
|
input.click();
|
|
5778
5778
|
}
|
|
5779
5779
|
importJson(file) {
|
|
5780
|
-
// eslint-disable-next-line max-len
|
|
5781
5780
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.hasManyImportAction.confirmDialogData)
|
|
5782
5781
|
.withDefault('text', this.metadataHasMany.tableData.baseData.importActionData.confirmDialogData?.text)
|
|
5783
5782
|
.withDefault('title', this.hasManyImportAction.displayName)
|
|
@@ -5797,7 +5796,6 @@ class NgxMatEntityInputComponent {
|
|
|
5797
5796
|
* Sets the references one object using the input id.
|
|
5798
5797
|
*/
|
|
5799
5798
|
setReferencesOneObject() {
|
|
5800
|
-
// eslint-disable-next-line max-len
|
|
5801
5799
|
const foundEntity = this.metadataReferencesOne.getEntityForId(this.internalEntity[this.internalPropertyKey], this.referencesOneAllReferencedEntities);
|
|
5802
5800
|
this.referencesOneObject = new this.metadataReferencesOne.EntityClass(foundEntity);
|
|
5803
5801
|
this.referencesOnePropertyTabs = EntityUtilities.getEntityTabs(this.referencesOneObject, this.injector);
|
|
@@ -5911,7 +5909,6 @@ class NgxMatEntityInputComponent {
|
|
|
5911
5909
|
const res = await firstValueFrom(this.editHasManyDialogRef.afterClosed());
|
|
5912
5910
|
if (res === 0) {
|
|
5913
5911
|
const data = this.hasManyDataSource.data;
|
|
5914
|
-
// eslint-disable-next-line max-len
|
|
5915
5912
|
data[this.hasManyDataSource.data.findIndex((e) => e[this.hasManyEntityService.idKey] === entity[this.hasManyEntityService.idKey])] = entity;
|
|
5916
5913
|
this.hasManyDataSource.data = data;
|
|
5917
5914
|
this.hasManySelection.clear();
|
|
@@ -5929,7 +5926,6 @@ class NgxMatEntityInputComponent {
|
|
|
5929
5926
|
this.dialogConfirmEditHasMany();
|
|
5930
5927
|
return;
|
|
5931
5928
|
}
|
|
5932
|
-
// eslint-disable-next-line max-len
|
|
5933
5929
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.metadataHasMany.tableData.editData.confirmEditDialogData)
|
|
5934
5930
|
.withDefault('text', this.globalConfig.confirmSaveText)
|
|
5935
5931
|
.withDefault('confirmButtonLabel', this.globalConfig.saveLabel)
|
|
@@ -5962,7 +5958,6 @@ class NgxMatEntityInputComponent {
|
|
|
5962
5958
|
this.confirmDeleteHasManyEntity();
|
|
5963
5959
|
return;
|
|
5964
5960
|
}
|
|
5965
|
-
// eslint-disable-next-line max-len
|
|
5966
5961
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.metadataHasMany.tableData.editData.confirmDeleteDialogData)
|
|
5967
5962
|
.withDefault('text', this.globalConfig.confirmDeleteText)
|
|
5968
5963
|
.withDefault('type', 'delete')
|
|
@@ -6041,7 +6036,6 @@ class NgxMatEntityInputComponent {
|
|
|
6041
6036
|
this.dialogConfirmCreateHasMany();
|
|
6042
6037
|
return;
|
|
6043
6038
|
}
|
|
6044
|
-
// eslint-disable-next-line max-len
|
|
6045
6039
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.metadataHasMany.tableData.createData.confirmCreateDialogData)
|
|
6046
6040
|
.withDefault('text', this.globalConfig.confirmCreateText)
|
|
6047
6041
|
.withDefault('confirmButtonLabel', this.globalConfig.createLabel)
|
|
@@ -6081,7 +6075,6 @@ class NgxMatEntityInputComponent {
|
|
|
6081
6075
|
this.confirmRunHasManyTableAction(action);
|
|
6082
6076
|
return;
|
|
6083
6077
|
}
|
|
6084
|
-
// eslint-disable-next-line max-len
|
|
6085
6078
|
const defaultText = action.type === 'multi-select' ? this.globalConfig.confirmMultiSelectActionText(this.hasManySelection.selected) : this.globalConfig.confirmBaseActionText;
|
|
6086
6079
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, action.confirmDialogData)
|
|
6087
6080
|
.withDefault('text', defaultText)
|
|
@@ -6135,7 +6128,6 @@ class NgxMatEntityInputComponent {
|
|
|
6135
6128
|
*/
|
|
6136
6129
|
async checkIsHasManyEntityValid(omit) {
|
|
6137
6130
|
this.hasManyValidationErrors = await ValidationUtilities.getEntityValidationErrors(this.hasManyEntity, this.injector, omit);
|
|
6138
|
-
// eslint-disable-next-line max-len
|
|
6139
6131
|
this.hasManyTooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.hasManyValidationErrors));
|
|
6140
6132
|
this.isHasManyEntityValid = this.hasManyValidationErrors.length === 0;
|
|
6141
6133
|
}
|
|
@@ -6157,7 +6149,6 @@ class NgxMatEntityInputComponent {
|
|
|
6157
6149
|
*/
|
|
6158
6150
|
async checkIsArrayItemValid() {
|
|
6159
6151
|
this.arrayItemValidationErrors = await ValidationUtilities.getEntityValidationErrors(this.arrayItem, this.injector, 'create');
|
|
6160
|
-
// eslint-disable-next-line max-len
|
|
6161
6152
|
this.arrayItemTooltipContent = runInInjectionContext(this.injector, () => getValidationErrorsTooltipContent(this.arrayItemValidationErrors));
|
|
6162
6153
|
this.isArrayItemValid = this.arrayItemValidationErrors.length === 0;
|
|
6163
6154
|
}
|
|
@@ -6465,7 +6456,6 @@ class PageCreateDataBuilder extends BaseBuilder {
|
|
|
6465
6456
|
const createData = new CreateDataBuilder(this.globalConfig, data.createData)
|
|
6466
6457
|
.withDefault('cancelButtonLabel', this.globalConfig.backLabel)
|
|
6467
6458
|
.getResult();
|
|
6468
|
-
// eslint-disable-next-line max-len
|
|
6469
6459
|
const confirmUnsavedChangesDialogData = new ConfirmDialogDataBuilder(this.globalConfig, data.createData?.confirmUnsavedChangesDialogData)
|
|
6470
6460
|
.withDefault('title', this.globalConfig.confirmUnsavedChangesTitle)
|
|
6471
6461
|
.withDefault('text', this.globalConfig.confirmUnsavedChangesText)
|
|
@@ -6485,17 +6475,17 @@ class PageCreateDataBuilder extends BaseBuilder {
|
|
|
6485
6475
|
/**
|
|
6486
6476
|
* The entity service that needs to be provided in the providers array of the create page route.
|
|
6487
6477
|
*/
|
|
6488
|
-
// eslint-disable-next-line
|
|
6478
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6489
6479
|
const NGX_CREATE_DATA_ENTITY_SERVICE = new InjectionToken('NGX_CREATE_DATA_ENTITY_SERVICE');
|
|
6490
6480
|
/**
|
|
6491
6481
|
* The entity class that needs to be provided in the providers array of the create page route.
|
|
6492
6482
|
*/
|
|
6493
|
-
// eslint-disable-next-line
|
|
6483
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6494
6484
|
const NGX_CREATE_DATA_ENTITY = new InjectionToken('NGX_CREATE_DATA_ENTITY');
|
|
6495
6485
|
/**
|
|
6496
6486
|
* The configuration that needs to be provided in the providers array of the create page route.
|
|
6497
6487
|
*/
|
|
6498
|
-
// eslint-disable-next-line typescript/no-explicit-any
|
|
6488
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6499
6489
|
const NGX_CREATE_DATA = new InjectionToken('NGX_CREATE_DATA');
|
|
6500
6490
|
/**
|
|
6501
6491
|
* A generic page that allows you to create a specific entity.
|
|
@@ -6570,7 +6560,6 @@ class NgxMatEntityCreatePageComponent {
|
|
|
6570
6560
|
this.data = new PageCreateDataBuilder(this.inputData, this.globalConfig).getResult();
|
|
6571
6561
|
if (this.data == null) {
|
|
6572
6562
|
this.confirmNavigateBack();
|
|
6573
|
-
// eslint-disable-next-line max-len
|
|
6574
6563
|
throw new Error('No create data was provided for "NGX_CREATE_DATA". You need to provide a value in your routes providers array.');
|
|
6575
6564
|
}
|
|
6576
6565
|
this.entity = new this.EntityClass();
|
|
@@ -6630,7 +6619,6 @@ class NgxMatEntityCreatePageComponent {
|
|
|
6630
6619
|
this.confirmCreate();
|
|
6631
6620
|
return;
|
|
6632
6621
|
}
|
|
6633
|
-
// eslint-disable-next-line max-len
|
|
6634
6622
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.createData.confirmCreateDialogData)
|
|
6635
6623
|
.withDefault('text', this.globalConfig.confirmCreateText)
|
|
6636
6624
|
.withDefault('confirmButtonLabel', this.globalConfig.createLabel)
|
|
@@ -6758,7 +6746,6 @@ class PageEditDataBuilder extends BaseBuilder {
|
|
|
6758
6746
|
const editData = new EditDataBuilder(this.globalConfig, data.editData)
|
|
6759
6747
|
.withDefault('cancelButtonLabel', this.globalConfig.backLabel)
|
|
6760
6748
|
.getResult();
|
|
6761
|
-
// eslint-disable-next-line max-len
|
|
6762
6749
|
const confirmUnsavedChangesDialogData = new ConfirmDialogDataBuilder(this.globalConfig, data.editData?.confirmUnsavedChangesDialogData)
|
|
6763
6750
|
.withDefault('title', this.globalConfig.confirmUnsavedChangesTitle)
|
|
6764
6751
|
.withDefault('text', this.globalConfig.confirmUnsavedChangesText)
|
|
@@ -6780,17 +6767,17 @@ class PageEditDataBuilder extends BaseBuilder {
|
|
|
6780
6767
|
/**
|
|
6781
6768
|
* The entity service that needs to be provided in the providers array of the edit page route.
|
|
6782
6769
|
*/
|
|
6783
|
-
// eslint-disable-next-line
|
|
6770
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6784
6771
|
const NGX_EDIT_DATA_ENTITY_SERVICE = new InjectionToken('NGX_EDIT_DATA_ENTITY_SERVICE');
|
|
6785
6772
|
/**
|
|
6786
6773
|
* The entity class that needs to be provided in the providers array of the edit page route.
|
|
6787
6774
|
*/
|
|
6788
|
-
// eslint-disable-next-line
|
|
6775
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6789
6776
|
const NGX_EDIT_DATA_ENTITY = new InjectionToken('NGX_EDIT_DATA_ENTITY');
|
|
6790
6777
|
/**
|
|
6791
6778
|
* The configuration that needs to be provided in the providers array of the edit page route.
|
|
6792
6779
|
*/
|
|
6793
|
-
// eslint-disable-next-line typescript/no-explicit-any
|
|
6780
|
+
// eslint-disable-next-line typescript/no-explicit-any
|
|
6794
6781
|
const NGX_EDIT_DATA = new InjectionToken('NGX_EDIT_DATA');
|
|
6795
6782
|
/**
|
|
6796
6783
|
* A generic page that allows you to edit a specific entity.
|
|
@@ -6955,7 +6942,6 @@ class NgxMatEntityEditPageComponent {
|
|
|
6955
6942
|
this.confirmEdit();
|
|
6956
6943
|
return;
|
|
6957
6944
|
}
|
|
6958
|
-
// eslint-disable-next-line max-len
|
|
6959
6945
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmEditDialogData)
|
|
6960
6946
|
.withDefault('text', this.globalConfig.confirmSaveText)
|
|
6961
6947
|
.withDefault('confirmButtonLabel', this.globalConfig.saveLabel)
|
|
@@ -6984,7 +6970,6 @@ class NgxMatEntityEditPageComponent {
|
|
|
6984
6970
|
this.confirmDelete();
|
|
6985
6971
|
return;
|
|
6986
6972
|
}
|
|
6987
|
-
// eslint-disable-next-line max-len
|
|
6988
6973
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmDeleteDialogData)
|
|
6989
6974
|
.withDefault('text', this.globalConfig.confirmDeleteText)
|
|
6990
6975
|
.withDefault('type', 'delete')
|
|
@@ -7516,7 +7501,6 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7516
7501
|
*/
|
|
7517
7502
|
isReadOnly(key) {
|
|
7518
7503
|
return runInInjectionContext(this.injector, () => {
|
|
7519
|
-
// eslint-disable-next-line max-len
|
|
7520
7504
|
const metadata = EntityUtilities.getPropertyMetadata(this.data.entity, key);
|
|
7521
7505
|
if (!metadata) {
|
|
7522
7506
|
throw new Error(`No metadata was found for the key "${String(key)}"`);
|
|
@@ -7548,7 +7532,6 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7548
7532
|
this.confirmEdit();
|
|
7549
7533
|
return;
|
|
7550
7534
|
}
|
|
7551
|
-
// eslint-disable-next-line max-len
|
|
7552
7535
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmEditDialogData)
|
|
7553
7536
|
.withDefault('text', this.globalConfig.confirmSaveText)
|
|
7554
7537
|
.withDefault('confirmButtonLabel', this.globalConfig.saveLabel)
|
|
@@ -7577,7 +7560,6 @@ class NgxMatEntityEditDialogComponent {
|
|
|
7577
7560
|
this.confirmDelete();
|
|
7578
7561
|
return;
|
|
7579
7562
|
}
|
|
7580
|
-
// eslint-disable-next-line max-len
|
|
7581
7563
|
const dialogData = new ConfirmDialogDataBuilder(this.globalConfig, this.data.editData.confirmDeleteDialogData)
|
|
7582
7564
|
.withDefault('text', this.globalConfig.confirmDeleteText)
|
|
7583
7565
|
.withDefault('type', 'delete')
|
|
@@ -8216,7 +8198,7 @@ class CustomDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
|
8216
8198
|
component;
|
|
8217
8199
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
8218
8200
|
isValid;
|
|
8219
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
8201
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
8220
8202
|
isEqual;
|
|
8221
8203
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
8222
8204
|
customMetadata;
|
|
@@ -8418,7 +8400,6 @@ class ImageFileDecoratorConfigInternal extends PropertyDecoratorConfigInternal {
|
|
|
8418
8400
|
function getDefaultMimeTypeErrorDialogData(data) {
|
|
8419
8401
|
return {
|
|
8420
8402
|
type: data.mimeTypeErrorDialog?.type ?? 'info-only',
|
|
8421
|
-
// eslint-disable-next-line max-len
|
|
8422
8403
|
text: data.mimeTypeErrorDialog?.text ?? (data.multiple ? ['One of the uploaded files has the wrong type.'] : ['The uploaded file has the wrong type.']),
|
|
8423
8404
|
title: data.mimeTypeErrorDialog?.title ?? (data.multiple ? 'Error adding files' : 'Error adding file'),
|
|
8424
8405
|
confirmButtonLabel: data.mimeTypeErrorDialog?.confirmButtonLabel,
|
|
@@ -8436,7 +8417,6 @@ function getDefaultMimeTypeErrorDialogData(data) {
|
|
|
8436
8417
|
function getDefaultMaxSizeErrorDialogData(data) {
|
|
8437
8418
|
return {
|
|
8438
8419
|
type: data.mimeTypeErrorDialog?.type ?? 'info-only',
|
|
8439
|
-
// eslint-disable-next-line max-len
|
|
8440
8420
|
text: data.mimeTypeErrorDialog?.text ?? (data.multiple ? ['One of the uploaded files is too big'] : ['The uploaded files is too big']),
|
|
8441
8421
|
title: data.mimeTypeErrorDialog?.title ?? (data.multiple ? 'Error adding files' : 'Error adding file'),
|
|
8442
8422
|
confirmButtonLabel: data.mimeTypeErrorDialog?.confirmButtonLabel,
|