@etsoo/smarterp-core 1.0.46 → 1.0.47

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 flags list component
5
+ * @param props Props
6
+ * @returns Component
7
+ */
8
+ export declare function IdentityFlagsList(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentityFlagsList = IdentityFlagsList;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const materialui_1 = require("@etsoo/materialui");
6
+ const ICoreServiceApp_1 = require("../../ICoreServiceApp");
7
+ /**
8
+ * Identity flags list component
9
+ * @param props Props
10
+ * @returns Component
11
+ */
12
+ function IdentityFlagsList(props) {
13
+ // App
14
+ const app = (0, ICoreServiceApp_1.useRequiredAppContext)();
15
+ // Identities
16
+ const identities = app.core.getIdentityFlags();
17
+ // Destruct
18
+ const { label = app.get("identityType"), name = "identityType", ...rest } = props;
19
+ // Layout
20
+ return (0, jsx_runtime_1.jsx)(materialui_1.SelectEx, { label: label, name: name, options: identities, ...rest });
21
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./DefaultUI";
2
2
  export * from "./app/AppSwitchPopover";
3
+ export * from "./app/IdentityFlagsList";
3
4
  export * from "./app/IdentityTypeList";
4
5
  export * from "./app/SearchDays";
5
6
  export * from "./app/StatusList";
@@ -18,6 +18,7 @@ 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/IdentityFlagsList"), exports);
21
22
  __exportStar(require("./app/IdentityTypeList"), exports);
22
23
  __exportStar(require("./app/SearchDays"), exports);
23
24
  __exportStar(require("./app/StatusList"), exports);
@@ -0,0 +1,8 @@
1
+ import { SelectExProps } from "@etsoo/materialui";
2
+ import { ListType } from "@etsoo/shared";
3
+ /**
4
+ * Identity flags list component
5
+ * @param props Props
6
+ * @returns Component
7
+ */
8
+ export declare function IdentityFlagsList(props: Omit<SelectExProps<ListType>, "options">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { SelectEx } from "@etsoo/materialui";
3
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
4
+ /**
5
+ * Identity flags list component
6
+ * @param props Props
7
+ * @returns Component
8
+ */
9
+ export function IdentityFlagsList(props) {
10
+ // App
11
+ const app = useRequiredAppContext();
12
+ // Identities
13
+ const identities = app.core.getIdentityFlags();
14
+ // Destruct
15
+ const { label = app.get("identityType"), name = "identityType", ...rest } = props;
16
+ // Layout
17
+ return _jsx(SelectEx, { label: label, name: name, options: identities, ...rest });
18
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./DefaultUI";
2
2
  export * from "./app/AppSwitchPopover";
3
+ export * from "./app/IdentityFlagsList";
3
4
  export * from "./app/IdentityTypeList";
4
5
  export * from "./app/SearchDays";
5
6
  export * from "./app/StatusList";
@@ -2,6 +2,7 @@
2
2
  export * from "./DefaultUI";
3
3
  // app
4
4
  export * from "./app/AppSwitchPopover";
5
+ export * from "./app/IdentityFlagsList";
5
6
  export * from "./app/IdentityTypeList";
6
7
  export * from "./app/SearchDays";
7
8
  export * from "./app/StatusList";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -0,0 +1,28 @@
1
+ import { SelectEx, SelectExProps } from "@etsoo/materialui";
2
+ import { useRequiredAppContext } from "../../ICoreServiceApp";
3
+ import { ListType } from "@etsoo/shared";
4
+
5
+ /**
6
+ * Identity flags list component
7
+ * @param props Props
8
+ * @returns Component
9
+ */
10
+ export function IdentityFlagsList(
11
+ props: Omit<SelectExProps<ListType>, "options">
12
+ ) {
13
+ // App
14
+ const app = useRequiredAppContext();
15
+
16
+ // Identities
17
+ const identities = app.core.getIdentityFlags();
18
+
19
+ // Destruct
20
+ const {
21
+ label = app.get("identityType"),
22
+ name = "identityType",
23
+ ...rest
24
+ } = props;
25
+
26
+ // Layout
27
+ return <SelectEx label={label} name={name} options={identities} {...rest} />;
28
+ }
@@ -3,6 +3,7 @@ export * from "./DefaultUI";
3
3
 
4
4
  // app
5
5
  export * from "./app/AppSwitchPopover";
6
+ export * from "./app/IdentityFlagsList";
6
7
  export * from "./app/IdentityTypeList";
7
8
  export * from "./app/SearchDays";
8
9
  export * from "./app/StatusList";