namirasoft-site-react 1.4.417 → 1.4.418

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.
@@ -1,5 +1,8 @@
1
+ import { ReactNode } from "react";
1
2
  export interface NSListProductProps {
2
3
  scope: string;
3
4
  name: string;
5
+ getChildrenBefore?: () => ReactNode;
6
+ getChildrenAfter?: () => ReactNode;
4
7
  }
5
8
  export declare function NSListProduct(props: NSListProductProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { NamirasoftAPIProductServer } from "namirasoft-api-product";
4
4
  import { NSCard } from "./NSCard";
@@ -13,9 +13,9 @@ export function NSListProduct(props) {
13
13
  setState({ products: products.rows });
14
14
  }).catch(() => { });
15
15
  }, []);
16
- return (_jsx(NSSection, { style: { gap: "16px" }, children: state.products.map((product) => {
17
- var _a, _b;
18
- return (_jsx(NSCard, { link: { href: (_a = product.link) !== null && _a !== void 0 ? _a : "" }, title: product.name, image: { src: (_b = product.logo) !== null && _b !== void 0 ? _b : '', alt: product.name } }, product.id));
19
- }) }));
16
+ return (_jsxs(NSSection, { style: { gap: "16px" }, children: [props.getChildrenBefore && props.getChildrenBefore(), state.products.map((product) => {
17
+ var _a, _b;
18
+ return (_jsx(NSCard, { link: { href: (_a = product.link) !== null && _a !== void 0 ? _a : "" }, title: product.name, image: { src: (_b = product.logo) !== null && _b !== void 0 ? _b : '', alt: product.name } }, product.id));
19
+ }), props.getChildrenAfter && props.getChildrenAfter()] }));
20
20
  }
21
21
  //# sourceMappingURL=NSListProduct.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSListProduct.js","sourceRoot":"","sources":["../../src/components/NSListProduct.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO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GAAG,CAAC,CAAC,CAAC;IAExB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,MAAC,SAAS,IAAC,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,aAC5B,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,iBAAiB,EAAE,EAEjD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAuB,EAAE,EAAE;;gBAE3C,OAAO,CACH,KAAC,MAAM,IAAkB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,IAA1H,OAAO,CAAC,EAAE,CAAoH,CAC9I,CAAC;YACN,CAAC,CAAC,EAEL,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,gBAAgB,EAAE,IAC1C,CAChB,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.417",
11
+ "version": "1.4.418",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@ant-design/charts": "^2.4.0",
25
25
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
26
- "@types/node": "^24.0.6",
26
+ "@types/node": "^24.0.7",
27
27
  "@types/react": "^18.3.12",
28
28
  "@types/react-bootstrap": "^1.1.0",
29
29
  "@types/react-dom": "^18.3.1",
@@ -1,4 +1,4 @@
1
- import { useState, useEffect } from "react";
1
+ import { useState, useEffect, ReactNode } from "react";
2
2
  import { NamirasoftAPIProductServer, ProductFullRow } from "namirasoft-api-product";
3
3
  import { NSCard } from "./NSCard";
4
4
  import { EnvService } from 'namirasoft-core'
@@ -8,6 +8,8 @@ export interface NSListProductProps
8
8
  {
9
9
  scope: string;
10
10
  name: string;
11
+ getChildrenBefore?: () => ReactNode;
12
+ getChildrenAfter?: () => ReactNode;
11
13
  }
12
14
 
13
15
  interface NSListProductState
@@ -32,6 +34,7 @@ export function NSListProduct(props: NSListProductProps)
32
34
 
33
35
  return (
34
36
  <NSSection style={{ gap: "16px" }}>
37
+ {props.getChildrenBefore && props.getChildrenBefore()}
35
38
  {
36
39
  state.products.map((product: ProductFullRow) =>
37
40
  {
@@ -40,6 +43,7 @@ export function NSListProduct(props: NSListProductProps)
40
43
  );
41
44
  })
42
45
  }
43
- </NSSection>
46
+ {props.getChildrenAfter && props.getChildrenAfter()}
47
+ </NSSection >
44
48
  );
45
49
  }