namirasoft-account-react 1.3.27 → 1.3.30

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import './App.css';
3
- import { NSALoginPage, NSALayoutAction } from './main';
3
+ import { NSALoginPage, NSALayoutAction, NSADeleteModal } from './main';
4
+ import { useState } from "react";
4
5
  const actions = [
5
6
  {
6
7
  group: "actions",
@@ -44,7 +45,11 @@ const actions = [
44
45
  }
45
46
  ];
46
47
  export function App() {
47
- return (_jsxs(_Fragment, { children: [_jsx(NSALoginPage, { title: "Namirasoft Payment", logo: "Logo", background: "https://static.namirasoft.com/image/namirasoft/account/background/base.svg" }), _jsx(NSALayoutAction, { scope: 'Namirasoft Account Console', logo: 'https://static.namirasoft.com/image/namirasoft/account/logo/base.png', background: "url('https://static.namirasoft.com/image/namirasoft/account/background/base.svg')", title: 'test', description: 'You\u2019re not a Premium user yet. It takes us 10 to 30 days to make you Premium.', notifications: [], actions: actions, children: _jsx("p", { children: "test" }) })] }));
48
+ const [showModal, setshowModal] = useState(false);
49
+ const handleModal = () => {
50
+ setshowModal(!showModal);
51
+ };
52
+ return (_jsxs(_Fragment, { children: [_jsx(NSALoginPage, { title: "Namirasoft Payment", logo: "Logo", background: "https://static.namirasoft.com/image/namirasoft/account/background/base.svg" }), _jsx(NSALayoutAction, { scope: 'Namirasoft Account Console', logo: 'https://static.namirasoft.com/image/namirasoft/account/logo/base.png', background: "url('https://static.namirasoft.com/image/namirasoft/account/background/base.svg')", title: 'test', description: 'You\u2019re not a Premium user yet. It takes us 10 to 30 days to make you Premium.', notifications: [], actions: actions, children: _jsx("p", { children: "test" }) }), _jsx(NSADeleteModal, { title: "string", description: "string", show: showModal, onYes: () => { }, onNo: handleModal })] }));
48
53
  }
49
54
  ;
50
55
  //# sourceMappingURL=App.js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,MAAM,EACX,UAAU,EAAC,4EAA4E,GAAG,EAC9F,KAAC,eAAe,IACZ,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,sEAAsE,EAC3E,UAAU,EAAC,mFAAmF,EAC9F,KAAK,EAAC,MAAM,EACZ,WAAW,EAAC,oFAA+E,EAC3F,aAAa,EAAE,EAAE,EACjB,OAAO,EAAE,OAAO,YAEhB,+BAAW,GACG,EAClB,KAAC,cAAc,IACX,KAAK,EAAC,QAAQ,EACd,WAAW,EAAC,QAAQ,EACpB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAChB,IAAI,EAAE,WAAW,GACnB,IACH,CACN,CAAC;AACN,CAAC;AAAA,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface NSADeleteModalProps {
2
+ title: string;
3
+ description: string;
4
+ show: boolean;
5
+ onYes: () => void;
6
+ onNo: () => void;
7
+ }
8
+ export declare function NSADeleteModal(props: NSADeleteModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { NSModal } from 'namirasoft-site-react';
3
+ import { NSButtonGreen, NSButtonRed, NSSpace, NSSpaceSizeType } from "namirasoft-site-react";
4
+ export function NSADeleteModal(props) {
5
+ return (_jsx(NSModal, { title: props.title, description: props.description, show: props.show, onClose: props.onNo, children: _jsxs("div", { children: [_jsx(NSButtonGreen, { title: "Yes", onClick: props.onYes }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx(NSButtonRed, { title: "No", onClick: props.onNo })] }) }));
6
+ }
7
+ //# sourceMappingURL=NSADeleteModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSADeleteModal.js","sourceRoot":"","sources":["../../src/components/NSADeleteModal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAW7F,MAAM,UAAU,cAAc,CAAC,KAA0B;IAErD,OAAO,CACH,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EACzE,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,QAAQ,EACzB,0BACI,KAAC,aAAa,IAAC,KAAK,EAAC,KAAK,EAAC,OAAO,EAAE,KAAK,CAAC,KAAK,GAAI,EACnD,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAY,EAChD,KAAC,WAAW,IAAC,KAAK,EAAC,IAAI,EAAC,OAAO,EAAE,KAAK,CAAC,IAAI,GAAI,IAC7C,GAAI,CACrB,CAAC;AACN,CAAC"}
File without changes
@@ -1,6 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { NSLayoutAction } from 'namirasoft-site-react';
3
3
  export function NSALayoutAction(props) {
4
- return (_jsx(NSLayoutAction, { scope: props.scope, logo: props.logo, background: props.background, title: props.title, description: props.description, actions: props.actions, notifications: props.notifications, children: _jsx("div", { className: "container-fluid", children: props.children }) }));
4
+ const onLogout = () => {
5
+ console.log("clicked");
6
+ };
7
+ const onNotiffication = () => {
8
+ console.log("clicked");
9
+ };
10
+ let icons = [
11
+ { src: "https://static.namirasoft.com/image/concept/logout/white.svg", alt: "", onClicked: onLogout, },
12
+ { src: "https://static.namirasoft.com/image/concept/message/white.svg", alt: "", onClicked: onNotiffication, count: 1 },
13
+ ];
14
+ return (_jsx(NSLayoutAction, { header: {
15
+ title: "",
16
+ icons
17
+ }, scope: props.scope, logo: props.logo, background: props.background, title: props.title, description: props.description, actions: props.actions, notifications: props.notifications, children: _jsx("div", { className: "container-fluid", children: props.children }) }));
5
18
  }
6
19
  //# sourceMappingURL=NSALayoutAction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSALayoutAction.js","sourceRoot":"","sources":["../../src/components/NSALayoutAction.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD,MAAM,UAAU,eAAe,CAAC,KAA2B;IAEvD,OAAO,CACH,KAAC,cAAc,IACX,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,aAAa,EAAE,KAAK,CAAC,aAAa,YAElC,cAAK,SAAS,EAAC,iBAAiB,YAC3B,KAAK,CAAC,QAAQ,GACb,GACO,CACpB,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"NSALayoutAction.js","sourceRoot":"","sources":["../../src/components/NSALayoutAction.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD,MAAM,UAAU,eAAe,CAAC,KAA2B;IAE1D,MAAM,QAAQ,GAAG,GAAG,EAAE;QAErB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,MAAM,eAAe,GAAG,GAAG,EAAE;QAE5B,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACvB,CAAC,CAAA;IAED,IAAI,KAAK,GAAG;QACX,EAAE,GAAG,EAAE,8DAA8D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,GAAG;QACtG,EAAE,GAAG,EAAE,+DAA+D,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE;KACvH,CAAC;IAEF,OAAO,CACN,KAAC,cAAc,IACd,MAAM,EACL;YACC,KAAK,EAAE,EAAE;YACT,KAAK;SACL,EAEF,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,aAAa,EAAE,KAAK,CAAC,aAAa,YAElC,cAAK,SAAS,EAAC,iBAAiB,YAC9B,KAAK,CAAC,QAAQ,GACV,GACU,CACjB,CAAC;AACH,CAAC"}
package/dist/main.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from "./INSARouterState";
5
5
  export * from "./NSARouterMaker";
6
6
  export * from "./pages/NSALoginPage";
7
7
  export * from "./components/NSALayoutAction";
8
+ export * from "./components/NSADeleteModal";
package/dist/main.js CHANGED
@@ -5,4 +5,5 @@ export * from "./INSARouterState";
5
5
  export * from "./NSARouterMaker";
6
6
  export * from "./pages/NSALoginPage";
7
7
  export * from "./components/NSALayoutAction";
8
+ export * from "./components/NSADeleteModal";
8
9
  //# 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,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,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.27",
11
+ "version": "1.3.30",
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.22",
27
+ "namirasoft-account": "^1.3.24",
28
28
  "namirasoft-account-client": "^1.3.0",
29
- "namirasoft-account-react": "^1.3.25",
30
- "namirasoft-core": "^1.3.41",
31
- "namirasoft-site-react": "^1.3.169",
29
+ "namirasoft-account-react": "^1.3.27",
30
+ "namirasoft-core": "^1.3.46",
31
+ "namirasoft-site-react": "^1.3.170",
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,5 +1,6 @@
1
1
  import './App.css';
2
- import { NSALoginPage, NSALayoutAction } from './main';
2
+ import { NSALoginPage, NSALayoutAction, NSADeleteModal } from './main';
3
+ import { useState } from "react";
3
4
 
4
5
  const actions = [
5
6
  {
@@ -53,6 +54,11 @@ const actions = [
53
54
  ]
54
55
  export function App()
55
56
  {
57
+ const [showModal, setshowModal] = useState<boolean>(false);
58
+ const handleModal = (): void =>
59
+ {
60
+ setshowModal(!showModal);
61
+ }
56
62
  return (
57
63
  <>
58
64
  <NSALoginPage
@@ -70,6 +76,13 @@ export function App()
70
76
  >
71
77
  <p>test</p>
72
78
  </NSALayoutAction>
79
+ <NSADeleteModal
80
+ title="string"
81
+ description="string"
82
+ show={showModal}
83
+ onYes={() => { }}
84
+ onNo={handleModal}
85
+ />
73
86
  </>
74
87
  );
75
88
  };
File without changes
@@ -0,0 +1,25 @@
1
+ // import Styles from './NSALayoutAction.module.css';
2
+ import { NSModal } from 'namirasoft-site-react';
3
+ import { NSButtonGreen, NSButtonRed, NSSpace, NSSpaceSizeType } from "namirasoft-site-react";
4
+
5
+ export interface NSADeleteModalProps
6
+ {
7
+ title: string;
8
+ description: string;
9
+ show: boolean;
10
+ onYes: () => void;
11
+ onNo: () => void;
12
+ }
13
+
14
+ export function NSADeleteModal(props: NSADeleteModalProps)
15
+ {
16
+ return (
17
+ <NSModal title={props.title} description={props.description} show={props.show}
18
+ onClose={props.onNo} children={
19
+ <div>
20
+ <NSButtonGreen title="Yes" onClick={props.onYes} />
21
+ <NSSpace size={NSSpaceSizeType.MICRO}></NSSpace>
22
+ <NSButtonRed title="No" onClick={props.onNo} />
23
+ </div>} />
24
+ );
25
+ }
@@ -5,34 +5,55 @@ import { INSActionMenuProps, INSNotificationProps } from 'namirasoft-site-react'
5
5
 
6
6
  export interface NSALayoutActionProps
7
7
  {
8
- scope: string;
9
- logo: string;
10
- background:string;
11
- title: string;
12
- description?: string;
13
- children: JSX.Element | JSX.Element[];
14
- notifications: INSNotificationProps[];
15
- actions: INSActionMenuProps[];
16
- redirectToView?: () => void;
17
- edit?: () => void;
18
- delete?: () => void;
8
+ scope: string;
9
+ logo: string;
10
+ background: string;
11
+ title: string;
12
+ description?: string;
13
+ children: JSX.Element | JSX.Element[];
14
+ notifications: INSNotificationProps[];
15
+ actions: INSActionMenuProps[];
16
+ redirectToView?: () => void;
17
+ edit?: () => void;
18
+ delete?: () => void;
19
19
  }
20
20
 
21
21
  export function NSALayoutAction(props: NSALayoutActionProps)
22
22
  {
23
- return (
24
- <NSLayoutAction
25
- scope={props.scope}
26
- logo={props.logo}
27
- background={props.background}
28
- title={props.title}
29
- description={props.description}
30
- actions={props.actions}
31
- notifications={props.notifications}
32
- >
33
- <div className="container-fluid">
34
- {props.children}
35
- </div>
36
- </NSLayoutAction>
37
- );
23
+ const onLogout = () =>
24
+ {
25
+ console.log("clicked")
26
+ }
27
+
28
+ const onNotiffication = () =>
29
+ {
30
+ console.log("clicked")
31
+ }
32
+
33
+ let icons = [
34
+ { src: "https://static.namirasoft.com/image/concept/logout/white.svg", alt: "", onClicked: onLogout, },
35
+ { src: "https://static.namirasoft.com/image/concept/message/white.svg", alt: "", onClicked: onNotiffication, count: 1 },
36
+ ];
37
+
38
+ return (
39
+ <NSLayoutAction
40
+ header={
41
+ {
42
+ title: "",
43
+ icons
44
+ }
45
+ }
46
+ scope={props.scope}
47
+ logo={props.logo}
48
+ background={props.background}
49
+ title={props.title}
50
+ description={props.description}
51
+ actions={props.actions}
52
+ notifications={props.notifications}
53
+ >
54
+ <div className="container-fluid">
55
+ {props.children}
56
+ </div>
57
+ </NSLayoutAction>
58
+ );
38
59
  }
package/src/main.ts CHANGED
@@ -4,4 +4,5 @@ export * from "./INSARouterProps";
4
4
  export * from "./INSARouterState";
5
5
  export * from "./NSARouterMaker";
6
6
  export * from "./pages/NSALoginPage";
7
- export * from "./components/NSALayoutAction";
7
+ export * from "./components/NSALayoutAction";
8
+ export * from "./components/NSADeleteModal";