namirasoft-account-react 1.3.174 → 1.3.176
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/components/NSAProductListModal.js +9 -3
- package/dist/components/NSAProductListModal.js.map +1 -1
- package/dist/components/NSAProductListModal.module.css +3 -1
- package/package.json +1 -1
- package/src/components/NSAProductListModal.module.css +3 -1
- package/src/components/NSAProductListModal.tsx +10 -3
|
@@ -5,6 +5,7 @@ import { NamirasoftAPIProductServer } from 'namirasoft-api-product';
|
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
import CloseToast from '../assets/images/icon-close.png';
|
|
7
7
|
import { NSBoxSearch } from "namirasoft-site-react";
|
|
8
|
+
import { NSLoading } from 'namirasoft-site-react';
|
|
8
9
|
function ProductName() {
|
|
9
10
|
const [state, setState] = useState({ products: [] });
|
|
10
11
|
useEffect(() => {
|
|
@@ -13,7 +14,7 @@ function ProductName() {
|
|
|
13
14
|
setState({ products: products.rows });
|
|
14
15
|
}).catch(() => { });
|
|
15
16
|
}, []);
|
|
16
|
-
return (_jsx("div", { className: Styles.nsa_product_list_border, children: state.products.map((product) => (_jsxs("div", { className: Styles.nsa_product_list, children: [_jsx("img", { src: `${product.logo}`, alt: product.name, width: 65, height: 65, className: 'rounded-circle' }), _jsx("div", { children: _jsx("
|
|
17
|
+
return (_jsx("div", { className: Styles.nsa_product_list_border, children: state.products.map((product) => (_jsxs("div", { className: Styles.nsa_product_list, children: [_jsx("img", { src: `${product.logo}`, alt: product.name, width: 65, height: 65, className: 'rounded-circle' }), _jsx("div", { children: _jsx("span", { children: `${product.name}` }) })] }))) }));
|
|
17
18
|
}
|
|
18
19
|
export class NSAProductListModal extends Component {
|
|
19
20
|
constructor(props) {
|
|
@@ -28,15 +29,20 @@ export class NSAProductListModal extends Component {
|
|
|
28
29
|
document.removeEventListener('mousedown', this.onClickOutside);
|
|
29
30
|
}
|
|
30
31
|
onClickOutside(event) {
|
|
31
|
-
debugger;
|
|
32
32
|
if (this.toastRef.current && !this.toastRef.current.contains(event.target))
|
|
33
33
|
this.props.onClose();
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
+
let content = null;
|
|
37
|
+
if (this.state.products == null)
|
|
38
|
+
content = _jsx(NSLoading, {});
|
|
39
|
+
else {
|
|
40
|
+
content = _jsx(ProductName, {});
|
|
41
|
+
}
|
|
36
42
|
return (_jsxs(_Fragment, { children: [_jsx("div", { className: Styles.nsa_product_container, ref: this.toastRef, children: _jsxs("div", { className: Styles.nsa_product_group, children: [_jsx("div", { className: 'd-flex w-100 justify-content-end px-4', children: _jsx("img", { src: CloseToast, alt: "Close", width: 18, height: 18, onClick: (e) => {
|
|
37
43
|
e.stopPropagation();
|
|
38
44
|
this.props.onClose();
|
|
39
|
-
}, className: Styles.nsa_close_icon }) }), _jsx(NSBoxSearch, { title: "", required: false, style: { position: "fixed" } }), _jsx(ProductName, {})] }) }), _jsx("div", { className: Styles.nsa_toast_background })] }));
|
|
45
|
+
}, className: Styles.nsa_close_icon }) }), _jsx(NSBoxSearch, { title: "", required: false, style: { position: "fixed" } }), _jsx(ProductName, {}), content] }) }), _jsx("div", { className: Styles.nsa_toast_background })] }));
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
export default NSAProductListModal;
|
|
@@ -1 +1 @@
|
|
|
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,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAkB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
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,SAAS,EAAC,uCAAuC,YAClD,cACI,GAAG,EAAE,UAAU,EACf,GAAG,EAAC,OAAO,EACX,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;wCAEX,CAAC,CAAC,eAAe,EAAE,CAAC;wCACpB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;oCACzB,CAAC,EACD,SAAS,EAAE,MAAM,CAAC,cAAc,GAClC,GACA,EACN,KAAC,WAAW,IAAC,KAAK,EAAC,EAAE,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAI,EACvE,KAAC,WAAW,KAAG,EACd,OAAO,IACN,GACJ,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,oBAAoB,GACrC,IACP,CACN,CAAC;IACN,CAAC;CACJ;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
width: 350px;
|
|
16
16
|
border-radius: 24px;
|
|
17
17
|
height: 450px;
|
|
18
|
-
overflow: auto;
|
|
19
18
|
padding: 16px 0;
|
|
20
19
|
background: #fff;
|
|
21
20
|
}
|
|
@@ -27,6 +26,8 @@
|
|
|
27
26
|
align-items: center;
|
|
28
27
|
gap: 8px;
|
|
29
28
|
padding: 16px;
|
|
29
|
+
max-width: 30%;
|
|
30
|
+
text-align: center;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.nsa_product_list_border {
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
align-items: center;
|
|
37
38
|
flex-wrap: wrap;
|
|
38
39
|
margin-top: 48px;
|
|
40
|
+
overflow-y: auto;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
.nsa_product_container h4 {
|
package/package.json
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
width: 350px;
|
|
16
16
|
border-radius: 24px;
|
|
17
17
|
height: 450px;
|
|
18
|
-
overflow: auto;
|
|
19
18
|
padding: 16px 0;
|
|
20
19
|
background: #fff;
|
|
21
20
|
}
|
|
@@ -27,6 +26,8 @@
|
|
|
27
26
|
align-items: center;
|
|
28
27
|
gap: 8px;
|
|
29
28
|
padding: 16px;
|
|
29
|
+
max-width: 30%;
|
|
30
|
+
text-align: center;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.nsa_product_list_border {
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
align-items: center;
|
|
37
38
|
flex-wrap: wrap;
|
|
38
39
|
margin-top: 48px;
|
|
40
|
+
overflow-y: auto;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
.nsa_product_container h4 {
|
|
@@ -4,6 +4,7 @@ import { NamirasoftAPIProductServer, ProductFullRow } from 'namirasoft-api-produ
|
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
5
|
import CloseToast from '../assets/images/icon-close.png';
|
|
6
6
|
import { NSBoxSearch } from "namirasoft-site-react";
|
|
7
|
+
import { NSLoading } from 'namirasoft-site-react';
|
|
7
8
|
|
|
8
9
|
export interface NSAProductListProps
|
|
9
10
|
{
|
|
@@ -35,8 +36,7 @@ function ProductName()
|
|
|
35
36
|
<div className={Styles.nsa_product_list}>
|
|
36
37
|
<img src={`${product.logo}`} alt={product.name} width={65} height={65} className='rounded-circle' />
|
|
37
38
|
<div>
|
|
38
|
-
|
|
39
|
-
<h4>{`History`}</h4>
|
|
39
|
+
<span>{`${product.name}`}</span>
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
))
|
|
@@ -63,12 +63,18 @@ export class NSAProductListModal extends Component<NSAProductListProps, NSAProdu
|
|
|
63
63
|
}
|
|
64
64
|
private onClickOutside(event: MouseEvent)
|
|
65
65
|
{
|
|
66
|
-
debugger
|
|
67
66
|
if (this.toastRef.current && !this.toastRef.current.contains(event.target as Node))
|
|
68
67
|
this.props.onClose();
|
|
69
68
|
}
|
|
70
69
|
override render()
|
|
71
70
|
{
|
|
71
|
+
let content = null;
|
|
72
|
+
if (this.state.products == null)
|
|
73
|
+
content = <NSLoading />
|
|
74
|
+
else
|
|
75
|
+
{
|
|
76
|
+
content = <ProductName />
|
|
77
|
+
}
|
|
72
78
|
return (
|
|
73
79
|
<>
|
|
74
80
|
<div className={Styles.nsa_product_container} ref={this.toastRef}>
|
|
@@ -89,6 +95,7 @@ export class NSAProductListModal extends Component<NSAProductListProps, NSAProdu
|
|
|
89
95
|
</div>
|
|
90
96
|
<NSBoxSearch title="" required={false} style={{ position: "fixed" }} />
|
|
91
97
|
<ProductName />
|
|
98
|
+
{content}
|
|
92
99
|
</div>
|
|
93
100
|
</div>
|
|
94
101
|
<div className={Styles.nsa_toast_background}>
|