namirasoft-account-react 1.5.10 → 1.5.12

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.
Files changed (43) hide show
  1. package/dist/NSFRoutes.d.ts +7 -0
  2. package/dist/NSFRoutes.js +29 -0
  3. package/dist/NSFRoutes.js.map +1 -0
  4. package/dist/layouts/NSALayout.js +2 -2
  5. package/dist/layouts/NSARouter.d.ts +17 -0
  6. package/dist/layouts/NSARouter.js +29 -0
  7. package/dist/layouts/NSARouter.js.map +1 -0
  8. package/dist/layouts/{NSARoutes_Field.d.ts → NSARouter_Field.d.ts} +2 -2
  9. package/dist/layouts/{NSARoutes_Field.js → NSARouter_Field.js} +28 -25
  10. package/dist/layouts/NSARouter_Field.js.map +1 -0
  11. package/dist/layouts/NSASectionList.js +1 -1
  12. package/dist/layouts/NSASectionList.js.map +1 -1
  13. package/dist/main.d.ts +21 -14
  14. package/dist/main.js +21 -14
  15. package/dist/main.js.map +1 -1
  16. package/dist/pages/NSFCategoryEditPage.d.ts +19 -0
  17. package/dist/pages/NSFCategoryEditPage.js +47 -0
  18. package/dist/pages/NSFCategoryEditPage.js.map +1 -0
  19. package/dist/pages/NSFCategoryListPage.d.ts +8 -0
  20. package/dist/pages/NSFCategoryListPage.js +12 -0
  21. package/dist/pages/NSFCategoryListPage.js.map +1 -0
  22. package/dist/pages/NSFCategoryViewPage.d.ts +8 -0
  23. package/dist/pages/NSFCategoryViewPage.js +12 -0
  24. package/dist/pages/NSFCategoryViewPage.js.map +1 -0
  25. package/dist/pages/NSFEntities.d.ts +13 -0
  26. package/dist/pages/NSFEntities.js +60 -0
  27. package/dist/pages/NSFEntities.js.map +1 -0
  28. package/package.json +1 -1
  29. package/src/NSFRoutes.ts +31 -0
  30. package/src/layouts/NSALayout.tsx +2 -2
  31. package/src/layouts/NSARouter.tsx +53 -0
  32. package/src/layouts/{NSARoutes_Field.ts → NSARouter_Field.ts} +27 -24
  33. package/src/layouts/NSASectionList.tsx +1 -1
  34. package/src/main.ts +21 -14
  35. package/src/pages/NSFCategoryEditPage.tsx +91 -0
  36. package/src/pages/NSFCategoryListPage.tsx +29 -0
  37. package/src/pages/NSFCategoryViewPage.tsx +28 -0
  38. package/src/pages/NSFEntities.ts +65 -0
  39. package/dist/layouts/NSARoutes.d.ts +0 -11
  40. package/dist/layouts/NSARoutes.js +0 -13
  41. package/dist/layouts/NSARoutes.js.map +0 -1
  42. package/dist/layouts/NSARoutes_Field.js.map +0 -1
  43. package/src/layouts/NSARoutes.tsx +0 -29
