namirasoft-site-react 1.2.7 → 1.2.9
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/App.js +3 -1
- package/dist/App.js.map +1 -1
- package/dist/components/NSButtonGreen.d.ts +4 -1
- package/dist/components/NSButtonGreen.js +8 -1
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonRed.d.ts +6 -1
- package/dist/components/NSButtonRed.js +8 -1
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSFooter.js +2 -2
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputString.d.ts +4 -2
- package/dist/components/NSInputString.js +12 -9
- package/dist/components/NSInputString.js.map +1 -1
- package/dist/components/NSLinkGreen.d.ts +16 -0
- package/dist/components/NSLinkGreen.js +20 -0
- package/dist/components/NSLinkGreen.js.map +1 -0
- package/dist/components/NSLinkGreen.module.css +16 -0
- package/dist/components/NSLinkRed.d.ts +16 -0
- package/dist/components/NSLinkRed.js +20 -0
- package/dist/components/NSLinkRed.js.map +1 -0
- package/dist/components/NSLinkRed.module.css +16 -0
- package/dist/components/NSTable.d.ts +27 -0
- package/dist/components/NSTable.js +17 -0
- package/dist/components/NSTable.js.map +1 -0
- package/dist/components/NSTable.modules.css +77 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -1
- package/namirasoft-site-react-npm-package - Shortcut.lnk +0 -0
- package/package.json +51 -49
- package/src/App.css +0 -2
- package/src/App.tsx +4 -0
- package/src/components/NSButtonGreen.tsx +20 -5
- package/src/components/NSButtonRed.tsx +21 -4
- package/src/components/NSFooter.tsx +4 -4
- package/src/components/NSInputFloat.tsx +1 -4
- package/src/components/NSInputString.tsx +16 -13
- package/src/components/NSLinkGreen.d.ts +11 -0
- package/src/components/NSLinkGreen.module.css +16 -0
- package/src/components/NSLinkGreen.tsx +40 -0
- package/src/components/NSLinkRed.module.css +16 -0
- package/src/components/NSLinkRed.tsx +38 -0
- package/src/components/NSTable.modules.css +77 -0
- package/src/components/NSTable.tsx +59 -0
- package/src/index.css +6 -6
- package/src/index.tsx +1 -1
- package/src/main.ts +4 -1
package/dist/App.js
CHANGED
|
@@ -18,6 +18,8 @@ import { NSInputPhone } from './components/NSInputPhone';
|
|
|
18
18
|
import { NSButtonGreen } from './components/NSButtonGreen';
|
|
19
19
|
import { NSButtonRed } from './components/NSButtonRed';
|
|
20
20
|
import { NSSelectBox } from './components/NSSelectBox';
|
|
21
|
+
import { NSLinkGreen } from './components/NSLinkGreen';
|
|
22
|
+
import { NSLinkRed } from './components/NSLinkRed';
|
|
21
23
|
export function App() {
|
|
22
24
|
const options = [
|
|
23
25
|
{
|
|
@@ -41,6 +43,6 @@ export function App() {
|
|
|
41
43
|
desc: 'Test4',
|
|
42
44
|
},
|
|
43
45
|
];
|
|
44
|
-
return (_jsxs("div", { className: "App", children: [_jsx(NSHeader, { scope: 'test', name: 'test' }), _jsxs("div", { className: 'my-4', children: [_jsx(NSInputText, { title: 'Text' }), _jsx(NSInputInteger, { title: 'Integer' }), _jsx(NSInputFloat, { title: 'Floating Point' }), _jsx(NSInputPrice, { title: 'Price' }), _jsx(NSInputDate, { title: 'Date' }), _jsx(NSInputTime, { title: 'Time' }), _jsx(NSInputDuration, { title: 'Duration' }), _jsx(NSInputString, { title: 'String' }), _jsx(NSInputIP, { title: 'IP' }), _jsx(NSInputEmail, { title: 'Email' }), _jsx(NSInputSearch, { title: 'Search' }), _jsx(NSInputPhone, { title: 'Phone' }), _jsx(NSSelectBox, { title: "t", options: options }), _jsx(NSButtonGreen, { title: 'Save', onClick: () => { } }), _jsx(NSButtonRed, { title: 'Delete', onClick: () => { } })] }), _jsx(NSFooter, { scope: 'test', name: 'test' })] }));
|
|
46
|
+
return (_jsxs("div", { className: "App", children: [_jsx(NSHeader, { scope: 'test', name: 'test' }), _jsxs("div", { className: 'my-4', children: [_jsx(NSInputText, { title: 'Text' }), _jsx(NSInputInteger, { title: 'Integer' }), _jsx(NSInputFloat, { title: 'Floating Point' }), _jsx(NSInputPrice, { title: 'Price' }), _jsx(NSInputDate, { title: 'Date' }), _jsx(NSInputTime, { title: 'Time' }), _jsx(NSInputDuration, { title: 'Duration' }), _jsx(NSInputString, { title: 'String' }), _jsx(NSInputIP, { title: 'IP' }), _jsx(NSInputEmail, { title: 'Email' }), _jsx(NSInputSearch, { title: 'Search' }), _jsx(NSInputPhone, { title: 'Phone' }), _jsx(NSSelectBox, { title: "t", options: options }), _jsx(NSButtonGreen, { title: 'Save', onClick: () => { } }), _jsx(NSButtonRed, { title: 'Delete', onClick: () => { } }), _jsx(NSLinkGreen, { title: "Add +", href: "/" }), _jsx(NSLinkRed, { title: "Delete", href: "/" })] }), _jsx(NSFooter, { scope: 'test', name: 'test' })] }));
|
|
45
47
|
}
|
|
46
48
|
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC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EACxB,KAAC,YAAY,IAAC,KAAK,EAAC,OAAO,GAAG,EAC9B,KAAC,aAAa,IAAC,KAAK,EAAC,QAAQ,GAAG,EAChC,KAAC,YAAY,IAAC,KAAK,EAAC,OAAO,GAAG,EAC9B,KAAC,WAAW,IAAC,KAAK,EAAC,GAAG,EAAC,OAAO,EAAE,OAAO,GAAI,EAC3C,KAAC,aAAa,IAAC,KAAK,EAAC,MAAM,EAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAI,EAClD,KAAC,WAAW,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAI,EAClD,KAAC,WAAW,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,GAAG,GAAG,EACtC,KAAC,SAAS,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,GAAG,GAAG,IACnC,EACN,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,GAAG,IACnC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface IProps {
|
|
3
3
|
title: string;
|
|
4
|
-
onClick: () => void;
|
|
4
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
5
5
|
}
|
|
6
6
|
interface IState {
|
|
7
|
+
title: string;
|
|
7
8
|
}
|
|
8
9
|
export declare class NSButtonGreen extends React.Component<IProps, IState> {
|
|
10
|
+
constructor(props: IProps);
|
|
11
|
+
setTitle(title: string): void;
|
|
9
12
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
}
|
|
11
14
|
export {};
|
|
@@ -2,8 +2,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import Style from "./NSButtonGreen.module.css";
|
|
4
4
|
export class NSButtonGreen extends React.Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
this.state = { title: props.title };
|
|
8
|
+
}
|
|
9
|
+
setTitle(title) {
|
|
10
|
+
this.setState({ title });
|
|
11
|
+
}
|
|
5
12
|
render() {
|
|
6
|
-
return _jsx("button", { onClick: this.props.onClick, className: Style.ns_button_green, children: this.
|
|
13
|
+
return _jsx("button", { onClick: e => this.props.onClick(e), className: Style.ns_button_green, children: this.state.title });
|
|
7
14
|
}
|
|
8
15
|
}
|
|
9
16
|
//# sourceMappingURL=NSButtonGreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSButtonGreen.js","sourceRoot":"","sources":["../../src/components/NSButtonGreen.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"NSButtonGreen.js","sourceRoot":"","sources":["../../src/components/NSButtonGreen.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAa/C,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAyB;IAE9D,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACQ,MAAM;QAEX,OAAO,iBAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,eAAe,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAU,CAAC;IACtH,CAAC;CACJ"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface IProps {
|
|
3
3
|
title: string;
|
|
4
|
-
onClick: () => void;
|
|
4
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
5
|
+
}
|
|
6
|
+
interface IState {
|
|
7
|
+
title: string;
|
|
5
8
|
}
|
|
6
9
|
interface IState {
|
|
7
10
|
}
|
|
8
11
|
export declare class NSButtonRed extends React.Component<IProps, IState> {
|
|
12
|
+
constructor(props: IProps);
|
|
13
|
+
setTitle(title: string): void;
|
|
9
14
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
}
|
|
11
16
|
export {};
|
|
@@ -2,8 +2,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import Style from "./NSButtonRed.module.css";
|
|
4
4
|
export class NSButtonRed extends React.Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
this.state = { title: props.title };
|
|
8
|
+
}
|
|
9
|
+
setTitle(title) {
|
|
10
|
+
this.setState({ title });
|
|
11
|
+
}
|
|
5
12
|
render() {
|
|
6
|
-
return _jsx("button", { onClick: this.props.onClick, className: Style.ns_button_red, children: this.
|
|
13
|
+
return _jsx("button", { onClick: e => this.props.onClick(e), className: Style.ns_button_red, children: this.state.title });
|
|
7
14
|
}
|
|
8
15
|
}
|
|
9
16
|
//# sourceMappingURL=NSButtonRed.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSButtonRed.js","sourceRoot":"","sources":["../../src/components/NSButtonRed.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"NSButtonRed.js","sourceRoot":"","sources":["../../src/components/NSButtonRed.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,0BAA0B,CAAC;AAe7C,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IAE5D,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACQ,MAAM;QAEX,OAAO,iBAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAU,CAAC;IACpH,CAAC;CACJ"}
|
|
@@ -20,14 +20,14 @@ export class NSFooter extends React.Component {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
hasChild(id) {
|
|
23
|
-
return this.state.filters.filter(f => f.parent_id
|
|
23
|
+
return this.state.filters.filter(f => f.parent_id == id).length > 0;
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
26
|
return (_jsx("div", { className: Styles.ns_footer, children: _jsxs("div", { className: "container", children: [_jsxs("div", { className: `d-flex justify-content-between ${Styles.ns_footer_parent_items}`, children: [_jsx("div", { className: "d-none d-md-block", children: _jsx("div", { children: _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/logo/account/base.png", alt: 'footer', width: 48, height: 48 }) }) }) }), _jsx("div", { className: "d-flex flex-wrap w-100 gap-5", children: this.render_menu(0, null) }), _jsx("div", { className: "justify-content-end d-none d-md-flex", children: _jsx("div", { children: _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/logo/namirasoft/name.png", alt: 'footer', width: 48, height: 48 }) }) }) })] }), _jsxs("div", { className: "d-flex justify-content-center gap-4 mb-3 d-block d-md-none", children: [_jsx("div", { children: _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/logo/account/base.png", alt: 'footer', width: 48, height: 48 }) }) }), _jsx("div", { children: _jsx("a", { href: "/", children: _jsx("img", { src: "https://static.namirasoft.com/logo/namirasoft/name.png", alt: 'footer', width: 48, height: 48 }) }) })] }), _jsx("div", { className: `row ${Styles.ns_footer_copyright}`, children: "\u00A9Copyright 2010 - 2023 Namira Software Corporation. All rights reserved." })] }) }));
|
|
27
27
|
}
|
|
28
28
|
render_menu(level, parent_id) {
|
|
29
29
|
var _a;
|
|
30
|
-
let fs = (_a = this.state.filters) === null || _a === void 0 ? void 0 : _a.filter(f => f.parent_id
|
|
30
|
+
let fs = (_a = this.state.filters) === null || _a === void 0 ? void 0 : _a.filter(f => f.parent_id == parent_id);
|
|
31
31
|
return (_jsx(_Fragment, { children: (fs === null || fs === void 0 ? void 0 : fs.map(f => this.render_menuItem(level, f))) }));
|
|
32
32
|
}
|
|
33
33
|
render_menuItem(level, filter) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSFooter.js","sourceRoot":"","sources":["../../src/components/NSFooter.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSFooter.js","sourceRoot":"","sources":["../../src/components/NSFooter.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAiB,MAAM,qBAAqB,CAAC;AAc7E,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IAEzD,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CA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CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,eAAe,CAAC,KAAa;QAEzB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,QAAQ;QAEJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,MAAM,aAC3C,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,EACjE,cACI,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACZ,EACF,gBACI,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAC,KAAK,GACnB,IACA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface IProps {
|
|
3
3
|
title: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
4
6
|
}
|
|
5
7
|
interface IState {
|
|
6
8
|
value: string;
|
|
7
9
|
}
|
|
8
10
|
export declare class NSInputString extends React.Component<IProps, IState> {
|
|
9
11
|
constructor(props: IProps);
|
|
10
|
-
setValue(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
11
|
-
setDefaultValue(value: string): void;
|
|
12
12
|
getValue(): string;
|
|
13
|
+
setValue(value: string): void;
|
|
14
|
+
private onChanged;
|
|
13
15
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
}
|
|
15
17
|
export {};
|
|
@@ -4,25 +4,28 @@ import Styles from "./NSInputString.module.css";
|
|
|
4
4
|
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
5
5
|
export class NSInputString extends React.Component {
|
|
6
6
|
constructor(props) {
|
|
7
|
+
var _a;
|
|
7
8
|
super(props);
|
|
8
9
|
this.state = {
|
|
9
|
-
value: "",
|
|
10
|
+
value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "",
|
|
10
11
|
};
|
|
11
|
-
this.setValue = this.setValue.bind(this);
|
|
12
12
|
this.getValue = this.getValue.bind(this);
|
|
13
|
-
this.
|
|
13
|
+
this.setValue = this.setValue.bind(this);
|
|
14
|
+
this.onChanged = this.onChanged.bind(this);
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
this.
|
|
16
|
+
getValue() {
|
|
17
|
+
return this.state.value;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
setValue(value) {
|
|
19
20
|
this.setState({ value });
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
onChanged(e) {
|
|
23
|
+
this.setValue(e.target.value);
|
|
24
|
+
if (this.props.onChanged)
|
|
25
|
+
this.props.onChanged(e);
|
|
23
26
|
}
|
|
24
27
|
render() {
|
|
25
|
-
return (_jsxs("div", { className: `${Styles.ns_input_parent} p-2`, children: [_jsx("span", { className: Styles.ns_input_title, children: this.props.title }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputString, alt: "icon", width: 24, height: 24 }), _jsx("input", { value: this.state.value, onChange: this.
|
|
28
|
+
return (_jsxs("div", { className: `${Styles.ns_input_parent} p-2`, children: [_jsx("span", { className: Styles.ns_input_title, children: this.props.title }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputString, alt: "icon", width: 24, height: 24 }), _jsx("input", { value: this.state.value, onChange: this.onChanged, type: "text", className: Styles.ns_input, placeholder: "12AB34cf" })] }));
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
31
|
//# sourceMappingURL=NSInputString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSInputString.js","sourceRoot":"","sources":["../../src/components/NSInputString.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,eAAe,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"NSInputString.js","sourceRoot":"","sources":["../../src/components/NSInputString.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAcrE,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAyB;IAE9D,YAAY,KAAa;;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE;SAClC,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,QAAQ;QAEJ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACO,SAAS,CAAC,CAAsC;QAEpD,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;YACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,MAAM,aAC3C,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,EACjE,cACI,SAAS,EAAE,MAAM,CAAC,aAAa,EAC/B,GAAG,EAAE,eAAe,EACpB,GAAG,EAAC,MAAM,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACZ,EACF,gBACI,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAC,UAAU,GACxB,IACA,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
title: string;
|
|
4
|
+
href: string;
|
|
5
|
+
}
|
|
6
|
+
interface IState {
|
|
7
|
+
title: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class NSLinkGreen extends React.Component<IProps, IState> {
|
|
11
|
+
constructor(props: IProps);
|
|
12
|
+
setTitle(title: string): void;
|
|
13
|
+
setHRef(href: string): void;
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Style from "./NSLinkGreen.module.css";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Link } from "react-router-dom";
|
|
5
|
+
export class NSLinkGreen extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = { title: props.title, href: props.href };
|
|
9
|
+
}
|
|
10
|
+
setTitle(title) {
|
|
11
|
+
this.setState({ title });
|
|
12
|
+
}
|
|
13
|
+
setHRef(href) {
|
|
14
|
+
this.setState({ href });
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (_jsx("div", { className: Style.ns_link_green, children: _jsx(Link, { className: "text-white text-decoration-none", to: this.state.href, children: this.state.title }) }));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=NSLinkGreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSLinkGreen.js","sourceRoot":"","sources":["../../src/components/NSLinkGreen.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,0BAA0B,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAcxC,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAAyB;IAE5D,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,CAAC,IAAY;QAEhB,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,cAAK,SAAS,EAAE,KAAK,CAAC,aAAa,YAC/B,KAAC,IAAI,IAAC,SAAS,EAAC,iCAAiC,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,GAC9F,CACT,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.ns_link_green {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
background-color: #06D182;
|
|
5
|
+
color: #ffffff;
|
|
6
|
+
border: 0;
|
|
7
|
+
box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
width: 128px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
text-align: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
title: string;
|
|
4
|
+
href: string;
|
|
5
|
+
}
|
|
6
|
+
interface IState {
|
|
7
|
+
title: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class NSLinkRed extends React.Component<IProps, IState> {
|
|
11
|
+
constructor(props: IProps);
|
|
12
|
+
setTitle(title: string): void;
|
|
13
|
+
setHRef(href: string): void;
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Style from "./NSLinkRed.module.css";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Link } from "react-router-dom";
|
|
5
|
+
export class NSLinkRed extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = { title: props.title, href: props.href };
|
|
9
|
+
}
|
|
10
|
+
setTitle(title) {
|
|
11
|
+
this.setState({ title });
|
|
12
|
+
}
|
|
13
|
+
setHRef(href) {
|
|
14
|
+
this.setState({ href });
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return _jsx("div", { className: Style.ns_link_red, children: _jsx(Link, { className: "text-white text-decoration-none", to: this.state.href, children: this.state.title }) });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=NSLinkRed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSLinkRed.js","sourceRoot":"","sources":["../../src/components/NSLinkRed.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAcxC,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,SAAyB;IAE1D,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,QAAQ,CAAC,KAAa;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,CAAC,IAAY;QAEhB,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5B,CAAC;IACQ,MAAM;QAEX,OAAO,cAAK,SAAS,EAAE,KAAK,CAAC,WAAW,YACpC,KAAC,IAAI,IAAC,SAAS,EAAC,iCAAiC,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,GAC9F,CAAA;IACV,CAAC;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.ns_link_red {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
background-color: rgb(265, 63, 63, 1);
|
|
5
|
+
color: #ffffff;
|
|
6
|
+
border: 0;
|
|
7
|
+
box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
width: 128px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
text-align: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "./SOPProjectListTable.modules.css";
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
interface IProps<RowType> {
|
|
4
|
+
columns: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
rows: RowType[];
|
|
8
|
+
getRowKey: (row: any, rowIndex: number) => string;
|
|
9
|
+
getColumnAttributes: (column: string, columnIndex: number) => {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
getCell: (row: any, column: string, rowIndex: number, columnIndex: number) => any;
|
|
13
|
+
}
|
|
14
|
+
interface IState<RowType> {
|
|
15
|
+
columns: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
rows: RowType[];
|
|
19
|
+
}
|
|
20
|
+
export declare class NSTable<RowType> extends Component<IProps<RowType>, IState<RowType>> {
|
|
21
|
+
constructor(props: IProps<RowType>);
|
|
22
|
+
setColumns(columns: {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
}): void;
|
|
25
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./SOPProjectListTable.modules.css";
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
export class NSTable extends Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
this.state = { columns: props.columns, rows: props.rows };
|
|
8
|
+
}
|
|
9
|
+
setColumns(columns) {
|
|
10
|
+
this.setState({ columns });
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
let column_keys = Object.keys(this.state.columns);
|
|
14
|
+
return (_jsx("div", { className: "project_list_container", children: _jsxs("table", { className: "table", children: [_jsx("thead", { className: "thead", children: _jsx("tr", { children: column_keys.map(column_key => _jsx("th", { scope: "col", children: this.state.columns[column_key] }, column_key)) }) }), _jsx("tbody", { className: "tbody", children: this.state.rows.map((row, rowIndex) => _jsx("tr", { children: column_keys.map((column, columnIndex) => (_jsx("td", Object.assign({}, this.props.getColumnAttributes(column, columnIndex), { children: this.props.getCell(row, column, rowIndex, columnIndex) })))) }, this.props.getRowKey(row, rowIndex))) })] }) }));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=NSTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":";AAAA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBlC,MAAM,OAAO,OAAiB,SAAQ,SAA2C;IAE7E,YAAY,KAAsB;QAE9B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IAC9D,CAAC;IACD,UAAU,CAAC,OAAkC;QAEzC,IAAI,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IACQ,MAAM;QAEX,IAAI,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,CACH,cAAK,SAAS,EAAC,wBAAwB,YACnC,iBAAO,SAAS,EAAC,OAAO,aACpB,gBAAO,SAAS,EAAC,OAAO,YACpB,uBACK,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,aAAqB,KAAK,EAAC,KAAK,YAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAvD,UAAU,CAAmD,CAAC,GACrG,GACD,EACR,gBAAO,SAAS,EAAC,OAAO,YAEhB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAClC,uBAEQ,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CACrC,6BAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,CAAC,cACtD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,IACtD,CACR,CAAC,IAND,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAQvC,CAAC,GAET,IACL,GACL,CACV,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.thead th {
|
|
2
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
3
|
+
color: rgba(255, 255, 255, 1);
|
|
4
|
+
border: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tbody th {
|
|
8
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
9
|
+
color: rgba(255, 255, 255, 1);
|
|
10
|
+
border: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tbody td {
|
|
14
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
15
|
+
color: rgba(255, 255, 255, 1);
|
|
16
|
+
border: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.project_list_container {
|
|
20
|
+
border: none;
|
|
21
|
+
text-align: left;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media only screen and (max-width:600px) {
|
|
25
|
+
.project_list_container {
|
|
26
|
+
overflow: scroll;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* table-satus */
|
|
31
|
+
.inqueue_status {
|
|
32
|
+
color: white;
|
|
33
|
+
background-color: rgba(255, 148, 50, 1);
|
|
34
|
+
font-size: 12px;
|
|
35
|
+
width: 96px;
|
|
36
|
+
height: 24px;
|
|
37
|
+
border-radius: 24px;
|
|
38
|
+
border: none;
|
|
39
|
+
text-align: center;
|
|
40
|
+
padding-top: 2px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.reserving_status {
|
|
44
|
+
color: white;
|
|
45
|
+
background-color: rgba(255, 79, 79, 1);
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
width: 96px;
|
|
48
|
+
height: 24px;
|
|
49
|
+
border-radius: 24px;
|
|
50
|
+
border: none;
|
|
51
|
+
text-align: center;
|
|
52
|
+
padding-top: 2px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.done-status {
|
|
56
|
+
color: white;
|
|
57
|
+
background-color: rgba(6, 209, 130, 1);
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
width: 96px;
|
|
60
|
+
height: 24px;
|
|
61
|
+
border-radius: 24px;
|
|
62
|
+
border: none;
|
|
63
|
+
text-align: center;
|
|
64
|
+
padding-top: 2px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.inprogress_status {
|
|
68
|
+
color: white;
|
|
69
|
+
background-color: rgba(230, 208, 19, 1);
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
width: 96px;
|
|
72
|
+
height: 24px;
|
|
73
|
+
border-radius: 24px;
|
|
74
|
+
border: none;
|
|
75
|
+
text-align: center;
|
|
76
|
+
padding-top: 2px;
|
|
77
|
+
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAC5B,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CACjD,CAAC;AACF,IAAI,CAAC,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC"}
|
package/dist/main.d.ts
CHANGED
|
@@ -15,3 +15,6 @@ export * from "./components/NSInputString";
|
|
|
15
15
|
export * from "./components/NSInputText";
|
|
16
16
|
export * from "./components/NSInputTime";
|
|
17
17
|
export * from "./components/NSSelectBox";
|
|
18
|
+
export * from "./components/NSLinkGreen";
|
|
19
|
+
export * from "./components/NSLinkRed";
|
|
20
|
+
export * from "./components/NSTable";
|
package/dist/main.js
CHANGED
|
@@ -15,4 +15,7 @@ export * from "./components/NSInputString";
|
|
|
15
15
|
export * from "./components/NSInputText";
|
|
16
16
|
export * from "./components/NSInputTime";
|
|
17
17
|
export * from "./components/NSSelectBox";
|
|
18
|
+
export * from "./components/NSLinkGreen";
|
|
19
|
+
export * from "./components/NSLinkRed";
|
|
20
|
+
export * from "./components/NSTable";
|
|
18
21
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc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19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
2
|
+
"name": "namirasoft-site-react",
|
|
3
|
+
"version": "1.2.9",
|
|
4
|
+
"main": "./dist/main.js",
|
|
5
|
+
"types": "./dist/main.d.ts",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@types/node": "^20.11.0",
|
|
8
|
+
"@types/react": "^18.2.47",
|
|
9
|
+
"@types/react-dom": "^18.2.18",
|
|
10
|
+
"antd": "^5.13.0",
|
|
11
|
+
"bootstrap": "^5.3.2",
|
|
12
|
+
"link-react": "^3.0.0",
|
|
13
|
+
"namirasoft-api-link": "^1.2.3",
|
|
14
|
+
"namirasoft-core": "^1.2.5",
|
|
15
|
+
"path-browserify": "^1.0.1",
|
|
16
|
+
"react": "^18.2.0",
|
|
17
|
+
"react-app-rewired": "^2.2.1",
|
|
18
|
+
"react-bootstrap": "^2.9.2",
|
|
19
|
+
"react-dom": "^18.2.0",
|
|
20
|
+
"react-phone-input-2": "^2.15.1",
|
|
21
|
+
"react-phone-number-input": "^3.3.9",
|
|
22
|
+
"react-router-dom": "^6.21.2",
|
|
23
|
+
"react-scripts": "5.0.1"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"start": "react-app-rewired start",
|
|
27
|
+
"build": "npm run copy",
|
|
28
|
+
"test": "react-app-rewired test",
|
|
29
|
+
"eject": "react-app-rewired eject",
|
|
30
|
+
"copy": "copyfiles -u 1 src/**/*.html src/**/*.css src/**/*.svg src/**/*.png src/**/*.jpg dist/"
|
|
31
|
+
},
|
|
32
|
+
"eslintConfig": {
|
|
33
|
+
"extends": [
|
|
34
|
+
"react-app",
|
|
35
|
+
"react-app/jest"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"browserslist": {
|
|
39
|
+
"production": [
|
|
40
|
+
">0.2%",
|
|
41
|
+
"not dead",
|
|
42
|
+
"not op_mini all"
|
|
43
|
+
],
|
|
44
|
+
"development": [
|
|
45
|
+
"last 1 chrome version",
|
|
46
|
+
"last 1 firefox version",
|
|
47
|
+
"last 1 safari version"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"copyfiles": "^2.4.1"
|
|
52
|
+
}
|
|
51
53
|
}
|
package/src/App.css
CHANGED
package/src/App.tsx
CHANGED
|
@@ -17,6 +17,8 @@ import { NSInputPhone } from './components/NSInputPhone';
|
|
|
17
17
|
import { NSButtonGreen } from './components/NSButtonGreen';
|
|
18
18
|
import { NSButtonRed } from './components/NSButtonRed';
|
|
19
19
|
import { NSSelectBox } from './components/NSSelectBox';
|
|
20
|
+
import { NSLinkGreen } from './components/NSLinkGreen';
|
|
21
|
+
import { NSLinkRed } from './components/NSLinkRed';
|
|
20
22
|
import type { SelectProps } from 'antd';
|
|
21
23
|
|
|
22
24
|
export function App()
|
|
@@ -63,6 +65,8 @@ export function App()
|
|
|
63
65
|
<NSSelectBox title="t" options={options} />
|
|
64
66
|
<NSButtonGreen title='Save' onClick={() => { }} />
|
|
65
67
|
<NSButtonRed title='Delete' onClick={() => { }} />
|
|
68
|
+
<NSLinkGreen title="Add +" href="/" />
|
|
69
|
+
<NSLinkRed title="Delete" href="/" />
|
|
66
70
|
</div>
|
|
67
71
|
<NSFooter scope='test' name='test' />
|
|
68
72
|
</div>
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Style from "./NSButtonGreen.module.css";
|
|
3
3
|
|
|
4
|
-
interface IProps
|
|
4
|
+
interface IProps
|
|
5
|
+
{
|
|
6
|
+
title: string;
|
|
7
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
5
12
|
title: string;
|
|
6
|
-
onClick: () => void;
|
|
7
13
|
}
|
|
8
|
-
interface IState { }
|
|
9
14
|
|
|
10
15
|
export class NSButtonGreen extends React.Component<IProps, IState>
|
|
11
16
|
{
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
constructor(props: IProps)
|
|
18
|
+
{
|
|
19
|
+
super(props);
|
|
20
|
+
this.state = { title: props.title };
|
|
21
|
+
}
|
|
22
|
+
setTitle(title: string)
|
|
23
|
+
{
|
|
24
|
+
this.setState({ title });
|
|
25
|
+
}
|
|
26
|
+
override render()
|
|
27
|
+
{
|
|
28
|
+
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_green}>{this.state.title}</button>;
|
|
14
29
|
}
|
|
15
30
|
}
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Style from "./NSButtonRed.module.css";
|
|
3
3
|
|
|
4
|
-
interface IProps
|
|
4
|
+
interface IProps
|
|
5
|
+
{
|
|
6
|
+
title: string;
|
|
7
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface IState
|
|
11
|
+
{
|
|
5
12
|
title: string;
|
|
6
|
-
onClick: () => void;
|
|
7
13
|
}
|
|
14
|
+
|
|
8
15
|
interface IState { }
|
|
9
16
|
|
|
10
17
|
export class NSButtonRed extends React.Component<IProps, IState>
|
|
11
18
|
{
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
constructor(props: IProps)
|
|
20
|
+
{
|
|
21
|
+
super(props);
|
|
22
|
+
this.state = { title: props.title };
|
|
23
|
+
}
|
|
24
|
+
setTitle(title: string)
|
|
25
|
+
{
|
|
26
|
+
this.setState({ title });
|
|
27
|
+
}
|
|
28
|
+
override render()
|
|
29
|
+
{
|
|
30
|
+
return <button onClick={e => this.props.onClick(e)} className={Style.ns_button_red}>{this.state.title}</button>;
|
|
14
31
|
}
|
|
15
32
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
// import Namira from '../assets/images/namira.svg';
|
|
3
2
|
import Styles from "./NSFooter.module.css";
|
|
4
3
|
import { NamirasoftAPILinkServer, FilterLinkRow } from 'namirasoft-api-link';
|
|
5
4
|
|
|
@@ -15,7 +14,8 @@ interface IState
|
|
|
15
14
|
selected: FilterLinkRow | null;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
export class NSFooter extends React.Component<IProps, IState>
|
|
17
|
+
export class NSFooter extends React.Component<IProps, IState>
|
|
18
|
+
{
|
|
19
19
|
constructor(props: IProps)
|
|
20
20
|
{
|
|
21
21
|
super(props);
|
|
@@ -37,7 +37,7 @@ export class NSFooter extends React.Component<IProps, IState> {
|
|
|
37
37
|
}
|
|
38
38
|
private hasChild(id: number): boolean
|
|
39
39
|
{
|
|
40
|
-
return this.state.filters.filter(f => f.parent_id
|
|
40
|
+
return this.state.filters.filter(f => f.parent_id == id).length > 0;
|
|
41
41
|
}
|
|
42
42
|
override render()
|
|
43
43
|
{
|
|
@@ -82,7 +82,7 @@ export class NSFooter extends React.Component<IProps, IState> {
|
|
|
82
82
|
}
|
|
83
83
|
private render_menu(level: number, parent_id: number | null)
|
|
84
84
|
{
|
|
85
|
-
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id
|
|
85
|
+
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id == parent_id);
|
|
86
86
|
return (
|
|
87
87
|
<>
|
|
88
88
|
{(fs?.map(f => this.render_menuItem(level, f)))}
|
|
@@ -5,6 +5,8 @@ import IconInputString from '../assets/images/icon-input-string.svg';
|
|
|
5
5
|
interface IProps
|
|
6
6
|
{
|
|
7
7
|
title: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
interface IState
|
|
@@ -12,28 +14,31 @@ interface IState
|
|
|
12
14
|
value: string;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
export class NSInputString extends React.Component<IProps, IState>
|
|
17
|
+
export class NSInputString extends React.Component<IProps, IState>
|
|
18
|
+
{
|
|
16
19
|
constructor(props: IProps)
|
|
17
20
|
{
|
|
18
21
|
super(props);
|
|
19
22
|
this.state = {
|
|
20
|
-
value: "",
|
|
23
|
+
value: props.defaultValue ?? "",
|
|
21
24
|
};
|
|
22
|
-
this.setValue = this.setValue.bind(this);
|
|
23
25
|
this.getValue = this.getValue.bind(this);
|
|
24
|
-
this.
|
|
26
|
+
this.setValue = this.setValue.bind(this);
|
|
27
|
+
this.onChanged = this.onChanged.bind(this);
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
getValue(): string
|
|
27
30
|
{
|
|
28
|
-
this.
|
|
31
|
+
return this.state.value;
|
|
29
32
|
}
|
|
30
|
-
|
|
33
|
+
setValue(value: string): void
|
|
31
34
|
{
|
|
32
35
|
this.setState({ value });
|
|
33
36
|
}
|
|
34
|
-
|
|
37
|
+
private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
|
|
35
38
|
{
|
|
36
|
-
|
|
39
|
+
this.setValue(e.target.value);
|
|
40
|
+
if (this.props.onChanged)
|
|
41
|
+
this.props.onChanged(e);
|
|
37
42
|
}
|
|
38
43
|
override render()
|
|
39
44
|
{
|
|
@@ -49,7 +54,7 @@ export class NSInputString extends React.Component<IProps, IState> {
|
|
|
49
54
|
/>
|
|
50
55
|
<input
|
|
51
56
|
value={this.state.value}
|
|
52
|
-
onChange={this.
|
|
57
|
+
onChange={this.onChanged}
|
|
53
58
|
type="text"
|
|
54
59
|
className={Styles.ns_input}
|
|
55
60
|
placeholder="12AB34cf"
|
|
@@ -57,6 +62,4 @@ export class NSInputString extends React.Component<IProps, IState> {
|
|
|
57
62
|
</div>
|
|
58
63
|
);
|
|
59
64
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IProps {
|
|
3
|
+
title: string;
|
|
4
|
+
link: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface IState {
|
|
7
|
+
}
|
|
8
|
+
export declare class NSLinkGreen extends React.Component<IProps, IState> {
|
|
9
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.ns_link_green {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
background-color: #06D182;
|
|
5
|
+
color: #ffffff;
|
|
6
|
+
border: 0;
|
|
7
|
+
box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
width: 128px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
text-align: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import Style from "./NSLinkGreen.module.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Link } from "react-router-dom";
|
|
4
|
+
|
|
5
|
+
interface IProps
|
|
6
|
+
{
|
|
7
|
+
title: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface IState
|
|
12
|
+
{
|
|
13
|
+
title: string;
|
|
14
|
+
href: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class NSLinkGreen extends React.Component<IProps, IState>
|
|
18
|
+
{
|
|
19
|
+
constructor(props: IProps)
|
|
20
|
+
{
|
|
21
|
+
super(props);
|
|
22
|
+
this.state = { title: props.title, href: props.href };
|
|
23
|
+
}
|
|
24
|
+
setTitle(title: string)
|
|
25
|
+
{
|
|
26
|
+
this.setState({ title });
|
|
27
|
+
}
|
|
28
|
+
setHRef(href: string)
|
|
29
|
+
{
|
|
30
|
+
this.setState({ href });
|
|
31
|
+
}
|
|
32
|
+
override render()
|
|
33
|
+
{
|
|
34
|
+
return (
|
|
35
|
+
<div className={Style.ns_link_green}>
|
|
36
|
+
<Link className="text-white text-decoration-none" to={this.state.href}>{this.state.title}</Link>
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.ns_link_red {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
background-color: rgb(265, 63, 63, 1);
|
|
5
|
+
color: #ffffff;
|
|
6
|
+
border: 0;
|
|
7
|
+
box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
|
|
8
|
+
font-size: 16px;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
width: 128px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
text-align: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Style from "./NSLinkRed.module.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Link } from "react-router-dom";
|
|
4
|
+
|
|
5
|
+
interface IProps
|
|
6
|
+
{
|
|
7
|
+
title: string;
|
|
8
|
+
href: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface IState
|
|
12
|
+
{
|
|
13
|
+
title: string;
|
|
14
|
+
href: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class NSLinkRed extends React.Component<IProps, IState>
|
|
18
|
+
{
|
|
19
|
+
constructor(props: IProps)
|
|
20
|
+
{
|
|
21
|
+
super(props);
|
|
22
|
+
this.state = { title: props.title, href: props.href };
|
|
23
|
+
}
|
|
24
|
+
setTitle(title: string)
|
|
25
|
+
{
|
|
26
|
+
this.setState({ title });
|
|
27
|
+
}
|
|
28
|
+
setHRef(href: string)
|
|
29
|
+
{
|
|
30
|
+
this.setState({ href });
|
|
31
|
+
}
|
|
32
|
+
override render()
|
|
33
|
+
{
|
|
34
|
+
return <div className={Style.ns_link_red}>
|
|
35
|
+
<Link className="text-white text-decoration-none" to={this.state.href}>{this.state.title}</Link>
|
|
36
|
+
</div>
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.thead th {
|
|
2
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
3
|
+
color: rgba(255, 255, 255, 1);
|
|
4
|
+
border: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tbody th {
|
|
8
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
9
|
+
color: rgba(255, 255, 255, 1);
|
|
10
|
+
border: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tbody td {
|
|
14
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
15
|
+
color: rgba(255, 255, 255, 1);
|
|
16
|
+
border: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.project_list_container {
|
|
20
|
+
border: none;
|
|
21
|
+
text-align: left;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media only screen and (max-width:600px) {
|
|
25
|
+
.project_list_container {
|
|
26
|
+
overflow: scroll;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* table-satus */
|
|
31
|
+
.inqueue_status {
|
|
32
|
+
color: white;
|
|
33
|
+
background-color: rgba(255, 148, 50, 1);
|
|
34
|
+
font-size: 12px;
|
|
35
|
+
width: 96px;
|
|
36
|
+
height: 24px;
|
|
37
|
+
border-radius: 24px;
|
|
38
|
+
border: none;
|
|
39
|
+
text-align: center;
|
|
40
|
+
padding-top: 2px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.reserving_status {
|
|
44
|
+
color: white;
|
|
45
|
+
background-color: rgba(255, 79, 79, 1);
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
width: 96px;
|
|
48
|
+
height: 24px;
|
|
49
|
+
border-radius: 24px;
|
|
50
|
+
border: none;
|
|
51
|
+
text-align: center;
|
|
52
|
+
padding-top: 2px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.done-status {
|
|
56
|
+
color: white;
|
|
57
|
+
background-color: rgba(6, 209, 130, 1);
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
width: 96px;
|
|
60
|
+
height: 24px;
|
|
61
|
+
border-radius: 24px;
|
|
62
|
+
border: none;
|
|
63
|
+
text-align: center;
|
|
64
|
+
padding-top: 2px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.inprogress_status {
|
|
68
|
+
color: white;
|
|
69
|
+
background-color: rgba(230, 208, 19, 1);
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
width: 96px;
|
|
72
|
+
height: 24px;
|
|
73
|
+
border-radius: 24px;
|
|
74
|
+
border: none;
|
|
75
|
+
text-align: center;
|
|
76
|
+
padding-top: 2px;
|
|
77
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import "./SOPProjectListTable.modules.css";
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
|
|
4
|
+
interface IProps<RowType>
|
|
5
|
+
{
|
|
6
|
+
columns: { [key: string]: string };
|
|
7
|
+
rows: RowType[];
|
|
8
|
+
getRowKey: (row: any, rowIndex: number) => string;
|
|
9
|
+
getColumnAttributes: (column: string, columnIndex: number) => { [key: string]: string };
|
|
10
|
+
getCell: (row: any, column: string, rowIndex: number, columnIndex: number) => any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface IState<RowType>
|
|
14
|
+
{
|
|
15
|
+
columns: { [key: string]: string };
|
|
16
|
+
rows: RowType[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class NSTable<RowType> extends Component<IProps<RowType>, IState<RowType>>
|
|
20
|
+
{
|
|
21
|
+
constructor(props: IProps<RowType>)
|
|
22
|
+
{
|
|
23
|
+
super(props);
|
|
24
|
+
this.state = { columns: props.columns, rows: props.rows };
|
|
25
|
+
}
|
|
26
|
+
setColumns(columns: { [key: string]: string })
|
|
27
|
+
{
|
|
28
|
+
this.setState({ columns });
|
|
29
|
+
}
|
|
30
|
+
override render()
|
|
31
|
+
{
|
|
32
|
+
let column_keys = Object.keys(this.state.columns);
|
|
33
|
+
return (
|
|
34
|
+
<div className="project_list_container">
|
|
35
|
+
<table className="table">
|
|
36
|
+
<thead className="thead">
|
|
37
|
+
<tr>
|
|
38
|
+
{column_keys.map(column_key => <th key={column_key} scope="col">{this.state.columns[column_key]}</th>)}
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<tbody className="tbody">
|
|
42
|
+
{
|
|
43
|
+
this.state.rows.map((row, rowIndex) =>
|
|
44
|
+
<tr key={this.props.getRowKey(row, rowIndex)}>
|
|
45
|
+
{
|
|
46
|
+
column_keys.map((column, columnIndex) => (
|
|
47
|
+
<td {...this.props.getColumnAttributes(column, columnIndex)}>
|
|
48
|
+
{this.props.getCell(row, column, rowIndex, columnIndex)}
|
|
49
|
+
</td>
|
|
50
|
+
))
|
|
51
|
+
}
|
|
52
|
+
</tr>)
|
|
53
|
+
}
|
|
54
|
+
</tbody >
|
|
55
|
+
</table>
|
|
56
|
+
</div >
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/index.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
body {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
margin: 0;
|
|
3
|
+
-webkit-font-smoothing: antialiased;
|
|
4
|
+
-moz-osx-font-smoothing: grayscale;
|
|
5
|
+
background-color: #ccc !important;
|
|
6
|
+
background-image: url(./assets/images/background.svg);
|
|
7
|
+
}
|
package/src/index.tsx
CHANGED
package/src/main.ts
CHANGED
|
@@ -14,4 +14,7 @@ export * from "./components/NSInputSearch";
|
|
|
14
14
|
export * from "./components/NSInputString";
|
|
15
15
|
export * from "./components/NSInputText";
|
|
16
16
|
export * from "./components/NSInputTime";
|
|
17
|
-
export * from "./components/NSSelectBox";
|
|
17
|
+
export * from "./components/NSSelectBox";
|
|
18
|
+
export * from "./components/NSLinkGreen";
|
|
19
|
+
export * from "./components/NSLinkRed";
|
|
20
|
+
export * from "./components/NSTable";
|