@etsoo/smarterp-core 1.0.30 → 1.0.31

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.
@@ -0,0 +1,8 @@
1
+ import { SelectExProps } from "@etsoo/materialui";
2
+ import { ListType } from "@etsoo/shared";
3
+ /**
4
+ * Identity type list component
5
+ * @param props Props
6
+ * @returns Component
7
+ */
8
+ export declare function IdentityTypeList(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IdentityType = IdentityType;
3
+ exports.IdentityTypeList = IdentityTypeList;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const materialui_1 = require("@etsoo/materialui");
6
6
  const ICoreServiceApp_1 = require("../../ICoreServiceApp");
7
7
  /**
8
- * Identity type component
8
+ * Identity type list component
9
9
  * @param props Props
10
10
  * @returns Component
11
11
  */
12
- function IdentityType(props) {
12
+ function IdentityTypeList(props) {
13
13
  // App
14
14
  const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
15
15
  // Identities
@@ -0,0 +1,7 @@
1
+ import { ComboBoxProps } from "@etsoo/materialui";
2
+ /**
3
+ * User role list component
4
+ * @param props Props
5
+ * @returns Component
6
+ */
7
+ export declare function UserRoleList(props: Omit<ComboBoxProps, "options">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserRoleList = UserRoleList;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const materialui_1 = require("@etsoo/materialui");
6
+ const ICoreServiceApp_1 = require("../../ICoreServiceApp");
7
+ /**
8
+ * User role list component
9
+ * @param props Props
10
+ * @returns Component
11
+ */
12
+ function UserRoleList(props) {
13
+ // App
14
+ const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
15
+ // Destruct
16
+ const { name = "userRole", label = app.get("role"), ...rest } = props;
17
+ return ((0, jsx_runtime_1.jsx)(materialui_1.ComboBox, { name: name, label: label, options: app.getRoles(), ...rest }));
18
+ }
@@ -1,7 +1,8 @@
1
1
  export * from "./DefaultUI";
2
2
  export * from "./app/AppSwitchPopover";
3
- export * from "./app/IdentityType";
3
+ export * from "./app/IdentityTypeList";
4
4
  export * from "./app/SearchDays";
5
+ export * from "./app/UserRoleList";
5
6
  export * from "./org/OrgSwitchPopover";
6
7
  export * from "./org/OrgTiplist";
7
8
  export * from "./user/UserTiplist";
@@ -18,8 +18,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  __exportStar(require("./DefaultUI"), exports);
19
19
  // app
20
20
  __exportStar(require("./app/AppSwitchPopover"), exports);
21
- __exportStar(require("./app/IdentityType"), exports);
21
+ __exportStar(require("./app/IdentityTypeList"), exports);
22
22
  __exportStar(require("./app/SearchDays"), exports);
23
+ __exportStar(require("./app/UserRoleList"), exports);
23
24
  // org
24
25
  __exportStar(require("./org/OrgSwitchPopover"), exports);
25
26
  __exportStar(require("./org/OrgTiplist"), exports);
@@ -0,0 +1,8 @@
1
+ import { SelectExProps } from "@etsoo/materialui";
2
+ import { ListType } from "@etsoo/shared";
3
+ /**
4
+ * Identity type list component
5
+ * @param props Props
6
+ * @returns Component
7
+ */
8
+ export declare function IdentityTypeList(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
@@ -2,11 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SelectEx } from "@etsoo/materialui";
3
3
  import { useRequiredAppContext } from "../../ICoreServiceApp";
4
4
  /**
5
- * Identity type component
5
+ * Identity type list component
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export function IdentityType(props) {
9
+ export function IdentityTypeList(props) {
10
10
  // App
11
11
  const app = useRequiredAppContext();
12
12
  // Identities
@@ -0,0 +1,7 @@
1
+ import { ComboBoxProps } from "@etsoo/materialui";
2
+ /**
3
+ * User role list component
4
+ * @param props Props
5
+ * @returns Component
6
+ */
7
+ export declare function UserRoleList(props: Omit<ComboBoxProps, "options">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ComboBox } from "@etsoo/materialui";
3
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
4
+ /**
5
+ * User role list component
6
+ * @param props Props
7
+ * @returns Component
8
+ */
9
+ export function UserRoleList(props) {
10
+ // App
11
+ const app = useRequiredAppContext();
12
+ // Destruct
13
+ const { name = "userRole", label = app.get("role"), ...rest } = props;
14
+ return (_jsx(ComboBox, { name: name, label: label, options: app.getRoles(), ...rest }));
15
+ }
@@ -1,7 +1,8 @@
1
1
  export * from "./DefaultUI";
2
2
  export * from "./app/AppSwitchPopover";
3
- export * from "./app/IdentityType";
3
+ export * from "./app/IdentityTypeList";
4
4
  export * from "./app/SearchDays";
5
+ export * from "./app/UserRoleList";
5
6
  export * from "./org/OrgSwitchPopover";
6
7
  export * from "./org/OrgTiplist";
7
8
  export * from "./user/UserTiplist";
@@ -2,8 +2,9 @@
2
2
  export * from "./DefaultUI";
3
3
  // app
4
4
  export * from "./app/AppSwitchPopover";
5
- export * from "./app/IdentityType";
5
+ export * from "./app/IdentityTypeList";
6
6
  export * from "./app/SearchDays";
7
+ export * from "./app/UserRoleList";
7
8
  // org
8
9
  export * from "./org/OrgSwitchPopover";
9
10
  export * from "./org/OrgTiplist";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -54,11 +54,11 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@etsoo/appscript": "^1.6.20",
57
- "@etsoo/materialui": "^1.5.3",
57
+ "@etsoo/materialui": "^1.5.4",
58
58
  "@etsoo/react": "^1.8.34",
59
59
  "@etsoo/shared": "^1.2.63",
60
- "@etsoo/toolpad": "^1.0.23",
61
- "@mui/material": "^7.0.0",
60
+ "@etsoo/toolpad": "^1.0.24",
61
+ "@mui/material": "^7.0.1",
62
62
  "react": "^18.3.1",
63
63
  "react-dom": "^18.3.1"
64
64
  }
@@ -3,11 +3,13 @@ import { useRequiredAppContext } from "../../ICoreServiceApp";
3
3
  import { ListType } from "@etsoo/shared";
4
4
 
5
5
  /**
6
- * Identity type component
6
+ * Identity type list component
7
7
  * @param props Props
8
8
  * @returns Component
9
9
  */
10
- export function IdentityType(props: Omit<SelectExProps<ListType>, "options">) {
10
+ export function IdentityTypeList(
11
+ props: Omit<SelectExProps<ListType>, "options">
12
+ ) {
11
13
  // App
12
14
  const app = useRequiredAppContext();
13
15
 
@@ -0,0 +1,19 @@
1
+ import { ComboBox, ComboBoxProps } from "@etsoo/materialui";
2
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
3
+
4
+ /**
5
+ * User role list component
6
+ * @param props Props
7
+ * @returns Component
8
+ */
9
+ export function UserRoleList(props: Omit<ComboBoxProps, "options">) {
10
+ // App
11
+ const app = useRequiredAppContext();
12
+
13
+ // Destruct
14
+ const { name = "userRole", label = app.get("role")!, ...rest } = props;
15
+
16
+ return (
17
+ <ComboBox name={name} label={label} options={app.getRoles()} {...rest} />
18
+ );
19
+ }
@@ -3,8 +3,9 @@ export * from "./DefaultUI";
3
3
 
4
4
  // app
5
5
  export * from "./app/AppSwitchPopover";
6
- export * from "./app/IdentityType";
6
+ export * from "./app/IdentityTypeList";
7
7
  export * from "./app/SearchDays";
8
+ export * from "./app/UserRoleList";
8
9
 
9
10
  // org
10
11
  export * from "./org/OrgSwitchPopover";
@@ -1,8 +0,0 @@
1
- import { SelectExProps } from "@etsoo/materialui";
2
- import { ListType } from "@etsoo/shared";
3
- /**
4
- * Identity type component
5
- * @param props Props
6
- * @returns Component
7
- */
8
- export declare function IdentityType(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { SelectExProps } from "@etsoo/materialui";
2
- import { ListType } from "@etsoo/shared";
3
- /**
4
- * Identity type component
5
- * @param props Props
6
- * @returns Component
7
- */
8
- export declare function IdentityType(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;