@@ -0,0 +1,60 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { ProductUUID } from "namirasoft-api-product";
11
+ import { EnvService, FilterItem, FilterItemOperator, IStorageLocal } from "namirasoft-core";
12
+ import { NamirasoftFieldMetaDatabase, NamirasoftFieldServer } from "namirasoft-field";
13
+ import { NamirasoftMap } from "namirasoft-site-map";
14
+ import { BaseColumnFormatter, DateTimeFormatter, IDFormatter, StringFormatter, StringFormatterSizeType } from "namirasoft-site-react";
15
+ import { NSFRoutes } from "../NSFRoutes";
16
+ export class NSFEntities {
17
+ static category(props, slot, category_scope) {
18
+ let namirasoft = new NamirasoftMap(props.account.token_manager, console.error);
19
+ return {
20
+ product_id: ProductUUID.NAMIRASOFT_FIELD,
21
+ name: "category",
22
+ tables: [{ table: namirasoft.field.tables.category, required: true }],
23
+ client: {
24
+ getColumns() {
25
+ return [
26
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.id, new IDFormatter(namirasoft, null)),
27
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.user_id, new IDFormatter(namirasoft, new IStorageLocal())),
28
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.workspace_id, new IDFormatter(namirasoft, new IStorageLocal())),
29
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.category_scope_id, new IDFormatter(namirasoft, new IStorageLocal())),
30
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.name, new StringFormatter(StringFormatterSizeType.Sentence)),
31
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.description, new StringFormatter(StringFormatterSizeType.Description)),
32
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.created_at, new DateTimeFormatter()),
33
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.updated_at, new DateTimeFormatter()),
34
+ ];
35
+ },
36
+ getListURL: () => NSFRoutes.CategoryList(slot.id, slot.name),
37
+ getNewURL: () => NSFRoutes.CategoryNew(slot.id, slot.name),
38
+ getCopyURL: (id) => NSFRoutes.CategoryCopy(slot.id, slot.name, id),
39
+ getEditURL: (id) => NSFRoutes.CategoryEdit(slot.id, slot.name, id),
40
+ getViewURL: (id) => NSFRoutes.CategoryView(slot.id, slot.name, id),
41
+ },
42
+ server: {
43
+ value_list: props.servers.field.value.List,
44
+ get: props.servers.field.category.Get,
45
+ list: (filters, page, size, sorts, all_workspaces) => __awaiter(this, void 0, void 0, function* () {
46
+ let REACT_APP_BASE_URL_FIELD = new EnvService("REACT_APP_BASE_URL_FIELD", true).getString();
47
+ let field = new NamirasoftFieldServer(REACT_APP_BASE_URL_FIELD, props.account.token_manager, props.notifier.onError);
48
+ let meta = new NamirasoftFieldMetaDatabase(props.account.token_manager);
49
+ let filter_category_scope = new FilterItem(meta.tables.category, meta.tables.category.columns.category_scope_id, false, FilterItemOperator.all.equals, category_scope.id);
50
+ filters = [filter_category_scope, ...(filters !== null && filters !== void 0 ? filters : [])];
51
+ return yield field.category.List(filters, page, size, sorts, all_workspaces);
52
+ }),
53
+ create: props.servers.field.category.Create,
54
+ update: props.servers.field.category.Update,
55
+ delete: props.servers.field.category.Delete
56
+ }
57
+ };
58
+ }
59
+ }
60
+ //# sourceMappingURL=NSFEntities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSFEntities.js","sourceRoot":"","sources":["../../src/pages/NSFEntities.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAA8B,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAmD,2BAA2B,EAAE,qBAAqB,EAAW,MAAM,kBAAkB,CAAC;AAChJ,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGtI,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,MAAM,OAAO,WAAW;IAEvB,MAAM,CAAC,QAAQ,CAAC,KAAiD,EAAE,IAAa,EAAE,cAAgC;QAEjH,IAAI,UAAU,GAAG,IAAI,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAE/E,OAAO;YACN,UAAU,EAAE,WAAW,CAAC,gBAAgB;YACxC,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACrE,MAAM,EAAE;gBACP,UAAU;oBAET,OAAO;wBACN,mBAAmB,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,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AM,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EAAE,KAAK,EAAE,kBAAkB,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;oBAC1K,OAAO,GAAG,CAAC,qBAAqB,EAAE,GAAG,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC,CAAC,CAAC;oBACtD,OAAO,MAAM,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;gBAC9E,CAAC,CAAA;gBACD,MAAM,EAAE,KAAK,CAAC,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.10",
11
+ "version": "1.5.12",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -0,0 +1,31 @@
1
+ import { NamingConvention } from 'namirasoft-core';
2
+
3
+ export class NSFRoutes
4
+ {
5
+ // Category
6
+ static CategoryList(slot_id: string, slot_name: string)
7
+ {
8
+ const name = NamingConvention.auto.convert(slot_name, NamingConvention.lower_case_underscore);
9
+ return `/slot/${slot_id}/${name}/category/list`;
10
+ };
11
+ static CategoryNew(slot_id: string, slot_name: string)
12
+ {
13
+ const name = NamingConvention.auto.convert(slot_name, NamingConvention.lower_case_underscore);
14
+ return `/slot/${slot_id}/${name}/category/new`;
15
+ };
16
+ static CategoryCopy(slot_id: string, slot_name: string, id: string)
17
+ {
18
+ const name = NamingConvention.auto.convert(slot_name, NamingConvention.lower_case_underscore);
19
+ return `/slot/${slot_id}/${name}/category/${id}/copy`;
20
+ };
21
+ static CategoryEdit(slot_id: string, slot_name: string, id: string)
22
+ {
23
+ const name = NamingConvention.auto.convert(slot_name, NamingConvention.lower_case_underscore);
24
+ return `/slot/${slot_id}/${name}/category/${id}/edit`;
25
+ };
26
+ static CategoryView(slot_id: string, slot_name: string, id: string)
27
+ {
28
+ const name = NamingConvention.auto.convert(slot_name, NamingConvention.lower_case_underscore);
29
+ return `/slot/${slot_id}/${name}/category/${id}/view`;
30
+ };
31
+ }
@@ -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 { NSARoutes_Field } from './NSARoutes_Field';
24
+ import { NSARouter_Field } from './NSARouter_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) => NSARoutes_Field.postprocess(filters, this.state.ctf_rows),
673
+ filters_postprocessor: (filters) => NSARouter_Field.postprocess(filters, this.state.ctf_rows),
674
674
  }}
