@epam/ai-dial-builder-form 1.3.0-dev.290 → 1.3.0-dev.296
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/components/EntityEditor/EntityEditor.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +64 -64
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityEditor.d.ts","sourceRoot":"","sources":["../../../src/components/EntityEditor/EntityEditor.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityEditor.d.ts","sourceRoot":"","sources":["../../../src/components/EntityEditor/EntityEditor.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AA4I1E,6GAA6G;AAC7G,eAAO,MAAM,YAAY,yDAA8B,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
._body_1xd7h_2._body_1xd7h_2{flex-direction:column}._sideColumn_1xd7h_6._sideColumn_1xd7h_6{width:100%}._reservedColumn_1xd7h_10._reservedColumn_1xd7h_10{display:none}@media (width>=1280px){._body_1xd7h_2._body_1xd7h_2{flex-direction:row}._sideColumn_1xd7h_6._sideColumn_1xd7h_6{width:var(--bfb-side-column-width,400px);flex-shrink:0}._reservedColumn_1xd7h_10._reservedColumn_1xd7h_10{display:block}}._header_lon83_4._header_lon83_4{border-block-width:1px 0}@media (width>=1280px){._header_lon83_4._header_lon83_4{border-block-width:0 1px}}._header_lon83_4._header_lon83_4{border-color:var(--bfh-border,var(--stroke-tertiary,#e0e6f0))}._actions_lon83_18._actions_lon83_18{display:none}@media (width>=1280px){._actions_lon83_18._actions_lon83_18{display:flex}}._title_lon83_27{font-family:var(--bfh-font-family,inherit)}._container_14mfe_1{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa))}._footer_14mfe_10._footer_14mfe_10{display:flex}@media (width>=1280px){._footer_14mfe_10._footer_14mfe_10{display:none}}._footer_14mfe_10._footer_14mfe_10{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa))}._section_l1mnx_1{border-color:var(--es-border-color,var(--stroke-tertiary,#e0e6f0))}._title_l1mnx_5{color:var(--es-title-color,var(--text-primary,#161b2d))}._headerBorder_1adw2_1{border-bottom-color:var(--el-header-border-color,var(--stroke-tertiary,#e0e6f0))}._footerBorder_1adw2_5{border-top-color:var(--el-header-border-color,var(--stroke-tertiary,#e0e6f0))}._columnBorder_1adw2_10{border-color:var(--el-sidebar-border-color,var(--stroke-tertiary,#e0e6f0))}._box_c9as8_1{background:var(--aa-box-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--aa-box-border,var(--stroke-tertiary,#e0e6f0))}._icon_c9as8_6{color:var(--aa-icon,var(--text-secondary,#57647a))}._caption_c9as8_10{color:var(--aa-caption,var(--text-tertiary,#848e9c))}._confirmText_19ec1_1{color:var(--apm-confirm-text,var(--text-secondary,#57647a))}._confirmItem_19ec1_5{color:var(--apm-confirm-item-text,var(--text-primary,#161b2d))}._summary_1hlc9_1{color:var(--dlf-summary-text,var(--text-secondary,#57647a))}._rowLabel_1hlc9_5{color:var(--dlf-row-label-text,var(--text-secondary,#57647a))}
|
|
2
2
|
/*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.z-10{z-index:10}.mb-3{margin-bottom:.75rem}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-16{height:4rem}.h-full{height:100%}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.w-0{width:0}.w-16{width:4rem}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow-\[1\]{flex-grow:1}.grow-\[2\]{flex-grow:2}.basis-0{flex-basis:0}.resize{resize:both}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-
|
|
3
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.z-10{z-index:10}.mb-3{margin-bottom:.75rem}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-16{height:4rem}.h-full{height:100%}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.w-0{width:0}.w-16{width:4rem}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow-\[1\]{flex-grow:1}.grow-\[2\]{flex-grow:2}.basis-0{flex-basis:0}.resize{resize:both}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-lg{border-radius:.5rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.object-cover{object-fit:cover}.p-3{padding:.75rem}.px-0\!{padding-inline:0!important}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-2{padding-block:.5rem}.py-3{padding-block:.75rem}.pt-4{padding-top:1rem}.wrap-break-word{overflow-wrap:break-word}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:4px 9px 16px 1px var(--tw-shadow-color,var(--shadow-sm-2,var(--shadow-sm,#2764d90f))), 0 -2px 4px 2px var(--tw-shadow-color,var(--shadow-sm-1,#2764d90a));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,cubic-bezier(.4, 0, .2, 1));transition-duration:var(--tw-duration,.15s)}:is(.\*\:flex-1>*){flex:1}.rtl\:scale-x-\[-1\]:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-scale-x:-1;scale:var(--tw-scale-x) var(--tw-scale-y)}@media (min-width:1280px){.desktop\:relative{position:relative}.desktop\:block{display:block}.desktop\:flex{display:flex}.desktop\:hidden{display:none}.desktop\:h-16{height:4rem}.desktop\:min-h-0{min-height:0}.desktop\:w-\(--el-left-width\){width:var(--el-left-width)}.desktop\:w-\[400px\]{width:400px}.desktop\:flex-1{flex:1}.desktop\:shrink-0{flex-shrink:0}.desktop\:basis-40{flex-basis:10rem}.desktop\:flex-col{flex-direction:column}.desktop\:flex-row{flex-direction:row}.desktop\:flex-nowrap{flex-wrap:nowrap}.desktop\:items-start{align-items:flex-start}.desktop\:overflow-hidden{overflow:hidden}.desktop\:overflow-y-auto{overflow-y:auto}.desktop\:border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.desktop\:border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.desktop\:px-6{padding-inline:1.5rem}.desktop\:px-8{padding-inline:2rem}.desktop\:py-0{padding-block:0}.desktop\:pt-3{padding-top:.75rem}.desktop\:pt-6{padding-top:1.5rem}.desktop\:pb-3{padding-bottom:.75rem}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ENTITY_DESCRIPTION_MAX_LENGTH as e, ENTITY_NAME_MAX_LENGTH as t, RESIZABLE_TEXTAREA_CLASS_NAME as n, TAG_INPUT_TAG_CLASS_NAME as r, buildCssVars as i, exceedsMaxLength as a, hasControlCharacters as o, mergeClasses as s } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { ButtonAppearance as c, ButtonVariant as l, DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, DangerIconButton as f, ElementSize as p, GhostButton as m, GhostIconButton as h, Input as g, Label as _, LinkButton as v, LiveRegion as y, LiveRegionElement as b, LiveRegionPoliteness as x, NeutralButton as S, Popup as C, PrimaryButton as w, ResizeHandle as T, Select as E, Spinner as D, TagInput as O, Textarea as k, TextareaResize as A } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
4
|
-
import { IconArrowLeft as P, IconArrowNarrowLeft as F, IconPhoto as I, IconPlus as
|
|
5
|
-
import { Suspense as
|
|
4
|
+
import { IconArrowLeft as P, IconArrowNarrowLeft as F, IconPhoto as I, IconPlus as ee, IconTrashX as te } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as ne, memo as L, useCallback as R, useEffect as re, useId as z, useLayoutEffect as B, useMemo as V, useRef as H, useState as U } from "react";
|
|
6
6
|
//#region src/components/BuilderFormActions/BuilderFormActions.tsx
|
|
7
|
-
var
|
|
7
|
+
var W = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubmitDisabled: i = !1, isSubmitting: a = !1, buttonClassName: o }) => /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(S, {
|
|
8
8
|
label: e.cancelButtonLabel,
|
|
9
9
|
onClick: t,
|
|
10
10
|
disabled: r,
|
|
@@ -19,18 +19,18 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
19
19
|
"aria-hidden": !0,
|
|
20
20
|
children: /* @__PURE__ */ M(D, { size: u.SM })
|
|
21
21
|
}) : void 0
|
|
22
|
-
})] }),
|
|
22
|
+
})] }), G = {
|
|
23
23
|
body: "_body_1xd7h_2",
|
|
24
24
|
sideColumn: "_sideColumn_1xd7h_6",
|
|
25
25
|
reservedColumn: "_reservedColumn_1xd7h_10"
|
|
26
|
-
},
|
|
26
|
+
}, K = s("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", G.sideColumn), ie = ({ left: e, children: t, metadata: n, layout: r }) => {
|
|
27
27
|
let i = e != null && n == null && r?.reserveEndColumn !== !1, a = r ? { "--bfb-side-column-width": r.sideColumnWidth ?? "400px" } : void 0, o = r ? { columnGap: r.columnGap ?? "0px" } : void 0;
|
|
28
28
|
return /* @__PURE__ */ N("div", {
|
|
29
|
-
className: s("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
|
|
29
|
+
className: s("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden", G.body),
|
|
30
30
|
style: o,
|
|
31
31
|
children: [
|
|
32
32
|
e != null && /* @__PURE__ */ M("div", {
|
|
33
|
-
className:
|
|
33
|
+
className: K,
|
|
34
34
|
style: a,
|
|
35
35
|
children: e
|
|
36
36
|
}),
|
|
@@ -39,14 +39,14 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
39
39
|
children: t
|
|
40
40
|
}),
|
|
41
41
|
n != null && /* @__PURE__ */ M("div", {
|
|
42
|
-
className:
|
|
42
|
+
className: K,
|
|
43
43
|
style: a,
|
|
44
44
|
children: n
|
|
45
45
|
}),
|
|
46
46
|
i && /* @__PURE__ */ M("div", {
|
|
47
47
|
"aria-hidden": !0,
|
|
48
48
|
style: a,
|
|
49
|
-
className: s(
|
|
49
|
+
className: s(G.reservedColumn, G.sideColumn)
|
|
50
50
|
})
|
|
51
51
|
]
|
|
52
52
|
});
|
|
@@ -81,7 +81,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
81
81
|
}),
|
|
82
82
|
/* @__PURE__ */ M("div", {
|
|
83
83
|
className: s("items-center gap-2", q.actions),
|
|
84
|
-
children: /* @__PURE__ */ M(
|
|
84
|
+
children: /* @__PURE__ */ M(W, {
|
|
85
85
|
labels: e,
|
|
86
86
|
onCancel: n,
|
|
87
87
|
onSubmit: r,
|
|
@@ -128,7 +128,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ M("div", {
|
|
130
130
|
className: s("sticky bottom-0 z-10 items-center gap-2 p-3 shadow-sm", J.footer),
|
|
131
|
-
children: /* @__PURE__ */ M(
|
|
131
|
+
children: /* @__PURE__ */ M(W, {
|
|
132
132
|
labels: e,
|
|
133
133
|
onCancel: n,
|
|
134
134
|
onSubmit: r,
|
|
@@ -170,12 +170,12 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
170
170
|
footerBorder: "_footerBorder_1adw2_5",
|
|
171
171
|
columnBorder: "_columnBorder_1adw2_10"
|
|
172
172
|
}, le = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: a, centerContent: o, rightContent: c, resizableLeftColumn: l, isSaving: f = !1, labels: p, styles: m, dir: g }) => {
|
|
173
|
-
let _ =
|
|
173
|
+
let _ = z(), v = f ? p?.savingStatusLabel ?? "Saving" : "", x = H(null), [S, C] = U(), w = l != null && o != null, E = l?.minWidth, D = l?.maxWidth, O = {
|
|
174
174
|
min: E,
|
|
175
175
|
max: D,
|
|
176
176
|
containerWidth: S
|
|
177
177
|
}, k = w ? ce(l.width, O) : void 0, A = ce(D ?? 640, O);
|
|
178
|
-
|
|
178
|
+
re(() => {
|
|
179
179
|
let e = x.current;
|
|
180
180
|
if (!w || e == null || typeof ResizeObserver > "u") return;
|
|
181
181
|
let t = new ResizeObserver(() => C(e.clientWidth));
|
|
@@ -287,7 +287,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
287
287
|
className: "flex flex-col gap-3",
|
|
288
288
|
children: [/* @__PURE__ */ M(m, {
|
|
289
289
|
size: p.Small,
|
|
290
|
-
iconBefore: /* @__PURE__ */ M(
|
|
290
|
+
iconBefore: /* @__PURE__ */ M(ee, {
|
|
291
291
|
size: u.SM,
|
|
292
292
|
stroke: d,
|
|
293
293
|
"aria-hidden": !0
|
|
@@ -346,7 +346,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
346
346
|
p,
|
|
347
347
|
u
|
|
348
348
|
]);
|
|
349
|
-
return /* @__PURE__ */ M(
|
|
349
|
+
return /* @__PURE__ */ M(ne, {
|
|
350
350
|
fallback: null,
|
|
351
351
|
children: e && /* @__PURE__ */ M(a, {
|
|
352
352
|
isOpen: e,
|
|
@@ -400,27 +400,27 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
400
400
|
let y = i({
|
|
401
401
|
"--dlf-summary-text": _?.summaryText,
|
|
402
402
|
"--dlf-row-label-text": _?.rowLabelText
|
|
403
|
-
}), { summaryLabel: b, addLabel: x, editLabel: S, popupTitle: w, addLocaleLabel: T, localeRowLabel: D = "Locale", languageLabel: O, nameLabel: j, namePlaceholder: P, descriptionLabel: F, descriptionPlaceholder: I, deleteAriaLabel:
|
|
404
|
-
|
|
405
|
-
|
|
403
|
+
}), { summaryLabel: b, addLabel: x, editLabel: S, popupTitle: w, addLocaleLabel: T, localeRowLabel: D = "Locale", languageLabel: O, nameLabel: j, namePlaceholder: P, descriptionLabel: F, descriptionPlaceholder: I, deleteAriaLabel: ne, cancelLabel: L = "Cancel", saveLabel: R = "Save" } = a, [z, B] = U(!1), [V, W] = U([]), G = H(0);
|
|
404
|
+
re(() => {
|
|
405
|
+
z && W(e.length > 0 ? e : [ge(`locale-row-${++G.current}`, /* @__PURE__ */ new Set(), r)]);
|
|
406
406
|
}, [
|
|
407
|
-
|
|
407
|
+
z,
|
|
408
408
|
e,
|
|
409
409
|
r
|
|
410
410
|
]);
|
|
411
|
-
let
|
|
412
|
-
t(
|
|
411
|
+
let K = () => B(!0), ie = () => B(!1), q = () => {
|
|
412
|
+
t(V.filter((e) => e.language && e.name)), B(!1);
|
|
413
413
|
}, ae = () => {
|
|
414
|
-
let e = new Set(
|
|
415
|
-
|
|
414
|
+
let e = new Set(V.map((e) => e.language).filter(Boolean));
|
|
415
|
+
W((t) => [...t, ge(`locale-row-${++G.current}`, e, r)]);
|
|
416
416
|
}, J = (e, t) => {
|
|
417
|
-
|
|
417
|
+
W((n) => n.map((n) => n.id === e ? {
|
|
418
418
|
...n,
|
|
419
419
|
...t
|
|
420
420
|
} : n));
|
|
421
421
|
}, oe = (e) => {
|
|
422
|
-
|
|
423
|
-
}, Y = (e) => r.find((t) => t.code === e)?.label ?? e.toUpperCase(), se =
|
|
422
|
+
W((t) => t.filter((t) => t.id !== e));
|
|
423
|
+
}, Y = (e) => r.find((t) => t.code === e)?.label ?? e.toUpperCase(), se = V.some((e) => !e.language || !e.name);
|
|
424
424
|
return r.length === 0 ? null : /* @__PURE__ */ N("div", {
|
|
425
425
|
className: s("flex items-center gap-2", o),
|
|
426
426
|
style: y,
|
|
@@ -431,20 +431,20 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
431
431
|
}),
|
|
432
432
|
/* @__PURE__ */ M(v, {
|
|
433
433
|
label: e.length > 0 ? S : x,
|
|
434
|
-
iconBefore: /* @__PURE__ */ M(
|
|
434
|
+
iconBefore: /* @__PURE__ */ M(ee, {
|
|
435
435
|
size: u.SM,
|
|
436
436
|
"aria-hidden": !0,
|
|
437
437
|
stroke: d
|
|
438
438
|
}),
|
|
439
439
|
className: "px-0!",
|
|
440
|
-
onClick:
|
|
440
|
+
onClick: K
|
|
441
441
|
}),
|
|
442
442
|
/* @__PURE__ */ M(C, {
|
|
443
|
-
open:
|
|
443
|
+
open: z,
|
|
444
444
|
header: w,
|
|
445
445
|
onClose: ie,
|
|
446
446
|
mainButtons: [{
|
|
447
|
-
label:
|
|
447
|
+
label: L,
|
|
448
448
|
onClick: ie
|
|
449
449
|
}, {
|
|
450
450
|
label: R,
|
|
@@ -455,8 +455,8 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
455
455
|
children: /* @__PURE__ */ N("div", {
|
|
456
456
|
className: "flex flex-col gap-8 px-6 py-3",
|
|
457
457
|
style: y,
|
|
458
|
-
children: [
|
|
459
|
-
let i = new Set(
|
|
458
|
+
children: [V.map((e, t) => {
|
|
459
|
+
let i = new Set(V.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
|
|
460
460
|
return /* @__PURE__ */ N("div", {
|
|
461
461
|
className: "flex flex-col gap-2",
|
|
462
462
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -471,12 +471,12 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
471
471
|
}), /* @__PURE__ */ M(f, {
|
|
472
472
|
appearance: c.Ghost,
|
|
473
473
|
size: p.Small,
|
|
474
|
-
icon: /* @__PURE__ */ M(
|
|
474
|
+
icon: /* @__PURE__ */ M(te, {
|
|
475
475
|
size: u.SM,
|
|
476
476
|
"aria-hidden": !0,
|
|
477
477
|
stroke: d
|
|
478
478
|
}),
|
|
479
|
-
"aria-label": `${
|
|
479
|
+
"aria-label": `${ne} ${t + 1}`,
|
|
480
480
|
onClick: () => oe(e.id)
|
|
481
481
|
})]
|
|
482
482
|
}), /* @__PURE__ */ N("div", {
|
|
@@ -524,22 +524,22 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
524
524
|
}, e.id);
|
|
525
525
|
}), /* @__PURE__ */ M(v, {
|
|
526
526
|
label: T,
|
|
527
|
-
iconBefore: /* @__PURE__ */ M(
|
|
527
|
+
iconBefore: /* @__PURE__ */ M(ee, {
|
|
528
528
|
size: u.SM,
|
|
529
529
|
"aria-hidden": !0,
|
|
530
530
|
stroke: d
|
|
531
531
|
}),
|
|
532
532
|
className: "self-start",
|
|
533
533
|
onClick: ae,
|
|
534
|
-
disabled:
|
|
534
|
+
disabled: V.length >= r.length
|
|
535
535
|
})]
|
|
536
536
|
})
|
|
537
537
|
})
|
|
538
538
|
]
|
|
539
539
|
});
|
|
540
540
|
}, ve = "Add tags, comma separated", ye = "deployment-creation-form-description", be = ({ values: e, errors: t, onChange: i, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: c, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = me, isNameReadOnly: m = !1, nameReadOnlyTooltip: h, nameCaption: _, isDescriptionRequired: v = !1, descriptionCaption: y, renderDescription: b, focusRequestKey: x }) => {
|
|
541
|
-
let S =
|
|
542
|
-
|
|
541
|
+
let S = H(null), C = H(null), w = H(null), T = H(!1), E = (e) => p.includes(e), D = E(Q.Name), j = E(Q.Version), P = !!(t.name || t.version || t.description), F = H(x);
|
|
542
|
+
re(() => {
|
|
543
543
|
let e = () => {
|
|
544
544
|
t.name ? S.current?.focus() : t.version ? C.current?.focus() : t.description && w.current?.focus();
|
|
545
545
|
};
|
|
@@ -639,10 +639,10 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
639
639
|
})
|
|
640
640
|
]
|
|
641
641
|
});
|
|
642
|
-
}, xe = "
|
|
642
|
+
}, xe = "desktop:flex-1", Se = "px-4 pt-4 desktop:px-6 desktop:pt-6", Ce = L(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: c, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, resizableLeftColumn: b, metadataSectionClassName: C, setupSectionClassName: T, labels: E, styles: D, dir: O }) => {
|
|
643
643
|
let k = /* @__PURE__ */ M(y, {
|
|
644
644
|
politeness: x.Assertive,
|
|
645
|
-
className: v == null ? void 0 :
|
|
645
|
+
className: v == null ? void 0 : Se,
|
|
646
646
|
children: v
|
|
647
647
|
}), A = p != null;
|
|
648
648
|
return /* @__PURE__ */ M(le, {
|
|
@@ -659,7 +659,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
659
659
|
rightContent: h == null ? void 0 : /* @__PURE__ */ M(X, {
|
|
660
660
|
title: g,
|
|
661
661
|
styles: D?.section,
|
|
662
|
-
className: s(
|
|
662
|
+
className: s(_, Y.asideSection),
|
|
663
663
|
children: h
|
|
664
664
|
}),
|
|
665
665
|
styles: D?.layout,
|
|
@@ -678,7 +678,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
678
678
|
/* @__PURE__ */ M(X, {
|
|
679
679
|
title: d === null ? void 0 : d ?? E?.metadataTitle ?? "Metadata",
|
|
680
680
|
styles: D?.section,
|
|
681
|
-
className: s(
|
|
681
|
+
className: s(C, Y.metadataSection),
|
|
682
682
|
children: u
|
|
683
683
|
}),
|
|
684
684
|
f
|
|
@@ -686,11 +686,11 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
686
686
|
centerContent: A ? /* @__PURE__ */ N(j, { children: [k, /* @__PURE__ */ M(X, {
|
|
687
687
|
title: m === null ? void 0 : m ?? E?.setupTitle ?? "Setup",
|
|
688
688
|
styles: D?.section,
|
|
689
|
-
className: s(xe,
|
|
689
|
+
className: s(xe, T, Y.setupSection),
|
|
690
690
|
children: p
|
|
691
691
|
})] }) : void 0
|
|
692
692
|
});
|
|
693
|
-
}),
|
|
693
|
+
}), we = {
|
|
694
694
|
name: {
|
|
695
695
|
label: "Name",
|
|
696
696
|
placeholder: "Enter name"
|
|
@@ -729,7 +729,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
729
729
|
saveLabel: "Save"
|
|
730
730
|
},
|
|
731
731
|
ariaLabel: "Metadata"
|
|
732
|
-
},
|
|
732
|
+
}, Te = {
|
|
733
733
|
title: "Add avatar",
|
|
734
734
|
attachLabel: "Attach",
|
|
735
735
|
emptyTitle: "This folder is empty",
|
|
@@ -753,8 +753,8 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
753
753
|
deleteConfirmItemsLabel: "items?",
|
|
754
754
|
deleteConfirmLabel: "Delete",
|
|
755
755
|
deleteCancelLabel: "Cancel"
|
|
756
|
-
},
|
|
757
|
-
let [g, _] =
|
|
756
|
+
}, Ee = L(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = me, isNameReadOnly: c, nameReadOnlyTooltip: l, nameCaption: u, isDescriptionRequired: d, descriptionCaption: f, renderDescription: p, focusRequestKey: m, labels: h }) => {
|
|
757
|
+
let [g, _] = U(!1), v = V(() => a ? s : s.filter((e) => e !== Q.Avatar), [a, s]), y = e.iconUrl, b = a?.resolveIconUrl, x = V(() => b ? b(y) : void 0, [y, b]), S = R(() => _(!0), []), C = R(() => _(!1), []), w = a?.resolveAttachedIconUrl, T = R((e) => {
|
|
758
758
|
let t = w?.(e);
|
|
759
759
|
t && n({ iconUrl: t }), _(!1);
|
|
760
760
|
}, [n, w]);
|
|
@@ -766,7 +766,7 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
766
766
|
onVersionBlur: i,
|
|
767
767
|
iconPreviewUrl: x,
|
|
768
768
|
onAddAvatarClick: S,
|
|
769
|
-
labels: h?.form ??
|
|
769
|
+
labels: h?.form ?? we,
|
|
770
770
|
availableLocaleOptions: o,
|
|
771
771
|
fields: v,
|
|
772
772
|
isNameReadOnly: c,
|
|
@@ -784,35 +784,35 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
784
784
|
FileManagerModal: a.FileManagerModal,
|
|
785
785
|
allowedMimeTypes: a.allowedMimeTypes,
|
|
786
786
|
maxFileSizeBytes: a.maxFileSizeBytes,
|
|
787
|
-
labels: h?.avatarPicker ??
|
|
787
|
+
labels: h?.avatarPicker ?? Te
|
|
788
788
|
})] });
|
|
789
789
|
}), $ = /* @__PURE__ */ function(e) {
|
|
790
790
|
return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
|
|
791
|
-
}({}),
|
|
791
|
+
}({}), De = (e, t) => e.length === t.length && e.every((e, n) => e.id === t[n].id && e.language === t[n].language && e.name === t[n].name && e.description === t[n].description), Oe = (e, t) => e.name === t.name && e.description === t.description && e.iconUrl === t.iconUrl && e.version === t.version && e.topics.length === t.topics.length && e.topics.every((e, n) => e === t.topics[n]) && De(e.otherLocales, t.otherLocales), ke = (e) => Object.values(e).every((e) => e == null), Ae = /^[a-zA-Z0-9 _.-]+$/, je = /^[a-zA-Z0-9._-]+$/, Me = /^\d+(\.\d+)*$/, Ne = "1.0.0", Pe = (n, r = {}) => {
|
|
792
792
|
let i = {}, s = n.name.trim();
|
|
793
|
-
s ? a(s, t) ? i.name = $.TooLong : r.validateNamePattern && !
|
|
793
|
+
s ? a(s, t) ? i.name = $.TooLong : r.validateNamePattern && !Ae.test(s) ? i.name = $.InvalidFormat : o(s) && (i.name = $.ControlCharacters) : i.name = $.Required, a(n.description, e) && (i.description = $.TooLong);
|
|
794
794
|
let c = n.version.trim();
|
|
795
|
-
return r.validateVersionPattern && c && ((r.validateVersionPattern instanceof RegExp ? r.validateVersionPattern :
|
|
796
|
-
},
|
|
795
|
+
return r.validateVersionPattern && c && ((r.validateVersionPattern instanceof RegExp ? r.validateVersionPattern : je).test(c) || (i.version = $.InvalidFormat)), i;
|
|
796
|
+
}, Fe = /* @__PURE__ */ new Set([$.TooLong, $.ControlCharacters]), Ie = (e, t) => ({
|
|
797
797
|
reseedKey: t,
|
|
798
798
|
values: e,
|
|
799
799
|
baseline: e,
|
|
800
800
|
touched: {},
|
|
801
801
|
hasAttemptedSubmit: !1,
|
|
802
802
|
submitAttemptCount: 0
|
|
803
|
-
}),
|
|
804
|
-
let [r, i] =
|
|
805
|
-
r.reseedKey !== n && i(
|
|
806
|
-
let a = t?.validateNamePattern, o = t?.validateVersionPattern, s =
|
|
803
|
+
}), Le = ({ initialValues: e, validationOptions: t, reseedKey: n }) => {
|
|
804
|
+
let [r, i] = U(() => Ie(e, n));
|
|
805
|
+
r.reseedKey !== n && i(Ie(e, n));
|
|
806
|
+
let a = t?.validateNamePattern, o = t?.validateVersionPattern, s = V(() => Pe(r.values, {
|
|
807
807
|
validateNamePattern: a,
|
|
808
808
|
validateVersionPattern: o
|
|
809
809
|
}), [
|
|
810
810
|
r.values,
|
|
811
811
|
a,
|
|
812
812
|
o
|
|
813
|
-
]), c =
|
|
813
|
+
]), c = V(() => {
|
|
814
814
|
if (r.hasAttemptedSubmit) return s;
|
|
815
|
-
let e = (e, t) => e && (t ||
|
|
815
|
+
let e = (e, t) => e && (t || Fe.has(e)) ? e : void 0;
|
|
816
816
|
return {
|
|
817
817
|
name: e(s.name, r.touched[Q.Name]),
|
|
818
818
|
version: e(s.version, r.touched[Q.Version]),
|
|
@@ -822,8 +822,8 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
822
822
|
s,
|
|
823
823
|
r.hasAttemptedSubmit,
|
|
824
824
|
r.touched
|
|
825
|
-
]), l =
|
|
826
|
-
|
|
825
|
+
]), l = H(s), u = H(e);
|
|
826
|
+
B(() => {
|
|
827
827
|
l.current = s, u.current = e;
|
|
828
828
|
});
|
|
829
829
|
let d = R((e) => i((t) => ({
|
|
@@ -842,8 +842,8 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
842
842
|
...e,
|
|
843
843
|
hasAttemptedSubmit: !0,
|
|
844
844
|
submitAttemptCount: e.submitAttemptCount + 1
|
|
845
|
-
})),
|
|
846
|
-
return
|
|
845
|
+
})), ke(l.current)), []), m = R((e) => i((t) => Ie(e ?? u.current, t.reseedKey)), []), h = V(() => !Oe(r.values, r.baseline), [r.values, r.baseline]);
|
|
846
|
+
return V(() => ({
|
|
847
847
|
values: r.values,
|
|
848
848
|
setValues: d,
|
|
849
849
|
touched: r.touched,
|
|
@@ -868,4 +868,4 @@ var G = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
868
868
|
]);
|
|
869
869
|
};
|
|
870
870
|
//#endregion
|
|
871
|
-
export { de as AddAvatar, pe as AvatarPickerModal, Y as BUILDER_FORM_CLASS, oe as BuilderFormContainer,
|
|
871
|
+
export { de as AddAvatar, pe as AvatarPickerModal, Y as BUILDER_FORM_CLASS, oe as BuilderFormContainer, Ne as DEFAULT_DEPLOYMENT_VERSION, we as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, be as DeploymentCreationForm, _e as DeploymentLocalesField, le as EditorLayout, X as EditorSection, Ce as EntityEditor, Q as MetadataField, Ee as MetadataForm, Ae as NAME_PATTERN, Me as SEMVER_VERSION_PATTERN, je as VERSION_PATTERN, Le as useMetadataForm, Pe as validateDeploymentCreationFields };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-builder-form",
|
|
3
3
|
"description": "Presentational builder form shells, editor layouts, and shared deployment field sets for composing and editing DIAL entities",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.296",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@tabler/icons-react": "^3.50.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
23
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.296",
|
|
24
24
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.67",
|
|
25
25
|
"react": "^19.2.8"
|
|
26
26
|
},
|