namirasoft-account-react 1.4.335 → 1.4.337

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,6 @@
1
1
  import { IBaseComponentProps } from 'namirasoft-site-react';
2
2
  import { ProductFullRow } from 'namirasoft-api-product';
3
+ import { ReactNode } from 'react';
3
4
  import { NSARouterMakerProps } from '../NSARouterMakerProps';
4
5
  export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerProps {
5
6
  custom?: {
@@ -9,6 +10,12 @@ export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerPro
9
10
  description?: string;
10
11
  };
11
12
  show_image?: boolean;
13
+ getChildrenBefore?: () => ReactNode;
14
+ getChildrenAfter?: () => ReactNode;
15
+ product?: {
16
+ getChildrenBefore?: () => ReactNode;
17
+ getChildrenAfter?: () => ReactNode;
18
+ };
12
19
  }
13
20
  export interface NSAHomePageState {
14
21
  product: ProductFullRow | null;
@@ -3,7 +3,7 @@ import { NSListProduct, NSSpace, NSSpaceSizeType, NSLoading, ProductCacheService
3
3
  import { useEffect, useState } from 'react';
4
4
  import Styles from './NSAHomePage.module.css';
5
5
  export function NSAHomePage(props) {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7
7
  let cache = ProductCacheService.get(props.product_id, props.notifier.onError);
8
8
  let [state, setState] = useState({ product: null });
9
9
  useEffect(() => {
@@ -18,6 +18,6 @@ export function NSAHomePage(props) {
18
18
  let logo = (_h = (_g = (_f = props.custom) === null || _f === void 0 ? void 0 : _f.logo) !== null && _g !== void 0 ? _g : state.product.logo) !== null && _h !== void 0 ? _h : "";
19
19
  let description = (_l = (_k = (_j = props.custom) === null || _j === void 0 ? void 0 : _j.description) !== null && _k !== void 0 ? _k : state.product.description) !== null && _l !== void 0 ? _l : "";
20
20
  return (_jsxs("div", { className: Styles.nsa_home_container, children: [props.show_image &&
21
- _jsx("img", { src: logo, alt: state.product.name, width: 256, height: 256 }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx("h2", { children: headline }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx("p", { children: description }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSListProduct, { scope: scope, name: "Home" })] }));
21
+ _jsx("img", { src: logo, alt: state.product.name, width: 256, height: 256 }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx("h2", { children: headline }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx("p", { children: description }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), props.getChildrenBefore && props.getChildrenBefore(), _jsx(NSListProduct, { scope: scope, name: "Home", getChildrenBefore: (_m = props.product) === null || _m === void 0 ? void 0 : _m.getChildrenBefore, getChildrenAfter: (_o = props.product) === null || _o === void 0 ? void 0 : _o.getChildrenAfter }), props.getChildrenAfter && props.getChildrenAfter()] }));
22
22
  }
23
23
  //# sourceMappingURL=NSAHomePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSAHomePage.js","sourceRoot":"","sources":["../../src/pages/NSAHomePage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAErI,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAkB9C,MAAM,UAAU,WAAW,CAAC,KAAuB;;IAE/C,IAAI,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9E,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,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MAAA,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,mCAAI,KAAK,CAAC,OAAO,CAAC,IAAI,mCAAI,EAAE,CAAC;IAC1D,IAAI,WAAW,GAAG,MAAA,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,WAAW,mCAAI,KAAK,CAAC,OAAO,CAAC,WAAW,mCAAI,EAAE,CAAC;IAE/E,OAAO,CACH,eAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,aAEjC,KAAK,CAAC,UAAU;gBAChB,cACI,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EACvB,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,GAAG,GACb,EAEN,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,uBAAK,QAAQ,GAAM,EACnB,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,sBAAI,WAAW,GAAK,EACpB,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACvC,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,iBAAiB,EAAE,EACrD,KAAC,aAAa,IACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,MAAM,EACX,iBAAiB,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,iBAAiB,EACnD,gBAAgB,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,gBAAgB,GACnD,EACD,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,gBAAgB,EAAE,IACjD,CACT,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.335",
11
+ "version": "1.4.337",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -37,7 +37,7 @@
37
37
  "namirasoft-secret": "^1.4.32",
38
38
  "namirasoft-site": "^1.4.38",
39
39
  "namirasoft-site-map": "^1.4.28",
40
- "namirasoft-site-react": "^1.4.417",
40
+ "namirasoft-site-react": "^1.4.418",
41
41
  "namirasoft-workspace": "^1.4.23",
42
42
  "os-browserify": "^0.3.0",
43
43
  "path-browserify": "^1.0.1",
@@ -1,6 +1,6 @@
1
1
  import { IBaseComponentProps, NSListProduct, NSSpace, NSSpaceSizeType, NSLoading, ProductCacheService } from 'namirasoft-site-react';
2
2
  import { ProductFullRow } from 'namirasoft-api-product';
3
- import { useEffect, useState } from 'react';
3
+ import { ReactNode, useEffect, useState } from 'react';
4
4
  import { NSARouterMakerProps } from '../NSARouterMakerProps';
5
5
  import Styles from './NSAHomePage.module.css';
6
6
 
@@ -13,6 +13,12 @@ export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerPro
13
13
  description?: string;
14
14
  };
15
15
  show_image?: boolean;
16
+ getChildrenBefore?: () => ReactNode;
17
+ getChildrenAfter?: () => ReactNode;
18
+ product?: {
19
+ getChildrenBefore?: () => ReactNode;
20
+ getChildrenAfter?: () => ReactNode;
21
+ }
16
22
  }
17
23
 
18
24
  export interface NSAHomePageState
@@ -58,7 +64,14 @@ export function NSAHomePage(props: NSAHomePageProps)
58
64
  <NSSpace size={NSSpaceSizeType.MICRO} />
59
65
  <p>{description}</p>
60
66
  <NSSpace size={NSSpaceSizeType.SMALL} />
61
- <NSListProduct scope={scope} name="Home" />
67
+ {props.getChildrenBefore && props.getChildrenBefore()}
68
+ <NSListProduct
69
+ scope={scope}
70
+ name="Home"
71
+ getChildrenBefore={props.product?.getChildrenBefore}
72
+ getChildrenAfter={props.product?.getChildrenAfter}
73
+ />
74
+ {props.getChildrenAfter && props.getChildrenAfter()}
62
75
  </div>
63
76
  );
64
77
  }