@snmt-react-ui/user-select 2.0.0 → 2.1.0
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/UserSelect.d.ts +7 -5
- package/dist/user-select.js +12 -5
- package/package.json +5 -5
package/dist/UserSelect.d.ts
CHANGED
|
@@ -34,13 +34,15 @@ export type UserSelectProps = (Omit<SingleSelectProps, 'options'> | Omit<MultiSe
|
|
|
34
34
|
}) => void;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* This is UserSelect. It is a customizable and asynchronous select component designed
|
|
38
|
-
* from a backend API. The component supports both single
|
|
39
|
-
*
|
|
37
|
+
* This is UserSelect. It is a customizable and asynchronous select component designed
|
|
38
|
+
* to fetch and display user data from a backend API. The component supports both single
|
|
39
|
+
* and multiple selection modes, allowing users to search, select, and manage user entries
|
|
40
|
+
* efficiently. It integrates with the People API to fetch user data based on
|
|
40
41
|
* customizable filters, sorting, and search parameters.
|
|
41
42
|
*
|
|
42
|
-
* A key feature of this component is that it fetches each selected option separately
|
|
43
|
-
* are always displayed with the correct label, even if
|
|
43
|
+
* A key feature of this component is that it fetches each selected option separately
|
|
44
|
+
* to ensure that selected items are always displayed with the correct label, even if
|
|
45
|
+
* they are not present in the initially fetched options.
|
|
44
46
|
*/
|
|
45
47
|
declare const UserSelect: import('react').ForwardRefExoticComponent<UserSelectProps & import('react').RefAttributes<any>>;
|
|
46
48
|
export { UserSelect };
|
package/dist/user-select.js
CHANGED
|
@@ -6805,7 +6805,8 @@ const F1 = ({ children: i, width: e, size: t = "small", onClose: s, closable: n
|
|
|
6805
6805
|
const _ = w.filter((G) => G !== m);
|
|
6806
6806
|
S(_), V(_);
|
|
6807
6807
|
}, r1 = (m) => (w == null ? void 0 : w.indexOf(m)) === 0 ? (
|
|
6808
|
-
// if the search input is empty
|
|
6808
|
+
// if the search input is empty
|
|
6809
|
+
// then display the placeholder, else do not display it
|
|
6809
6810
|
/* @__PURE__ */ r("span", { className: "custom-placeholder", children: N ? t : "" })
|
|
6810
6811
|
) : /* @__PURE__ */ r(q, {}), A = (m) => {
|
|
6811
6812
|
m.preventDefault(), m.stopPropagation();
|
|
@@ -6819,7 +6820,8 @@ const F1 = ({ children: i, width: e, size: t = "small", onClose: s, closable: n
|
|
|
6819
6820
|
return /* @__PURE__ */ u(
|
|
6820
6821
|
"div",
|
|
6821
6822
|
{
|
|
6822
|
-
className: `snmt-select ${H ? "snmt-select-focused" : ""}
|
|
6823
|
+
className: `snmt-select ${H ? "snmt-select-focused" : ""}
|
|
6824
|
+
${s ? "" : "snmt-select-single"}`,
|
|
6823
6825
|
ref: B,
|
|
6824
6826
|
style: { width: c },
|
|
6825
6827
|
children: [
|
|
@@ -6917,7 +6919,10 @@ const F1 = ({ children: i, width: e, size: t = "small", onClose: s, closable: n
|
|
|
6917
6919
|
/* @__PURE__ */ r(
|
|
6918
6920
|
"fieldset",
|
|
6919
6921
|
{
|
|
6920
|
-
className: `${H ? "fieldset-focused" : ""}
|
|
6922
|
+
className: `${H ? "fieldset-focused" : ""}
|
|
6923
|
+
${o ? "fieldset-disabled" : ""}
|
|
6924
|
+
${typeof i == "string" && i ? "fieldset-filled" : ""}
|
|
6925
|
+
${typeof i == "object" && i != null && i.length ? "fieldset-filled" : ""}`,
|
|
6921
6926
|
children: /* @__PURE__ */ r("legend", { children: t ? /* @__PURE__ */ r("span", { children: d ? `${t}*` : t }) : "" })
|
|
6922
6927
|
}
|
|
6923
6928
|
)
|
|
@@ -7011,7 +7016,8 @@ const w1 = {
|
|
|
7011
7016
|
);
|
|
7012
7017
|
var h1 = /* @__PURE__ */ ((i) => (i.ACTIVE = "Active", i.ARCHIVED = "Archived", i))(h1 || {});
|
|
7013
7018
|
const Mi = ({ size: i = 30, color: e = "#004ed7" }) => {
|
|
7014
|
-
const t = `no-repeat linear-gradient(${e}
|
|
7019
|
+
const t = `no-repeat linear-gradient(${e}
|
|
7020
|
+
calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
|
|
7015
7021
|
width: i,
|
|
7016
7022
|
background: `${t} 0% 100%, ${t} 50% 100%, ${t} 100% 100%`,
|
|
7017
7023
|
backgroundSize: "20% calc(200% + 20px)"
|
|
@@ -8686,7 +8692,8 @@ const M5 = s1(
|
|
|
8686
8692
|
const { axiosPeople: d, locale: g } = n1(oe), { t: a } = Ki("common", { lng: g }), [h, C] = I([]), [p, k] = I(!0);
|
|
8687
8693
|
if (!d)
|
|
8688
8694
|
throw new Error(
|
|
8689
|
-
|
|
8695
|
+
`UserSelect requires "axiosPeople" to fetch users.
|
|
8696
|
+
Please provide it via SNMTUiContext.`
|
|
8690
8697
|
);
|
|
8691
8698
|
const x = $(
|
|
8692
8699
|
(f) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snmt-react-ui/user-select",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/user-select.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@snmt-react-ui/async-select": "^1.2.
|
|
21
|
+
"@snmt-react-ui/async-select": "^1.2.5",
|
|
22
22
|
"@snmt-react-ui/core": "^2.0.0",
|
|
23
|
-
"@snmt-react-ui/loader": "^1.
|
|
24
|
-
"@snmt-react-ui/select": "^1.
|
|
23
|
+
"@snmt-react-ui/loader": "^1.3.0",
|
|
24
|
+
"@snmt-react-ui/select": "^1.9.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"antd": "^5.22.3",
|
|
28
28
|
"i18next": "^23.11.1",
|
|
29
29
|
"react-i18next": "^14.1.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "2085ff191c8bdb8b8884120fd50ea0a210258cdf"
|
|
32
32
|
}
|