@finsys/core 1.3.0 → 1.3.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/dist/data/form-field-base-specs.json +42 -1
- package/dist/index.cjs +58 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +58 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -7166,7 +7166,48 @@
|
|
|
7166
7166
|
"displayName": "Form 9 / Section 17 / Form D",
|
|
7167
7167
|
"type": "file",
|
|
7168
7168
|
"enableIf": "{formOfDisclosure} contains 'consented'",
|
|
7169
|
-
"ihs_column_names": ["incorporatedDate"],
|
|
7169
|
+
"ihs_column_names": ["incorporatedDate", "companyName", "companyRegNo"],
|
|
7170
|
+
"category": "13"
|
|
7171
|
+
},
|
|
7172
|
+
{
|
|
7173
|
+
"name": "ssm_business_information",
|
|
7174
|
+
"displayName": "SSM Company Profile",
|
|
7175
|
+
"type": "file",
|
|
7176
|
+
"enableIf": "{formOfDisclosure} contains 'consented'",
|
|
7177
|
+
"ihs_column_names": [
|
|
7178
|
+
"ssmCompanyName",
|
|
7179
|
+
"ssmCompanyRegNo",
|
|
7180
|
+
"ssmIncorporatedDate",
|
|
7181
|
+
"businessCommencementDate",
|
|
7182
|
+
"businessNature",
|
|
7183
|
+
"companyStatus",
|
|
7184
|
+
"shareholders",
|
|
7185
|
+
"directors",
|
|
7186
|
+
"previousDirectors",
|
|
7187
|
+
"totalShareIssued",
|
|
7188
|
+
"companyLastOldName",
|
|
7189
|
+
"companyNameDateOfChange",
|
|
7190
|
+
"businessOrigin",
|
|
7191
|
+
"registeredAddress"
|
|
7192
|
+
],
|
|
7193
|
+
"category": "13"
|
|
7194
|
+
},
|
|
7195
|
+
{
|
|
7196
|
+
"name": "ic_front",
|
|
7197
|
+
"displayName": "Identification Card (Front)",
|
|
7198
|
+
"type": "file",
|
|
7199
|
+
"enableIf": "{formOfDisclosure} contains 'consented'",
|
|
7200
|
+
"ihs_column_names": [
|
|
7201
|
+
"icNumber",
|
|
7202
|
+
"icName",
|
|
7203
|
+
"icAddress",
|
|
7204
|
+
"icGender",
|
|
7205
|
+
"icReligion",
|
|
7206
|
+
"icDateOfBirth",
|
|
7207
|
+
"icPlaceOfBirth",
|
|
7208
|
+
"icNationality",
|
|
7209
|
+
"icRace"
|
|
7210
|
+
],
|
|
7170
7211
|
"category": "13"
|
|
7171
7212
|
},
|
|
7172
7213
|
{
|
package/dist/index.cjs
CHANGED
|
@@ -78,6 +78,22 @@ function evaluateExpression(expression, data) {
|
|
|
78
78
|
return `this['${key.trim()}']`;
|
|
79
79
|
});
|
|
80
80
|
jsExpression = jsExpression.replace(/(?<![<>!=])=(?![=])/g, "==");
|
|
81
|
+
jsExpression = jsExpression.replace(
|
|
82
|
+
/(this\['[^']+'\])\s+anyof\s+(\[[^\]]+\])/gi,
|
|
83
|
+
(_, ref, arr) => `(${arr}).includes(${ref})`
|
|
84
|
+
);
|
|
85
|
+
jsExpression = jsExpression.replace(
|
|
86
|
+
/(this\['[^']+'\])\s+allof\s+(\[[^\]]+\])/gi,
|
|
87
|
+
(_, ref, arr) => `${arr}.every(item => (${ref} || []).includes(item))`
|
|
88
|
+
);
|
|
89
|
+
jsExpression = jsExpression.replace(
|
|
90
|
+
/(this\['[^']+'\])\s+contains\s+'([^']+)'/gi,
|
|
91
|
+
(_, ref, val) => `(${ref} || []).includes('${val}')`
|
|
92
|
+
);
|
|
93
|
+
jsExpression = jsExpression.replace(
|
|
94
|
+
/(this\['[^']+'\])\s+notcontains\s+'([^']+)'/gi,
|
|
95
|
+
(_, ref, val) => `!(${ref} || []).includes('${val}')`
|
|
96
|
+
);
|
|
81
97
|
const func = new Function(`return ${jsExpression};`);
|
|
82
98
|
return !!func.call(data || {});
|
|
83
99
|
} catch (e) {
|
|
@@ -8425,7 +8441,48 @@ var form_field_base_specs_default = {
|
|
|
8425
8441
|
displayName: "Form 9 / Section 17 / Form D",
|
|
8426
8442
|
type: "file",
|
|
8427
8443
|
enableIf: "{formOfDisclosure} contains 'consented'",
|
|
8428
|
-
ihs_column_names: ["incorporatedDate"],
|
|
8444
|
+
ihs_column_names: ["incorporatedDate", "companyName", "companyRegNo"],
|
|
8445
|
+
category: "13"
|
|
8446
|
+
},
|
|
8447
|
+
{
|
|
8448
|
+
name: "ssm_business_information",
|
|
8449
|
+
displayName: "SSM Company Profile",
|
|
8450
|
+
type: "file",
|
|
8451
|
+
enableIf: "{formOfDisclosure} contains 'consented'",
|
|
8452
|
+
ihs_column_names: [
|
|
8453
|
+
"ssmCompanyName",
|
|
8454
|
+
"ssmCompanyRegNo",
|
|
8455
|
+
"ssmIncorporatedDate",
|
|
8456
|
+
"businessCommencementDate",
|
|
8457
|
+
"businessNature",
|
|
8458
|
+
"companyStatus",
|
|
8459
|
+
"shareholders",
|
|
8460
|
+
"directors",
|
|
8461
|
+
"previousDirectors",
|
|
8462
|
+
"totalShareIssued",
|
|
8463
|
+
"companyLastOldName",
|
|
8464
|
+
"companyNameDateOfChange",
|
|
8465
|
+
"businessOrigin",
|
|
8466
|
+
"registeredAddress"
|
|
8467
|
+
],
|
|
8468
|
+
category: "13"
|
|
8469
|
+
},
|
|
8470
|
+
{
|
|
8471
|
+
name: "ic_front",
|
|
8472
|
+
displayName: "Identification Card (Front)",
|
|
8473
|
+
type: "file",
|
|
8474
|
+
enableIf: "{formOfDisclosure} contains 'consented'",
|
|
8475
|
+
ihs_column_names: [
|
|
8476
|
+
"icNumber",
|
|
8477
|
+
"icName",
|
|
8478
|
+
"icAddress",
|
|
8479
|
+
"icGender",
|
|
8480
|
+
"icReligion",
|
|
8481
|
+
"icDateOfBirth",
|
|
8482
|
+
"icPlaceOfBirth",
|
|
8483
|
+
"icNationality",
|
|
8484
|
+
"icRace"
|
|
8485
|
+
],
|
|
8429
8486
|
category: "13"
|
|
8430
8487
|
},
|
|
8431
8488
|
{
|