namirasoft-site-react 1.2.40 → 1.2.41
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 +3 -3
- package/dist/App.js +8 -8
- package/dist/App.js.map +1 -1
- package/dist/components/NSButtonGreen.d.ts +16 -16
- package/dist/components/NSButtonGreen.js +16 -16
- package/dist/components/NSButtonGreen.js.map +1 -1
- package/dist/components/NSButtonRed.d.ts +16 -16
- package/dist/components/NSButtonRed.js +16 -16
- package/dist/components/NSButtonRed.js.map +1 -1
- package/dist/components/NSCard.d.ts +20 -20
- package/dist/components/NSCard.js +12 -12
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSFooter.d.ts +20 -20
- package/dist/components/NSFooter.js +46 -46
- package/dist/components/NSFooter.js.map +1 -1
- package/dist/components/NSHeader.d.ts +23 -7
- package/dist/components/NSHeader.js +60 -57
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSInputDate.d.ts +15 -15
- package/dist/components/NSInputDate.js +27 -27
- package/dist/components/NSInputDate.js.map +1 -1
- package/dist/components/NSInputDuration.d.ts +15 -15
- package/dist/components/NSInputDuration.js +28 -28
- package/dist/components/NSInputDuration.js.map +1 -1
- package/dist/components/NSInputEmail.d.ts +16 -16
- package/dist/components/NSInputEmail.js +36 -36
- package/dist/components/NSInputEmail.js.map +1 -1
- package/dist/components/NSInputFloat.d.ts +15 -15
- package/dist/components/NSInputFloat.js +28 -28
- package/dist/components/NSInputFloat.js.map +1 -1
- package/dist/components/NSInputIP.d.ts +15 -15
- package/dist/components/NSInputIP.js +28 -28
- package/dist/components/NSInputIP.js.map +1 -1
- package/dist/components/NSInputInteger.d.ts +15 -15
- package/dist/components/NSInputInteger.js +28 -28
- package/dist/components/NSInputInteger.js.map +1 -1
- package/dist/components/NSInputPhone.d.ts +16 -16
- package/dist/components/NSInputPhone.js +30 -30
- package/dist/components/NSInputPhone.js.map +1 -1
- package/dist/components/NSInputPrice.d.ts +17 -17
- package/dist/components/NSInputPrice.js +31 -31
- package/dist/components/NSInputPrice.js.map +1 -1
- package/dist/components/NSInputSearch.d.ts +17 -17
- package/dist/components/NSInputSearch.js +37 -37
- package/dist/components/NSInputSearch.js.map +1 -1
- package/dist/components/NSInputString.d.ts +17 -17
- package/dist/components/NSInputString.js +31 -31
- package/dist/components/NSInputString.js.map +1 -1
- package/dist/components/NSInputText.d.ts +17 -17
- package/dist/components/NSInputText.js +31 -31
- package/dist/components/NSInputText.js.map +1 -1
- package/dist/components/NSInputTime.d.ts +15 -15
- package/dist/components/NSInputTime.js +28 -28
- package/dist/components/NSInputTime.js.map +1 -1
- package/dist/components/NSLayout.d.ts +8 -8
- package/dist/components/NSLayout.js +8 -8
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLayoutHeroBanner.d.ts +12 -12
- package/dist/components/NSLayoutHeroBanner.js +8 -8
- package/dist/components/NSLayoutHeroBanner.js.map +1 -1
- package/dist/components/NSLayoutTitle.d.ts +10 -10
- package/dist/components/NSLayoutTitle.js +6 -6
- package/dist/components/NSLayoutTitle.js.map +1 -1
- package/dist/components/NSLinkGreen.d.ts +16 -16
- package/dist/components/NSLinkGreen.js +20 -20
- package/dist/components/NSLinkGreen.js.map +1 -1
- package/dist/components/NSLinkRed.d.ts +16 -16
- package/dist/components/NSLinkRed.js +20 -20
- package/dist/components/NSLinkRed.js.map +1 -1
- package/dist/components/NSPagination.d.ts +15 -15
- package/dist/components/NSPagination.js +35 -35
- package/dist/components/NSPagination.js.map +1 -1
- package/dist/components/NSSelectBox.d.ts +16 -16
- package/dist/components/NSSelectBox.js +24 -24
- package/dist/components/NSSelectBox.js.map +1 -1
- package/dist/components/NSTable.d.ts +28 -28
- package/dist/components/NSTable.js +20 -20
- package/dist/components/NSTable.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/main.d.ts +26 -26
- package/dist/main.js +26 -26
- package/dist/pages/NSLoginPage.d.ts +13 -13
- package/dist/pages/NSLoginPage.js +17 -17
- package/dist/pages/NSLoginPage.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NSHeader.tsx +85 -73
- package/src/components/NSLayout.tsx +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import "./NSTable.modules.css";
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
interface IProps<RowType> {
|
|
4
|
-
columns: {
|
|
5
|
-
[key: string]: string;
|
|
6
|
-
};
|
|
7
|
-
rows: RowType[];
|
|
8
|
-
getRowKey: (row: RowType, rowIndex: number) => string;
|
|
9
|
-
getColumnAttributes: (column: string, columnIndex: number) => {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
getCell: (row: RowType, 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
|
-
setRows(rows: RowType[]): void;
|
|
26
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
1
|
+
import "./NSTable.modules.css";
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
interface IProps<RowType> {
|
|
4
|
+
columns: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
rows: RowType[];
|
|
8
|
+
getRowKey: (row: RowType, rowIndex: number) => string;
|
|
9
|
+
getColumnAttributes: (column: string, columnIndex: number) => {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
getCell: (row: RowType, 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
|
+
setRows(rows: RowType[]): void;
|
|
26
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import "./NSTable.modules.css";
|
|
4
|
-
import { Component } from 'react';
|
|
5
|
-
export class NSTable extends Component {
|
|
6
|
-
constructor(props) {
|
|
7
|
-
super(props);
|
|
8
|
-
this.state = { columns: props.columns, rows: props.rows };
|
|
9
|
-
}
|
|
10
|
-
setColumns(columns) {
|
|
11
|
-
this.setState({ columns });
|
|
12
|
-
}
|
|
13
|
-
setRows(rows) {
|
|
14
|
-
this.setState({ rows });
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
let column_keys = Object.keys(this.state.columns);
|
|
18
|
-
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))) })] }) }));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import "./NSTable.modules.css";
|
|
4
|
+
import { Component } from 'react';
|
|
5
|
+
export class NSTable extends Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = { columns: props.columns, rows: props.rows };
|
|
9
|
+
}
|
|
10
|
+
setColumns(columns) {
|
|
11
|
+
this.setState({ columns });
|
|
12
|
+
}
|
|
13
|
+
setRows(rows) {
|
|
14
|
+
this.setState({ rows });
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
let column_keys = Object.keys(this.state.columns);
|
|
18
|
+
return (_jsx("div", Object.assign({ className: "project_list_container" }, { children: _jsxs("table", Object.assign({ className: "table" }, { children: [_jsx("thead", Object.assign({ className: "thead" }, { children: _jsx("tr", { children: column_keys.map(column_key => _jsx("th", Object.assign({ scope: "col" }, { children: this.state.columns[column_key] }), column_key)) }) })), _jsx("tbody", Object.assign({ 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))) }))] })) })));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
21
|
//# sourceMappingURL=NSTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,uBAAuB,CAAC;AAC/B,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,IA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AK,EAAC,KAAK,gBAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAvD,UAAU,CAAmD,CAAC,GACrG,IACD,EACR,8BAAO,SAAS,EAAC,OAAO,gBAEhB,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,IAET,KACL,IACL,CACV,CAAA;IACL,CAAC;CACJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import './index.css';
|
|
1
|
+
import './index.css';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import './index.css';
|
|
4
|
-
import { App } from './App';
|
|
5
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
|
-
root.render(_jsx(App, {}));
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import { App } from './App';
|
|
5
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
|
+
root.render(_jsx(App, {}));
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/main.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export * from "./components/NSButtonGreen";
|
|
2
|
-
export * from "./components/NSButtonRed";
|
|
3
|
-
export * from "./components/NSCard";
|
|
4
|
-
export * from "./components/NSFooter";
|
|
5
|
-
export * from "./components/NSHeader";
|
|
6
|
-
export * from "./components/NSInputDate";
|
|
7
|
-
export * from "./components/NSInputDuration";
|
|
8
|
-
export * from "./components/NSInputEmail";
|
|
9
|
-
export * from "./components/NSInputFloat";
|
|
10
|
-
export * from "./components/NSInputIP";
|
|
11
|
-
export * from "./components/NSInputInteger";
|
|
12
|
-
export * from "./components/NSInputPhone";
|
|
13
|
-
export * from "./components/NSInputPrice";
|
|
14
|
-
export * from "./components/NSInputSearch";
|
|
15
|
-
export * from "./components/NSInputString";
|
|
16
|
-
export * from "./components/NSInputText";
|
|
17
|
-
export * from "./components/NSInputTime";
|
|
18
|
-
export * from "./components/NSLayout";
|
|
19
|
-
export * from "./components/NSLayoutHeroBanner";
|
|
20
|
-
export * from "./components/NSLayoutTitle";
|
|
21
|
-
export * from "./components/NSSelectBox";
|
|
22
|
-
export * from "./components/NSLinkGreen";
|
|
23
|
-
export * from "./components/NSLinkRed";
|
|
24
|
-
export * from "./components/NSPagination";
|
|
25
|
-
export * from "./components/NSTable";
|
|
26
|
-
export * from "./pages/NSLoginPage";
|
|
1
|
+
export * from "./components/NSButtonGreen";
|
|
2
|
+
export * from "./components/NSButtonRed";
|
|
3
|
+
export * from "./components/NSCard";
|
|
4
|
+
export * from "./components/NSFooter";
|
|
5
|
+
export * from "./components/NSHeader";
|
|
6
|
+
export * from "./components/NSInputDate";
|
|
7
|
+
export * from "./components/NSInputDuration";
|
|
8
|
+
export * from "./components/NSInputEmail";
|
|
9
|
+
export * from "./components/NSInputFloat";
|
|
10
|
+
export * from "./components/NSInputIP";
|
|
11
|
+
export * from "./components/NSInputInteger";
|
|
12
|
+
export * from "./components/NSInputPhone";
|
|
13
|
+
export * from "./components/NSInputPrice";
|
|
14
|
+
export * from "./components/NSInputSearch";
|
|
15
|
+
export * from "./components/NSInputString";
|
|
16
|
+
export * from "./components/NSInputText";
|
|
17
|
+
export * from "./components/NSInputTime";
|
|
18
|
+
export * from "./components/NSLayout";
|
|
19
|
+
export * from "./components/NSLayoutHeroBanner";
|
|
20
|
+
export * from "./components/NSLayoutTitle";
|
|
21
|
+
export * from "./components/NSSelectBox";
|
|
22
|
+
export * from "./components/NSLinkGreen";
|
|
23
|
+
export * from "./components/NSLinkRed";
|
|
24
|
+
export * from "./components/NSPagination";
|
|
25
|
+
export * from "./components/NSTable";
|
|
26
|
+
export * from "./pages/NSLoginPage";
|
package/dist/main.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export * from "./components/NSButtonGreen";
|
|
2
|
-
export * from "./components/NSButtonRed";
|
|
3
|
-
export * from "./components/NSCard";
|
|
4
|
-
export * from "./components/NSFooter";
|
|
5
|
-
export * from "./components/NSHeader";
|
|
6
|
-
export * from "./components/NSInputDate";
|
|
7
|
-
export * from "./components/NSInputDuration";
|
|
8
|
-
export * from "./components/NSInputEmail";
|
|
9
|
-
export * from "./components/NSInputFloat";
|
|
10
|
-
export * from "./components/NSInputIP";
|
|
11
|
-
export * from "./components/NSInputInteger";
|
|
12
|
-
export * from "./components/NSInputPhone";
|
|
13
|
-
export * from "./components/NSInputPrice";
|
|
14
|
-
export * from "./components/NSInputSearch";
|
|
15
|
-
export * from "./components/NSInputString";
|
|
16
|
-
export * from "./components/NSInputText";
|
|
17
|
-
export * from "./components/NSInputTime";
|
|
18
|
-
export * from "./components/NSLayout";
|
|
19
|
-
export * from "./components/NSLayoutHeroBanner";
|
|
20
|
-
export * from "./components/NSLayoutTitle";
|
|
21
|
-
export * from "./components/NSSelectBox";
|
|
22
|
-
export * from "./components/NSLinkGreen";
|
|
23
|
-
export * from "./components/NSLinkRed";
|
|
24
|
-
export * from "./components/NSPagination";
|
|
25
|
-
export * from "./components/NSTable";
|
|
26
|
-
export * from "./pages/NSLoginPage";
|
|
1
|
+
export * from "./components/NSButtonGreen";
|
|
2
|
+
export * from "./components/NSButtonRed";
|
|
3
|
+
export * from "./components/NSCard";
|
|
4
|
+
export * from "./components/NSFooter";
|
|
5
|
+
export * from "./components/NSHeader";
|
|
6
|
+
export * from "./components/NSInputDate";
|
|
7
|
+
export * from "./components/NSInputDuration";
|
|
8
|
+
export * from "./components/NSInputEmail";
|
|
9
|
+
export * from "./components/NSInputFloat";
|
|
10
|
+
export * from "./components/NSInputIP";
|
|
11
|
+
export * from "./components/NSInputInteger";
|
|
12
|
+
export * from "./components/NSInputPhone";
|
|
13
|
+
export * from "./components/NSInputPrice";
|
|
14
|
+
export * from "./components/NSInputSearch";
|
|
15
|
+
export * from "./components/NSInputString";
|
|
16
|
+
export * from "./components/NSInputText";
|
|
17
|
+
export * from "./components/NSInputTime";
|
|
18
|
+
export * from "./components/NSLayout";
|
|
19
|
+
export * from "./components/NSLayoutHeroBanner";
|
|
20
|
+
export * from "./components/NSLayoutTitle";
|
|
21
|
+
export * from "./components/NSSelectBox";
|
|
22
|
+
export * from "./components/NSLinkGreen";
|
|
23
|
+
export * from "./components/NSLinkRed";
|
|
24
|
+
export * from "./components/NSPagination";
|
|
25
|
+
export * from "./components/NSTable";
|
|
26
|
+
export * from "./pages/NSLoginPage";
|
|
27
27
|
//# sourceMappingURL=main.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./NSLoginPage.modules.css";
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
interface IProps {
|
|
4
|
-
title: string;
|
|
5
|
-
logo: string;
|
|
6
|
-
background: string;
|
|
7
|
-
href?: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
|
-
}
|
|
10
|
-
export declare class NSLoginPage extends Component<IProps> {
|
|
11
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
1
|
+
import "./NSLoginPage.modules.css";
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
interface IProps {
|
|
4
|
+
title: string;
|
|
5
|
+
logo: string;
|
|
6
|
+
background: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare class NSLoginPage extends Component<IProps> {
|
|
11
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import "./NSLoginPage.modules.css";
|
|
4
|
-
import { Component } from 'react';
|
|
5
|
-
import { NSButtonGreen } from "../main";
|
|
6
|
-
import { NSLinkGreen } from "../main";
|
|
7
|
-
export class NSLoginPage extends Component {
|
|
8
|
-
render() {
|
|
9
|
-
var _a;
|
|
10
|
-
let button = _jsx(_Fragment, {});
|
|
11
|
-
if (this.props.href)
|
|
12
|
-
button = _jsx(NSLinkGreen, { title: "Login", href: (_a = this.props.href) !== null && _a !== void 0 ? _a : "" });
|
|
13
|
-
else if (this.props.onClick)
|
|
14
|
-
button = _jsx(NSButtonGreen, { title: "Login", onClick: this.props.onClick });
|
|
15
|
-
return (_jsx("div", { style: { backgroundImage: this.props.background }, children: _jsxs("div", { className: "d-flex flex-column align-items-center justify-content-center", style: { marginTop: "100px" }, children: [_jsx("div", { className: "m-auto", children: _jsx("img", { width: 256, height: 256, src: this.props.logo, alt: "logo" }) }), _jsx("div", { children: _jsx("h1", { className: "text-light text-center mb-3", children: this.props.title }) }), _jsx("div", { className: "m-auto", children: button })] }) }));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import "./NSLoginPage.modules.css";
|
|
4
|
+
import { Component } from 'react';
|
|
5
|
+
import { NSButtonGreen } from "../main";
|
|
6
|
+
import { NSLinkGreen } from "../main";
|
|
7
|
+
export class NSLoginPage extends Component {
|
|
8
|
+
render() {
|
|
9
|
+
var _a;
|
|
10
|
+
let button = _jsx(_Fragment, {});
|
|
11
|
+
if (this.props.href)
|
|
12
|
+
button = _jsx(NSLinkGreen, { title: "Login", href: (_a = this.props.href) !== null && _a !== void 0 ? _a : "" });
|
|
13
|
+
else if (this.props.onClick)
|
|
14
|
+
button = _jsx(NSButtonGreen, { title: "Login", onClick: this.props.onClick });
|
|
15
|
+
return (_jsx("div", Object.assign({ style: { backgroundImage: this.props.background } }, { children: _jsxs("div", Object.assign({ className: "d-flex flex-column align-items-center justify-content-center", style: { marginTop: "100px" } }, { children: [_jsx("div", Object.assign({ className: "m-auto" }, { children: _jsx("img", { width: 256, height: 256, src: this.props.logo, alt: "logo" }) })), _jsx("div", { children: _jsx("h1", Object.assign({ className: "text-light text-center mb-3" }, { children: this.props.title })) }), _jsx("div", Object.assign({ className: "m-auto" }, { children: button }))] })) })));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=NSLoginPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLoginPage.js","sourceRoot":"","sources":["../../src/pages/NSLoginPage.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAWtC,MAAM,OAAO,WAAY,SAAQ,SAAiB;IAErC,MAAM;;QAEX,IAAI,MAAM,GAAG,mBAAK,CAAC;QACnB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;YACf,MAAM,GAAG,KAAC,WAAW,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,GAAI,CAAC;aACnE,IAAI,IAAI,CAAC,KAAK,CAAC,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E,IAAI,CAAC,KAAK,CAAC,KAAK,IAAM,GAAM,EAC9E,4BAAK,SAAS,EAAC,QAAQ,gBAClB,MAAM,IACL,KACJ,IACJ,CACT,CAAC;IACN,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import React from "react";
|
|
4
4
|
import Styles from "./NSHeader.module.css";
|
|
5
5
|
|
|
6
6
|
import NavDropdown from 'react-bootstrap/NavDropdown';
|
|
@@ -15,65 +15,109 @@ interface IProps
|
|
|
15
15
|
|
|
16
16
|
interface IState
|
|
17
17
|
{
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
filters: FilterLinkRow[];
|
|
19
|
+
selected: FilterLinkRow | null;
|
|
20
|
+
showNavbar: boolean;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
export class NSHeader extends React.Component<IProps, IState> {
|
|
24
|
+
constructor(props: IProps)
|
|
25
|
+
{
|
|
26
|
+
super(props);
|
|
27
|
+
this.state = {
|
|
28
|
+
filters: [],
|
|
29
|
+
selected: null,
|
|
30
|
+
showNavbar: false
|
|
31
|
+
};
|
|
32
|
+
this.hasChild = this.hasChild.bind(this);
|
|
33
|
+
this.onMenuItemToggled = this.onMenuItemToggled.bind(this);
|
|
34
|
+
this.render_menu = this.render_menu.bind(this);
|
|
35
|
+
this.render_menuItem = this.render_menuItem.bind(this);
|
|
36
|
+
this.handleShowNavbar = this.handleShowNavbar.bind(this);
|
|
37
|
+
}
|
|
38
|
+
override componentDidMount(): void
|
|
39
|
+
{
|
|
40
|
+
let server = new NamirasoftAPILinkServer(console.error);
|
|
41
|
+
server.filter.GetFilters(this.props.scope, this.props.name).then(filters =>
|
|
42
|
+
{
|
|
43
|
+
this.setState({ filters });
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
private onMenuItemToggled(checked: boolean, selected: FilterLinkRow)
|
|
33
47
|
{
|
|
34
48
|
if (checked)
|
|
35
|
-
setState({ selected });
|
|
49
|
+
this.setState({ selected });
|
|
36
50
|
}
|
|
37
|
-
|
|
51
|
+
private hasChild(id: number): boolean
|
|
38
52
|
{
|
|
39
|
-
|
|
40
|
-
return filters.filter(f => f.parent_id === id).length > 0;
|
|
41
|
-
return false;
|
|
53
|
+
return this.state.filters.filter(f => f.parent_id === id).length > 0;
|
|
42
54
|
}
|
|
43
|
-
|
|
55
|
+
handleShowNavbar(): void
|
|
44
56
|
{
|
|
45
|
-
setState({ showNavbar: !state.showNavbar });
|
|
57
|
+
this.setState({ showNavbar: !this.state.showNavbar });
|
|
46
58
|
}
|
|
47
|
-
|
|
59
|
+
override render()
|
|
48
60
|
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
return (
|
|
62
|
+
<nav className={Styles.ns_navbar}>
|
|
63
|
+
<div className={`${Styles.ns_navbar_parent_content} container`}>
|
|
64
|
+
<img
|
|
65
|
+
src={this.props.logo}
|
|
66
|
+
alt="Logo"
|
|
67
|
+
width={48}
|
|
68
|
+
height={48}
|
|
69
|
+
/>
|
|
70
|
+
<div className={`${Styles.ns_navbar_content} `} >
|
|
71
|
+
<div className={`${Styles.ns_navbar_elements} ${this.state.showNavbar && Styles.ns_navbar_active}`}>
|
|
72
|
+
{this.render_menu(0, null)}
|
|
73
|
+
</div>
|
|
74
|
+
<div className={`${Styles.ns_navbar_login_status}`}>
|
|
75
|
+
<span className={`${Styles.ns_navbar_usersname}`}>name</span>
|
|
76
|
+
<img src='../assets/images/exit.svg'
|
|
77
|
+
alt="Exit"
|
|
78
|
+
width={20}
|
|
79
|
+
height={20}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
<div className={Styles.ns_navbar_menu_icon} onClick={this.handleShowNavbar}>
|
|
83
|
+
<img
|
|
84
|
+
src='../assets/images/menu.svg'
|
|
85
|
+
alt="Menu"
|
|
86
|
+
width={19}
|
|
87
|
+
height={17}
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
54
91
|
</div>
|
|
55
|
-
|
|
56
|
-
|
|
92
|
+
</nav>
|
|
93
|
+
);
|
|
57
94
|
}
|
|
58
|
-
|
|
95
|
+
private render_menu(level: number, parent_id: number | null)
|
|
59
96
|
{
|
|
60
|
-
|
|
97
|
+
let fs: FilterLinkRow[] = this.state.filters?.filter(f => f.parent_id === parent_id);
|
|
98
|
+
return (
|
|
99
|
+
<div className={`me-auto nav ${Styles.ns_navbar_items_container}`} >
|
|
100
|
+
{(fs?.map(f => this.render_menuItem(level, f)))}
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
private render_menuItem(level: number, filter: FilterLinkRow)
|
|
105
|
+
{
|
|
106
|
+
if (this.hasChild(filter.id))
|
|
61
107
|
{
|
|
62
108
|
let sub_menus = <></>;
|
|
63
109
|
if (level === 0)
|
|
64
|
-
if (state.selected)
|
|
110
|
+
if (this.state.selected)
|
|
65
111
|
{
|
|
66
112
|
sub_menus =
|
|
67
113
|
<div
|
|
68
114
|
id={`dropdown_items${filter.id}`}>
|
|
69
|
-
{
|
|
70
|
-
render_menu(1, state.selected.id)
|
|
71
|
-
}
|
|
115
|
+
{this.render_menu(1, this.state.selected.id)}
|
|
72
116
|
</div >
|
|
73
117
|
}
|
|
74
118
|
return (<>
|
|
75
119
|
<NavDropdown
|
|
76
|
-
onToggle={(checked) => onMenuItemToggled(checked, filter)}
|
|
120
|
+
onToggle={(checked) => this.onMenuItemToggled(checked, filter)}
|
|
77
121
|
className={level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item}
|
|
78
122
|
title={filter.name}
|
|
79
123
|
id={`dropdown_parent${filter.id}`}>
|
|
@@ -81,43 +125,11 @@ export async function NSHeader(props: IProps)
|
|
|
81
125
|
</NavDropdown >
|
|
82
126
|
</>
|
|
83
127
|
);
|
|
128
|
+
} else
|
|
129
|
+
{
|
|
130
|
+
return (
|
|
131
|
+
<a className={`${Styles.ns_navbar_items_link} ${level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item}`} href={filter.link?.url}>{filter.name}</a>
|
|
132
|
+
);
|
|
84
133
|
}
|
|
85
|
-
return (
|
|
86
|
-
<a className={`${Styles.ns_navbar_items_link} ${level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item}`} href={filter.link?.url}>{filter.name}</a>
|
|
87
|
-
);
|
|
88
134
|
}
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<nav className={Styles.ns_navbar}>
|
|
92
|
-
<div className={`${Styles.ns_navbar_parent_content} container`}>
|
|
93
|
-
<img
|
|
94
|
-
src={props.logo}
|
|
95
|
-
alt="Logo"
|
|
96
|
-
width={48}
|
|
97
|
-
height={48}
|
|
98
|
-
/>
|
|
99
|
-
<div className={`${Styles.ns_navbar_content} `} >
|
|
100
|
-
<div className={`${Styles.ns_navbar_elements} ${state.showNavbar && Styles.ns_navbar_active}`}>
|
|
101
|
-
{render_menu(0, null)}
|
|
102
|
-
</div>
|
|
103
|
-
<div className={`${Styles.ns_navbar_login_status}`}>
|
|
104
|
-
<span className={`${Styles.ns_navbar_usersname}`}>name</span>
|
|
105
|
-
<img src='../assets/images/exit.svg'
|
|
106
|
-
alt="Exit"
|
|
107
|
-
width={20}
|
|
108
|
-
height={20}
|
|
109
|
-
/>
|
|
110
|
-
</div>
|
|
111
|
-
<div className={Styles.ns_navbar_menu_icon} onClick={toggleNavbar}>
|
|
112
|
-
<img
|
|
113
|
-
src='../assets/images/menu.svg'
|
|
114
|
-
alt="Menu"
|
|
115
|
-
width={19}
|
|
116
|
-
height={17}
|
|
117
|
-
/>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</nav>
|
|
122
|
-
);
|
|
123
135
|
}
|
|
@@ -18,7 +18,6 @@ export function NSLayout(props: IProps)
|
|
|
18
18
|
return (
|
|
19
19
|
<div className={Styles.ns_container}>
|
|
20
20
|
<header className={Styles.ns_header}>
|
|
21
|
-
{/* @ts-expect-error Server Component */}
|
|
22
21
|
<NSHeader scope={props.scope} name="Header" logo={props.logo} />
|
|
23
22
|
</header>
|
|
24
23
|
<main className="d-flex flex-column text-white">
|