675
675
  action={{
676
676
  title: action_title,
@@ -0,0 +1,53 @@
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
+ }
@@ -1,41 +1,42 @@
1
1
  import { FilterLinkFullRow } from 'namirasoft-api-link';
2
2
  import { NamingConvention } from 'namirasoft-core';
3
- import { CategoryScopeRow, EntityResolveResponseRow, SlotEntityType } from 'namirasoft-field';
3
+ import { EntityResolveResponseRow, SlotEntityType, SlotRow } from 'namirasoft-field';
4
+ import { NSFRoutes } from '../NSFRoutes';
4
5
 
5
- export class NSARoutes_Field
6
+ export class NSARouter_Field
6
7
  {
7
8
  static postprocess(
8
9
  filters: FilterLinkFullRow[],
9
10
  rows: EntityResolveResponseRow | null,
10
11
  ): FilterLinkFullRow[]
11
12
  {
12
- if (!rows || rows.category_scopes.length === 0)
13
+ if (!rows || rows.slots.length === 0)
13
14
  return filters;
14
15
 
15
16
  const result: FilterLinkFullRow[] = [...filters];
16
17
  const id_counter = { value: -1_000_000 };
17
18
  const matched = new Set<string>();
18
19
 
19
- NSARoutes_Field.walk(filters, null, rows, result, id_counter, matched);
20
+ NSARouter_Field.walk(filters, null, rows, result, id_counter, matched);
20
21
 
21
22
  const fallback_filter_id = filters[0]?.filter_id ?? 0;
22
23
  const fallback_filter_ref = filters[0]?.filter ?? null;
23
- for (const scope of rows.category_scopes)
24
+ for (const slot of rows.slots)
24
25
  {
25
- if (matched.has(scope.id))
26
+ if (matched.has(slot.id))
26
27
  continue;
27
28
 
28
- const parent = NSARoutes_Field.make(id_counter, null, fallback_filter_id, fallback_filter_ref, scope.name, scope.description ?? "", "");
29
+ const parent = NSARouter_Field.make(id_counter, null, fallback_filter_id, fallback_filter_ref, slot.name, slot.description ?? "", "");
29
30
  result.push(parent);
30
31
 
31
- result.push(NSARoutes_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "Create", "", `./cateogry/${scope.name}/new`));
32
- result.push(NSARoutes_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "List", "", `./cateogry/${scope.name}/list`));
32
+ result.push(NSARouter_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "Create", "", NSFRoutes.CategoryNew(slot.id, slot.name)));
33
+ result.push(NSARouter_Field.make(id_counter, parent.id, fallback_filter_id, fallback_filter_ref, "List", "", NSFRoutes.CategoryList(slot.id, slot.name)));
33
34
  }
34
35
 
35
36
  return result;
36
37
  }
37
38
 
38
- private static findScope(filter_name: string | null | undefined, rows: EntityResolveResponseRow): CategoryScopeRow | null
39
+ private static findEntityRow(filter_name: string | null | undefined, rows: EntityResolveResponseRow): SlotRow | null
39
40
  {
40
41
  const n = NamingConvention.auto.convert((filter_name ?? "").trim(), NamingConvention.lower_case);
41
42
  if (n.length === 0)
@@ -44,11 +45,8 @@ export class NSARoutes_Field
44
45
  {
45
46
  if (slot.entity_type != SlotEntityType.CategoryScope)
46
47
  continue;
47
- const scope = rows.category_scopes.find(c => c.id == slot.entity_id);
48
- if (!scope)
49
- continue;
50
- if (NamingConvention.auto.convert((scope.name ?? "").trim(), NamingConvention.lower_case) === n)
51
- return scope;
48
+ if (NamingConvention.auto.convert((slot.entity ?? "").trim(), NamingConvention.lower_case) === n)
49
+ return slot;
52
50
  }
53
51
  return null;
54
52
  }
