@epam/ai-dial-builder-form 1.3.0-dev.28 → 1.3.0-dev.282

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.
Files changed (34) hide show
  1. package/components/AddAvatar/AddAvatar.d.ts.map +1 -1
  2. package/components/AvatarPickerModal/AvatarPickerModal.d.ts.map +1 -1
  3. package/components/BuilderFormHeader/BuilderFormHeader.d.ts.map +1 -1
  4. package/components/DeploymentCreationForm/DeploymentCreationForm.d.ts.map +1 -1
  5. package/components/DeploymentLocalesField/DeploymentLocalesField.d.ts +5 -3
  6. package/components/DeploymentLocalesField/DeploymentLocalesField.d.ts.map +1 -1
  7. package/components/EditorLayout/EditorLayout.d.ts.map +1 -1
  8. package/components/EditorSection/EditorSection.d.ts.map +1 -1
  9. package/components/EntityEditor/EntityEditor.d.ts.map +1 -1
  10. package/components/MetadataForm/MetadataForm.d.ts.map +1 -1
  11. package/index.css +3 -2
  12. package/index.d.ts +4 -4
  13. package/index.d.ts.map +1 -1
  14. package/index.js +367 -317
  15. package/models/add-avatar-props.d.ts +2 -0
  16. package/models/add-avatar-props.d.ts.map +1 -1
  17. package/models/avatar-picker-modal.d.ts +16 -0
  18. package/models/avatar-picker-modal.d.ts.map +1 -1
  19. package/models/deployment-creation-form.d.ts +14 -1
  20. package/models/deployment-creation-form.d.ts.map +1 -1
  21. package/models/editor-layout-props.d.ts +26 -0
  22. package/models/editor-layout-props.d.ts.map +1 -1
  23. package/models/editor-section-props.d.ts +7 -0
  24. package/models/editor-section-props.d.ts.map +1 -1
  25. package/models/entity-editor-props.d.ts +4 -2
  26. package/models/entity-editor-props.d.ts.map +1 -1
  27. package/models/metadata-form-props.d.ts +5 -1
  28. package/models/metadata-form-props.d.ts.map +1 -1
  29. package/models/validation.d.ts +1 -1
  30. package/package.json +4 -4
  31. package/utils/clamp-left-column-width.d.ts +19 -0
  32. package/utils/clamp-left-column-width.d.ts.map +1 -0
  33. package/utils/validate-deployment-creation-fields.d.ts +1 -6
  34. package/utils/validate-deployment-creation-fields.d.ts.map +1 -1
package/index.js CHANGED
@@ -1,72 +1,72 @@
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
- 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, NeutralButton as y, Popup as b, PrimaryButton as x, Select as S, Spinner as C, TagInput as w, Textarea as T, TextareaResize as E } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
4
- import { IconArrowLeft as A, IconArrowNarrowLeft as j, IconPhoto as M, IconPlus as N, IconTrashX as P } from "@tabler/icons-react";
5
- import { Suspense as ee, memo as F, useCallback as I, useEffect as te, useId as ne, useLayoutEffect as L, useMemo as R, useRef as z, useState as B } from "react";
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
+ 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 L, IconTrashX as ee } from "@tabler/icons-react";
5
+ import { Suspense as te, memo as ne, useCallback as R, useEffect as z, useId as B, useLayoutEffect as V, useMemo as H, useRef as U, useState as W } from "react";
6
6
  //#region src/components/BuilderFormActions/BuilderFormActions.tsx
