namirasoft-account-react 1.5.41 → 1.5.42

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.
@@ -11,8 +11,9 @@ export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerRes
11
11
  };
12
12
  show_image?: boolean;
13
13
  getChildren?: {
14
- getChildrenBeforeTitle?: () => ReactNode;
15
- getChildrenAfterTitle?: () => ReactNode;
14
+ getChildrenBefore?: () => ReactNode;
15
+ getChildrenBetween?: () => ReactNode;
16
+ getChildrenAfter?: () => ReactNode;
16
17
  };
17
18
  product?: {
18
19
  search?: boolean;
@@ -4,7 +4,7 @@ import { NSBox, NSBoxSearch, NSLineText, NSListProduct, NSLoading, NSSpace, NSSp
4
4
  import { useEffect, useState } from 'react';
5
5
  import Styles from './NSAHomePage.module.css';
6
6
  export function NSAHomePage(props) {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
8
8
  let cache = ProductCacheService.get(props.product_id, props.notifier.onError);
9
9
  let [state, setState] = useState({ product: null });
10
10
  useEffect(() => {
@@ -18,12 +18,15 @@ export function NSAHomePage(props) {
18
18
  let headline = (_e = (_d = (_c = props.custom) === null || _c === void 0 ? void 0 : _c.headline) !== null && _d !== void 0 ? _d : state.product.headline) !== null && _e !== void 0 ? _e : "";
19
19
  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 : "";
20
20
  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 : "";
21
- return (_jsxs("div", { className: Styles.nsa_home_container, children: [props.show_image &&
22
- _jsx("img", { src: logo, alt: state.product.name, width: 256, height: 256 }), (_o = (_m = props.getChildren) === null || _m === void 0 ? void 0 : _m.getChildrenBeforeTitle) === null || _o === void 0 ? void 0 : _o.call(_m), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx("h2", { children: headline }), _jsx(NSSpace, { size: NSSpaceSizeType.MICRO }), _jsx("p", { children: description }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), (_q = (_p = props.getChildren) === null || _p === void 0 ? void 0 : _p.getChildrenAfterTitle) === null || _q === void 0 ? void 0 : _q.call(_p), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSLineText, { title: 'Related Products' }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), ((_r = props.product) === null || _r === void 0 ? void 0 : _r.search) &&
21
+ return (_jsxs("div", { className: Styles.nsa_home_container, children: [(_o = (_m = props.getChildren) === null || _m === void 0 ? void 0 : _m.getChildrenBefore) === null || _o === void 0 ? void 0 : _o.call(_m), ((_p = props.getChildren) === null || _p === void 0 ? void 0 : _p.getChildrenBefore) &&
22
+ _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), props.show_image &&
23
+ _jsx("img", { src: logo, alt: state.product.name, width: 256, height: 256 }), _jsx("h2", { children: headline }), _jsx("p", { children: description }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), (_r = (_q = props.getChildren) === null || _q === void 0 ? void 0 : _q.getChildrenBetween) === null || _r === void 0 ? void 0 : _r.call(_q), ((_s = props.getChildren) === null || _s === void 0 ? void 0 : _s.getChildrenBetween) &&
24
+ _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSLineText, { title: 'Related Products' }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), ((_t = props.product) === null || _t === void 0 ? void 0 : _t.search) &&
23
25
  _jsxs(_Fragment, { children: [_jsx(NSBoxSearch, { title: "", required: false, hideHeader: true, placeholder: "Search products . . .", classList: [Styles.nsa_home_search_wrapper], style: { width: NSBox.width.double }, input: { classList: [Styles.nsa_home_search_box] }, onChanged: (box) => {
24
26
  new SetTimeouService().setTimeoutIfNotCalledAgain(() => {
25
27
  setState((prev) => { var _a; return (Object.assign(Object.assign({}, prev), { search_text: (_a = box.getValue()) !== null && _a !== void 0 ? _a : "" })); });
26
28
  }, 1500);
27
- } }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL })] }), _jsx(NSListProduct, { scope: scope, name: "Home", search: state.search_text, getChildrenBefore: (_s = props.product) === null || _s === void 0 ? void 0 : _s.getChildrenBefore, getChildrenAfter: (_t = props.product) === null || _t === void 0 ? void 0 : _t.getChildrenAfter })] }));
29
+ } }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL })] }), _jsx(NSListProduct, { scope: scope, name: "Home", search: state.search_text, getChildrenBefore: (_u = props.product) === null || _u === void 0 ? void 0 : _u.getChildrenBefore, getChildrenAfter: (_v = props.product) === null || _v === void 0 ? void 0 : _v.getChildrenAfter }), ((_w = props.getChildren) === null || _w === void 0 ? void 0 : _w.getChildrenAfter) &&
30
+ _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), (_y = (_x = props.getChildren) === null || _x === void 0 ? void 0 : _x.getChildrenAfter) === null || _y === void 0 ? void 0 : _y.call(_x)] }));
28
31
  }
