@etsoo/smarterp-core 1.0.34 → 1.0.35
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/lib/cjs/components/app/StatusList.d.ts +8 -0
- package/lib/cjs/components/app/StatusList.js +18 -0
- package/lib/cjs/components/index.d.ts +1 -0
- package/lib/cjs/components/index.js +1 -0
- package/lib/mjs/components/app/StatusList.d.ts +8 -0
- package/lib/mjs/components/app/StatusList.js +15 -0
- package/lib/mjs/components/index.d.ts +1 -0
- package/lib/mjs/components/index.js +1 -0
- package/package.json +3 -3
- package/src/components/app/StatusList.tsx +27 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComboBoxProps } from "@etsoo/materialui";
|
|
2
|
+
import { DataTypes } from "@etsoo/shared";
|
|
3
|
+
/**
|
|
4
|
+
* Status list component
|
|
5
|
+
* @param props Props
|
|
6
|
+
* @returns Component
|
|
7
|
+
*/
|
|
8
|
+
export declare function StatusList(props: DataTypes.Optional<Omit<ComboBoxProps, "options">, "name">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusList = StatusList;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const materialui_1 = require("@etsoo/materialui");
|
|
6
|
+
const ICoreServiceApp_1 = require("../../ICoreServiceApp");
|
|
7
|
+
/**
|
|
8
|
+
* Status list component
|
|
9
|
+
* @param props Props
|
|
10
|
+
* @returns Component
|
|
11
|
+
*/
|
|
12
|
+
function StatusList(props) {
|
|
13
|
+
// App
|
|
14
|
+
const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
|
|
15
|
+
// Destruct
|
|
16
|
+
const { name = "status", label = app.get("status"), ...rest } = props;
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(materialui_1.ComboBox, { name: name, label: label, options: app.getStatusList(), ...rest }));
|
|
18
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./DefaultUI";
|
|
|
2
2
|
export * from "./app/AppSwitchPopover";
|
|
3
3
|
export * from "./app/IdentityTypeList";
|
|
4
4
|
export * from "./app/SearchDays";
|
|
5
|
+
export * from "./app/StatusList";
|
|
5
6
|
export * from "./app/UserRoleList";
|
|
6
7
|
export * from "./org/OrgSwitchPopover";
|
|
7
8
|
export * from "./org/OrgTiplist";
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./DefaultUI"), exports);
|
|
|
20
20
|
__exportStar(require("./app/AppSwitchPopover"), exports);
|
|
21
21
|
__exportStar(require("./app/IdentityTypeList"), exports);
|
|
22
22
|
__exportStar(require("./app/SearchDays"), exports);
|
|
23
|
+
__exportStar(require("./app/StatusList"), exports);
|
|
23
24
|
__exportStar(require("./app/UserRoleList"), exports);
|
|
24
25
|
// org
|
|
25
26
|
__exportStar(require("./org/OrgSwitchPopover"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComboBoxProps } from "@etsoo/materialui";
|
|
2
|
+
import { DataTypes } from "@etsoo/shared";
|
|
3
|
+
/**
|
|
4
|
+
* Status list component
|
|
5
|
+
* @param props Props
|
|
6
|
+
* @returns Component
|
|
7
|
+
*/
|
|
8
|
+
export declare function StatusList(props: DataTypes.Optional<Omit<ComboBoxProps, "options">, "name">): 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
|
+
* Status list component
|
|
6
|
+
* @param props Props
|
|
7
|
+
* @returns Component
|
|
8
|
+
*/
|
|
9
|
+
export function StatusList(props) {
|
|
10
|
+
// App
|
|
11
|
+
const app = useRequiredAppContext();
|
|
12
|
+
// Destruct
|
|
13
|
+
const { name = "status", label = app.get("status"), ...rest } = props;
|
|
14
|
+
return (_jsx(ComboBox, { name: name, label: label, options: app.getStatusList(), ...rest }));
|
|
15
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./DefaultUI";
|
|
|
2
2
|
export * from "./app/AppSwitchPopover";
|
|
3
3
|
export * from "./app/IdentityTypeList";
|
|
4
4
|
export * from "./app/SearchDays";
|
|
5
|
+
export * from "./app/StatusList";
|
|
5
6
|
export * from "./app/UserRoleList";
|
|
6
7
|
export * from "./org/OrgSwitchPopover";
|
|
7
8
|
export * from "./org/OrgTiplist";
|
|
@@ -4,6 +4,7 @@ export * from "./DefaultUI";
|
|
|
4
4
|
export * from "./app/AppSwitchPopover";
|
|
5
5
|
export * from "./app/IdentityTypeList";
|
|
6
6
|
export * from "./app/SearchDays";
|
|
7
|
+
export * from "./app/StatusList";
|
|
7
8
|
export * from "./app/UserRoleList";
|
|
8
9
|
// org
|
|
9
10
|
export * from "./org/OrgSwitchPopover";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/smarterp-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "TypeScript APIs for SmartERP Core",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@etsoo/appscript": "^1.6.21",
|
|
57
|
-
"@etsoo/materialui": "^1.5.
|
|
57
|
+
"@etsoo/materialui": "^1.5.9",
|
|
58
58
|
"@etsoo/react": "^1.8.35",
|
|
59
|
-
"@etsoo/shared": "^1.2.
|
|
59
|
+
"@etsoo/shared": "^1.2.66",
|
|
60
60
|
"@etsoo/toolpad": "^1.0.24",
|
|
61
61
|
"@mui/material": "^7.0.1",
|
|
62
62
|
"react": "^18.3.1",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComboBox, ComboBoxProps } from "@etsoo/materialui";
|
|
2
|
+
import { useRequiredAppContext } from "../../ICoreServiceApp";
|
|
3
|
+
import { DataTypes } from "@etsoo/shared";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Status list component
|
|
7
|
+
* @param props Props
|
|
8
|
+
* @returns Component
|
|
9
|
+
*/
|
|
10
|
+
export function StatusList(
|
|
11
|
+
props: DataTypes.Optional<Omit<ComboBoxProps, "options">, "name">
|
|
12
|
+
) {
|
|
13
|
+
// App
|
|
14
|
+
const app = useRequiredAppContext();
|
|
15
|
+
|
|
16
|
+
// Destruct
|
|
17
|
+
const { name = "status", label = app.get("status")!, ...rest } = props;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<ComboBox
|
|
21
|
+
name={name}
|
|
22
|
+
label={label}
|
|
23
|
+
options={app.getStatusList()}
|
|
24
|
+
{...rest}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
}
|
package/src/components/index.ts
CHANGED