namirasoft-account-react 1.5.22 → 1.5.24
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/layouts/NSASectionList.d.ts +2 -0
- package/dist/layouts/NSASectionList.js +14 -6
- package/dist/layouts/NSASectionList.js.map +1 -1
- package/dist/pages/NSAHomePage.d.ts +0 -2
- package/dist/pages/NSAHomePage.js +4 -4
- package/dist/pages/NSAHomePage.js.map +1 -1
- package/package.json +1 -1
- package/src/layouts/NSASectionList.tsx +32 -13
- package/src/pages/NSAHomePage.tsx +1 -12
|
@@ -17,6 +17,8 @@ export interface NSASectionListCustomProps<RowType extends {
|
|
|
17
17
|
};
|
|
18
18
|
default_mode?: string;
|
|
19
19
|
tab_page_view?: NSASectionViewTabPageUIProps<RowType>;
|
|
20
|
+
getChildrenBefore?: (id: string, row: RowType | null) => ReactNode;
|
|
21
|
+
getChildrenAfter?: (id: string, row: RowType | null) => ReactNode;
|
|
20
22
|
};
|
|
21
23
|
onIDsChanged?: () => void;
|
|
22
24
|
children?: React.ReactNode;
|
|
@@ -22,7 +22,7 @@ export class NSASectionList extends Component {
|
|
|
22
22
|
return (_b = (_a = this.NSATable_Main.current) === null || _a === void 0 ? void 0 : _a.getSelectedRows()) !== null && _b !== void 0 ? _b : [];
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
var _a, _b, _c, _d, _e
|
|
25
|
+
var _a, _b, _c, _d, _e;
|
|
26
26
|
let table_renderer = () => (_jsx(NSATable, { ref: this.NSATable_Main, entity: this.props.entity, ctf: this.props.ctf, url: this.props.url, ui: this.props.ui, classList: [Styles.nsa_table], onSelectionChanged: () => {
|
|
27
27
|
var _a, _b;
|
|
28
28
|
(_b = (_a = this.props).onIDsChanged) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
@@ -44,11 +44,19 @@ export class NSASectionList extends Component {
|
|
|
44
44
|
var _a;
|
|
45
45
|
this.setState({ mode: (_a = e.getValueOne(false)) !== null && _a !== void 0 ? _a : "" });
|
|
46
46
|
} }) }) }), _jsx(NSSpace, { size: NSSpaceSizeType.MINI })] }), show_view ?
|
|
47
|
-
_jsx(NSSplitter, { storage_key: `ns-splitter-product:${this.props.entity.product_id}-entity:${this.props.entity.name}-height`, master_content: mode_current.getChild(this.props.entity), detail_content: (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
_jsx(NSSplitter, { storage_key: `ns-splitter-product:${this.props.entity.product_id}-entity:${this.props.entity.name}-height`, master_content: mode_current.getChild(this.props.entity), detail_content: (() => {
|
|
48
|
+
var _a, _b, _c, _d, _e;
|
|
49
|
+
let _id = this.getSelectedIDs()[0];
|
|
50
|
+
let _row = this.getSelectedRows()[0];
|
|
51
|
+
if (this.state.selected_row_ids.length === 1)
|
|
52
|
+
return _jsxs(_Fragment, { children: [((_a = this.props.ui) === null || _a === void 0 ? void 0 : _a.getChildrenBefore) &&
|
|
53
|
+
((_b = this.props.ui) === null || _b === void 0 ? void 0 : _b.getChildrenBefore(_id, _row)), _jsx(NSASectionViewTabPage, Object.assign({ ref: this.NSASectionViewTabPage_Ref }, this.props, { ui: (_c = this.props.ui) === null || _c === void 0 ? void 0 : _c.tab_page_view, model: {
|
|
54
|
+
id: _id,
|
|
55
|
+
row: _row
|
|
56
|
+
} }), this.state.selected_row_ids[0]), ((_d = this.props.ui) === null || _d === void 0 ? void 0 : _d.getChildrenAfter) &&
|
|
57
|
+
((_e = this.props.ui) === null || _e === void 0 ? void 0 : _e.getChildrenAfter(_id, _row))] });
|
|
58
|
+
return _jsx(_Fragment, {});
|
|
59
|
+
})() }) :
|
|
52
60
|
mode_current.getChild(this.props.entity)] }), this.props.children] }));
|
|
53
61
|
}
|
|
54
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSASectionList.js","sourceRoot":"","sources":["../../src/layouts/NSASectionList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAuB,UAAU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,IAClB,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -13,8 +13,6 @@ export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerRes
|
|
|
13
13
|
getChildren?: {
|
|
14
14
|
getChildrenBeforeTitle?: () => ReactNode;
|
|
15
15
|
getChildrenAfterTitle?: () => ReactNode;
|
|
16
|
-
getChildrenBeforeMenuList?: () => ReactNode;
|
|
17
|
-
getChildrenAfterMenuList?: () => ReactNode;
|
|
18
16
|
};
|
|
19
17
|
product?: {
|
|
20
18
|
search?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SetTimeouService } from 'namirasoft-core';
|
|
3
|
-
import { NSBox, NSBoxSearch, NSLine,
|
|
3
|
+
import { NSBox, NSBoxSearch, NSLine, NSListProduct, NSLoading, NSSpace, NSSpaceSizeType, NSTitle, ProductCacheService } from 'namirasoft-site-react';
|
|
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, _u
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
8
8
|
let cache = ProductCacheService.get(props.product_id, props.notifier.onError);
|
|
9
9
|
let [state, setState] = useState({ product: null });
|
|
10
10
|
useEffect(() => {
|
|
@@ -19,11 +19,11 @@ export function NSAHomePage(props) {
|
|
|
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
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),
|
|
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.NORMAL }), _jsx(NSLine, {}), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx(NSTitle, { title: "Related Products", style: { fontSize: 32, marginBottom: ((_r = props.product) === null || _r === void 0 ? void 0 : _r.search) ? 16 : 32 } }), ((_s = props.product) === null || _s === void 0 ? void 0 : _s.search) &&
|
|
23
23
|
_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
24
|
new SetTimeouService().setTimeoutIfNotCalledAgain(() => {
|
|
25
25
|
setState((prev) => { var _a; return (Object.assign(Object.assign({}, prev), { search_text: (_a = box.getValue()) !== null && _a !== void 0 ? _a : "" })); });
|
|
26
26
|
}, 1500);
|
|
27
|
-
} }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL })] }), _jsx(NSListProduct, { scope: scope, name: "Home", search: state.search_text, getChildrenBefore: (
|
|
27
|
+
} }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL })] }), _jsx(NSListProduct, { scope: scope, name: "Home", search: state.search_text, getChildrenBefore: (_t = props.product) === null || _t === void 0 ? void 0 : _t.getChildrenBefore, getChildrenAfter: (_u = props.product) === null || _u === void 0 ? void 0 : _u.getChildrenAfter })] }));
|
|
28
28
|
}
|
|
29
29
|
//# 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,MAAM,EAAE,
|
|
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,MAAM,EAAE,aAAa,EAA0B,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAClM,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AA4B9C,MAAM,UAAU,WAAW,CAAC,KAAuB;;IAE/C,IAAI,KAAK,GAAG,mBAAmB,CAAC,GAAG,CA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,EAAE,mCAAI,EAAE,IAAG,CAAA,EAAA,CAAC,CAAC;gCACzE,CAAC,EAAE,IAAI,CAAC,CAAC;4BACb,CAAC,GACH,EACF,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,IACzC,EAEP,KAAC,aAAa,IACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,KAAK,CAAC,WAAW,EACzB,iBAAiB,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,iBAAiB,EACnD,gBAAgB,EAAE,MAAA,KAAK,CAAC,OAAO,0CAAE,gBAAgB,GACnD,IACA,CACT,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -13,6 +13,8 @@ export interface NSASectionListCustomProps<RowType extends { id: string }, RowTy
|
|
|
13
13
|
modes?: { [name: string]: { getChild: (entity: IEntityInfo<RowType, RowTypeInput>) => JSX.Element, show_view?: boolean } };
|
|
14
14
|
default_mode?: string;
|
|
15
15
|
tab_page_view?: NSASectionViewTabPageUIProps<RowType>;
|
|
16
|
+
getChildrenBefore?: (id: string, row: RowType | null) => ReactNode;
|
|
17
|
+
getChildrenAfter?: (id: string, row: RowType | null) => ReactNode;
|
|
16
18
|
};
|
|
17
19
|
onIDsChanged?: () => void;
|
|
18
20
|
children?: React.ReactNode;
|
|
@@ -124,19 +126,36 @@ export class NSASectionList<RowType extends { id: string }, RowTypeInput = RowTy
|
|
|
124
126
|
<NSSplitter
|
|
125
127
|
storage_key={`ns-splitter-product:${this.props.entity.product_id}-entity:${this.props.entity.name}-height`}
|
|
126
128
|
master_content={mode_current.getChild(this.props.entity)}
|
|
127
|
-
detail_content={
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
detail_content={
|
|
130
|
+
(() =>
|
|
131
|
+
{
|
|
132
|
+
let _id = this.getSelectedIDs()[0];
|
|
133
|
+
let _row = this.getSelectedRows()[0];
|
|
134
|
+
|
|
135
|
+
if (this.state.selected_row_ids.length === 1)
|
|
136
|
+
return <>
|
|
137
|
+
{
|
|
138
|
+
this.props.ui?.getChildrenBefore &&
|
|
139
|
+
this.props.ui?.getChildrenBefore(_id, _row)
|
|
140
|
+
}
|
|
141
|
+
<NSASectionViewTabPage<RowType, RowTypeInput>
|
|
142
|
+
key={this.state.selected_row_ids[0]}
|
|
143
|
+
ref={this.NSASectionViewTabPage_Ref}
|
|
144
|
+
{...this.props}
|
|
145
|
+
ui={this.props.ui?.tab_page_view}
|
|
146
|
+
model={{
|
|
147
|
+
id: _id,
|
|
148
|
+
row: _row
|
|
149
|
+
}}
|
|
150
|
+
/>
|
|
151
|
+
{
|
|
152
|
+
this.props.ui?.getChildrenAfter &&
|
|
153
|
+
this.props.ui?.getChildrenAfter(_id, _row)
|
|
154
|
+
}
|
|
155
|
+
</>;
|
|
156
|
+
return <></>;
|
|
157
|
+
})()
|
|
158
|
+
}
|
|
140
159
|
/> :
|
|
141
160
|
mode_current.getChild(this.props.entity)
|
|
142
161
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProductFullRow } from 'namirasoft-api-product';
|
|
2
2
|
import { SetTimeouService } from 'namirasoft-core';
|
|
3
|
-
import { IBaseComponentProps, NSBox, NSBoxSearch, NSLine,
|
|
3
|
+
import { IBaseComponentProps, NSBox, NSBoxSearch, NSLine, NSListProduct, NSListProductCardProps, NSLoading, NSSpace, NSSpaceSizeType, NSTitle, ProductCacheService } from 'namirasoft-site-react';
|
|
4
4
|
import { ReactNode, useEffect, useState } from 'react';
|
|
5
5
|
import { NSARouterMakerResult } from '../NSARouterMakerResult';
|
|
6
6
|
import Styles from './NSAHomePage.module.css';
|
|
@@ -17,8 +17,6 @@ export interface NSAHomePageProps extends IBaseComponentProps, NSARouterMakerRes
|
|
|
17
17
|
getChildren?: {
|
|
18
18
|
getChildrenBeforeTitle?: () => ReactNode;
|
|
19
19
|
getChildrenAfterTitle?: () => ReactNode;
|
|
20
|
-
getChildrenBeforeMenuList?: () => ReactNode;
|
|
21
|
-
getChildrenAfterMenuList?: () => ReactNode;
|
|
22
20
|
};
|
|
23
21
|
product?: {
|
|
24
22
|
search?: boolean;
|
|
@@ -77,15 +75,6 @@ export function NSAHomePage(props: NSAHomePageProps)
|
|
|
77
75
|
|
|
78
76
|
{props.getChildren?.getChildrenAfterTitle?.()}
|
|
79
77
|
|
|
80
|
-
{props.getChildren?.getChildrenBeforeMenuList?.()}
|
|
81
|
-
<NSListMenu
|
|
82
|
-
scope={scope}
|
|
83
|
-
name="Header"
|
|
84
|
-
isLoggedIn={() => props.account.token_manager.exists()}
|
|
85
|
-
onError={props.notifier.onError}
|
|
86
|
-
/>
|
|
87
|
-
{props.getChildren?.getChildrenAfterMenuList?.()}
|
|
88
|
-
|
|
89
78
|
<NSSpace size={NSSpaceSizeType.NORMAL} />
|
|
90
79
|
<NSLine />
|
|
91
80
|
<NSSpace size={NSSpaceSizeType.SMALL} />
|