namirasoft-site-react 1.4.498 → 1.4.499

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.
@@ -12,8 +12,19 @@ export class IDFormatter extends BaseColumnFormatter {
12
12
  format(value, _, __, printable) {
13
13
  try {
14
14
  if (!printable) {
15
- let ids = Array.isArray(value) ? value : String(value).split(",").map(id => id.trim());
16
- return ids.map((id) => _jsx(NSID, { id: id, map: this.namirasoft, storage: this.storage }));
15
+ let ids = [];
16
+ if (Array.isArray(value))
17
+ ids = value;
18
+ else {
19
+ let strValue = String(value);
20
+ try {
21
+ ids = JSON.parse(strValue);
22
+ }
23
+ catch (error) {
24
+ ids = strValue.split(",").map(id => id.trim());
25
+ }
26
+ }
27
+ return ids.map((id) => (_jsx(NSID, { id: id, map: this.namirasoft, storage: this.storage })));
17
28
  }
18
29
  }
19
30
  catch (error) { }
@@ -1 +1 @@
1
- {"version":3,"file":"IDFormatter.js","sourceRoot":"","sources":["../../src/formatter/IDFormatter.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,WAAY,SAAQ,mBAAmB;IAKhD,YAAY,KAA2B,EAAE,OAAwB,EAAE,QAAgB,OAAO;QAEtF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU,EAAE,CAAkB,EAAE,EAAqB,EAAE,SAAkB;QAErF,IACA,CAAC;YACG,IAAI,CAAC,SAAS,EACd,CAAC;gBACG,IAAI,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,C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AAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;oBAC7B,IACA,CAAC;wBACG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBAC/B,CAAC;oBAAC,OAAO,KAAK,EACd,CAAC;wBACG,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;oBACnD,CAAC;gBACL,CAAC;gBACD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACnB,KAAC,IAAI,IACD,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,IAAI,CAAC,UAAU,EACpB,OAAO,EAAE,IAAI,CAAC,OAAO,GACvB,CACL,CAAC,CAAC;YACP,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC;QAEnB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.498",
11
+ "version": "1.4.499",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -23,8 +23,28 @@ export class IDFormatter extends BaseColumnFormatter
23
23
  {
24
24
  if (!printable)
25
25
  {
26
- let ids = Array.isArray(value) ? value : String(value).split(",").map(id => id.trim());
27
- return ids.map((id) => <NSID id={id} map={this.namirasoft} storage={this.storage}></NSID>);
26
+ let ids: string[] = [];
27
+
28
+ if (Array.isArray(value))
29
+ ids = value;
30
+ else
31
+ {
32
+ let strValue = String(value);
33
+ try
34
+ {
35
+ ids = JSON.parse(strValue);
36
+ } catch (error)
37
+ {
38
+ ids = strValue.split(",").map(id => id.trim());
39
+ }
40
+ }
41
+ return ids.map((id) => (
42
+ <NSID
43
+ id={id}
44
+ map={this.namirasoft}
45
+ storage={this.storage}
46
+ />
47
+ ));
28
48
  }
29
49
  } catch (error) { }
30
50