7
- var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubmitDisabled: i = !1, isSubmitting: a = !1, buttonClassName: o }) => /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(y, {
7
+ var G = ({ 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,
11
11
  className: o
12
- }), /* @__PURE__ */ O(x, {
12
+ }), /* @__PURE__ */ M(w, {
13
13
  label: e.submitButtonLabel,
14
14
  onClick: n,
15
15
  disabled: i,
16
16
  "aria-busy": a,
17
17
  className: o,
18
- iconBefore: a ? /* @__PURE__ */ O("span", {
18
+ iconBefore: a ? /* @__PURE__ */ M("span", {
19
19
  "aria-hidden": !0,
20
- children: /* @__PURE__ */ O(C, { size: u.SM })
20
+ children: /* @__PURE__ */ M(D, { size: u.SM })
21
21
  }) : void 0
22
- })] }), H = {
22
+ })] }), K = {
23
23
  body: "_body_1xd7h_2",
24
24
  sideColumn: "_sideColumn_1xd7h_6",
25
25
  reservedColumn: "_reservedColumn_1xd7h_10"
26
- }, U = s("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", H.sideColumn), re = ({ left: e, children: t, metadata: n, layout: r }) => {
26
+ }, re = s("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", K.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
- return /* @__PURE__ */ k("div", {
29
- className: s("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden", H.body),
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", K.body),
30
30
  style: o,
31
31
  children: [
32
- e != null && /* @__PURE__ */ O("div", {
33
- className: U,
32
+ e != null && /* @__PURE__ */ M("div", {
33
+ className: re,
34
34
  style: a,
35
35
  children: e
36
36
  }),
37
- /* @__PURE__ */ O("div", {
37
+ /* @__PURE__ */ M("div", {
38
38
  className: "flex w-full min-w-0 flex-1 flex-col desktop:min-h-0 desktop:overflow-y-auto",
39
39
  children: t
40
40
  }),
41
- n != null && /* @__PURE__ */ O("div", {
42
- className: U,
41
+ n != null && /* @__PURE__ */ M("div", {
42
+ className: re,
43
43
  style: a,
44
44
  children: n
45
45
  }),
46
- i && /* @__PURE__ */ O("div", {
46
+ i && /* @__PURE__ */ M("div", {
47
47
  "aria-hidden": !0,
48
48
  style: a,
49
- className: s(H.reservedColumn, H.sideColumn)
49
+ className: s(K.reservedColumn, K.sideColumn)
50
50
  })
51
51
  ]
52
52
  });
53
- }, W = {
53
+ }, q = {
54
54
  header: "_header_lon83_4",
55
55
  actions: "_actions_lon83_18",
56
56
  title: "_title_lon83_27"
57
- }, ie = ({ labels: e, onBack: t, onCancel: n, onSubmit: r, isCancelDisabled: a = !1, isSubmitDisabled: o = !1, isSubmitting: c = !1, backIcon: l, styles: f }) => {
58
- let { colors: p, typography: m } = f ?? {}, g = m?.fontClassName ?? "dial-h1-text", _ = !!m?.fontClassName;
59
- return /* @__PURE__ */ k("div", {
60
- style: i({
61
- "--bfh-border": p?.borderColor,
62
- "--bfh-font-family": _ ? void 0 : m?.fontFamily
63
- }),
64
- className: s("flex min-h-16 shrink-0 items-center justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:px-8 desktop:py-0", W.header),
57
+ }, ae = ({ labels: e, onBack: t, onCancel: n, onSubmit: r, isCancelDisabled: a = !1, isSubmitDisabled: o = !1, isSubmitting: c = !1, backIcon: l, styles: f }) => {
58
+ let { colors: p, typography: m } = f ?? {}, g = m?.fontClassName ?? "dial-h1-text", _ = !!m?.fontClassName, v = i({
59
+ "--bfh-border": p?.borderColor,
60
+ "--bfh-font-family": _ ? void 0 : m?.fontFamily
61
+ });
62
+ return /* @__PURE__ */ N("div", {
63
+ style: v,
64
+ className: s("flex min-h-16 shrink-0 items-center justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:px-8 desktop:py-0", q.header),
65
65
  children: [
66
- /* @__PURE__ */ k("div", {
66
+ /* @__PURE__ */ N("div", {
67
67
  className: "flex min-w-0 flex-1 items-center gap-2",
68
- children: [/* @__PURE__ */ O(h, {
69
- icon: l === void 0 ? /* @__PURE__ */ O(A, {
68
+ children: [/* @__PURE__ */ M(h, {
69
+ icon: l === void 0 ? /* @__PURE__ */ M(P, {
70
70
  size: u.LG,
71
71
  className: "rtl:scale-x-[-1]",
72
72
  "aria-hidden": !0,
@@ -74,14 +74,14 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
74
74
  }) : l,
75
75
  "aria-label": e.backButtonLabel,
76
76
  onClick: t
77
- }), /* @__PURE__ */ O("h1", {
78
- className: s("truncate", W.title, g),
77
+ }), /* @__PURE__ */ M("h1", {
78
+ className: s("truncate", q.title, g),
79
79
  children: e.title
80
80
  })]
81
81
  }),
82
- /* @__PURE__ */ O("div", {
83
- className: s("items-center gap-2", W.actions),
84
- children: /* @__PURE__ */ O(V, {
82
+ /* @__PURE__ */ M("div", {
83
+ className: s("items-center gap-2", q.actions),
84
+ children: /* @__PURE__ */ M(G, {
85
85
  labels: e,
86
86
  onCancel: n,
87
87
  onSubmit: r,
@@ -90,27 +90,26 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
90
90
  isSubmitting: c
91
91
  })
92
92
  }),
93
- /* @__PURE__ */ O("span", {
94
- role: "status",
95
- "aria-live": "polite",
96
- className: "sr-only",
93
+ /* @__PURE__ */ M(y, {
94
+ visuallyHidden: !0,
95
+ as: b.Span,
97
96
  children: c ? e.submittingLabel ?? "Submitting" : ""
98
97
  })
99
98
  ]
100
99
  });
101
- }, G = {
100
+ }, J = {
102
101
  container: "_container_14mfe_1",
103
102
  footer: "_footer_14mfe_10"
104
- }, K = ({ labels: e, onBack: t, onCancel: n, onSubmit: r, isCancelDisabled: a = !1, isSubmitDisabled: o = !1, isSubmitting: c = !1, backIcon: l, className: u, left: d, children: f, metadata: p, layout: m, styles: h }) => {
103
+ }, oe = ({ labels: e, onBack: t, onCancel: n, onSubmit: r, isCancelDisabled: a = !1, isSubmitDisabled: o = !1, isSubmitting: c = !1, backIcon: l, className: u, left: d, children: f, metadata: p, layout: m, styles: h }) => {
105
104
  let { colors: g, header: _, cssVars: v } = h ?? {};
106
- return /* @__PURE__ */ k("div", {
105
+ return /* @__PURE__ */ N("div", {
107
106
  style: {
108
107
  ...i({ "--bfc-bg": g?.background }),
109
108
  ...v
110
109
  },
111
- className: s("flex h-full min-h-0 w-full flex-col overflow-hidden", u, G.container),
110
+ className: s("flex h-full min-h-0 w-full flex-col overflow-hidden", u, J.container),
112
111
  children: [
113
- /* @__PURE__ */ O(ie, {
112
+ /* @__PURE__ */ M(ae, {
114
113
  labels: e,
115
114
  onBack: t,
116
115
  onCancel: n,
@@ -121,15 +120,15 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
121
120
  backIcon: l,
122
121
  styles: _
123
122
  }),
124
- /* @__PURE__ */ O(re, {
123
+ /* @__PURE__ */ M(ie, {
125
124
  left: d,
126
125
  metadata: p,
127
126
  layout: m,
128
127
  children: f
129
128
  }),
130
- /* @__PURE__ */ O("div", {
131
- className: s("sticky bottom-0 z-10 items-center gap-2 p-3 shadow-sm", G.footer),
132
- children: /* @__PURE__ */ O(V, {
129
+ /* @__PURE__ */ M("div", {
130
+ className: s("sticky bottom-0 z-10 items-center gap-2 p-3 shadow-sm", J.footer),
131
+ children: /* @__PURE__ */ M(G, {
133
132
  labels: e,
134
133
  onCancel: n,
135
134
  onSubmit: r,
@@ -141,55 +140,68 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
141
140
  })
142
141
  ]
143
142
  });
144
- }, q = {
143
+ }, Y = {
145
144
  layout: "dial-builder-form-layout",
146
145
  section: "dial-builder-form-section",
147
146
  metadataSection: "dial-builder-form-metadata-section",
148
147
  setupSection: "dial-builder-form-setup-section",
149
148
  asideSection: "dial-builder-form-aside-section"
150
- }, J = {
149
+ }, se = {
151
150
  section: "_section_l1mnx_1",
152
151
  title: "_title_l1mnx_5"
153
- }, Y = ({ title: e, children: t, styles: n, className: r }) => {
152
+ }, X = ({ title: e, children: t, styles: n, className: r }) => {
154
153
  let a = i({
155
154
  "--es-border-color": n?.colors?.borderColor,
156
155
  "--es-title-color": n?.colors?.titleColor
157
156
  });
158
- return /* @__PURE__ */ k("section", {
159
- className: s("flex h-full flex-col gap-4 rounded border p-6", J.section, r, q.section),
157
+ return /* @__PURE__ */ N("section", {
158
+ className: s("flex h-full flex-col gap-4 rounded border p-6", se.section, r, Y.section),
160
159
  style: a,
161
- children: [e != null && /* @__PURE__ */ O("h2", {
162
- className: s("dial-h3-text", J.title),
160
+ children: [e != null && /* @__PURE__ */ M("h2", {
161
+ className: s(n?.typography?.titleClassName ?? "dial-h3-text", se.title),
163
162
  children: e
164
163
  }), t]
165
164
  });
166
- }, X = {
165
+ }, ce = (e, { min: t = 280, max: n = 640, containerWidth: r } = {}) => {
166
+ let i = r != null && r > 0 ? r - 360 : n;
167
+ return Math.round(Math.min(Math.max(t, Math.min(n, i)), Math.max(t, Number.isFinite(e) ? e : t)));
168
+ }, Z = {
167
169
  headerBorder: "_headerBorder_1adw2_1",
168
170
  footerBorder: "_footerBorder_1adw2_5",
169
171
  columnBorder: "_columnBorder_1adw2_10"
170
- }, ae = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: a, centerContent: o, rightContent: c, isSaving: l = !1, labels: f, styles: p, dir: m }) => {
171
- let g = ne(), _ = l ? f?.savingStatusLabel ?? "Saving" : "", v = i({
172
- "--el-header-border-color": p?.colors?.headerBorderColor,
173
- "--el-sidebar-border-color": p?.colors?.sidebarBorderColor
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 _ = B(), v = f ? p?.savingStatusLabel ?? "Saving" : "", x = U(null), [S, C] = W(), w = l != null && o != null, E = l?.minWidth, D = l?.maxWidth, O = {
174
+ min: E,
175
+ max: D,
176
+ containerWidth: S
177
+ }, k = w ? ce(l.width, O) : void 0, A = ce(D ?? 640, O);
178
+ z(() => {
179
+ let e = x.current;
180
+ if (!w || e == null || typeof ResizeObserver > "u") return;
181
+ let t = new ResizeObserver(() => C(e.clientWidth));
182
+ return t.observe(e), () => t.disconnect();
183
+ }, [w]);
184
+ let j = i({
185
+ "--el-header-border-color": m?.colors?.headerBorderColor,
186
+ "--el-sidebar-border-color": m?.colors?.sidebarBorderColor
174
187
  });
175
- return /* @__PURE__ */ k("div", {
176
- dir: m,
177
- className: s("flex min-h-0 flex-1 flex-col", q.layout),
178
- style: v,
188
+ return /* @__PURE__ */ N("div", {
189
+ dir: g,
190
+ className: s("flex min-h-0 flex-1 flex-col", Y.layout),
191
+ style: j,
179
192
  children: [
180
- /* @__PURE__ */ O("span", {
181
- role: "status",
182
- "aria-live": "polite",
183
- className: "sr-only",
184
- id: g,
185
- children: _
193
+ /* @__PURE__ */ M(y, {
194
+ visuallyHidden: !0,
195
+ as: b.Span,
196
+ id: _,
197
+ children: v
186
198
  }),
187
- /* @__PURE__ */ k("div", {
188
- className: s("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", X.headerBorder),
189
- children: [/* @__PURE__ */ k("div", {
199
+ /* @__PURE__ */ N("div", {
200
+ className: s("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", Z.headerBorder),
201
+ children: [/* @__PURE__ */ N("div", {
190
202
  className: "flex min-w-0 flex-1 items-center gap-2",
191
- children: [/* @__PURE__ */ O(h, {
192
- icon: /* @__PURE__ */ O(j, {
203
+ children: [/* @__PURE__ */ M(h, {
204
+ icon: /* @__PURE__ */ M(F, {
193
205
  size: u.LG,
194
206
  stroke: d,
195
207
  "aria-hidden": !0,
@@ -197,71 +209,85 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
197
209
  }),
198
210
  "aria-label": n,
199
211
  onClick: t
200
- }), /* @__PURE__ */ O("h1", {
201
- className: "dial-h2-text min-w-0 truncate",
212
+ }), /* @__PURE__ */ M("h1", {
213
+ className: s(m?.typography?.titleClassName ?? "dial-h2-text", "min-w-0 truncate"),
202
214
  children: e
203
215
  })]
204
- }), r != null && /* @__PURE__ */ O("div", {
216
+ }), r != null && /* @__PURE__ */ M("div", {
205
217
  className: "hidden shrink-0 items-center gap-2 desktop:flex",
206
218
  children: r
207
219
  })]
208
220
  }),
209
- /* @__PURE__ */ k("div", {
221
+ /* @__PURE__ */ N("div", {
222
+ ref: x,
210
223
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
211
224
  children: [
212
- /* @__PURE__ */ O("div", {
213
- className: s(o == null ? "desktop:flex-1" : "desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", "desktop:overflow-y-auto", o == null ? void 0 : X.columnBorder),
225
+ /* @__PURE__ */ M("div", {
226
+ className: s(o == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", o != null && !w && "desktop:w-[400px]", w && "desktop:relative desktop:w-(--el-left-width)", "desktop:overflow-y-auto", o == null ? void 0 : Z.columnBorder),
227
+ style: k == null ? void 0 : { "--el-left-width": `${k}px` },
214
228
  children: a
215
229
  }),
216
- o != null && /* @__PURE__ */ O("div", {
230
+ w && k != null && /* @__PURE__ */ M("div", {
231
+ className: "relative hidden w-0 shrink-0 desktop:block",
232
+ children: /* @__PURE__ */ M(T, {
233
+ width: k,
234
+ minWidth: E ?? 280,
235
+ maxWidth: A,
236
+ defaultWidth: l.defaultWidth ?? 400,
237
+ onWidthChange: l.onWidthChange,
238
+ label: p?.resizeHandleLabel ?? "Resize columns",
239
+ tooltip: p?.resizeHandleTooltip ?? "Drag to resize"
240
+ })
241
+ }),
242
+ o != null && /* @__PURE__ */ M("div", {
217
243
  className: "desktop:flex desktop:min-h-0 desktop:flex-1 desktop:flex-col desktop:overflow-y-auto",
218
244
  children: o
219
245
  }),
220
- c != null && /* @__PURE__ */ O("div", {
221
- className: s("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", X.columnBorder),
246
+ c != null && /* @__PURE__ */ M("div", {
247
+ className: s("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", Z.columnBorder),
222
248
  children: c
223
249
  })
224
250
  ]
225
251
  }),
226
- r != null && /* @__PURE__ */ O("div", {
227
- className: s("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", X.footerBorder),
252
+ r != null && /* @__PURE__ */ M("div", {
253
+ className: s("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 *:flex-1 desktop:hidden", Z.footerBorder),
228
254
  children: r
229
255
  })
230
256
  ]
231
257
  });
232
- }, Z = {
258
+ }, ue = {
233
259
  box: "_box_c9as8_1",
234
260
  icon: "_icon_c9as8_6",
235
261
  caption: "_caption_c9as8_10"
236
- }, oe = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: a = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: o, styles: c, className: l }) => {
237
- let f = i({
238
- "--aa-box-bg": c?.colors?.boxBackgroundColor,
239
- "--aa-box-border": c?.colors?.boxBorderColor,
240
- "--aa-icon": c?.colors?.placeholderIconColor,
241
- "--aa-caption": c?.colors?.captionColor
262
+ }, de = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: a = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: o, captionClassName: c = "dial-tiny-text", styles: l, className: f }) => {
263
+ let h = i({
264
+ "--aa-box-bg": l?.colors?.boxBackgroundColor,
265
+ "--aa-box-border": l?.colors?.boxBorderColor,
266
+ "--aa-icon": l?.colors?.placeholderIconColor,
267
+ "--aa-caption": l?.colors?.captionColor
242
268
  });
243
- return /* @__PURE__ */ k("div", {
244
- className: s("flex flex-col gap-2", l),
245
- style: f,
246
- children: [/* @__PURE__ */ O(_, { label: e }), /* @__PURE__ */ k("div", {
269
+ return /* @__PURE__ */ N("div", {
270
+ className: s("flex flex-col gap-2", f),
271
+ style: h,
272
+ children: [/* @__PURE__ */ M(_, { label: e }), /* @__PURE__ */ N("div", {
247
273
  className: "flex items-start gap-3",
248
- children: [/* @__PURE__ */ O("div", {
249
- className: s("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Z.box),
250
- children: t ? /* @__PURE__ */ O("img", {
274
+ children: [/* @__PURE__ */ M("div", {
275
+ className: s("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", ue.box),
276
+ children: t ? /* @__PURE__ */ M("img", {
251
277
  src: t,
252
278
  alt: n,
253
279
  className: "h-16 w-16 object-cover"
254
- }) : /* @__PURE__ */ O(M, {
280
+ }) : /* @__PURE__ */ M(I, {
255
281
  size: u.LG,
256
282
  stroke: d,
257
283
  "aria-hidden": !0,
258
- className: Z.icon
284
+ className: ue.icon
259
285
  })
260
- }), /* @__PURE__ */ k("div", {
286
+ }), /* @__PURE__ */ N("div", {
261
287
  className: "flex flex-col gap-3",
262
- children: [/* @__PURE__ */ O(m, {
288
+ children: [/* @__PURE__ */ M(m, {
263
289
  size: p.Small,
264
- iconBefore: /* @__PURE__ */ O(N, {
290
+ iconBefore: /* @__PURE__ */ M(L, {
265
291
  size: u.SM,
266
292
  stroke: d,
267
293
  "aria-hidden": !0
@@ -269,182 +295,200 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
269
295
  className: "w-fit",
270
296
  label: r,
271
297
  onClick: o
272
- }), /* @__PURE__ */ O("span", {
273
- className: s("dial-tiny-text", Z.caption),
298
+ }), /* @__PURE__ */ M("span", {
299
+ className: s(c, ue.caption),
274
300
  children: a
275
301
  })]
276
302
  })]
277
303
  })]
278
304
  });
279
- }, se = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: o, labels: s }) => {
280
- let c = I((e) => e.length === 1 ? s.deleteConfirmTitleSingle : s.deleteConfirmTitleMultiple, [s.deleteConfirmTitleSingle, s.deleteConfirmTitleMultiple]), l = I((e) => /* @__PURE__ */ O("div", {
281
- className: "dial-small-text px-6 py-3",
282
- children: /* @__PURE__ */ O("p", {
283
- className: "mb-3 text-secondary",
284
- children: e.length === 1 ? /* @__PURE__ */ k(D, { children: [
285
- s.deleteConfirmSingleText,
305
+ }, fe = {
306
+ confirmText: "_confirmText_19ec1_1",
307
+ confirmItem: "_confirmItem_19ec1_5"
308
+ }, pe = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: a, allowedMimeTypes: o, maxFileSizeBytes: c, labels: l, confirmBodyClassName: u = "dial-small-text", styles: d }) => {
309
+ let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ M("div", {
310
+ className: s(u, "px-6 py-3"),
311
+ style: i({
312
+ "--apm-confirm-text": f,
313
+ "--apm-confirm-item-text": p
314
+ }),
315
+ children: /* @__PURE__ */ M("p", {
316
+ className: s("mb-3", fe.confirmText),
317
+ children: e.length === 1 ? /* @__PURE__ */ N(j, { children: [
318
+ l.deleteConfirmSingleText,
286
319
  " ",
287
- /* @__PURE__ */ k("span", {
288
- className: "break-words text-primary",
320
+ /* @__PURE__ */ N("span", {
321
+ className: s("wrap-break-word", fe.confirmItem),
289
322
  children: [
290
323
  "\"",
291
324
  e[0].split("/").pop(),
292
325
  "\"?"
293
326
  ]
294
327
  })
295
- ] }) : /* @__PURE__ */ k(D, { children: [
296
- s.deleteConfirmMultipleText,
328
+ ] }) : /* @__PURE__ */ N(j, { children: [
329
+ l.deleteConfirmMultipleText,
297
330
  " ",
298
- /* @__PURE__ */ k("span", {
299
- className: "text-primary",
331
+ /* @__PURE__ */ N("span", {
332
+ className: fe.confirmItem,
300
333
  children: [
301
334
  e.length,
302
335
  " ",
303
- s.deleteConfirmItemsLabel
336
+ l.deleteConfirmItemsLabel
304
337
  ]
305
338
  })
306
339
  ] })
307
340
  })
308
341
  }), [
309
- s.deleteConfirmSingleText,
310
- s.deleteConfirmMultipleText,
311
- s.deleteConfirmItemsLabel
342
+ l.deleteConfirmSingleText,
343
+ l.deleteConfirmMultipleText,
344
+ l.deleteConfirmItemsLabel,
345
+ f,
346
+ p,
347
+ u
312
348
  ]);
313
- return /* @__PURE__ */ O(ee, {
349
+ return /* @__PURE__ */ M(te, {
314
350
  fallback: null,
315
- children: e && /* @__PURE__ */ O(i, {
351
+ children: e && /* @__PURE__ */ M(a, {
316
352
  isOpen: e,
317
353
  onClose: t,
318
354
  onAttach: n,
319
355
  bucket: r,
320
- allowedTypes: a,
321
- maxSelectableFileSize: o,
356
+ allowedTypes: o,
357
+ maxSelectableFileSize: c,
322
358
  maximumAttachmentsAmount: 1,
323
359
  canAttachFolders: !1,
324
- title: s.title,
325
- attachLabel: s.attachLabel,
326
- emptyTitle: s.emptyTitle,
327
- emptyDescription: s.emptyDescription,
328
- errorMessage: s.errorMessage,
329
- retryLabel: s.retryLabel,
330
- hiddenFilesLabel: s.hiddenFilesLabel,
331
- showHiddenFilesLabel: s.showHiddenFilesLabel,
332
- hideHiddenFilesLabel: s.hideHiddenFilesLabel,
333
- getSelectionLabel: s.getSelectionLabel,
334
- uploadFilesLabel: s.uploadFilesLabel,
335
- newFolderLabel: s.newFolderLabel,
336
- downloadLabel: s.downloadLabel,
337
- downloadingLabel: s.downloadingLabel,
338
- deleteLabel: s.deleteLabel,
339
- deletingLabel: s.deletingLabel,
340
- deleteConfirmTitle: c,
341
- deleteConfirmBody: l,
342
- deleteConfirmLabel: s.deleteConfirmLabel,
343
- deleteCancelLabel: s.deleteCancelLabel
360
+ title: l.title,
361
+ attachLabel: l.attachLabel,
362
+ emptyTitle: l.emptyTitle,
363
+ emptyDescription: l.emptyDescription,
364
+ errorMessage: l.errorMessage,
365
+ retryLabel: l.retryLabel,
366
+ hiddenFilesLabel: l.hiddenFilesLabel,
367
+ showHiddenFilesLabel: l.showHiddenFilesLabel,
368
+ hideHiddenFilesLabel: l.hideHiddenFilesLabel,
369
+ getSelectionLabel: l.getSelectionLabel,
370
+ uploadFilesLabel: l.uploadFilesLabel,
371
+ newFolderLabel: l.newFolderLabel,
372
+ downloadLabel: l.downloadLabel,
373
+ downloadingLabel: l.downloadingLabel,
374
+ deleteLabel: l.deleteLabel,
375
+ deletingLabel: l.deletingLabel,
376
+ deleteConfirmTitle: m,
377
+ deleteConfirmBody: h,
378
+ deleteConfirmLabel: l.deleteConfirmLabel,
379
+ deleteCancelLabel: l.deleteCancelLabel
344
380
  })
345
381
  });
346
382
  }, Q = /* @__PURE__ */ function(e) {
347
383
  return e.Avatar = "avatar", e.Name = "name", e.Version = "version", e.Description = "description", e.Locales = "locales", e.Tags = "tags", e;
348
- }({}), ce = [
384
+ }({}), me = [
349
385
  "avatar",
350
386
  "name",
351
387
  "version",
352
388
  "description",
353
389
  "locales",
354
390
  "tags"
355
- ], le = (e, t, n) => ({
391
+ ], he = {
392
+ summary: "_summary_1hlc9_1",
393
+ rowLabel: "_rowLabel_1hlc9_5"
394
+ }, ge = (e, t, n) => ({
356
395
  id: e,
357
396
  language: n.find((e) => !t.has(e.code))?.code ?? "",
358
397
  name: "",
359
398
  description: ""
360
- }), ue = ({ value: e, onChange: t, availableLocaleOptions: r = [], labels: i, className: a, summaryClassName: o = "dial-body-text text-secondary", rowLabelClassName: m = "dial-tiny-lead-text text-secondary" }) => {
361
- let { summaryLabel: h, addLabel: _, editLabel: y, popupTitle: x, addLocaleLabel: C, localeRowLabel: w = "Locale", languageLabel: D, nameLabel: A, namePlaceholder: j, descriptionLabel: M, descriptionPlaceholder: ee, deleteAriaLabel: F, cancelLabel: I = "Cancel", saveLabel: ne = "Save" } = i, [L, R] = B(!1), [V, H] = B([]), U = z(0);
362
- te(() => {
363
- L && H(e.length > 0 ? e : [le(`locale-row-${++U.current}`, /* @__PURE__ */ new Set(), r)]);
399
+ }), _e = ({ value: e, onChange: t, availableLocaleOptions: r = [], labels: a, className: o, summaryClassName: m = "dial-body-text", rowLabelClassName: h = "dial-tiny-lead-text", colors: _ }) => {
400
+ let y = i({
401
+ "--dlf-summary-text": _?.summaryText,
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: te, cancelLabel: ne = "Cancel", saveLabel: R = "Save" } = a, [B, V] = W(!1), [H, G] = W([]), K = U(0);
404
+ z(() => {
405
+ B && G(e.length > 0 ? e : [ge(`locale-row-${++K.current}`, /* @__PURE__ */ new Set(), r)]);
364
406
  }, [
365
- L,
407
+ B,
366
408
  e,
367
409
  r
368
410
  ]);
369
- let re = () => R(!0), W = () => R(!1), ie = () => {
370
- t(V.filter((e) => e.language && e.name)), R(!1);
371
- }, G = () => {
372
- let e = new Set(V.map((e) => e.language).filter(Boolean));
373
- H((t) => [...t, le(`locale-row-${++U.current}`, e, r)]);
374
- }, K = (e, t) => {
375
- H((n) => n.map((n) => n.id === e ? {
411
+ let re = () => V(!0), ie = () => V(!1), q = () => {
412
+ t(H.filter((e) => e.language && e.name)), V(!1);
413
+ }, ae = () => {
414
+ let e = new Set(H.map((e) => e.language).filter(Boolean));
415
+ G((t) => [...t, ge(`locale-row-${++K.current}`, e, r)]);
416
+ }, J = (e, t) => {
417
+ G((n) => n.map((n) => n.id === e ? {
376
418
  ...n,
377
419
  ...t
378
420
  } : n));
379
- }, q = (e) => {
380
- H((t) => t.filter((t) => t.id !== e));
381
- }, J = (e) => r.find((t) => t.code === e)?.label ?? e.toUpperCase(), Y = V.some((e) => !e.language || !e.name);
382
- return r.length === 0 ? null : /* @__PURE__ */ k("div", {
383
- className: s("flex items-center gap-2", a),
421
+ }, oe = (e) => {
422
+ G((t) => t.filter((t) => t.id !== e));
423
+ }, Y = (e) => r.find((t) => t.code === e)?.label ?? e.toUpperCase(), se = H.some((e) => !e.language || !e.name);
424
+ return r.length === 0 ? null : /* @__PURE__ */ N("div", {
425
+ className: s("flex items-center gap-2", o),
426
+ style: y,
384
427
  children: [
385
- e.length > 0 && /* @__PURE__ */ O("span", {
386
- className: o,
387
- children: `${h}: ${e.map((e) => `[${J(e.language)}]`).join(", ")}`
428
+ e.length > 0 && /* @__PURE__ */ M("span", {
429
+ className: s(he.summary, m),
430
+ children: `${b}: ${e.map((e) => `[${Y(e.language)}]`).join(", ")}`
388
431
  }),
389
- /* @__PURE__ */ O(v, {
390
- label: e.length > 0 ? y : _,
391
- iconBefore: /* @__PURE__ */ O(N, {
432
+ /* @__PURE__ */ M(v, {
433
+ label: e.length > 0 ? S : x,
434
+ iconBefore: /* @__PURE__ */ M(L, {
392
435
  size: u.SM,
393
436
  "aria-hidden": !0,
394
437
  stroke: d
395
438
  }),
396
- className: "!px-0",
439
+ className: "px-0!",
397
440
  onClick: re
398
441
  }),
399
- /* @__PURE__ */ O(b, {
400
- open: L,
401
- header: x,
402
- onClose: W,
442
+ /* @__PURE__ */ M(C, {
443
+ open: B,
444
+ header: w,
445
+ onClose: ie,
403
446
  mainButtons: [{
404
- label: I,
405
- onClick: W
406
- }, {
407
447
  label: ne,
408
- variant: l.Primary,
409
- disabled: Y,
410
448
  onClick: ie
449
+ }, {
450
+ label: R,
451
+ variant: l.Primary,
452
+ disabled: se,
453
+ onClick: q
411
454
  }],
412
- children: /* @__PURE__ */ k("div", {
455
+ children: /* @__PURE__ */ N("div", {
413
456
  className: "flex flex-col gap-8 px-6 py-3",
414
- children: [V.map((e, t) => {
415
- let i = new Set(V.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
416
- return /* @__PURE__ */ k("div", {
457
+ style: y,
458
+ children: [H.map((e, t) => {
459
+ let i = new Set(H.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
460
+ return /* @__PURE__ */ N("div", {
417
461
  className: "flex flex-col gap-2",
418
- children: [/* @__PURE__ */ k("div", {
462
+ children: [/* @__PURE__ */ N("div", {
419
463
  className: "flex items-center justify-between",
420
- children: [/* @__PURE__ */ k("span", {
421
- className: m,
464
+ children: [/* @__PURE__ */ N("span", {
465
+ className: s(he.rowLabel, h),
422
466
  children: [
423
- w,
467
+ D,
424
468
  " ",
425
469
  t + 1
426
470
  ]
427
- }), /* @__PURE__ */ O(f, {
471
+ }), /* @__PURE__ */ M(f, {
428
472
  appearance: c.Ghost,
429
473
  size: p.Small,
430
- icon: /* @__PURE__ */ O(P, {
474
+ icon: /* @__PURE__ */ M(ee, {
431
475
  size: u.SM,
432
476
  "aria-hidden": !0,
433
477
  stroke: d
434
478
  }),
435
- "aria-label": `${F} ${t + 1}`,
436
- onClick: () => q(e.id)
479
+ "aria-label": `${te} ${t + 1}`,
480
+ onClick: () => oe(e.id)
437
481
  })]
438
- }), /* @__PURE__ */ k("div", {
482
+ }), /* @__PURE__ */ N("div", {
439
483
  role: "group",
440
- "aria-label": `${w} ${t + 1}`,
484
+ "aria-label": `${D} ${t + 1}`,
441
485
  className: "flex flex-col gap-5",
442
- children: [/* @__PURE__ */ k("div", {
486
+ children: [/* @__PURE__ */ N("div", {
443
487
  className: "flex flex-col gap-5 desktop:flex-row desktop:items-start",
444
- children: [/* @__PURE__ */ O(S, {
488
+ children: [/* @__PURE__ */ M(E, {
445
489
  id: `${e.id}-language`,
446
490
  labelProps: {
447
- label: D,
491
+ label: O,
448
492
  required: !0
449
493
  },
450
494
  className: "desktop:shrink-0 desktop:basis-40",
@@ -454,86 +498,83 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
454
498
  disabled: i.has(e.code)
455
499
  })),
456
500
  value: e.language,
457
- onChange: (t) => K(e.id, { language: t })
458
- }), /* @__PURE__ */ O(g, {
501
+ onChange: (t) => J(e.id, { language: t })
502
+ }), /* @__PURE__ */ M(g, {
459
503
  id: `${e.id}-name`,
460
504
  containerClassName: "min-w-0 flex-1",
461
505
  required: !0,
462
506
  value: e.name,
463
- onChange: (t) => K(e.id, { name: t ?? "" }),
507
+ onChange: (t) => J(e.id, { name: t ?? "" }),
464
508
  labelProps: {
465
- label: A,
509
+ label: j,
466
510
  required: !0
467
511
  },
468
- placeholder: j
512
+ placeholder: P
469
513
  })]
470
- }), /* @__PURE__ */ O(T, {
514
+ }), /* @__PURE__ */ M(k, {
471
515
  id: `${e.id}-description`,
472
516
  className: n,
473
- resize: E.Vertical,
517
+ resize: A.Vertical,
474
518
  value: e.description,
475
- onChange: (t) => K(e.id, { description: t }),
476
- labelProps: { label: M },
477
- placeholder: ee
519
+ onChange: (t) => J(e.id, { description: t }),
520
+ labelProps: { label: F },
521
+ placeholder: I
478
522
  })]
479
523
  })]
480
524
  }, e.id);
481
- }), /* @__PURE__ */ O(v, {
482
- label: C,
483
- iconBefore: /* @__PURE__ */ O(N, {
525
+ }), /* @__PURE__ */ M(v, {
526
+ label: T,
527
+ iconBefore: /* @__PURE__ */ M(L, {
484
528
  size: u.SM,
485
529
  "aria-hidden": !0,
486
530
  stroke: d
487
531
  }),
488
532
  className: "self-start",
489
- onClick: G,
490
- disabled: V.length >= r.length
533
+ onClick: ae,
534
+ disabled: H.length >= r.length
491
535
  })]
492
536
  })
493
537
  })
494
538
  ]
495
539
  });
496
- }, de = "Add tags, comma separated", fe = "deployment-creation-form-description", pe = ({ values: e, errors: t, onChange: i, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: c, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = ce, isNameReadOnly: m = !1, nameCaption: h, isDescriptionRequired: _ = !1, renderDescription: v, focusRequestKey: y }) => {
497
- let b = z(null), x = z(null), S = z(null), C = z(!1), D = (e) => p.includes(e), A = D(Q.Name), j = D(Q.Version), M = !!(t.name || t.version || t.description), N = z(y);
498
- te(() => {
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 = U(null), C = U(null), w = U(null), T = U(!1), E = (e) => p.includes(e), D = E(Q.Name), j = E(Q.Version), P = !!(t.name || t.version || t.description), F = U(x);
542
+ z(() => {
499
543
  let e = () => {
500
- t.name ? b.current?.focus() : t.version ? x.current?.focus() : t.description && S.current?.focus();
544
+ t.name ? S.current?.focus() : t.version ? C.current?.focus() : t.description && w.current?.focus();
501
545
  };
502
- if (y !== void 0) {
503
- y !== N.current && (N.current = y, e());
504
- return;
505
- }
506
- M && !C.current && e(), C.current = M;
546
+ x === void 0 ? (P && !T.current && e(), T.current = P) : x !== F.current && (F.current = x, e());
507
547
  }, [
508
- y,
509
- M,
548
+ x,
549
+ P,
510
550
  t.name,
511
551
  t.version,
512
552
  t.description
513
553
  ]);
514
- let P = /* @__PURE__ */ O(T, {
515
- id: fe,
516
- ref: S,
554
+ let I = /* @__PURE__ */ M(k, {
555
+ id: ye,
556
+ ref: w,
517
557
  value: e.description,
518
558
  onChange: (e) => i({ description: e }),
519
- "aria-required": _ || void 0,
520
- labelProps: v ? void 0 : {
559
+ "aria-required": v || void 0,
560
+ labelProps: b ? void 0 : {
521
561
  label: u.description.label,
522
- required: _
562
+ required: v
523
563
  },
524
564
  placeholder: u.description.placeholder,
565
+ caption: y,
525
566
  error: t.description || void 0,
526
567
  invalid: !!t.description,
527
- containerClassName: v ? void 0 : d?.field,
568
+ containerClassName: b ? void 0 : d?.field,
528
569
  className: n,
529
- resize: E.Vertical
570
+ resize: A.Vertical
530
571
  });
531
- return /* @__PURE__ */ k("div", {
572
+ return /* @__PURE__ */ N("div", {
532
573
  role: u.ariaLabel ? "group" : void 0,
533
574
  "aria-label": u.ariaLabel,
534
575
  className: s("flex flex-col gap-4", d?.root),
535
576
  children: [
536
- D(Q.Avatar) && /* @__PURE__ */ O(oe, {
577
+ E(Q.Avatar) && /* @__PURE__ */ M(de, {
537
578
  label: u.iconUrl.label,
538
579
  avatarUrl: c,
539
580
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -541,27 +582,28 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
541
582
  onAddAvatarClick: l,
542
583
  className: d?.field
543
584
  }),
544
- (A || j) && /* @__PURE__ */ k("div", {
585
+ (D || j) && /* @__PURE__ */ N("div", {
545
586
  className: s("flex items-start gap-4", d?.field),
546
- children: [A && /* @__PURE__ */ O(g, {
587
+ children: [D && /* @__PURE__ */ M(g, {
547
588
  id: "deployment-creation-form-name",
548
- inputRef: b,
589
+ inputRef: S,
549
590
  value: e.name,
550
591
  onChange: (e) => i({ name: e ?? "" }),
551
592
  onBlur: a,
552
- readOnly: m,
593
+ disabled: m,
594
+ tooltipText: m ? h : void 0,
553
595
  labelProps: {
554
596
  label: u.name.label,
555
597
  required: !0
556
598
  },
557
599
  placeholder: u.name.placeholder,
558
- caption: h,
600
+ caption: _,
559
601
  error: t.name || void 0,
560
602
  invalid: !!t.name,
561
603
  containerClassName: j ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
562
- }), j && /* @__PURE__ */ O(g, {
604
+ }), j && /* @__PURE__ */ M(g, {
563
605
  id: "deployment-creation-form-version",
564
- inputRef: x,
606
+ inputRef: C,
565
607
  value: e.version,
566
608
  onChange: (e) => i({ version: e ?? "" }),
567
609
  onBlur: o,
@@ -569,26 +611,27 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
569
611
  placeholder: u.version.placeholder,
570
612
  error: t.version || void 0,
571
613
  invalid: !!t.version,
572
- containerClassName: A ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
614
+ containerClassName: D ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
573
615
  })]
574
616
  }),
575
- D(Q.Description) && (v ? /* @__PURE__ */ O("div", {
617
+ E(Q.Description) && (b ? /* @__PURE__ */ M("div", {
576
618
  className: d?.field,
577
- children: v(P, fe)
578
- }) : P),
579
- D(Q.Locales) && /* @__PURE__ */ O(ue, {
619
+ children: b(I, ye)
620
+ }) : I),
621
+ E(Q.Locales) && /* @__PURE__ */ M(_e, {
580
622
  value: e.otherLocales,
581
623
  onChange: (e) => i({ otherLocales: e }),
582
624
  availableLocaleOptions: f,
583
625
  labels: u.otherLocales,
584
- className: d?.field
626
+ className: d?.field,
627
+ colors: d?.localesColors
585
628
  }),
586
- D(Q.Tags) && /* @__PURE__ */ O("div", {
629
+ E(Q.Tags) && /* @__PURE__ */ M("div", {
587
630
  className: d?.field,
588
- children: /* @__PURE__ */ O(w, {
631
+ children: /* @__PURE__ */ M(O, {
589
632
  id: "deployment-creation-form-topics",
590
633
  labelProps: { label: u.topics.label },
591
- placeholder: u.topics.placeholder ?? de,
634
+ placeholder: u.topics.placeholder ?? ve,
592
635
  value: e.topics,
593
636
  onChange: (e) => i({ topics: e }),
594
637
  tagClassName: r
@@ -596,53 +639,58 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
596
639
  })
597
640
  ]
598
641
  });
599
- }, me = "border-0 p-4 desktop:p-8", he = "desktop:flex-1", ge = "px-4 pt-4 desktop:px-6 desktop:pt-6", _e = F(({ 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, metadataSectionClassName: b, setupSectionClassName: S, labels: C, styles: w, dir: T }) => {
600
- let E = v == null ? null : /* @__PURE__ */ O("div", {
601
- role: "alert",
602
- className: ge,
642
+ }, xe = "border-0 p-4 desktop:p-8", Se = "desktop:flex-1", Ce = "px-4 pt-4 desktop:px-6 desktop:pt-6", we = ne(({ 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
+ let k = /* @__PURE__ */ M(y, {
644
+ politeness: x.Assertive,
645
+ className: v == null ? void 0 : Ce,
603
646
  children: v
604
647
  }), A = p != null;
605
- return /* @__PURE__ */ O(ae, {
648
+ return /* @__PURE__ */ M(le, {
606
649
  title: e,
607
650
  onBack: t,
608
- backAriaLabel: C?.backAriaLabel ?? "Back",
651
+ backAriaLabel: E?.backAriaLabel ?? "Back",
609
652
  isSaving: a,
610
- labels: { savingStatusLabel: C?.savingStatusLabel ?? "Saving" },
611
- rightContent: h == null ? void 0 : /* @__PURE__ */ O(Y, {
653
+ resizableLeftColumn: b,
654
+ labels: {
655
+ savingStatusLabel: E?.savingStatusLabel ?? "Saving",
656
+ resizeHandleLabel: E?.resizeHandleLabel,
657
+ resizeHandleTooltip: E?.resizeHandleTooltip
658
+ },
659
+ rightContent: h == null ? void 0 : /* @__PURE__ */ M(X, {
612
660
  title: g,
613
- styles: w?.section,
614
- className: s(me, _, q.asideSection),
661
+ styles: D?.section,
662
+ className: s(xe, _, Y.asideSection),
615
663
  children: h
616
664
  }),
617
- styles: w?.layout,
618
- dir: T,
619
- actions: /* @__PURE__ */ k(D, { children: [c, !l && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(y, {
620
- label: C?.cancelLabel ?? "Cancel",
665
+ styles: D?.layout,
666
+ dir: O,
667
+ actions: /* @__PURE__ */ N(j, { children: [c, !l && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(S, {
668
+ label: E?.cancelLabel ?? "Cancel",
621
669
  disabled: a,
622
670
  onClick: n
623
- }), /* @__PURE__ */ O(x, {
671
+ }), /* @__PURE__ */ M(w, {
624
672
  label: i,
625
673
  disabled: a || o,
626
674
  onClick: r
627
675
  })] })] }),
628
- leftContent: /* @__PURE__ */ k(D, { children: [
629
- !A && E,
630
- /* @__PURE__ */ O(Y, {
631
- title: d === null ? void 0 : d ?? C?.metadataTitle ?? "Metadata",
632
- styles: w?.section,
633
- className: s(me, b, q.metadataSection),
676
+ leftContent: /* @__PURE__ */ N(j, { children: [
677
+ !A && k,
678
+ /* @__PURE__ */ M(X, {
679
+ title: d === null ? void 0 : d ?? E?.metadataTitle ?? "Metadata",
680
+ styles: D?.section,
681
+ className: s(xe, C, Y.metadataSection),
634
682
  children: u
635
683
  }),
636
684
  f
637
685
  ] }),
638
- centerContent: A ? /* @__PURE__ */ k(D, { children: [E, /* @__PURE__ */ O(Y, {
639
- title: m === null ? void 0 : m ?? C?.setupTitle ?? "Setup",
640
- styles: w?.section,
641
- className: s(me, he, S, q.setupSection),
686
+ centerContent: A ? /* @__PURE__ */ N(j, { children: [k, /* @__PURE__ */ M(X, {
687
+ title: m === null ? void 0 : m ?? E?.setupTitle ?? "Setup",
688
+ styles: D?.section,
689
+ className: s(xe, Se, T, Y.setupSection),
642
690
  children: p
643
691
  })] }) : void 0
644
692
  });
645
- }), ve = {
693
+ }), Te = {
646
694
  name: {
647
695
  label: "Name",
648
696
  placeholder: "Enter name"
@@ -681,7 +729,7 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
681
729
  saveLabel: "Save"
682
730
  },
683
731
  ariaLabel: "Metadata"
684
- }, ye = {
732
+ }, Ee = {
685
733
  title: "Add avatar",
686
734
  attachLabel: "Attach",
687
735
  emptyTitle: "This folder is empty",
@@ -705,64 +753,66 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
705
753
  deleteConfirmItemsLabel: "items?",
706
754
  deleteConfirmLabel: "Delete",
707
755
  deleteCancelLabel: "Cancel"
708
- }, be = F(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = ce, isNameReadOnly: c, nameCaption: l, isDescriptionRequired: u, renderDescription: d, focusRequestKey: f, labels: p }) => {
709
- let [m, h] = B(!1), g = R(() => a ? s : s.filter((e) => e !== Q.Avatar), [a, s]), _ = e.iconUrl, v = a?.resolveIconUrl, y = R(() => v ? v(_) : void 0, [_, v]), b = I(() => h(!0), []), x = I(() => h(!1), []), S = a?.resolveAttachedIconUrl, C = I((e) => {
710
- let t = S?.(e);
711
- t && n({ iconUrl: t }), h(!1);
712
- }, [n, S]);
713
- return /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(pe, {
756
+ }, De = ne(({ 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, _] = W(!1), v = H(() => a ? s : s.filter((e) => e !== Q.Avatar), [a, s]), y = e.iconUrl, b = a?.resolveIconUrl, x = H(() => b ? b(y) : void 0, [y, b]), S = R(() => _(!0), []), C = R(() => _(!1), []), w = a?.resolveAttachedIconUrl, T = R((e) => {
758
+ let t = w?.(e);
759
+ t && n({ iconUrl: t }), _(!1);
760
+ }, [n, w]);
761
+ return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(be, {
714
762
  values: e,
715
763
  errors: t,
716
764
  onChange: n,
717
765
  onNameBlur: r,
718
766
  onVersionBlur: i,
719
- iconPreviewUrl: y,
720
- onAddAvatarClick: b,
721
- labels: p?.form ?? ve,
767
+ iconPreviewUrl: x,
768
+ onAddAvatarClick: S,
769
+ labels: h?.form ?? Te,
722
770
  availableLocaleOptions: o,
723
- fields: g,
771
+ fields: v,
724
772
  isNameReadOnly: c,
725
- nameCaption: l,
726
- isDescriptionRequired: u,
727
- renderDescription: d,
728
- focusRequestKey: f
729
- }), a && /* @__PURE__ */ O(se, {
730
- isOpen: m,
731
- onClose: x,
732
- onAttach: C,
773
+ nameReadOnlyTooltip: l,
774
+ nameCaption: u,
775
+ isDescriptionRequired: d,
776
+ descriptionCaption: f,
777
+ renderDescription: p,
778
+ focusRequestKey: m
779
+ }), a && /* @__PURE__ */ M(pe, {
780
+ isOpen: g,
781
+ onClose: C,
782
+ onAttach: T,
733
783
  bucket: a.bucket,
734
784
  FileManagerModal: a.FileManagerModal,
735
785
  allowedMimeTypes: a.allowedMimeTypes,
736
786
  maxFileSizeBytes: a.maxFileSizeBytes,
737
- labels: p?.avatarPicker ?? ye
787
+ labels: h?.avatarPicker ?? Ee
738
788
  })] });
739
789
  }), $ = /* @__PURE__ */ function(e) {
740
790
  return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
741
- }({}), xe = (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), Se = (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]) && xe(e.otherLocales, t.otherLocales), Ce = (e) => Object.values(e).every((e) => e == null), we = /^[a-zA-Z0-9 _.-]+$/, Te = /^[a-zA-Z0-9._-]+$/, Ee = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/, De = "1.0.0", Oe = (n, r = {}) => {
791
+ }({}), Oe = (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), ke = (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]) && Oe(e.otherLocales, t.otherLocales), Ae = (e) => Object.values(e).every((e) => e == null), je = /^[a-zA-Z0-9 _.-]+$/, Me = /^[a-zA-Z0-9._-]+$/, Ne = /^\d+(\.\d+)*$/, Pe = "1.0.0", Fe = (n, r = {}) => {
742
792
  let i = {}, s = n.name.trim();
743
- s ? a(s, t) ? i.name = $.TooLong : r.validateNamePattern && !we.test(s) ? i.name = $.InvalidFormat : o(s) && (i.name = $.ControlCharacters) : i.name = $.Required, a(n.description, e) && (i.description = $.TooLong);
793
+ s ? a(s, t) ? i.name = $.TooLong : r.validateNamePattern && !je.test(s) ? i.name = $.InvalidFormat : o(s) && (i.name = $.ControlCharacters) : i.name = $.Required, a(n.description, e) && (i.description = $.TooLong);
744
794
  let c = n.version.trim();
745
- return r.validateVersionPattern && c && ((r.validateVersionPattern instanceof RegExp ? r.validateVersionPattern : Te).test(c) || (i.version = $.InvalidFormat)), i;
746
- }, ke = new Set([$.TooLong, $.ControlCharacters]), Ae = (e, t) => ({
795
+ return r.validateVersionPattern && c && ((r.validateVersionPattern instanceof RegExp ? r.validateVersionPattern : Me).test(c) || (i.version = $.InvalidFormat)), i;
796
+ }, Ie = /* @__PURE__ */ new Set([$.TooLong, $.ControlCharacters]), Le = (e, t) => ({
747
797
  reseedKey: t,
748
798
  values: e,
749
799
  baseline: e,
750
800
  touched: {},
751
801
  hasAttemptedSubmit: !1,
752
802
  submitAttemptCount: 0
753
- }), je = ({ initialValues: e, validationOptions: t, reseedKey: n }) => {
754
- let [r, i] = B(() => Ae(e, n));
755
- r.reseedKey !== n && i(Ae(e, n));
756
- let a = t?.validateNamePattern, o = t?.validateVersionPattern, s = R(() => Oe(r.values, {
803
+ }), Re = ({ initialValues: e, validationOptions: t, reseedKey: n }) => {
804
+ let [r, i] = W(() => Le(e, n));
805
+ r.reseedKey !== n && i(Le(e, n));
806
+ let a = t?.validateNamePattern, o = t?.validateVersionPattern, s = H(() => Fe(r.values, {
757
807
  validateNamePattern: a,
758
808
  validateVersionPattern: o
759
809
  }), [
760
810
  r.values,
761
811
  a,
762
812
  o
763
- ]), c = R(() => {
813
+ ]), c = H(() => {
764
814
  if (r.hasAttemptedSubmit) return s;
765
- let e = (e, t) => e && (t || ke.has(e)) ? e : void 0;
815
+ let e = (e, t) => e && (t || Ie.has(e)) ? e : void 0;
766
816
  return {
767
817
  name: e(s.name, r.touched[Q.Name]),
768
818
  version: e(s.version, r.touched[Q.Version]),
@@ -772,28 +822,28 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
772
822
  s,
773
823
  r.hasAttemptedSubmit,
774
824
  r.touched
775
- ]), l = z(s), u = z(e);
776
- L(() => {
825
+ ]), l = U(s), u = U(e);
826
+ V(() => {
777
827
  l.current = s, u.current = e;
778
828
  });
779
- let d = I((e) => i((t) => ({
829
+ let d = R((e) => i((t) => ({
780
830
  ...t,
781
831
  values: {
782
832
  ...t.values,
783
833
  ...e
784
834
  }
785
- })), []), f = I((e) => i((t) => t.touched[e] ? t : {
835
+ })), []), f = R((e) => i((t) => t.touched[e] ? t : {
786
836
  ...t,
787
837
  touched: {
788
838
  ...t.touched,
789
839
  [e]: !0
790
840
  }
791
- }), []), p = I(() => (i((e) => ({
841
+ }), []), p = R(() => (i((e) => ({
792
842
  ...e,
793
843
  hasAttemptedSubmit: !0,
794
844
  submitAttemptCount: e.submitAttemptCount + 1
795
- })), Ce(l.current)), []), m = I((e) => i((t) => Ae(e ?? u.current, t.reseedKey)), []), h = R(() => !Se(r.values, r.baseline), [r.values, r.baseline]);
796
- return R(() => ({
845
+ })), Ae(l.current)), []), m = R((e) => i((t) => Le(e ?? u.current, t.reseedKey)), []), h = H(() => !ke(r.values, r.baseline), [r.values, r.baseline]);
846
+ return H(() => ({
797
847
  values: r.values,
798
848
  setValues: d,
799
849
  touched: r.touched,
@@ -818,4 +868,4 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
818
868
  ]);
819
869
  };
820
870
  //#endregion
821
- export { oe as AddAvatar, se as AvatarPickerModal, q as BUILDER_FORM_CLASS, K as BuilderFormContainer, De as DEFAULT_DEPLOYMENT_VERSION, ve as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, pe as DeploymentCreationForm, ue as DeploymentLocalesField, ae as EditorLayout, Y as EditorSection, _e as EntityEditor, Q as MetadataField, be as MetadataForm, we as NAME_PATTERN, Ee as SEMVER_VERSION_PATTERN, Te as VERSION_PATTERN, je as useMetadataForm, Oe as validateDeploymentCreationFields };
871
+ export { de as AddAvatar, pe as AvatarPickerModal, Y as BUILDER_FORM_CLASS, oe as BuilderFormContainer, Pe as DEFAULT_DEPLOYMENT_VERSION, Te as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, be as DeploymentCreationForm, _e as DeploymentLocalesField, le as EditorLayout, X as EditorSection, we as EntityEditor, Q as MetadataField, De as MetadataForm, je as NAME_PATTERN, Ne as SEMVER_VERSION_PATTERN, Me as VERSION_PATTERN, Re as useMetadataForm, Fe as validateDeploymentCreationFields };