@futdevpro/fsm-dynamo 1.9.51 → 1.10.2
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 +3 -3
- package/build/_collections/utils/array.util.d.ts +1 -7
- package/build/_collections/utils/array.util.d.ts.map +1 -1
- package/build/_collections/utils/array.util.js +0 -31
- package/build/_collections/utils/array.util.js.map +1 -1
- package/build/_collections/utils/array.util.spec.js +0 -35
- package/build/_collections/utils/array.util.spec.js.map +1 -1
- package/build/_collections/utils/log.util.d.ts +1 -0
- package/build/_collections/utils/log.util.d.ts.map +1 -1
- package/build/_collections/utils/log.util.js +3 -0
- package/build/_collections/utils/log.util.js.map +1 -1
- package/build/_collections/utils/log.util.spec.d.ts +2 -0
- package/build/_collections/utils/log.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/log.util.spec.js +85 -0
- package/build/_collections/utils/log.util.spec.js.map +1 -0
- package/build/_collections/utils/math/box-bounds.util.spec.d.ts +2 -0
- package/build/_collections/utils/math/box-bounds.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/math/box-bounds.util.spec.js +53 -0
- package/build/_collections/utils/math/box-bounds.util.spec.js.map +1 -0
- package/build/_collections/utils/math/math.util.spec.d.ts +2 -0
- package/build/_collections/utils/math/math.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/math/math.util.spec.js +89 -0
- package/build/_collections/utils/math/math.util.spec.js.map +1 -0
- package/build/_collections/utils/math/random.util.spec.d.ts +2 -0
- package/build/_collections/utils/math/random.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/math/random.util.spec.js +75 -0
- package/build/_collections/utils/math/random.util.spec.js.map +1 -0
- package/build/_collections/utils/math/trigonometry.util.spec.d.ts +2 -0
- package/build/_collections/utils/math/trigonometry.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/math/trigonometry.util.spec.js +49 -0
- package/build/_collections/utils/math/trigonometry.util.spec.js.map +1 -0
- package/build/_collections/utils/math/vector2.util.spec.d.ts +2 -0
- package/build/_collections/utils/math/vector2.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/math/vector2.util.spec.js +82 -0
- package/build/_collections/utils/math/vector2.util.spec.js.map +1 -0
- package/build/_collections/utils/regex/password-regex.util.spec.d.ts +2 -0
- package/build/_collections/utils/regex/password-regex.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/regex/password-regex.util.spec.js +44 -0
- package/build/_collections/utils/regex/password-regex.util.spec.js.map +1 -0
- package/build/_collections/utils/regex/regex.util.spec.d.ts +2 -0
- package/build/_collections/utils/regex/regex.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/regex/regex.util.spec.js +40 -0
- package/build/_collections/utils/regex/regex.util.spec.js.map +1 -0
- package/build/_collections/utils/regex/username-regex.util.spec.d.ts +2 -0
- package/build/_collections/utils/regex/username-regex.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/regex/username-regex.util.spec.js +59 -0
- package/build/_collections/utils/regex/username-regex.util.spec.js.map +1 -0
- package/build/_collections/utils/round-list.util.d.ts.map +1 -1
- package/build/_collections/utils/round-list.util.js +1 -1
- package/build/_collections/utils/round-list.util.js.map +1 -1
- package/build/_collections/utils/round-list.util.spec.d.ts +2 -0
- package/build/_collections/utils/round-list.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/round-list.util.spec.js +65 -0
- package/build/_collections/utils/round-list.util.spec.js.map +1 -0
- package/build/_collections/utils/shared.util.spec.d.ts +2 -0
- package/build/_collections/utils/shared.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/shared.util.spec.js +113 -0
- package/build/_collections/utils/shared.util.spec.js.map +1 -0
- package/build/_collections/utils/string.util.d.ts +5 -0
- package/build/_collections/utils/string.util.d.ts.map +1 -0
- package/build/_collections/utils/string.util.js +11 -0
- package/build/_collections/utils/string.util.js.map +1 -0
- package/build/_collections/utils/string.util.spec.d.ts +2 -0
- package/build/_collections/utils/string.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/string.util.spec.js +36 -0
- package/build/_collections/utils/string.util.spec.js.map +1 -0
- package/build/_collections/utils/type-cloning-facility.util.spec.d.ts +2 -0
- package/build/_collections/utils/type-cloning-facility.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/type-cloning-facility.util.spec.js +41 -0
- package/build/_collections/utils/type-cloning-facility.util.spec.js.map +1 -0
- package/build/_collections/utils/utilities.util.d.ts +0 -8
- package/build/_collections/utils/utilities.util.d.ts.map +1 -1
- package/build/_collections/utils/utilities.util.js +0 -8
- package/build/_collections/utils/utilities.util.js.map +1 -1
- package/build/_collections/utils/utilities.util.spec.d.ts +2 -0
- package/build/_collections/utils/utilities.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/utilities.util.spec.js +145 -0
- package/build/_collections/utils/utilities.util.spec.js.map +1 -0
- package/build/_collections/utils/uuid.util.d.ts +0 -1
- package/build/_collections/utils/uuid.util.d.ts.map +1 -1
- package/build/_collections/utils/uuid.util.js +1 -1
- package/build/_collections/utils/uuid.util.js.map +1 -1
- package/build/_collections/utils/uuid.util.spec.d.ts +2 -0
- package/build/_collections/utils/uuid.util.spec.d.ts.map +1 -0
- package/build/_collections/utils/uuid.util.spec.js +29 -0
- package/build/_collections/utils/uuid.util.spec.js.map +1 -0
- package/build/_models/control-models/data-model-params.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/data-model-params.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/data-model-params.control-model.spec.js +53 -0
- package/build/_models/control-models/data-model-params.control-model.spec.js.map +1 -0
- package/build/_models/control-models/data-property-params.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/data-property-params.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/data-property-params.control-model.spec.js +83 -0
- package/build/_models/control-models/data-property-params.control-model.spec.js.map +1 -0
- package/build/_models/control-models/poll.control-model.d.ts +7 -7
- package/build/_models/control-models/poll.control-model.d.ts.map +1 -1
- package/build/_models/control-models/poll.control-model.js.map +1 -1
- package/build/_models/control-models/poll.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/poll.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/poll.control-model.spec.js +57 -0
- package/build/_models/control-models/poll.control-model.spec.js.map +1 -0
- package/build/_models/control-models/range-value.control-model.spec.d.ts +2 -0
- package/build/_models/control-models/range-value.control-model.spec.d.ts.map +1 -0
- package/build/_models/control-models/range-value.control-model.spec.js +163 -0
- package/build/_models/control-models/range-value.control-model.spec.js.map +1 -0
- package/build/_models/data-models/metadata.data-model.spec.d.ts +2 -0
- package/build/_models/data-models/metadata.data-model.spec.d.ts.map +1 -0
- package/build/_models/data-models/metadata.data-model.spec.js +102 -0
- package/build/_models/data-models/metadata.data-model.spec.js.map +1 -0
- package/build/_models/interfaces/search-query.interface.d.ts +2 -2
- package/build/_models/interfaces/search-query.interface.d.ts.map +1 -1
- package/build/_models/interfaces/search-result.interface.d.ts +5 -0
- package/build/_models/interfaces/search-result.interface.d.ts.map +1 -0
- package/build/_models/interfaces/search-result.interface.js +3 -0
- package/build/_models/interfaces/search-result.interface.js.map +1 -0
- package/build/_modules/custom-data/_models/cud.data-model.spec.d.ts +2 -0
- package/build/_modules/custom-data/_models/cud.data-model.spec.d.ts.map +1 -0
- package/build/_modules/custom-data/_models/cud.data-model.spec.js +34 -0
- package/build/_modules/custom-data/_models/cud.data-model.spec.js.map +1 -0
- package/build/_modules/location/_collections/loc-regions.util.spec.d.ts +2 -0
- package/build/_modules/location/_collections/loc-regions.util.spec.d.ts.map +1 -0
- package/build/_modules/location/_collections/loc-regions.util.spec.js +51 -0
- package/build/_modules/location/_collections/loc-regions.util.spec.js.map +1 -0
- package/build/_modules/location/_collections/loc.util.spec.d.ts +2 -0
- package/build/_modules/location/_collections/loc.util.spec.d.ts.map +1 -0
- package/build/_modules/location/_collections/loc.util.spec.js +39 -0
- package/build/_modules/location/_collections/loc.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.js +33 -0
- package/build/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.js +36 -0
- package/build/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.js +35 -0
- package/build/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.js +31 -0
- package/build/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.js +54 -0
- package/build/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.js +26 -0
- package/build/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.js +50 -0
- package/build/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.js +23 -0
- package/build/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.js +38 -0
- package/build/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.js +20 -0
- package/build/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.js.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.d.ts +2 -0
- package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.d.ts.map +1 -0
- package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.js +49 -0
- package/build/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.js.map +1 -0
- package/build/_modules/socket/_models/sck-client-params.control-model.spec.d.ts +2 -0
- package/build/_modules/socket/_models/sck-client-params.control-model.spec.d.ts.map +1 -0
- package/build/_modules/socket/_models/sck-client-params.control-model.spec.js +54 -0
- package/build/_modules/socket/_models/sck-client-params.control-model.spec.js.map +1 -0
- package/build/_modules/socket/_models/sck-socket-event.control-model.d.ts +1 -1
- package/build/_modules/socket/_models/sck-socket-event.control-model.d.ts.map +1 -1
- package/build/_modules/socket/_models/sck-socket-event.control-model.js +2 -2
- package/build/_modules/socket/_models/sck-socket-event.control-model.js.map +1 -1
- package/build/_modules/socket/_models/sck-socket-event.control-model.spec.d.ts +2 -0
- package/build/_modules/socket/_models/sck-socket-event.control-model.spec.d.ts.map +1 -0
- package/build/_modules/socket/_models/sck-socket-event.control-model.spec.js +49 -0
- package/build/_modules/socket/_models/sck-socket-event.control-model.spec.js.map +1 -0
- package/build/_modules/socket/_services/sck-client.service-base.d.ts +3 -3
- package/build/_modules/socket/_services/sck-client.service-base.d.ts.map +1 -1
- package/build/_modules/socket/_services/sck-client.service-base.js +3 -3
- package/build/_modules/socket/_services/sck-client.service-base.js.map +1 -1
- package/build/_modules/socket/_services/sck-client.service-base.spec.d.ts +2 -0
- package/build/_modules/socket/_services/sck-client.service-base.spec.d.ts.map +1 -0
- package/build/_modules/socket/_services/sck-client.service-base.spec.js +82 -0
- package/build/_modules/socket/_services/sck-client.service-base.spec.js.map +1 -0
- package/build/_modules/usage/_models/usg-action.control-model.spec.d.ts +2 -0
- package/build/_modules/usage/_models/usg-action.control-model.spec.d.ts.map +1 -0
- package/build/_modules/usage/_models/usg-action.control-model.spec.js +24 -0
- package/build/_modules/usage/_models/usg-action.control-model.spec.js.map +1 -0
- package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.d.ts +2 -0
- package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.d.ts.map +1 -0
- package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.js +33 -0
- package/build/_modules/usage/_models/usg-daily-usage-data.control-model.spec.js.map +1 -0
- package/build/_modules/usage/_models/usg-data.control-model.spec.d.ts +2 -0
- package/build/_modules/usage/_models/usg-data.control-model.spec.d.ts.map +1 -0
- package/build/_modules/usage/_models/usg-data.control-model.spec.js +37 -0
- package/build/_modules/usage/_models/usg-data.control-model.spec.js.map +1 -0
- package/build/_modules/usage/_models/usg-session.data-model.spec.d.ts +2 -0
- package/build/_modules/usage/_models/usg-session.data-model.spec.d.ts.map +1 -0
- package/build/_modules/usage/_models/usg-session.data-model.spec.js +66 -0
- package/build/_modules/usage/_models/usg-session.data-model.spec.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/futdevpro-fsm-dynamo-01.10.02.tgz +0 -0
- package/package.json +11 -23
- package/src/_collections/utils/array.util.spec.ts +0 -45
- package/src/_collections/utils/array.util.ts +2 -45
- package/src/_collections/utils/log.util.spec.ts +99 -0
- package/src/_collections/utils/log.util.ts +4 -0
- package/src/_collections/utils/math/box-bounds.util.spec.ts +63 -0
- package/src/_collections/utils/math/math.util.spec.ts +104 -0
- package/src/_collections/utils/math/random.util.spec.ts +82 -0
- package/src/_collections/utils/math/trigonometry.util.spec.ts +57 -0
- package/src/_collections/utils/math/vector2.util.spec.ts +94 -0
- package/src/_collections/utils/regex/password-regex.util.spec.ts +51 -0
- package/src/_collections/utils/regex/regex.util.spec.ts +42 -0
- package/src/_collections/utils/regex/username-regex.util.spec.ts +61 -0
- package/src/_collections/utils/round-list.util.spec.ts +79 -0
- package/src/_collections/utils/round-list.util.ts +46 -1
- package/src/_collections/utils/shared.util.spec.ts +143 -0
- package/src/_collections/utils/string.util.spec.ts +41 -0
- package/src/_collections/utils/string.util.ts +10 -0
- package/src/_collections/utils/type-cloning-facility.util.spec.ts +51 -0
- package/src/_collections/utils/utilities.util.spec.ts +166 -0
- package/src/_collections/utils/utilities.util.ts +1 -12
- package/src/_collections/utils/uuid.util.spec.ts +30 -0
- package/src/_collections/utils/uuid.util.ts +14 -1
- package/src/_models/control-models/data-model-params.control-model.spec.ts +67 -0
- package/src/_models/control-models/data-property-params.control-model.spec.ts +109 -0
- package/src/_models/control-models/poll.control-model.spec.ts +63 -0
- package/src/_models/control-models/poll.control-model.ts +8 -7
- package/src/_models/control-models/range-value.control-model.spec.ts +187 -0
- package/src/_models/data-models/metadata.data-model.spec.ts +123 -0
- package/src/_models/interfaces/search-query.interface.ts +2 -2
- package/src/_models/interfaces/search-result.interface.ts +6 -0
- package/src/_modules/custom-data/_models/cud.data-model.spec.ts +38 -0
- package/src/_modules/location/_collections/loc-regions.util.spec.ts +61 -0
- package/src/_modules/location/_collections/loc.util.spec.ts +52 -0
- package/src/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.ts +47 -0
- package/src/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.ts +39 -0
- package/src/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.ts +41 -0
- package/src/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.ts +34 -0
- package/src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.ts +60 -0
- package/src/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.ts +28 -0
- package/src/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.ts +59 -0
- package/src/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.ts +31 -0
- package/src/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.ts +44 -0
- package/src/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.ts +21 -0
- package/src/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.ts +61 -0
- package/src/_modules/socket/_models/sck-client-params.control-model.spec.ts +67 -0
- package/src/_modules/socket/_models/sck-socket-event.control-model.spec.ts +66 -0
- package/src/_modules/socket/_models/sck-socket-event.control-model.ts +2 -2
- package/src/_modules/socket/_services/sck-client.service-base.spec.ts +99 -0
- package/src/_modules/socket/_services/sck-client.service-base.ts +7 -7
- package/src/_modules/usage/_models/usg-action.control-model.spec.ts +27 -0
- package/src/_modules/usage/_models/usg-daily-usage-data.control-model.spec.ts +36 -0
- package/src/_modules/usage/_models/usg-data.control-model.spec.ts +41 -0
- package/src/_modules/usage/_models/usg-session.data-model.spec.ts +73 -0
- package/src/index.ts +1 -0
- package/futdevpro-fsm-dynamo-01.09.51.tgz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cud.data-model.spec.d.ts","sourceRoot":"","sources":["../../../../src/_modules/custom-data/_models/cud.data-model.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cud_data_model_1 = require("./cud.data-model");
|
|
4
|
+
const data_model_params_control_model_1 = require("../../../_models/control-models/data-model-params.control-model");
|
|
5
|
+
describe('DyFM_CustomData', () => {
|
|
6
|
+
it('should create an instance without initial data', () => {
|
|
7
|
+
const instance = new cud_data_model_1.DyFM_CustomData();
|
|
8
|
+
expect(instance).toBeTruthy();
|
|
9
|
+
expect(instance.data).toBeUndefined();
|
|
10
|
+
});
|
|
11
|
+
it('should create an instance with initial data', () => {
|
|
12
|
+
const initialData = { data: 'testData' };
|
|
13
|
+
const instance = new cud_data_model_1.DyFM_CustomData(initialData);
|
|
14
|
+
expect(instance).toBeTruthy();
|
|
15
|
+
expect(instance.data).toEqual('testData');
|
|
16
|
+
});
|
|
17
|
+
it('should assign properties from the set parameter', () => {
|
|
18
|
+
const initialData = { data: 'testData' };
|
|
19
|
+
const instance = new cud_data_model_1.DyFM_CustomData(initialData);
|
|
20
|
+
expect(instance.data).toEqual(initialData.data);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
describe('DyFM_customData_dataParams', () => {
|
|
24
|
+
it('should have correct dataName and properties', () => {
|
|
25
|
+
expect(cud_data_model_1.DyFM_customData_dataParams.dataName).toEqual('customData');
|
|
26
|
+
expect(cud_data_model_1.DyFM_customData_dataParams.properties).toEqual({
|
|
27
|
+
data: { key: 'data', type: 'string', required: true },
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
it('should be an instance of DyFM_DataModel_Params', () => {
|
|
31
|
+
expect(cud_data_model_1.DyFM_customData_dataParams).toBeInstanceOf(data_model_params_control_model_1.DyFM_DataModel_Params);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=cud.data-model.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cud.data-model.spec.js","sourceRoot":"","sources":["../../../../src/_modules/custom-data/_models/cud.data-model.spec.ts"],"names":[],"mappings":";;AACA,qDAA+E;AAC/E,qHAAwG;AAGxG,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,QAAQ,GAAG,IAAI,gCAAe,EAAE,CAAC;QACvC,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,CAAC;QAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,IAAI,gCAAe,CAAC,WAAW,CAAC,CAAC;QAClD,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,CAAC;QAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,IAAI,gCAAe,CAAC,WAAW,CAAC,CAAC;QAClD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,CAAC,2CAA0B,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAClE,MAAM,CAAC,2CAA0B,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;YACpD,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;SACtD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,CAAC,2CAA0B,CAAC,CAAC,cAAc,CAAC,uDAAqB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loc-regions.util.spec.d.ts","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const loc_regions_util_1 = require("./loc-regions.util");
|
|
4
|
+
describe('DyFM_Regions', () => {
|
|
5
|
+
it('should get all country ISOs', () => {
|
|
6
|
+
const countryISOs = loc_regions_util_1.DyFM_Regions.countryISOs;
|
|
7
|
+
expect(countryISOs).toBeDefined();
|
|
8
|
+
expect(countryISOs.length).toBeGreaterThan(0);
|
|
9
|
+
});
|
|
10
|
+
it('should get all phone codes', () => {
|
|
11
|
+
const phoneCodes = loc_regions_util_1.DyFM_Regions.phoneCodes;
|
|
12
|
+
expect(phoneCodes).toBeDefined();
|
|
13
|
+
expect(phoneCodes.length).toBeGreaterThan(0);
|
|
14
|
+
});
|
|
15
|
+
it('should get all divisions', () => {
|
|
16
|
+
const divisions = loc_regions_util_1.DyFM_Regions.divisions;
|
|
17
|
+
expect(divisions).toBeDefined();
|
|
18
|
+
expect(divisions.length).toBeGreaterThan(0);
|
|
19
|
+
});
|
|
20
|
+
it('should convert ISO to country ISO', () => {
|
|
21
|
+
const iso2 = 'US';
|
|
22
|
+
const countryISO = loc_regions_util_1.DyFM_Regions.isoToCountryIso(iso2);
|
|
23
|
+
expect(countryISO).toBeDefined();
|
|
24
|
+
expect(countryISO.iso2).toBe(iso2);
|
|
25
|
+
});
|
|
26
|
+
/* it('should throw error if ISO not found in isoToCountryIso', () => {
|
|
27
|
+
const iso2 = 'XX';
|
|
28
|
+
expect(() => DyFM_Regions.isoToCountryIso(iso2)).toThrowError(DyFM_Error);
|
|
29
|
+
});
|
|
30
|
+
*/
|
|
31
|
+
it('should convert ISO to region', () => {
|
|
32
|
+
const iso2 = 'US';
|
|
33
|
+
const region = loc_regions_util_1.DyFM_Regions.isoToRegion(iso2);
|
|
34
|
+
expect(region).toBeDefined();
|
|
35
|
+
});
|
|
36
|
+
/* it('should throw error if ISO not found in isoToRegion', () => {
|
|
37
|
+
const iso2 = 'XX';
|
|
38
|
+
expect(() => DyFM_Regions.isoToRegion(iso2)).toThrowError(DyFM_Error);
|
|
39
|
+
}); */
|
|
40
|
+
it('should convert ISO to phone code', () => {
|
|
41
|
+
const iso2 = 'US';
|
|
42
|
+
const phoneCode = loc_regions_util_1.DyFM_Regions.isoToPhoneCode(iso2);
|
|
43
|
+
expect(phoneCode).toBeDefined();
|
|
44
|
+
expect(phoneCode.iso).toBe(iso2);
|
|
45
|
+
});
|
|
46
|
+
/* it('should throw error if ISO not found in isoToPhoneCode', () => {
|
|
47
|
+
const iso2 = 'XX';
|
|
48
|
+
expect(() => DyFM_Regions.isoToPhoneCode(iso2)).toThrowError(DyFM_Error);
|
|
49
|
+
}); */
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=loc-regions.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loc-regions.util.spec.js","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.spec.ts"],"names":[],"mappings":";;AAKA,yDAAkD;AAElD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,WAAW,GAAsB,+BAAY,CAAC,WAAW,CAAC;QAChE,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC;QAClC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,UAAU,GAA4B,+BAAY,CAAC,UAAU,CAAC;QACpE,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACjC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,SAAS,GAA2B,+BAAY,CAAC,SAAS,CAAC;QACjE,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QAChC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,MAAM,UAAU,GAAoB,+BAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACjC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH;;;;KAIC;IACD,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,MAAM,MAAM,GAAgB,+BAAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3D,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH;;;UAGM;IAEN,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,MAAM,SAAS,GAA0B,+BAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC3E,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QAChC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH;;;UAGM;AACR,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loc.util.spec.d.ts","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const loc_util_1 = require("./loc.util");
|
|
4
|
+
describe('DyFM_Location', () => {
|
|
5
|
+
describe('getDistanceInKilometres', () => {
|
|
6
|
+
xit('should calculate the correct distance between two coordinates', () => {
|
|
7
|
+
const from = { latitude: 52.5200, longitude: 13.4050 }; // Berlin
|
|
8
|
+
const to = { latitude: 48.8566, longitude: 2.3522 }; // Paris
|
|
9
|
+
const distance = loc_util_1.DyFM_Location.getDistanceInKilometres(from, to);
|
|
10
|
+
expect(distance).toBeCloseTo(878.7, 1); // Approximate distance in km
|
|
11
|
+
});
|
|
12
|
+
it('should return 0 when the coordinates are the same', () => {
|
|
13
|
+
const from = { latitude: 52.5200, longitude: 13.4050 };
|
|
14
|
+
const distance = loc_util_1.DyFM_Location.getDistanceInKilometres(from, from);
|
|
15
|
+
expect(distance).toBe(0);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
describe('getLocationDegByKilometers', () => {
|
|
19
|
+
it('should calculate the correct degree change for latitude', () => {
|
|
20
|
+
const distanceInKm = 110.574; // 1 degree of latitude
|
|
21
|
+
const degreeChange = loc_util_1.DyFM_Location.getLocationDegByKilometers('latitude', distanceInKm);
|
|
22
|
+
expect(degreeChange).toBeCloseTo(1, 5);
|
|
23
|
+
});
|
|
24
|
+
xit('should calculate the correct degree change for longitude', () => {
|
|
25
|
+
const distanceInKm = 111.320; // Approximate 1 degree of longitude at the equator
|
|
26
|
+
const latitude = 0; // Equator
|
|
27
|
+
const degreeChange = loc_util_1.DyFM_Location.getLocationDegByKilometers('longitude', distanceInKm, latitude);
|
|
28
|
+
expect(degreeChange).toBeCloseTo(1, 5);
|
|
29
|
+
});
|
|
30
|
+
/* it('should throw an error when calculating longitude without latitude', () => {
|
|
31
|
+
const distanceInKm = 111.320;
|
|
32
|
+
|
|
33
|
+
expect(() => {
|
|
34
|
+
DyFM_Location.getLocationDegByKilometers('longitude', distanceInKm);
|
|
35
|
+
}).toThrowError(DyFM_Error);
|
|
36
|
+
}); */
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=loc.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loc.util.spec.js","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc.util.spec.ts"],"names":[],"mappings":";;AAEA,yCAA2C;AAE3C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAE7B,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,GAAG,CAAC,+DAA+D,EAAE,GAAG,EAAE;YACxE,MAAM,IAAI,GAA6B,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE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AAM,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH;;;;;;cAMM;IACR,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-country-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_country_pipe_util_1 = require("./pip-country-pipe.util");
|
|
4
|
+
const loc_country_isos_const_1 = require("../../../location/_collections/loc-country-isos.const");
|
|
5
|
+
describe('DyFM_country_pipeTransform', () => {
|
|
6
|
+
it('should return the country name when a valid ISO code is provided', () => {
|
|
7
|
+
const validISO = loc_country_isos_const_1.DyFM_countryISOs[0].iso2;
|
|
8
|
+
const expectedName = loc_country_isos_const_1.DyFM_countryISOs[0].name;
|
|
9
|
+
const result = (0, pip_country_pipe_util_1.DyFM_country_pipeTransform)(validISO);
|
|
10
|
+
expect(result).toBe(expectedName);
|
|
11
|
+
});
|
|
12
|
+
it('should return the input ISO code when an invalid ISO code is provided', () => {
|
|
13
|
+
const invalidISO = 'ZZ';
|
|
14
|
+
const result = (0, pip_country_pipe_util_1.DyFM_country_pipeTransform)(invalidISO);
|
|
15
|
+
expect(result).toBe(invalidISO);
|
|
16
|
+
});
|
|
17
|
+
it('should return the input ISO code when an empty string is provided', () => {
|
|
18
|
+
const emptyISO = '';
|
|
19
|
+
const result = (0, pip_country_pipe_util_1.DyFM_country_pipeTransform)(emptyISO);
|
|
20
|
+
expect(result).toBe(emptyISO);
|
|
21
|
+
});
|
|
22
|
+
it('should return the input ISO code when a null value is provided', () => {
|
|
23
|
+
const nullISO = null;
|
|
24
|
+
const result = (0, pip_country_pipe_util_1.DyFM_country_pipeTransform)(nullISO);
|
|
25
|
+
expect(result).toBe(nullISO);
|
|
26
|
+
});
|
|
27
|
+
it('should return the input ISO code when an undefined value is provided', () => {
|
|
28
|
+
const undefinedISO = undefined;
|
|
29
|
+
const result = (0, pip_country_pipe_util_1.DyFM_country_pipeTransform)(undefinedISO);
|
|
30
|
+
expect(result).toBe(undefinedISO);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=pip-country-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-country-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.ts"],"names":[],"mappings":";;AACA,mEAAqE;AACrE,kGAAyF;AAGzF,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC1E,MAAM,QAAQ,GAAW,yCAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAClD,MAAM,YAAY,GAAW,yCAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAEtD,MAAM,MAAM,GAAW,IAAA,kDAA0B,EAAC,QAAQ,CAAC,CAAC;QAE5D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;QAC/E,MAAM,UAAU,GAAW,IAAI,CAAC;QAEhC,MAAM,MAAM,GAAW,IAAA,kDAA0B,EAAC,UAAU,CAAC,CAAC;QAE9D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC3E,MAAM,QAAQ,GAAW,EAAE,CAAC;QAE5B,MAAM,MAAM,GAAW,IAAA,kDAA0B,EAAC,QAAQ,CAAC,CAAC;QAE5D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,OAAO,GAAW,IAAyB,CAAC;QAElD,MAAM,MAAM,GAAW,IAAA,kDAA0B,EAAC,OAAO,CAAC,CAAC;QAE3D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,YAAY,GAAW,SAA8B,CAAC;QAE5D,MAAM,MAAM,GAAW,IAAA,kDAA0B,EAAC,YAAY,CAAC,CAAC;QAEhE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-custom-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_custom_pipe_util_1 = require("./pip-custom-pipe.util");
|
|
4
|
+
describe('DyFM_custom_pipeTransform', () => {
|
|
5
|
+
it('should apply the custom transform function to the input value', () => {
|
|
6
|
+
const input = 5;
|
|
7
|
+
const transformFunction = (x) => x * 2;
|
|
8
|
+
const result = (0, pip_custom_pipe_util_1.DyFM_custom_pipeTransform)(input, transformFunction);
|
|
9
|
+
expect(result).toBe(10);
|
|
10
|
+
});
|
|
11
|
+
it('should handle string transformations correctly', () => {
|
|
12
|
+
const input = 'hello';
|
|
13
|
+
const transformFunction = (x) => x.toUpperCase();
|
|
14
|
+
const result = (0, pip_custom_pipe_util_1.DyFM_custom_pipeTransform)(input, transformFunction);
|
|
15
|
+
expect(result).toBe('HELLO');
|
|
16
|
+
});
|
|
17
|
+
it('should handle object transformations correctly', () => {
|
|
18
|
+
const input = { name: 'Alice', age: 30 };
|
|
19
|
+
const transformFunction = (x) => ({ ...x, age: x.age + 1 });
|
|
20
|
+
const result = (0, pip_custom_pipe_util_1.DyFM_custom_pipeTransform)(input, transformFunction);
|
|
21
|
+
expect(result).toEqual({ name: 'Alice', age: 31 });
|
|
22
|
+
});
|
|
23
|
+
it('should handle array transformations correctly', () => {
|
|
24
|
+
const input = [1, 2, 3];
|
|
25
|
+
const transformFunction = (x) => x.map(num => num * 2);
|
|
26
|
+
const result = (0, pip_custom_pipe_util_1.DyFM_custom_pipeTransform)(input, transformFunction);
|
|
27
|
+
expect(result).toEqual([2, 4, 6]);
|
|
28
|
+
});
|
|
29
|
+
it('should return undefined if the transform function returns undefined', () => {
|
|
30
|
+
const input = 'test';
|
|
31
|
+
const transformFunction = (x) => undefined;
|
|
32
|
+
const result = (0, pip_custom_pipe_util_1.DyFM_custom_pipeTransform)(input, transformFunction);
|
|
33
|
+
expect(result).toBeUndefined();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=pip-custom-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-custom-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.ts"],"names":[],"mappings":";;AACA,iEAAmE;AAEnE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,KAAK,GAAG,CAAC,CAAC;QAChB,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,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AAM,MAAM,GAAG,IAAA,gDAAyB,EAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;QACnE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;QAC7E,MAAM,KAAK,GAAG,MAAM,CAAC;QACrB,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,SAAS,CAAC;QACnD,MAAM,MAAM,GAAG,IAAA,gDAAyB,EAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;QACnE,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-division-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_division_pipe_util_1 = require("./pip-division-pipe.util");
|
|
4
|
+
const loc_country_divisions_const_1 = require("../../../location/_collections/loc-country-divisions.const");
|
|
5
|
+
describe('DyFM_division_pipeTransform', () => {
|
|
6
|
+
const mockCountryDivisions = [
|
|
7
|
+
{ code: 'CA', iso: 'US', name: 'California' },
|
|
8
|
+
{ code: 'TX', iso: 'US', name: 'Texas' },
|
|
9
|
+
{ code: 'ON', iso: 'CA', name: 'Ontario' }
|
|
10
|
+
];
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
loc_country_divisions_const_1.DyFM_countryDivisions = mockCountryDivisions;
|
|
13
|
+
});
|
|
14
|
+
it('should return the name of the division when a matching division code and country ISO are found', () => {
|
|
15
|
+
const result = (0, pip_division_pipe_util_1.DyFM_division_pipeTransform)('CA', 'US');
|
|
16
|
+
expect(result).toBe('California');
|
|
17
|
+
});
|
|
18
|
+
it('should return the division code when no matching division is found', () => {
|
|
19
|
+
const result = (0, pip_division_pipe_util_1.DyFM_division_pipeTransform)('NY', 'US');
|
|
20
|
+
expect(result).toBe('NY');
|
|
21
|
+
});
|
|
22
|
+
it('should return the division code when the country ISO does not match', () => {
|
|
23
|
+
const result = (0, pip_division_pipe_util_1.DyFM_division_pipeTransform)('CA', 'CA');
|
|
24
|
+
expect(result).toBe('CA');
|
|
25
|
+
});
|
|
26
|
+
it('should return the division code when the division code is not found', () => {
|
|
27
|
+
const result = (0, pip_division_pipe_util_1.DyFM_division_pipeTransform)('BC', 'CA');
|
|
28
|
+
expect(result).toBe('BC');
|
|
29
|
+
});
|
|
30
|
+
it('should handle empty division code and country ISO gracefully', () => {
|
|
31
|
+
const result = (0, pip_division_pipe_util_1.DyFM_division_pipeTransform)('', '');
|
|
32
|
+
expect(result).toBe('');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=pip-division-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-division-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.ts"],"names":[],"mappings":";;AACA,qEAAuE;AAEvE,4GAAmG;AAEnG,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,MAAM,oBAAoB,GAA2B;QACnD,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE;QAC7C,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;QACxC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;KAC3C,CAAC;IAE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.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_list_pipe_util_1 = require("./pip-list-pipe.util");
|
|
4
|
+
describe('DyFM_list_pipeTransform', () => {
|
|
5
|
+
it('should transform an array of numbers into a comma-separated string with spaces', () => {
|
|
6
|
+
const input = [1, 2, 3];
|
|
7
|
+
const expectedOutput = '1, 2, 3';
|
|
8
|
+
expect((0, pip_list_pipe_util_1.DyFM_list_pipeTransform)(input)).toBe(expectedOutput);
|
|
9
|
+
});
|
|
10
|
+
it('should transform an array of strings into a comma-separated string with spaces', () => {
|
|
11
|
+
const input = ['apple', 'banana', 'cherry'];
|
|
12
|
+
const expectedOutput = 'apple, banana, cherry';
|
|
13
|
+
expect((0, pip_list_pipe_util_1.DyFM_list_pipeTransform)(input)).toBe(expectedOutput);
|
|
14
|
+
});
|
|
15
|
+
it('should return an empty string for an empty array', () => {
|
|
16
|
+
const input = [];
|
|
17
|
+
const expectedOutput = '';
|
|
18
|
+
expect((0, pip_list_pipe_util_1.DyFM_list_pipeTransform)(input)).toBe(expectedOutput);
|
|
19
|
+
});
|
|
20
|
+
it('should handle an array with a single element correctly', () => {
|
|
21
|
+
const input = [42];
|
|
22
|
+
const expectedOutput = '42';
|
|
23
|
+
expect((0, pip_list_pipe_util_1.DyFM_list_pipeTransform)(input)).toBe(expectedOutput);
|
|
24
|
+
});
|
|
25
|
+
it('should handle an array with mixed types correctly', () => {
|
|
26
|
+
const input = [1, 'apple', true];
|
|
27
|
+
const expectedOutput = '1, apple, true';
|
|
28
|
+
expect((0, pip_list_pipe_util_1.DyFM_list_pipeTransform)(input)).toBe(expectedOutput);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=pip-list-pipe.util.spec.js.map
|
|
@@ -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EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,KAAK,GAAU,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACxC,MAAM,cAAc,GAAW,gBAAgB,CAAC;QAChD,MAAM,CAAC,IAAA,4CAAuB,EAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-multi-pipe-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_enum_1 = require("../../_enums/pip.enum");
|
|
4
|
+
const pip_multi_pipe_pipe_util_1 = require("./pip-multi-pipe-pipe.util");
|
|
5
|
+
describe('DyFM_multiPipe_pipeTransform', () => {
|
|
6
|
+
it('should return the original value if no pipes are provided', () => {
|
|
7
|
+
const value = 'test';
|
|
8
|
+
const pipes = [];
|
|
9
|
+
expect((0, pip_multi_pipe_pipe_util_1.DyFM_multiPipe_pipeTransform)(value, pipes)).toBe(value);
|
|
10
|
+
});
|
|
11
|
+
/* it('should return the original value if pipe has more than one key', () => {
|
|
12
|
+
const value = 'test';
|
|
13
|
+
const pipes: DyFM_MultiPipe_Setting[] = [{ pipe1: [], pipe2: [] }];
|
|
14
|
+
expect(DyFM_multiPipe_pipeTransform(value, pipes)).toBe(value);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('should return the original value if pipe is not available', () => {
|
|
18
|
+
const value = 'test';
|
|
19
|
+
const pipes: DyFM_MultiPipe_Setting[] = [{ unknownPipe: [] }];
|
|
20
|
+
expect(DyFM_multiPipe_pipeTransform(value, pipes)).toBe(value);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('should transform value using a known pipe without arguments', () => {
|
|
24
|
+
const value = 'test';
|
|
25
|
+
const pipes: DyFM_MultiPipe_Setting[] = [{ [DyFM_Pipe.currency]: [] }];
|
|
26
|
+
DyFM_pipeTransforms[DyFM_Pipe.currency] = (val: unknown) => 'transformed';
|
|
27
|
+
expect(DyFM_multiPipe_pipeTransform(value, pipes)).toBe('transformed');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should transform value using a known pipe with arguments', () => {
|
|
31
|
+
const value = 'test';
|
|
32
|
+
const pipes: DyFM_MultiPipe_Setting[] = [{ [DyFM_Pipe.currency]: ['arg1'] }];
|
|
33
|
+
DyFM_pipeTransforms[DyFM_Pipe.currency] = (val: unknown, arg: string) => `transformed with ${arg}`;
|
|
34
|
+
expect(DyFM_multiPipe_pipeTransform(value, pipes)).toBe('transformed with arg1');
|
|
35
|
+
}); */
|
|
36
|
+
xit('should return the original value if Angular pipe is not defined', () => {
|
|
37
|
+
const value = 'test';
|
|
38
|
+
const pipes = [{ [pip_enum_1.DyFM_AngularMultiPipeAvailable.currency]: [] }];
|
|
39
|
+
expect((0, pip_multi_pipe_pipe_util_1.DyFM_multiPipe_pipeTransform)(value, pipes)).toBe(value);
|
|
40
|
+
});
|
|
41
|
+
it('should transform value using a defined Angular pipe', () => {
|
|
42
|
+
const value = 'test';
|
|
43
|
+
const pipes = [{ [pip_enum_1.DyFM_AngularMultiPipeAvailable.currency]: ['arg1'] }];
|
|
44
|
+
pip_multi_pipe_pipe_util_1.DyFM_multiPipeAngularPipes[pip_enum_1.DyFM_AngularMultiPipeAvailable.currency] = (val, arg) => `angular transformed with ${arg}`;
|
|
45
|
+
expect((0, pip_multi_pipe_pipe_util_1.DyFM_multiPipe_pipeTransform)(value, pipes)).toBe('angular transformed with arg1');
|
|
46
|
+
});
|
|
47
|
+
/* it('should handle errors gracefully and return the original value', () => {
|
|
48
|
+
const value = 'test';
|
|
49
|
+
const pipes: DyFM_MultiPipe_Setting[] = [{ [DyFM_Pipe.currency]: [] }];
|
|
50
|
+
DyFM_pipeTransforms[DyFM_Pipe.currency] = () => { throw new Error('Test error'); };
|
|
51
|
+
expect(DyFM_multiPipe_pipeTransform(value, pipes)).toBe(value);
|
|
52
|
+
}); */
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=pip-multi-pipe-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-multi-pipe-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.ts"],"names":[],"mappings":";;AACA,oDAE+B;AAE/B,yEAAsG;AAEtG,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,KAAK,GAAG,MAAM,CAAC;QACrB,MAAM,KAAK,GAA6B,EAAE,CAAC;QAC3C,MAAM,CAAC,IAAA,uDAA4B,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH;;;;;;;;;;;;;;;;;;;;;;;;UAwBM;IAEN,GAAG,CAAC,iEAAiE,EAAE,GAAG,EAAE;QAC1E,MAAM,KAAK,GAAG,MAAM,CAAC;QACrB,MAAM,KAAK,GAA6B,CAAC,EAAE,CAAC,yCAA8B,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5F,MAAM,CAAC,IAAA,uDAA4B,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,KAAK,GAAG,MAAM,CAAC;QACrB,MAAM,KAAK,GAA6B,CAAC,EAAE,CAAC,yCAA8B,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClG,qDAA0B,CAAC,yCAA8B,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,4BAA4B,GAAG,EAAE,CAAC;QACtI,MAAM,CAAC,IAAA,uDAA4B,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;IAC3F,CAAC,CAAC,CAAC;IAEH;;;;;UAKM;AACR,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-obj-key-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_obj_key_pipe_util_1 = require("./pip-obj-key-pipe.util");
|
|
4
|
+
describe('DyFM_objKey_pipeTransform', () => {
|
|
5
|
+
it('should return an array of keys when an object is provided', () => {
|
|
6
|
+
const input = { a: 1, b: 2, c: 3 };
|
|
7
|
+
const expectedOutput = ['a', 'b', 'c'];
|
|
8
|
+
expect((0, pip_obj_key_pipe_util_1.DyFM_objKey_pipeTransform)(input)).toEqual(expectedOutput);
|
|
9
|
+
});
|
|
10
|
+
it('should return an empty array when null is provided', () => {
|
|
11
|
+
const input = null;
|
|
12
|
+
const expectedOutput = [];
|
|
13
|
+
expect((0, pip_obj_key_pipe_util_1.DyFM_objKey_pipeTransform)(input)).toEqual(expectedOutput);
|
|
14
|
+
});
|
|
15
|
+
it('should return an empty array when undefined is provided', () => {
|
|
16
|
+
const input = undefined;
|
|
17
|
+
const expectedOutput = [];
|
|
18
|
+
expect((0, pip_obj_key_pipe_util_1.DyFM_objKey_pipeTransform)(input)).toEqual(expectedOutput);
|
|
19
|
+
});
|
|
20
|
+
it('should return an empty array when an empty object is provided', () => {
|
|
21
|
+
const input = {};
|
|
22
|
+
const expectedOutput = [];
|
|
23
|
+
expect((0, pip_obj_key_pipe_util_1.DyFM_objKey_pipeTransform)(input)).toEqual(expectedOutput);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=pip-obj-key-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-obj-key-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.ts"],"names":[],"mappings":";;AACA,mEAAoE;AAEpE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACnC,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACvC,MAAM,CAAC,IAAA,iDAAyB,EAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,KAAK,GAAG,IAAI,CAAC;QACnB,MAAM,cAAc,GAAa,EAAE,CAAC;QACpC,MAAM,CAAC,IAAA,iDAAyB,EAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,KAAK,GAAG,SAAS,CAAC;QACxB,MAAM,cAAc,GAAa,EAAE,CAAC;QACpC,MAAM,CAAC,IAAA,iDAAyB,EAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,MAAM,cAAc,GAAa,EAAE,CAAC;QACpC,MAAM,CAAC,IAAA,iDAAyB,EAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-range-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_range_pipe_setting_enum_1 = require("../../_enums/pip-range-pipe-setting.enum");
|
|
4
|
+
const pip_range_pipe_util_1 = require("./pip-range-pipe.util");
|
|
5
|
+
describe('DyFM_range_pipeTransform', () => {
|
|
6
|
+
const mockMultiPipeTransform = (value, multiPipes) => {
|
|
7
|
+
return value.toString();
|
|
8
|
+
};
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
spyOn(console, 'warn');
|
|
11
|
+
});
|
|
12
|
+
it('should return the average of from and to when setting is avg or average', () => {
|
|
13
|
+
const value = { from: 10, to: 20, isRange: true };
|
|
14
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.avg)).toBe(15);
|
|
15
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.average)).toBe(15);
|
|
16
|
+
});
|
|
17
|
+
it('should return from when setting is min or from', () => {
|
|
18
|
+
const value = { from: 10, to: 20, isRange: true };
|
|
19
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.min)).toBe(10);
|
|
20
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.from)).toBe(10);
|
|
21
|
+
});
|
|
22
|
+
it('should return to when setting is max or to', () => {
|
|
23
|
+
const value = { from: 10, to: 20, isRange: true };
|
|
24
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.max)).toBe(20);
|
|
25
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.to)).toBe(20);
|
|
26
|
+
});
|
|
27
|
+
it('should return formatted string when setting is both or fromTo', () => {
|
|
28
|
+
const value = { from: 10, to: 20, isRange: true };
|
|
29
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.both)).toBe('10 - 20');
|
|
30
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.fromTo)).toBe('10 - 20');
|
|
31
|
+
});
|
|
32
|
+
/* it('should return transformed value using multiPipes when setting is both or fromTo and multiPipes are provided', () => {
|
|
33
|
+
const value: DyFM_RangeValue = { from: 10, to: 20, isRange: true };
|
|
34
|
+
const multiPipes: DyFM_MultiPipe_Setting[] = [{} as DyFM_MultiPipe_Setting];
|
|
35
|
+
spyOn(DyFM_multiPipe_pipeTransform, 'call').and.callFake(mockMultiPipeTransform);
|
|
36
|
+
|
|
37
|
+
expect(DyFM_range_pipeTransform(value, DyFM_RangePipe_Setting.both, multiPipes)).toBe('10 - 20');
|
|
38
|
+
expect(DyFM_range_pipeTransform(value, DyFM_RangePipe_Setting.fromTo, multiPipes)).toBe('10 - 20');
|
|
39
|
+
}); */
|
|
40
|
+
it('should return the original value if requirements are not met', () => {
|
|
41
|
+
const value = { from: 10, to: 20, isRange: false };
|
|
42
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, pip_range_pipe_setting_enum_1.DyFM_RangePipe_Setting.avg)).toBe(value);
|
|
43
|
+
expect(console.warn).toHaveBeenCalled();
|
|
44
|
+
});
|
|
45
|
+
it('should return the original value for an unknown setting', () => {
|
|
46
|
+
const value = { from: 10, to: 20, isRange: true };
|
|
47
|
+
expect((0, pip_range_pipe_util_1.DyFM_range_pipeTransform)(value, 'unknown')).toBe(value);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=pip-range-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-range-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.ts"],"names":[],"mappings":";;AAEA,0FAAkF;AAElF,+DAAiE;AAEjE,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,UAAoC,EAAE,EAAE;QACrF,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;QACjF,MAAM,KAAK,GAAoB,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACnE,MAAM,CAAC,IAAA,8CAAwB,EAAC,KAAK,EAAE,oDAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7E,MAAM,CAAC,IAAA,8CAAwB,EAAC,KAAK,EAAE,oDAAsB,CA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AK,EAAE,oDAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;IAEH;;;;;;;UAOM;IAEN,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,KAAK,GAAoB,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACpE,MAAM,CAAC,IAAA,8CAAwB,EAAC,KAAK,EAAE,oDAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,KAAK,GAAoB,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACnE,MAAM,CAAC,IAAA,8CAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-region-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const pip_region_pipe_util_1 = require("./pip-region-pipe.util");
|
|
4
|
+
const loc_country_isos_const_1 = require("../../../location/_collections/loc-country-isos.const");
|
|
5
|
+
describe('DyFM_region_pipeTransform', () => {
|
|
6
|
+
it('should return the region when a valid country ISO is provided', () => {
|
|
7
|
+
const validCountryISO = loc_country_isos_const_1.DyFM_countryISOs[0].iso2;
|
|
8
|
+
const expectedRegion = loc_country_isos_const_1.DyFM_countryISOs[0].region;
|
|
9
|
+
const result = (0, pip_region_pipe_util_1.DyFM_region_pipeTransform)(validCountryISO);
|
|
10
|
+
expect(result).toBe(expectedRegion);
|
|
11
|
+
});
|
|
12
|
+
it('should return the input country ISO when an invalid country ISO is provided', () => {
|
|
13
|
+
const invalidCountryISO = 'XX';
|
|
14
|
+
const result = (0, pip_region_pipe_util_1.DyFM_region_pipeTransform)(invalidCountryISO);
|
|
15
|
+
expect(result).toBe(invalidCountryISO);
|
|
16
|
+
});
|
|
17
|
+
it('should return the input country ISO when the country ISO is not found', () => {
|
|
18
|
+
const notFoundCountryISO = 'ZZ';
|
|
19
|
+
const result = (0, pip_region_pipe_util_1.DyFM_region_pipeTransform)(notFoundCountryISO);
|
|
20
|
+
expect(result).toBe(notFoundCountryISO);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=pip-region-pipe.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-region-pipe.util.spec.js","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.ts"],"names":[],"mappings":";;AACA,iEAAmE;AACnE,kGAAyF;AAGzF,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,eAAe,GAAG,yCAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACjD,MAAM,cAAc,GAAG,yCAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAElD,MAAM,MAAM,GAAG,IAAA,gDAAyB,EAAC,eAAe,CAAC,CAAC;QAE1D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6EAA6E,EAAE,GAAG,EAAE;QACrF,MAAM,iBAAiB,GAAG,IAAI,CAAC;QAE/B,MAAM,MAAM,GAAG,IAAA,gDAAyB,EAAC,iBAAiB,CAAC,CAAC;QAE5D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;QAC/E,MAAM,kBAAkB,GAAG,IAAI,CAAC;QAEhC,MAAM,MAAM,GAAG,IAAA,gDAAyB,EAAC,kBAAkB,CAAC,CAAC;QAE7D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pip-replace-pipe.util.spec.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.ts"],"names":[],"mappings":""}
|