@etsoo/smarterp-core 1.0.63 → 1.0.64

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.
@@ -1,8 +1,11 @@
1
1
  import { SelectExProps } from "@etsoo/materialui";
2
2
  import { ListType } from "@etsoo/shared";
3
+ import { IdentityTypeFlags } from "@etsoo/appscript";
3
4
  /**
4
5
  * Identity flags list component
5
6
  * @param props Props
6
7
  * @returns Component
7
8
  */
8
- export declare function IdentityFlagsList(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
9
+ export declare function IdentityFlagsList(props: Omit<SelectExProps<ListType>, "options"> & {
10
+ baseIdentity?: IdentityTypeFlags;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -12,10 +12,10 @@ const ICoreServiceApp_1 = require("../../ICoreServiceApp");
12
12
  function IdentityFlagsList(props) {
13
13
  // App
14
14
  const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
15
- // Identities
16
- const identities = app.core.getIdentityFlags();
17
15
  // Destruct
18
- const { label = app.get("identityType"), name = "identityType", ...rest } = props;
16
+ const { baseIdentity, label = app.get("identityType"), name = "identityType", ...rest } = props;
17
+ // Identities
18
+ const identities = app.core.getIdentityFlags(baseIdentity);
19
19
  // Layout
20
20
  return (0, jsx_runtime_1.jsx)(materialui_1.SelectEx, { label: label, name: name, options: identities, ...rest });
21
21
  }
@@ -1,8 +1,11 @@
1
1
  import { SelectExProps } from "@etsoo/materialui";
2
2
  import { ListType } from "@etsoo/shared";
3
+ import { IdentityTypeFlags } from "@etsoo/appscript";
3
4
  /**
4
5
  * Identity flags list component
5
6
  * @param props Props
6
7
  * @returns Component
7
8
  */
8
- export declare function IdentityFlagsList(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
9
+ export declare function IdentityFlagsList(props: Omit<SelectExProps<ListType>, "options"> & {
10
+ baseIdentity?: IdentityTypeFlags;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -9,10 +9,10 @@ import { useRequiredAppContext } from "../../ICoreServiceApp";
9
9
  export function IdentityFlagsList(props) {
10
10
  // App
11
11
  const app = useRequiredAppContext();
12
- // Identities
13
- const identities = app.core.getIdentityFlags();
14
12
  // Destruct
15
- const { label = app.get("identityType"), name = "identityType", ...rest } = props;
13
+ const { baseIdentity, label = app.get("identityType"), name = "identityType", ...rest } = props;
14
+ // Identities
15
+ const identities = app.core.getIdentityFlags(baseIdentity);
16
16
  // Layout
17
17
  return _jsx(SelectEx, { label: label, name: name, options: identities, ...rest });
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.63",
3
+ "version": "1.0.64",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -40,10 +40,10 @@
40
40
  "license": "MIT",
41
41
  "homepage": "https://github.com/ETSOO/etsoo-smarterp-core#readme",
42
42
  "devDependencies": {
43
- "@babel/cli": "^7.27.1",
43
+ "@babel/cli": "^7.27.2",
44
44
  "@babel/core": "^7.27.1",
45
45
  "@babel/plugin-transform-runtime": "^7.27.1",
46
- "@babel/preset-env": "^7.27.1",
46
+ "@babel/preset-env": "^7.27.2",
47
47
  "@babel/runtime-corejs3": "^7.27.1",
48
48
  "@types/react": "^18.3.21",
49
49
  "@types/react-dom": "^18.3.7",
@@ -53,12 +53,12 @@
53
53
  "vitest": "^3.1.3"
54
54
  },
55
55
  "dependencies": {
56
- "@etsoo/appscript": "^1.6.33",
57
- "@etsoo/materialui": "^1.5.45",
58
- "@etsoo/react": "^1.8.43",
59
- "@etsoo/shared": "^1.2.71",
60
- "@etsoo/toolpad": "^1.0.38",
61
- "@mui/material": "^7.0.2",
56
+ "@etsoo/appscript": "^1.6.34",
57
+ "@etsoo/materialui": "^1.5.47",
58
+ "@etsoo/react": "^1.8.44",
59
+ "@etsoo/shared": "^1.2.72",
60
+ "@etsoo/toolpad": "^1.0.39",
61
+ "@mui/material": "^7.1.0",
62
62
  "react": "^18.3.1",
63
63
  "react-dom": "^18.3.1"
64
64
  }
@@ -1,6 +1,7 @@
1
1
  import { SelectEx, SelectExProps } from "@etsoo/materialui";
2
2
  import { useRequiredAppContext } from "../../ICoreServiceApp";
3
3
  import { ListType } from "@etsoo/shared";
4
+ import { IdentityTypeFlags } from "@etsoo/appscript";
4
5
 
5
6
  /**
6
7
  * Identity flags list component
@@ -8,21 +9,24 @@ import { ListType } from "@etsoo/shared";
8
9
  * @returns Component
9
10
  */
10
11
  export function IdentityFlagsList(
11
- props: Omit<SelectExProps<ListType>, "options">
12
+ props: Omit<SelectExProps<ListType>, "options"> & {
13
+ baseIdentity?: IdentityTypeFlags;
14
+ }
12
15
  ) {
13
16
  // App
14
17
  const app = useRequiredAppContext();
15
18
 
16
- // Identities
17
- const identities = app.core.getIdentityFlags();
18
-
19
19
  // Destruct
20
20
  const {
21
+ baseIdentity,
21
22
  label = app.get("identityType"),
22
23
  name = "identityType",
23
24
  ...rest
24
25
  } = props;
25
26
 
27
+ // Identities
28
+ const identities = app.core.getIdentityFlags(baseIdentity);
29
+
26
30
  // Layout
27
31
  return <SelectEx label={label} name={name} options={identities} {...rest} />;
28
32
  }