ngx-material-entity 15.3.0 → 15.3.1
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/components/edit-page/edit-page.component.d.ts +3 -1
- package/components/input/array/array-table.class.d.ts +3 -1
- package/components/input/file/file-default-input/file-default-input.component.d.ts +0 -2
- package/components/input/file/file-image-input/file-image-input.component.d.ts +3 -2
- package/components/input/file/file-input/file-input.component.d.ts +3 -1
- package/components/input/input.component.d.ts +7 -3
- package/components/input/input.module.d.ts +2 -1
- package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +3 -1
- package/esm2020/components/edit-page/edit-page.component.mjs +16 -13
- package/esm2020/components/input/array/array-table.class.mjs +8 -5
- package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +1 -6
- package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +14 -12
- package/esm2020/components/input/file/file-input/file-input.component.mjs +17 -14
- package/esm2020/components/input/input.component.mjs +57 -48
- package/esm2020/components/input/input.module.mjs +8 -4
- package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +14 -11
- package/esm2020/services/entity.service.mjs +6 -6
- package/esm2020/utilities/entity.utilities.mjs +21 -12
- package/esm2020/utilities/file.utilities.mjs +15 -11
- package/fesm2015/ngx-material-entity.mjs +169 -147
- package/fesm2015/ngx-material-entity.mjs.map +1 -1
- package/fesm2020/ngx-material-entity.mjs +169 -147
- package/fesm2020/ngx-material-entity.mjs.map +1 -1
- package/package.json +1 -1
- package/utilities/entity.utilities.d.ts +7 -3
- package/utilities/file.utilities.d.ts +6 -2
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
1
2
|
import { BaseEntityType } from '../classes/entity.model';
|
|
2
3
|
import { DecoratorType, DecoratorTypes } from '../decorators/base/decorator-types.enum';
|
|
3
4
|
import { PropertyDecoratorConfigInternal } from '../decorators/base/property-decorator-internal.data';
|
|
@@ -68,9 +69,10 @@ export declare abstract class EntityUtilities {
|
|
|
68
69
|
*
|
|
69
70
|
* @param entity - The entity with all its values.
|
|
70
71
|
* @param entityPriorChanges - The entity before any changes were applied.
|
|
72
|
+
* @param http - The angular HttpClient. Used to fetch files.
|
|
71
73
|
* @returns The reduced entity object.
|
|
72
74
|
*/
|
|
73
|
-
static getWithoutOmitUpdateValues<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType): Promise<Partial<EntityType>>;
|
|
75
|
+
static getWithoutOmitUpdateValues<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType, http: HttpClient): Promise<Partial<EntityType>>;
|
|
74
76
|
/**
|
|
75
77
|
* Gets all properties on the given entity which are files.
|
|
76
78
|
*
|
|
@@ -143,9 +145,10 @@ export declare abstract class EntityUtilities {
|
|
|
143
145
|
*
|
|
144
146
|
* @param entity - The entity after all changes.
|
|
145
147
|
* @param entityPriorChanges - The entity before the changes.
|
|
148
|
+
* @param http - The angular HttpClient. Used to fetch files.
|
|
146
149
|
* @returns Whether or not the entity is dirty.
|
|
147
150
|
*/
|
|
148
|
-
static isDirty<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType): Promise<boolean>;
|
|
151
|
+
static isDirty<EntityType extends BaseEntityType<EntityType>>(entity: EntityType, entityPriorChanges: EntityType, http: HttpClient): Promise<boolean>;
|
|
149
152
|
private static differencesForDirty;
|
|
150
153
|
/**
|
|
151
154
|
* Compares two Entities and returns their difference in an object.
|
|
@@ -162,9 +165,10 @@ export declare abstract class EntityUtilities {
|
|
|
162
165
|
* @param valuePriorChanges - The value before any changes.
|
|
163
166
|
* @param metadata - The metadata of the property.
|
|
164
167
|
* @param type - The type of the property.
|
|
168
|
+
* @param http - The angular HttpClient. Used to fetch files.
|
|
165
169
|
* @returns Whether or not the given values are equal.
|
|
166
170
|
*/
|
|
167
|
-
static isEqual(value: unknown, valuePriorChanges: unknown, metadata: PropertyDecoratorConfigInternal, type: DecoratorTypes): Promise<boolean>;
|
|
171
|
+
static isEqual(value: unknown, valuePriorChanges: unknown, metadata: PropertyDecoratorConfigInternal, type: DecoratorTypes, http: HttpClient): Promise<boolean>;
|
|
168
172
|
private static isEqualArrayString;
|
|
169
173
|
private static isEqualArrayDate;
|
|
170
174
|
private static isEqualArrayDateRange;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
1
2
|
import { FileDataWithFile } from '../decorators/file/file-decorator-internal.data';
|
|
2
3
|
import { FileData } from '../decorators/file/file-decorator.data';
|
|
3
4
|
/**
|
|
@@ -22,6 +23,7 @@ export declare abstract class FileUtilities {
|
|
|
22
23
|
* Gets a file from the given url.
|
|
23
24
|
*
|
|
24
25
|
* @param url - The url to get the file from.
|
|
26
|
+
* @param http - The angular HttpClient. Used to fetch files.
|
|
25
27
|
* @returns A promise of the File.
|
|
26
28
|
*/
|
|
27
29
|
private static getFileFromUrl;
|
|
@@ -29,9 +31,10 @@ export declare abstract class FileUtilities {
|
|
|
29
31
|
* Gets the file data with the blob from the given File Data.
|
|
30
32
|
*
|
|
31
33
|
* @param data - The File Data to get the file data with blob from.
|
|
34
|
+
* @param http - The angular HttpClient. Used to fetch files.
|
|
32
35
|
* @returns FileDataWithFile.
|
|
33
36
|
*/
|
|
34
|
-
static getFileData(data: FileData): Promise<FileDataWithFile>;
|
|
37
|
+
static getFileData(data: FileData, http: HttpClient): Promise<FileDataWithFile>;
|
|
35
38
|
/**
|
|
36
39
|
* Downloads a single file from the given File Data.
|
|
37
40
|
*
|
|
@@ -50,8 +53,9 @@ export declare abstract class FileUtilities {
|
|
|
50
53
|
*
|
|
51
54
|
* @param name - The name of the zip file to generate.
|
|
52
55
|
* @param multiFileData - The file data array to put in the zip.
|
|
56
|
+
* @param http - The angular HttpClient. Used to fetch files.
|
|
53
57
|
*/
|
|
54
|
-
static downloadMultipleFiles(name: string, multiFileData: FileData[]): Promise<void>;
|
|
58
|
+
static downloadMultipleFiles(name: string, multiFileData: FileData[], http: HttpClient): Promise<void>;
|
|
55
59
|
/**
|
|
56
60
|
* Checks if the given file has a valid mime type.
|
|
57
61
|
*
|