@futdevpro/fsm-dynamo 1.20.94 → 1.20.95
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/build/_modules/location/_collections/loc-regions.util.d.ts.map +1 -1
- package/build/_modules/location/_collections/loc-regions.util.js +14 -9
- package/build/_modules/location/_collections/loc-regions.util.js.map +1 -1
- package/build-esm/_modules/location/_collections/loc-regions.util.js +8 -3
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loc-regions.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loc-regions.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,qBAAqB,EACtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAMjF;;;GAGG;AACH,qBAAa,YAAY;IAEvB,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,EAAE,CAAkC;IACnF,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,qBAAqB,EAAE,CAAmC;IACtF,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAmC;IAEjF,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAS/B,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAiB/B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;IAcrD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAc7C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB;CAa3D"}
|
|
@@ -5,9 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
/* const ISOs = [];
|
|
6
6
|
const PhoneCodes = [];
|
|
7
7
|
const Divisions = []; */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// ⚠️ DEFAULT imports, never `import * as` (measured 2026-09-24, TEST checkout country picker EMPTY): in the ES-module
|
|
9
|
+
// build a bundler (esbuild / Angular production, webpack) turns a JSON namespace import into `{ default: [...] }`, and the
|
|
10
|
+
// index-based `JSONListify` below then finds NOTHING — every country / phone-code / division list was empty. The CommonJS
|
|
11
|
+
// build hid it (`esModuleInterop`), and so did the unit tests. The default import is the same array in BOTH builds;
|
|
12
|
+
// the guard is `src/location-esm-bundle.spec.ts` (bundles `build-esm` with esbuild).
|
|
13
|
+
const country_codes_ISO_3166_json_1 = tslib_1.__importDefault(require("./assets/country-codes-ISO-3166.json"));
|
|
14
|
+
const country_phone_codes_json_1 = tslib_1.__importDefault(require("./assets/country-phone-codes.json"));
|
|
15
|
+
const country_divisions_ISO_3166_all_list_json_1 = tslib_1.__importDefault(require("./assets/country-divisions-ISO-3166-all-list.json"));
|
|
11
16
|
const object_util_1 = require("../../../_collections/utils/object.util");
|
|
12
17
|
const error_control_model_1 = require("../../../_models/control-models/error.control-model");
|
|
13
18
|
/**
|
|
@@ -20,22 +25,22 @@ class DyFM_Regions {
|
|
|
20
25
|
static phoneCodes = DyFM_Regions.getAllPhoneCodes();
|
|
21
26
|
static countryISOs = DyFM_Regions.getAllCountryISO();
|
|
22
27
|
static getAllDivisions() {
|
|
23
|
-
if (!
|
|
28
|
+
if (!country_divisions_ISO_3166_all_list_json_1.default)
|
|
24
29
|
throw new error_control_model_1.DyFM_Error({ message: 'Cannot find ISO-3166 JSON file.' });
|
|
25
|
-
return object_util_1.DyFM_Object.JSONListify(
|
|
30
|
+
return object_util_1.DyFM_Object.JSONListify(country_divisions_ISO_3166_all_list_json_1.default);
|
|
26
31
|
}
|
|
27
32
|
static getAllPhoneCodes() {
|
|
28
|
-
if (!
|
|
33
|
+
if (!country_phone_codes_json_1.default)
|
|
29
34
|
throw new error_control_model_1.DyFM_Error({ message: 'Cannot find ISO-3166 JSON file.' });
|
|
30
|
-
return object_util_1.DyFM_Object.JSONListify(
|
|
35
|
+
return object_util_1.DyFM_Object.JSONListify(country_phone_codes_json_1.default);
|
|
31
36
|
}
|
|
32
37
|
/* private static getSubdivisionCollection(): DivisionCollection {
|
|
33
38
|
return Divisions as DivisionCollection;
|
|
34
39
|
} */
|
|
35
40
|
static getAllCountryISO() {
|
|
36
|
-
if (!
|
|
41
|
+
if (!country_codes_ISO_3166_json_1.default)
|
|
37
42
|
throw new error_control_model_1.DyFM_Error({ message: 'Cannot find ISO-3166 JSON file.' });
|
|
38
|
-
const result = object_util_1.DyFM_Object.JSONListify(
|
|
43
|
+
const result = object_util_1.DyFM_Object.JSONListify(country_codes_ISO_3166_json_1.default);
|
|
39
44
|
result.forEach((iso) => {
|
|
40
45
|
iso.phoneCode = this.phoneCodes.find((pc) => pc.iso === iso.iso2)?.code;
|
|
41
46
|
iso.divisions = this.divisions.filter((d) => d.iso === iso.iso2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loc-regions.util.js","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":";;;;AACA;;wBAEwB;AACxB,
|
|
1
|
+
{"version":3,"file":"loc-regions.util.js","sourceRoot":"","sources":["../../../../src/_modules/location/_collections/loc-regions.util.ts"],"names":[],"mappings":";;;;AACA;;wBAEwB;AACxB,sHAAsH;AACtH,2HAA2H;AAC3H,0HAA0H;AAC1H,oHAAoH;AACpH,qFAAqF;AACrF,+GAAwD;AAExD,yGAA2D;AAC3D,yIAA0E;AAS1E,yEAAsE;AACtE,6FAAiF;AAGjF;;;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-1,9 +1,14 @@
|
|
|
1
1
|
/* const ISOs = [];
|
|
2
2
|
const PhoneCodes = [];
|
|
3
3
|
const Divisions = []; */
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
// ⚠️ DEFAULT imports, never `import * as` (measured 2026-09-24, TEST checkout country picker EMPTY): in the ES-module
|
|
5
|
+
// build a bundler (esbuild / Angular production, webpack) turns a JSON namespace import into `{ default: [...] }`, and the
|
|
6
|
+
// index-based `JSONListify` below then finds NOTHING — every country / phone-code / division list was empty. The CommonJS
|
|
7
|
+
// build hid it (`esModuleInterop`), and so did the unit tests. The default import is the same array in BOTH builds;
|
|
8
|
+
// the guard is `src/location-esm-bundle.spec.ts` (bundles `build-esm` with esbuild).
|
|
9
|
+
import ISOs from './assets/country-codes-ISO-3166.json';
|
|
10
|
+
import PhoneCodes from './assets/country-phone-codes.json';
|
|
11
|
+
import Divisions from './assets/country-divisions-ISO-3166-all-list.json';
|
|
7
12
|
import { DyFM_Object } from '../../../_collections/utils/object.util';
|
|
8
13
|
import { DyFM_Error } from '../../../_models/control-models/error.control-model';
|
|
9
14
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/fsm-dynamo",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.95",
|
|
4
4
|
"description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "full-stack-package",
|
|
@@ -375,16 +375,17 @@
|
|
|
375
375
|
"@types/jasmine": "~4.3.5",
|
|
376
376
|
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
377
377
|
"@typescript-eslint/parser": "^8.41.0",
|
|
378
|
+
"esbuild": "0.25.12",
|
|
378
379
|
"eslint": "~9.39.5",
|
|
379
380
|
"eslint-plugin-import": "^2.29.0",
|
|
380
381
|
"eslint-plugin-jsdoc": "^48.0.0",
|
|
381
382
|
"eslint-plugin-max-params-no-constructor": "^0.0.4",
|
|
382
383
|
"eslint-plugin-prettier": "^5.1.3",
|
|
383
384
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
385
|
+
"husky": "^9.1.7",
|
|
384
386
|
"jasmine": "5.10.0",
|
|
385
387
|
"jasmine-spec-reporter": "^7.0.0",
|
|
386
|
-
"prettier": "^3.3.0",
|
|
387
388
|
"openai": "~5.23.2",
|
|
388
|
-
"
|
|
389
|
+
"prettier": "^3.3.0"
|
|
389
390
|
}
|
|
390
391
|
}
|