namirasoft-site-react 1.4.500 → 1.4.502
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/NSChartDoughnut.js +2 -2
- package/dist/components/NSChartDoughnut.js.map +1 -1
- package/dist/components/NSListProduct.d.ts +10 -3
- package/dist/components/NSListProduct.js +10 -4
- package/dist/components/NSListProduct.js.map +1 -1
- package/package.json +8 -8
- package/src/components/NSChartDoughnut.tsx +2 -2
- package/src/components/NSListProduct.tsx +42 -18
|
@@ -11,9 +11,9 @@ export function NSChartDoughnut(props) {
|
|
|
11
11
|
legend: {
|
|
12
12
|
display: true,
|
|
13
13
|
responsive: true,
|
|
14
|
-
position:
|
|
14
|
+
position: "left",
|
|
15
15
|
labels: {
|
|
16
|
-
useBorderRadius:
|
|
16
|
+
useBorderRadius: false,
|
|
17
17
|
borderRadius: 100,
|
|
18
18
|
boxWidth: 16,
|
|
19
19
|
color: 'hsla(250, 87%, 29%, 1)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSChartDoughnut.js","sourceRoot":"","sources":["../../src/components/NSChartDoughnut.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAmD,MAAM,UAAU,CAAC;AAG9M,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;AAWlI,MAAM,UAAU,eAAe,CAAC,KAA2B;;IAE1D,IAAI,gBAAgB,GAAa,CAAC,EAAE,CAAC,CAAC;IACtC,MAA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YACrC,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAA8B,CAAC;YACtD,GAAG,CAAC,IAAI,EAAE,CAAC;YACX,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,GAAG,CAAC,CAAC;YACrC,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC;YACtC,GAAG,CAAC,SAAS,GAAG,wBAAwB,CAAC;YACzC,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC;YAC5B,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC;YAEzB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;YACzB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;YACrC,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC;YAEtC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACrC,GAAG,CAAC,OAAO,EAAE,CAAC;QACf,CAAC;KACD,CAAC;IACF,OAAO,CACN,cACC,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,SAAS,EAAE,GAAG,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,EAAE,EAChD,KAAK,EAAE,KAAK,CAAC,KAAK,YAElB,KAAC,QAAQ,IACR,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,CAAC,iBAAiB,CAAC,GAC3B,GACG,CACN,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IImageProps, ILinkProps } from "../main";
|
|
2
|
+
export interface NSListProductCartProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
link: ILinkProps;
|
|
6
|
+
image?: IImageProps;
|
|
7
|
+
}
|
|
2
8
|
export interface NSListProductProps {
|
|
3
9
|
scope: string;
|
|
4
10
|
name: string;
|
|
5
|
-
getChildrenBefore?: () =>
|
|
6
|
-
getChildrenAfter?: () =>
|
|
11
|
+
getChildrenBefore?: () => NSListProductCartProps[];
|
|
12
|
+
getChildrenAfter?: () => NSListProductCartProps[];
|
|
13
|
+
search?: string;
|
|
7
14
|
}
|
|
8
15
|
export declare function NSListProduct(props: NSListProductProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
2
|
import { NamirasoftAPIProductServer } from "namirasoft-api-product";
|
|
3
|
+
import { EnvService, SearchOperation } from 'namirasoft-core';
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
4
5
|
import { NSCard } from "./NSCard";
|
|
5
|
-
import { EnvService } from 'namirasoft-core';
|
|
6
6
|
import { NSSection } from "./NSSection";
|
|
7
7
|
export function NSListProduct(props) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
8
9
|
const [state, setState] = useState({ products: [] });
|
|
9
10
|
useEffect(() => {
|
|
10
11
|
let REACT_APP_BASE_URL_API_PRODUCT = new EnvService("REACT_APP_BASE_URL_API_PRODUCT", true).getString();
|
|
@@ -13,9 +14,14 @@ export function NSListProduct(props) {
|
|
|
13
14
|
setState({ products: products.rows });
|
|
14
15
|
}).catch(() => { });
|
|
15
16
|
}, []);
|
|
16
|
-
|
|
17
|
+
let items_before = (_b = (_a = props.getChildrenBefore) === null || _a === void 0 ? void 0 : _a.call(props)) !== null && _b !== void 0 ? _b : [];
|
|
18
|
+
let items_after = (_d = (_c = props.getChildrenAfter) === null || _c === void 0 ? void 0 : _c.call(props)) !== null && _d !== void 0 ? _d : [];
|
|
19
|
+
return (_jsxs(NSSection, { style: { gap: "16px" }, children: [SearchOperation.filter(items_before, item => { var _a; return item.title + " " + ((_a = item.description) !== null && _a !== void 0 ? _a : ""); }, (_e = props.search) !== null && _e !== void 0 ? _e : "")
|
|
20
|
+
.map((item, index) => _jsx(NSCard, Object.assign({}, item), "nslistproduct_nscard_before_" + index)), SearchOperation.filter(state.products, item => { var _a; return item.name + " " + ((_a = item.description) !== null && _a !== void 0 ? _a : ""); }, (_f = props.search) !== null && _f !== void 0 ? _f : "")
|
|
21
|
+
.map((product) => {
|
|
17
22
|
var _a, _b, _c;
|
|
18
23
|
return (_jsx(NSCard, { link: { href: (_a = product.link) !== null && _a !== void 0 ? _a : "" }, title: product.name, description: (_b = product.description) !== null && _b !== void 0 ? _b : "", image: { src: (_c = product.logo) !== null && _c !== void 0 ? _c : '', alt: product.name } }, product.id));
|
|
19
|
-
}),
|
|
24
|
+
}), SearchOperation.filter(items_after, item => { var _a; return item.title + " " + ((_a = item.description) !== null && _a !== void 0 ? _a : ""); }, (_g = props.search) !== null && _g !== void 0 ? _g : "")
|
|
25
|
+
.map((item, index) => _jsx(NSCard, Object.assign({}, item), "nslistproduct_nscard_after_" + index))] }));
|
|
20
26
|
}
|
|
21
27
|
//# sourceMappingURL=NSListProduct.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSListProduct.js","sourceRoot":"","sources":["../../src/components/NSListProduct.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NSListProduct.js","sourceRoot":"","sources":["../../src/components/NSListProduct.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,0BAA0B,EAAkB,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC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
|
|
11
|
-
"version": "1.4.
|
|
11
|
+
"version": "1.4.502",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -23,29 +23,29 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@ant-design/charts": "^2.6.6",
|
|
25
25
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
26
|
-
"@types/node": "^24.
|
|
26
|
+
"@types/node": "^24.10.0",
|
|
27
27
|
"@types/react": "^18.3.12",
|
|
28
28
|
"@types/react-bootstrap": "^1.1.0",
|
|
29
29
|
"@types/react-dom": "^18.3.1",
|
|
30
30
|
"@types/react-gtm-module": "^2.0.4",
|
|
31
|
-
"antd": "^5.
|
|
31
|
+
"antd": "^5.28.0",
|
|
32
32
|
"async-mutex": "^0.5.0",
|
|
33
33
|
"bootstrap": "^5.3.8",
|
|
34
34
|
"chart.js": "^4.5.1",
|
|
35
35
|
"copyfiles": "^2.4.1",
|
|
36
36
|
"link-react": "^3.0.0",
|
|
37
37
|
"namirasoft-api-link": "^1.4.20",
|
|
38
|
-
"namirasoft-api-product": "^1.4.
|
|
39
|
-
"namirasoft-core": "^1.4.
|
|
38
|
+
"namirasoft-api-product": "^1.4.43",
|
|
39
|
+
"namirasoft-core": "^1.4.108",
|
|
40
40
|
"namirasoft-schema": "^1.4.25",
|
|
41
|
-
"namirasoft-site": "^1.4.
|
|
42
|
-
"namirasoft-site-map": "^1.4.
|
|
41
|
+
"namirasoft-site": "^1.4.43",
|
|
42
|
+
"namirasoft-site-map": "^1.4.40",
|
|
43
43
|
"os-browserify": "^0.3.0",
|
|
44
44
|
"path-browserify": "^1.0.1",
|
|
45
45
|
"react": "^18.3.1",
|
|
46
46
|
"react-app-rewired": "^2.2.1",
|
|
47
47
|
"react-bootstrap": "^2.10.10",
|
|
48
|
-
"react-chartjs-2": "^5.3.
|
|
48
|
+
"react-chartjs-2": "^5.3.1",
|
|
49
49
|
"react-dom": "^18.3.1",
|
|
50
50
|
"react-gtm-module": "^2.0.11",
|
|
51
51
|
"react-phone-input-2": "^2.15.1",
|
|
@@ -23,9 +23,9 @@ export function NSChartDoughnut(props: NSChartDoughnutProps)
|
|
|
23
23
|
legend: {
|
|
24
24
|
display: true,
|
|
25
25
|
responsive: true,
|
|
26
|
-
position:
|
|
26
|
+
position: "left" as "top",
|
|
27
27
|
labels: {
|
|
28
|
-
useBorderRadius:
|
|
28
|
+
useBorderRadius: false,
|
|
29
29
|
borderRadius: 100,
|
|
30
30
|
boxWidth: 16,
|
|
31
31
|
color: 'hsla(250, 87%, 29%, 1)',
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import { useState, useEffect, ReactNode } from "react";
|
|
2
1
|
import { NamirasoftAPIProductServer, ProductFullRow } from "namirasoft-api-product";
|
|
2
|
+
import { EnvService, SearchOperation } from 'namirasoft-core';
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { IImageProps, ILinkProps } from "../main";
|
|
3
5
|
import { NSCard } from "./NSCard";
|
|
4
|
-
import { EnvService } from 'namirasoft-core'
|
|
5
6
|
import { NSSection } from "./NSSection";
|
|
6
7
|
|
|
8
|
+
export interface NSListProductCartProps
|
|
9
|
+
{
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
link: ILinkProps;
|
|
13
|
+
image?: IImageProps;
|
|
14
|
+
}
|
|
7
15
|
export interface NSListProductProps
|
|
8
16
|
{
|
|
9
17
|
scope: string;
|
|
10
18
|
name: string;
|
|
11
|
-
getChildrenBefore?: () =>
|
|
12
|
-
getChildrenAfter?: () =>
|
|
19
|
+
getChildrenBefore?: () => NSListProductCartProps[];
|
|
20
|
+
getChildrenAfter?: () => NSListProductCartProps[];
|
|
21
|
+
search?: string;
|
|
13
22
|
}
|
|
14
23
|
|
|
15
24
|
interface NSListProductState
|
|
@@ -31,25 +40,40 @@ export function NSListProduct(props: NSListProductProps)
|
|
|
31
40
|
}).catch(() => { });
|
|
32
41
|
// eslint-disable-next-line
|
|
33
42
|
}, []);
|
|
43
|
+
let items_before: NSListProductCartProps[] = props.getChildrenBefore?.() ?? [];
|
|
44
|
+
let items_after: NSListProductCartProps[] = props.getChildrenAfter?.() ?? [];
|
|
34
45
|
|
|
35
46
|
return (
|
|
36
47
|
<NSSection style={{ gap: "16px" }}>
|
|
37
|
-
{props.getChildrenBefore && props.getChildrenBefore()}
|
|
38
48
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
SearchOperation.filter(items_before, item => item.title + " " + (item.description ?? ""), props.search ?? "")
|
|
50
|
+
.map((item, index) => <NSCard
|
|
51
|
+
key={"nslistproduct_nscard_before_" + index}
|
|
52
|
+
{...item}
|
|
53
|
+
/>)
|
|
54
|
+
}
|
|
55
|
+
{
|
|
56
|
+
SearchOperation.filter(state.products, item => item.name + " " + (item.description ?? ""), props.search ?? "")
|
|
57
|
+
.map((product: ProductFullRow) =>
|
|
58
|
+
{
|
|
59
|
+
return (
|
|
60
|
+
<NSCard
|
|
61
|
+
key={product.id}
|
|
62
|
+
link={{ href: product.link ?? "" }}
|
|
63
|
+
title={product.name}
|
|
64
|
+
description={product.description ?? ""}
|
|
65
|
+
image={{ src: product.logo ?? '', alt: product.name }}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
{
|
|
71
|
+
SearchOperation.filter(items_after, item => item.title + " " + (item.description ?? ""), props.search ?? "")
|
|
72
|
+
.map((item, index) => <NSCard
|
|
73
|
+
key={"nslistproduct_nscard_after_" + index}
|
|
74
|
+
{...item}
|
|
75
|
+
/>)
|
|
51
76
|
}
|
|
52
|
-
{props.getChildrenAfter && props.getChildrenAfter()}
|
|
53
77
|
</NSSection >
|
|
54
78
|
);
|
|
55
79
|
}
|