namirasoft-account-react 1.3.97 → 1.3.99
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.d.ts +0 -1
- package/dist/App.js +3 -5
- package/dist/App.js.map +1 -1
- package/dist/IEntityInfo.d.ts +1 -0
- package/dist/components/NSAAccess.d.ts +2 -0
- package/dist/components/NSAAccess.js +12 -0
- package/dist/components/NSAAccess.js.map +1 -0
- package/dist/components/NSAAccess.module.css +60 -0
- package/dist/layouts/NSALayout.d.ts +1 -0
- package/dist/layouts/NSALayout.js +21 -15
- package/dist/layouts/NSALayout.js.map +1 -1
- package/dist/layouts/NSASectionEdit.d.ts +1 -0
- package/dist/layouts/NSASectionEdit.js +2 -2
- package/dist/layouts/NSASectionEdit.js.map +1 -1
- package/dist/layouts/NSASectionList.d.ts +1 -0
- package/dist/layouts/NSASectionList.js +15 -10
- package/dist/layouts/NSASectionList.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 +5 -5
- package/src/App.tsx +47 -6
- package/src/IEntityInfo.ts +1 -0
- package/src/components/NSAAccess.module.css +60 -0
- package/src/components/NSAAccess.tsx +36 -0
- package/src/layouts/NSALayout.tsx +11 -2
- package/src/layouts/NSASectionEdit.tsx +3 -2
- package/src/layouts/NSASectionList.tsx +15 -9
- package/src/main.ts +1 -3
package/dist/App.d.ts
CHANGED
package/dist/App.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment
|
|
2
|
-
import
|
|
3
|
-
import './App.css';
|
|
4
|
-
import { NSAMessageDialog } from './main';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import NSAAccess from './components/NSAAccess';
|
|
5
3
|
export function App() {
|
|
6
|
-
return (
|
|
4
|
+
return (_jsx(_Fragment, { children: _jsx(NSAAccess, {}) }));
|
|
7
5
|
}
|
|
8
6
|
;
|
|
9
7
|
//# 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":";
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAGA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAiC/C,MAAM,UAAU,GAAG;IAEf,OAAO,CACH,4BAWI,KAAC,SAAS,KAAG,GACd,CACN,CAAC;AACN,CAAC;AAAA,CAAC"}
|
package/dist/IEntityInfo.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface IEntityInfo<EntityType extends {
|
|
|
6
6
|
name?: string;
|
|
7
7
|
table: BaseMetaTable;
|
|
8
8
|
server: {
|
|
9
|
+
value_list: (table: string, column: string) => Promise<string[]>;
|
|
9
10
|
get: (id: string) => Promise<EntityType>;
|
|
10
11
|
list: (filters: FilterItem[] | null, page: (number | null), size: (number | null)) => Promise<{
|
|
11
12
|
rows: EntityType[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Styles from './NSAAccess.module.css';
|
|
3
|
+
import SignAccount from '../assets/images/icon-close.png';
|
|
4
|
+
import ProfileAccount from '../assets/images/icon-close.png';
|
|
5
|
+
function NSAAccess() {
|
|
6
|
+
return (_jsxs("section", { className: Styles.ns_access_container, children: [_jsxs("div", { className: Styles.ns_access_content, children: [_jsx("div", { className: 'text-center pb-2', children: _jsx("img", { src: SignAccount, alt: '', width: 103, height: 103, className: 'rounded-circle' }) }), _jsx("h2", { className: 'text-center', children: `Hi ${"Amir!"}` }), _jsx("h6", { className: 'text-center pb-2', children: "amir.abolhasani1368@gmail.com" })] }), _jsx(MailInfo, {})] }));
|
|
7
|
+
}
|
|
8
|
+
function MailInfo() {
|
|
9
|
+
return (_jsxs("div", { className: Styles.ns_access_account_container, children: [_jsx("div", { className: Styles.ns_access_account_info, children: _jsx("img", { src: ProfileAccount, alt: '', width: 48, height: 48, className: 'rounded-circle' }) }), _jsxs("div", { className: 'd-flex flex-column', children: [_jsx("h4", { children: `${"Amir Abolhasani"}` }), _jsx("h5", { children: "amir.bolhasani.1368@gmail.com" })] })] }));
|
|
10
|
+
}
|
|
11
|
+
export default NSAAccess;
|
|
12
|
+
//# sourceMappingURL=NSAAccess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSAAccess.js","sourceRoot":"","sources":["../../src/components/NSAAccess.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAE7D,SAAS,SAAS;IAEd,OAAO,CACH,mBAAS,SAAS,EAAE,MAAM,CAAC,mBAAmB,aAC1C,eAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,aACpC,cAAK,SAAS,EAAC,kBAAkB,YAC7B,cAAK,GAAG,EAAE,WAAW,EAAE,GAAG,EAAC,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAC,gBAAgB,GAAG,GAClF,EACN,aAAI,SAAS,EAAC,aAAa,YAAE,MAAM,OAAO,EAAE,GAAM,EAClD,aAAI,SAAS,EAAC,kBAAkB,8CAAmC,IACjE,EACN,KAAC,QAAQ,KAAG,IACN,CACb,CAAC;AACN,CAAC;AAED,SAAS,QAAQ;IAEb,OAAO,CACH,eAAK,SAAS,EAAE,MAAM,CAAC,2BAA2B,aAC9C,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YACzC,cAAK,GAAG,EAAE,cAAc,EAAE,GAAG,EAAC,EAAE,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAC,gBAAgB,GAAG,GACnF,EACN,eAAK,SAAS,EAAC,oBAAoB,aAC/B,uBAAK,GAAG,iBAAiB,EAAE,GAAM,EACjC,yDAAsC,IACpC,IACJ,CACT,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.ns_access_container {
|
|
2
|
+
background-color: rgba(255, 255, 255, 1);
|
|
3
|
+
border-radius: 16px;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
margin: 48px;
|
|
6
|
+
padding: 16px 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_access_container h6 {
|
|
10
|
+
color: rgba(20, 27, 92, 1);
|
|
11
|
+
text-align: center;
|
|
12
|
+
font-weight: 300;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ns_access_container h2 {
|
|
17
|
+
color: rgba(3, 119, 255, 1);
|
|
18
|
+
text-align: center;
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
font-size: 24px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ns_access_container h4 {
|
|
24
|
+
color: rgba(20, 27, 92, 1);
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
text-align: left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ns_access_container h5 {
|
|
31
|
+
color: rgba(20, 27, 92, 1);
|
|
32
|
+
font-weight: 300;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ns_access_account_container {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: row;
|
|
40
|
+
border: none;
|
|
41
|
+
background-color: rgba(244, 246, 255, 1);
|
|
42
|
+
border-radius: 50px;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 10px;
|
|
45
|
+
width: 326px;
|
|
46
|
+
margin: 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ns_access_account_container:hover {
|
|
50
|
+
background-color: rgba(178, 187, 217, 1);
|
|
51
|
+
transition: all 0.4s ease-in-out;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ns_access_account_info {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
justify-content: left;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
padding: 8px;
|
|
60
|
+
}
|
|
@@ -18,8 +18,9 @@ import { Actions } from './Actions';
|
|
|
18
18
|
import { useParams } from 'react-router-dom';
|
|
19
19
|
import { NamingConvention } from 'namirasoft-core';
|
|
20
20
|
import { NSAMessageDialog } from '../main';
|
|
21
|
+
import NSAAccess from '../components/NSAAccess';
|
|
21
22
|
export function NSALayout(props) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
23
24
|
const Section_List = useRef(null);
|
|
24
25
|
const Message_Dialog = useRef(null);
|
|
25
26
|
const [state, setState] = useState({ showDeleteModal: false });
|
|
@@ -42,7 +43,11 @@ export function NSALayout(props) {
|
|
|
42
43
|
children: _jsx(NSAMessageDialog, { ref: Message_Dialog }),
|
|
43
44
|
count: 1
|
|
44
45
|
},
|
|
45
|
-
{
|
|
46
|
+
{
|
|
47
|
+
src: "https://static.namirasoft.com/image/namirasoft/access/logo/base.png", alt: "Access", onClicked: () => {
|
|
48
|
+
},
|
|
49
|
+
children: _jsx(NSAAccess, {}),
|
|
50
|
+
},
|
|
46
51
|
];
|
|
47
52
|
let name = "";
|
|
48
53
|
if (props.pages)
|
|
@@ -71,37 +76,38 @@ export function NSALayout(props) {
|
|
|
71
76
|
}));
|
|
72
77
|
}
|
|
73
78
|
else if (props.pages)
|
|
74
|
-
|
|
75
|
-
|
|
79
|
+
if ((_h = (_g = (_f = props.pages.ui) === null || _f === void 0 ? void 0 : _f.action) === null || _g === void 0 ? void 0 : _g.menus.new) !== null && _h !== void 0 ? _h : true)
|
|
80
|
+
action.menus[name_apply].push(Actions.new(props, props.pages.entity));
|
|
81
|
+
if ((_j = props.pages) === null || _j === void 0 ? void 0 : _j.view) {
|
|
76
82
|
getIDs = () => [].filter(id => id);
|
|
77
83
|
}
|
|
78
84
|
if (getIDs)
|
|
79
85
|
if (props.pages) {
|
|
80
|
-
if ((
|
|
86
|
+
if ((_m = (_l = (_k = props.pages.ui) === null || _k === void 0 ? void 0 : _k.action) === null || _l === void 0 ? void 0 : _l.menus.view) !== null && _m !== void 0 ? _m : true)
|
|
81
87
|
action.menus[name_actions].push(Actions.view(props, props.pages.entity, getIDs));
|
|
82
|
-
if ((
|
|
88
|
+
if ((_q = (_p = (_o = props.pages.ui) === null || _o === void 0 ? void 0 : _o.action) === null || _p === void 0 ? void 0 : _p.menus.viewHistory) !== null && _q !== void 0 ? _q : true)
|
|
83
89
|
action.menus[name_actions].push(Actions.viewHistory(getIDs));
|
|
84
|
-
if ((
|
|
90
|
+
if ((_t = (_s = (_r = props.pages.ui) === null || _r === void 0 ? void 0 : _r.action) === null || _s === void 0 ? void 0 : _s.menus.copy) !== null && _t !== void 0 ? _t : true)
|
|
85
91
|
action.menus[name_actions].push(Actions.copy(props, props.pages.entity, getIDs));
|
|
86
|
-
if ((
|
|
92
|
+
if ((_w = (_v = (_u = props.pages.ui) === null || _u === void 0 ? void 0 : _u.action) === null || _v === void 0 ? void 0 : _v.menus.edit) !== null && _w !== void 0 ? _w : true)
|
|
87
93
|
action.menus[name_actions].push(Actions.edit(props, props.pages.entity, getIDs));
|
|
88
|
-
if ((
|
|
94
|
+
if ((_z = (_y = (_x = props.pages.ui) === null || _x === void 0 ? void 0 : _x.action) === null || _y === void 0 ? void 0 : _y.menus.delete) !== null && _z !== void 0 ? _z : true)
|
|
89
95
|
action.menus[name_actions].push(Actions.delete(getIDs, showDeleteModal));
|
|
90
96
|
}
|
|
91
97
|
let content;
|
|
92
|
-
if ((
|
|
98
|
+
if ((_0 = props.pages) === null || _0 === void 0 ? void 0 : _0.list)
|
|
93
99
|
content = _jsx(NSASectionList, Object.assign({ ref: Section_List }, props, props.pages.list, { entity: props.pages.entity }));
|
|
94
|
-
else if ((
|
|
100
|
+
else if ((_1 = props.pages) === null || _1 === void 0 ? void 0 : _1.edit)
|
|
95
101
|
content = _jsx(NSASectionEdit, Object.assign({}, props.pages.edit, { entity: props.pages.entity, children: props.children }));
|
|
96
|
-
else if ((
|
|
102
|
+
else if ((_2 = props.pages) === null || _2 === void 0 ? void 0 : _2.view)
|
|
97
103
|
content = _jsx(NSASectionView, Object.assign({}, props.pages.view, { entity: props.pages.entity }));
|
|
98
104
|
else
|
|
99
105
|
content = props.children;
|
|
100
106
|
return (_jsx(NSLayout, Object.assign({}, props, { header: {
|
|
101
|
-
title: (user_name + " " + ((
|
|
102
|
-
icons: [...icons, ...((
|
|
107
|
+
title: (user_name + " " + ((_4 = (_3 = props.header) === null || _3 === void 0 ? void 0 : _3.title) !== null && _4 !== void 0 ? _4 : "")).trim(),
|
|
108
|
+
icons: [...icons, ...((_6 = (_5 = props.header) === null || _5 === void 0 ? void 0 : _5.icons) !== null && _6 !== void 0 ? _6 : [])]
|
|
103
109
|
}, action: {
|
|
104
|
-
title: (
|
|
110
|
+
title: (_7 = action === null || action === void 0 ? void 0 : action.title) !== null && _7 !== void 0 ? _7 : "",
|
|
105
111
|
description: action === null || action === void 0 ? void 0 : action.description,
|
|
106
112
|
menus: action.menus
|
|
107
113
|
}, children: _jsxs("div", { className: "container-fluid", children: [_jsx(NSModal, { title: `Are you sure you want to delete ${name}?`, description: "", show: state.showDeleteModal, onClose: hideDeleteModal, children: _jsx(NSButtonRed, { title: "Yes", onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSALayout.js","sourceRoot":"","sources":["../../src/layouts/NSALayout.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAA4G,WAAW,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvK,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAuB,OAAO,IAAI,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAa,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"NSALayout.js","sourceRoot":"","sources":["../../src/layouts/NSALayout.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAA4G,WAAW,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvK,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAuB,OAAO,IAAI,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAa,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC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AI,EACT,OAAO,IACH,IACI,CACX,CAAC;AACH,CAAC"}
|
|
@@ -40,7 +40,7 @@ export function onApply(props, entity, id) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export function NSASectionEdit(props) {
|
|
43
|
-
var _a;
|
|
43
|
+
var _a, _b;
|
|
44
44
|
let { id } = useParams();
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
if (id)
|
|
@@ -48,6 +48,6 @@ export function NSASectionEdit(props) {
|
|
|
48
48
|
props.ui.setEntity(entity);
|
|
49
49
|
}).catch(() => { });
|
|
50
50
|
}, [id]);
|
|
51
|
-
return (_jsxs(NSSection, { id: props.id, classList: [`${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`], center_items: true, children: [_jsx(NSPanel, { grid: false, children: props.children }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), _jsx(NSButtonBlue, { title: "Apply", onClick: () => { onApply(props, props.entity, id); } }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), props.isEdit && _jsx(NSLine, {}), props.isEdit && _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), props.isEdit && _jsx(NSASectionTabs, { entity: props.entity, id: id !== null && id !== void 0 ? id : "" })] }));
|
|
51
|
+
return (_jsxs(NSSection, { id: props.id, classList: [`${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`], center_items: true, children: [_jsx(NSPanel, { grid: false, children: props.children }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), _jsx(NSButtonBlue, { title: "Apply", onClick: () => { onApply(props, props.entity, id); } }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), props.isEdit && _jsx(NSLine, {}), props.isEdit && _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), props.isEdit && ((_b = props.ui.tabs) !== null && _b !== void 0 ? _b : true) && _jsx(NSASectionTabs, { entity: props.entity, id: id !== null && id !== void 0 ? id : "" })] }));
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=NSASectionEdit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSASectionEdit.js","sourceRoot":"","sources":["../../src/layouts/NSASectionEdit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE3G,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSASectionEdit.js","sourceRoot":"","sources":["../../src/layouts/NSASectionEdit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE3G,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBlD,MAAM,UAAU,OAAO,CAAkE,KAAuD,EAAE,MAAgD,EAAE,EAAsB;;IAEzN,IACA;QACC,IAAI,SAAS,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,OAAO,CAAC,MAAA,MAAM,CAAC,IAAI,mCAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;QAErI,IAAI,SAAS,GAAG,CAAC,UAAsB,EAAE,OAAe,EAAE,EAAE;YAE3D,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC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AAM,EAAE,EAAE,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,EAAE,GAAI,IACvF,CACZ,CAAC;AACH,CAAC"}
|
|
@@ -39,6 +39,7 @@ export class NSASectionList extends Component {
|
|
|
39
39
|
this.reload();
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
+
var _a;
|
|
42
43
|
const getColumns = () => {
|
|
43
44
|
return Object.assign({ selected: "" }, this.props.ui.getColumns());
|
|
44
45
|
};
|
|
@@ -69,32 +70,36 @@ export class NSASectionList extends Component {
|
|
|
69
70
|
let columns = ans.getColumns().map(c => { return Object.assign(Object.assign({}, c), { type: new ObjectService(c.type).getEnum(FilterItemColumnType, FilterItemColumnType.Any) }); });
|
|
70
71
|
return [{ name: ans.name, text: ans.text, columns }];
|
|
71
72
|
}, getMoreTables: () => __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
var
|
|
73
|
+
var _b, _c;
|
|
73
74
|
let server = new NamirasoftFieldServer(this.props.account.token_manager, console.error);
|
|
74
75
|
let f_items = [
|
|
75
76
|
new FilterItem(MetaDatabase.main.field, MetaDatabase.main.field.columns.product_id, false, FilterItemOperator.all.Equals, this.props.entity.product_id),
|
|
76
|
-
new FilterItem(MetaDatabase.main.field, MetaDatabase.main.field.columns.entity, false, FilterItemOperator.all.Equals, (
|
|
77
|
+
new FilterItem(MetaDatabase.main.field, MetaDatabase.main.field.columns.entity, false, FilterItemOperator.all.Equals, (_b = this.props.entity.name) !== null && _b !== void 0 ? _b : this.props.entity.table.name)
|
|
77
78
|
];
|
|
78
79
|
let c_items = [
|
|
79
80
|
new FilterItem(MetaDatabase.main.category, MetaDatabase.main.category.columns.product_id, false, FilterItemOperator.all.Equals, this.props.entity.product_id),
|
|
80
|
-
new FilterItem(MetaDatabase.main.category, MetaDatabase.main.category.columns.entity, false, FilterItemOperator.all.Equals, (
|
|
81
|
+
new FilterItem(MetaDatabase.main.category, MetaDatabase.main.category.columns.entity, false, FilterItemOperator.all.Equals, (_c = this.props.entity.name) !== null && _c !== void 0 ? _c : this.props.entity.table.name)
|
|
81
82
|
];
|
|
82
83
|
let f = server.field.List(f_items, null, null);
|
|
83
84
|
let c = server.category.List(c_items, null, null);
|
|
84
85
|
let r = yield Promise.all([f, c]);
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
let ans = [];
|
|
87
|
+
if (r[0].rows.length > 0)
|
|
88
|
+
ans.push({
|
|
87
89
|
name: "fields",
|
|
88
90
|
text: "Fields",
|
|
89
91
|
columns: r[0].rows.map(f => { return { name: f.name, text: f.name, type: new ObjectService(f.type).getEnum(FilterItemColumnType, FilterItemColumnType.Number) }; })
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
+
});
|
|
93
|
+
if (r[1].rows.length > 0)
|
|
94
|
+
ans.push({
|
|
92
95
|
name: "categories",
|
|
93
96
|
text: "Categories",
|
|
94
97
|
columns: r[1].rows.map(c => { return { name: c.name, text: c.name, type: FilterItemColumnType.Number }; })
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
}), getData: () => __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
});
|
|
99
|
+
return ans;
|
|
100
|
+
}), getData: (table, column) => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
return yield this.props.entity.server.value_list(table.name, column.name);
|
|
102
|
+
}), onChanged: this.reload }), _jsx(NSTable, { ref: this.table, columns: getColumns(), getRowKey: getRowKey, getColumnAttributes: getColumnAttributes, getCell: getCell, pageSize: this.state.page.size, totalItems: this.state.totalItems, reload: this.reload }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), _jsx(NSLine, {}), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL }), ((_a = this.props.ui.tabs) !== null && _a !== void 0 ? _a : true) && _jsx(NSASectionTabs, { entity: this.props.entity, id: id })] }));
|
|
98
103
|
}
|
|
99
104
|
}
|
|
100
105
|
//# sourceMappingURL=NSASectionList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSASectionList.js","sourceRoot":"","sources":["../../src/layouts/NSASectionList.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"NSASectionList.js","sourceRoot":"","sources":["../../src/layouts/NSASectionList.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAqD,MAAM,uBAAuB,CAAC;AAC7J,OAAO,EAAE,SAAS,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqBtG,MAAM,OAAO,cAAgF,SAAQ,SAA4H;IAIhO,YAAY,KAAwH;QAEnI,KAAK,CAAC,KAAK,CAAC,CAAC;QAJN,cAAS,GAAG,SAAS,EAAe,CAAC;QACrC,UAAK,GAAG,SAAS,EAAuB,CAAC;QAIhD,IAAI,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QAC7E,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IACD,MAAM;;QAEL,MAAA,IAAI,CAAC,KAAK,CAAC,OAAO,0CAAE,OAAO,C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AI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,GAAI,IAC3E,CACZ,CAAC;IACH,CAAC;CACD"}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSADeleteModal";
|
|
2
2
|
export * from "./components/NSAMessageDialog";
|
|
3
3
|
export * from "./layouts/Actions";
|
|
4
|
+
export * from "./components/NSAAccess";
|
|
4
5
|
export * from "./layouts/NSALayout";
|
|
5
6
|
export * from "./layouts/NSASectionEdit";
|
|
6
7
|
export * from "./layouts/NSASectionList";
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSADeleteModal";
|
|
2
2
|
export * from "./components/NSAMessageDialog";
|
|
3
3
|
export * from "./layouts/Actions";
|
|
4
|
+
export * from "./components/NSAAccess";
|
|
4
5
|
export * from "./layouts/NSALayout";
|
|
5
6
|
export * from "./layouts/NSASectionEdit";
|
|
6
7
|
export * from "./layouts/NSASectionList";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
11
|
+
"version": "1.3.99",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@types/device-uuid": "^1.0.3",
|
|
25
25
|
"@types/react": "^18.3.3",
|
|
26
26
|
"device-uuid": "^1.0.4",
|
|
27
|
-
"namirasoft-account": "^1.3.
|
|
27
|
+
"namirasoft-account": "^1.3.29",
|
|
28
28
|
"namirasoft-account-client": "^1.3.0",
|
|
29
|
-
"namirasoft-core": "^1.3.
|
|
30
|
-
"namirasoft-field": "^1.3.
|
|
31
|
-
"namirasoft-site-react": "^1.3.
|
|
29
|
+
"namirasoft-core": "^1.3.62",
|
|
30
|
+
"namirasoft-field": "^1.3.8",
|
|
31
|
+
"namirasoft-site-react": "^1.3.242",
|
|
32
32
|
"os-browserify": "^0.3.0",
|
|
33
33
|
"path-browserify": "^1.0.1",
|
|
34
34
|
"process": "^0.11.10",
|
package/src/App.tsx
CHANGED
|
@@ -1,13 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
// import { INSBarActionProps, INSBarHeroBannerProps, INSBarTitleProps } from "namirasoft-site-react";
|
|
2
|
+
// import { IEntityInfo, INSARouterProps, NSALayout, NSASectionEditProps, NSASectionListProps } from "namirasoft-account-react";
|
|
3
|
+
// import { NSASectionViewProps } from "namirasoft-account-react";
|
|
4
|
+
import NSAAccess from './components/NSAAccess';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
// export interface AccountLayoutProps<EntityType extends { id: string }, EntityTypeInput = EntityType> extends INSARouterProps
|
|
8
|
+
// export interface AccountLayoutProps<>
|
|
9
|
+
// {
|
|
10
|
+
// action?: INSBarActionProps;
|
|
11
|
+
// banner?: INSBarHeroBannerProps;
|
|
12
|
+
// title?: INSBarTitleProps;
|
|
13
|
+
// pages?: {
|
|
14
|
+
// entity: IEntityInfo<EntityType, EntityTypeInput>;
|
|
15
|
+
// ui?: {
|
|
16
|
+
// action?: {
|
|
17
|
+
// menus: {
|
|
18
|
+
// view?: boolean;
|
|
19
|
+
// viewHistory?: boolean;
|
|
20
|
+
// copy?: boolean;
|
|
21
|
+
// edit?: boolean;
|
|
22
|
+
// delete?: boolean;
|
|
23
|
+
// apply?: boolean;
|
|
24
|
+
// };
|
|
25
|
+
// };
|
|
26
|
+
// };
|
|
27
|
+
// list?: NSASectionListProps;
|
|
28
|
+
// edit?: NSASectionEditProps<EntityType, EntityTypeInput>;
|
|
29
|
+
// view?: NSASectionViewProps;
|
|
30
|
+
// }
|
|
31
|
+
// edit?: () => void;
|
|
32
|
+
// delete?: () => void;
|
|
33
|
+
// redirectToView?: () => void;
|
|
34
|
+
// children: JSX.Element | JSX.Element[];
|
|
35
|
+
// }
|
|
36
|
+
// export function App<EntityType extends { id: string } = any, EntityTypeInput = EntityType>(props: AccountLayoutProps<EntityType, EntityTypeInput>)
|
|
37
|
+
export function App()
|
|
6
38
|
{
|
|
7
39
|
return (
|
|
8
40
|
<>
|
|
9
|
-
<
|
|
10
|
-
|
|
41
|
+
{/* <NSALayout
|
|
42
|
+
header={{
|
|
43
|
+
title: "any",
|
|
44
|
+
}}
|
|
45
|
+
scope='Namirasoft Account Console'
|
|
46
|
+
logo='https://static.namirasoft.com/image/namirasoft/account/logo/base.png'
|
|
47
|
+
background="url('https://static.namirasoft.com/image/namirasoft/account/background/base.svg')"
|
|
48
|
+
notifications={[]}
|
|
49
|
+
>
|
|
50
|
+
{/*Todo*/}
|
|
51
|
+
<NSAAccess />
|
|
11
52
|
</>
|
|
12
53
|
);
|
|
13
54
|
};
|
package/src/IEntityInfo.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface IEntityInfo<EntityType extends { id: string }, EntityTypeInput
|
|
|
6
6
|
name?: string;
|
|
7
7
|
table: BaseMetaTable;
|
|
8
8
|
server: {
|
|
9
|
+
value_list: (table: string, column: string) => Promise<string[]>;
|
|
9
10
|
get: (id: string) => Promise<EntityType>;
|
|
10
11
|
list: (filters: FilterItem[] | null, page: (number | null), size: (number | null)) => Promise<{
|
|
11
12
|
rows: EntityType[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.ns_access_container {
|
|
2
|
+
background-color: rgba(255, 255, 255, 1);
|
|
3
|
+
border-radius: 16px;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
margin: 48px;
|
|
6
|
+
padding: 16px 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ns_access_container h6 {
|
|
10
|
+
color: rgba(20, 27, 92, 1);
|
|
11
|
+
text-align: center;
|
|
12
|
+
font-weight: 300;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ns_access_container h2 {
|
|
17
|
+
color: rgba(3, 119, 255, 1);
|
|
18
|
+
text-align: center;
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
font-size: 24px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ns_access_container h4 {
|
|
24
|
+
color: rgba(20, 27, 92, 1);
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
text-align: left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ns_access_container h5 {
|
|
31
|
+
color: rgba(20, 27, 92, 1);
|
|
32
|
+
font-weight: 300;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ns_access_account_container {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: row;
|
|
40
|
+
border: none;
|
|
41
|
+
background-color: rgba(244, 246, 255, 1);
|
|
42
|
+
border-radius: 50px;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 10px;
|
|
45
|
+
width: 326px;
|
|
46
|
+
margin: 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ns_access_account_container:hover {
|
|
50
|
+
background-color: rgba(178, 187, 217, 1);
|
|
51
|
+
transition: all 0.4s ease-in-out;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ns_access_account_info {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
justify-content: left;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
padding: 8px;
|
|
60
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Styles from './NSAAccess.module.css';
|
|
2
|
+
import SignAccount from '../assets/images/icon-close.png';
|
|
3
|
+
import ProfileAccount from '../assets/images/icon-close.png';
|
|
4
|
+
|
|
5
|
+
function NSAAccess()
|
|
6
|
+
{
|
|
7
|
+
return (
|
|
8
|
+
<section className={Styles.ns_access_container}>
|
|
9
|
+
<div className={Styles.ns_access_content}>
|
|
10
|
+
<div className='text-center pb-2'>
|
|
11
|
+
<img src={SignAccount} alt='' width={103} height={103} className='rounded-circle' />
|
|
12
|
+
</div>
|
|
13
|
+
<h2 className='text-center'>{`Hi ${"Amir!"}`}</h2>
|
|
14
|
+
<h6 className='text-center pb-2'>amir.abolhasani1368@gmail.com</h6>
|
|
15
|
+
</div>
|
|
16
|
+
<MailInfo />
|
|
17
|
+
</section>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function MailInfo()
|
|
22
|
+
{
|
|
23
|
+
return (
|
|
24
|
+
<div className={Styles.ns_access_account_container}>
|
|
25
|
+
<div className={Styles.ns_access_account_info}>
|
|
26
|
+
<img src={ProfileAccount} alt='' width={48} height={48} className='rounded-circle' />
|
|
27
|
+
</div>
|
|
28
|
+
<div className='d-flex flex-column'>
|
|
29
|
+
<h4>{`${"Amir Abolhasani"}`}</h4>
|
|
30
|
+
<h5>amir.bolhasani.1368@gmail.com</h5>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default NSAAccess;
|
|
@@ -11,6 +11,7 @@ import { useParams } from 'react-router-dom';
|
|
|
11
11
|
import { NamingConvention } from 'namirasoft-core';
|
|
12
12
|
import { IEntityInfo } from '../IEntityInfo';
|
|
13
13
|
import { NSAMessageDialog } from '../main';
|
|
14
|
+
import NSAAccess from '../components/NSAAccess';
|
|
14
15
|
|
|
15
16
|
export interface NSALayoutProps<EntityType extends { id: string }, EntityTypeInput = EntityType> extends IBaseComponentProps, INSARouterProps
|
|
16
17
|
{
|
|
@@ -27,6 +28,7 @@ export interface NSALayoutProps<EntityType extends { id: string }, EntityTypeInp
|
|
|
27
28
|
ui?: {
|
|
28
29
|
action?: {
|
|
29
30
|
menus: {
|
|
31
|
+
new?: boolean,
|
|
30
32
|
view?: boolean,
|
|
31
33
|
viewHistory?: boolean,
|
|
32
34
|
copy?: boolean,
|
|
@@ -76,7 +78,13 @@ export function NSALayout<EntityType extends { id: string }, EntityTypeInput = E
|
|
|
76
78
|
children: <NSAMessageDialog ref={Message_Dialog} />,
|
|
77
79
|
count: 1
|
|
78
80
|
},
|
|
79
|
-
{
|
|
81
|
+
{
|
|
82
|
+
src: "https://static.namirasoft.com/image/namirasoft/access/logo/base.png", alt: "Access", onClicked: () =>
|
|
83
|
+
{
|
|
84
|
+
|
|
85
|
+
},
|
|
86
|
+
children: <NSAAccess />,
|
|
87
|
+
},
|
|
80
88
|
];
|
|
81
89
|
let name = "";
|
|
82
90
|
if (props.pages)
|
|
@@ -116,7 +124,8 @@ export function NSALayout<EntityType extends { id: string }, EntityTypeInput = E
|
|
|
116
124
|
}));
|
|
117
125
|
}
|
|
118
126
|
else if (props.pages)
|
|
119
|
-
action
|
|
127
|
+
if (props.pages.ui?.action?.menus.new ?? true)
|
|
128
|
+
action.menus[name_apply].push(Actions.new(props, props.pages.entity));
|
|
120
129
|
|
|
121
130
|
if (props.pages?.view)
|
|
122
131
|
{
|
|
@@ -17,7 +17,8 @@ export interface NSASectionEditProps<EntityType extends { id: string }, EntityTy
|
|
|
17
17
|
menus: {
|
|
18
18
|
apply?: boolean,
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
tabs?: boolean;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -92,7 +93,7 @@ export function NSASectionEdit<EntityType extends { id: string }, EntityTypeInpu
|
|
|
92
93
|
<NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
|
|
93
94
|
{props.isEdit && <NSLine />}
|
|
94
95
|
{props.isEdit && <NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>}
|
|
95
|
-
{props.isEdit && <NSASectionTabs entity={props.entity} id={id ?? ""} />}
|
|
96
|
+
{props.isEdit && (props.ui.tabs ?? true) && <NSASectionTabs entity={props.entity} id={id ?? ""} />}
|
|
96
97
|
</NSSection>
|
|
97
98
|
);
|
|
98
99
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NSLine, NSSection, NSSpace, NSSpaceSizeType, NSTable, NSFilterBox } from "namirasoft-site-react";
|
|
1
|
+
import { NSLine, NSSection, NSSpace, NSSpaceSizeType, NSTable, NSFilterBox, INSFilterBoxProps_Table, INSFilterBoxProps_Column } from "namirasoft-site-react";
|
|
2
2
|
import { Component, ReactNode, createRef } from "react";
|
|
3
3
|
import { IEntityInfo } from "../IEntityInfo";
|
|
4
4
|
import { NSASectionTabs } from "./NSASectionTabs";
|
|
@@ -10,6 +10,7 @@ export interface NSASectionListProps
|
|
|
10
10
|
{
|
|
11
11
|
ui: {
|
|
12
12
|
getColumns: () => { [key: string]: string };
|
|
13
|
+
tabs?: boolean;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -113,20 +114,25 @@ export class NSASectionList<EntityType extends { id: string }, EntityTypeInput =
|
|
|
113
114
|
let c = server.category.List(c_items, null, null);
|
|
114
115
|
let r = await Promise.all([f, c]);
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
let ans: INSFilterBoxProps_Table[] = [];
|
|
118
|
+
if (r[0].rows.length > 0)
|
|
119
|
+
ans.push({
|
|
118
120
|
name: "fields",
|
|
119
121
|
text: "Fields",
|
|
120
122
|
columns: r[0].rows.map(f => { return { name: f.name, text: f.name, type: new ObjectService(f.type).getEnum(FilterItemColumnType, FilterItemColumnType.Number) } })
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
+
});
|
|
124
|
+
if (r[1].rows.length > 0)
|
|
125
|
+
ans.push({
|
|
123
126
|
name: "categories",
|
|
124
127
|
text: "Categories",
|
|
125
128
|
columns: r[1].rows.map(c => { return { name: c.name, text: c.name, type: FilterItemColumnType.Number } })
|
|
126
|
-
}
|
|
127
|
-
|
|
129
|
+
});
|
|
130
|
+
return ans;
|
|
131
|
+
}}
|
|
132
|
+
getData={async (table: INSFilterBoxProps_Table, column: INSFilterBoxProps_Column) =>
|
|
133
|
+
{
|
|
134
|
+
return await this.props.entity.server.value_list(table.name, column.name);
|
|
128
135
|
}}
|
|
129
|
-
getData={async () => { return []; }}
|
|
130
136
|
onChanged={this.reload} />
|
|
131
137
|
<NSTable<EntityType>
|
|
132
138
|
ref={this.table}
|
|
@@ -141,7 +147,7 @@ export class NSASectionList<EntityType extends { id: string }, EntityTypeInput =
|
|
|
141
147
|
<NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
|
|
142
148
|
<NSLine></NSLine>
|
|
143
149
|
<NSSpace size={NSSpaceSizeType.NORMAL}></NSSpace>
|
|
144
|
-
<NSASectionTabs entity={this.props.entity} id={id} />
|
|
150
|
+
{(this.props.ui.tabs ?? true) && <NSASectionTabs entity={this.props.entity} id={id} />}
|
|
145
151
|
</NSSection>
|
|
146
152
|
);
|
|
147
153
|
}
|
package/src/main.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
export * from "./components/NSADeleteModal";
|
|
2
2
|
export * from "./components/NSAMessageDialog";
|
|
3
|
-
|
|
4
3
|
export * from "./layouts/Actions";
|
|
4
|
+
export * from "./components/NSAAccess";
|
|
5
5
|
export * from "./layouts/NSALayout";
|
|
6
6
|
export * from "./layouts/NSASectionEdit";
|
|
7
7
|
export * from "./layouts/NSASectionList";
|
|
8
8
|
export * from "./layouts/NSASectionView";
|
|
9
|
-
|
|
10
9
|
export * from "./pages/NSALoginPage";
|
|
11
|
-
|
|
12
10
|
export * from "./IEntityInfo";
|
|
13
11
|
export * from "./Info";
|
|
14
12
|
export * from "./INSARouterMaker";
|