namirasoft-site-react 1.4.310 → 1.4.312
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/NSBanner.d.ts +16 -0
- package/dist/components/NSBanner.js +13 -0
- package/dist/components/NSBanner.js.map +1 -0
- package/dist/components/NSBanner.module.css +48 -0
- package/dist/components/NSID.d.ts +2 -3
- package/dist/components/NSID.js +24 -12
- package/dist/components/NSID.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NSBanner.module.css +48 -0
- package/src/components/NSBanner.tsx +81 -0
- package/src/components/NSID.tsx +25 -13
- package/src/main.ts +3 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IImageProps } from "../main";
|
|
2
|
+
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
+
export interface NSBannerProps extends IBaseComponentProps {
|
|
4
|
+
imageRight: (IImageProps & IBaseComponentProps) | null;
|
|
5
|
+
imageLeft: (IImageProps & IBaseComponentProps) | null;
|
|
6
|
+
headline?: (IBaseComponentProps & {
|
|
7
|
+
text: string;
|
|
8
|
+
}) | null;
|
|
9
|
+
title: (IBaseComponentProps & {
|
|
10
|
+
text: string;
|
|
11
|
+
}) | null;
|
|
12
|
+
desciption?: (IBaseComponentProps & {
|
|
13
|
+
text: string;
|
|
14
|
+
}) | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function NSBanner(props: NSBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Styles from "./NSBanner.module.css";
|
|
3
|
+
export function NSBanner(props) {
|
|
4
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
5
|
+
return (_jsxs("div", { id: props.id, className: `${Styles.ns_banner_container} ${(_b = (_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")) !== null && _b !== void 0 ? _b : ""}`, style: props.style, children: [props.imageLeft &&
|
|
6
|
+
_jsx("img", { id: props.imageLeft.id, className: `${Styles.ns_banner_image_right} ${(_d = (_c = props.imageLeft.classList) === null || _c === void 0 ? void 0 : _c.join(" ")) !== null && _d !== void 0 ? _d : ""}`, src: props.imageLeft.src, alt: props.imageLeft.alt, width: 192, height: 192, style: props.imageLeft.style }), _jsxs("div", { className: Styles.ns_banner_text_container, children: [props.headline &&
|
|
7
|
+
_jsx("h6", { id: props.headline.id, className: `${Styles.ns_banner_headline} ${(_f = (_e = props.headline.classList) === null || _e === void 0 ? void 0 : _e.join(" ")) !== null && _f !== void 0 ? _f : ""}`, style: props.headline.style, children: props.headline.text }), props.title &&
|
|
8
|
+
_jsx("h1", { id: props.title.id, className: `${Styles.ns_banner_title} ${(_h = (_g = props.title.classList) === null || _g === void 0 ? void 0 : _g.join(" ")) !== null && _h !== void 0 ? _h : ""}`, style: props.title.style, children: props.title.text }), props.desciption &&
|
|
9
|
+
_jsx("p", { id: props.desciption.id, className: `${Styles.ns_banner_description} ${(_k = (_j = props.desciption.classList) === null || _j === void 0 ? void 0 : _j.join(" ")) !== null && _k !== void 0 ? _k : ""}`, style: props.desciption.style, children: props.desciption.text })] }), props.imageRight &&
|
|
10
|
+
_jsx("img", { id: props.imageRight.id, className: `${Styles.ns_banner_image_right} ${(_m = (_l = props.imageRight.classList) === null || _l === void 0 ? void 0 : _l.join(" ")) !== null && _m !== void 0 ? _m : ""}`, src: props.imageRight.src, alt: props.imageRight.alt, width: 192, height: 192, style: props.imageRight.style })] }));
|
|
11
|
+
}
|
|
12
|
+
;
|
|
13
|
+
//# sourceMappingURL=NSBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSBanner.js","sourceRoot":"","sources":["../../src/components/NSBanner.tsx"],"names":[],"mappings":";AAGA,OAAO,MAAM,MAAM,uBAAuB,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CAAC,GAAG,CAAC,mCAAI,EAAE,EAAE,EAChF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,YAEvB,KAAK,CAAC,KAAK,CAAC,IAAI,GACb,EAGL,KAAK,CAAC,UAAU;wBAChB,YACC,EAAE,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE,EACvB,SAAS,EAAE,GAAG,MAAM,CAAC,qBAAqB,IAAI,MAAA,MAAA,KAAK,CAAC,UAAU,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,EAAE,EAC3F,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,YAE5B,KAAK,CAAC,UAAU,CAAC,IAAI,GACnB,IAEA,EAEL,KAAK,CAAC,UAAU;gBAChB,cACC,EAAE,EAAE,KAAK,CAAC,UAAU,CAAC,EAAE,EACvB,SAAS,EAAE,GAAG,MAAM,CAAC,qBAAqB,IAAI,MAAA,MAAA,KAAK,CAAC,UAAU,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,EAAE,EAC3F,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,EACzB,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,EACzB,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,GAAG,EACX,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,GAC5B,IAEE,CACN,CAAC;AACH,CAAC;AAAA,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.ns_banner_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 48px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_banner_image_right {
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-self: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ns_banner_image_left {
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-self: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ns_banner_text_container {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ns_banner_headline {
|
|
25
|
+
font-size: 24px;
|
|
26
|
+
color: rgba(20, 27, 92, 1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ns_banner_title {
|
|
30
|
+
font-size: 48px;
|
|
31
|
+
color: rgba(20, 27, 92, 1);
|
|
32
|
+
text-align: start;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ns_banner_description {
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
color: rgba(20, 27, 92, 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media only screen and (min-width:992px) {
|
|
41
|
+
.ns_banner_container {
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ns_banner_text_container {
|
|
46
|
+
width: 624px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -13,10 +13,9 @@ export interface NSIDState {
|
|
|
13
13
|
export declare class NSID extends React.Component<NSIDProps, NSIDState> {
|
|
14
14
|
private static mutex;
|
|
15
15
|
private static mutexes;
|
|
16
|
-
private
|
|
17
|
-
private info;
|
|
16
|
+
private info?;
|
|
18
17
|
constructor(props: NSIDProps);
|
|
19
18
|
componentDidMount(): void;
|
|
20
19
|
reload(): Promise<void>;
|
|
21
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
render(): string | import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
}
|
package/dist/components/NSID.js
CHANGED
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { BaseURLImageFormatter, NSCopy } from '../main';
|
|
13
13
|
import { BaseUUID, CacheService } from 'namirasoft-core';
|
|
@@ -18,27 +18,34 @@ export class NSID extends React.Component {
|
|
|
18
18
|
var _a;
|
|
19
19
|
super(props);
|
|
20
20
|
this.state = {};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
try {
|
|
22
|
+
let short = BaseUUID.getShort(this.props.id);
|
|
23
|
+
let namriasoft = (_a = this.props.globe) !== null && _a !== void 0 ? _a : new NamirasoftMap();
|
|
24
|
+
this.info = namriasoft.getByShortName(short);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
componentDidMount() {
|
|
26
30
|
this.reload();
|
|
27
31
|
}
|
|
28
32
|
reload() {
|
|
29
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (!this.info)
|
|
35
|
+
return;
|
|
36
|
+
let info = this.info;
|
|
30
37
|
let cache = null;
|
|
31
38
|
if (this.props.storage) {
|
|
32
|
-
cache = new CacheService(
|
|
39
|
+
cache = new CacheService(info.product.id + ":" + info.table.name + ":" + this.props.id, this.props.storage, 60, () => __awaiter(this, void 0, void 0, function* () { return "0.0.0"; }), () => __awaiter(this, void 0, void 0, function* () {
|
|
33
40
|
var _a, _b;
|
|
34
|
-
if (
|
|
41
|
+
if (info.table.back_end.get) {
|
|
35
42
|
try {
|
|
36
43
|
let columns = [];
|
|
37
|
-
|
|
44
|
+
info.table.forEachColumn(column => {
|
|
38
45
|
if (column.name.includes("name"))
|
|
39
46
|
columns.push(column.name);
|
|
40
47
|
});
|
|
41
|
-
let row = yield
|
|
48
|
+
let row = yield info.table.back_end.get(this.props.id);
|
|
42
49
|
let values = columns.map(column => row[column]).filter(x => x);
|
|
43
50
|
if (values.length > 0)
|
|
44
51
|
return values.join(" ");
|
|
@@ -51,9 +58,9 @@ export class NSID extends React.Component {
|
|
|
51
58
|
return "";
|
|
52
59
|
}));
|
|
53
60
|
cache.runGetOn = yield NSID.mutex.runExclusive(() => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
if (!NSID.mutexes[
|
|
55
|
-
NSID.mutexes[
|
|
56
|
-
return NSID.mutexes[
|
|
61
|
+
if (!NSID.mutexes[info.product.id])
|
|
62
|
+
NSID.mutexes[info.product.id] = new Mutex();
|
|
63
|
+
return NSID.mutexes[info.product.id];
|
|
57
64
|
}));
|
|
58
65
|
}
|
|
59
66
|
if (cache)
|
|
@@ -63,6 +70,11 @@ export class NSID extends React.Component {
|
|
|
63
70
|
});
|
|
64
71
|
}
|
|
65
72
|
render() {
|
|
73
|
+
var _a;
|
|
74
|
+
if (!this.props.id)
|
|
75
|
+
return _jsx(_Fragment, {});
|
|
76
|
+
if (!this.info)
|
|
77
|
+
return this.props.id;
|
|
66
78
|
let text = this.state.text;
|
|
67
79
|
if (!text)
|
|
68
80
|
text = this.props.id;
|
|
@@ -70,7 +82,7 @@ export class NSID extends React.Component {
|
|
|
70
82
|
return (_jsx(NSCopy, { value: this.props.id, children: formatter.format({
|
|
71
83
|
text,
|
|
72
84
|
href: this.info.table.front_end.getViewLink(this.props.id + ""),
|
|
73
|
-
image: { url: this.info.product.logo, alt: this.info.product.logo }
|
|
85
|
+
image: { url: this.info.product.logo, alt: (_a = this.info) === null || _a === void 0 ? void 0 : _a.product.logo }
|
|
74
86
|
}) }));
|
|
75
87
|
}
|
|
76
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSID.js","sourceRoot":"","sources":["../../src/components/NSID.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAuB,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAY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K,CAAC,EAAE,GAAG,EAAE,CAAC;gBAC/D,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,OAAO,CAAC,IAAI,EAAE;aACpE,CAAC,GAEK,CACT,CAAC;IACH,CAAC;;AArGc,UAAK,GAAU,IAAI,KAAK,EAAE,CAAC;AAC3B,YAAO,GAAoC,EAAE,CAAC"}
|
package/dist/main.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./components/NSBarAction";
|
|
|
2
2
|
export * from "./components/NSBarAlert";
|
|
3
3
|
export * from "./components/NSBarNotification";
|
|
4
4
|
export * from "./components/NSBarTitle";
|
|
5
|
+
export * from "./components/NSBanner";
|
|
5
6
|
export * from "./components/INSBox";
|
|
6
7
|
export * from "./components/NSBox";
|
|
7
8
|
export * from "./components/NSBoxBaseLayout";
|
package/dist/main.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./components/NSBarAction";
|
|
|
4
4
|
export * from "./components/NSBarAlert";
|
|
5
5
|
export * from "./components/NSBarNotification";
|
|
6
6
|
export * from "./components/NSBarTitle";
|
|
7
|
+
export * from "./components/NSBanner";
|
|
7
8
|
export * from "./components/INSBox";
|
|
8
9
|
export * from "./components/NSBox";
|
|
9
10
|
export * from "./components/NSBoxBaseLayout";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AAGxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAo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AAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAG/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAElC,SAAS,IAAI;IAET,kBAAkB,CAAC,gBAAgB,GAAG,UAAU,IAAY;QAExD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;QACnF,OAAO,sBAAsB,IAAI,EAAE,CAAC;IACxC,CAAC,CAAA;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.ns_banner_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 48px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_banner_image_right {
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-self: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ns_banner_image_left {
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-self: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ns_banner_text_container {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ns_banner_headline {
|
|
25
|
+
font-size: 24px;
|
|
26
|
+
color: rgba(20, 27, 92, 1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ns_banner_title {
|
|
30
|
+
font-size: 48px;
|
|
31
|
+
color: rgba(20, 27, 92, 1);
|
|
32
|
+
text-align: start;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ns_banner_description {
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
color: rgba(20, 27, 92, 1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media only screen and (min-width:992px) {
|
|
41
|
+
.ns_banner_container {
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ns_banner_text_container {
|
|
46
|
+
width: 624px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// todo move to its own probject: I guess this is Timify
|
|
2
|
+
import { IImageProps } from "../main";
|
|
3
|
+
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
4
|
+
import Styles from "./NSBanner.module.css"
|
|
5
|
+
|
|
6
|
+
export interface NSBannerProps extends IBaseComponentProps
|
|
7
|
+
{
|
|
8
|
+
imageRight: (IImageProps & IBaseComponentProps) | null;
|
|
9
|
+
imageLeft: (IImageProps & IBaseComponentProps) | null;
|
|
10
|
+
headline?: (IBaseComponentProps & { text: string }) | null;
|
|
11
|
+
title: (IBaseComponentProps & { text: string }) | null;
|
|
12
|
+
desciption?: (IBaseComponentProps & { text: string }) | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function NSBanner(props: NSBannerProps)
|
|
16
|
+
{
|
|
17
|
+
return (
|
|
18
|
+
<div
|
|
19
|
+
id={props.id}
|
|
20
|
+
className={`${Styles.ns_banner_container} ${props.classList?.join(" ") ?? ""}`}
|
|
21
|
+
style={props.style}
|
|
22
|
+
>
|
|
23
|
+
{
|
|
24
|
+
props.imageLeft &&
|
|
25
|
+
<img
|
|
26
|
+
id={props.imageLeft.id}
|
|
27
|
+
className={`${Styles.ns_banner_image_right} ${props.imageLeft.classList?.join(" ") ?? ""}`}
|
|
28
|
+
src={props.imageLeft.src}
|
|
29
|
+
alt={props.imageLeft.alt}
|
|
30
|
+
width={192}
|
|
31
|
+
height={192}
|
|
32
|
+
style={props.imageLeft.style}
|
|
33
|
+
/>
|
|
34
|
+
}
|
|
35
|
+
<div className={Styles.ns_banner_text_container}>
|
|
36
|
+
{
|
|
37
|
+
props.headline &&
|
|
38
|
+
<h6
|
|
39
|
+
id={props.headline.id}
|
|
40
|
+
className={`${Styles.ns_banner_headline} ${props.headline.classList?.join(" ") ?? ""}`}
|
|
41
|
+
style={props.headline.style}
|
|
42
|
+
>
|
|
43
|
+
{props.headline.text}
|
|
44
|
+
</h6>
|
|
45
|
+
}
|
|
46
|
+
{
|
|
47
|
+
props.title &&
|
|
48
|
+
<h1
|
|
49
|
+
id={props.title.id}
|
|
50
|
+
className={`${Styles.ns_banner_title} ${props.title.classList?.join(" ") ?? ""}`}
|
|
51
|
+
style={props.title.style}
|
|
52
|
+
>
|
|
53
|
+
{props.title.text}
|
|
54
|
+
</h1>
|
|
55
|
+
}
|
|
56
|
+
{
|
|
57
|
+
props.desciption &&
|
|
58
|
+
<p
|
|
59
|
+
id={props.desciption.id}
|
|
60
|
+
className={`${Styles.ns_banner_description} ${props.desciption.classList?.join(" ") ?? ""}`}
|
|
61
|
+
style={props.desciption.style}
|
|
62
|
+
>
|
|
63
|
+
{props.desciption.text}
|
|
64
|
+
</p>
|
|
65
|
+
}
|
|
66
|
+
</div>
|
|
67
|
+
{
|
|
68
|
+
props.imageRight &&
|
|
69
|
+
<img
|
|
70
|
+
id={props.imageRight.id}
|
|
71
|
+
className={`${Styles.ns_banner_image_right} ${props.imageRight.classList?.join(" ") ?? ""}`}
|
|
72
|
+
src={props.imageRight.src}
|
|
73
|
+
alt={props.imageRight.alt}
|
|
74
|
+
width={192}
|
|
75
|
+
height={192}
|
|
76
|
+
style={props.imageRight.style}
|
|
77
|
+
/>
|
|
78
|
+
}
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
};
|
package/src/components/NSID.tsx
CHANGED
|
@@ -21,8 +21,7 @@ export class NSID extends React.Component<NSIDProps, NSIDState>
|
|
|
21
21
|
{
|
|
22
22
|
private static mutex: Mutex = new Mutex();
|
|
23
23
|
private static mutexes: { [product_id: string]: Mutex } = {};
|
|
24
|
-
private
|
|
25
|
-
private info: {
|
|
24
|
+
private info?: {
|
|
26
25
|
product: {
|
|
27
26
|
id: string;
|
|
28
27
|
name: string;
|
|
@@ -37,9 +36,14 @@ export class NSID extends React.Component<NSIDProps, NSIDState>
|
|
|
37
36
|
{
|
|
38
37
|
super(props);
|
|
39
38
|
this.state = {};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
try
|
|
40
|
+
{
|
|
41
|
+
let short = BaseUUID.getShort(this.props.id);
|
|
42
|
+
let namriasoft = this.props.globe ?? new NamirasoftMap();
|
|
43
|
+
this.info = namriasoft.getByShortName(short);
|
|
44
|
+
} catch (error)
|
|
45
|
+
{
|
|
46
|
+
}
|
|
43
47
|
}
|
|
44
48
|
override componentDidMount(): void
|
|
45
49
|
{
|
|
@@ -47,22 +51,25 @@ export class NSID extends React.Component<NSIDProps, NSIDState>
|
|
|
47
51
|
}
|
|
48
52
|
async reload()
|
|
49
53
|
{
|
|
54
|
+
if (!this.info)
|
|
55
|
+
return;
|
|
56
|
+
let info = this.info;
|
|
50
57
|
let cache = null;
|
|
51
58
|
if (this.props.storage)
|
|
52
59
|
{
|
|
53
|
-
cache = new CacheService<string>(
|
|
60
|
+
cache = new CacheService<string>(info.product.id + ":" + info.table.name + ":" + this.props.id, this.props.storage, 60, async () => "0.0.0", async () =>
|
|
54
61
|
{
|
|
55
|
-
if (
|
|
62
|
+
if (info.table.back_end.get)
|
|
56
63
|
{
|
|
57
64
|
try
|
|
58
65
|
{
|
|
59
66
|
let columns: string[] = [];
|
|
60
|
-
|
|
67
|
+
info.table.forEachColumn(column =>
|
|
61
68
|
{
|
|
62
69
|
if (column.name.includes("name"))
|
|
63
70
|
columns.push(column.name);
|
|
64
71
|
});
|
|
65
|
-
let row = await
|
|
72
|
+
let row = await info.table.back_end.get(this.props.id);
|
|
66
73
|
let values = columns.map(column => row[column]).filter(x => x);
|
|
67
74
|
if (values.length > 0)
|
|
68
75
|
return values.join(" ");
|
|
@@ -76,9 +83,9 @@ export class NSID extends React.Component<NSIDProps, NSIDState>
|
|
|
76
83
|
});
|
|
77
84
|
cache.runGetOn = await NSID.mutex.runExclusive(async () =>
|
|
78
85
|
{
|
|
79
|
-
if (!NSID.mutexes[
|
|
80
|
-
NSID.mutexes[
|
|
81
|
-
return NSID.mutexes[
|
|
86
|
+
if (!NSID.mutexes[info.product.id])
|
|
87
|
+
NSID.mutexes[info.product.id] = new Mutex();
|
|
88
|
+
return NSID.mutexes[info.product.id];
|
|
82
89
|
});
|
|
83
90
|
}
|
|
84
91
|
if (cache)
|
|
@@ -90,6 +97,11 @@ export class NSID extends React.Component<NSIDProps, NSIDState>
|
|
|
90
97
|
|
|
91
98
|
override render()
|
|
92
99
|
{
|
|
100
|
+
if (!this.props.id)
|
|
101
|
+
return <></>;
|
|
102
|
+
if (!this.info)
|
|
103
|
+
return this.props.id;
|
|
104
|
+
|
|
93
105
|
let text = this.state.text;
|
|
94
106
|
if (!text)
|
|
95
107
|
text = this.props.id;
|
|
@@ -103,7 +115,7 @@ export class NSID extends React.Component<NSIDProps, NSIDState>
|
|
|
103
115
|
formatter.format({
|
|
104
116
|
text,
|
|
105
117
|
href: this.info.table.front_end.getViewLink(this.props.id + ""),
|
|
106
|
-
image: { url: this.info.product.logo, alt: this.info
|
|
118
|
+
image: { url: this.info.product.logo, alt: this.info?.product.logo }
|
|
107
119
|
})
|
|
108
120
|
}
|
|
109
121
|
</NSCopy>
|
package/src/main.ts
CHANGED
|
@@ -7,6 +7,9 @@ export * from "./components/NSBarAlert";
|
|
|
7
7
|
export * from "./components/NSBarNotification";
|
|
8
8
|
export * from "./components/NSBarTitle";
|
|
9
9
|
|
|
10
|
+
// Banner
|
|
11
|
+
export * from "./components/NSBanner";
|
|
12
|
+
|
|
10
13
|
// Box
|
|
11
14
|
export * from "./components/INSBox";
|
|
12
15
|
export * from "./components/NSBox";
|