@futdevpro/fsm-dynamo 1.9.9 → 1.9.12
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/.github/workflows/main.yml +196 -0
- package/HOWTO.md +15 -15
- package/README.md +17 -17
- package/build/_collections/constants/country-divisions.const.d.ts +1 -1
- package/build/_collections/constants/country-divisions.const.d.ts.map +1 -1
- package/build/_collections/constants/country-divisions.const.js +2 -2
- package/build/_collections/constants/country-divisions.const.js.map +1 -1
- package/build/_collections/constants/courtry-isos.const.d.ts +1 -1
- package/build/_collections/constants/courtry-isos.const.d.ts.map +1 -1
- package/build/_collections/constants/courtry-isos.const.js +2 -2
- package/build/_collections/constants/courtry-isos.const.js.map +1 -1
- package/build/_collections/constants/error-defaults.const.d.ts +1 -1
- package/build/_collections/constants/error-defaults.const.d.ts.map +1 -1
- package/build/_collections/constants/module-settings/usage-module-settings.const.js +1 -1
- package/build/_collections/constants/pipe-transforms.const.js +12 -12
- package/build/_collections/constants/pipe-transforms.const.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/division-pipe.util.js +1 -1
- package/build/_collections/utils/pipe-transforms/division-pipe.util.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/list-pipe.util.d.ts.map +1 -1
- package/build/_collections/utils/pipe-transforms/list-pipe.util.js.map +1 -1
- package/build/_collections/utils/pipe-transforms/range-pipe.util.d.ts +2 -2
- package/build/_collections/utils/pipe-transforms/range-pipe.util.d.ts.map +1 -1
- package/build/_collections/utils/pipe-transforms/range-pipe.util.js +11 -11
- package/build/_collections/utils/pipe-transforms/range-pipe.util.js.map +1 -1
- package/build/_collections/utils/regions.util.d.ts.map +1 -1
- package/build/_collections/utils/regions.util.js +3 -0
- package/build/_collections/utils/regions.util.js.map +1 -1
- package/build/_enums/range-pipe-setting.enum.d.ts +1 -1
- package/build/_enums/range-pipe-setting.enum.d.ts.map +1 -1
- package/build/_enums/range-pipe-setting.enum.js +12 -12
- package/build/_enums/range-pipe-setting.enum.js.map +1 -1
- package/build/_models/control-models/error.control-model.js +1 -1
- package/build/_models/control-models/error.control-model.js.map +1 -1
- package/build/_models/control-models/error.control-model.spec.js +25 -6
- package/build/_models/control-models/error.control-model.spec.js.map +1 -1
- package/build/_models/interfaces/index.d.ts +3 -0
- package/build/_models/interfaces/index.d.ts.map +1 -1
- package/build/_models/interfaces/index.js +3 -0
- package/build/_models/interfaces/index.js.map +1 -1
- package/build/_models/interfaces/pipe-transforms.interface.d.ts +2 -2
- package/build/_models/interfaces/pipe-transforms.interface.d.ts.map +1 -1
- package/futdevpro-fsm-dynamo-01.09.12.tgz +0 -0
- package/nodemon.json +11 -11
- package/package.json +151 -151
- package/src/_collections/assets/location/country-codes-ISO-3166.json +3239 -3239
- package/src/_collections/assets/location/country-divisions-ISO-3166-all-list.json +19035 -19035
- package/src/_collections/assets/location/country-divisions-ISO-3166.json +4993 -4993
- package/src/_collections/assets/location/country-phone-codes.json +1203 -1203
- package/src/_collections/constants/country-divisions.const.ts +9 -9
- package/src/_collections/constants/courtry-isos.const.ts +8 -8
- package/src/_collections/constants/error-defaults.const.ts +11 -11
- package/src/_collections/constants/index.ts +15 -15
- package/src/_collections/constants/module-settings/custom-data-module-settings.const.ts +15 -15
- package/src/_collections/constants/module-settings/index.ts +8 -8
- package/src/_collections/constants/module-settings/test-module-settings.const.ts +19 -19
- package/src/_collections/constants/module-settings/usage-module-settings.const.ts +19 -19
- package/src/_collections/constants/pipe-transforms.const.ts +35 -35
- package/src/_collections/constants/times.const.ts +8 -8
- package/src/_collections/index.ts +6 -6
- package/src/_collections/utils/array.util.spec.ts +39 -39
- package/src/_collections/utils/array.util.ts +137 -137
- package/src/_collections/utils/index.ts +18 -18
- package/src/_collections/utils/location.util.ts +55 -55
- package/src/_collections/utils/log.util.ts +239 -239
- package/src/_collections/utils/math/box-bounds.util.ts +85 -85
- package/src/_collections/utils/math/index.ts +5 -5
- package/src/_collections/utils/math/math.util.ts +53 -53
- package/src/_collections/utils/math/random.util.ts +80 -80
- package/src/_collections/utils/math/trigonometry.util.ts +73 -73
- package/src/_collections/utils/math/vector2.util.ts +197 -197
- package/src/_collections/utils/pipe-transforms/country-pipe.util.ts +18 -18
- package/src/_collections/utils/pipe-transforms/custom-pipe.util.ts +9 -9
- package/src/_collections/utils/pipe-transforms/division-pipe.util.ts +20 -20
- package/src/_collections/utils/pipe-transforms/index.ts +15 -15
- package/src/_collections/utils/pipe-transforms/list-pipe.util.ts +10 -14
- package/src/_collections/utils/pipe-transforms/multi-pipe-pipe.util.ts +160 -160
- package/src/_collections/utils/pipe-transforms/obj-key-pipe.util.ts +9 -9
- package/src/_collections/utils/pipe-transforms/range-pipe.util.ts +94 -94
- package/src/_collections/utils/pipe-transforms/region-pipe.util.ts +18 -18
- package/src/_collections/utils/pipe-transforms/replace-pipe.util.ts +11 -11
- package/src/_collections/utils/pipe-transforms/slider-pipe.util.ts +20 -20
- package/src/_collections/utils/pipe-transforms/smart-replace-pipe.util.ts +71 -71
- package/src/_collections/utils/regex/index.ts +4 -4
- package/src/_collections/utils/regex/password-regex.util.ts +52 -52
- package/src/_collections/utils/regex/regex.util.ts +6 -6
- package/src/_collections/utils/regex/username-regex.util.ts +33 -33
- package/src/_collections/utils/regions.util.ts +100 -97
- package/src/_collections/utils/round-list.util.ts +44 -44
- package/src/_collections/utils/shared.static-service.ts +177 -177
- package/src/_collections/utils/time.util.spec.ts +50 -50
- package/src/_collections/utils/time.util.ts +219 -219
- package/src/_collections/utils/type-cloning-facility.util.ts +121 -121
- package/src/_collections/utils/utilities.util.ts +130 -130
- package/src/_enums/basic-property-type.enum.ts +9 -9
- package/src/_enums/data-model-type.enum.ts +13 -13
- package/src/_enums/day-of-week.enum.ts +28 -28
- package/src/_enums/error-level.enum.ts +17 -17
- package/src/_enums/index.ts +16 -16
- package/src/_enums/location/index.ts +3 -3
- package/src/_enums/location/region.enum.ts +9 -9
- package/src/_enums/location/sub-region.enum.ts +26 -26
- package/src/_enums/location/subdivision-region-type.enum.ts +44 -44
- package/src/_enums/log-style.enum.ts +30 -30
- package/src/_enums/month.enum.ts +16 -16
- package/src/_enums/pipe.enum.ts +45 -45
- package/src/_enums/range-pipe-setting.enum.ts +11 -11
- package/src/_enums/time/day-of-week.enum.ts +28 -28
- package/src/_enums/time/index.ts +3 -3
- package/src/_enums/time/month.enum.ts +16 -16
- package/src/_enums/time/relative-date.enum.ts +13 -13
- package/src/_models/control-models/daily-usage-data.control-model.ts +21 -21
- package/src/_models/control-models/data-model-params.control-model.ts +39 -39
- package/src/_models/control-models/data-property-params.control-model.ts +106 -106
- package/src/_models/control-models/error.control-model.spec.ts +753 -716
- package/src/_models/control-models/error.control-model.ts +722 -722
- package/src/_models/control-models/index.ts +10 -10
- package/src/_models/control-models/poll.control-model.ts +113 -113
- package/src/_models/control-models/range-value.control-model.ts +142 -142
- package/src/_models/control-models/usage-action.control-model.ts +15 -15
- package/src/_models/control-models/usage-data.control-model.ts +20 -20
- package/src/_models/data-models/custom-data.data-model.ts +28 -28
- package/src/_models/data-models/index.ts +5 -5
- package/src/_models/data-models/metadata.data-model.ts +83 -83
- package/src/_models/data-models/usage-session.data-model.ts +53 -53
- package/src/_models/index.ts +12 -12
- package/src/_models/interfaces/error-defaults.interface.ts +11 -11
- package/src/_models/interfaces/index.ts +11 -8
- package/src/_models/interfaces/location/country-division.interface.ts +7 -7
- package/src/_models/interfaces/location/country-iso.interface.ts +21 -21
- package/src/_models/interfaces/location/country-phone-code.interface.ts +7 -7
- package/src/_models/interfaces/location/division-collection.interface.ts +10 -10
- package/src/_models/interfaces/location/division-region-data.interface.ts +8 -8
- package/src/_models/interfaces/location/geo-ip-location.interface.ts +26 -26
- package/src/_models/interfaces/location/index.ts +10 -10
- package/src/_models/interfaces/location/location-coordinates.interface.ts +5 -5
- package/src/_models/interfaces/multi-pipe-settings.type.ts +7 -7
- package/src/_models/interfaces/paged.interface.ts +11 -11
- package/src/_models/interfaces/pipe-transforms.interface.ts +29 -29
- package/src/_models/interfaces/random-weight.interface.ts +7 -7
- package/src/_models/interfaces/route-settings.interface.ts +11 -11
- package/src/_modules/collections.index.ts +2 -2
- package/src/_modules/constants.index.ts +2 -2
- package/src/_modules/custom-data-module.index.ts +6 -6
- package/src/_modules/data-modules.index.ts +9 -9
- package/src/_modules/enums.index.ts +2 -2
- package/src/_modules/error-module.index.ts +8 -8
- package/src/_modules/location.index.ts +15 -15
- package/src/_modules/models.index.ts +2 -2
- package/src/_modules/shared-service.index.ts +9 -9
- package/src/_modules/test-module.index.ts +5 -5
- package/src/_modules/usage-module.index.ts +10 -10
- package/tsconfig.json +29 -29
- package/tslint.json +153 -153
- package/build/_enums/region.enum.d.ts +0 -8
- package/build/_enums/region.enum.d.ts.map +0 -1
- package/build/_enums/region.enum.js +0 -12
- package/build/_enums/region.enum.js.map +0 -1
- package/build/_enums/relative-date.enum.d.ts +0 -9
- package/build/_enums/relative-date.enum.d.ts.map +0 -1
- package/build/_enums/relative-date.enum.js +0 -13
- package/build/_enums/relative-date.enum.js.map +0 -1
- package/build/_enums/sub-region.enum.d.ts +0 -20
- package/build/_enums/sub-region.enum.d.ts.map +0 -1
- package/build/_enums/sub-region.enum.js +0 -24
- package/build/_enums/sub-region.enum.js.map +0 -1
- package/build/_enums/subdivision-region-type.enum.d.ts +0 -41
- package/build/_enums/subdivision-region-type.enum.d.ts.map +0 -1
- package/build/_enums/subdivision-region-type.enum.js +0 -46
- package/build/_enums/subdivision-region-type.enum.js.map +0 -1
- package/src/_enums/region.enum.ts +0 -9
- package/src/_enums/relative-date.enum.ts +0 -13
- package/src/_enums/sub-region.enum.ts +0 -26
- package/src/_enums/subdivision-region-type.enum.ts +0 -44
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
const defaultErrorMsg = ' failed. ' +
|
|
3
|
-
'\nThis might be happening becouse the object you trying to clone, ' +
|
|
4
|
-
'containes object hooks for its own objects, therefore its creating an object loop. ' +
|
|
5
|
-
'See further information in the detailed error:\n\n';
|
|
6
|
-
|
|
7
|
-
export function DynamoFM_clone<T>(object: T): T {
|
|
8
|
-
try {
|
|
9
|
-
return object ? JSON.parse(JSON.stringify(object)) as T : object;
|
|
10
|
-
} catch (error) {
|
|
11
|
-
console.error(
|
|
12
|
-
'clone()' + defaultErrorMsg,
|
|
13
|
-
error
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
throw error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export const DynamoFM_copy = DynamoFM_clone;
|
|
20
|
-
export const DFM_clone = DynamoFM_clone;
|
|
21
|
-
export const DFM_copy = DynamoFM_clone;
|
|
22
|
-
|
|
23
|
-
export function DynamoFM_surfaceClone<T>(object: T): T {
|
|
24
|
-
try {
|
|
25
|
-
const result = {};
|
|
26
|
-
|
|
27
|
-
Object.keys(object).forEach((key: string): void => {
|
|
28
|
-
result[key] = object[key];
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
return result as T;
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.error(
|
|
34
|
-
'surfaceClone()' + defaultErrorMsg,
|
|
35
|
-
error
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
throw error;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export const DynamoFM_surfaceCopy = DynamoFM_surfaceClone;
|
|
42
|
-
export const DFM_surfaceClone = DynamoFM_surfaceClone;
|
|
43
|
-
export const DFM_surfaceCopy = DynamoFM_surfaceClone;
|
|
44
|
-
|
|
45
|
-
export function DynamoFM_sameObjects<T>(objA: T, objB: T): boolean {
|
|
46
|
-
try {
|
|
47
|
-
return JSON.stringify(objA) === JSON.stringify(objB);
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error(
|
|
50
|
-
'sameObjects()' + defaultErrorMsg,
|
|
51
|
-
error
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export const DFM_sameObjects = DynamoFM_sameObjects;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* sets values if its existing on To, even if its null (but if undefined)
|
|
61
|
-
* @param setOn
|
|
62
|
-
* @param setTo
|
|
63
|
-
*/
|
|
64
|
-
export function DynamoFM_setExisitngValuesOnly(setOn: any, setTo: any): void {
|
|
65
|
-
for (const key in setTo) {
|
|
66
|
-
if (setTo[key] != undefined) {
|
|
67
|
-
setOn[key] = setTo[key];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
export const DFM_setExisitngValuesOnly = DynamoFM_setExisitngValuesOnly;
|
|
72
|
-
|
|
73
|
-
export function DynamoFM_delay(ms: number): Promise<void> {
|
|
74
|
-
return new Promise((resolve): any => setTimeout(resolve, ms));
|
|
75
|
-
}
|
|
76
|
-
export const DynamoFM_sleep = DynamoFM_delay;
|
|
77
|
-
export const DynamoFM_wait = DynamoFM_delay;
|
|
78
|
-
export const DFM_delay = DynamoFM_delay;
|
|
79
|
-
export const DFM_sleep = DynamoFM_delay;
|
|
80
|
-
export const DFM_wait = DynamoFM_delay;
|
|
81
|
-
|
|
82
|
-
export type DynamoFM_SortDirection = 0 | 1 | -1
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* You might be use getSortForTrueFn instead for a shorter expression
|
|
86
|
-
*
|
|
87
|
-
* @param a
|
|
88
|
-
* @param b
|
|
89
|
-
* @param check
|
|
90
|
-
* @returns
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* codes.sort((a,b) => sortForTrue(a,b,(c: Code) => c.haveImg));
|
|
94
|
-
*/
|
|
95
|
-
export function DynamoFM_sortForTrue<T>(
|
|
96
|
-
a: T,
|
|
97
|
-
b: T,
|
|
98
|
-
check: (a: T) => boolean
|
|
99
|
-
): DynamoFM_SortDirection {
|
|
100
|
-
const isA = check(a);
|
|
101
|
-
|
|
102
|
-
return isA === check(b) ? 0 : isA ? -1 : 1;
|
|
103
|
-
}
|
|
104
|
-
export const DFM_sortForTrue = DynamoFM_sortForTrue;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* @param checkFor
|
|
109
|
-
* @returns
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* codes.sort(getSortForTrueFn((c: Code) => c.haveImg));
|
|
113
|
-
*/
|
|
114
|
-
export function DynamoFM_getSortForTrueFn<T>(
|
|
115
|
-
checkFor: (a: T) => boolean): (a: T, b: T) => DynamoFM_SortDirection {
|
|
116
|
-
return (a: T, b: T): DynamoFM_SortDirection => DynamoFM_sortForTrue<T>(a, b, checkFor);
|
|
117
|
-
}
|
|
118
|
-
export const DFM_getSortForTrueFn = DynamoFM_getSortForTrueFn;
|
|
119
|
-
|
|
120
|
-
export function DynamoFM_JSONListify<T>(JSONList): T[] {
|
|
121
|
-
const result: T[] = [];
|
|
122
|
-
|
|
123
|
-
for (let i = 0; JSONList[i]; i++) {
|
|
124
|
-
result.push(JSONList[i] as T);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return result;
|
|
128
|
-
}
|
|
129
|
-
export const DFM_JSONListify = DynamoFM_JSONListify;
|
|
130
|
-
|
|
1
|
+
|
|
2
|
+
const defaultErrorMsg = ' failed. ' +
|
|
3
|
+
'\nThis might be happening becouse the object you trying to clone, ' +
|
|
4
|
+
'containes object hooks for its own objects, therefore its creating an object loop. ' +
|
|
5
|
+
'See further information in the detailed error:\n\n';
|
|
6
|
+
|
|
7
|
+
export function DynamoFM_clone<T>(object: T): T {
|
|
8
|
+
try {
|
|
9
|
+
return object ? JSON.parse(JSON.stringify(object)) as T : object;
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error(
|
|
12
|
+
'clone()' + defaultErrorMsg,
|
|
13
|
+
error
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
throw error;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export const DynamoFM_copy = DynamoFM_clone;
|
|
20
|
+
export const DFM_clone = DynamoFM_clone;
|
|
21
|
+
export const DFM_copy = DynamoFM_clone;
|
|
22
|
+
|
|
23
|
+
export function DynamoFM_surfaceClone<T>(object: T): T {
|
|
24
|
+
try {
|
|
25
|
+
const result = {};
|
|
26
|
+
|
|
27
|
+
Object.keys(object).forEach((key: string): void => {
|
|
28
|
+
result[key] = object[key];
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return result as T;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error(
|
|
34
|
+
'surfaceClone()' + defaultErrorMsg,
|
|
35
|
+
error
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export const DynamoFM_surfaceCopy = DynamoFM_surfaceClone;
|
|
42
|
+
export const DFM_surfaceClone = DynamoFM_surfaceClone;
|
|
43
|
+
export const DFM_surfaceCopy = DynamoFM_surfaceClone;
|
|
44
|
+
|
|
45
|
+
export function DynamoFM_sameObjects<T>(objA: T, objB: T): boolean {
|
|
46
|
+
try {
|
|
47
|
+
return JSON.stringify(objA) === JSON.stringify(objB);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(
|
|
50
|
+
'sameObjects()' + defaultErrorMsg,
|
|
51
|
+
error
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export const DFM_sameObjects = DynamoFM_sameObjects;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* sets values if its existing on To, even if its null (but if undefined)
|
|
61
|
+
* @param setOn
|
|
62
|
+
* @param setTo
|
|
63
|
+
*/
|
|
64
|
+
export function DynamoFM_setExisitngValuesOnly(setOn: any, setTo: any): void {
|
|
65
|
+
for (const key in setTo) {
|
|
66
|
+
if (setTo[key] != undefined) {
|
|
67
|
+
setOn[key] = setTo[key];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export const DFM_setExisitngValuesOnly = DynamoFM_setExisitngValuesOnly;
|
|
72
|
+
|
|
73
|
+
export function DynamoFM_delay(ms: number): Promise<void> {
|
|
74
|
+
return new Promise((resolve): any => setTimeout(resolve, ms));
|
|
75
|
+
}
|
|
76
|
+
export const DynamoFM_sleep = DynamoFM_delay;
|
|
77
|
+
export const DynamoFM_wait = DynamoFM_delay;
|
|
78
|
+
export const DFM_delay = DynamoFM_delay;
|
|
79
|
+
export const DFM_sleep = DynamoFM_delay;
|
|
80
|
+
export const DFM_wait = DynamoFM_delay;
|
|
81
|
+
|
|
82
|
+
export type DynamoFM_SortDirection = 0 | 1 | -1
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* You might be use getSortForTrueFn instead for a shorter expression
|
|
86
|
+
*
|
|
87
|
+
* @param a
|
|
88
|
+
* @param b
|
|
89
|
+
* @param check
|
|
90
|
+
* @returns
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* codes.sort((a,b) => sortForTrue(a,b,(c: Code) => c.haveImg));
|
|
94
|
+
*/
|
|
95
|
+
export function DynamoFM_sortForTrue<T>(
|
|
96
|
+
a: T,
|
|
97
|
+
b: T,
|
|
98
|
+
check: (a: T) => boolean
|
|
99
|
+
): DynamoFM_SortDirection {
|
|
100
|
+
const isA = check(a);
|
|
101
|
+
|
|
102
|
+
return isA === check(b) ? 0 : isA ? -1 : 1;
|
|
103
|
+
}
|
|
104
|
+
export const DFM_sortForTrue = DynamoFM_sortForTrue;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @param checkFor
|
|
109
|
+
* @returns
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* codes.sort(getSortForTrueFn((c: Code) => c.haveImg));
|
|
113
|
+
*/
|
|
114
|
+
export function DynamoFM_getSortForTrueFn<T>(
|
|
115
|
+
checkFor: (a: T) => boolean): (a: T, b: T) => DynamoFM_SortDirection {
|
|
116
|
+
return (a: T, b: T): DynamoFM_SortDirection => DynamoFM_sortForTrue<T>(a, b, checkFor);
|
|
117
|
+
}
|
|
118
|
+
export const DFM_getSortForTrueFn = DynamoFM_getSortForTrueFn;
|
|
119
|
+
|
|
120
|
+
export function DynamoFM_JSONListify<T>(JSONList): T[] {
|
|
121
|
+
const result: T[] = [];
|
|
122
|
+
|
|
123
|
+
for (let i = 0; JSONList[i]; i++) {
|
|
124
|
+
result.push(JSONList[i] as T);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
export const DFM_JSONListify = DynamoFM_JSONListify;
|
|
130
|
+
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum DynamoFM_BasicPropertyType {
|
|
4
|
-
string = 'string',
|
|
5
|
-
number = 'number',
|
|
6
|
-
boolean = 'boolean',
|
|
7
|
-
date = 'Date',
|
|
8
|
-
object = 'object',
|
|
9
|
-
}
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum DynamoFM_BasicPropertyType {
|
|
4
|
+
string = 'string',
|
|
5
|
+
number = 'number',
|
|
6
|
+
boolean = 'boolean',
|
|
7
|
+
date = 'Date',
|
|
8
|
+
object = 'object',
|
|
9
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* DataModelType is declaring where the data type is used
|
|
4
|
-
*
|
|
5
|
-
* data: used in DB
|
|
6
|
-
* control: used only in runtime and needs a constructor
|
|
7
|
-
* interface: used only in runtime and doesnt need constructor
|
|
8
|
-
*/
|
|
9
|
-
export enum DynamoFM_DataModelType {
|
|
10
|
-
data = 'data-model',
|
|
11
|
-
control = 'control-model',
|
|
12
|
-
interface = 'interface-model',
|
|
13
|
-
}
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* DataModelType is declaring where the data type is used
|
|
4
|
+
*
|
|
5
|
+
* data: used in DB
|
|
6
|
+
* control: used only in runtime and needs a constructor
|
|
7
|
+
* interface: used only in runtime and doesnt need constructor
|
|
8
|
+
*/
|
|
9
|
+
export enum DynamoFM_DataModelType {
|
|
10
|
+
data = 'data-model',
|
|
11
|
+
control = 'control-model',
|
|
12
|
+
interface = 'interface-model',
|
|
13
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export enum DynamoFM_DayOfWeek {
|
|
5
|
-
monday = 'monday',
|
|
6
|
-
tuesday = 'tuesday',
|
|
7
|
-
wednesday = 'wednesday',
|
|
8
|
-
thursday = 'thursday',
|
|
9
|
-
friday = 'friday',
|
|
10
|
-
saturday = 'saturday',
|
|
11
|
-
sunday = 'sunday',
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const DynamoFM_allDaysOfWeek = Object.values(DynamoFM_DayOfWeek);
|
|
15
|
-
|
|
16
|
-
/** stupid style */
|
|
17
|
-
export const DynamoFM_allDaysOfWeekAmericanStyle = [
|
|
18
|
-
DynamoFM_DayOfWeek.sunday,
|
|
19
|
-
DynamoFM_DayOfWeek.monday,
|
|
20
|
-
DynamoFM_DayOfWeek.tuesday,
|
|
21
|
-
DynamoFM_DayOfWeek.wednesday,
|
|
22
|
-
DynamoFM_DayOfWeek.thursday,
|
|
23
|
-
DynamoFM_DayOfWeek.friday,
|
|
24
|
-
DynamoFM_DayOfWeek.saturday,
|
|
25
|
-
];
|
|
26
|
-
export const DynamoFM_allDaysOfWeekStupid = DynamoFM_allDaysOfWeekAmericanStyle;
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export enum DynamoFM_DayOfWeek {
|
|
5
|
+
monday = 'monday',
|
|
6
|
+
tuesday = 'tuesday',
|
|
7
|
+
wednesday = 'wednesday',
|
|
8
|
+
thursday = 'thursday',
|
|
9
|
+
friday = 'friday',
|
|
10
|
+
saturday = 'saturday',
|
|
11
|
+
sunday = 'sunday',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const DynamoFM_allDaysOfWeek = Object.values(DynamoFM_DayOfWeek);
|
|
15
|
+
|
|
16
|
+
/** stupid style */
|
|
17
|
+
export const DynamoFM_allDaysOfWeekAmericanStyle = [
|
|
18
|
+
DynamoFM_DayOfWeek.sunday,
|
|
19
|
+
DynamoFM_DayOfWeek.monday,
|
|
20
|
+
DynamoFM_DayOfWeek.tuesday,
|
|
21
|
+
DynamoFM_DayOfWeek.wednesday,
|
|
22
|
+
DynamoFM_DayOfWeek.thursday,
|
|
23
|
+
DynamoFM_DayOfWeek.friday,
|
|
24
|
+
DynamoFM_DayOfWeek.saturday,
|
|
25
|
+
];
|
|
26
|
+
export const DynamoFM_allDaysOfWeekStupid = DynamoFM_allDaysOfWeekAmericanStyle;
|
|
27
|
+
|
|
28
|
+
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export enum DynamoFM_ErrorLevel {
|
|
5
|
-
user = 'user',
|
|
6
|
-
debug = 'debug',
|
|
7
|
-
info = 'info',
|
|
8
|
-
known = 'known',
|
|
9
|
-
|
|
10
|
-
warning = 'warning',
|
|
11
|
-
error = 'error',
|
|
12
|
-
serious = 'serious',
|
|
13
|
-
critical = 'critical',
|
|
14
|
-
|
|
15
|
-
fatal = 'fatal',
|
|
16
|
-
}
|
|
17
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export enum DynamoFM_ErrorLevel {
|
|
5
|
+
user = 'user',
|
|
6
|
+
debug = 'debug',
|
|
7
|
+
info = 'info',
|
|
8
|
+
known = 'known',
|
|
9
|
+
|
|
10
|
+
warning = 'warning',
|
|
11
|
+
error = 'error',
|
|
12
|
+
serious = 'serious',
|
|
13
|
+
critical = 'critical',
|
|
14
|
+
|
|
15
|
+
fatal = 'fatal',
|
|
16
|
+
}
|
|
17
|
+
|
package/src/_enums/index.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
// ENUMS
|
|
3
|
-
|
|
4
|
-
export * from './location';
|
|
5
|
-
export * from './time';
|
|
6
|
-
|
|
7
|
-
export * from './basic-property-type.enum';
|
|
8
|
-
export * from './data-model-type.enum';
|
|
9
|
-
export * from './error-level.enum';
|
|
10
|
-
export * from './error-level.enum';
|
|
11
|
-
export * from './log-style.enum';
|
|
12
|
-
export * from './pipe.enum';
|
|
13
|
-
export * from './range-pipe-setting.enum';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
|
|
2
|
+
// ENUMS
|
|
3
|
+
|
|
4
|
+
export * from './location';
|
|
5
|
+
export * from './time';
|
|
6
|
+
|
|
7
|
+
export * from './basic-property-type.enum';
|
|
8
|
+
export * from './data-model-type.enum';
|
|
9
|
+
export * from './error-level.enum';
|
|
10
|
+
export * from './error-level.enum';
|
|
11
|
+
export * from './log-style.enum';
|
|
12
|
+
export * from './pipe.enum';
|
|
13
|
+
export * from './range-pipe-setting.enum';
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './region.enum';
|
|
3
|
-
export * from './sub-region.enum';
|
|
1
|
+
|
|
2
|
+
export * from './region.enum';
|
|
3
|
+
export * from './sub-region.enum';
|
|
4
4
|
export * from './subdivision-region-type.enum';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export enum DynamoFM_Region {
|
|
3
|
-
europe = 'Europe',
|
|
4
|
-
asia = 'Asia',
|
|
5
|
-
africa = 'Africa',
|
|
6
|
-
oceania = 'Oceania',
|
|
7
|
-
americas = 'Americas',
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
|
|
2
|
+
export enum DynamoFM_Region {
|
|
3
|
+
europe = 'Europe',
|
|
4
|
+
asia = 'Asia',
|
|
5
|
+
africa = 'Africa',
|
|
6
|
+
oceania = 'Oceania',
|
|
7
|
+
americas = 'Americas',
|
|
8
|
+
}
|
|
9
|
+
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
export enum DynamoFM_SubRegion {
|
|
3
|
-
northernEurope = 'Northern Europe',
|
|
4
|
-
southernEurope = 'Southern Europe',
|
|
5
|
-
westernEurope = 'Western Europe',
|
|
6
|
-
easternEurope = 'Eastern Europe',
|
|
7
|
-
|
|
8
|
-
northernAfrica = 'Northern Africa',
|
|
9
|
-
subSaharanAfrica = 'Sub-Saharan Africa',
|
|
10
|
-
|
|
11
|
-
northernAmerica = 'Northern America',
|
|
12
|
-
latinAmericaAndTheCaribbean = 'Latin America and the Caribbean',
|
|
13
|
-
|
|
14
|
-
southEasternAsia = 'South-eastern Asia',
|
|
15
|
-
easternAsia = 'Eastern Asia',
|
|
16
|
-
southernAsia = 'Southern Asia',
|
|
17
|
-
|
|
18
|
-
westernAsia = 'Western Asia',
|
|
19
|
-
centralAsia = 'Central Asia',
|
|
20
|
-
|
|
21
|
-
australiaAndNewZealand = 'Australia and New Zealand',
|
|
22
|
-
melanesia = 'Melanesia',
|
|
23
|
-
micronesia = 'Micronesia',
|
|
24
|
-
polynesia = 'Polynesia',
|
|
25
|
-
}
|
|
26
|
-
|
|
1
|
+
|
|
2
|
+
export enum DynamoFM_SubRegion {
|
|
3
|
+
northernEurope = 'Northern Europe',
|
|
4
|
+
southernEurope = 'Southern Europe',
|
|
5
|
+
westernEurope = 'Western Europe',
|
|
6
|
+
easternEurope = 'Eastern Europe',
|
|
7
|
+
|
|
8
|
+
northernAfrica = 'Northern Africa',
|
|
9
|
+
subSaharanAfrica = 'Sub-Saharan Africa',
|
|
10
|
+
|
|
11
|
+
northernAmerica = 'Northern America',
|
|
12
|
+
latinAmericaAndTheCaribbean = 'Latin America and the Caribbean',
|
|
13
|
+
|
|
14
|
+
southEasternAsia = 'South-eastern Asia',
|
|
15
|
+
easternAsia = 'Eastern Asia',
|
|
16
|
+
southernAsia = 'Southern Asia',
|
|
17
|
+
|
|
18
|
+
westernAsia = 'Western Asia',
|
|
19
|
+
centralAsia = 'Central Asia',
|
|
20
|
+
|
|
21
|
+
australiaAndNewZealand = 'Australia and New Zealand',
|
|
22
|
+
melanesia = 'Melanesia',
|
|
23
|
+
micronesia = 'Micronesia',
|
|
24
|
+
polynesia = 'Polynesia',
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum DynamoFM_SubdivisionRegionType {
|
|
4
|
-
parish,
|
|
5
|
-
emirate,
|
|
6
|
-
province,
|
|
7
|
-
dependency,
|
|
8
|
-
county,
|
|
9
|
-
city,
|
|
10
|
-
region,
|
|
11
|
-
state,
|
|
12
|
-
territory,
|
|
13
|
-
autonomousRepublic,
|
|
14
|
-
municipate,
|
|
15
|
-
rayon,
|
|
16
|
-
division,
|
|
17
|
-
district,
|
|
18
|
-
governorate,
|
|
19
|
-
department,
|
|
20
|
-
specialMunicipality,
|
|
21
|
-
federalDistrict,
|
|
22
|
-
island,
|
|
23
|
-
town,
|
|
24
|
-
oblast,
|
|
25
|
-
commune,
|
|
26
|
-
prefecture,
|
|
27
|
-
economicPrefecture,
|
|
28
|
-
canton,
|
|
29
|
-
autonomousRegion,
|
|
30
|
-
specialAdministrativeRegion,
|
|
31
|
-
capitalDistrict,
|
|
32
|
-
geographicalRegion,
|
|
33
|
-
capitalCity,
|
|
34
|
-
ruralMunicipality,
|
|
35
|
-
urbanMunicipality,
|
|
36
|
-
autonomousCommunity,
|
|
37
|
-
autonomousCity,
|
|
38
|
-
administration,
|
|
39
|
-
regionalState,
|
|
40
|
-
metropolitanRegion,
|
|
41
|
-
overseasCollectivity,
|
|
42
|
-
// ... reduce specials // non-finished
|
|
43
|
-
}
|
|
44
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum DynamoFM_SubdivisionRegionType {
|
|
4
|
+
parish,
|
|
5
|
+
emirate,
|
|
6
|
+
province,
|
|
7
|
+
dependency,
|
|
8
|
+
county,
|
|
9
|
+
city,
|
|
10
|
+
region,
|
|
11
|
+
state,
|
|
12
|
+
territory,
|
|
13
|
+
autonomousRepublic,
|
|
14
|
+
municipate,
|
|
15
|
+
rayon,
|
|
16
|
+
division,
|
|
17
|
+
district,
|
|
18
|
+
governorate,
|
|
19
|
+
department,
|
|
20
|
+
specialMunicipality,
|
|
21
|
+
federalDistrict,
|
|
22
|
+
island,
|
|
23
|
+
town,
|
|
24
|
+
oblast,
|
|
25
|
+
commune,
|
|
26
|
+
prefecture,
|
|
27
|
+
economicPrefecture,
|
|
28
|
+
canton,
|
|
29
|
+
autonomousRegion,
|
|
30
|
+
specialAdministrativeRegion,
|
|
31
|
+
capitalDistrict,
|
|
32
|
+
geographicalRegion,
|
|
33
|
+
capitalCity,
|
|
34
|
+
ruralMunicipality,
|
|
35
|
+
urbanMunicipality,
|
|
36
|
+
autonomousCommunity,
|
|
37
|
+
autonomousCity,
|
|
38
|
+
administration,
|
|
39
|
+
regionalState,
|
|
40
|
+
metropolitanRegion,
|
|
41
|
+
overseasCollectivity,
|
|
42
|
+
// ... reduce specials // non-finished
|
|
43
|
+
}
|
|
44
|
+
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum DynamoFM_LogStyle {
|
|
4
|
-
reset = '\x1b[0m',
|
|
5
|
-
|
|
6
|
-
bright = '\x1b[1m',
|
|
7
|
-
dim = '\x1b[2m',
|
|
8
|
-
underline = '\x1b[4m',
|
|
9
|
-
blink = '\x1b[5m',
|
|
10
|
-
reverse = '\x1b[7m',
|
|
11
|
-
hidden = '\x1b[8m',
|
|
12
|
-
|
|
13
|
-
black = '\x1b[30m',
|
|
14
|
-
red = '\x1b[31m',
|
|
15
|
-
green = '\x1b[32m',
|
|
16
|
-
yellow = '\x1b[33m',
|
|
17
|
-
blue = '\x1b[34m',
|
|
18
|
-
magenta = '\x1b[35m',
|
|
19
|
-
cyan = '\x1b[36m',
|
|
20
|
-
white = '\x1b[37m',
|
|
21
|
-
|
|
22
|
-
BgBlack = '\x1b[40m',
|
|
23
|
-
BgRed = '\x1b[41m',
|
|
24
|
-
BgGreen = '\x1b[42m',
|
|
25
|
-
BgYellow = '\x1b[43m',
|
|
26
|
-
BgBlue = '\x1b[44m',
|
|
27
|
-
BgMagenta = '\x1b[45m',
|
|
28
|
-
BgCyan = '\x1b[46m',
|
|
29
|
-
BgWhite = '\x1b[47m',
|
|
30
|
-
}
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export enum DynamoFM_LogStyle {
|
|
4
|
+
reset = '\x1b[0m',
|
|
5
|
+
|
|
6
|
+
bright = '\x1b[1m',
|
|
7
|
+
dim = '\x1b[2m',
|
|
8
|
+
underline = '\x1b[4m',
|
|
9
|
+
blink = '\x1b[5m',
|
|
10
|
+
reverse = '\x1b[7m',
|
|
11
|
+
hidden = '\x1b[8m',
|
|
12
|
+
|
|
13
|
+
black = '\x1b[30m',
|
|
14
|
+
red = '\x1b[31m',
|
|
15
|
+
green = '\x1b[32m',
|
|
16
|
+
yellow = '\x1b[33m',
|
|
17
|
+
blue = '\x1b[34m',
|
|
18
|
+
magenta = '\x1b[35m',
|
|
19
|
+
cyan = '\x1b[36m',
|
|
20
|
+
white = '\x1b[37m',
|
|
21
|
+
|
|
22
|
+
BgBlack = '\x1b[40m',
|
|
23
|
+
BgRed = '\x1b[41m',
|
|
24
|
+
BgGreen = '\x1b[42m',
|
|
25
|
+
BgYellow = '\x1b[43m',
|
|
26
|
+
BgBlue = '\x1b[44m',
|
|
27
|
+
BgMagenta = '\x1b[45m',
|
|
28
|
+
BgCyan = '\x1b[46m',
|
|
29
|
+
BgWhite = '\x1b[47m',
|
|
30
|
+
}
|