@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/index.js CHANGED
@@ -15,6 +15,22 @@ function evaluateExpression(expression, data) {
15
15
  return `this['${key.trim()}']`;
16
16
  });
17
17
  jsExpression = jsExpression.replace(/(?<![<>!=])=(?![=])/g, "==");
18
+ jsExpression = jsExpression.replace(
19
+ /(this\['[^']+'\])\s+anyof\s+(\[[^\]]+\])/gi,
20
+ (_, ref, arr) => `(${arr}).includes(${ref})`
21
+ );
22
+ jsExpression = jsExpression.replace(
23
+ /(this\['[^']+'\])\s+allof\s+(\[[^\]]+\])/gi,
24
+ (_, ref, arr) => `${arr}.every(item => (${ref} || []).includes(item))`
25
+ );
26
+ jsExpression = jsExpression.replace(
27
+ /(this\['[^']+'\])\s+contains\s+'([^']+)'/gi,
28
+ (_, ref, val) => `(${ref} || []).includes('${val}')`
29
+ );
30
+ jsExpression = jsExpression.replace(
31
+ /(this\['[^']+'\])\s+notcontains\s+'([^']+)'/gi,
32
+ (_, ref, val) => `!(${ref} || []).includes('${val}')`
33
+ );
18
34
  const func = new Function(`return ${jsExpression};`);
19
35
  return !!func.call(data || {});
20
36
  } catch (e) {
@@ -8362,7 +8378,48 @@ var form_field_base_specs_default = {
8362
8378
  displayName: "Form 9 / Section 17 / Form D",
8363
8379
  type: "file",
8364
8380
  enableIf: "{formOfDisclosure} contains 'consented'",
8365
- ihs_column_names: ["incorporatedDate"],
8381
+ ihs_column_names: ["incorporatedDate", "companyName", "companyRegNo"],
8382
+ category: "13"
8383
+ },
8384
+ {
8385
+ name: "ssm_business_information",
8386
+ displayName: "SSM Company Profile",
8387
+ type: "file",
8388
+ enableIf: "{formOfDisclosure} contains 'consented'",
8389
+ ihs_column_names: [
8390
+ "ssmCompanyName",
8391
+ "ssmCompanyRegNo",
8392
+ "ssmIncorporatedDate",
8393
+ "businessCommencementDate",
8394
+ "businessNature",
8395
+ "companyStatus",
8396
+ "shareholders",
8397
+ "directors",
8398
+ "previousDirectors",
8399
+ "totalShareIssued",
8400
+ "companyLastOldName",
8401
+ "companyNameDateOfChange",
8402
+ "businessOrigin",
8403
+ "registeredAddress"
8404
+ ],
8405
+ category: "13"
8406
+ },
8407
+ {
8408
+ name: "ic_front",
8409
+ displayName: "Identification Card (Front)",
8410
+ type: "file",
8411
+ enableIf: "{formOfDisclosure} contains 'consented'",
8412
+ ihs_column_names: [
8413
+ "icNumber",
8414
+ "icName",
8415
+ "icAddress",
8416
+ "icGender",
8417
+ "icReligion",
8418
+ "icDateOfBirth",
8419
+ "icPlaceOfBirth",
8420
+ "icNationality",
8421
+ "icRace"
8422
+ ],
8366
8423
  category: "13"
8367
8424
  },
8368
8425
  {