@@ -71,7 +69,7 @@ export class NSARoutes_Field
71
69
  filter_id,
72
70
  link_id: null,
73
71
  name: label,
74
- logo: null,
72
+ logo: "https://static.namirasoft.com/image/namirasoft/field/logo/base.png",
75
73
  order: 0,
76
74
  created_at: now,
77
75
  updated_at: now,
@@ -108,16 +106,21 @@ export class NSARoutes_Field
108
106
  for (const filter of children)
109
107
  {
110
108
  const filter_name = filter.name ?? filter.link?.name ?? "";
111
- const scope = NSARoutes_Field.findScope(filter_name, rows);
112
- if (scope)
109
+ const slot = NSARouter_Field.findEntityRow(filter_name, rows);
110
+ if (slot)
113
111
  {
114
- matched.add(scope.id);
115
- const parent = NSARoutes_Field.make(id_counter, filter.id, filter.filter_id, filter.filter, scope.name, scope.description ?? "", "");
116
- result.push(parent);
117
- result.push(NSARoutes_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "Create", "", `./cateogry/${scope.name}/new`));
118
- result.push(NSARoutes_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "List", "", `./cateogry/${scope.name}/list`));
112
+ matched.add(slot.id);
113
+ const parent = NSARouter_Field.make(id_counter, filter.parent_id, filter.filter_id, filter.filter, slot.name, slot.description ?? "", "");
114
+ parent.order = (filter.order ?? 0) - 1;
115
+ const idx = result.indexOf(filter);
116
+ if (idx >= 0)
117
+ result.splice(idx, 0, parent);
118
+ else
119
+ result.push(parent);
120
+ result.push(NSARouter_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "Create", "", NSFRoutes.CategoryNew(slot.id, slot.name)));
121
+ result.push(NSARouter_Field.make(id_counter, parent.id, filter.filter_id, filter.filter, "List", "", NSFRoutes.CategoryList(slot.id, slot.name)));
119
122
  }
120
- NSARoutes_Field.walk(filters, filter.id, rows, result, id_counter, matched);
123
+ NSARouter_Field.walk(filters, filter.id, rows, result, id_counter, matched);
121
124
  }
122
125
  }
123
126
  }
