namirasoft-account-react 1.3.99 → 1.3.101
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 +7 -2
- package/dist/App.js.map +1 -1
- package/dist/components/NSAAccess.module.css +7 -1
- package/dist/layouts/NSALayout.js +22 -21
- package/dist/layouts/NSALayout.js.map +1 -1
- package/package.json +2 -2
- package/src/App.tsx +18 -45
- package/src/components/NSAAccess.module.css +7 -1
- package/src/layouts/NSALayout.tsx +9 -3
- package/tsconfig.json +1 -1
package/dist/App.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import NSButton from 'namirasoft-site-react/dist/components/NSButton';
|
|
3
|
+
import { useState } from 'react';
|
|
2
4
|
import NSAAccess from './components/NSAAccess';
|
|
3
5
|
export function App() {
|
|
4
|
-
|
|
6
|
+
const [show, setShow] = useState(false);
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(NSButton, { onClick: () => { }, title: 'asdas' }), _jsx(NSButton, { onClick: () => { }, title: 'asdas' }), _jsx(NSButton, { onClick: () => { }, title: 'asdas' }), _jsx(NSButton, { onClick: () => { }, title: 'asdas' }), _jsx(NSButton, { onClick: () => { }, title: 'asdas' }), _jsx(NSButton, { onClick: () => { }, title: 'asdas' }), _jsx(NSButton, { onClick: () => {
|
|
8
|
+
setShow(!show);
|
|
9
|
+
}, title: 'asdas' }), _jsx("div", { style: { display: show === false ? "none" : "block" }, children: _jsx(NSAAccess, {}) })] }));
|
|
5
10
|
}
|
|
6
11
|
;
|
|
7
12
|
//# 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":";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2
|
background-color: rgba(255, 255, 255, 1);
|
|
3
3
|
border-radius: 16px;
|
|
4
4
|
width: fit-content;
|
|
5
|
-
margin: 48px;
|
|
6
5
|
padding: 16px 0;
|
|
6
|
+
top: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
margin-top: 30px;
|
|
9
|
+
margin-right: 40px;
|
|
10
|
+
position: absolute;
|
|
11
|
+
border: 0.2px solid rgb(210, 210, 210);
|
|
12
|
+
box-shadow: 1px 5px 5px rgb(226, 221, 221);
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
.ns_access_container h6 {
|
|
@@ -24,6 +24,7 @@ export function NSALayout(props) {
|
|
|
24
24
|
const Section_List = useRef(null);
|
|
25
25
|
const Message_Dialog = useRef(null);
|
|
26
26
|
const [state, setState] = useState({ showDeleteModal: false });
|
|
27
|
+
const [show, setShow] = useState(false);
|
|
27
28
|
const hideDeleteModal = () => { setState(prevState => (Object.assign(Object.assign({}, prevState), { showDeleteModal: false }))); };
|
|
28
29
|
const showDeleteModal = () => { setState(prevState => (Object.assign(Object.assign({}, prevState), { showDeleteModal: true }))); };
|
|
29
30
|
let icons = [
|
|
@@ -45,8 +46,8 @@ export function NSALayout(props) {
|
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
48
|
src: "https://static.namirasoft.com/image/namirasoft/access/logo/base.png", alt: "Access", onClicked: () => {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
setShow(!show);
|
|
50
|
+
}
|
|
50
51
|
},
|
|
51
52
|
];
|
|
52
53
|
let name = "";
|
|
@@ -103,31 +104,31 @@ export function NSALayout(props) {
|
|
|
103
104
|
content = _jsx(NSASectionView, Object.assign({}, props.pages.view, { entity: props.pages.entity }));
|
|
104
105
|
else
|
|
105
106
|
content = props.children;
|
|
106
|
-
return (
|
|
107
|
+
return (_jsxs(NSLayout, Object.assign({}, props, { header: {
|
|
107
108
|
title: (user_name + " " + ((_4 = (_3 = props.header) === null || _3 === void 0 ? void 0 : _3.title) !== null && _4 !== void 0 ? _4 : "")).trim(),
|
|
108
109
|
icons: [...icons, ...((_6 = (_5 = props.header) === null || _5 === void 0 ? void 0 : _5.icons) !== null && _6 !== void 0 ? _6 : [])]
|
|
109
110
|
}, action: {
|
|
110
111
|
title: (_7 = action === null || action === void 0 ? void 0 : action.title) !== null && _7 !== void 0 ? _7 : "",
|
|
111
112
|
description: action === null || action === void 0 ? void 0 : action.description,
|
|
112
113
|
menus: action.menus
|
|
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* () {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
}, 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* () {
|
|
115
|
+
try {
|
|
116
|
+
if (props.pages)
|
|
117
|
+
if (getIDs) {
|
|
118
|
+
let ids = getIDs();
|
|
119
|
+
if (ids.length === 0)
|
|
120
|
+
throw new Error("Nothing was found to delete.");
|
|
121
|
+
if (ids.length === 1) {
|
|
122
|
+
yield props.pages.entity.server.delete(ids[0]);
|
|
123
|
+
props.notifier.onSuccess(`${name} was deleted successfully.`);
|
|
124
|
+
}
|
|
125
|
+
else
|
|
126
|
+
throw new Error("Multiple deletion is not supported yet.");
|
|
123
127
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
props.notifier.onError(error);
|
|
130
|
-
}
|
|
131
|
-
}) }) }), content] }) })));
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
props.notifier.onError(error);
|
|
131
|
+
}
|
|
132
|
+
}) }) }), content] }), _jsx("div", { style: { display: show === false ? "none" : "block" }, children: _jsx(NSAAccess, {}) })] })));
|
|
132
133
|
}
|
|
133
134
|
//# sourceMappingURL=NSALayout.js.map
|
|
@@ -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;AAC3C,OAAO,SAAS,MAAM,yBAAyB,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,k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AAG,CAAC,CAAC,CAAC,CAAC,CAAC;gDAC/C,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,4BAA4B,CAAC,CAAC;6CAC9D;;gDAGA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;yCAC5D;iCAEF;gCAAC,OAAO,KAAU,EACnB;oCACC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;iCAC9B;4BACF,CAAC,CAAA,GAAI,GAAI,EACT,OAAO,IACH,EACN,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,YACzD,KAAC,SAAS,KAAG,GACR,KACI,CACX,CAAC;AACH,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.101",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"namirasoft-account-client": "^1.3.0",
|
|
29
29
|
"namirasoft-core": "^1.3.62",
|
|
30
30
|
"namirasoft-field": "^1.3.8",
|
|
31
|
-
"namirasoft-site-react": "^1.3.
|
|
31
|
+
"namirasoft-site-react": "^1.3.247",
|
|
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,54 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// import { NSASectionViewProps } from "namirasoft-account-react";
|
|
1
|
+
import NSButton from 'namirasoft-site-react/dist/components/NSButton';
|
|
2
|
+
import { useState } from 'react';
|
|
4
3
|
import NSAAccess from './components/NSAAccess';
|
|
5
4
|
|
|
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
5
|
export function App()
|
|
38
6
|
{
|
|
7
|
+
const [show, setShow] = useState(false);
|
|
8
|
+
|
|
39
9
|
return (
|
|
40
10
|
<>
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
11
|
+
<NSButton onClick={() => { }} title='asdas' />
|
|
12
|
+
<NSButton onClick={() => { }} title='asdas' />
|
|
13
|
+
<NSButton onClick={() => { }} title='asdas' />
|
|
14
|
+
<NSButton onClick={() => { }} title='asdas' />
|
|
15
|
+
<NSButton onClick={() => { }} title='asdas' />
|
|
16
|
+
<NSButton onClick={() => { }} title='asdas' />
|
|
17
|
+
<NSButton onClick={() =>
|
|
18
|
+
{
|
|
19
|
+
setShow(!show);
|
|
20
|
+
|
|
21
|
+
}} title='asdas' />
|
|
22
|
+
<div style={{ display: show === false ? "none" : "block" }}>
|
|
23
|
+
<NSAAccess />
|
|
24
|
+
</div>
|
|
52
25
|
</>
|
|
53
26
|
);
|
|
54
27
|
};
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
background-color: rgba(255, 255, 255, 1);
|
|
3
3
|
border-radius: 16px;
|
|
4
4
|
width: fit-content;
|
|
5
|
-
margin: 48px;
|
|
6
5
|
padding: 16px 0;
|
|
6
|
+
top: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
margin-top: 30px;
|
|
9
|
+
margin-right: 40px;
|
|
10
|
+
position: absolute;
|
|
11
|
+
border: 0.2px solid rgb(210, 210, 210);
|
|
12
|
+
box-shadow: 1px 5px 5px rgb(226, 221, 221);
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
.ns_access_container h6 {
|
|
@@ -12,6 +12,7 @@ import { NamingConvention } from 'namirasoft-core';
|
|
|
12
12
|
import { IEntityInfo } from '../IEntityInfo';
|
|
13
13
|
import { NSAMessageDialog } from '../main';
|
|
14
14
|
import NSAAccess from '../components/NSAAccess';
|
|
15
|
+
// import NSAAccess from '../components/NSAAccess';
|
|
15
16
|
|
|
16
17
|
export interface NSALayoutProps<EntityType extends { id: string }, EntityTypeInput = EntityType> extends IBaseComponentProps, INSARouterProps
|
|
17
18
|
{
|
|
@@ -56,6 +57,8 @@ export function NSALayout<EntityType extends { id: string }, EntityTypeInput = E
|
|
|
56
57
|
const Message_Dialog = useRef<NSAMessageDialog>(null);
|
|
57
58
|
|
|
58
59
|
const [state, setState] = useState<NSALayoutState>({ showDeleteModal: false });
|
|
60
|
+
const [show, setShow] = useState(false);
|
|
61
|
+
|
|
59
62
|
const hideDeleteModal = () => { setState(prevState => ({ ...prevState, showDeleteModal: false })); };
|
|
60
63
|
const showDeleteModal = () => { setState(prevState => ({ ...prevState, showDeleteModal: true })); };
|
|
61
64
|
|
|
@@ -81,9 +84,9 @@ export function NSALayout<EntityType extends { id: string }, EntityTypeInput = E
|
|
|
81
84
|
{
|
|
82
85
|
src: "https://static.namirasoft.com/image/namirasoft/access/logo/base.png", alt: "Access", onClicked: () =>
|
|
83
86
|
{
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
children: <NSAAccess />,
|
|
87
|
+
setShow(!show)
|
|
88
|
+
}
|
|
89
|
+
// children: <NSAAccess />,
|
|
87
90
|
},
|
|
88
91
|
];
|
|
89
92
|
let name = "";
|
|
@@ -199,6 +202,9 @@ export function NSALayout<EntityType extends { id: string }, EntityTypeInput = E
|
|
|
199
202
|
}} />} />
|
|
200
203
|
{content}
|
|
201
204
|
</div>
|
|
205
|
+
<div style={{ display: show === false ? "none" : "block" }}>
|
|
206
|
+
<NSAAccess />
|
|
207
|
+
</div>
|
|
202
208
|
</NSLayout>
|
|
203
209
|
);
|
|
204
210
|
}
|