namirasoft-site-react 1.4.201 → 1.4.203
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/components/NSLoading.d.ts +1 -0
- package/dist/components/NSLoading.js +2 -2
- package/dist/components/NSLoading.js.map +1 -1
- package/dist/formatter/IDFormatter.js +14 -10
- package/dist/formatter/IDFormatter.js.map +1 -1
- package/dist/formatter/TimeFormatter.js.map +1 -1
- package/package.json +2 -2
- package/src/components/NSLoading.tsx +4 -2
- package/src/formatter/IDFormatter.tsx +16 -12
- package/src/formatter/TimeFormatter.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Styles from './NSLoading.module.css';
|
|
3
3
|
export function NSLoading(props) {
|
|
4
|
-
var _a, _b;
|
|
5
|
-
return (_jsxs("div", { id: props.id, className: `${Styles.ns_loading_parent} ${(_b = (_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")) !== null && _b !== void 0 ? _b : ""} `, style: props.style, children: [_jsx("h5", { children: "Loading" }), _jsx("span", { className: Styles.ns_loader }), _jsx("p", { children: "Please wait ..." })] }));
|
|
4
|
+
var _a, _b, _c;
|
|
5
|
+
return (_jsxs("div", { id: props.id, className: `${Styles.ns_loading_parent} ${(_b = (_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")) !== null && _b !== void 0 ? _b : ""} `, style: props.style, children: [_jsx("h5", { children: (_c = props.title) !== null && _c !== void 0 ? _c : "Loading" }), _jsx("span", { className: Styles.ns_loader }), _jsx("p", { children: "Please wait ..." })] }));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=NSLoading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLoading.js","sourceRoot":"","sources":["../../src/components/NSLoading.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSLoading.js","sourceRoot":"","sources":["../../src/components/NSLoading.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAQ5C,MAAM,UAAU,SAAS,CAAC,KAAqB;;IAE9C,OAAO,CACN,eACC,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,GAAG,MAAM,CAAC,iBAAiB,IAAI,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,GAAG,EAC7E,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,uBAAK,MAAA,KAAK,CAAC,KAAK,mCAAI,SAAS,GAAM,EACnC,eAAM,SAAS,EAAE,MAAM,CAAC,SAAS,GAAS,EAC1C,0CAAsB,IACjB,CACN,CAAC;AACH,CAAC"}
|
|
@@ -10,16 +10,20 @@ export class IDFormatter extends BaseColumnFormatter {
|
|
|
10
10
|
this.width = width;
|
|
11
11
|
}
|
|
12
12
|
format(value, column, row, printable) {
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
try {
|
|
14
|
+
if (!printable)
|
|
15
|
+
if (BaseUUID.isValid(value)) {
|
|
16
|
+
let short = BaseUUID.getShort(value);
|
|
17
|
+
let info = Globe.namirasoft.getByShortName(short);
|
|
18
|
+
return this.formatter.format({
|
|
19
|
+
text: value,
|
|
20
|
+
href: info.table.front_end.getViewLink(value + ""),
|
|
21
|
+
image: { url: info.product.logo, alt: info.product.logo }
|
|
22
|
+
}, column, row, printable);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
}
|
|
23
27
|
return value;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDFormatter.js","sourceRoot":"","sources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AAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAC3B,CAAC;oBACG,IAAI,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBACrC,IAAI,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;oBAElD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;wBACzB,IAAI,EAAE,KAAK;wBACX,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,GAAG,EAAE,CAAC;wBAClD,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;qBAC5D,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;gBAC/B,CAAC;QACT,CAAC;QAAC,OAAO,KAAK,EACd,CAAC;QACD,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
|
|
@@ -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;YACG,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,CAAC,EACV,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,IACA,CAAC;YACG,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,CAAC,EACV,CAAC;QACD,CAAC;QACD,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.203",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"namirasoft-api-link": "^1.4.8",
|
|
36
36
|
"namirasoft-api-product": "^1.4.11",
|
|
37
37
|
"namirasoft-core": "^1.4.39",
|
|
38
|
-
"namirasoft-schema": "^1.4.
|
|
38
|
+
"namirasoft-schema": "^1.4.21",
|
|
39
39
|
"namirasoft-site-map": "^1.4.9",
|
|
40
40
|
"os-browserify": "^0.3.0",
|
|
41
41
|
"path-browserify": "^1.0.1",
|
|
@@ -2,7 +2,9 @@ import Styles from './NSLoading.module.css';
|
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
3
|
|
|
4
4
|
export interface NSLoadingProps extends IBaseComponentProps
|
|
5
|
-
{
|
|
5
|
+
{
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
6
8
|
|
|
7
9
|
export function NSLoading(props: NSLoadingProps)
|
|
8
10
|
{
|
|
@@ -12,7 +14,7 @@ export function NSLoading(props: NSLoadingProps)
|
|
|
12
14
|
className={`${Styles.ns_loading_parent} ${props.classList?.join(" ") ?? ""} `}
|
|
13
15
|
style={props.style}
|
|
14
16
|
>
|
|
15
|
-
<h5>Loading</h5>
|
|
17
|
+
<h5>{props.title ?? "Loading"}</h5>
|
|
16
18
|
<span className={Styles.ns_loader}></span>
|
|
17
19
|
<p>Please wait ...</p>
|
|
18
20
|
</div>
|
|
@@ -16,19 +16,23 @@ export class IDFormatter extends BaseColumnFormatter
|
|
|
16
16
|
}
|
|
17
17
|
override format(value: any, column: TableColumnInfo, row: TableRowInfo<any>, printable: boolean): any
|
|
18
18
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
try
|
|
20
|
+
{
|
|
21
|
+
if (!printable)
|
|
22
|
+
if (BaseUUID.isValid(value))
|
|
23
|
+
{
|
|
24
|
+
let short = BaseUUID.getShort(value);
|
|
25
|
+
let info = Globe.namirasoft.getByShortName(short);
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
return this.formatter.format({
|
|
28
|
+
text: value,
|
|
29
|
+
href: info.table.front_end.getViewLink(value + ""),
|
|
30
|
+
image: { url: info.product.logo, alt: info.product.logo }
|
|
31
|
+
}, column, row, printable);
|
|
32
|
+
}
|
|
33
|
+
} catch (error)
|
|
34
|
+
{
|
|
35
|
+
}
|
|
32
36
|
return value;
|
|
33
37
|
}
|
|
34
38
|
}
|