@addsign/moje-agenda-shared-lib 0.0.16 → 0.0.18
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/assets/tailwind.css +1 -1
- package/dist/components/Button.js +10 -17
- package/dist/components/Calendar.d.ts +18 -0
- package/dist/components/Calendar.js +120 -0
- package/dist/components/ConfirmationModalDialog.d.ts +10 -0
- package/dist/components/ConfirmationModalDialog.js +101 -0
- package/dist/components/DataTable.d.ts +32 -0
- package/dist/components/DataTable.js +247 -0
- package/dist/components/form/AutocompleteSearchBar.js +89 -80
- package/dist/components/form/FormField.js +53 -52
- package/dist/contexts/FederationContext.d.ts +0 -1
- package/dist/contexts/FederationContext.js +11 -12
- package/dist/contexts/useFederationContext.d.ts +1 -0
- package/dist/contexts/useFederationContext.js +6 -0
- package/dist/iconBase-DkR9t2l_.js +117 -0
- package/dist/index-CfhiHK7D.js +43 -0
- package/dist/main.d.ts +4 -0
- package/dist/main.js +15 -10
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index-CvL09ndn.js +0 -128
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as N, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as F, useEffect as p, useState as m } from "react";
|
|
3
3
|
import '../../assets/tailwind.css';/* empty css */
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { h as K, i as _, c as ee } from "../../index-CfhiHK7D.js";
|
|
5
|
+
import "../../contexts/FederationContext.js";
|
|
6
|
+
import { useFederationContext as te } from "../../contexts/useFederationContext.js";
|
|
6
7
|
function re(e) {
|
|
7
8
|
for (var t = [], r = 1; r < arguments.length; r++)
|
|
8
9
|
t[r - 1] = arguments[r];
|
|
@@ -15,90 +16,98 @@ function ae(e) {
|
|
|
15
16
|
}
|
|
16
17
|
var le = ["mousedown", "touchstart"], se = function(e, t, r) {
|
|
17
18
|
r === void 0 && (r = le);
|
|
18
|
-
var d =
|
|
19
|
+
var d = F(t);
|
|
19
20
|
p(function() {
|
|
20
21
|
d.current = t;
|
|
21
22
|
}, [t]), p(function() {
|
|
22
|
-
for (var o = function(
|
|
23
|
+
for (var o = function(f) {
|
|
23
24
|
var c = e.current;
|
|
24
|
-
c && !c.contains(
|
|
25
|
-
}, a = 0,
|
|
26
|
-
var h =
|
|
25
|
+
c && !c.contains(f.target) && d.current(f);
|
|
26
|
+
}, a = 0, u = r; a < u.length; a++) {
|
|
27
|
+
var h = u[a];
|
|
27
28
|
re(document, h, o);
|
|
28
29
|
}
|
|
29
30
|
return function() {
|
|
30
|
-
for (var
|
|
31
|
-
var
|
|
32
|
-
ae(document,
|
|
31
|
+
for (var f = 0, c = r; f < c.length; f++) {
|
|
32
|
+
var k = c[f];
|
|
33
|
+
ae(document, k, o);
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
36
|
}, [r, e]);
|
|
36
37
|
};
|
|
37
|
-
const
|
|
38
|
+
const me = ({
|
|
38
39
|
label: e,
|
|
39
40
|
name: t,
|
|
40
41
|
required: r,
|
|
41
42
|
disabled: d,
|
|
42
43
|
description: o,
|
|
43
44
|
fetchUrl: a,
|
|
44
|
-
valueKey:
|
|
45
|
+
valueKey: u,
|
|
45
46
|
labelKey: h,
|
|
46
|
-
onChange:
|
|
47
|
+
onChange: f,
|
|
47
48
|
onFocus: c,
|
|
48
|
-
onBlur:
|
|
49
|
-
placeholder:
|
|
49
|
+
onBlur: k,
|
|
50
|
+
placeholder: D,
|
|
50
51
|
serverSearch: v = !1,
|
|
51
|
-
value:
|
|
52
|
-
initOptions:
|
|
53
|
-
showId:
|
|
52
|
+
value: L,
|
|
53
|
+
initOptions: R,
|
|
54
|
+
showId: C
|
|
54
55
|
}) => {
|
|
55
56
|
var j, V;
|
|
56
|
-
const [
|
|
57
|
+
const [E, w] = m(""), [J, M] = m(!1), [x, A] = m([]), [O, b] = m(-1), [P, Q] = m(
|
|
57
58
|
null
|
|
58
|
-
), [g, y] = m([]), X =
|
|
59
|
+
), [g, y] = m([]), X = F(null), q = F(null), S = te(), [B, z] = m(!1), [H] = m({});
|
|
59
60
|
p(() => {
|
|
60
61
|
a && (async () => {
|
|
61
|
-
|
|
62
|
+
M(!0), console.log(
|
|
62
63
|
"%csrcsharedAutocompleteSearchBar.tsx:77 fetchUrl, value",
|
|
63
64
|
"color: #007acc;",
|
|
64
65
|
a
|
|
65
66
|
);
|
|
66
|
-
const { data: s } = await
|
|
67
|
-
|
|
67
|
+
const { data: s } = await S.apiClient.get(a || "");
|
|
68
|
+
A(
|
|
68
69
|
s.map((i) => ({
|
|
69
|
-
value: i[
|
|
70
|
-
label: i[h] + (
|
|
70
|
+
value: i[u],
|
|
71
|
+
label: i[h] + (C ? " (" + i[u] + ")" : "")
|
|
71
72
|
}))
|
|
72
|
-
),
|
|
73
|
+
), M(!1);
|
|
73
74
|
})();
|
|
74
|
-
}, [a]), p(() => {
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
if (
|
|
78
|
-
const l = x.find((s) => s.value ==
|
|
79
|
-
l && (w(l.label),
|
|
75
|
+
}, [a, u, S.apiClient, h, C]), p(() => {
|
|
76
|
+
R && A(R);
|
|
77
|
+
}, [R]), p(() => {
|
|
78
|
+
if (L && x) {
|
|
79
|
+
const l = x.find((s) => s.value == L);
|
|
80
|
+
l && (w(l.label), Q(l));
|
|
80
81
|
}
|
|
81
|
-
}, [
|
|
82
|
+
}, [L, x]), p(() => {
|
|
82
83
|
v && (async () => {
|
|
83
|
-
|
|
84
|
-
const { data: s } = await
|
|
85
|
-
|
|
84
|
+
M(!0);
|
|
85
|
+
const { data: s } = await S.apiClient.get(a + E);
|
|
86
|
+
A(
|
|
86
87
|
s.map((i) => ({
|
|
87
|
-
value: i[
|
|
88
|
-
label: i[h] + (
|
|
88
|
+
value: i[u],
|
|
89
|
+
label: i[h] + (C ? " (" + i[u] + ")" : "")
|
|
89
90
|
}))
|
|
90
91
|
), y(
|
|
91
92
|
s.map((i) => ({
|
|
92
|
-
value: i[
|
|
93
|
-
label: i[h] + (
|
|
93
|
+
value: i[u],
|
|
94
|
+
label: i[h] + (C ? " (" + i[u] + ")" : "")
|
|
94
95
|
}))
|
|
95
|
-
),
|
|
96
|
+
), M(!1);
|
|
96
97
|
})();
|
|
97
|
-
}, [
|
|
98
|
-
|
|
98
|
+
}, [
|
|
99
|
+
E,
|
|
100
|
+
v,
|
|
101
|
+
u,
|
|
102
|
+
h,
|
|
103
|
+
a,
|
|
104
|
+
S.apiClient,
|
|
105
|
+
C
|
|
106
|
+
]), se(q, () => {
|
|
107
|
+
y([]), P || (w(""), f(null)), $();
|
|
99
108
|
});
|
|
100
109
|
const Y = (l) => {
|
|
101
|
-
w(l.target.value),
|
|
110
|
+
w(l.target.value), Q(null), b(-1), y(
|
|
102
111
|
x.filter(
|
|
103
112
|
(s) => {
|
|
104
113
|
var i, W, G;
|
|
@@ -107,38 +116,38 @@ const he = ({
|
|
|
107
116
|
)
|
|
108
117
|
);
|
|
109
118
|
}, Z = () => {
|
|
110
|
-
console.log("handleFocus query",
|
|
119
|
+
console.log("handleFocus query", E), z(!0), c(), y(
|
|
111
120
|
x
|
|
112
121
|
/*.filter((option) =>
|
|
113
122
|
option.label.toLowerCase().includes(query.toLowerCase()),
|
|
114
123
|
),*/
|
|
115
124
|
);
|
|
116
|
-
},
|
|
125
|
+
}, U = () => {
|
|
117
126
|
console.log(
|
|
118
127
|
"%csrcsharedAutocompleteSearchBar.tsx:95 handleClearQuery",
|
|
119
128
|
"color: #007acc;"
|
|
120
|
-
), w(""),
|
|
129
|
+
), w(""), f(null), Q(null), setTimeout(() => {
|
|
121
130
|
b(-1), y(x);
|
|
122
131
|
}, 1e3);
|
|
123
|
-
},
|
|
132
|
+
}, I = (l) => {
|
|
124
133
|
l.key === "ArrowUp" && g.length > 0 ? b(
|
|
125
134
|
(s) => s > 0 ? s - 1 : g.length - 1
|
|
126
135
|
) : l.key === "ArrowDown" && g.length > 0 ? b(
|
|
127
136
|
(s) => s < g.length - 1 ? s + 1 : 0
|
|
128
|
-
) : l.key === "Enter" &&
|
|
137
|
+
) : l.key === "Enter" && O !== -1 ? T(g[O]) : l.key === "Escape" && O !== -1 && $();
|
|
129
138
|
}, T = (l) => {
|
|
130
|
-
w(l.label),
|
|
131
|
-
},
|
|
132
|
-
y([]),
|
|
139
|
+
w(l.label), Q(l), b(-1), f(l.value), $();
|
|
140
|
+
}, $ = () => {
|
|
141
|
+
y([]), k(), z(!1);
|
|
133
142
|
};
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
143
|
+
return /* @__PURE__ */ N("div", { className: "w-full min-h-20 flex-col justify-start items-start gap-1.5 inline-flex", children: [
|
|
144
|
+
/* @__PURE__ */ N(
|
|
136
145
|
"div",
|
|
137
146
|
{
|
|
138
147
|
className: "self-stretch min-h-14 flex-col justify-start items-start gap-1.5 flex relative",
|
|
139
|
-
ref:
|
|
148
|
+
ref: q,
|
|
140
149
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ N(
|
|
142
151
|
"label",
|
|
143
152
|
{
|
|
144
153
|
className: "text-slate-700 text-sm leading-tight font-medium",
|
|
@@ -154,22 +163,22 @@ const he = ({
|
|
|
154
163
|
"div",
|
|
155
164
|
{
|
|
156
165
|
className: `self-stretch px-3 py-1.5 rounded-lg justify-start items-center gap-2 inline-flex outline-none border
|
|
157
|
-
${
|
|
158
|
-
${
|
|
159
|
-
${!
|
|
166
|
+
${B ? "outline-4 outline-indigo-200 outline-offset-0 border-indigo-300" : ""}
|
|
167
|
+
${B && ((j = H[t]) != null && j.message) ? "outline-4 outline-red-200 outline-offset-0 border-none" : ""}
|
|
168
|
+
${!B && ((V = H[t]) != null && V.message) ? "border-red-200" : ""}
|
|
160
169
|
${d ? "bg-gray-100" : "bg-transparent"}`,
|
|
161
170
|
children: /* @__PURE__ */ n("div", { className: "Content grow shrink basis-0 min-h-5 xl:min-h-8 justify-start items-start gap-2 flex relative flex-col w-full mx-auto", children: /* @__PURE__ */ n(
|
|
162
171
|
oe,
|
|
163
172
|
{
|
|
164
|
-
value:
|
|
173
|
+
value: E,
|
|
165
174
|
onChange: Y,
|
|
166
|
-
onKeyDown:
|
|
175
|
+
onKeyDown: I,
|
|
167
176
|
onFocus: Z,
|
|
168
|
-
clearQuery:
|
|
177
|
+
clearQuery: U,
|
|
169
178
|
inputRef: X,
|
|
170
|
-
placeholder:
|
|
171
|
-
isFocused:
|
|
172
|
-
onBlur:
|
|
179
|
+
placeholder: D,
|
|
180
|
+
isFocused: B,
|
|
181
|
+
onBlur: $,
|
|
173
182
|
isLoading: J
|
|
174
183
|
}
|
|
175
184
|
) })
|
|
@@ -179,7 +188,7 @@ const he = ({
|
|
|
179
188
|
ne,
|
|
180
189
|
{
|
|
181
190
|
options: g,
|
|
182
|
-
selectedOptionIndex:
|
|
191
|
+
selectedOptionIndex: O,
|
|
183
192
|
handleOptionClick: T
|
|
184
193
|
}
|
|
185
194
|
)
|
|
@@ -193,7 +202,7 @@ const he = ({
|
|
|
193
202
|
selectedOptionIndex: t,
|
|
194
203
|
handleOptionClick: r
|
|
195
204
|
}) => {
|
|
196
|
-
const d =
|
|
205
|
+
const d = F(null);
|
|
197
206
|
return p(() => {
|
|
198
207
|
var o;
|
|
199
208
|
if (t >= 0 && t < e.length) {
|
|
@@ -226,11 +235,11 @@ const he = ({
|
|
|
226
235
|
onFocus: d,
|
|
227
236
|
onBlur: o,
|
|
228
237
|
inputRef: a,
|
|
229
|
-
placeholder:
|
|
238
|
+
placeholder: u,
|
|
230
239
|
clearQuery: h,
|
|
231
|
-
isFocused:
|
|
240
|
+
isFocused: f,
|
|
232
241
|
isLoading: c
|
|
233
|
-
}) => /* @__PURE__ */
|
|
242
|
+
}) => /* @__PURE__ */ N("div", { className: "relative flex items-center w-full sharedResource", children: [
|
|
234
243
|
/* @__PURE__ */ n(
|
|
235
244
|
"input",
|
|
236
245
|
{
|
|
@@ -241,11 +250,11 @@ const he = ({
|
|
|
241
250
|
onKeyDown: r,
|
|
242
251
|
onFocus: d,
|
|
243
252
|
ref: a,
|
|
244
|
-
placeholder:
|
|
253
|
+
placeholder: u,
|
|
245
254
|
disabled: c
|
|
246
255
|
}
|
|
247
256
|
),
|
|
248
|
-
c && /* @__PURE__ */ n("div", { className: "loader absolute right-0 text-gray-500", children: /* @__PURE__ */
|
|
257
|
+
c && /* @__PURE__ */ n("div", { className: "loader absolute right-0 text-gray-500", children: /* @__PURE__ */ N(
|
|
249
258
|
"svg",
|
|
250
259
|
{
|
|
251
260
|
className: "animate-spin h-5 w-5",
|
|
@@ -275,15 +284,15 @@ const he = ({
|
|
|
275
284
|
]
|
|
276
285
|
}
|
|
277
286
|
) }),
|
|
278
|
-
|
|
279
|
-
|
|
287
|
+
f && !c && /* @__PURE__ */ n(
|
|
288
|
+
K,
|
|
280
289
|
{
|
|
281
290
|
className: "material-icons absolute right-0 cursor-pointer text-gray-500",
|
|
282
291
|
onClick: o
|
|
283
292
|
}
|
|
284
293
|
),
|
|
285
|
-
!
|
|
286
|
-
|
|
294
|
+
!f && !c && /* @__PURE__ */ n(
|
|
295
|
+
_,
|
|
287
296
|
{
|
|
288
297
|
className: "material-icons absolute right-0 cursor-pointer text-gray-500",
|
|
289
298
|
onClick: () => {
|
|
@@ -293,7 +302,7 @@ const he = ({
|
|
|
293
302
|
}
|
|
294
303
|
),
|
|
295
304
|
e && !c && /* @__PURE__ */ n(
|
|
296
|
-
|
|
305
|
+
ee,
|
|
297
306
|
{
|
|
298
307
|
className: "material-icons absolute right-10 cursor-pointer text-gray-500",
|
|
299
308
|
onClick: () => {
|
|
@@ -303,5 +312,5 @@ const he = ({
|
|
|
303
312
|
)
|
|
304
313
|
] });
|
|
305
314
|
export {
|
|
306
|
-
|
|
315
|
+
me as default
|
|
307
316
|
};
|
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
2
|
+
import { useState as T, useRef as Y, useEffect as Z } from "react";
|
|
3
|
+
import { c as _ } from "../../index-CfhiHK7D.js";
|
|
4
4
|
import '../../assets/tailwind.css';/* empty css */
|
|
5
|
-
import
|
|
5
|
+
import "../../contexts/FederationContext.js";
|
|
6
|
+
import { useFederationContext as K } from "../../contexts/useFederationContext.js";
|
|
6
7
|
const ae = ({
|
|
7
8
|
label: b,
|
|
8
9
|
name: r,
|
|
9
|
-
type:
|
|
10
|
+
type: F,
|
|
10
11
|
register: y,
|
|
11
12
|
disabled: n,
|
|
12
13
|
errors: u = {},
|
|
13
|
-
required:
|
|
14
|
-
clearable:
|
|
14
|
+
required: E,
|
|
15
|
+
clearable: G,
|
|
15
16
|
value: l,
|
|
16
17
|
description: w,
|
|
17
18
|
onInputChange: i,
|
|
18
|
-
options:
|
|
19
|
+
options: s,
|
|
19
20
|
placeholder: v,
|
|
20
21
|
children: C,
|
|
21
22
|
fetchUrl: N,
|
|
22
|
-
valueKey:
|
|
23
|
-
labelKey:
|
|
24
|
-
maxLength:
|
|
23
|
+
valueKey: B,
|
|
24
|
+
labelKey: O,
|
|
25
|
+
maxLength: q
|
|
25
26
|
}) => {
|
|
26
|
-
var
|
|
27
|
-
const [k,
|
|
28
|
-
ref:
|
|
27
|
+
var $, L, R, H, M;
|
|
28
|
+
const [k, a] = T(!1), [p, j] = T(s), A = Y(null), {
|
|
29
|
+
ref: z = A,
|
|
29
30
|
onBlur: d = () => {
|
|
30
31
|
},
|
|
31
32
|
...f
|
|
32
|
-
} = y ? y(r) : {},
|
|
33
|
+
} = y ? y(r) : {}, S = ($ = K()) == null ? void 0 : $.apiClient, c = z || A, D = () => {
|
|
33
34
|
c.current && c.current.focus();
|
|
34
35
|
}, J = (e) => {
|
|
35
|
-
const
|
|
36
|
+
const m = Array.from(
|
|
36
37
|
e.target.selectedOptions,
|
|
37
|
-
(
|
|
38
|
+
(g) => g.value
|
|
38
39
|
);
|
|
39
40
|
i({
|
|
40
41
|
...e,
|
|
41
42
|
target: {
|
|
42
|
-
value:
|
|
43
|
+
value: m,
|
|
43
44
|
name: e.target.name
|
|
44
45
|
}
|
|
45
46
|
});
|
|
46
|
-
},
|
|
47
|
+
}, P = (e) => {
|
|
47
48
|
i({
|
|
48
49
|
...e,
|
|
49
50
|
target: {
|
|
@@ -51,7 +52,7 @@ const ae = ({
|
|
|
51
52
|
name: e.target.name
|
|
52
53
|
}
|
|
53
54
|
});
|
|
54
|
-
},
|
|
55
|
+
}, Q = (e) => {
|
|
55
56
|
i({
|
|
56
57
|
...e,
|
|
57
58
|
target: {
|
|
@@ -60,21 +61,21 @@ const ae = ({
|
|
|
60
61
|
}
|
|
61
62
|
});
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
-
N && (async (
|
|
65
|
-
const { data:
|
|
66
|
-
value: h[
|
|
67
|
-
label: h[
|
|
64
|
+
Z(() => {
|
|
65
|
+
N && (async (m) => {
|
|
66
|
+
const { data: g } = await S.get(m), W = typeof g[0] == "number", X = g.map((h) => W ? { value: h, label: h.toString() } : {
|
|
67
|
+
value: h[B || "id"],
|
|
68
|
+
label: h[O || "name"]
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
+
j([
|
|
70
71
|
{ value: null, label: " " },
|
|
71
72
|
// Add an empty option as the first item
|
|
72
|
-
...
|
|
73
|
+
...X
|
|
73
74
|
]);
|
|
74
|
-
})(N),
|
|
75
|
-
}, [N,
|
|
76
|
-
const
|
|
77
|
-
switch (
|
|
75
|
+
})(N), s && j(s);
|
|
76
|
+
}, [N, s, S, B, O]);
|
|
77
|
+
const V = () => {
|
|
78
|
+
switch (F) {
|
|
78
79
|
case "select":
|
|
79
80
|
return /* @__PURE__ */ t(x, { children: /* @__PURE__ */ o(
|
|
80
81
|
"select",
|
|
@@ -86,13 +87,13 @@ const ae = ({
|
|
|
86
87
|
...f,
|
|
87
88
|
ref: c,
|
|
88
89
|
onChange: i,
|
|
89
|
-
onFocus: () =>
|
|
90
|
+
onFocus: () => a(!0),
|
|
90
91
|
onBlur: (e) => {
|
|
91
|
-
d(e),
|
|
92
|
+
d(e), a(!1);
|
|
92
93
|
},
|
|
93
94
|
children: [
|
|
94
95
|
v && /* @__PURE__ */ t("option", { label: v }),
|
|
95
|
-
|
|
96
|
+
p == null ? void 0 : p.map((e) => /* @__PURE__ */ t(
|
|
96
97
|
"option",
|
|
97
98
|
{
|
|
98
99
|
value: e.value ? e.value : void 0,
|
|
@@ -115,11 +116,11 @@ const ae = ({
|
|
|
115
116
|
...f,
|
|
116
117
|
ref: c,
|
|
117
118
|
onChange: J,
|
|
118
|
-
onFocus: () =>
|
|
119
|
+
onFocus: () => a(!0),
|
|
119
120
|
onBlur: (e) => {
|
|
120
|
-
d(e),
|
|
121
|
+
d(e), a(!1);
|
|
121
122
|
},
|
|
122
|
-
children:
|
|
123
|
+
children: s == null ? void 0 : s.map((e) => /* @__PURE__ */ t(
|
|
123
124
|
"option",
|
|
124
125
|
{
|
|
125
126
|
value: e.value ? e.value : void 0,
|
|
@@ -130,7 +131,7 @@ const ae = ({
|
|
|
130
131
|
}
|
|
131
132
|
) });
|
|
132
133
|
case "radioGroup":
|
|
133
|
-
return /* @__PURE__ */ t("div", { className: "flex flex-col", children:
|
|
134
|
+
return /* @__PURE__ */ t("div", { className: "flex flex-col", children: s == null ? void 0 : s.map((e, m) => /* @__PURE__ */ o(
|
|
134
135
|
"label",
|
|
135
136
|
{
|
|
136
137
|
className: "inline-flex items-center space-x-2 my-2",
|
|
@@ -151,7 +152,7 @@ const ae = ({
|
|
|
151
152
|
/* @__PURE__ */ t("span", { className: "text-gray-900 text-sm font-normal leading-tight", children: e.label })
|
|
152
153
|
]
|
|
153
154
|
},
|
|
154
|
-
|
|
155
|
+
m
|
|
155
156
|
)) });
|
|
156
157
|
case "textarea":
|
|
157
158
|
return /* @__PURE__ */ t(
|
|
@@ -165,10 +166,10 @@ const ae = ({
|
|
|
165
166
|
...f,
|
|
166
167
|
ref: c,
|
|
167
168
|
onChange: i,
|
|
168
|
-
onFocus: () =>
|
|
169
|
-
maxLength:
|
|
169
|
+
onFocus: () => a(!0),
|
|
170
|
+
maxLength: q || 4e3,
|
|
170
171
|
onBlur: (e) => {
|
|
171
|
-
d(e),
|
|
172
|
+
d(e), a(!1);
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
);
|
|
@@ -184,10 +185,10 @@ const ae = ({
|
|
|
184
185
|
disabled: n,
|
|
185
186
|
...f,
|
|
186
187
|
ref: c,
|
|
187
|
-
onChange:
|
|
188
|
-
onFocus: () =>
|
|
188
|
+
onChange: P,
|
|
189
|
+
onFocus: () => a(!0),
|
|
189
190
|
onBlur: (e) => {
|
|
190
|
-
d(e),
|
|
191
|
+
d(e), a(!1);
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
),
|
|
@@ -201,14 +202,14 @@ const ae = ({
|
|
|
201
202
|
id: r,
|
|
202
203
|
readOnly: n,
|
|
203
204
|
value: l,
|
|
204
|
-
type:
|
|
205
|
+
type: F,
|
|
205
206
|
...f,
|
|
206
207
|
ref: c,
|
|
207
208
|
placeholder: v,
|
|
208
209
|
onChange: i,
|
|
209
|
-
onFocus: () =>
|
|
210
|
+
onFocus: () => a(!0),
|
|
210
211
|
onBlur: (e) => {
|
|
211
|
-
d(e),
|
|
212
|
+
d(e), a(!1);
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
) });
|
|
@@ -224,24 +225,24 @@ const ae = ({
|
|
|
224
225
|
children: [
|
|
225
226
|
b,
|
|
226
227
|
" ",
|
|
227
|
-
|
|
228
|
+
E ? "*" : ""
|
|
228
229
|
]
|
|
229
230
|
}
|
|
230
231
|
),
|
|
231
232
|
/* @__PURE__ */ t(
|
|
232
233
|
"div",
|
|
233
234
|
{
|
|
234
|
-
className: `self-stretch px-3 py-2 rounded-lg justify-start items-center gap-2 inline-flex outline-none border ${k && !((
|
|
235
|
+
className: `self-stretch px-3 py-2 rounded-lg justify-start items-center gap-2 inline-flex outline-none border ${k && !((L = u[r]) != null && L.message) ? "outline-4 outline-indigo-200 outline-offset-0 border-indigo-300" : ""} ${k && ((R = u[r]) != null && R.message) ? "outline-4 outline-red-200 outline-offset-0 border-none" : ""} ${!k && ((H = u[r]) != null && H.message) ? "border-red-200" : ""} ${n ? "bg-gray-100" : "bg-transparent"}`,
|
|
235
236
|
children: /* @__PURE__ */ o("div", { className: "flex relative grow shrink basis-0 min-h-5 xl:min-h-[32px] justify-start items-stretch gap-2 max-w-full", children: [
|
|
236
|
-
|
|
237
|
+
V(),
|
|
237
238
|
C && /* @__PURE__ */ t("div", { onClick: D, children: C }),
|
|
238
|
-
|
|
239
|
+
G && l && /* @__PURE__ */ t(_, { onClick: Q })
|
|
239
240
|
] })
|
|
240
241
|
}
|
|
241
242
|
)
|
|
242
243
|
] }),
|
|
243
244
|
w && /* @__PURE__ */ t("div", { className: "HintText self-stretch text-slate-600 text-sm font-normal leading-tight", children: w }),
|
|
244
|
-
u[r] && /* @__PURE__ */ t("div", { className: "HintText self-stretch text-red-600 text-sm font-normal leading-tight", children: (
|
|
245
|
+
u[r] && /* @__PURE__ */ t("div", { className: "HintText self-stretch text-red-600 text-sm font-normal leading-tight", children: (M = u[r]) == null ? void 0 : M.message })
|
|
245
246
|
] });
|
|
246
247
|
};
|
|
247
248
|
export {
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
children:
|
|
5
|
-
value:
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as a } from "react";
|
|
3
|
+
const c = a({}), d = ({
|
|
4
|
+
children: t,
|
|
5
|
+
value: e
|
|
6
6
|
}) => {
|
|
7
|
-
const { userInfo:
|
|
8
|
-
userInfo:
|
|
7
|
+
const { userInfo: o, apiClient: r } = e, n = {
|
|
8
|
+
userInfo: o,
|
|
9
9
|
apiClient: r
|
|
10
10
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
}
|
|
11
|
+
return /* @__PURE__ */ i(c.Provider, { value: n, children: t });
|
|
12
|
+
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
d as useFederationContext
|
|
14
|
+
c as FederationContext,
|
|
15
|
+
d as FederationContextProvider
|
|
17
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFederationContext: () => import('../types').IContextValue;
|