namirasoft-account-react 1.5.12 → 1.5.14
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/NSARouter.d.ts +16 -0
- package/dist/NSARouter.js +41 -0
- package/dist/NSARouter.js.map +1 -0
- package/dist/NSFRouterProps.d.ts +6 -0
- package/dist/NSFRouterProps.js +2 -0
- package/dist/NSFRouterProps.js.map +1 -0
- package/dist/layouts/NSALayout.js +2 -2
- package/dist/layouts/{NSARouter_Field.d.ts → NSALayout_Field.d.ts} +1 -1
- package/dist/layouts/{NSARouter_Field.js → NSALayout_Field.js} +11 -11
- package/dist/layouts/{NSARouter_Field.js.map → NSALayout_Field.js.map} +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/pages/NSFCategoryEditPage.d.ts +2 -2
- package/dist/pages/NSFCategoryEditPage.js.map +1 -1
- package/dist/pages/NSFCategoryListPage.d.ts +2 -2
- package/dist/pages/NSFCategoryListPage.js.map +1 -1
- package/dist/pages/NSFCategoryViewPage.d.ts +2 -2
- package/dist/pages/NSFCategoryViewPage.js.map +1 -1
- package/dist/pages/NSFEntities.d.ts +3 -9
- package/dist/pages/NSFEntities.js.map +1 -1
- package/package.json +2 -2
- package/src/NSARouter.tsx +68 -0
- package/src/NSFRouterProps.ts +8 -0
- package/src/layouts/NSALayout.tsx +2 -2
- package/src/layouts/{NSARouter_Field.ts → NSALayout_Field.ts} +10 -10
- package/src/main.ts +2 -2
- package/src/pages/NSFCategoryEditPage.tsx +3 -2
- package/src/pages/NSFCategoryListPage.tsx +3 -2
- package/src/pages/NSFCategoryViewPage.tsx +3 -2
- package/src/pages/NSFEntities.ts +3 -9
- package/dist/App.css +0 -32
- package/dist/layouts/NSARouter.d.ts +0 -17
- package/dist/layouts/NSARouter.js +0 -29
- package/dist/layouts/NSARouter.js.map +0 -1
- package/src/App.css +0 -32
- package/src/layouts/NSARouter.tsx +0 -53
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EntityResolveResponseRow } from 'namirasoft-field';
|
|
2
|
+
import { Component, ReactNode } from 'react';
|
|
3
|
+
import { NSARouterMakerProps } from './NSARouterMakerProps';
|
|
4
|
+
export interface NSARouterProps extends NSARouterMakerProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface NSARouterState {
|
|
8
|
+
rows: EntityResolveResponseRow | null;
|
|
9
|
+
}
|
|
10
|
+
export declare class NSARouter extends Component<NSARouterProps, NSARouterState> {
|
|
11
|
+
private cache_field;
|
|
12
|
+
constructor(props: NSARouterProps);
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EnvService } from 'namirasoft-core';
|
|
3
|
+
import { NamirasoftFieldServer, SlotEntityType } from 'namirasoft-field';
|
|
4
|
+
import { Component } from 'react';
|
|
5
|
+
import { Route, Routes } from 'react-router-dom';
|
|
6
|
+
import { FieldCacheService } from './FieldCacheService';
|
|
7
|
+
import { NSFRoutes } from './NSFRoutes';
|
|
8
|
+
import { NSFCategoryEditPage } from './pages/NSFCategoryEditPage';
|
|
9
|
+
import { NSFCategoryListPage } from './pages/NSFCategoryListPage';
|
|
10
|
+
import { NSFCategoryViewPage } from './pages/NSFCategoryViewPage';
|
|
11
|
+
export class NSARouter extends Component {
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(props);
|
|
14
|
+
this.cache_field = FieldCacheService.get(this.props.account.token_manager, this.props.product_id, this.props.notifier.onError);
|
|
15
|
+
this.state = {
|
|
16
|
+
rows: null,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
componentDidMount() {
|
|
20
|
+
this.cache_field.get().then(rows => {
|
|
21
|
+
this.setState(prev => (Object.assign(Object.assign({}, prev), { rows })));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
var _a;
|
|
26
|
+
const { rows } = this.state;
|
|
27
|
+
const scope_slots = (_a = rows === null || rows === void 0 ? void 0 : rows.slots.filter(s => s.entity_type === SlotEntityType.CategoryScope)) !== null && _a !== void 0 ? _a : [];
|
|
28
|
+
let pairs = scope_slots.map(slot => ({ slot, category_scope: rows === null || rows === void 0 ? void 0 : rows.category_scopes.find(c => c.id === slot.entity_id) })).filter(i => i.category_scope);
|
|
29
|
+
let REACT_APP_BASE_URL_FIELD = new EnvService("REACT_APP_BASE_URL_FIELD", true).getString();
|
|
30
|
+
let field = new NamirasoftFieldServer(REACT_APP_BASE_URL_FIELD, this.props.account.token_manager, this.props.notifier.onError);
|
|
31
|
+
let servers = { field };
|
|
32
|
+
return (_jsxs(Routes, { children: [this.props.children, pairs.flatMap(({ slot, category_scope }) => [
|
|
33
|
+
_jsx(Route, { path: NSFRoutes.CategoryList(slot.id, slot.name), element: _jsx(NSFCategoryListPage, Object.assign({}, this.props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-list`),
|
|
34
|
+
_jsx(Route, { path: NSFRoutes.CategoryNew(slot.id, slot.name), element: _jsx(NSFCategoryEditPage, Object.assign({}, this.props, { servers: servers, isEdit: false, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-new`),
|
|
35
|
+
_jsx(Route, { path: NSFRoutes.CategoryCopy(slot.id, slot.name, ":id"), element: _jsx(NSFCategoryEditPage, Object.assign({}, this.props, { servers: servers, isEdit: false, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-copy`),
|
|
36
|
+
_jsx(Route, { path: NSFRoutes.CategoryEdit(slot.id, slot.name, ":id"), element: _jsx(NSFCategoryEditPage, Object.assign({}, this.props, { servers: servers, isEdit: true, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-edit`),
|
|
37
|
+
_jsx(Route, { path: NSFRoutes.CategoryView(slot.id, slot.name, ":id"), element: _jsx(NSFCategoryViewPage, Object.assign({}, this.props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-view`),
|
|
38
|
+
])] }));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=NSARouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSARouter.js","sourceRoot":"","sources":["../src/NSARouter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAA8C,qBAAqB,EAAE,cAAc,EAAW,MAAM,kBAAkB,CAAC;AAC9H,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAYlE,MAAM,OAAO,SAAU,SAAQ,SAAyC;IAIpE,YAAY,KAAqB;QAE7B,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/H,IAAI,CAAC,KAAK,GAAG;YACT,IAAI,EAAE,IAAI;SACb,CAAC;IACN,CAAC;IACQ,iBAAiB;QAEtB,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI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B,CAA2L;oBACjO,KAAC,KAAK,IAAkC,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,KAAC,mBAAmB,oBAAK,IAAI,CAAC,KAAK,IAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,IAAI,IAAnM,GAAG,IAAI,CAAC,EAAE,gBAAgB,CAA6K;iBACtN,CAAC,IAED,CACZ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSFRouterProps.js","sourceRoot":"","sources":["../src/NSFRouterProps.ts"],"names":[],"mappings":""}
|
|
@@ -26,7 +26,7 @@ import { FieldCacheService } from '../FieldCacheService';
|
|
|
26
26
|
import { NSACacheService } from '../NSACacheService';
|
|
27
27
|
import { UseParams } from '../UseParams';
|
|
28
28
|
import { Actions } from './Actions';
|
|
29
|
-
import {
|
|
29
|
+
import { NSALayout_Field } from './NSALayout_Field';
|
|
30
30
|
import { NSASectionEdit } from './NSASectionEdit';
|
|
31
31
|
import { NSASectionList } from './NSASectionList';
|
|
32
32
|
import { NSASectionView } from './NSASectionView';
|
|
@@ -405,7 +405,7 @@ export class NSALayout extends Component {
|
|
|
405
405
|
onCollapse: () => {
|
|
406
406
|
this.setState((prev) => ({ showMasterMenu: !prev.showMasterMenu }));
|
|
407
407
|
},
|
|
408
|
-
filters_postprocessor: (filters) =>
|
|
408
|
+
filters_postprocessor: (filters) => NSALayout_Field.postprocess(filters, this.state.ctf_rows),
|
|
409
409
|
}, action: {
|
|
410
410
|
title: action_title,
|
|
411
411
|
description: action_description,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FilterLinkFullRow } from 'namirasoft-api-link';
|
|
2
2
|
import { EntityResolveResponseRow } from 'namirasoft-field';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class NSALayout_Field {
|
|
4
4
|
static postprocess(filters: FilterLinkFullRow[], rows: EntityResolveResponseRow | null): FilterLinkFullRow[];
|
|
5
5
|
private static findEntityRow;
|
|
6
6
|
private static make;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NamingConvention } from 'namirasoft-core';
|
|
2
2
|
import { SlotEntityType } from 'namirasoft-field';
|
|
3
3
|
import { NSFRoutes } from '../NSFRoutes';
|
|
4
|
-
export class
|
|
4
|
+
export class NSALayout_Field {
|
|
5
5
|
static postprocess(filters, rows) {
|
|
6
6
|
var _a, _b, _c, _d, _e;
|
|
7
7
|
if (!rows || rows.slots.length === 0)
|
|
@@ -9,16 +9,16 @@ export class NSARouter_Field {
|
|
|
9
9
|
const result = [...filters];
|
|
10
10
|
const id_counter = { value: -1000000 };
|
|
11
11
|
const matched = new Set();
|
|
12
|
-
|
|
12
|
+
NSALayout_Field.walk(filters, null, rows, result, id_counter, matched);
|
|
13
13
|
const fallback_filter_id = (_b = (_a = filters[0]) === null || _a === void 0 ? void 0 : _a.filter_id) !== null && _b !== void 0 ? _b : 0;
|
|
14
14
|
const fallback_filter_ref = (_d = (_c = filters[0]) === null || _c === void 0 ? void 0 : _c.filter) !== null && _d !== void 0 ? _d : null;
|
|
15
15
|
for (const slot of rows.slots) {
|
|
16
16
|
if (matched.has(slot.id))
|
|
17
17
|
continue;
|
|
18
|
-
const parent =
|
|
18
|
+
const parent = NSALayout_Field.make(id_counter, null, fallback_filter_id, fallback_filter_ref, slot.name, (_e = slot.description) !== null && _e !== void 0 ? _e : "", "");
|
|
19
19
|
result.push(parent);
|
|
20
|
-
result.push(
|
|
21
|
-
result.push(
|
|
20
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "Create", "", NSFRoutes.CategoryNew(slot.id, slot.name)));
|
|
21
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "List", "", NSFRoutes.CategoryList(slot.id, slot.name)));
|
|
22
22
|
}
|
|
23
23
|
return result;
|
|
24
24
|
}
|
|
@@ -72,21 +72,21 @@ export class NSARouter_Field {
|
|
|
72
72
|
const children = filters.filter(f => f.parent_id === parent_id);
|
|
73
73
|
for (const filter of children) {
|
|
74
74
|
const filter_name = (_c = (_a = filter.name) !== null && _a !== void 0 ? _a : (_b = filter.link) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : "";
|
|
75
|
-
const slot =
|
|
75
|
+
const slot = NSALayout_Field.findEntityRow(filter_name, rows);
|
|
76
76
|
if (slot) {
|
|
77
77
|
matched.add(slot.id);
|
|
78
|
-
const parent =
|
|
78
|
+
const parent = NSALayout_Field.make(id_counter, filter.parent_id, filter.filter_id, filter.filter, slot.name, (_d = slot.description) !== null && _d !== void 0 ? _d : "", "");
|
|
79
79
|
parent.order = ((_e = filter.order) !== null && _e !== void 0 ? _e : 0) - 1;
|
|
80
80
|
const idx = result.indexOf(filter);
|
|
81
81
|
if (idx >= 0)
|
|
82
82
|
result.splice(idx, 0, parent);
|
|
83
83
|
else
|
|
84
84
|
result.push(parent);
|
|
85
|
-
result.push(
|
|
86
|
-
result.push(
|
|
85
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "Create", "", NSFRoutes.CategoryNew(slot.id, slot.name)));
|
|
86
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "List", "", NSFRoutes.CategoryList(slot.id, slot.name)));
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
NSALayout_Field.walk(filters, filter.id, rows, result, id_counter, matched);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
//# sourceMappingURL=
|
|
92
|
+
//# sourceMappingURL=NSALayout_Field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"NSALayout_Field.js","sourceRoot":"","sources":["../../src/layouts/NSALayout_Field.ts"],"names":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|
package/dist/main.d.ts
CHANGED
|
@@ -26,8 +26,7 @@ export * from "./IEntityInfo";
|
|
|
26
26
|
export * from "./layouts/Actions";
|
|
27
27
|
export * from "./layouts/CFTUtil";
|
|
28
28
|
export * from "./layouts/NSALayout";
|
|
29
|
-
export * from "./layouts/
|
|
30
|
-
export * from "./layouts/NSARouter_Field";
|
|
29
|
+
export * from "./layouts/NSALayout_Field";
|
|
31
30
|
export * from "./layouts/NSASectionEdit";
|
|
32
31
|
export * from "./layouts/NSASectionEditTabPage";
|
|
33
32
|
export * from "./layouts/NSASectionList";
|
|
@@ -36,6 +35,7 @@ export * from "./layouts/NSASectionViewTabMore";
|
|
|
36
35
|
export * from "./layouts/NSASectionViewTabPage";
|
|
37
36
|
export * from "./NSACacheService";
|
|
38
37
|
export * from "./NSAFilterOperators";
|
|
38
|
+
export * from "./NSARouter";
|
|
39
39
|
export * from "./NSARouterMaker";
|
|
40
40
|
export * from "./NSARouterMakerConfig";
|
|
41
41
|
export * from "./NSARouterMakerProps";
|
package/dist/main.js
CHANGED
|
@@ -26,8 +26,7 @@ export * from "./IEntityInfo";
|
|
|
26
26
|
export * from "./layouts/Actions";
|
|
27
27
|
export * from "./layouts/CFTUtil";
|
|
28
28
|
export * from "./layouts/NSALayout";
|
|
29
|
-
export * from "./layouts/
|
|
30
|
-
export * from "./layouts/NSARouter_Field";
|
|
29
|
+
export * from "./layouts/NSALayout_Field";
|
|
31
30
|
export * from "./layouts/NSASectionEdit";
|
|
32
31
|
export * from "./layouts/NSASectionEditTabPage";
|
|
33
32
|
export * from "./layouts/NSASectionList";
|
|
@@ -36,6 +35,7 @@ export * from "./layouts/NSASectionViewTabMore";
|
|
|
36
35
|
export * from "./layouts/NSASectionViewTabPage";
|
|
37
36
|
export * from "./NSACacheService";
|
|
38
37
|
export * from "./NSAFilterOperators";
|
|
38
|
+
export * from "./NSARouter";
|
|
39
39
|
export * from "./NSARouterMaker";
|
|
40
40
|
export * from "./NSARouterMakerConfig";
|
|
41
41
|
export * from "./NSARouterMakerProps";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,UAAU,CAAC;AACzB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc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ow, SlotRow } from "namirasoft-field";
|
|
|
2
2
|
import { NSBoxString, NSBoxTextArea } from "namirasoft-site-react";
|
|
3
3
|
import { Component } from "react";
|
|
4
4
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
5
|
-
import {
|
|
6
|
-
export interface NSFCategoryEditPageProps extends NSARouterMakerProps,
|
|
5
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
6
|
+
export interface NSFCategoryEditPageProps extends NSARouterMakerProps, NSFRouterProps {
|
|
7
7
|
slot: SlotRow;
|
|
8
8
|
category_scope: CategoryScopeRow;
|
|
9
9
|
isEdit: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSFCategoryEditPage.js","sourceRoot":"","sources":["../../src/pages/NSFCategoryEditPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSFCategoryEditPage.js","sourceRoot":"","sources":["../../src/pages/NSFCategoryEditPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAW5C,MAAM,OAAO,mBAAoB,SAAQ,SAA6D;IAKrG,YAAY,KAA+B;QAE1C,KAAK,CAAC,KAAK,CAAC,CAAC;QALd,qBAAgB,GAAG,SAAS,EAAe,CAAC;QAC5C,6BAAw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AAC,MAAA,GAAG,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC;gCACxE,CAAC;6BACD;yBACD;qBACD,GACD;aACD,YAED,MAAC,QAAQ,eACR,KAAC,KAAK,cACL,KAAC,WAAW,IACX,GAAG,EAAE,IAAI,CAAC,gBAAgB,EAC1B,KAAK,EAAC,MAAM,EACZ,QAAQ,QACR,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EACpC,IAAI,EAAE,EAAE,IAAI,EAAE,iEAAiE,EAAE,GAChF,GACK,EACR,KAAC,aAAa,IACb,GAAG,EAAE,IAAI,CAAC,wBAAwB,EAClC,KAAK,EAAC,aAAa,EACnB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EACpC,IAAI,EAAE,EAAE,IAAI,EAAE,wEAAwE,EAAE,GACvF,IACQ,IACA,CACZ,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CategoryScopeRow, SlotRow } from "namirasoft-field";
|
|
2
2
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
3
|
-
import {
|
|
4
|
-
export interface NSFCategoryListPageProps extends NSARouterMakerProps,
|
|
3
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
4
|
+
export interface NSFCategoryListPageProps extends NSARouterMakerProps, NSFRouterProps {
|
|
5
5
|
slot: SlotRow;
|
|
6
6
|
category_scope: CategoryScopeRow;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSFCategoryListPage.js","sourceRoot":"","sources":["../../src/pages/NSFCategoryListPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSFCategoryListPage.js","sourceRoot":"","sources":["../../src/pages/NSFCategoryListPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IAElE,OAAO,CACN,KAAC,SAAS,oBACL,KAAK,IACT,MAAM,EAAE;YACP,WAAW,EAAE,qFAAqF;SAClG,EACD,KAAK,EAAE;YACN,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC;YACrE,IAAI,EAAE,EAAE;SACR,YAED,mBACG,IACQ,CACZ,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CategoryScopeRow, SlotRow } from "namirasoft-field";
|
|
2
2
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
3
|
-
import {
|
|
4
|
-
export interface NSFCategoryViewPageProps extends NSARouterMakerProps,
|
|
3
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
4
|
+
export interface NSFCategoryViewPageProps extends NSARouterMakerProps, NSFRouterProps {
|
|
5
5
|
slot: SlotRow;
|
|
6
6
|
category_scope: CategoryScopeRow;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSFCategoryViewPage.js","sourceRoot":"","sources":["../../src/pages/NSFCategoryViewPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSFCategoryViewPage.js","sourceRoot":"","sources":["../../src/pages/NSFCategoryViewPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,MAAM,UAAU,mBAAmB,CAAC,KAA+B;IAElE,OAAO,CACN,KAAC,SAAS,oBACL,KAAK,IACT,MAAM,EAAE;YACP,WAAW,EAAE,uEAAuE;SACpF,EACD,KAAK,EAAE;YACN,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC;YACrE,IAAI,EAAE,EAAE;SACR,YAED,kCAAM,IACK,CACZ,CAAC;AACH,CAAC"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CategoryInputRow, CategoryRow, CategoryScopeRow, NamirasoftFieldServer, SlotRow } from "namirasoft-field";
|
|
1
|
+
import { CategoryInputRow, CategoryRow, CategoryScopeRow, SlotRow } from "namirasoft-field";
|
|
3
2
|
import { IEntityInfo } from "../IEntityInfo";
|
|
4
3
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
5
|
-
|
|
6
|
-
servers: {
|
|
7
|
-
field: NamirasoftFieldServer;
|
|
8
|
-
product: NamirasoftAPIProductServer;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
4
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
11
5
|
export declare class NSFEntities {
|
|
12
|
-
static category(props: NSARouterMakerProps &
|
|
6
|
+
static category(props: NSARouterMakerProps & NSFRouterProps, slot: SlotRow, category_scope: CategoryScopeRow): IEntityInfo<CategoryRow, CategoryInputRow>;
|
|
13
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSFEntities.js","sourceRoot":"","sources":["../../src/pages/NSFEntities.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NSFEntities.js","sourceRoot":"","sources":["../../src/pages/NSFEntities.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAA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,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM;gBAC3C,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM;gBAC3C,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM;aAC3C;SACD,CAAC;IACH,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.5.
|
|
11
|
+
"version": "1.5.14",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"namirasoft-schema": "^1.5.0",
|
|
41
41
|
"namirasoft-secret": "^1.5.1",
|
|
42
42
|
"namirasoft-site-map": "^1.5.0",
|
|
43
|
-
"namirasoft-site-react": "^1.5.
|
|
43
|
+
"namirasoft-site-react": "^1.5.10",
|
|
44
44
|
"namirasoft-workspace": "^1.5.0",
|
|
45
45
|
"os-browserify": "^0.3.0",
|
|
46
46
|
"path-browserify": "^1.0.1",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CacheService, EnvService } from 'namirasoft-core';
|
|
2
|
+
import { CategoryScopeRow, EntityResolveResponseRow, NamirasoftFieldServer, SlotEntityType, SlotRow } from 'namirasoft-field';
|
|
3
|
+
import { Component, ReactNode } from 'react';
|
|
4
|
+
import { Route, Routes } from 'react-router-dom';
|
|
5
|
+
import { FieldCacheService } from './FieldCacheService';
|
|
6
|
+
import { NSARouterMakerProps } from './NSARouterMakerProps';
|
|
7
|
+
import { NSFRoutes } from './NSFRoutes';
|
|
8
|
+
import { NSFCategoryEditPage } from './pages/NSFCategoryEditPage';
|
|
9
|
+
import { NSFCategoryListPage } from './pages/NSFCategoryListPage';
|
|
10
|
+
import { NSFCategoryViewPage } from './pages/NSFCategoryViewPage';
|
|
11
|
+
|
|
12
|
+
export interface NSARouterProps extends NSARouterMakerProps
|
|
13
|
+
{
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface NSARouterState
|
|
18
|
+
{
|
|
19
|
+
rows: EntityResolveResponseRow | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class NSARouter extends Component<NSARouterProps, NSARouterState>
|
|
23
|
+
{
|
|
24
|
+
private cache_field: CacheService<EntityResolveResponseRow>;
|
|
25
|
+
|
|
26
|
+
constructor(props: NSARouterProps)
|
|
27
|
+
{
|
|
28
|
+
super(props);
|
|
29
|
+
|
|
30
|
+
this.cache_field = FieldCacheService.get(this.props.account.token_manager, this.props.product_id, this.props.notifier.onError);
|
|
31
|
+
|
|
32
|
+
this.state = {
|
|
33
|
+
rows: null,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
override componentDidMount(): void
|
|
37
|
+
{
|
|
38
|
+
this.cache_field.get().then(rows =>
|
|
39
|
+
{
|
|
40
|
+
this.setState(prev => ({ ...prev, rows }));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
override render()
|
|
44
|
+
{
|
|
45
|
+
const { rows } = this.state;
|
|
46
|
+
const scope_slots = rows?.slots.filter(s => s.entity_type === SlotEntityType.CategoryScope) ?? [];
|
|
47
|
+
let pairs = scope_slots.map(slot => ({ slot, category_scope: rows?.category_scopes.find(c => c.id === slot.entity_id) })).filter(i => i.category_scope) as { slot: SlotRow, category_scope: CategoryScopeRow }[];
|
|
48
|
+
|
|
49
|
+
let REACT_APP_BASE_URL_FIELD = new EnvService("REACT_APP_BASE_URL_FIELD", true).getString();
|
|
50
|
+
let field = new NamirasoftFieldServer(REACT_APP_BASE_URL_FIELD, this.props.account.token_manager, this.props.notifier.onError);
|
|
51
|
+
let servers = { field };
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Routes>
|
|
55
|
+
{this.props.children}
|
|
56
|
+
{
|
|
57
|
+
pairs.flatMap(({ slot, category_scope }) => [
|
|
58
|
+
<Route key={`${slot.id}-category-list`} path={NSFRoutes.CategoryList(slot.id, slot.name)} element={<NSFCategoryListPage {...this.props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
59
|
+
<Route key={`${slot.id}-category-new`} path={NSFRoutes.CategoryNew(slot.id, slot.name)} element={<NSFCategoryEditPage {...this.props} servers={servers} isEdit={false} slot={slot} category_scope={category_scope} />} />,
|
|
60
|
+
<Route key={`${slot.id}-category-copy`} path={NSFRoutes.CategoryCopy(slot.id, slot.name, ":id")} element={<NSFCategoryEditPage {...this.props} servers={servers} isEdit={false} slot={slot} category_scope={category_scope} />} />,
|
|
61
|
+
<Route key={`${slot.id}-category-edit`} path={NSFRoutes.CategoryEdit(slot.id, slot.name, ":id")} element={<NSFCategoryEditPage {...this.props} servers={servers} isEdit={true} slot={slot} category_scope={category_scope} />} />,
|
|
62
|
+
<Route key={`${slot.id}-category-view`} path={NSFRoutes.CategoryView(slot.id, slot.name, ":id")} element={<NSFCategoryViewPage {...this.props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
63
|
+
])
|
|
64
|
+
}
|
|
65
|
+
</Routes>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -21,7 +21,7 @@ import { NSACacheService } from '../NSACacheService';
|
|
|
21
21
|
import { NSARouterMakerProps } from '../NSARouterMakerProps';
|
|
22
22
|
import { UseParams } from '../UseParams';
|
|
23
23
|
import { Actions } from './Actions';
|
|
24
|
-
import {
|
|
24
|
+
import { NSALayout_Field } from './NSALayout_Field';
|
|
25
25
|
import { NSASectionEdit, NSASectionEditCustomProps } from './NSASectionEdit';
|
|
26
26
|
import { NSASectionList, NSASectionListCustomProps } from './NSASectionList';
|
|
27
27
|
import { NSASectionView, NSASectionViewCutomProps } from './NSASectionView';
|
|
@@ -670,7 +670,7 @@ export class NSALayout<RowType extends { id: string }, RowTypeInput = RowType> e
|
|
|
670
670
|
{
|
|
671
671
|
this.setState((prev) => ({ showMasterMenu: !prev.showMasterMenu }))
|
|
672
672
|
},
|
|
673
|
-
filters_postprocessor: (filters) =>
|
|
673
|
+
filters_postprocessor: (filters) => NSALayout_Field.postprocess(filters, this.state.ctf_rows),
|
|
674
674
|
}}
|
|
675
675
|
action={{
|
|
676
676
|
title: action_title,
|
|
@@ -3,7 +3,7 @@ import { NamingConvention } from 'namirasoft-core';
|
|
|
3
3
|
import { EntityResolveResponseRow, SlotEntityType, SlotRow } from 'namirasoft-field';
|
|
4
4
|
import { NSFRoutes } from '../NSFRoutes';
|
|
5
5
|
|
|
6
|
-
export class
|
|
6
|
+
export class NSALayout_Field
|
|
7
7
|
{
|
|
8
8
|
static postprocess(
|
|
9
9
|
filters: FilterLinkFullRow[],
|
|
@@ -17,7 +17,7 @@ export class NSARouter_Field
|
|
|
17
17
|
const id_counter = { value: -1_000_000 };
|
|
18
18
|
const matched = new Set<string>();
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
NSALayout_Field.walk(filters, null, rows, result, id_counter, matched);
|
|
21
21
|
|
|
22
22
|
const fallback_filter_id = filters[0]?.filter_id ?? 0;
|
|
23
23
|
const fallback_filter_ref = filters[0]?.filter ?? null;
|
|
@@ -26,11 +26,11 @@ export class NSARouter_Field
|
|
|
26
26
|
if (matched.has(slot.id))
|
|
27
27
|
continue;
|
|
28
28
|
|
|
29
|
-
const parent =
|
|
29
|
+
const parent = NSALayout_Field.make(id_counter, null, fallback_filter_id, fallback_filter_ref, slot.name, slot.description ?? "", "");
|
|
30
30
|
result.push(parent);
|
|
31
31
|
|
|
32
|
-
result.push(
|
|
33
|
-
result.push(
|
|
32
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "Create", "", NSFRoutes.CategoryNew(slot.id, slot.name)));
|
|
33
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "List", "", NSFRoutes.CategoryList(slot.id, slot.name)));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return result;
|
|
@@ -106,21 +106,21 @@ export class NSARouter_Field
|
|
|
106
106
|
for (const filter of children)
|
|
107
107
|
{
|
|
108
108
|
const filter_name = filter.name ?? filter.link?.name ?? "";
|
|
109
|
-
const slot =
|
|
109
|
+
const slot = NSALayout_Field.findEntityRow(filter_name, rows);
|
|
110
110
|
if (slot)
|
|
111
111
|
{
|
|
112
112
|
matched.add(slot.id);
|
|
113
|
-
const parent =
|
|
113
|
+
const parent = NSALayout_Field.make(id_counter, filter.parent_id, filter.filter_id, filter.filter, slot.name, slot.description ?? "", "");
|
|
114
114
|
parent.order = (filter.order ?? 0) - 1;
|
|
115
115
|
const idx = result.indexOf(filter);
|
|
116
116
|
if (idx >= 0)
|
|
117
117
|
result.splice(idx, 0, parent);
|
|
118
118
|
else
|
|
119
119
|
result.push(parent);
|
|
120
|
-
result.push(
|
|
121
|
-
result.push(
|
|
120
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "Create", "", NSFRoutes.CategoryNew(slot.id, slot.name)));
|
|
121
|
+
result.push(NSALayout_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "List", "", NSFRoutes.CategoryList(slot.id, slot.name)));
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
NSALayout_Field.walk(filters, filter.id, rows, result, id_counter, matched);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}
|
package/src/main.ts
CHANGED
|
@@ -26,8 +26,7 @@ export * from "./IEntityInfo";
|
|
|
26
26
|
export * from "./layouts/Actions";
|
|
27
27
|
export * from "./layouts/CFTUtil";
|
|
28
28
|
export * from "./layouts/NSALayout";
|
|
29
|
-
export * from "./layouts/
|
|
30
|
-
export * from "./layouts/NSARouter_Field";
|
|
29
|
+
export * from "./layouts/NSALayout_Field";
|
|
31
30
|
export * from "./layouts/NSASectionEdit";
|
|
32
31
|
export * from "./layouts/NSASectionEditTabPage";
|
|
33
32
|
export * from "./layouts/NSASectionList";
|
|
@@ -36,6 +35,7 @@ export * from "./layouts/NSASectionViewTabMore";
|
|
|
36
35
|
export * from "./layouts/NSASectionViewTabPage";
|
|
37
36
|
export * from "./NSACacheService";
|
|
38
37
|
export * from "./NSAFilterOperators";
|
|
38
|
+
export * from "./NSARouter";
|
|
39
39
|
export * from "./NSARouterMaker";
|
|
40
40
|
export * from "./NSARouterMakerConfig";
|
|
41
41
|
export * from "./NSARouterMakerProps";
|
|
@@ -3,9 +3,10 @@ import { NSBox, NSBoxString, NSBoxTextArea, NSColumn, NSRow } from "namirasoft-s
|
|
|
3
3
|
import { Component, createRef } from "react";
|
|
4
4
|
import { NSALayout } from "../layouts/NSALayout";
|
|
5
5
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
6
|
-
import {
|
|
6
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
7
|
+
import { NSFEntities } from "./NSFEntities";
|
|
7
8
|
|
|
8
|
-
export interface NSFCategoryEditPageProps extends NSARouterMakerProps,
|
|
9
|
+
export interface NSFCategoryEditPageProps extends NSARouterMakerProps, NSFRouterProps
|
|
9
10
|
{
|
|
10
11
|
slot: SlotRow;
|
|
11
12
|
category_scope: CategoryScopeRow;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CategoryScopeRow, SlotRow } from "namirasoft-field";
|
|
2
2
|
import { NSALayout } from "../layouts/NSALayout";
|
|
3
3
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
4
|
-
import {
|
|
4
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
5
|
+
import { NSFEntities } from "./NSFEntities";
|
|
5
6
|
|
|
6
|
-
export interface NSFCategoryListPageProps extends NSARouterMakerProps,
|
|
7
|
+
export interface NSFCategoryListPageProps extends NSARouterMakerProps, NSFRouterProps
|
|
7
8
|
{
|
|
8
9
|
slot: SlotRow;
|
|
9
10
|
category_scope: CategoryScopeRow;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CategoryScopeRow, SlotRow } from "namirasoft-field";
|
|
2
2
|
import { NSALayout } from "../layouts/NSALayout";
|
|
3
3
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
4
|
-
import {
|
|
4
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
5
|
+
import { NSFEntities } from "./NSFEntities";
|
|
5
6
|
|
|
6
|
-
export interface NSFCategoryViewPageProps extends NSARouterMakerProps,
|
|
7
|
+
export interface NSFCategoryViewPageProps extends NSARouterMakerProps, NSFRouterProps
|
|
7
8
|
{
|
|
8
9
|
slot: SlotRow;
|
|
9
10
|
category_scope: CategoryScopeRow;
|
package/src/pages/NSFEntities.ts
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProductUUID } from "namirasoft-api-product";
|
|
2
2
|
import { EnvService, FilterItem, FilterItemOperator, IStorageLocal } from "namirasoft-core";
|
|
3
3
|
import { CategoryInputRow, CategoryRow, CategoryScopeRow, NamirasoftFieldMetaDatabase, NamirasoftFieldServer, SlotRow } from "namirasoft-field";
|
|
4
4
|
import { NamirasoftMap } from "namirasoft-site-map";
|
|
5
5
|
import { BaseColumnFormatter, DateTimeFormatter, IDFormatter, StringFormatter, StringFormatterSizeType } from "namirasoft-site-react";
|
|
6
6
|
import { IEntityInfo } from "../IEntityInfo";
|
|
7
7
|
import { NSARouterMakerProps } from "../NSARouterMakerProps";
|
|
8
|
+
import { NSFRouterProps } from "../NSFRouterProps";
|
|
8
9
|
import { NSFRoutes } from "../NSFRoutes";
|
|
9
10
|
|
|
10
|
-
export interface NSFFieldServersProps
|
|
11
|
-
{
|
|
12
|
-
servers: {
|
|
13
|
-
field: NamirasoftFieldServer;
|
|
14
|
-
product: NamirasoftAPIProductServer;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
11
|
export class NSFEntities
|
|
18
12
|
{
|
|
19
|
-
static category(props: NSARouterMakerProps &
|
|
13
|
+
static category(props: NSARouterMakerProps & NSFRouterProps, slot: SlotRow, category_scope: CategoryScopeRow): IEntityInfo<CategoryRow, CategoryInputRow>
|
|
20
14
|
{
|
|
21
15
|
let namirasoft = new NamirasoftMap(props.account.token_manager, console.error);
|
|
22
16
|
|
package/dist/App.css
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: inter;
|
|
3
|
-
src: url("../src/assets/fonts/Inter-Regular.ttf");
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
body {
|
|
7
|
-
margin: 0;
|
|
8
|
-
font-family: inter;
|
|
9
|
-
-webkit-font-smoothing: antialiased;
|
|
10
|
-
-moz-osx-font-smoothing: grayscale;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.btn-close {
|
|
15
|
-
background: url(https://static.namirasoft.com/image/concept/close/blue.svg) center/1em auto no-repeat !important;
|
|
16
|
-
opacity: 1 !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.nsa_font_16_bold {
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nsa_font_13_normal {
|
|
25
|
-
font-size: 13px;
|
|
26
|
-
font-weight: 300;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nsa_font_12_normal {
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
font-weight: 300;
|
|
32
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EntityResolveResponseRow } from 'namirasoft-field';
|
|
2
|
-
import { Component, ReactNode } from 'react';
|
|
3
|
-
import { NSARouterMakerProps } from '../NSARouterMakerProps';
|
|
4
|
-
import { NSFFieldServersProps } from '../pages/NSFEntities';
|
|
5
|
-
export interface NSARoutesProps {
|
|
6
|
-
props: NSARouterMakerProps;
|
|
7
|
-
servers: NSFFieldServersProps['servers'];
|
|
8
|
-
rows: EntityResolveResponseRow | null;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
interface NSARoutesState {
|
|
12
|
-
}
|
|
13
|
-
export declare class NSARouter extends Component<NSARoutesProps, NSARoutesState> {
|
|
14
|
-
constructor(props: NSARoutesProps);
|
|
15
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { SlotEntityType } from 'namirasoft-field';
|
|
3
|
-
import { NSRoutes } from 'namirasoft-site-react';
|
|
4
|
-
import { Component } from 'react';
|
|
5
|
-
import { Route } from 'react-router-dom';
|
|
6
|
-
import { NSFRoutes } from '../NSFRoutes';
|
|
7
|
-
import { NSFCategoryEditPage } from '../pages/NSFCategoryEditPage';
|
|
8
|
-
import { NSFCategoryListPage } from '../pages/NSFCategoryListPage';
|
|
9
|
-
import { NSFCategoryViewPage } from '../pages/NSFCategoryViewPage';
|
|
10
|
-
export class NSARouter extends Component {
|
|
11
|
-
constructor(props) {
|
|
12
|
-
super(props);
|
|
13
|
-
this.state = {};
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
var _a;
|
|
17
|
-
const { props, servers, rows, children } = this.props;
|
|
18
|
-
const scope_slots = (_a = rows === null || rows === void 0 ? void 0 : rows.slots.filter(s => s.entity_type === SlotEntityType.CategoryScope)) !== null && _a !== void 0 ? _a : [];
|
|
19
|
-
let pairs = scope_slots.map(slot => ({ slot, category_scope: rows === null || rows === void 0 ? void 0 : rows.category_scopes.find(c => c.id === slot.entity_id) })).filter(i => i.category_scope);
|
|
20
|
-
return (_jsxs(NSRoutes, { children: [children, pairs.flatMap(({ slot, category_scope }) => [
|
|
21
|
-
_jsx(Route, { path: NSFRoutes.CategoryList(slot.id, slot.name), element: _jsx(NSFCategoryListPage, Object.assign({}, props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-list`),
|
|
22
|
-
_jsx(Route, { path: NSFRoutes.CategoryNew(slot.id, slot.name), element: _jsx(NSFCategoryEditPage, Object.assign({ isEdit: false }, props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-new`),
|
|
23
|
-
_jsx(Route, { path: NSFRoutes.CategoryCopy(slot.id, slot.name, ":id"), element: _jsx(NSFCategoryEditPage, Object.assign({ isEdit: false }, props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-copy`),
|
|
24
|
-
_jsx(Route, { path: NSFRoutes.CategoryEdit(slot.id, slot.name, ":id"), element: _jsx(NSFCategoryEditPage, Object.assign({ isEdit: true }, props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-edit`),
|
|
25
|
-
_jsx(Route, { path: NSFRoutes.CategoryView(slot.id, slot.name, ":id"), element: _jsx(NSFCategoryViewPage, Object.assign({}, props, { servers: servers, slot: slot, category_scope: category_scope })) }, `${slot.id}-category-view`),
|
|
26
|
-
])] }));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=NSARouter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSARouter.js","sourceRoot":"","sources":["../../src/layouts/NSARouter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA8C,cAAc,EAAW,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAcnE,MAAM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|
package/src/App.css
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: inter;
|
|
3
|
-
src: url("../src/assets/fonts/Inter-Regular.ttf");
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
body {
|
|
7
|
-
margin: 0;
|
|
8
|
-
font-family: inter;
|
|
9
|
-
-webkit-font-smoothing: antialiased;
|
|
10
|
-
-moz-osx-font-smoothing: grayscale;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.btn-close {
|
|
15
|
-
background: url(https://static.namirasoft.com/image/concept/close/blue.svg) center/1em auto no-repeat !important;
|
|
16
|
-
opacity: 1 !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.nsa_font_16_bold {
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
font-weight: 600;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nsa_font_13_normal {
|
|
25
|
-
font-size: 13px;
|
|
26
|
-
font-weight: 300;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.nsa_font_12_normal {
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
font-weight: 300;
|
|
32
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { CategoryScopeRow, EntityResolveResponseRow, SlotEntityType, SlotRow } from 'namirasoft-field';
|
|
2
|
-
import { NSRoutes } from 'namirasoft-site-react';
|
|
3
|
-
import { Component, ReactNode } from 'react';
|
|
4
|
-
import { Route } from 'react-router-dom';
|
|
5
|
-
import { NSARouterMakerProps } from '../NSARouterMakerProps';
|
|
6
|
-
import { NSFRoutes } from '../NSFRoutes';
|
|
7
|
-
import { NSFCategoryEditPage } from '../pages/NSFCategoryEditPage';
|
|
8
|
-
import { NSFFieldServersProps } from '../pages/NSFEntities';
|
|
9
|
-
import { NSFCategoryListPage } from '../pages/NSFCategoryListPage';
|
|
10
|
-
import { NSFCategoryViewPage } from '../pages/NSFCategoryViewPage';
|
|
11
|
-
|
|
12
|
-
export interface NSARoutesProps
|
|
13
|
-
{
|
|
14
|
-
props: NSARouterMakerProps;
|
|
15
|
-
servers: NSFFieldServersProps['servers'];
|
|
16
|
-
rows: EntityResolveResponseRow | null;
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface NSARoutesState
|
|
21
|
-
{
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class NSARouter extends Component<NSARoutesProps, NSARoutesState>
|
|
25
|
-
{
|
|
26
|
-
constructor(props: NSARoutesProps)
|
|
27
|
-
{
|
|
28
|
-
super(props);
|
|
29
|
-
|
|
30
|
-
this.state = {};
|
|
31
|
-
}
|
|
32
|
-
override render()
|
|
33
|
-
{
|
|
34
|
-
const { props, servers, rows, children } = this.props;
|
|
35
|
-
const scope_slots = rows?.slots.filter(s => s.entity_type === SlotEntityType.CategoryScope) ?? [];
|
|
36
|
-
let pairs = scope_slots.map(slot => ({ slot, category_scope: rows?.category_scopes.find(c => c.id === slot.entity_id) })).filter(i => i.category_scope) as { slot: SlotRow, category_scope: CategoryScopeRow }[];
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<NSRoutes>
|
|
40
|
-
{children}
|
|
41
|
-
{
|
|
42
|
-
pairs.flatMap(({ slot, category_scope }) => [
|
|
43
|
-
<Route key={`${slot.id}-category-list`} path={NSFRoutes.CategoryList(slot.id, slot.name)} element={<NSFCategoryListPage {...props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
44
|
-
<Route key={`${slot.id}-category-new`} path={NSFRoutes.CategoryNew(slot.id, slot.name)} element={<NSFCategoryEditPage isEdit={false} {...props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
45
|
-
<Route key={`${slot.id}-category-copy`} path={NSFRoutes.CategoryCopy(slot.id, slot.name, ":id")} element={<NSFCategoryEditPage isEdit={false} {...props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
46
|
-
<Route key={`${slot.id}-category-edit`} path={NSFRoutes.CategoryEdit(slot.id, slot.name, ":id")} element={<NSFCategoryEditPage isEdit={true} {...props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
47
|
-
<Route key={`${slot.id}-category-view`} path={NSFRoutes.CategoryView(slot.id, slot.name, ":id")} element={<NSFCategoryViewPage {...props} servers={servers} slot={slot} category_scope={category_scope} />} />,
|
|
48
|
-
])
|
|
49
|
-
}
|
|
50
|
-
</NSRoutes>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
}
|