namirasoft-site-react 1.3.237 → 1.3.238
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 +1 -1
- package/dist/components/NSModal.js +1 -2
- package/dist/components/NSModal.js.map +1 -1
- package/dist/components/NSPagination.js +4 -3
- package/dist/components/NSPagination.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +2 -2
- package/src/components/NSModal.tsx +1 -7
- package/src/components/NSPagination.tsx +4 -2
package/dist/App.js
CHANGED
|
@@ -58,6 +58,6 @@ export function App() {
|
|
|
58
58
|
return (_jsx(_Fragment, { children: _jsxs(NSLayout, { header: {
|
|
59
59
|
title: "any",
|
|
60
60
|
icons: icons
|
|
61
|
-
}, scope: "Namirasoft Account Console", logo: "exampleLogoUrl", notifications: [], background: "", children: [_jsxs(_Fragment, { children: [_jsx(NSTabPage, { tabs: tabs }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSPagination, { pageSize: 5, totalItems: 100, currentPage: 15, onPageChange: () => { } })] }), _jsx(NSTable, { columns: getColumns(), getColumnAttributes: () => { return {}; }, getRowKey: () => "", pageSize:
|
|
61
|
+
}, scope: "Namirasoft Account Console", logo: "exampleLogoUrl", notifications: [], background: "", children: [_jsxs(_Fragment, { children: [_jsx(NSTabPage, { tabs: tabs }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSPagination, { pageSize: 5, totalItems: 100, currentPage: 15, onPageChange: () => { } })] }), _jsx(NSTable, { columns: getColumns(), getColumnAttributes: () => { return {}; }, getRowKey: () => "", pageSize: 20, totalItems: 10, reload: () => { } }), _jsx(NSBarAction, { title: '', menus: group }), _jsx(NSBoxEmail, { title: 'Email', required: true }), _jsx(NSBoxString, { title: 'String', required: true }), _jsx(NSRadioButton, { title: "Radio Button" }), _jsx(NSSpace, { size: NSSpaceSizeType.LARGE }), _jsx(NSTag, {})] }) }));
|
|
62
62
|
}
|
|
63
63
|
//# sourceMappingURL=App.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { NSSpace, NSSpaceSizeType, NSTitle } from "../main";
|
|
3
3
|
import Styles from './NSModal.module.css';
|
|
4
|
-
import NSButton from "./NSButton";
|
|
5
4
|
export function NSModal(props) {
|
|
6
5
|
var _a;
|
|
7
6
|
const handleModalClick = (event) => {
|
|
@@ -9,6 +8,6 @@ export function NSModal(props) {
|
|
|
9
8
|
};
|
|
10
9
|
return (_jsx("div", { onClick: props.onClose, children: _jsx("section", { id: props.id, className: `${props.show ? Styles.ns_show : Styles.ns_hide}
|
|
11
10
|
${Styles.ns_modal}
|
|
12
|
-
${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, onClick: props.onClose, children:
|
|
11
|
+
${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, onClick: props.onClose, children: _jsx("div", { className: Styles.ns_modal_container, onClick: handleModalClick, children: _jsxs("div", { className: Styles.ns_modal_content, children: [props.title && (_jsxs(_Fragment, { children: [_jsx(NSTitle, { title: props.title, style: { marginBottom: "0" } }), _jsx(NSSpace, { size: NSSpaceSizeType.NORMAL })] })), props.description && (_jsx("div", { children: _jsx("p", { style: { marginBottom: "0" }, className: Styles.ns_modal_description, children: props.description }) })), props.children && (_jsx("div", { children: props.children }))] }) }) }) }));
|
|
13
12
|
}
|
|
14
13
|
//# sourceMappingURL=NSModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSModal.js","sourceRoot":"","sources":["../../src/components/NSModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,MAAM,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSModal.js","sourceRoot":"","sources":["../../src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ACN,IACI,GACD,GACG,GACL,CACN,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { NSBoxEnum } from './NSBoxEnum';
|
|
3
3
|
import Styles from './NSPagination.module.css';
|
|
4
|
+
let pageNumber = ["10", "25", "50", "100", "200", "500"];
|
|
4
5
|
export function NSPagination(props) {
|
|
5
6
|
var _a;
|
|
6
7
|
const { pageSize, totalItems, currentPage, onPageChange } = props;
|
|
@@ -21,7 +22,7 @@ export function NSPagination(props) {
|
|
|
21
22
|
e.preventDefault();
|
|
22
23
|
if (currentPage > 1)
|
|
23
24
|
onPageChange(currentPage - 1);
|
|
24
|
-
}, children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/arrow/left/white-blue.svg", alt: "left_vector", width: 32, height: 32 }) }) }, "prev"));
|
|
25
|
+
}, children: _jsx("img", { style: { margin: "0 8px 0 0" }, src: "https://static.namirasoft.com/image/concept/arrow/left/white-blue.svg", alt: "left_vector", width: 32, height: 32 }) }) }, "prev"));
|
|
25
26
|
pushPage(1);
|
|
26
27
|
if (currentPage > windowSize + 2) {
|
|
27
28
|
pages.push(_jsx("div", { className: Styles.ns_pagination_left_ellipses, children: _jsx("a", { href: "#", className: `${Styles.ns_paginate_link}`, onClick: (e) => e.preventDefault(), children: "..." }) }, "ellipsis1"));
|
|
@@ -38,7 +39,7 @@ export function NSPagination(props) {
|
|
|
38
39
|
e.preventDefault();
|
|
39
40
|
if (currentPage < totalPages)
|
|
40
41
|
onPageChange(currentPage + 1);
|
|
41
|
-
}, children: _jsx("img", { src: "https://static.namirasoft.com/image/concept/arrow/right/white-blue.svg", width: 32, height: 32, alt: "right_vector" }) }) }, "next"));
|
|
42
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { id: props.id, className: `${Styles.ns_pagination_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(' ')}`, style: props.style, children: [pages, _jsxs("div", { className: Styles.ns_pagination_info, children: [_jsx("div", { style: { width: 65 }, children: _jsx(NSBoxEnum, { title: '', multiple: true, required: false, options:
|
|
42
|
+
}, children: _jsx("img", { style: { margin: "0 0 0 8px" }, src: "https://static.namirasoft.com/image/concept/arrow/right/white-blue.svg", width: 32, height: 32, alt: "right_vector" }) }) }, "next"));
|
|
43
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { id: props.id, className: `${Styles.ns_pagination_container} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(' ')}`, style: props.style, children: [pages, _jsxs("div", { className: Styles.ns_pagination_info, children: [_jsx("div", { style: { width: 65 }, children: _jsx(NSBoxEnum, { title: '', multiple: true, required: false, options: pageNumber.map(pages => { return { desc: pages, value: pages }; }) }) }), _jsx("h6", { children: `(${current_min} - ${current_max}) of ${totalItems}` })] })] }) }));
|
|
43
44
|
}
|
|
44
45
|
//# sourceMappingURL=NSPagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSPagination.js","sourceRoot":"","sources":["../../src/components/NSPagination.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,MAAM,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"NSPagination.js","sourceRoot":"","sources":["../../src/components/NSPagination.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAS/C,IAAI,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;AACxD,MAAM,UAAU,YAAY,CAAC,KAAyB;;IAElD,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,UAAU,GAAG,IAAI,CAAC,IA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UAAU;oBACxB,YAAY,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;YACtC,CAAC,YAED,cACI,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAC9B,GAAG,EAAC,wEAAwE,EAC5E,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,GAAG,EAAC,cAAc,GACpB,GACF,IAjBC,MAAM,CAkBT,CACT,CAAC;IACF,OAAO,CACH,4BACI,eACI,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,GAAG,MAAM,CAAC,uBAAuB,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC5E,KAAK,EAAE,KAAK,CAAC,KAAK,aAEjB,KAAK,EACN,eAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,aACrC,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,YACrB,KAAC,SAAS,IACN,KAAK,EAAC,EAAE,EACR,QAAQ,QACR,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA,CAAC,CAAC,CAAC,GAC5E,GACA,EACN,uBACK,IAAI,WAAW,MAAM,WAAW,QAAQ,UAAU,EAAE,GACpD,IACH,IACJ,GAEP,CACN,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -101,8 +101,8 @@ export function App()
|
|
|
101
101
|
columns={getColumns()}
|
|
102
102
|
getColumnAttributes={() => { return {} }}
|
|
103
103
|
getRowKey={() => ""}
|
|
104
|
-
pageSize={
|
|
105
|
-
totalItems={
|
|
104
|
+
pageSize={20}
|
|
105
|
+
totalItems={10}
|
|
106
106
|
reload={() => { }}
|
|
107
107
|
/>
|
|
108
108
|
<NSBarAction title='' menus={group} />
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IBaseComponentProps, NSSpace, NSSpaceSizeType, NSTitle } from "../main";
|
|
2
2
|
import Styles from './NSModal.module.css';
|
|
3
|
-
import NSButton from "./NSButton";
|
|
4
3
|
export interface INSModalProps extends IBaseComponentProps
|
|
5
4
|
{
|
|
6
5
|
title?: string;
|
|
@@ -26,15 +25,10 @@ export function NSModal(props: INSModalProps)
|
|
|
26
25
|
onClick={props.onClose}
|
|
27
26
|
>
|
|
28
27
|
<div className={Styles.ns_modal_container} onClick={handleModalClick}>
|
|
29
|
-
<NSButton
|
|
30
|
-
onClick={props.onClose}
|
|
31
|
-
icon={{ src: "https://static.namirasoft.com/image/concept/close/white.svg", alt: "close modal" }}
|
|
32
|
-
classList={[Styles.ns_close_modal]}
|
|
33
|
-
/>
|
|
34
28
|
<div className={Styles.ns_modal_content}>
|
|
35
29
|
{props.title && (
|
|
36
30
|
<>
|
|
37
|
-
<NSTitle title={props.title} style={{marginBottom
|
|
31
|
+
<NSTitle title={props.title} style={{ marginBottom: "0" }} />
|
|
38
32
|
<NSSpace size={NSSpaceSizeType.NORMAL} />
|
|
39
33
|
</>
|
|
40
34
|
)}
|
|
@@ -9,7 +9,7 @@ export interface INSPaginationProps extends IBaseComponentProps
|
|
|
9
9
|
currentPage: number;
|
|
10
10
|
onPageChange: (page: number) => void;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
let pageNumber = ["10", "25", "50", "100", "200", "500"]
|
|
13
13
|
export function NSPagination(props: INSPaginationProps)
|
|
14
14
|
{
|
|
15
15
|
const { pageSize, totalItems, currentPage, onPageChange } = props;
|
|
@@ -52,6 +52,7 @@ export function NSPagination(props: INSPaginationProps)
|
|
|
52
52
|
}}
|
|
53
53
|
>
|
|
54
54
|
<img
|
|
55
|
+
style={{ margin: "0 8px 0 0" }}
|
|
55
56
|
src="https://static.namirasoft.com/image/concept/arrow/left/white-blue.svg"
|
|
56
57
|
alt="left_vector"
|
|
57
58
|
width={32}
|
|
@@ -98,6 +99,7 @@ export function NSPagination(props: INSPaginationProps)
|
|
|
98
99
|
}}
|
|
99
100
|
>
|
|
100
101
|
<img
|
|
102
|
+
style={{ margin: "0 0 0 8px" }}
|
|
101
103
|
src="https://static.namirasoft.com/image/concept/arrow/right/white-blue.svg"
|
|
102
104
|
width={32}
|
|
103
105
|
height={32}
|
|
@@ -120,7 +122,7 @@ export function NSPagination(props: INSPaginationProps)
|
|
|
120
122
|
title=''
|
|
121
123
|
multiple
|
|
122
124
|
required={false}
|
|
123
|
-
options={
|
|
125
|
+
options={pageNumber.map(pages => { return { desc: pages, value: pages } })}
|
|
124
126
|
/>
|
|
125
127
|
</div>
|
|
126
128
|
<h6>
|