namirasoft-account-react 1.3.162 → 1.3.164
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 +2 -1
- package/dist/App.js.map +1 -1
- package/dist/components/NSAProductListModal.d.ts +2 -1
- package/dist/components/NSAProductListModal.js +7 -5
- package/dist/components/NSAProductListModal.js.map +1 -1
- package/dist/components/NSAProductListModal.module.css +19 -2
- package/package.json +1 -1
- package/src/App.tsx +3 -0
- package/src/components/NSAProductListModal.module.css +19 -2
- package/src/components/NSAProductListModal.tsx +16 -10
package/dist/App.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import NSAProductListModal from "./components/NSAProductListModal";
|
|
2
3
|
export function App() {
|
|
3
|
-
return (_jsx("div", {}));
|
|
4
|
+
return (_jsx("div", { children: _jsx(NSAProductListModal, { onClose: () => { } }) }));
|
|
4
5
|
}
|
|
5
6
|
;
|
|
6
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":";AAAA,MAAM,UAAU,GAAG;IAEf,OAAO,CACH,
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,MAAM,kCAAkC,CAAC;AAEnE,MAAM,UAAU,GAAG;IAEf,OAAO,CACH,wBACI,KAAC,mBAAmB,IAAC,OAAO,EAAE,GAAE,EAAE,GAAC,CAAC,GAAG,GACrC,CACT,CAAC;AACN,CAAC;AAAA,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductFullRow } from 'namirasoft-api-product';
|
|
2
1
|
import { Component } from 'react';
|
|
2
|
+
import { ProductFullRow } from 'namirasoft-api-product';
|
|
3
3
|
export interface NSAProductListProps {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
}
|
|
@@ -7,6 +7,7 @@ interface NSAProductListState {
|
|
|
7
7
|
products: ProductFullRow[];
|
|
8
8
|
}
|
|
9
9
|
export declare class NSAProductListModal extends Component<NSAProductListProps, NSAProductListState> {
|
|
10
|
+
private toastRef;
|
|
10
11
|
constructor(props: NSAProductListProps);
|
|
11
12
|
componentWillUnmount(): void;
|
|
12
13
|
private onClickOutside;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Component, createRef } from 'react';
|
|
2
3
|
import { NSBoxString } from 'namirasoft-site-react';
|
|
3
4
|
import Styles from './NSAProductListModal.module.css';
|
|
4
5
|
import { NamirasoftAPIProductServer } from 'namirasoft-api-product';
|
|
5
6
|
import { useEffect, useState } from 'react';
|
|
6
|
-
import { Component } from 'react';
|
|
7
7
|
function ProductName() {
|
|
8
8
|
const [state, setState] = useState({ products: [] });
|
|
9
9
|
useEffect(() => {
|
|
@@ -17,17 +17,19 @@ function ProductName() {
|
|
|
17
17
|
export class NSAProductListModal extends Component {
|
|
18
18
|
constructor(props) {
|
|
19
19
|
super(props);
|
|
20
|
+
this.toastRef = createRef();
|
|
20
21
|
this.onClickOutside = this.onClickOutside.bind(this);
|
|
21
22
|
}
|
|
22
23
|
componentWillUnmount() {
|
|
23
24
|
document.removeEventListener('mousedown', this.onClickOutside);
|
|
24
25
|
}
|
|
25
26
|
onClickOutside(event) {
|
|
26
|
-
|
|
27
|
-
this.
|
|
27
|
+
debugger;
|
|
28
|
+
if (this.toastRef.current && !this.toastRef.current.contains(event.target))
|
|
29
|
+
this.props.onClose();
|
|
28
30
|
}
|
|
29
31
|
render() {
|
|
30
|
-
return (_jsx("div", { className: Styles.nsa_product_container, children: _jsxs("div", { className: Styles.nsa_product_group, children: [_jsx(NSBoxString, { title: 'Search', onClicked: () => { }, required: false }), _jsx(ProductName, {})] }) }));
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: Styles.nsa_product_container, ref: this.toastRef, children: _jsxs("div", { className: Styles.nsa_product_group, children: [_jsx(NSBoxString, { title: 'Search', onClicked: () => { }, required: false }), _jsx(ProductName, {})] }) }), _jsx("div", { className: Styles.nsa_toast_background })] }));
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
export default NSAProductListModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSAProductListModal.js","sourceRoot":"","sources":["../../src/components/NSAProductListModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSAProductListModal.js","sourceRoot":"","sources":["../../src/components/NSAProductListModal.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAW5C,SAAS,WAAW;IAEhB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAsB,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IAE1E,SAAS,CAAC,GAAG,EAAE;QAEX,IAAI,MAAM,GAAG,IAAI,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QA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AAK,CAAC,MAAc,CAAC;YAC9E,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,8BACI,cAAK,SAAS,EAAE,MAAM,CAAC,qBAAqB,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,YAC5D,eAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,aACpC,KAAC,WAAW,IAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAI,EACrE,KAAC,WAAW,KAAG,IACb,GACJ,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,GACrC,IACP,CACN,CAAC;IACN,CAAC;CACJ;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
.nsa_product_container {
|
|
2
|
-
display: flex;
|
|
3
2
|
flex-direction: column;
|
|
4
3
|
justify-content: left;
|
|
5
4
|
align-items: flex-start;
|
|
5
|
+
position: fixed;
|
|
6
|
+
z-index: 1;
|
|
7
|
+
top: 50%;
|
|
8
|
+
left: 50%;
|
|
9
|
+
transform: translate(-50%, -50%);
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.nsa_product_group {
|
|
@@ -11,12 +15,12 @@
|
|
|
11
15
|
align-items: center;
|
|
12
16
|
gap: 16px;
|
|
13
17
|
border: 8px solid rgb(233, 232, 232);
|
|
14
|
-
margin: 48px;
|
|
15
18
|
width: 350px;
|
|
16
19
|
border-radius: 24px;
|
|
17
20
|
height: 450px;
|
|
18
21
|
overflow: auto;
|
|
19
22
|
padding: 16px 0;
|
|
23
|
+
background: #fff;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.nsa_product_list {
|
|
@@ -43,4 +47,17 @@
|
|
|
43
47
|
text-align: center;
|
|
44
48
|
cursor: default;
|
|
45
49
|
padding-left: 8px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.nsa_toast_background {
|
|
53
|
+
width: 100vw;
|
|
54
|
+
height: 100vh;
|
|
55
|
+
background-color: #00000059;
|
|
56
|
+
position: fixed;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
cursor: auto;
|
|
46
63
|
}
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
.nsa_product_container {
|
|
2
|
-
display: flex;
|
|
3
2
|
flex-direction: column;
|
|
4
3
|
justify-content: left;
|
|
5
4
|
align-items: flex-start;
|
|
5
|
+
position: fixed;
|
|
6
|
+
z-index: 1;
|
|
7
|
+
top: 50%;
|
|
8
|
+
left: 50%;
|
|
9
|
+
transform: translate(-50%, -50%);
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.nsa_product_group {
|
|
@@ -11,12 +15,12 @@
|
|
|
11
15
|
align-items: center;
|
|
12
16
|
gap: 16px;
|
|
13
17
|
border: 8px solid rgb(233, 232, 232);
|
|
14
|
-
margin: 48px;
|
|
15
18
|
width: 350px;
|
|
16
19
|
border-radius: 24px;
|
|
17
20
|
height: 450px;
|
|
18
21
|
overflow: auto;
|
|
19
22
|
padding: 16px 0;
|
|
23
|
+
background: #fff;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.nsa_product_list {
|
|
@@ -43,4 +47,17 @@
|
|
|
43
47
|
text-align: center;
|
|
44
48
|
cursor: default;
|
|
45
49
|
padding-left: 8px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.nsa_toast_background {
|
|
53
|
+
width: 100vw;
|
|
54
|
+
height: 100vh;
|
|
55
|
+
background-color: #00000059;
|
|
56
|
+
position: fixed;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
display: flex;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
cursor: auto;
|
|
46
63
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import React, { Component, createRef } from 'react';
|
|
1
2
|
import { NSBoxString } from 'namirasoft-site-react';
|
|
2
3
|
import Styles from './NSAProductListModal.module.css';
|
|
3
4
|
import { NamirasoftAPIProductServer, ProductFullRow } from 'namirasoft-api-product';
|
|
4
5
|
import { useEffect, useState } from 'react';
|
|
5
6
|
|
|
6
|
-
import { Component } from 'react';
|
|
7
7
|
export interface NSAProductListProps
|
|
8
8
|
{
|
|
9
9
|
onClose: () => void;
|
|
@@ -45,9 +45,11 @@ function ProductName()
|
|
|
45
45
|
}
|
|
46
46
|
export class NSAProductListModal extends Component<NSAProductListProps, NSAProductListState>
|
|
47
47
|
{
|
|
48
|
+
private toastRef: React.RefObject<HTMLDivElement>;
|
|
48
49
|
constructor(props: NSAProductListProps)
|
|
49
50
|
{
|
|
50
51
|
super(props);
|
|
52
|
+
this.toastRef = createRef();
|
|
51
53
|
this.onClickOutside = this.onClickOutside.bind(this);
|
|
52
54
|
}
|
|
53
55
|
override componentWillUnmount(): void
|
|
@@ -56,19 +58,23 @@ export class NSAProductListModal extends Component<NSAProductListProps, NSAProdu
|
|
|
56
58
|
}
|
|
57
59
|
private onClickOutside(event: MouseEvent)
|
|
58
60
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
debugger
|
|
62
|
+
if (this.toastRef.current && !this.toastRef.current.contains(event.target as Node))
|
|
61
63
|
this.props.onClose();
|
|
62
64
|
}
|
|
63
65
|
override render()
|
|
64
66
|
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
return (
|
|
68
|
+
<>
|
|
69
|
+
<div className={Styles.nsa_product_container} ref={this.toastRef}>
|
|
70
|
+
<div className={Styles.nsa_product_group}>
|
|
71
|
+
<NSBoxString title='Search' onClicked={() => { }} required={false} />
|
|
72
|
+
<ProductName />
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div className={Styles.nsa_toast_background}>
|
|
76
|
+
</div>
|
|
77
|
+
</>
|
|
72
78
|
);
|
|
73
79
|
}
|
|
74
80
|
}
|