29
32
  //# sourceMappingURL=NSAHomePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NSAHomePage.js","sourceRoot":"","sources":["../../src/pages/NSAHomePage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAuB,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAA0B,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7L,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AA4B9C,MAAM,UAAU,WAAW,C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AAW,0CAAE,gBAAgB,kDAAI,IACtC,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.5.41",
11
+ "version": "1.5.42",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -15,8 +15,9 @@ export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerRes
15
15
  };
16
16
  show_image?: boolean;
17
17
  getChildren?: {
18
- getChildrenBeforeTitle?: () => ReactNode;
19
- getChildrenAfterTitle?: () => ReactNode;
18
+ getChildrenBefore?: () => ReactNode;
19
+ getChildrenBetween?: () => ReactNode;
20
+ getChildrenAfter?: () => ReactNode;
20
21
  };
21
22
  product?: {
22
23
  search?: boolean;
@@ -55,6 +56,12 @@ export function NSAHomePage(props: NSAHomePageProps)
55
56
 
56
57
  return (
57
58
  <div className={Styles.nsa_home_container}>
59
+ {props.getChildren?.getChildrenBefore?.()}
60
+ {
61
+ props.getChildren?.getChildrenBefore &&
62
+ <NSSpace size={NSSpaceSizeType.SMALL} />
63
+ }
64
+
58
65
  {
59
66
  props.show_image &&
60
67
  <img
@@ -64,21 +71,19 @@ export function NSAHomePage(props: NSAHomePageProps)
64
71
  height={256}
65
72
  />
66
73
  }
67
-
68
- {props.getChildren?.getChildrenBeforeTitle?.()}
69
-
70
- <NSSpace size={NSSpaceSizeType.MICRO} />
71
74
  <h2>{headline}</h2>
72
- <NSSpace size={NSSpaceSizeType.MICRO} />
73
75
  <p>{description}</p>
74
76
  <NSSpace size={NSSpaceSizeType.SMALL} />
75
77
 
76
- {props.getChildren?.getChildrenAfterTitle?.()}
77
-
78
- <NSSpace size={NSSpaceSizeType.SMALL} />
78
+ {props.getChildren?.getChildrenBetween?.()}
79
+ {
80
+ props.getChildren?.getChildrenBetween &&
81
+ <NSSpace size={NSSpaceSizeType.SMALL} />
82
+ }
79
83
 
80
84
  <NSLineText title='Related Products' />
81
85
  <NSSpace size={NSSpaceSizeType.SMALL} />
86
+
82
87
  {
83
88
  props.product?.search &&
84
89
  <>
@@ -108,6 +113,12 @@ export function NSAHomePage(props: NSAHomePageProps)
108
113
  getChildrenBefore={props.product?.getChildrenBefore}
109
114
  getChildrenAfter={props.product?.getChildrenAfter}
110
115
  />
116
+ {
117
+ props.getChildren?.getChildrenAfter &&
118
+ <NSSpace size={NSSpaceSizeType.SMALL} />
119
+ }
120
+
121
+ {props.getChildren?.getChildrenAfter?.()}
111
122
  </div>
112
123
  );
113
124
  }