@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.
- package/lib/cjs/components/app/IdentityFlagsList.d.ts +8 -0
- package/lib/cjs/components/app/IdentityFlagsList.js +21 -0
- package/lib/cjs/components/index.d.ts +1 -0
- package/lib/cjs/components/index.js +1 -0
- package/lib/mjs/components/app/IdentityFlagsList.d.ts +8 -0
- package/lib/mjs/components/app/IdentityFlagsList.js +18 -0
- package/lib/mjs/components/index.d.ts +1 -0
- package/lib/mjs/components/index.js +1 -0
- package/package.json +1 -1
- package/src/components/app/IdentityFlagsList.tsx +28 -0
- package/src/components/index.ts +1 -0
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
package/package.json
CHANGED
|
@@ -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
|
+
}
|
package/src/components/index.ts
CHANGED