namirasoft-account-react 1.5.11 → 1.5.13

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 (53) hide show
  1. package/dist/NSARouter.d.ts +16 -0
  2. package/dist/NSARouter.js +42 -0
  3. package/dist/NSARouter.js.map +1 -0
  4. package/dist/NSFRouterProps.d.ts +6 -0
  5. package/dist/NSFRouterProps.js +2 -0
  6. package/dist/NSFRouterProps.js.map +1 -0
  7. package/dist/NSFRoutes.d.ts +7 -0
  8. package/dist/NSFRoutes.js +29 -0
  9. package/dist/NSFRoutes.js.map +1 -0
  10. package/dist/layouts/NSALayout.js +2 -2
  11. package/dist/layouts/{NSARoutes_Field.d.ts → NSALayout_Field.d.ts} +2 -2
  12. package/dist/layouts/{NSARoutes_Field.js → NSALayout_Field.js} +27 -24
  13. package/dist/layouts/NSALayout_Field.js.map +1 -0
  14. package/dist/layouts/NSARouter.d.ts +16 -0
  15. package/dist/layouts/NSARouter.js +38 -0
  16. package/dist/layouts/NSARouter.js.map +1 -0
  17. package/dist/layouts/NSARouter_Field.d.ts +8 -0
  18. package/dist/layouts/NSARouter_Field.js +92 -0
  19. package/dist/layouts/NSARouter_Field.js.map +1 -0
  20. package/dist/layouts/NSASectionList.js +1 -1
  21. package/dist/layouts/NSASectionList.js.map +1 -1
  22. package/dist/main.d.ts +21 -14
  23. package/dist/main.js +21 -14
  24. package/dist/main.js.map +1 -1
  25. package/dist/pages/NSFCategoryEditPage.d.ts +19 -0
  26. package/dist/pages/NSFCategoryEditPage.js +47 -0
  27. package/dist/pages/NSFCategoryEditPage.js.map +1 -0
  28. package/dist/pages/NSFCategoryListPage.d.ts +8 -0
  29. package/dist/pages/NSFCategoryListPage.js +12 -0
  30. package/dist/pages/NSFCategoryListPage.js.map +1 -0
  31. package/dist/pages/NSFCategoryViewPage.d.ts +8 -0
  32. package/dist/pages/NSFCategoryViewPage.js +12 -0
  33. package/dist/pages/NSFCategoryViewPage.js.map +1 -0
  34. package/dist/pages/NSFEntities.d.ts +7 -0
  35. package/dist/pages/NSFEntities.js +60 -0
  36. package/dist/pages/NSFEntities.js.map +1 -0
  37. package/package.json +1 -1
  38. package/src/NSARouter.tsx +69 -0
  39. package/src/NSFRouterProps.ts +8 -0
  40. package/src/NSFRoutes.ts +31 -0
  41. package/src/layouts/NSALayout.tsx +2 -2
  42. package/src/layouts/{NSARoutes_Field.ts → NSALayout_Field.ts} +25 -23
  43. package/src/layouts/NSASectionList.tsx +1 -1
  44. package/src/main.ts +21 -14
  45. package/src/pages/NSFCategoryEditPage.tsx +92 -0
  46. package/src/pages/NSFCategoryListPage.tsx +30 -0
  47. package/src/pages/NSFCategoryViewPage.tsx +29 -0
  48. package/src/pages/NSFEntities.ts +59 -0
  49. package/dist/layouts/NSARoutes.d.ts +0 -11
  50. package/dist/layouts/NSARoutes.js +0 -13
  51. package/dist/layouts/NSARoutes.js.map +0 -1
  52. package/dist/layouts/NSARoutes_Field.js.map +0 -1
  53. package/src/layouts/NSARoutes.tsx +0 -29
