@inkeep/cxkit-primitives 0.5.5 → 0.5.8
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/atoms/api/analytics/events.cjs +1 -1
- package/dist/atoms/api/analytics/events.js +2 -2
- package/dist/components/embedded-chat/use-chat-action.cjs +1 -1
- package/dist/components/embedded-chat/use-chat-action.js +14 -16
- package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
- package/dist/components/embedded-chat/use-inkeep-chat.js +122 -128
- package/dist/components/embedded-chat.cjs +5 -5
- package/dist/components/embedded-chat.d.cts +9 -8
- package/dist/components/embedded-chat.d.ts +9 -8
- package/dist/components/embedded-chat.js +952 -963
- package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
- package/dist/components/embedded-search/use-inkeep-search.js +10 -10
- package/dist/components/embedded-search.d.cts +2 -2
- package/dist/components/embedded-search.d.ts +2 -2
- package/dist/components/embedded-search.js +79 -79
- package/dist/components/intelligent-form/intelligent-form-provider.cjs +1 -1
- package/dist/components/intelligent-form/intelligent-form-provider.d.cts +3 -3
- package/dist/components/intelligent-form/intelligent-form-provider.d.ts +3 -3
- package/dist/components/intelligent-form/intelligent-form-provider.js +2 -2
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.cjs +1 -1
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.cts +5 -5
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.d.ts +5 -5
- package/dist/components/intelligent-form/use-inkeep-intelligent-form.js +88 -109
- package/dist/components/intelligent-form.cjs +1 -1
- package/dist/components/intelligent-form.d.cts +4 -3
- package/dist/components/intelligent-form.d.ts +4 -3
- package/dist/components/intelligent-form.js +191 -188
- package/dist/components/modal.cjs +1 -1
- package/dist/components/modal.d.cts +1 -1
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/modal.js +26 -26
- package/dist/providers/base-events-provider.cjs +1 -1
- package/dist/providers/base-events-provider.js +1 -1
- package/dist/providers/chat-events-provider.cjs +1 -1
- package/dist/providers/chat-events-provider.d.cts +9 -1
- package/dist/providers/chat-events-provider.d.ts +9 -1
- package/dist/providers/chat-events-provider.js +54 -57
- package/dist/providers/chat-form-provider.cjs +1 -1
- package/dist/providers/chat-form-provider.d.cts +3 -3
- package/dist/providers/chat-form-provider.d.ts +3 -3
- package/dist/providers/chat-form-provider.js +17 -17
- package/dist/providers/feedback-provider.cjs +1 -1
- package/dist/providers/feedback-provider.js +23 -23
- package/dist/utils/default-settings.cjs +1 -1
- package/dist/utils/default-settings.d.cts +1 -0
- package/dist/utils/default-settings.d.ts +1 -0
- package/dist/utils/default-settings.js +13 -11
- package/dist/utils/misc.cjs +1 -1
- package/dist/utils/misc.d.cts +2 -2
- package/dist/utils/misc.d.ts +2 -2
- package/dist/utils/misc.js +15 -13
- package/package.json +5 -4
- package/dist/atoms/dialog.cjs +0 -1
- package/dist/atoms/dialog.js +0 -185
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { ikp as t } from "./factory.js";
|
|
4
|
-
import { forwardRef as
|
|
4
|
+
import { forwardRef as P, useRef as h, useEffect as C } from "react";
|
|
5
5
|
import w from "react-textarea-autosize";
|
|
6
6
|
import * as u from "@radix-ui/react-select";
|
|
7
7
|
import * as R from "@radix-ui/react-checkbox";
|
|
8
8
|
import { useIntelligentForm as s } from "./intelligent-form/intelligent-form-provider.js";
|
|
9
|
-
import { IntelligentFormProvider as
|
|
9
|
+
import { IntelligentFormProvider as Li } from "./intelligent-form/intelligent-form-provider.js";
|
|
10
10
|
import * as v from "@radix-ui/react-scroll-area";
|
|
11
11
|
import { BuiltInIconRenderer as S } from "../atoms/icons/built-in-icon-renderer.js";
|
|
12
12
|
import { maybeRender as b, dataAttr as a } from "../utils/misc.js";
|
|
@@ -21,19 +21,19 @@ import { useComposedRefs as I } from "../utils/compose-refs.js";
|
|
|
21
21
|
import { composeEventHandlers as F } from "../utils/compose-event-handlers.js";
|
|
22
22
|
const q = t("form", {
|
|
23
23
|
_id: "intelligentForm__Root"
|
|
24
|
-
}),
|
|
24
|
+
}), Ae = (i) => {
|
|
25
25
|
const { onSubmit: e, ...n } = i, { handleSubmit: r } = s();
|
|
26
26
|
return /* @__PURE__ */ o(q, { onSubmit: F(e, r), ...n });
|
|
27
|
-
},
|
|
27
|
+
}, Le = t("h2", {
|
|
28
28
|
_id: "intelligentForm__Heading",
|
|
29
29
|
children: "Contact Support"
|
|
30
|
-
}),
|
|
30
|
+
}), Ve = t("div", {
|
|
31
31
|
_id: "intelligentForm__Content"
|
|
32
|
-
}),
|
|
32
|
+
}), He = t(v.Root, {
|
|
33
33
|
_id: "intelligentForm__Content__ScrollArea"
|
|
34
34
|
}), M = t(v.Viewport, {
|
|
35
35
|
_id: "intelligentForm__Content__ScrollAreaViewport"
|
|
36
|
-
}),
|
|
36
|
+
}), Ee = (i) => {
|
|
37
37
|
const { children: e, ...n } = i;
|
|
38
38
|
return /* @__PURE__ */ o(
|
|
39
39
|
M,
|
|
@@ -45,28 +45,28 @@ const q = t("form", {
|
|
|
45
45
|
...n
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
},
|
|
48
|
+
}, De = t(
|
|
49
49
|
v.ScrollAreaScrollbar,
|
|
50
50
|
{
|
|
51
51
|
_id: "intelligentForm__Content__ScrollAreaScrollbar"
|
|
52
52
|
}
|
|
53
|
-
),
|
|
53
|
+
), Ne = t(
|
|
54
54
|
v.ScrollAreaThumb,
|
|
55
55
|
{
|
|
56
56
|
_id: "intelligentForm__Content__ScrollAreaThumb"
|
|
57
57
|
}
|
|
58
|
-
),
|
|
58
|
+
), qe = t(v.Corner, {
|
|
59
59
|
_id: "intelligentForm__Content__ScrollAreaCorner"
|
|
60
60
|
}), z = t("div", {
|
|
61
61
|
_id: "intelligentForm__Success"
|
|
62
|
-
}),
|
|
62
|
+
}), Me = (i) => {
|
|
63
63
|
const { children: e, ...n } = i, { isSubmitSuccessful: r } = s();
|
|
64
64
|
return r ? /* @__PURE__ */ o(z, { ...n, children: e }) : null;
|
|
65
65
|
}, O = t(S, {
|
|
66
66
|
_id: "intelligentForm__SuccessIcon"
|
|
67
|
-
}),
|
|
67
|
+
}), ze = (i) => {
|
|
68
68
|
const {
|
|
69
|
-
|
|
69
|
+
formSettings: { successView: e }
|
|
70
70
|
} = s();
|
|
71
71
|
return /* @__PURE__ */ o(
|
|
72
72
|
O,
|
|
@@ -77,39 +77,39 @@ const q = t("form", {
|
|
|
77
77
|
);
|
|
78
78
|
}, U = t("h2", {
|
|
79
79
|
_id: "intelligentForm__SuccessHeading"
|
|
80
|
-
}),
|
|
80
|
+
}), Oe = (i) => {
|
|
81
81
|
const {
|
|
82
|
-
|
|
82
|
+
formSettings: { successView: e }
|
|
83
83
|
} = s();
|
|
84
84
|
return /* @__PURE__ */ o(U, { children: e.heading, ...i });
|
|
85
85
|
}, j = t("p", {
|
|
86
86
|
_id: "intelligentForm__SuccessMessage"
|
|
87
|
-
}),
|
|
87
|
+
}), Ue = (i) => {
|
|
88
88
|
const {
|
|
89
|
-
|
|
89
|
+
formSettings: { successView: e }
|
|
90
90
|
} = s();
|
|
91
91
|
return /* @__PURE__ */ o(j, { children: e.message, ...i });
|
|
92
|
-
},
|
|
92
|
+
}, je = t("div", {
|
|
93
93
|
_id: "intelligentForm__PrimaryForm"
|
|
94
94
|
}), Q = t("div", {
|
|
95
95
|
_id: "intelligentForm__PrimaryFormFields"
|
|
96
96
|
}), W = t("p", {
|
|
97
97
|
_id: "intelligentForm__PrimaryForm__Description"
|
|
98
|
-
}),
|
|
98
|
+
}), Qe = (i) => {
|
|
99
99
|
const {
|
|
100
|
-
|
|
100
|
+
formSettings: { primary: e }
|
|
101
101
|
} = s();
|
|
102
102
|
return e.description ? /* @__PURE__ */ o(W, { children: e.description, ...i }) : null;
|
|
103
|
-
},
|
|
103
|
+
}, We = (i) => {
|
|
104
104
|
const { children: e, ...n } = i, {
|
|
105
|
-
|
|
105
|
+
formSettings: { primary: r }
|
|
106
106
|
} = s();
|
|
107
107
|
return /* @__PURE__ */ o(Q, { children: b(e, r.fields), ...n });
|
|
108
108
|
}, $ = t("button", {
|
|
109
109
|
_id: "intelligentForm__PrimaryFormSubmit",
|
|
110
110
|
type: "button",
|
|
111
111
|
children: "Next"
|
|
112
|
-
}),
|
|
112
|
+
}), $e = (i) => {
|
|
113
113
|
const { onClick: e, ...n } = i, { submittedPrimaryForm: r, handleSubmitPrimaryForm: l } = s();
|
|
114
114
|
return /* @__PURE__ */ o(
|
|
115
115
|
$,
|
|
@@ -121,7 +121,7 @@ const q = t("form", {
|
|
|
121
121
|
);
|
|
122
122
|
}, G = t("div", {
|
|
123
123
|
_id: "intelligentForm__Field"
|
|
124
|
-
}),
|
|
124
|
+
}), Ge = (i) => {
|
|
125
125
|
const { field: e, autoFocus: n, ...r } = i, { control: l, errors: c } = s();
|
|
126
126
|
return /* @__PURE__ */ o(
|
|
127
127
|
L,
|
|
@@ -155,7 +155,7 @@ const q = t("form", {
|
|
|
155
155
|
);
|
|
156
156
|
}, J = t("label", {
|
|
157
157
|
_id: "intelligentForm__FieldLabel"
|
|
158
|
-
}),
|
|
158
|
+
}), Je = (i) => {
|
|
159
159
|
const { field: e } = _();
|
|
160
160
|
return /* @__PURE__ */ o(
|
|
161
161
|
J,
|
|
@@ -169,7 +169,7 @@ const q = t("form", {
|
|
|
169
169
|
}, K = t("input", {
|
|
170
170
|
_id: "intelligentForm__FieldText",
|
|
171
171
|
type: "text"
|
|
172
|
-
}), B =
|
|
172
|
+
}), B = P((i, e) => {
|
|
173
173
|
const {
|
|
174
174
|
field: n,
|
|
175
175
|
error: r,
|
|
@@ -200,20 +200,20 @@ const q = t("form", {
|
|
|
200
200
|
children: n.inputType === "textarea" ? /* @__PURE__ */ o(w, { minRows: 3, maxRows: 10 }) : null
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
}),
|
|
203
|
+
}), Ke = t(B, {
|
|
204
204
|
_id: "intelligentForm__FieldEmail",
|
|
205
205
|
type: "email"
|
|
206
206
|
}), X = t("input", {
|
|
207
207
|
_id: "intelligentForm__FieldFile",
|
|
208
208
|
type: "file",
|
|
209
209
|
multiple: !0
|
|
210
|
-
}),
|
|
210
|
+
}), Xe = (i) => {
|
|
211
211
|
const {
|
|
212
212
|
field: e,
|
|
213
213
|
error: n,
|
|
214
214
|
fieldProps: { value: r, onChange: l, onBlur: c, ...m },
|
|
215
215
|
autoFocus: d
|
|
216
|
-
} = _(), { onChange: p, onBlur: g, ...y } = i,
|
|
216
|
+
} = _(), { onChange: p, onBlur: g, ...y } = i, f = (k) => {
|
|
217
217
|
const A = k.target.files;
|
|
218
218
|
l(A);
|
|
219
219
|
};
|
|
@@ -226,11 +226,11 @@ const q = t("form", {
|
|
|
226
226
|
"data-invalid": a(!!n),
|
|
227
227
|
...y,
|
|
228
228
|
...m,
|
|
229
|
-
onChange: F(p,
|
|
229
|
+
onChange: F(p, f),
|
|
230
230
|
onBlur: F(g, c)
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
|
-
},
|
|
233
|
+
}, Ye = t(
|
|
234
234
|
B,
|
|
235
235
|
{
|
|
236
236
|
_id: "intelligentForm__FieldTextArea",
|
|
@@ -240,7 +240,7 @@ const q = t("form", {
|
|
|
240
240
|
}
|
|
241
241
|
), Y = t(R.Root, {
|
|
242
242
|
_id: "intelligentForm__FieldCheckbox"
|
|
243
|
-
}),
|
|
243
|
+
}), Ze = (i) => {
|
|
244
244
|
const { field: e, error: n, fieldProps: r, autoFocus: l } = _(), { onCheckedChange: c, ...m } = i;
|
|
245
245
|
return /* @__PURE__ */ o(
|
|
246
246
|
Y,
|
|
@@ -254,12 +254,12 @@ const q = t("form", {
|
|
|
254
254
|
...m
|
|
255
255
|
}
|
|
256
256
|
);
|
|
257
|
-
},
|
|
257
|
+
}, ei = t(R.Indicator, {
|
|
258
258
|
_id: "intelligentForm__FieldCheckboxIndicator",
|
|
259
259
|
children: /* @__PURE__ */ o(H, {})
|
|
260
260
|
}), Z = t(u.Root, {
|
|
261
261
|
_id: "intelligentForm__FieldSelect"
|
|
262
|
-
}),
|
|
262
|
+
}), ii = (i) => {
|
|
263
263
|
const { field: e, error: n, fieldProps: r } = _(), { onValueChange: l, ...c } = i;
|
|
264
264
|
return /* @__PURE__ */ o(
|
|
265
265
|
Z,
|
|
@@ -271,11 +271,11 @@ const q = t("form", {
|
|
|
271
271
|
...c
|
|
272
272
|
}
|
|
273
273
|
);
|
|
274
|
-
},
|
|
274
|
+
}, ti = t(u.Trigger, {
|
|
275
275
|
_id: "intelligentForm__FieldSelect__Trigger"
|
|
276
276
|
}), ee = t(u.Value, {
|
|
277
277
|
_id: "intelligentForm__FieldSelect__Value"
|
|
278
|
-
}),
|
|
278
|
+
}), ni = (i) => {
|
|
279
279
|
const { field: e } = _();
|
|
280
280
|
return /* @__PURE__ */ o(
|
|
281
281
|
ee,
|
|
@@ -284,20 +284,20 @@ const q = t("form", {
|
|
|
284
284
|
...i
|
|
285
285
|
}
|
|
286
286
|
);
|
|
287
|
-
},
|
|
287
|
+
}, ri = t(u.Icon, {
|
|
288
288
|
_id: "intelligentForm__FieldSelect__Icon",
|
|
289
289
|
asChild: !0,
|
|
290
290
|
children: /* @__PURE__ */ o(S, { iconSettings: { builtIn: "LuChevronDown" } })
|
|
291
|
-
}),
|
|
291
|
+
}), oi = t(u.Content, {
|
|
292
292
|
_id: "intelligentForm__FieldSelect__Content",
|
|
293
293
|
position: "popper"
|
|
294
|
-
}),
|
|
294
|
+
}), li = t(u.Viewport, {
|
|
295
295
|
_id: "intelligentForm__FieldSelect__Viewport"
|
|
296
|
-
}),
|
|
296
|
+
}), si = t(u.Item, {
|
|
297
297
|
_id: "intelligentForm__FieldSelect__Item"
|
|
298
|
-
}),
|
|
298
|
+
}), ci = t(u.ItemText, {
|
|
299
299
|
_id: "intelligentForm__FieldSelect__ItemText"
|
|
300
|
-
}),
|
|
300
|
+
}), mi = t(
|
|
301
301
|
u.ItemIndicator,
|
|
302
302
|
{
|
|
303
303
|
_id: "intelligentForm__FieldSelect__ItemIndicator",
|
|
@@ -306,26 +306,26 @@ const q = t("form", {
|
|
|
306
306
|
}
|
|
307
307
|
), ie = t("span", {
|
|
308
308
|
_id: "intelligentForm__FieldError"
|
|
309
|
-
}),
|
|
309
|
+
}), di = (i) => {
|
|
310
310
|
const { error: e } = _();
|
|
311
311
|
return e ? /* @__PURE__ */ o(ie, { children: e.message?.toString(), ...i }) : null;
|
|
312
|
-
},
|
|
312
|
+
}, ai = t("div", {
|
|
313
313
|
_id: "intelligentForm__BotHeading"
|
|
314
|
-
}),
|
|
314
|
+
}), Fi = t(S, {
|
|
315
315
|
_id: "intelligentForm__BotHeading__Icon",
|
|
316
316
|
iconSettings: { builtIn: "LuSparkles" }
|
|
317
317
|
}), te = t("div", {
|
|
318
318
|
_id: "intelligentForm__BotHeading__Name"
|
|
319
|
-
}),
|
|
319
|
+
}), ui = (i) => {
|
|
320
320
|
const { baseSettings: e } = x(), { organizationDisplayName: n } = e ?? {}, {
|
|
321
|
-
|
|
321
|
+
formSettings: { aiAssistantName: r }
|
|
322
322
|
} = s();
|
|
323
323
|
return /* @__PURE__ */ o(te, { children: r ?? n, ...i });
|
|
324
324
|
}, ne = t("div", {
|
|
325
325
|
_id: "intelligentForm__Loading"
|
|
326
|
-
}),
|
|
327
|
-
const { loading: n } = s(), r =
|
|
328
|
-
return
|
|
326
|
+
}), _i = P(({ ...i }, e) => {
|
|
327
|
+
const { loading: n } = s(), r = h(null), l = I(e, r);
|
|
328
|
+
return C(() => {
|
|
329
329
|
n && r.current && r.current.scrollIntoView({
|
|
330
330
|
behavior: "smooth",
|
|
331
331
|
block: "nearest",
|
|
@@ -334,9 +334,9 @@ const q = t("form", {
|
|
|
334
334
|
}, [n]), n ? /* @__PURE__ */ o(ne, { ref: l, ...i }) : null;
|
|
335
335
|
}), re = t("div", {
|
|
336
336
|
_id: "intelligentForm__ConfidentResponse"
|
|
337
|
-
}),
|
|
338
|
-
const { aiResponse: n, loading: r } = s(), l =
|
|
339
|
-
return
|
|
337
|
+
}), gi = P(({ ...i }, e) => {
|
|
338
|
+
const { aiResponse: n, loading: r } = s(), l = h(null), c = I(e, l);
|
|
339
|
+
return C(() => {
|
|
340
340
|
!r && n.answerConfidence && l.current && l.current.scrollIntoView({
|
|
341
341
|
behavior: "smooth",
|
|
342
342
|
block: "nearest",
|
|
@@ -345,13 +345,13 @@ const q = t("form", {
|
|
|
345
345
|
}, [r, n.answerConfidence]), n.answerConfidence ? /* @__PURE__ */ o(re, { ref: c, ...i }) : null;
|
|
346
346
|
}), oe = t(N, {
|
|
347
347
|
_id: "intelligentForm__ConfidentAnswer"
|
|
348
|
-
}),
|
|
348
|
+
}), Si = (i) => {
|
|
349
349
|
const { aiResponse: e } = s();
|
|
350
350
|
return /* @__PURE__ */ o(oe, { shouldOpenLinksInNewTab: !0, children: e.answer, ...i });
|
|
351
351
|
}, le = t("button", {
|
|
352
352
|
_id: "intelligentForm__ConfidentResponseButton",
|
|
353
353
|
type: "button"
|
|
354
|
-
}),
|
|
354
|
+
}), pi = (i) => {
|
|
355
355
|
const { onClick: e, ...n } = i, { showSecondaryFields: r, setShowSecondaryFields: l } = s(), c = () => {
|
|
356
356
|
l(!0);
|
|
357
357
|
};
|
|
@@ -363,17 +363,17 @@ const q = t("form", {
|
|
|
363
363
|
...n
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
|
-
},
|
|
366
|
+
}, vi = t(S, {
|
|
367
367
|
_id: "intelligentForm__ConfidentResponseButton__Icon",
|
|
368
368
|
iconSettings: { builtIn: "LuUser" }
|
|
369
|
-
}),
|
|
369
|
+
}), Pi = t("span", {
|
|
370
370
|
_id: "intelligentForm__ConfidentResponseButton__Label",
|
|
371
371
|
children: "Escalate to human"
|
|
372
372
|
}), se = t("div", {
|
|
373
373
|
_id: "intelligentForm__SecondaryForm"
|
|
374
|
-
}),
|
|
375
|
-
const { showSecondaryFields: n } = s(), r =
|
|
376
|
-
return
|
|
374
|
+
}), Ii = P(({ ...i }, e) => {
|
|
375
|
+
const { showSecondaryFields: n } = s(), r = h(null), l = I(e, r);
|
|
376
|
+
return C(() => {
|
|
377
377
|
n && r.current && r.current.scrollIntoView({
|
|
378
378
|
behavior: "smooth",
|
|
379
379
|
block: "nearest",
|
|
@@ -382,9 +382,9 @@ const q = t("form", {
|
|
|
382
382
|
}, [n]), n ? /* @__PURE__ */ o(se, { ref: l, ...i }) : null;
|
|
383
383
|
}), ce = t("p", {
|
|
384
384
|
_id: "intelligentForm__SecondaryForm__Description"
|
|
385
|
-
}),
|
|
385
|
+
}), fi = (i) => {
|
|
386
386
|
const {
|
|
387
|
-
|
|
387
|
+
formSettings: { secondary: e },
|
|
388
388
|
aiResponse: { answerConfidence: n }
|
|
389
389
|
} = s();
|
|
390
390
|
if (!e.description) return null;
|
|
@@ -395,28 +395,31 @@ const q = t("form", {
|
|
|
395
395
|
return /* @__PURE__ */ o(ce, { children: r, ...i });
|
|
396
396
|
}, me = t("div", {
|
|
397
397
|
_id: "intelligentForm__SecondaryFormFields"
|
|
398
|
-
}),
|
|
398
|
+
}), hi = (i) => {
|
|
399
399
|
const { children: e, ...n } = i, {
|
|
400
|
-
|
|
400
|
+
formSettings: { secondary: r }
|
|
401
401
|
} = s();
|
|
402
402
|
return /* @__PURE__ */ o(me, { children: b(e, r.fields), ...n });
|
|
403
|
-
},
|
|
403
|
+
}, de = t("button", {
|
|
404
404
|
_id: "intelligentForm__SecondaryFormSubmit",
|
|
405
405
|
type: "submit",
|
|
406
406
|
children: "Submit"
|
|
407
|
-
}),
|
|
407
|
+
}), Ci = (i) => {
|
|
408
|
+
const { formSettings: e } = s(), { label: n } = e.buttons.submit;
|
|
409
|
+
return /* @__PURE__ */ o(de, { children: n ?? "Submit", ...i });
|
|
410
|
+
}, ae = t("span", {
|
|
408
411
|
_id: "intelligentForm__Error"
|
|
409
|
-
}),
|
|
412
|
+
}), bi = (i) => {
|
|
410
413
|
const { formError: e } = s();
|
|
411
|
-
return e ? /* @__PURE__ */ o(
|
|
412
|
-
},
|
|
414
|
+
return e ? /* @__PURE__ */ o(ae, { children: e.message, ...i }) : null;
|
|
415
|
+
}, yi = t("div", {
|
|
413
416
|
_id: "intelligentForm__Sources"
|
|
414
|
-
}),
|
|
417
|
+
}), wi = t("p", {
|
|
415
418
|
_id: "intelligentForm__SourcesCaption",
|
|
416
419
|
children: "Here are the sources I considered:"
|
|
417
|
-
}),
|
|
420
|
+
}), Fe = t("div", {
|
|
418
421
|
_id: "intelligentForm__SourcesList"
|
|
419
|
-
}),
|
|
422
|
+
}), Ri = (i) => {
|
|
420
423
|
const { children: e, ...n } = i, {
|
|
421
424
|
baseSettings: { transformSource: r, organizationDisplayName: l }
|
|
422
425
|
} = x(), {
|
|
@@ -427,15 +430,15 @@ const q = t("form", {
|
|
|
427
430
|
const g = r(p, "intelligentFormSource", {
|
|
428
431
|
organizationDisplayName: l
|
|
429
432
|
});
|
|
430
|
-
return d.some((
|
|
433
|
+
return d.some((f) => f.url === g.url) || d.push(g), d;
|
|
431
434
|
}, []);
|
|
432
|
-
return /* @__PURE__ */ o(
|
|
433
|
-
},
|
|
435
|
+
return /* @__PURE__ */ o(Fe, { children: b(e, m), ...n });
|
|
436
|
+
}, ue = t(D, {
|
|
434
437
|
_id: "intelligentForm__Source"
|
|
435
|
-
}),
|
|
438
|
+
}), xi = (i) => {
|
|
436
439
|
const { source: e, ...n } = i;
|
|
437
440
|
return /* @__PURE__ */ o(E, { source: { ...e, isExternal: !!e.shouldOpenInNewTab }, children: /* @__PURE__ */ o(
|
|
438
|
-
|
|
441
|
+
ue,
|
|
439
442
|
{
|
|
440
443
|
"data-type": e.type,
|
|
441
444
|
appendToUrl: e.appendToUrl,
|
|
@@ -444,125 +447,125 @@ const q = t("form", {
|
|
|
444
447
|
...n
|
|
445
448
|
}
|
|
446
449
|
) });
|
|
447
|
-
},
|
|
450
|
+
}, _e = t(S, {
|
|
448
451
|
_id: "intelligentForm__SourceIcon"
|
|
449
|
-
}),
|
|
452
|
+
}), Ti = (i) => {
|
|
450
453
|
const { source: e } = T();
|
|
451
|
-
return /* @__PURE__ */ o(
|
|
452
|
-
},
|
|
454
|
+
return /* @__PURE__ */ o(_e, { iconSettings: e.icon, "data-type": e.type, ...i });
|
|
455
|
+
}, ge = t("span", {
|
|
453
456
|
_id: "intelligentForm__SourceTitle"
|
|
454
|
-
}),
|
|
457
|
+
}), Bi = (i) => {
|
|
455
458
|
const { source: e } = T();
|
|
456
|
-
return /* @__PURE__ */ o(
|
|
459
|
+
return /* @__PURE__ */ o(ge, { "data-type": e.type, children: e.title, ...i });
|
|
457
460
|
};
|
|
458
461
|
export {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
462
|
+
ai as BotHeading,
|
|
463
|
+
Fi as BotHeadingIcon,
|
|
464
|
+
ui as BotHeadingName,
|
|
465
|
+
Si as ConfidentAnswer,
|
|
466
|
+
gi as ConfidentResponse,
|
|
467
|
+
pi as ConfidentResponseButton,
|
|
468
|
+
vi as ConfidentResponseButtonIcon,
|
|
469
|
+
Pi as ConfidentResponseButtonLabel,
|
|
470
|
+
Ve as Content,
|
|
471
|
+
He as ContentScrollArea,
|
|
472
|
+
qe as ContentScrollAreaCorner,
|
|
473
|
+
De as ContentScrollAreaScrollbar,
|
|
474
|
+
Ne as ContentScrollAreaThumb,
|
|
475
|
+
Ee as ContentScrollAreaViewport,
|
|
476
|
+
bi as Error,
|
|
477
|
+
Ge as FormField,
|
|
478
|
+
Ze as FormFieldCheckbox,
|
|
479
|
+
ei as FormFieldCheckboxIndicator,
|
|
480
|
+
Ke as FormFieldEmail,
|
|
481
|
+
di as FormFieldError,
|
|
482
|
+
Xe as FormFieldFile,
|
|
483
|
+
Je as FormFieldLabel,
|
|
484
|
+
ii as FormFieldSelect,
|
|
485
|
+
oi as FormFieldSelectContent,
|
|
486
|
+
ri as FormFieldSelectIcon,
|
|
487
|
+
si as FormFieldSelectItem,
|
|
488
|
+
mi as FormFieldSelectItemIndicator,
|
|
489
|
+
ci as FormFieldSelectItemText,
|
|
490
|
+
ti as FormFieldSelectTrigger,
|
|
491
|
+
ni as FormFieldSelectValue,
|
|
492
|
+
li as FormFieldSelectViewport,
|
|
490
493
|
B as FormFieldText,
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
494
|
+
Ye as FormFieldTextArea,
|
|
495
|
+
Le as Heading,
|
|
496
|
+
ai as IntelligentFormPrimitiveBotHeading,
|
|
497
|
+
Fi as IntelligentFormPrimitiveBotHeadingIcon,
|
|
498
|
+
ui as IntelligentFormPrimitiveBotHeadingName,
|
|
499
|
+
Si as IntelligentFormPrimitiveConfidentAnswer,
|
|
500
|
+
gi as IntelligentFormPrimitiveConfidentResponse,
|
|
501
|
+
pi as IntelligentFormPrimitiveConfidentResponseButton,
|
|
502
|
+
vi as IntelligentFormPrimitiveConfidentResponseButtonIcon,
|
|
503
|
+
Pi as IntelligentFormPrimitiveConfidentResponseButtonLabel,
|
|
504
|
+
Ve as IntelligentFormPrimitiveContent,
|
|
505
|
+
He as IntelligentFormPrimitiveContentScrollArea,
|
|
506
|
+
qe as IntelligentFormPrimitiveContentScrollAreaCorner,
|
|
507
|
+
De as IntelligentFormPrimitiveContentScrollAreaScrollbar,
|
|
508
|
+
Ne as IntelligentFormPrimitiveContentScrollAreaThumb,
|
|
509
|
+
Ee as IntelligentFormPrimitiveContentScrollAreaViewport,
|
|
510
|
+
bi as IntelligentFormPrimitiveFormError,
|
|
511
|
+
Ge as IntelligentFormPrimitiveFormField,
|
|
512
|
+
Ze as IntelligentFormPrimitiveFormFieldCheckbox,
|
|
513
|
+
ei as IntelligentFormPrimitiveFormFieldCheckboxIndicator,
|
|
514
|
+
Ke as IntelligentFormPrimitiveFormFieldEmail,
|
|
515
|
+
di as IntelligentFormPrimitiveFormFieldError,
|
|
516
|
+
Xe as IntelligentFormPrimitiveFormFieldFile,
|
|
517
|
+
Je as IntelligentFormPrimitiveFormFieldLabel,
|
|
518
|
+
ii as IntelligentFormPrimitiveFormFieldSelect,
|
|
519
|
+
oi as IntelligentFormPrimitiveFormFieldSelectContent,
|
|
520
|
+
ri as IntelligentFormPrimitiveFormFieldSelectIcon,
|
|
521
|
+
si as IntelligentFormPrimitiveFormFieldSelectItem,
|
|
522
|
+
mi as IntelligentFormPrimitiveFormFieldSelectItemIndicator,
|
|
523
|
+
ci as IntelligentFormPrimitiveFormFieldSelectItemText,
|
|
524
|
+
ti as IntelligentFormPrimitiveFormFieldSelectTrigger,
|
|
525
|
+
ni as IntelligentFormPrimitiveFormFieldSelectValue,
|
|
526
|
+
li as IntelligentFormPrimitiveFormFieldSelectViewport,
|
|
524
527
|
B as IntelligentFormPrimitiveFormFieldText,
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
528
|
+
Ye as IntelligentFormPrimitiveFormFieldTextArea,
|
|
529
|
+
Le as IntelligentFormPrimitiveHeading,
|
|
530
|
+
_i as IntelligentFormPrimitiveLoading,
|
|
531
|
+
je as IntelligentFormPrimitivePrimaryForm,
|
|
532
|
+
Qe as IntelligentFormPrimitivePrimaryFormDescription,
|
|
533
|
+
We as IntelligentFormPrimitivePrimaryFormFields,
|
|
534
|
+
$e as IntelligentFormPrimitivePrimaryFormSubmit,
|
|
535
|
+
Ae as IntelligentFormPrimitiveRoot,
|
|
536
|
+
Ii as IntelligentFormPrimitiveSecondaryForm,
|
|
537
|
+
fi as IntelligentFormPrimitiveSecondaryFormDescription,
|
|
538
|
+
hi as IntelligentFormPrimitiveSecondaryFormFields,
|
|
536
539
|
Ci as IntelligentFormPrimitiveSecondaryFormSubmit,
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
540
|
+
xi as IntelligentFormPrimitiveSource,
|
|
541
|
+
Ti as IntelligentFormPrimitiveSourceIcon,
|
|
542
|
+
Bi as IntelligentFormPrimitiveSourceTitle,
|
|
543
|
+
yi as IntelligentFormPrimitiveSources,
|
|
544
|
+
wi as IntelligentFormPrimitiveSourcesCaption,
|
|
545
|
+
Ri as IntelligentFormPrimitiveSourcesList,
|
|
546
|
+
Me as IntelligentFormPrimitiveSuccess,
|
|
547
|
+
Oe as IntelligentFormPrimitiveSuccessHeading,
|
|
548
|
+
ze as IntelligentFormPrimitiveSuccessIcon,
|
|
549
|
+
Ue as IntelligentFormPrimitiveSuccessMessage,
|
|
550
|
+
_i as Loading,
|
|
551
|
+
je as PrimaryForm,
|
|
552
|
+
Qe as PrimaryFormDescription,
|
|
553
|
+
We as PrimaryFormFields,
|
|
554
|
+
$e as PrimaryFormSubmit,
|
|
555
|
+
Li as Provider,
|
|
556
|
+
Ae as Root,
|
|
557
|
+
Ii as SecondaryForm,
|
|
558
|
+
fi as SecondaryFormDescription,
|
|
559
|
+
hi as SecondaryFormFields,
|
|
557
560
|
Ci as SecondaryFormSubmit,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
561
|
+
xi as Source,
|
|
562
|
+
Ti as SourceIcon,
|
|
563
|
+
Bi as SourceTitle,
|
|
564
|
+
yi as Sources,
|
|
565
|
+
wi as SourcesCaption,
|
|
566
|
+
Ri as SourcesList,
|
|
567
|
+
Me as Success,
|
|
568
|
+
Oe as SuccessHeading,
|
|
569
|
+
ze as SuccessIcon,
|
|
570
|
+
Ue as SuccessMessage
|
|
568
571
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("@radix-ui/react-dialog"),i=require("./factory.cjs"),d=require("../atoms/icons/custom-icon.cjs"),u=require("./modal/use-inkeep-modal.cjs"),l=require("./modal/modal-provider.cjs"),m=require("../utils/compose-event-handlers.cjs"),p=require("../hooks/use-media-query.cjs"),v=require("../utils/misc.cjs");function M(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=M(c),y=i.ikp(s.Root,{_id:"modal"}),C=e=>{const{onOpenChange:o,config:t,...r}=e,a=u.useInkeepModal(t);return n.jsx(l.ModalProvider,{modal:a,children:n.jsx(y,{open:a.isOpen,onOpenChange:m.composeEventHandlers(o,a.handleOpenChange),...r})})},O=i.ikp(s.Overlay,{_id:"modal__Overlay"}),f=i.ikp(s.Content,{_id:"modal__Content","aria-describedby":void 0}),g=e=>{const o=p.useMediaQuery("(max-width: 768px)");return n.jsx(f,{"data-mobile":v.dataAttr(o),...e})},_=i.ikp(s.Close,{_id:"modal__Close",children:n.jsx(d.CustomIcon,{iconKey:"close"})}),b=e=>l.useModal()?n.jsx(_,{...e}):null;exports.Close=b;exports.Content=g;exports.Modal=C;exports.Overlay=O;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import { InkeepModalSettings } from '@inkeep/cxkit-types';
|
|
3
3
|
import { PolymorphicProps } from './factory';
|
|
4
|
-
import * as DialogPrimitive from '
|
|
4
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
declare const Modal: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogProps, "_id"> & Partial<Pick<DialogPrimitive.DialogProps, "_id">>>;
|
|
6
6
|
export interface PrimitiveModalProps extends ComponentPropsWithRef<typeof Modal> {
|
|
7
7
|
/**
|