@lax-wp/design-system 0.13.35 → 0.13.36
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/forms/date-time-field/DateTimeField.cjs.js +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.es.js +97 -92
- package/dist/components/forms/date-time-field/DateTimeField.es.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.d.ts +6 -0
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js +172 -142
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js.map +1 -1
- package/dist/components/forms/link-input/LinkInputField.cjs.js +2 -0
- package/dist/components/forms/link-input/LinkInputField.cjs.js.map +1 -0
- package/dist/components/forms/link-input/LinkInputField.d.ts +59 -0
- package/dist/components/forms/link-input/LinkInputField.es.js +102 -0
- package/dist/components/forms/link-input/LinkInputField.es.js.map +1 -0
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.d.ts +6 -0
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js +199 -169
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js +1 -5
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.d.ts +6 -0
- package/dist/components/forms/percentage-input/PercentageInputField.es.js +141 -134
- package/dist/components/forms/percentage-input/PercentageInputField.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.es.js +407 -405
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,102 +1,131 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { Label as
|
|
8
|
-
import { BoltOutlined as
|
|
9
|
-
import { AIExtractedIndicator as
|
|
10
|
-
import { AIStarIcon as
|
|
11
|
-
import { HelpIcon as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { InputLabel as
|
|
15
|
-
import { shouldShowConfidenceScore as
|
|
16
|
-
const Ie =
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import a from "../../../_virtual/index.es.js";
|
|
3
|
+
import { forwardRef as me, useState as C, useRef as ue, useEffect as j } from "react";
|
|
4
|
+
import { Tooltip as fe } from "antd";
|
|
5
|
+
import { useTranslation as pe } from "react-i18next";
|
|
6
|
+
import { Typography as be } from "../../data-display/typography/Typography.es.js";
|
|
7
|
+
import { Label as xe } from "../../data-display/label/Label.es.js";
|
|
8
|
+
import { BoltOutlined as ge, NoteAddOutlined as he, CloseRounded as ke, TableChartRounded as ve } from "@mui/icons-material";
|
|
9
|
+
import { AIExtractedIndicator as ye } from "../../icons/AIExtractedIndicator.es.js";
|
|
10
|
+
import { AIStarIcon as Fe } from "../../icons/AIStarIcon.es.js";
|
|
11
|
+
import { HelpIcon as Ce } from "../../icons/HelpIcon.es.js";
|
|
12
|
+
import H from "../../tooltip/Tooltip.es.js";
|
|
13
|
+
import K from "../../button/IconButton.es.js";
|
|
14
|
+
import { InputLabel as we } from "../shared/InputLabel.es.js";
|
|
15
|
+
import { shouldShowConfidenceScore as L, getConfidenceScoreBadgeFill as Ne, getConfidenceScoreBadgeColor as Se, getConfidenceScoreBadgeTextColor as Ee, getConfidenceScoreBadgeClass as Be } from "../../../utils/confidenceScoreUtils.es.js";
|
|
16
|
+
const Ie = me(
|
|
17
17
|
({
|
|
18
|
-
id:
|
|
18
|
+
id: W,
|
|
19
19
|
label: _,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
labelExtra: q,
|
|
21
|
+
placeholder: O,
|
|
22
|
+
value: d,
|
|
23
|
+
onChange: f,
|
|
24
|
+
errorMessage: o,
|
|
25
|
+
defaultValue: J,
|
|
26
|
+
required: w = !1,
|
|
27
|
+
isRequiredConditional: M = !1,
|
|
28
|
+
dataSource: x,
|
|
29
|
+
dataKey: Q,
|
|
30
|
+
tags: U,
|
|
30
31
|
tooltip: N = "",
|
|
31
|
-
originalCase:
|
|
32
|
-
color:
|
|
33
|
-
isGTN:
|
|
34
|
-
gtnName:
|
|
35
|
-
isAiExtracted:
|
|
36
|
-
confidenceScore:
|
|
37
|
-
confidenceType:
|
|
38
|
-
confidenceTooltip:
|
|
39
|
-
sourceMeta:
|
|
40
|
-
onConfidenceScoreClick:
|
|
41
|
-
labelClassName:
|
|
42
|
-
disabled:
|
|
43
|
-
isLiveField:
|
|
44
|
-
onAddGTNToDocument:
|
|
45
|
-
riskDetails:
|
|
46
|
-
isRiskAnalysisOpen:
|
|
47
|
-
RiskDetailsCard:
|
|
48
|
-
primaryColorShades:
|
|
49
|
-
isRecording:
|
|
50
|
-
isPlaying:
|
|
51
|
-
setDisableActions:
|
|
52
|
-
showDeprecatedFieldWarning:
|
|
53
|
-
DynamicDataModal:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
32
|
+
originalCase: X = !1,
|
|
33
|
+
color: n = "",
|
|
34
|
+
isGTN: g = !1,
|
|
35
|
+
gtnName: S,
|
|
36
|
+
isAiExtracted: Y = !1,
|
|
37
|
+
confidenceScore: h,
|
|
38
|
+
confidenceType: c = "high",
|
|
39
|
+
confidenceTooltip: k,
|
|
40
|
+
sourceMeta: Z = [],
|
|
41
|
+
onConfidenceScoreClick: T,
|
|
42
|
+
labelClassName: G,
|
|
43
|
+
disabled: E = !1,
|
|
44
|
+
isLiveField: ee = !1,
|
|
45
|
+
onAddGTNToDocument: v,
|
|
46
|
+
riskDetails: i,
|
|
47
|
+
isRiskAnalysisOpen: B = !1,
|
|
48
|
+
RiskDetailsCard: I,
|
|
49
|
+
primaryColorShades: re,
|
|
50
|
+
isRecording: De = !1,
|
|
51
|
+
isPlaying: Re = !1,
|
|
52
|
+
setDisableActions: D,
|
|
53
|
+
showDeprecatedFieldWarning: R,
|
|
54
|
+
DynamicDataModal: A,
|
|
55
|
+
inputEmphasis: y = "default"
|
|
56
|
+
}, te) => {
|
|
57
|
+
const { t: ae } = pe(), p = !!(B && i?.color), le = y === "modified" && !o && !p, oe = y === "deleted" && !o && !p, ne = y === "success" && !o && !p, [b, F] = C(!1), [m, u] = C(d), [s, z] = C(!1), P = ue(null), V = te || P, $ = () => {
|
|
58
|
+
D?.(!s), z(!s);
|
|
59
|
+
}, ie = (e) => {
|
|
60
|
+
if (e.keyCode === 9 || e.key === "Enter") {
|
|
61
|
+
const t = V.current || P.current;
|
|
62
|
+
t && (m !== null && f(m), u(m), t.blur());
|
|
61
63
|
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
key:
|
|
67
|
-
value:
|
|
64
|
+
}, se = () => {
|
|
65
|
+
u(""), f("");
|
|
66
|
+
}, de = (e) => {
|
|
67
|
+
v && S && v({
|
|
68
|
+
key: S,
|
|
69
|
+
value: e
|
|
68
70
|
});
|
|
69
|
-
},
|
|
70
|
-
const
|
|
71
|
-
return
|
|
71
|
+
}, ce = () => {
|
|
72
|
+
const e = "border h-8 text-sm rounded-lg block w-full p-2.5 font-inter font-medium", t = "placeholder:text-neutral-900 dark:placeholder:text-black-400";
|
|
73
|
+
return o ? a(
|
|
74
|
+
e,
|
|
75
|
+
t,
|
|
76
|
+
"border-red-300 bg-gray-200 dark:border-black-600 dark:bg-black-600",
|
|
77
|
+
n || "text-neutral-900 dark:text-black-200"
|
|
78
|
+
) : p && i?.color ? a(
|
|
79
|
+
e,
|
|
80
|
+
t,
|
|
81
|
+
`border-${i.color}-300 bg-${i.color}-50`,
|
|
82
|
+
n || "text-neutral-900 dark:text-black-200"
|
|
83
|
+
) : oe ? a(
|
|
84
|
+
e,
|
|
85
|
+
t,
|
|
86
|
+
"border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467]"
|
|
87
|
+
) : le ? a(
|
|
88
|
+
e,
|
|
89
|
+
t,
|
|
90
|
+
"border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)]"
|
|
91
|
+
) : ne ? a(
|
|
92
|
+
e,
|
|
93
|
+
t,
|
|
94
|
+
"border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828]"
|
|
95
|
+
) : a(
|
|
96
|
+
e,
|
|
97
|
+
t,
|
|
98
|
+
"border-gray-300 bg-gray-200 dark:border-black-600 dark:bg-black-600",
|
|
99
|
+
n || "text-neutral-900 dark:text-black-200"
|
|
100
|
+
);
|
|
72
101
|
};
|
|
73
102
|
return j(() => {
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
|
|
77
|
-
}, [
|
|
103
|
+
s && !x && (R?.(), z(!1));
|
|
104
|
+
}, [s, x, R]), j(() => {
|
|
105
|
+
u(d);
|
|
106
|
+
}, [d]), /* @__PURE__ */ l(
|
|
78
107
|
"div",
|
|
79
108
|
{
|
|
80
|
-
className:
|
|
109
|
+
className: a(
|
|
81
110
|
"flex gap-0.5 w-full relative",
|
|
82
|
-
|
|
83
|
-
{ "error-field": !!
|
|
111
|
+
b && g ? "border rounded-lg border-primary-100 bg-primary-50 p-1" : "",
|
|
112
|
+
{ "error-field": !!o }
|
|
84
113
|
),
|
|
85
|
-
onMouseEnter: () =>
|
|
86
|
-
onMouseLeave: () =>
|
|
114
|
+
onMouseEnter: () => F(!0),
|
|
115
|
+
onMouseLeave: () => F(!1),
|
|
87
116
|
children: [
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ l("div", { className:
|
|
90
|
-
/* @__PURE__ */
|
|
117
|
+
g && !b ? /* @__PURE__ */ r("div", { className: "w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5" }) : null,
|
|
118
|
+
/* @__PURE__ */ l("div", { className: a("flex flex-col w-full"), children: [
|
|
119
|
+
/* @__PURE__ */ r(
|
|
91
120
|
"label",
|
|
92
121
|
{
|
|
93
122
|
htmlFor: "text",
|
|
94
|
-
className: `text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${
|
|
123
|
+
className: `text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${X ? "" : "capitalize"} ${G || ""}`,
|
|
95
124
|
children: /* @__PURE__ */ l("div", { className: "grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-1", children: [
|
|
96
125
|
/* @__PURE__ */ l("div", { className: "inline-flex min-w-0 items-center gap-1 flex-wrap", children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
126
|
+
/* @__PURE__ */ r(we, { label: _ || "", required: w || !1, isRequiredConditional: M || !1 }),
|
|
127
|
+
ee && /* @__PURE__ */ r(
|
|
128
|
+
ge,
|
|
100
129
|
{
|
|
101
130
|
sx: {
|
|
102
131
|
fontSize: 16,
|
|
@@ -105,37 +134,38 @@ const Ie = ie(
|
|
|
105
134
|
}
|
|
106
135
|
}
|
|
107
136
|
),
|
|
108
|
-
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
N && /* @__PURE__ */
|
|
137
|
+
Y && !L(h) && /* @__PURE__ */ r(ye, {}),
|
|
138
|
+
/* @__PURE__ */ r(xe, { labels: U }),
|
|
139
|
+
N && /* @__PURE__ */ r(H, { placement: "top", title: N, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ r(Ce, { className: "w-icon-sm h-icon-sm" }) }) }),
|
|
140
|
+
q
|
|
111
141
|
] }),
|
|
112
142
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-1 justify-self-end", children: [
|
|
113
|
-
|
|
114
|
-
|
|
143
|
+
L(h) && c ? /* @__PURE__ */ r(
|
|
144
|
+
H,
|
|
115
145
|
{
|
|
116
146
|
placement: "top-end",
|
|
117
|
-
title:
|
|
118
|
-
hideTooltip:
|
|
147
|
+
title: k ?? "",
|
|
148
|
+
hideTooltip: k == null,
|
|
119
149
|
className: "cursor-pointer",
|
|
120
150
|
children: /* @__PURE__ */ l(
|
|
121
151
|
"div",
|
|
122
152
|
{
|
|
123
|
-
className:
|
|
153
|
+
className: a(
|
|
124
154
|
"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5",
|
|
125
|
-
|
|
155
|
+
Be(c)
|
|
126
156
|
),
|
|
127
|
-
onClick: () =>
|
|
157
|
+
onClick: () => T?.(Z),
|
|
128
158
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
159
|
+
/* @__PURE__ */ r(
|
|
160
|
+
Fe,
|
|
131
161
|
{
|
|
132
162
|
size: 12,
|
|
133
|
-
fill:
|
|
134
|
-
fillSecondary:
|
|
163
|
+
fill: Se(c),
|
|
164
|
+
fillSecondary: Ne(c)
|
|
135
165
|
}
|
|
136
166
|
),
|
|
137
|
-
/* @__PURE__ */ l("span", { className:
|
|
138
|
-
|
|
167
|
+
/* @__PURE__ */ l("span", { className: a("text-xs font-medium leading-4", Ee(c)), children: [
|
|
168
|
+
h,
|
|
139
169
|
"%"
|
|
140
170
|
] })
|
|
141
171
|
]
|
|
@@ -143,19 +173,19 @@ const Ie = ie(
|
|
|
143
173
|
)
|
|
144
174
|
}
|
|
145
175
|
) : null,
|
|
146
|
-
|
|
176
|
+
g && b && v ? /* @__PURE__ */ r(
|
|
147
177
|
"button",
|
|
148
178
|
{
|
|
149
179
|
id: "btn-dynamic-data-input-add-to-document",
|
|
150
180
|
className: "cursor-pointer",
|
|
151
|
-
onClick: () =>
|
|
181
|
+
onClick: () => de(d?.toString() || ""),
|
|
152
182
|
type: "button",
|
|
153
|
-
children: /* @__PURE__ */
|
|
154
|
-
|
|
183
|
+
children: /* @__PURE__ */ r(fe, { placement: "top", title: ae("Add to document"), children: /* @__PURE__ */ r(
|
|
184
|
+
he,
|
|
155
185
|
{
|
|
156
186
|
sx: {
|
|
157
187
|
fontSize: 16,
|
|
158
|
-
color:
|
|
188
|
+
color: re?.[600] || "var(--color-primary-600)"
|
|
159
189
|
}
|
|
160
190
|
}
|
|
161
191
|
) })
|
|
@@ -166,49 +196,49 @@ const Ie = ie(
|
|
|
166
196
|
}
|
|
167
197
|
),
|
|
168
198
|
/* @__PURE__ */ l("label", { className: "relative block mt-1", children: [
|
|
169
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ r(
|
|
170
200
|
"input",
|
|
171
201
|
{
|
|
172
|
-
id:
|
|
202
|
+
id: W,
|
|
173
203
|
ref: V,
|
|
174
|
-
required:
|
|
175
|
-
placeholder:
|
|
176
|
-
className:
|
|
177
|
-
onChange: (
|
|
178
|
-
|
|
204
|
+
required: w,
|
|
205
|
+
placeholder: O,
|
|
206
|
+
className: ce(),
|
|
207
|
+
onChange: (e) => {
|
|
208
|
+
f(e.target.value), u(e.target?.value);
|
|
179
209
|
},
|
|
180
|
-
onKeyDown:
|
|
181
|
-
value:
|
|
182
|
-
defaultValue:
|
|
210
|
+
onKeyDown: ie,
|
|
211
|
+
value: m !== null ? m : d,
|
|
212
|
+
defaultValue: J,
|
|
183
213
|
disabled: !0
|
|
184
214
|
}
|
|
185
215
|
),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
|
|
216
|
+
/* @__PURE__ */ r(
|
|
217
|
+
K,
|
|
188
218
|
{
|
|
189
219
|
id: "btn-dynamic-data-input-rx-cross",
|
|
190
|
-
onClick:
|
|
220
|
+
onClick: se,
|
|
191
221
|
className: "absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent",
|
|
192
222
|
variant: "ghost",
|
|
193
|
-
disabled:
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
-
|
|
223
|
+
disabled: E,
|
|
224
|
+
children: /* @__PURE__ */ r(
|
|
225
|
+
ke,
|
|
196
226
|
{
|
|
197
227
|
className: "text-neutral-900 dark:text-black-300 w-xs h-xs"
|
|
198
228
|
}
|
|
199
229
|
)
|
|
200
230
|
}
|
|
201
231
|
),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
|
|
232
|
+
/* @__PURE__ */ r(
|
|
233
|
+
K,
|
|
204
234
|
{
|
|
205
235
|
id: "btn-dynamic-data-input-ai-outline-pic-center",
|
|
206
|
-
onClick:
|
|
236
|
+
onClick: $,
|
|
207
237
|
className: "absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent",
|
|
208
238
|
variant: "ghost",
|
|
209
|
-
disabled:
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
-
|
|
239
|
+
disabled: E,
|
|
240
|
+
children: /* @__PURE__ */ r(
|
|
241
|
+
ve,
|
|
212
242
|
{
|
|
213
243
|
className: "text-neutral-900 dark:text-black-300 w-xs h-xs"
|
|
214
244
|
}
|
|
@@ -216,41 +246,41 @@ const Ie = ie(
|
|
|
216
246
|
}
|
|
217
247
|
)
|
|
218
248
|
] }),
|
|
219
|
-
|
|
220
|
-
|
|
249
|
+
o && /* @__PURE__ */ r(
|
|
250
|
+
be,
|
|
221
251
|
{
|
|
222
252
|
className: "text-error-500 mt-1",
|
|
223
253
|
appearance: "custom",
|
|
224
254
|
size: "extra-small",
|
|
225
255
|
variant: "medium",
|
|
226
|
-
children:
|
|
256
|
+
children: o
|
|
227
257
|
}
|
|
228
258
|
),
|
|
229
|
-
|
|
230
|
-
|
|
259
|
+
s && A && /* @__PURE__ */ r(
|
|
260
|
+
A,
|
|
231
261
|
{
|
|
232
|
-
isVisible:
|
|
233
|
-
onSelect: (
|
|
234
|
-
|
|
262
|
+
isVisible: s,
|
|
263
|
+
onSelect: (e) => {
|
|
264
|
+
f(e), u(e);
|
|
235
265
|
},
|
|
236
|
-
onClose:
|
|
237
|
-
dataKey:
|
|
238
|
-
dataSource:
|
|
266
|
+
onClose: $,
|
|
267
|
+
dataKey: Q,
|
|
268
|
+
dataSource: x
|
|
239
269
|
}
|
|
240
270
|
)
|
|
241
271
|
] }),
|
|
242
|
-
|
|
272
|
+
b && i && B && I && /* @__PURE__ */ r(
|
|
243
273
|
"div",
|
|
244
274
|
{
|
|
245
275
|
role: "tooltip",
|
|
246
276
|
tabIndex: 0,
|
|
247
277
|
className: "absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",
|
|
248
|
-
onClick: (
|
|
249
|
-
onMouseDown: (
|
|
250
|
-
onKeyDown: (
|
|
251
|
-
|
|
278
|
+
onClick: (e) => e.stopPropagation(),
|
|
279
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
280
|
+
onKeyDown: (e) => {
|
|
281
|
+
e.key === "Escape" && F(!1);
|
|
252
282
|
},
|
|
253
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ r(I, { riskDetails: i })
|
|
254
284
|
}
|
|
255
285
|
)
|
|
256
286
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicDataInputField.es.js","sources":["../../../../src/components/forms/dynamic-data-input/DynamicDataInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { useTranslation } from 'react-i18next';\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { BoltOutlined, CloseRounded, NoteAddOutlined, TableChartRounded } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport IconButton from \"../../button/IconButton\";\nimport { InputLabel } from \"../shared/InputLabel\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface for risk analysis integration\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props - generic to allow consumer-specific risk types\n */\nexport interface RiskDetailsCardProps<T = any> {\n riskDetails: T;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the DynamicDataModal component\n */\nexport interface DynamicDataModalProps {\n isVisible: boolean;\n onSelect: (data: string | number | readonly string[] | undefined) => void;\n onClose: () => void;\n dataKey: string;\n dataSource: string;\n}\n\n/**\n * Props for the DynamicDataInputField component\n */\nexport interface DynamicDataInputFieldProps {\n /** Unique identifier for the input */\n id: string;\n /** Label text to display above the input */\n label: string;\n /** Placeholder text for the input */\n placeholder?: string;\n /** Color for the input text */\n color?: string;\n /** Current value of the input */\n value: string | number | readonly string[] | undefined;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional (yellow instead of red) */\n isRequiredConditional?: boolean;\n /** Tags/labels to display next to the label */\n tags?: (string | LabelType)[];\n /** Error message to display below the input */\n errorMessage?: string;\n /** Default value for the input */\n defaultValue?: string | number | readonly string[] | undefined;\n /** Data source for dynamic data */\n dataSource: string;\n /** Data key for dynamic data */\n dataKey: string;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Whether this is a GTN (Global Term Name) field */\n isGTN?: boolean;\n /** GTN field name for document integration */\n gtnName?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: React.ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Callback function called when value changes */\n onChange: (value: string | number | readonly string[] | undefined) => void;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Primary color shades for styling */\n primaryColorShades?: Record<number, string>;\n /** Whether recording is active (for pilot context) */\n isRecording?: boolean;\n /** Whether playback is active (for pilot context) */\n isPlaying?: boolean;\n /** Callback to set disable actions state */\n setDisableActions?: (disabled: boolean) => void;\n /** Toast function for deprecated field warning */\n showDeprecatedFieldWarning?: () => void;\n /** Dynamic data modal component */\n DynamicDataModal?: React.ComponentType<DynamicDataModalProps>;\n}\n\n/**\n * A highly customizable dynamic data input component with label, validation, and styling support.\n * Features dynamic data modal integration, GTN support, risk analysis support,\n * and comprehensive prop support for various use cases.\n *\n * @example\n * ```tsx\n * <DynamicDataInputField\n * id=\"dynamic-field\"\n * label=\"Dynamic Field\"\n * value={fieldValue}\n * onChange={(value) => setFieldValue(value)}\n * dataSource=\"sourceTable\"\n * dataKey=\"fieldKey\"\n * required\n * />\n * ```\n */\nexport const DynamicDataInputField = forwardRef<\n HTMLInputElement,\n DynamicDataInputFieldProps\n>(\n (\n {\n id,\n label,\n placeholder,\n value,\n onChange,\n errorMessage,\n defaultValue,\n required = false,\n isRequiredConditional = false,\n dataSource,\n dataKey,\n tags,\n tooltip = \"\",\n originalCase = false,\n color = \"\",\n isGTN = false,\n gtnName,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n labelClassName,\n disabled = false,\n isLiveField = false,\n onAddGTNToDocument,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n primaryColorShades,\n isRecording: _isRecording = false,\n isPlaying: _isPlaying = false,\n setDisableActions,\n showDeprecatedFieldWarning,\n DynamicDataModal,\n },\n ref\n ) => {\n const { t } = useTranslation();\n const [isHovered, setIsHovered] = useState(false);\n const [inputValue, setInputValue] = useState<\n string | number | readonly string[] | undefined\n >(value);\n const [showDynamicDataModal, setShowDynamicDataModal] = useState(false);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Use forwarded ref or internal ref\n const combinedRef = (ref as React.RefObject<HTMLInputElement>) || inputRef;\n\n const toggleDynamicDataModal = () => {\n if (showDynamicDataModal) {\n setDisableActions?.(false);\n } else {\n setDisableActions?.(true);\n }\n setShowDynamicDataModal(!showDynamicDataModal);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.keyCode === 9 || event.key === \"Enter\") {\n const currentRef = combinedRef.current || inputRef.current;\n if (currentRef) {\n if (inputValue !== null) {\n onChange(inputValue);\n }\n setInputValue(inputValue);\n currentRef.blur();\n }\n }\n };\n\n const handleClear = () => {\n setInputValue(\"\");\n onChange(\"\");\n };\n\n const handleAddGTNToDocument = (_value: string) => {\n if (onAddGTNToDocument && gtnName) {\n const keyValuePair = {\n key: gtnName,\n value: _value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n const getClassName = (): string => {\n const baseClasses =\n \"border h-8 text-sm rounded-lg block w-full p-2.5 font-inter font-medium\";\n const borderColor = errorMessage\n ? \"border-red-300\"\n : isRiskAnalysisOpen && riskDetails?.color\n ? `border-${riskDetails?.color}-300`\n : \"border-gray-300 dark:border-black-600\";\n const placeholderColor = `placeholder:text-neutral-900 dark:placeholder:text-black-400`;\n const backgroundColor = `${\n isRiskAnalysisOpen && riskDetails?.color\n ? `bg-${riskDetails?.color}-50`\n : \"bg-gray-200 dark:bg-black-600 \"\n } ${color ? color : \"text-neutral-900 dark:text-black-200\"}`;\n\n return `${baseClasses} ${borderColor} ${backgroundColor} ${placeholderColor}`;\n };\n\n useEffect(() => {\n if (showDynamicDataModal && !dataSource) {\n showDeprecatedFieldWarning?.();\n setShowDynamicDataModal(false);\n }\n }, [showDynamicDataModal, dataSource, showDeprecatedFieldWarning]);\n\n // Sync inputValue with value prop\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n return (\n <div\n className={cn(\n `flex gap-0.5 w-full relative`,\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1\"\n : \"\",\n { \"error-field\": !!errorMessage }\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n\n <div className={cn(`flex flex-col w-full`)}>\n <label\n htmlFor=\"text\"\n className={`text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${\n !originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"\"}`}\n >\n <div className=\"grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-1\">\n <div className=\"inline-flex min-w-0 items-center gap-1 flex-wrap\">\n <InputLabel label={label || \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <Tooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon className=\"w-icon-sm h-icon-sm\" />\n </div>\n </Tooltip>\n )}\n </div>\n\n <div className=\"flex items-center gap-1 justify-self-end\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip ?? \"\"}\n hideTooltip={confidenceTooltip === undefined || confidenceTooltip === null}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span className={cn(\"text-xs font-medium leading-4\", getConfidenceScoreBadgeTextColor(confidenceType))}>\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id=\"btn-dynamic-data-input-add-to-document\"\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(value?.toString() || \"\")}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n sx={{\n fontSize: 16,\n color:\n primaryColorShades?.[600] || \"var(--color-primary-600)\",\n }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n <label className=\"relative block mt-1\">\n <input\n id={id}\n ref={combinedRef}\n required={required}\n placeholder={placeholder}\n className={getClassName()}\n onChange={(e) => {\n onChange(e.target.value);\n setInputValue(e.target?.value);\n }}\n onKeyDown={handleKeyDown}\n value={inputValue !== null ? inputValue : value}\n defaultValue={defaultValue}\n disabled={true}\n />\n\n <IconButton\n id={`btn-dynamic-data-input-rx-cross`}\n onClick={handleClear}\n className=\"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent\"\n variant=\"ghost\"\n disabled={disabled}\n >\n <CloseRounded\n className=\"text-neutral-900 dark:text-black-300 w-xs h-xs\"\n />\n </IconButton>\n\n <IconButton\n id={`btn-dynamic-data-input-ai-outline-pic-center`}\n onClick={toggleDynamicDataModal}\n className=\"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent\"\n variant=\"ghost\"\n disabled={disabled}\n >\n <TableChartRounded\n className=\"text-neutral-900 dark:text-black-300 w-xs h-xs\"\n />\n </IconButton>\n </label>\n\n {errorMessage && (\n <Typography\n className=\"text-error-500 mt-1\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n )}\n\n {showDynamicDataModal && DynamicDataModal && (\n <DynamicDataModal\n isVisible={showDynamicDataModal}\n onSelect={(data) => {\n onChange(data);\n setInputValue(data);\n }}\n onClose={toggleDynamicDataModal}\n dataKey={dataKey}\n dataSource={dataSource}\n />\n )}\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nDynamicDataInputField.displayName = \"DynamicDataInputField\";\n\n"],"names":["DynamicDataInputField","forwardRef","id","label","placeholder","value","onChange","errorMessage","defaultValue","required","isRequiredConditional","dataSource","dataKey","tags","tooltip","originalCase","color","isGTN","gtnName","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","labelClassName","disabled","isLiveField","onAddGTNToDocument","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","primaryColorShades","_isRecording","_isPlaying","setDisableActions","showDeprecatedFieldWarning","DynamicDataModal","ref","t","useTranslation","isHovered","setIsHovered","useState","inputValue","setInputValue","showDynamicDataModal","setShowDynamicDataModal","inputRef","useRef","combinedRef","toggleDynamicDataModal","handleKeyDown","event","currentRef","handleClear","handleAddGTNToDocument","_value","getClassName","baseClasses","borderColor","placeholderColor","backgroundColor","useEffect","jsxs","cn","jsx","InputLabel","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","Tooltip","HelpIcon","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","AntTooltip","NoteAddOutlined","e","IconButton","CloseRounded","TableChartRounded","Typography","data"],"mappings":";;;;;;;;;;;;;;;AA8KO,MAAMA,KAAwBC;AAAA,EAInC,CACE;AAAA,IACE,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,uBAAAC,IAAwB;AAAA,IACxB,YAAAC;AAAA,IACA,SAAAC;AAAA,IAC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ACA,MAAMA,EAAE,eAAA;AAAA,cACtB,WAAW,CAACA,MAAM;AAChB,gBAAIA,EAAE,QAAQ,YACZvC,EAAa,EAAK;AAAA,cAEtB;AAAA,cAEA,UAAA,gBAAAwB,EAACnC,KAAgB,aAAAF,EAAA,CAA0B;AAAA,YAAA;AAAA,UAAA;AAAA,QAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,EAIV;AACF;AAEA7B,GAAsB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"DynamicDataInputField.es.js","sources":["../../../../src/components/forms/dynamic-data-input/DynamicDataInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { useTranslation } from 'react-i18next';\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { BoltOutlined, CloseRounded, NoteAddOutlined, TableChartRounded } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport IconButton from \"../../button/IconButton\";\nimport { InputLabel } from \"../shared/InputLabel\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface for risk analysis integration\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props - generic to allow consumer-specific risk types\n */\nexport interface RiskDetailsCardProps<T = any> {\n riskDetails: T;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/** Visual emphasis for the input surface (background + border) */\nexport type DynamicDataInputFieldEmphasis =\n | \"default\"\n | \"modified\"\n | \"deleted\"\n | \"success\";\n\n/**\n * Props for the DynamicDataModal component\n */\nexport interface DynamicDataModalProps {\n isVisible: boolean;\n onSelect: (data: string | number | readonly string[] | undefined) => void;\n onClose: () => void;\n dataKey: string;\n dataSource: string;\n}\n\n/**\n * Props for the DynamicDataInputField component\n */\nexport interface DynamicDataInputFieldProps {\n /** Unique identifier for the input */\n id: string;\n /** Label text to display above the input */\n label: string;\n /** Optional extra content in the label row (e.g. actions, badges) */\n labelExtra?: React.ReactNode;\n /** Placeholder text for the input */\n placeholder?: string;\n /** Color for the input text */\n color?: string;\n /** Current value of the input */\n value: string | number | readonly string[] | undefined;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional (yellow instead of red) */\n isRequiredConditional?: boolean;\n /** Tags/labels to display next to the label */\n tags?: (string | LabelType)[];\n /** Error message to display below the input */\n errorMessage?: string;\n /** Default value for the input */\n defaultValue?: string | number | readonly string[] | undefined;\n /** Data source for dynamic data */\n dataSource: string;\n /** Data key for dynamic data */\n dataKey: string;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Whether this is a GTN (Global Term Name) field */\n isGTN?: boolean;\n /** GTN field name for document integration */\n gtnName?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: React.ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Callback function called when value changes */\n onChange: (value: string | number | readonly string[] | undefined) => void;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Primary color shades for styling */\n primaryColorShades?: Record<number, string>;\n /** Whether recording is active (for pilot context) */\n isRecording?: boolean;\n /** Whether playback is active (for pilot context) */\n isPlaying?: boolean;\n /** Callback to set disable actions state */\n setDisableActions?: (disabled: boolean) => void;\n /** Toast function for deprecated field warning */\n showDeprecatedFieldWarning?: () => void;\n /** Dynamic data modal component */\n DynamicDataModal?: React.ComponentType<DynamicDataModalProps>;\n /** Input surface style: `'modified'` — `--Warning-50` / `--Warning-200`; `'deleted'` — `--Error-50` / `--Error-200`, text `#475467`; `'success'` — `--Success-50` / `--Success-200`, text `#101828`. */\n inputEmphasis?: DynamicDataInputFieldEmphasis;\n}\n\n/**\n * A highly customizable dynamic data input component with label, validation, and styling support.\n * Features dynamic data modal integration, GTN support, risk analysis support,\n * and comprehensive prop support for various use cases.\n *\n * @example\n * ```tsx\n * <DynamicDataInputField\n * id=\"dynamic-field\"\n * label=\"Dynamic Field\"\n * value={fieldValue}\n * onChange={(value) => setFieldValue(value)}\n * dataSource=\"sourceTable\"\n * dataKey=\"fieldKey\"\n * required\n * />\n * ```\n */\nexport const DynamicDataInputField = forwardRef<\n HTMLInputElement,\n DynamicDataInputFieldProps\n>(\n (\n {\n id,\n label,\n labelExtra,\n placeholder,\n value,\n onChange,\n errorMessage,\n defaultValue,\n required = false,\n isRequiredConditional = false,\n dataSource,\n dataKey,\n tags,\n tooltip = \"\",\n originalCase = false,\n color = \"\",\n isGTN = false,\n gtnName,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n labelClassName,\n disabled = false,\n isLiveField = false,\n onAddGTNToDocument,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n primaryColorShades,\n isRecording: _isRecording = false,\n isPlaying: _isPlaying = false,\n setDisableActions,\n showDeprecatedFieldWarning,\n DynamicDataModal,\n inputEmphasis = \"default\",\n },\n ref\n ) => {\n const { t } = useTranslation();\n const showRiskSkin = Boolean(isRiskAnalysisOpen && riskDetails?.color);\n const emphasisModifiedSkin =\n inputEmphasis === \"modified\" && !errorMessage && !showRiskSkin;\n const emphasisDeletedSkin =\n inputEmphasis === \"deleted\" && !errorMessage && !showRiskSkin;\n const emphasisSuccessSkin =\n inputEmphasis === \"success\" && !errorMessage && !showRiskSkin;\n const [isHovered, setIsHovered] = useState(false);\n const [inputValue, setInputValue] = useState<\n string | number | readonly string[] | undefined\n >(value);\n const [showDynamicDataModal, setShowDynamicDataModal] = useState(false);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Use forwarded ref or internal ref\n const combinedRef = (ref as React.RefObject<HTMLInputElement>) || inputRef;\n\n const toggleDynamicDataModal = () => {\n if (showDynamicDataModal) {\n setDisableActions?.(false);\n } else {\n setDisableActions?.(true);\n }\n setShowDynamicDataModal(!showDynamicDataModal);\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.keyCode === 9 || event.key === \"Enter\") {\n const currentRef = combinedRef.current || inputRef.current;\n if (currentRef) {\n if (inputValue !== null) {\n onChange(inputValue);\n }\n setInputValue(inputValue);\n currentRef.blur();\n }\n }\n };\n\n const handleClear = () => {\n setInputValue(\"\");\n onChange(\"\");\n };\n\n const handleAddGTNToDocument = (_value: string) => {\n if (onAddGTNToDocument && gtnName) {\n const keyValuePair = {\n key: gtnName,\n value: _value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n const getClassName = (): string => {\n const baseClasses =\n \"border h-8 text-sm rounded-lg block w-full p-2.5 font-inter font-medium\";\n const placeholderColor = `placeholder:text-neutral-900 dark:placeholder:text-black-400`;\n\n if (errorMessage) {\n return cn(\n baseClasses,\n placeholderColor,\n \"border-red-300 bg-gray-200 dark:border-black-600 dark:bg-black-600\",\n color ? color : \"text-neutral-900 dark:text-black-200\"\n );\n }\n if (showRiskSkin && riskDetails?.color) {\n return cn(\n baseClasses,\n placeholderColor,\n `border-${riskDetails.color}-300 bg-${riskDetails.color}-50`,\n color ? color : \"text-neutral-900 dark:text-black-200\"\n );\n }\n if (emphasisDeletedSkin) {\n return cn(\n baseClasses,\n placeholderColor,\n \"border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467]\"\n );\n }\n if (emphasisModifiedSkin) {\n return cn(\n baseClasses,\n placeholderColor,\n \"border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)]\"\n );\n }\n if (emphasisSuccessSkin) {\n return cn(\n baseClasses,\n placeholderColor,\n \"border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828]\"\n );\n }\n\n return cn(\n baseClasses,\n placeholderColor,\n \"border-gray-300 bg-gray-200 dark:border-black-600 dark:bg-black-600\",\n color ? color : \"text-neutral-900 dark:text-black-200\"\n );\n };\n\n useEffect(() => {\n if (showDynamicDataModal && !dataSource) {\n showDeprecatedFieldWarning?.();\n setShowDynamicDataModal(false);\n }\n }, [showDynamicDataModal, dataSource, showDeprecatedFieldWarning]);\n\n // Sync inputValue with value prop\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n return (\n <div\n className={cn(\n `flex gap-0.5 w-full relative`,\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1\"\n : \"\",\n { \"error-field\": !!errorMessage }\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n\n <div className={cn(`flex flex-col w-full`)}>\n <label\n htmlFor=\"text\"\n className={`text-xs font-medium text-gray-600 inline-flex items-center gap-1 ${\n !originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"\"}`}\n >\n <div className=\"grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-1\">\n <div className=\"inline-flex min-w-0 items-center gap-1 flex-wrap\">\n <InputLabel label={label || \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <Tooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon className=\"w-icon-sm h-icon-sm\" />\n </div>\n </Tooltip>\n )}\n {labelExtra}\n </div>\n\n <div className=\"flex items-center gap-1 justify-self-end\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip ?? \"\"}\n hideTooltip={confidenceTooltip === undefined || confidenceTooltip === null}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span className={cn(\"text-xs font-medium leading-4\", getConfidenceScoreBadgeTextColor(confidenceType))}>\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id=\"btn-dynamic-data-input-add-to-document\"\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(value?.toString() || \"\")}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n sx={{\n fontSize: 16,\n color:\n primaryColorShades?.[600] || \"var(--color-primary-600)\",\n }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n <label className=\"relative block mt-1\">\n <input\n id={id}\n ref={combinedRef}\n required={required}\n placeholder={placeholder}\n className={getClassName()}\n onChange={(e) => {\n onChange(e.target.value);\n setInputValue(e.target?.value);\n }}\n onKeyDown={handleKeyDown}\n value={inputValue !== null ? inputValue : value}\n defaultValue={defaultValue}\n disabled={true}\n />\n\n <IconButton\n id={`btn-dynamic-data-input-rx-cross`}\n onClick={handleClear}\n className=\"absolute inset-y-0 right-1 flex items-center px-2 focus:border-transparent\"\n variant=\"ghost\"\n disabled={disabled}\n >\n <CloseRounded\n className=\"text-neutral-900 dark:text-black-300 w-xs h-xs\"\n />\n </IconButton>\n\n <IconButton\n id={`btn-dynamic-data-input-ai-outline-pic-center`}\n onClick={toggleDynamicDataModal}\n className=\"absolute inset-y-0 right-8 flex items-center px-2 focus:border-transparent\"\n variant=\"ghost\"\n disabled={disabled}\n >\n <TableChartRounded\n className=\"text-neutral-900 dark:text-black-300 w-xs h-xs\"\n />\n </IconButton>\n </label>\n\n {errorMessage && (\n <Typography\n className=\"text-error-500 mt-1\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n )}\n\n {showDynamicDataModal && DynamicDataModal && (\n <DynamicDataModal\n isVisible={showDynamicDataModal}\n onSelect={(data) => {\n onChange(data);\n setInputValue(data);\n }}\n onClose={toggleDynamicDataModal}\n dataKey={dataKey}\n dataSource={dataSource}\n />\n )}\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nDynamicDataInputField.displayName = \"DynamicDataInputField\";\n\n"],"names":["DynamicDataInputField","forwardRef","id","label","labelExtra","placeholder","value","onChange","errorMessage","defaultValue","required","isRequiredConditional","dataSource","dataKey","tags","tooltip","originalCase","color","isGTN","gtnName","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","labelClassName","disabled","isLiveField","onAddGTNToDocument","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","primaryColorShades","_isRecording","_isPlaying","setDisableActions","showDeprecatedFieldWarning","DynamicDataModal","inputEmphasis","ref","t","useTranslation","showRiskSkin","emphasisModifiedSkin","emphasisDeletedSkin","emphasisSuccessSkin","isHovered","setIsHovered","useState","inputValue","setInputValue","showDynamicDataModal","setShowDynamicDataModal","inputRef","useRef","combinedRef","toggleDynamicDataModal","handleKeyDown","event","currentRef","handleClear","handleAddGTNToDocument","_value","getClassName","baseClasses","placeholderColor","cn","useEffect","jsxs","jsx","InputLabel","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","Tooltip","HelpIcon","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","AntTooltip","NoteAddOutlined","IconButton","CloseRounded","TableChartRounded","Typography","data"],"mappings":";;;;;;;;;;;;;;;AAyLO,MAAMA,KAAwBC;AAAA,EAInC,CACE;AAAA,IACE,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,uBAAAC,IAAwB;AAAA,IACxB,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,cAAAC,IAAe;AAAA,IACf,OAAAC,IAAQ;AAAA,IACR,OAAAC,IAAQ;AAAA,IACR,SAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,iBAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,mBAAAC;AAAA,IACA,YAAAC,IAAa,CAAA;AAAA,IACb,wBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,aAAAC,KAAc;AAAA,IACd,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,iBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAaC,KAAe;AAAA,IAC5B,WAAWC,KAAa;AAAA,IACxB,mBAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,EAAA,GAElBC,OACG;AACH,UAAM,EAAE,GAAAC,GAAA,IAAMC,GAAA,GACRC,IAAe,GAAQZ,KAAsBD,GAAa,QAC1Dc,KACJL,MAAkB,cAAc,CAAC/B,KAAgB,CAACmC,GAC9CE,KACJN,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c;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../../_virtual/index.cjs.js");require("react");const q=require("react-i18next"),m=require("../base-input-field/BaseInputField.cjs.js"),r=require("../../icon/icons.generated.cjs.js"),p="[&_input]:!border-0 [&_input]:!shadow-none [&_input]:!rounded-none [&_input]:!bg-transparent [&_input]:!h-8 [&_input]:!pl-1",k=({urlId:g,urlValue:n,onUrlChange:j,urlPlaceholder:c,urlError:t,urlClassName:b,onUrlBlur:v,aliasId:N,aliasValue:s,onAliasChange:f,aliasPlaceholder:o,aliasError:i,aliasClassName:y,aliasFixedWidth:I,disabled:d=!1,label:x,withBorder:a=!1,readOnly:w=!1})=>{const{t:h}=q.useTranslation(),F=c===void 0?h("Enter URL"):c,_=o===void 0?h("Enter Alias"):o,u=!!t||!!i;return w?e.jsxs("div",{className:"w-full",children:[x,e.jsxs("div",{className:"flex items-center gap-2 min-h-9",children:[e.jsx(r.KeychainIcon,{className:"text-black-300 shrink-0 w-icon h-icon"}),n?e.jsxs(e.Fragment,{children:[e.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 dark:text-primary-400 hover:underline text-sm truncate",children:s||n}),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-4 w-px bg-neutral-300 dark:bg-grey-800 shrink-0"}),e.jsx(r.MentionIcon,{className:"text-black-300 shrink-0 w-icon h-icon"}),e.jsx("span",{className:"text-neutral-500 dark:text-neutral-400 text-sm shrink-0",children:s})]}):null]}):e.jsx("span",{className:"text-neutral-400 dark:text-neutral-600 text-sm",children:"—"})]})]}):e.jsxs("div",{className:"w-full",children:[x,e.jsxs("div",{className:l("flex items-center h-9 overflow-hidden",{"border rounded-lg bg-white dark:bg-black-700":a,"border-error-500":a&&u,"border-gray-300 dark:border-black-500":a&&!u}),children:[e.jsx(r.KeychainIcon,{className:"ml-2 text-black-300 shrink-0 w-icon h-icon"}),e.jsx("div",{className:l("min-w-0 flex-1",p,b),children:e.jsx(m.BaseInputField,{id:g,originalCase:!0,type:"url",value:n,onChange:j,placeholder:F??"",disabled:d,onBlur:v,errorMessage:""})}),e.jsx("div",{className:"h-full w-px bg-neutral-300 dark:bg-grey-800 shrink-0"}),e.jsx(r.MentionIcon,{className:"ml-2 text-black-300 shrink-0 w-icon h-icon"}),e.jsx("div",{className:l("shrink-0",p,I,y),children:e.jsx(m.BaseInputField,{id:N,originalCase:!0,type:"text",value:s,onChange:f,placeholder:_??"",disabled:d,errorMessage:""})})]}),t?e.jsx("p",{className:"text-error-500 text-xs mt-1",children:t}):null,i?e.jsx("p",{className:"text-error-500 text-xs mt-1",children:i}):null]})};k.displayName="LinkInputField";exports.LinkInputField=k;
|
|
2
|
+
//# sourceMappingURL=LinkInputField.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkInputField.cjs.js","sources":["../../../../src/components/forms/link-input/LinkInputField.tsx"],"sourcesContent":["import cn from \"classnames\";\nimport { type FC, type ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { BaseInputField } from \"../base-input-field/BaseInputField\";\nimport { KeychainIcon, MentionIcon } from \"../../icon\";\n\nexport interface LinkInputFieldProps {\n /** Unique identifier for the URL input */\n urlId?: string;\n /** Current URL value */\n urlValue: string;\n /** Callback fired when the URL value changes */\n onUrlChange: (value: string) => void;\n /** Placeholder text for the URL input */\n urlPlaceholder?: string | null;\n /** Error message for the URL input */\n urlError?: string;\n /** Additional CSS classes for the URL input wrapper */\n urlClassName?: string;\n /** Callback fired when the URL input loses focus */\n onUrlBlur?: () => void;\n\n /** Unique identifier for the alias input */\n aliasId?: string;\n /** Current alias value */\n aliasValue: string;\n /** Callback fired when the alias value changes */\n onAliasChange: (value: string) => void;\n /** Placeholder text for the alias input */\n aliasPlaceholder?: string | null;\n /** Error message for the alias input */\n aliasError?: string;\n /** Additional CSS classes for the alias input wrapper */\n aliasClassName?: string;\n /** Tailwind width class for the alias column e.g. `'w-[140px]'`. Omit for natural width. */\n aliasFixedWidth?: string;\n\n /** Whether both inputs are disabled */\n disabled?: boolean;\n /** Optional label rendered above the input row */\n label?: ReactNode;\n /** Wrap the edit row in a bordered container (useful for standalone field usage) */\n withBorder?: boolean;\n /**\n * Render a read-only link view instead of inputs.\n * Use when the field is disabled and anchor links are preferred over inputs.\n */\n readOnly?: boolean;\n}\n\nconst inputOverrides =\n \"[&_input]:!border-0 [&_input]:!shadow-none [&_input]:!rounded-none [&_input]:!bg-transparent [&_input]:!h-8 [&_input]:!pl-1\";\n\n/**\n * A combined URL + alias input field rendered as a single bordered row.\n * Supports a read-only anchor-link view, optional label, error messages per sub-field,\n * and a fixed-width alias column.\n *\n * @example\n * ```tsx\n * <LinkInputField\n * urlValue={url}\n * onUrlChange={setUrl}\n * aliasValue={alias}\n * onAliasChange={setAlias}\n * withBorder\n * />\n * ```\n */\nexport const LinkInputField: FC<LinkInputFieldProps> = ({\n urlId,\n urlValue,\n onUrlChange,\n urlPlaceholder,\n urlError,\n urlClassName,\n onUrlBlur,\n aliasId,\n aliasValue,\n onAliasChange,\n aliasPlaceholder,\n aliasError,\n aliasClassName,\n aliasFixedWidth,\n disabled = false,\n label,\n withBorder = false,\n readOnly = false,\n}) => {\n const { t } = useTranslation();\n\n const resolvedUrlPlaceholder =\n urlPlaceholder === undefined ? t(\"Enter URL\") : urlPlaceholder;\n const resolvedAliasPlaceholder =\n aliasPlaceholder === undefined ? t(\"Enter Alias\") : aliasPlaceholder;\n const hasAnyError = !!urlError || !!aliasError;\n\n if (readOnly) {\n return (\n <div className=\"w-full\">\n {label}\n <div className=\"flex items-center gap-2 min-h-9\">\n <KeychainIcon className=\"text-black-300 shrink-0 w-icon h-icon\" />\n {urlValue ? (\n <>\n <a\n href={urlValue}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-primary-600 dark:text-primary-400 hover:underline text-sm truncate\"\n >\n {aliasValue || urlValue}\n </a>\n {aliasValue ? (\n <>\n <div className=\"h-4 w-px bg-neutral-300 dark:bg-grey-800 shrink-0\" />\n <MentionIcon className=\"text-black-300 shrink-0 w-icon h-icon\" />\n <span className=\"text-neutral-500 dark:text-neutral-400 text-sm shrink-0\">\n {aliasValue}\n </span>\n </>\n ) : null}\n </>\n ) : (\n <span className=\"text-neutral-400 dark:text-neutral-600 text-sm\">\n —\n </span>\n )}\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"w-full\">\n {label}\n <div\n className={cn(\"flex items-center h-9 overflow-hidden\", {\n \"border rounded-lg bg-white dark:bg-black-700\": withBorder,\n \"border-error-500\": withBorder && hasAnyError,\n \"border-gray-300 dark:border-black-500\": withBorder && !hasAnyError,\n })}\n >\n <KeychainIcon className=\"ml-2 text-black-300 shrink-0 w-icon h-icon\" />\n <div className={cn(\"min-w-0 flex-1\", inputOverrides, urlClassName)}>\n <BaseInputField\n id={urlId}\n originalCase\n type=\"url\"\n value={urlValue}\n onChange={onUrlChange}\n placeholder={resolvedUrlPlaceholder ?? \"\"}\n disabled={disabled}\n onBlur={onUrlBlur}\n errorMessage=\"\"\n />\n </div>\n <div className=\"h-full w-px bg-neutral-300 dark:bg-grey-800 shrink-0\" />\n <MentionIcon className=\"ml-2 text-black-300 shrink-0 w-icon h-icon\" />\n <div className={cn(\"shrink-0\", inputOverrides, aliasFixedWidth, aliasClassName)}>\n <BaseInputField\n id={aliasId}\n originalCase\n type=\"text\"\n value={aliasValue}\n onChange={onAliasChange}\n placeholder={resolvedAliasPlaceholder ?? \"\"}\n disabled={disabled}\n errorMessage=\"\"\n />\n </div>\n </div>\n {urlError ? (\n <p className=\"text-error-500 text-xs mt-1\">{urlError}</p>\n ) : null}\n {aliasError ? (\n <p className=\"text-error-500 text-xs mt-1\">{aliasError}</p>\n ) : null}\n </div>\n );\n};\n\nLinkInputField.displayName = \"LinkInputField\";\n"],"names":["inputOverrides","LinkInputField","urlId","urlValue","onUrlChange","urlPlaceholder","urlError","urlClassName","onUrlBlur","aliasId","aliasValue","onAliasChange","aliasPlaceholder","aliasError","aliasClassName","aliasFixedWidth","disabled","label","withBorder","readOnly","t","useTranslation","resolvedUrlPlaceholder","resolvedAliasPlaceholder","hasAnyError","jsxs","jsx","KeychainIcon","Fragment","MentionIcon","cn","BaseInputField"],"mappings":"yTAkDMA,EACJ,8HAkBWC,EAA0C,CAAC,CACtD,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,eAAAC,EACA,SAAAC,EACA,aAAAC,EACA,UAAAC,EACA,QAAAC,EACA,WAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,WAAAC,EACA,eAAAC,EACA,gBAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EACA,WAAAC,EAAa,GACb,SAAAC,EAAW,EACb,IAAM,CACJ,KAAM,CAAE,EAAAC,CAAA,EAAMC,iBAAA,EAERC,EACJjB,IAAmB,OAAYe,EAAE,WAAW,EAAIf,EAC5CkB,EACJX,IAAqB,OAAYQ,EAAE,aAAa,EAAIR,EAChDY,EAAc,CAAC,CAAClB,GAAY,CAAC,CAACO,EAEpC,OAAIM,EAEAM,EAAAA,KAAC,MAAA,CAAI,UAAU,SACZ,SAAA,CAAAR,EACDQ,EAAAA,KAAC,MAAA,CAAI,UAAU,kCACb,SAAA,CAAAC,EAAAA,IAACC,EAAAA,aAAA,CAAa,UAAU,uCAAA,CAAwC,EAC/DxB,EACCsB,EAAAA,KAAAG,WAAA,CACE,SAAA,CAAAF,EAAAA,IAAC,IAAA,CACC,KAAMvB,EACN,OAAO,SACP,IAAI,sBACJ,UAAU,0EAET,SAAAO,GAAcP,CAAA,CAAA,EAEhBO,EACCe,EAAAA,KAAAG,WAAA,CACE,SAAA,CAAAF,EAAAA,IAAC,MAAA,CAAI,UAAU,mDAAA,CAAoD,EACnEA,EAAAA,IAACG,EAAAA,YAAA,CAAY,UAAU,uCAAA,CAAwC,EAC/DH,EAAAA,IAAC,OAAA,CAAK,UAAU,0DACb,S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