namirasoft-account-react 1.5.22 → 1.5.23
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.
|
@@ -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,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,SAAS,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,QAAQ,EAAmB,MAAM,wBAAwB,CAAC;AACnE,OAAO,MAAM,MAAM,6BAA6B,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAg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AAC,CAAC,CAAC;oCACnC,IAAI,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;oCAErC,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC;wCAC3C,OAAO,8BAEL,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,iBAAiB;qDAChC,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA,EAE5C,KAAC,qBAAqB,kBAErB,GAAG,EAAE,IAAI,CAAC,yBAAyB,IAC/B,IAAI,CAAC,KAAK,IACd,EAAE,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,aAAa,EAChC,KAAK,EAAE;wDACN,EAAE,EAAE,GAAG;wDACP,GAAG,EAAE,IAAI;qDACT,KAPI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAQlC,EAED,CAAA,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,gBAAgB;qDAC/B,MAAA,IAAI,CAAC,KAAK,CAAC,EAAE,0CAAE,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA,IAEzC,CAAC;oCACL,OAAO,mBAAK,CAAC;gCACd,CAAC,CAAC,EAAE,GAEJ,CAAC,CAAC;4BACJ,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAErC,EACL,IAAI,CAAC,KAAK,CAAC,QAAQ,IAClB,CACH,CAAC;IACH,CAAC;CACD"}
|
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
|
}
|