namirasoft-site-react 1.4.314 → 1.4.315
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/formatter/DateFormatter.js +7 -6
- package/dist/formatter/DateFormatter.js.map +1 -1
- package/dist/formatter/DateTimeFormatter.js +7 -6
- package/dist/formatter/DateTimeFormatter.js.map +1 -1
- package/dist/formatter/TimeFormatter.js +7 -6
- package/dist/formatter/TimeFormatter.js.map +1 -1
- package/package.json +4 -4
- package/src/formatter/DateFormatter.ts +8 -7
- package/src/formatter/DateTimeFormatter.ts +8 -7
- package/src/formatter/TimeFormatter.ts +8 -7
|
@@ -5,12 +5,13 @@ export class DateFormatter extends BaseColumnFormatter {
|
|
|
5
5
|
this.width = width;
|
|
6
6
|
}
|
|
7
7
|
format(value) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
if (value)
|
|
9
|
+
try {
|
|
10
|
+
let date = new Date(value);
|
|
11
|
+
return date.toDateString();
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
}
|
|
14
15
|
return value;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFormatter.js","sourceRoot":"","sources":["../../src/formatter/DateFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAElD,YAAY,QAAgB,OAAO;QAE/B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU;QAEtB,IACA,CAAC;
|
|
1
|
+
{"version":3,"file":"DateFormatter.js","sourceRoot":"","sources":["../../src/formatter/DateFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAElD,YAAY,QAAgB,OAAO;QAE/B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU;QAEtB,IAAI,KAAK;YACL,IACA,CAAC;gBACG,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/B,CAAC;YAAC,OAAO,CAAC,EACV,CAAC;YACD,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
|
|
@@ -5,12 +5,13 @@ export class DateTimeFormatter extends BaseColumnFormatter {
|
|
|
5
5
|
this.width = width;
|
|
6
6
|
}
|
|
7
7
|
format(value) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
if (value)
|
|
9
|
+
try {
|
|
10
|
+
let date = new Date(value);
|
|
11
|
+
return date.toLocaleString();
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
}
|
|
14
15
|
return value;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeFormatter.js","sourceRoot":"","sources":["../../src/formatter/DateTimeFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,iBAAkB,SAAQ,mBAAmB;IAEtD,YAAY,QAAgB,OAAO;QAE/B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU;QAEtB,IACA,CAAC;
|
|
1
|
+
{"version":3,"file":"DateTimeFormatter.js","sourceRoot":"","sources":["../../src/formatter/DateTimeFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,iBAAkB,SAAQ,mBAAmB;IAEtD,YAAY,QAAgB,OAAO;QAE/B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU;QAEtB,IAAI,KAAK;YACL,IACA,CAAC;gBACG,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;YACjC,CAAC;YAAC,OAAO,CAAC,EACV,CAAC;YACD,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
|
|
@@ -5,12 +5,13 @@ export class TimeFormatter extends BaseColumnFormatter {
|
|
|
5
5
|
this.width = width;
|
|
6
6
|
}
|
|
7
7
|
format(value) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
if (value)
|
|
9
|
+
try {
|
|
10
|
+
let date = new Date(value);
|
|
11
|
+
return date.toLocaleTimeString();
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
}
|
|
14
15
|
return value;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeFormatter.js","sourceRoot":"","sources":["../../src/formatter/TimeFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAElD,YAAY,QAAgB,MAAM;QAE9B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU;QAEtB,IACA,CAAC;
|
|
1
|
+
{"version":3,"file":"TimeFormatter.js","sourceRoot":"","sources":["../../src/formatter/TimeFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAElD,YAAY,QAAgB,MAAM;QAE9B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACQ,MAAM,CAAC,KAAU;QAEtB,IAAI,KAAK;YACL,IACA,CAAC;gBACG,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC3B,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACrC,CAAC;YAAC,OAAO,CAAC,EACV,CAAC;YACD,CAAC;QACL,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.
|
|
11
|
+
"version": "1.4.315",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"chart.js": "^4.4.8",
|
|
34
34
|
"copyfiles": "^2.4.1",
|
|
35
35
|
"link-react": "^3.0.0",
|
|
36
|
-
"namirasoft-api-link": "^1.4.
|
|
36
|
+
"namirasoft-api-link": "^1.4.14",
|
|
37
37
|
"namirasoft-api-product": "^1.4.20",
|
|
38
|
-
"namirasoft-core": "^1.4.
|
|
38
|
+
"namirasoft-core": "^1.4.59",
|
|
39
39
|
"namirasoft-schema": "^1.4.25",
|
|
40
40
|
"namirasoft-site": "^1.4.24",
|
|
41
|
-
"namirasoft-site-map": "^1.4.
|
|
41
|
+
"namirasoft-site-map": "^1.4.18",
|
|
42
42
|
"os-browserify": "^0.3.0",
|
|
43
43
|
"path-browserify": "^1.0.1",
|
|
44
44
|
"react": "^18.3.1",
|
|
@@ -9,13 +9,14 @@ export class DateFormatter extends BaseColumnFormatter
|
|
|
9
9
|
}
|
|
10
10
|
override format(value: any): any
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (value)
|
|
13
|
+
try
|
|
14
|
+
{
|
|
15
|
+
let date = new Date(value);
|
|
16
|
+
return date.toDateString();
|
|
17
|
+
} catch (e)
|
|
18
|
+
{
|
|
19
|
+
}
|
|
19
20
|
return value;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -9,13 +9,14 @@ export class DateTimeFormatter extends BaseColumnFormatter
|
|
|
9
9
|
}
|
|
10
10
|
override format(value: any): any
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (value)
|
|
13
|
+
try
|
|
14
|
+
{
|
|
15
|
+
let date = new Date(value);
|
|
16
|
+
return date.toLocaleString();
|
|
17
|
+
} catch (e)
|
|
18
|
+
{
|
|
19
|
+
}
|
|
19
20
|
return value;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -9,13 +9,14 @@ export class TimeFormatter extends BaseColumnFormatter
|
|
|
9
9
|
}
|
|
10
10
|
override format(value: any): any
|
|
11
11
|
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (value)
|
|
13
|
+
try
|
|
14
|
+
{
|
|
15
|
+
let date = new Date(value);
|
|
16
|
+
return date.toLocaleTimeString();
|
|
17
|
+
} catch (e)
|
|
18
|
+
{
|
|
19
|
+
}
|
|
19
20
|
return value;
|
|
20
21
|
}
|
|
21
22
|
}
|