@@ -0,0 +1,30 @@
1
+ import { CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSALayout } from "../layouts/NSALayout";
3
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
4
+ import { NSFRouterProps } from "../NSFRouterProps";
5
+ import { NSFEntities } from "./NSFEntities";
6
+
7
+ export interface NSFCategoryListPageProps extends NSARouterMakerProps, NSFRouterProps
8
+ {
9
+ slot: SlotRow;
10
+ category_scope: CategoryScopeRow;
11
+ }
12
+
13
+ export function NSFCategoryListPage(props: NSFCategoryListPageProps)
14
+ {
15
+ return (
16
+ <NSALayout
17
+ {...props}
18
+ action={{
19
+ description: "This section displays all categories you have created with their basic information."
20
+ }}
21
+ pages={{
22
+ entity: NSFEntities.category(props, props.slot, props.category_scope),
23
+ list: {}
24
+ }}
25
+ >
26
+ <>
27
+ </>
28
+ </NSALayout>
29
+ );
30
+ }
@@ -0,0 +1,29 @@
1
+ import { CategoryScopeRow, SlotRow } from "namirasoft-field";
2
+ import { NSALayout } from "../layouts/NSALayout";
3
+ import { NSARouterMakerProps } from "../NSARouterMakerProps";
4
+ import { NSFRouterProps } from "../NSFRouterProps";
5
+ import { NSFEntities } from "./NSFEntities";
6
+
7
+ export interface NSFCategoryViewPageProps extends NSARouterMakerProps, NSFRouterProps
8
+ {
9
+ slot: SlotRow;
10
+ category_scope: CategoryScopeRow;
11
+ }
12
+
13
+ export function NSFCategoryViewPage(props: NSFCategoryViewPageProps)
14
+ {
15
+ return (
16
+ <NSALayout
17
+ {...props}
18
+ action={{
19
+ description: "This section displays detailed information about a selected category."
20
+ }}
21
+ pages={{
22
+ entity: NSFEntities.category(props, props.slot, props.category_scope),
23
+ view: {}
24
+ }}
25
+ >
26
+ <> </>
27
+ </NSALayout>
28
+ );
29
+ }
@@ -0,0 +1,59 @@
1
+ import { 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 { NSFRouterProps } from "../NSFRouterProps";
9
+ import { NSFRoutes } from "../NSFRoutes";
10
+
11
+ export class NSFEntities
12
+ {
13
+ static category(props: NSARouterMakerProps & NSFRouterProps, slot: SlotRow, category_scope: CategoryScopeRow): IEntityInfo<CategoryRow, CategoryInputRow>
14
+ {
15
+ let namirasoft = new NamirasoftMap(props.account.token_manager, console.error);
16
+
17
+ return {
18
+ product_id: ProductUUID.NAMIRASOFT_FIELD,
19
+ name: "category",
20
+ tables: [{ table: namirasoft.field.tables.category, required: true }],
21
+ client: {
22
+ getColumns()
23
+ {
24
+ return [
25
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.id, new IDFormatter(namirasoft, null)),
26
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.user_id, new IDFormatter(namirasoft, new IStorageLocal())),
27
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.workspace_id, new IDFormatter(namirasoft, new IStorageLocal())),
28
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.category_scope_id, new IDFormatter(namirasoft, new IStorageLocal())),
29
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.name, new StringFormatter(StringFormatterSizeType.Sentence)),
30
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.description, new StringFormatter(StringFormatterSizeType.Description)),
31
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.created_at, new DateTimeFormatter()),
32
+ BaseColumnFormatter.getColumn(namirasoft.field.tables.category.columns.updated_at, new DateTimeFormatter()),
33
+ ];
34
+ },
35
+ getListURL: () => NSFRoutes.CategoryList(slot.id, slot.name),
36
+ getNewURL: () => NSFRoutes.CategoryNew(slot.id, slot.name),
37
+ getCopyURL: (id: string) => NSFRoutes.CategoryCopy(slot.id, slot.name, id),
38
+ getEditURL: (id: string) => NSFRoutes.CategoryEdit(slot.id, slot.name, id),
39
+ getViewURL: (id: string) => NSFRoutes.CategoryView(slot.id, slot.name, id),
40
+ },
41
+ server: {
42
+ value_list: props.servers.field.value.List,
43
+ get: props.servers.field.category.Get,
44
+ list: async (filters, page, size, sorts, all_workspaces) =>
45
+ {
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 ?? [])];
51
+ return await 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
+ }
@@ -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;QAE7B,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IACpB,CAAC;IACQ,MAAM;QAEX,OAAO,CACH,KAAC,QAAQ,cACJ,IAAI,CAAC,KAAK,CAAC,QAAQ,GACb,CACd,CAAC;IACN,CAAC;CACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NSARoutes_Field.js","sourceRoot":"","sources":["../../src/layouts/NSARoutes_Field.ts"],"names":[],"mappings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,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACtB,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,EAAE,EAAE,EAAE,CAAC,CAAC;gBACrI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC;gBACxI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC;YAC3I,CAAC;YACD,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAChF,CAAC;IACL,CAAC;CACJ"}
@@ -1,29 +0,0 @@
1
- import { NSRoutes } from 'namirasoft-site-react';
2
- import { Component, ReactNode } from 'react';
3
-
4
- export interface NSARoutesProps
5
- {
6
- children: ReactNode;
7
- }
8
-
9
- interface NSARoutesState
10
- {
11
- }
12
-
13
- export class NSARoutes extends Component<NSARoutesProps, NSARoutesState>
14
- {
15
- constructor(props: NSARoutesProps)
16
- {
17
- super(props);
18
-
19
- this.state = {};
20
- }
21
- override render()
22
- {
23
- return (
24
- <NSRoutes>
25
- {this.props.children}
26
- </NSRoutes>
27
- );
28
- }
29
- }