@amateescu/portal-ui-components 0.0.49 → 0.0.50
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/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.d.ts +1 -1
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.d.ts.map +1 -1
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.js +31 -28
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.stories.d.ts +1 -0
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.stories.d.ts.map +1 -1
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.types.d.ts +1 -0
- package/dist/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PassportSearchableMultiSelectDetailedProps } from './PassportSearchableMultiSelectDetailed.types';
|
|
2
|
-
export declare function PassportSearchableMultiSelectDetailed({ label, data, handleChange, fullWidth, values, disabled, isRtl, width, placeholder, multiple, ...rest }: PassportSearchableMultiSelectDetailedProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function PassportSearchableMultiSelectDetailed({ label, data, handleChange, fullWidth, values, disabled, isRtl, width, placeholder, multiple, showBusinessUnitId, ...rest }: PassportSearchableMultiSelectDetailedProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PassportSearchableMultiSelectDetailed.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PassportSearchableMultiSelectDetailed.d.ts","sourceRoot":"","sources":["../../../src/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,0CAA0C,EAC3C,MAAM,+CAA+C,CAAC;AAKvD,wBAAgB,qCAAqC,CAAC,EACpD,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,SAAiB,EACjB,MAAW,EACX,QAAgB,EAChB,KAAa,EACb,KAAW,EACX,WAAW,EACX,QAAe,EACf,GAAG,IAAI,EACR,EAAE,0CAA0C,2CAmF5C"}
|
|
1
|
+
{"version":3,"file":"PassportSearchableMultiSelectDetailed.d.ts","sourceRoot":"","sources":["../../../src/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,0CAA0C,EAC3C,MAAM,+CAA+C,CAAC;AAKvD,wBAAgB,qCAAqC,CAAC,EACpD,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,SAAiB,EACjB,MAAW,EACX,QAAgB,EAChB,KAAa,EACb,KAAW,EACX,WAAW,EACX,QAAe,EACf,kBAAyB,EACzB,GAAG,IAAI,EACR,EAAE,0CAA0C,2CAmF5C"}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { Autocomplete as
|
|
3
|
-
import { C as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
label:
|
|
1
|
+
import { jsx as n, jsxs as l, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { Autocomplete as S, TextField as O, Checkbox as z, Box as A, Typography as x } from "@mui/material";
|
|
3
|
+
import { C as B, a as C } from "../../CheckBox-D9YmAV-l.js";
|
|
4
|
+
const I = /* @__PURE__ */ n(C, { fontSize: "small" }), R = /* @__PURE__ */ n(B, { fontSize: "small" });
|
|
5
|
+
function j({
|
|
6
|
+
label: u,
|
|
7
7
|
data: i,
|
|
8
8
|
handleChange: a,
|
|
9
|
-
fullWidth:
|
|
9
|
+
fullWidth: c = !1,
|
|
10
10
|
values: d = [],
|
|
11
|
-
disabled:
|
|
11
|
+
disabled: f = !1,
|
|
12
12
|
isRtl: p = !1,
|
|
13
13
|
width: h = 300,
|
|
14
14
|
placeholder: b,
|
|
15
15
|
multiple: o = !0,
|
|
16
|
-
|
|
16
|
+
showBusinessUnitId: y = !0,
|
|
17
|
+
...m
|
|
17
18
|
}) {
|
|
18
|
-
const
|
|
19
|
+
const g = o ? i?.filter((r) => d.includes(r.value)) ?? [] : i?.find((r) => d.includes(r.value)) ?? null;
|
|
19
20
|
return /* @__PURE__ */ n(
|
|
20
|
-
|
|
21
|
+
S,
|
|
21
22
|
{
|
|
22
|
-
...
|
|
23
|
+
...m,
|
|
23
24
|
multiple: o,
|
|
24
|
-
fullWidth:
|
|
25
|
+
fullWidth: c,
|
|
25
26
|
size: "small",
|
|
26
27
|
disablePortal: !0,
|
|
27
|
-
disabled:
|
|
28
|
+
disabled: f,
|
|
28
29
|
options: i ?? [],
|
|
29
|
-
value:
|
|
30
|
+
value: g,
|
|
30
31
|
disableCloseOnSelect: o,
|
|
31
32
|
getOptionLabel: (r) => r.label,
|
|
32
33
|
isOptionEqualToValue: (r, e) => r.value === e.value,
|
|
33
34
|
sx: {
|
|
34
|
-
width:
|
|
35
|
+
width: c ? "100%" : h,
|
|
35
36
|
"& fieldset": {
|
|
36
37
|
borderRadius: "8px",
|
|
37
38
|
border: "1px solid var(--color-gray)"
|
|
@@ -44,23 +45,23 @@ function P({
|
|
|
44
45
|
},
|
|
45
46
|
onChange: (r, e) => {
|
|
46
47
|
if (o && Array.isArray(e)) {
|
|
47
|
-
const s = e.map((
|
|
48
|
+
const s = e.map((t) => t.value);
|
|
48
49
|
a(s);
|
|
49
50
|
} else !o && e && !Array.isArray(e) ? a([e.value]) : a([]);
|
|
50
51
|
},
|
|
51
52
|
renderOption: (r, e, { selected: s }) => {
|
|
52
|
-
const { key:
|
|
53
|
+
const { key: t, ...v } = r;
|
|
53
54
|
return /* @__PURE__ */ l("li", { ...v, children: [
|
|
54
55
|
o && /* @__PURE__ */ n(
|
|
55
|
-
|
|
56
|
+
z,
|
|
56
57
|
{
|
|
57
|
-
icon:
|
|
58
|
-
checkedIcon:
|
|
58
|
+
icon: I,
|
|
59
|
+
checkedIcon: R,
|
|
59
60
|
style: { marginRight: 8 },
|
|
60
61
|
checked: s
|
|
61
62
|
}
|
|
62
63
|
),
|
|
63
|
-
/* @__PURE__ */ l(
|
|
64
|
+
/* @__PURE__ */ l(A, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
64
65
|
/* @__PURE__ */ n(
|
|
65
66
|
x,
|
|
66
67
|
{
|
|
@@ -75,8 +76,10 @@ function P({
|
|
|
75
76
|
component: "span",
|
|
76
77
|
sx: { display: "flex", flexDirection: "column", fontSize: "0.75rem", color: "text.secondary" },
|
|
77
78
|
children: [
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
y && /* @__PURE__ */ l(k, { children: [
|
|
80
|
+
"Business Unit Id: ",
|
|
81
|
+
e.id
|
|
82
|
+
] }),
|
|
80
83
|
e.externalId !== void 0 && e.externalId !== "" && /* @__PURE__ */ l("span", { children: [
|
|
81
84
|
"External Code: ",
|
|
82
85
|
e.externalId
|
|
@@ -85,13 +88,13 @@ function P({
|
|
|
85
88
|
}
|
|
86
89
|
)
|
|
87
90
|
] })
|
|
88
|
-
] },
|
|
91
|
+
] }, t);
|
|
89
92
|
},
|
|
90
93
|
renderInput: (r) => /* @__PURE__ */ n(
|
|
91
|
-
|
|
94
|
+
O,
|
|
92
95
|
{
|
|
93
96
|
...r,
|
|
94
|
-
label:
|
|
97
|
+
label: u,
|
|
95
98
|
placeholder: b
|
|
96
99
|
}
|
|
97
100
|
)
|
|
@@ -99,5 +102,5 @@ function P({
|
|
|
99
102
|
);
|
|
100
103
|
}
|
|
101
104
|
export {
|
|
102
|
-
|
|
105
|
+
j as PassportSearchableMultiSelectDetailed
|
|
103
106
|
};
|
|
@@ -28,5 +28,6 @@ export declare const FullWidth: Story;
|
|
|
28
28
|
export declare const Disabled: Story;
|
|
29
29
|
export declare const WithoutExternalIds: Story;
|
|
30
30
|
export declare const MixedExternalIds: Story;
|
|
31
|
+
export declare const HiddenBusinessUnitId: Story;
|
|
31
32
|
export declare const SingleSelect: Story;
|
|
32
33
|
//# sourceMappingURL=PassportSearchableMultiSelectDetailed.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PassportSearchableMultiSelectDetailed.stories.d.ts","sourceRoot":"","sources":["../../../src/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkDvD,QAAA,MAAM,IAAI;;wDA5BP;QACD,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB;;;;;;;;;;;CAoCoE,CAAC;AAEtE,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,GAAG,EAAE,KAIjB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAmB7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA0BhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoB9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"PassportSearchableMultiSelectDetailed.stories.d.ts","sourceRoot":"","sources":["../../../src/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkDvD,QAAA,MAAM,IAAI;;wDA5BP;QACD,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB;;;;;;;;;;;CAoCoE,CAAC;AAEtE,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,GAAG,EAAE,KAIjB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAmB7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA0BhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAoBlC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PassportSearchableMultiSelectDetailed.types.d.ts","sourceRoot":"","sources":["../../../src/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,2CAA2C;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,0CACf,SAAQ,IAAI,CACV,iBAAiB,CACf,2CAA2C,EAC3C,OAAO,EACP,KAAK,EACL,KAAK,CACN,EACD,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,CACxE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,2CAA2C,EAAE,CAAC;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PassportSearchableMultiSelectDetailed.types.d.ts","sourceRoot":"","sources":["../../../src/components/PassportSearchableMultiSelectDetailed/PassportSearchableMultiSelectDetailed.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,2CAA2C;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,0CACf,SAAQ,IAAI,CACV,iBAAiB,CACf,2CAA2C,EAC3C,OAAO,EACP,KAAK,EACL,KAAK,CACN,EACD,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,CACxE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,2CAA2C,EAAE,CAAC;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|