@@ -123,7 +123,7 @@ export class NSASectionList<RowType extends { id: string }, RowTypeInput = RowTy
123
123
  {
124
124
  show_view ?
125
125
  <NSSplitter
126
- storage_key={`nsa_splitter_${this.props.entity.product_id}_${this.props.entity.name}`}
126
+ storage_key={`ns-splitter-product:${this.props.entity.product_id}-entity:${this.props.entity.name}-height`}
127
127
  master_content={mode_current.getChild(this.props.entity)}
128
128
  detail_content={(
129
129
  this.state.selected_row_ids.length === 1 &&
package/src/main.ts CHANGED
@@ -1,8 +1,15 @@
1
1
  export * from "./components/NSAAccessListDialog";
2
+ export * from "./components/NSABoxSecret";
2
3
  export * from "./components/NSAMasterMenu";
3
4
  export * from "./components/NSAMasterMenuItem";
4
5
  export * from "./components/NSAMessageListDialog";
5
6
  export * from "./components/NSAProductListDialog";
7
+ export * from "./components/NSAReorderDialog";
8
+ export * from "./components/NSASortDialog";
9
+ export * from "./components/NSATable";
10
+ export * from "./components/NSAUserDialog";
11
+ export * from "./components/NSAWorkspaceListDialog";
12
+ export * from "./components/NSLabelSecret";
6
13
  export * from "./components/quickfilter/NSAFilterBoxBase";
7
14
  export * from "./components/quickfilter/NSAFilterBoxBoolean";
8
15
  export * from "./components/quickfilter/NSAFilterBoxDate";
@@ -13,35 +20,35 @@ export * from "./components/quickfilter/NSAFilterBoxString";
13
20
  export * from "./components/quickfilter/NSAFilterBoxTime";
14
21
  export * from "./components/quickfilter/NSAQuickFilterBar";
15
22
  export * from "./components/quickfilter/NSAQuickFilterDialog";
16
- export * from "./components/NSAReorderDialog";
17
- export * from "./components/NSASortDialog";
18
- export * from "./components/NSATable";
19
- export * from "./components/NSAUserDialog";
20
- export * from "./components/NSAWorkspaceListDialog";
21
- export * from "./components/NSABoxSecret";
22
- export * from "./components/NSLabelSecret";
23
+ export * from "./CTFRow";
23
24
  export * from "./formatters/SecretFormatter";
25
+ export * from "./IEntityInfo";
24
26
  export * from "./layouts/Actions";
25
27
  export * from "./layouts/CFTUtil";
26
28
  export * from "./layouts/NSALayout";
29
+ export * from "./layouts/NSARouter";
30
+ export * from "./layouts/NSARouter_Field";
27
31
  export * from "./layouts/NSASectionEdit";
28
32
  export * from "./layouts/NSASectionEditTabPage";
29
33
  export * from "./layouts/NSASectionList";
30
34
  export * from "./layouts/NSASectionView";
31
35
  export * from "./layouts/NSASectionViewTabMore";
32
36
  export * from "./layouts/NSASectionViewTabPage";
37
+ export * from "./NSACacheService";
38
+ export * from "./NSAFilterOperators";
39
+ export * from "./NSARouterMaker";
40
+ export * from "./NSARouterMakerConfig";
41
+ export * from "./NSARouterMakerProps";
42
+ export * from "./NSFRoutes";
33
43
  export * from "./pages/NSAConsentPage";
34
44
  export * from "./pages/NSAEmailVerificationPage";
35
45
  export * from "./pages/NSAHomePage";
36
46
  export * from "./pages/NSALoginPage";
37
47
  export * from "./pages/NSAPhoneVerificationPage";
38
48
  export * from "./pages/NSAVerificationPage";
49
+ export * from "./pages/NSFCategoryEditPage";
50
+ export * from "./pages/NSFCategoryListPage";
51
+ export * from "./pages/NSFCategoryViewPage";
52
+ export * from "./pages/NSFEntities";
39
53
  export * from "./pages/PaymentRequired";
40
- export * from "./CTFRow";
41
- export * from "./IEntityInfo";
42
- export * from "./NSACacheService";
43
- export * from "./NSAFilterOperators";
44
- export * from "./NSARouterMaker";
45
- export * from "./NSARouterMakerConfig";
46
- export * from "./NSARouterMakerProps";
47
54
  export * from "./UseParams";
@@ -0,0 +1,91 @@
1
+ import { CategoryInputRow, CategoryRow, CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSBox, NSBoxString, NSBoxTextArea, NSColumn, NSRow } from "namirasoft-site-react";
3
+ import { Component, createRef } from "react";
4
+ import { NSALayout } from "../layouts/NSALayout";
5
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
6
+ import { NSFEntities, NSFFieldServersProps } from "./NSFEntities";
7
+
8
+ export interface NSFCategoryEditPageProps extends NSARouterMakerProps, NSFFieldServersProps
9
+ {
10
+ slot: SlotRow;
11
+ category_scope: CategoryScopeRow;
12
+ isEdit: boolean;
13
+ }
14
+
15
+ interface NSFCategoryEditPageState { }
16
+
17
+ export class NSFCategoryEditPage extends Component<NSFCategoryEditPageProps, NSFCategoryEditPageState>
18
+ {
19
+ NSBoxString_Name = createRef<NSBoxString>();
20
+ NSBoxTexArea_Description = createRef<NSBoxTextArea>();
21
+
22
+ constructor(props: NSFCategoryEditPageProps)
23
+ {
24
+ super(props);
25
+ this.state = {};
26
+ }
27
+
28
+ override render()
29
+ {
30
+ return (
31
+ <NSALayout<CategoryRow, CategoryInputRow>
32
+ {...this.props}
33
+ action={{
34
+ description: this.props.isEdit ? "This section allows you to update the details of an existing category." : "This section allows you to add a new category by entering its details."
35
+ }}
36
+ pages={{
37
+ entity: NSFEntities.category(this.props, this.props.slot, this.props.category_scope),
38
+ edit: {
39
+ ...this.props,
40
+ ui: {
41
+ tab_page_edit: {
42
+ editor: {
43
+ getInputRow: () =>
44
+ {
45
+ let category_scope_id = this.props.category_scope.id;
46
+ let name = this.NSBoxString_Name.current?.getValue() ?? "";
47
+ let description = this.NSBoxTexArea_Description.current?.getValue() ?? "";
48
+
49
+ return {
50
+ workspace_id: "",
51
+ category_scope_id,
52
+ name,
53
+ description,
54
+ category_category: [],
55
+ category_field: [],
56
+ category_tag: [],
57
+ };
58
+ },
59
+ setRow: (row) =>
60
+ {
61
+ this.NSBoxString_Name.current?.setValue(row.name);
62
+ this.NSBoxTexArea_Description.current?.setValue(row.description ?? "");
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }}
69
+ >
70
+ <NSColumn>
71
+ <NSRow>
72
+ <NSBoxString
73
+ ref={this.NSBoxString_Name}
74
+ title="Name"
75
+ required
76
+ style={{ width: NSBox.width.double }}
77
+ info={{ link: "https://namirasoft.com/field/console-guide/category/#field-name" }}
78
+ />
79
+ </NSRow>
80
+ <NSBoxTextArea
81
+ ref={this.NSBoxTexArea_Description}
82
+ title="Description"
83
+ required={false}
84
+ style={{ width: NSBox.width.double }}
85
+ info={{ link: "https://namirasoft.com/field/console-guide/category/#field-description" }}
86
+ />
87
+ </NSColumn>
88
+ </NSALayout>
89
+ );
90
+ }
91
+ }
@@ -0,0 +1,29 @@
1
+ import { CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSALayout } from "../layouts/NSALayout";
3
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
4
+ import { NSFEntities, NSFFieldServersProps } from "./NSFEntities";
5
+
6
+ export interface NSFCategoryListPageProps extends NSARouterMakerProps, NSFFieldServersProps
7
+ {
8
+ slot: SlotRow;
9
+ category_scope: CategoryScopeRow;
10
+ }
11
+
12
+ export function NSFCategoryListPage(props: NSFCategoryListPageProps)
13
+ {
14
+ return (
15
+ <NSALayout
16
+ {...props}
17
+ action={{
18
+ description: "This section displays all categories you have created with their basic information."
19
+ }}
20
+ pages={{
21
+ entity: NSFEntities.category(props, props.slot, props.category_scope),
22
+ list: {}
23
+ }}
24
+ >
25
+ <>
26
+ </>
27
+ </NSALayout>
28
+ );
29
+ }
@@ -0,0 +1,28 @@
1
+ import { CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSALayout } from "../layouts/NSALayout";
3
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
4
+ import { NSFEntities, NSFFieldServersProps } from "./NSFEntities";
5
+
6
+ export interface NSFCategoryViewPageProps extends NSARouterMakerProps, NSFFieldServersProps
7
+ {
8
+ slot: SlotRow;
9
+ category_scope: CategoryScopeRow;
10
+ }
11
+
12
+ export function NSFCategoryViewPage(props: NSFCategoryViewPageProps)
13
+ {
14
+ return (
15
+ <NSALayout
16
+ {...props}
17
+ action={{
18
+ description: "This section displays detailed information about a selected category."
19
+ }}
20
+ pages={{
21
+ entity: NSFEntities.category(props, props.slot, props.category_scope),
22
+ view: {}
23
+ }}
24
+ >
25
+ <> </>
26
+ </NSALayout>
27
+ );
28
+ }
@@ -0,0 +1,65 @@
1
+ import { NamirasoftAPIProductServer, ProductUUID } from "namirasoft-api-product";
2
+ import { EnvService, FilterItem, FilterItemOperator, IStorageLocal } from "namirasoft-core";
3
+ import { CategoryInputRow, CategoryRow, CategoryScopeRow, NamirasoftFieldMetaDatabase, NamirasoftFieldServer, SlotRow } from "namirasoft-field";
4
+ import { NamirasoftMap } from "namirasoft-site-map";
5
+ import { BaseColumnFormatter, DateTimeFormatter, IDFormatter, StringFormatter, StringFormatterSizeType } from "namirasoft-site-react";
6
+ import { IEntityInfo } from "../IEntityInfo";
7
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
8
+ import { NSFRoutes } from "../NSFRoutes";
9
+
10
+ export interface NSFFieldServersProps
11
+ {
12
+ servers: {
13
+ field: NamirasoftFieldServer;
14
+ product: NamirasoftAPIProductServer;
15
+ }
16
+ }
17
+ export class NSFEntities
18
+ {
19
+ static category(props: NSARouterMakerProps & NSFFieldServersProps, slot: SlotRow, category_scope: CategoryScopeRow): IEntityInfo<CategoryRow, CategoryInputRow>
20
+ {
21
+ let namirasoft = new NamirasoftMap(props.account.token_manager, console.error);
22
+
23
+ return {
24
+ product_id: ProductUUID.NAMIRASOFT_FIELD,
25
+ name: "category",
26
+ tables: [{ table: namirasoft.field.tables.category, required: true }],
27
+ client: {
28
+ getColumns()
29
+ {
30
+ return [
31
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.id, new IDFormatter(namirasoft, null)),
32
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.user_id, new IDFormatter(namirasoft, new IStorageLocal())),
33
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.workspace_id, new IDFormatter(namirasoft, new IStorageLocal())),
34
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.category_scope_id, new IDFormatter(namirasoft, new IStorageLocal())),
35
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.name, new StringFormatter(StringFormatterSizeType.Sentence)),
36
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.description, new StringFormatter(StringFormatterSizeType.Description)),
37
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.created_at, new DateTimeFormatter()),
38
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.updated_at, new DateTimeFormatter()),
39
+ ];
40
+ },
41
+ getListURL: () => NSFRoutes.CategoryList(slot.id, slot.name),
42
+ getNewURL: () => NSFRoutes.CategoryNew(slot.id, slot.name),
43
+ getCopyURL: (id: string) => NSFRoutes.CategoryCopy(slot.id, slot.name, id),
44
+ getEditURL: (id: string) => NSFRoutes.CategoryEdit(slot.id, slot.name, id),
45
+ getViewURL: (id: string) => NSFRoutes.CategoryView(slot.id, slot.name, id),
46
+ },
47
+ server: {
48
+ value_list: props.servers.field.value.List,
49
+ get: props.servers.field.category.Get,
50
+ list: async (filters, page, size, sorts, all_workspaces) =>
51
+ {
52
+ let REACT_APP_BASE_URL_FIELD = new EnvService("REACT_APP_BASE_URL_FIELD", true).getString();
53
+ let field = new NamirasoftFieldServer(REACT_APP_BASE_URL_FIELD, props.account.token_manager, props.notifier.onError);
54
+ let meta = new NamirasoftFieldMetaDatabase(props.account.token_manager);
55
+ let filter_category_scope = new FilterItem(meta.tables.category, meta.tables.category.columns.category_scope_id, false, FilterItemOperator.all.equals, category_scope.id);
56
+ filters = [filter_category_scope, ...(filters ?? [])];
57
+ return await field.category.List(filters, page, size, sorts, all_workspaces);
58
+ },
59
+ create: props.servers.field.category.Create,
60
+ update: props.servers.field.category.Update,
61
+ delete: props.servers.field.category.Delete
62
+ }
63
+ };
64
+ }
65
+ }
@@ -1,11 +0,0 @@
1
- import { Component, ReactNode } from 'react';
2
- export interface NSARoutesProps {
3
- children: ReactNode;
4
- }
5
- interface NSARoutesState {
6
- }
7
- export declare class NSARoutes extends Component<NSARoutesProps, NSARoutesState> {
8
- constructor(props: NSARoutesProps);
9
- render(): import("react/jsx-runtime").JSX.Element;
10
- }
11
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { NSRoutes } from 'namirasoft-site-react';
3
- import { Component } from 'react';
4
- export class NSARoutes extends Component {
5
- constructor(props) {
6
- super(props);
7
- this.state = {};
8
- }
9
- render() {
10
- return (_jsx(NSRoutes, { children: this.props.children }));
11
- }
12
- }
13
- //# sourceMappingURL=NSARoutes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NSARoutes.js","sourceRoot":"","sources":["../../src/layouts/NSARoutes.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAW7C,MAAM,OAAO,SAAU,SAAQ,SAAyC;IAEpE,YAAY,KAAqB;Q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