@epam/ai-dial-builder-form 1.1.0-dev.456 → 1.1.0-dev.465

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 (31) hide show
  1. package/components/AddAvatar/AddAvatar.d.ts +5 -0
  2. package/components/AddAvatar/AddAvatar.d.ts.map +1 -0
  3. package/components/AvatarPickerModal/AvatarPickerModal.d.ts +5 -0
  4. package/components/AvatarPickerModal/AvatarPickerModal.d.ts.map +1 -0
  5. package/components/DeploymentCreationForm/DeploymentCreationForm.d.ts +5 -0
  6. package/components/DeploymentCreationForm/DeploymentCreationForm.d.ts.map +1 -0
  7. package/components/DeploymentLocalesField/DeploymentLocalesField.d.ts +24 -0
  8. package/components/DeploymentLocalesField/DeploymentLocalesField.d.ts.map +1 -0
  9. package/components/EditorLayout/EditorLayout.d.ts +9 -0
  10. package/components/EditorLayout/EditorLayout.d.ts.map +1 -0
  11. package/components/EditorSection/EditorSection.d.ts +5 -0
  12. package/components/EditorSection/EditorSection.d.ts.map +1 -0
  13. package/index.css +1 -1
  14. package/index.d.ts +15 -0
  15. package/index.d.ts.map +1 -1
  16. package/index.js +487 -69
  17. package/models/add-avatar-props.d.ts +36 -0
  18. package/models/add-avatar-props.d.ts.map +1 -0
  19. package/models/avatar-picker-modal.d.ts +146 -0
  20. package/models/avatar-picker-modal.d.ts.map +1 -0
  21. package/models/deployment-creation-form.d.ts +139 -0
  22. package/models/deployment-creation-form.d.ts.map +1 -0
  23. package/models/editor-layout-props.d.ts +42 -0
  24. package/models/editor-layout-props.d.ts.map +1 -0
  25. package/models/editor-section-props.d.ts +25 -0
  26. package/models/editor-section-props.d.ts.map +1 -0
  27. package/models/validation.d.ts +29 -0
  28. package/models/validation.d.ts.map +1 -0
  29. package/package.json +3 -3
  30. package/utils/validate-deployment-creation-fields.d.ts +11 -0
  31. package/utils/validate-deployment-creation-fields.d.ts.map +1 -0
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { AddAvatarProps } from '../../models/add-avatar-props';
3
+ /** Avatar preview box with an "Add avatar" button and a format/size caption, for entity-icon editing flows. */
4
+ export declare const AddAvatar: FC<AddAvatarProps>;
5
+ //# sourceMappingURL=AddAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/AddAvatar/AddAvatar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,+GAA+G;AAC/G,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmExC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { AvatarPickerModalProps } from '../../models/avatar-picker-modal';
3
+ /** File manager modal restricted to a single image up to a host-configured size, for picking an entity's avatar. */
4
+ export declare const AvatarPickerModal: FC<AvatarPickerModalProps>;
5
+ //# sourceMappingURL=AvatarPickerModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarPickerModal.d.ts","sourceRoot":"","sources":["../../../src/components/AvatarPickerModal/AvatarPickerModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE/E,oHAAoH;AACpH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAqFxD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { DeploymentCreationFormProps } from '../../models/deployment-creation-form';
3
+ /** Controlled field set for deployment creation: avatar, name, description, version, and topics. */
4
+ export declare const DeploymentCreationForm: FC<DeploymentCreationFormProps>;
5
+ //# sourceMappingURL=DeploymentCreationForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentCreationForm.d.ts","sourceRoot":"","sources":["../../../src/components/DeploymentCreationForm/DeploymentCreationForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAIzF,oGAAoG;AACpG,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA2GlE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { DeploymentCreationFormLocaleEntry, DeploymentCreationFormLocaleLabels, DeploymentCreationFormLocaleOption } from '../../models/deployment-creation-form';
3
+ /** Props accepted by the `DeploymentLocalesField` component. */
4
+ export interface DeploymentLocalesFieldProps {
5
+ /** Current list of additional (non-primary) locale entries. */
6
+ value: DeploymentCreationFormLocaleEntry[];
7
+ /** Called with the full updated list when the user saves changes in the popup. */
8
+ onChange: (entries: DeploymentCreationFormLocaleEntry[]) => void;
9
+ /** Selectable language options for new/existing rows. Defaults to an empty list (no locales addable). */
10
+ availableLocaleOptions?: DeploymentCreationFormLocaleOption[];
11
+ /** Pre-translated labels for the summary row and popup. */
12
+ labels: DeploymentCreationFormLocaleLabels;
13
+ /** Class applied to the summary row container. */
14
+ className?: string;
15
+ /** Typography and color class applied to the summary text. Defaults to `'dial-body-text text-secondary'`. */
16
+ summaryClassName?: string;
17
+ /** Typography and color class applied to each row's heading. Defaults to `'dial-tiny-lead-text text-secondary'`, which uppercases the label itself. */
18
+ rowLabelClassName?: string;
19
+ /** Color class applied to the required-field asterisk on the per-locale name field. Defaults to `'text-error'`. */
20
+ requiredMarkClassName?: string;
21
+ }
22
+ /** Summary row ("Locales: [DE] Edit locales") plus the "Add locale" popup for editing additional name/description translations. Shows "Add locales" instead of "Edit locales" until at least one entry exists. */
23
+ export declare const DeploymentLocalesField: FC<DeploymentLocalesFieldProps>;
24
+ //# sourceMappingURL=DeploymentLocalesField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeploymentLocalesField.d.ts","sourceRoot":"","sources":["../../../src/components/DeploymentLocalesField/DeploymentLocalesField.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EACV,iCAAiC,EACjC,kCAAkC,EAClC,kCAAkC,EACnC,MAAM,uCAAuC,CAAC;AAE/C,gEAAgE;AAChE,MAAM,WAAW,2BAA2B;IAC1C,+DAA+D;IAC/D,KAAK,EAAE,iCAAiC,EAAE,CAAC;IAC3C,kFAAkF;IAClF,QAAQ,EAAE,CAAC,OAAO,EAAE,iCAAiC,EAAE,KAAK,IAAI,CAAC;IACjE,yGAAyG;IACzG,sBAAsB,CAAC,EAAE,kCAAkC,EAAE,CAAC;IAC9D,2DAA2D;IAC3D,MAAM,EAAE,kCAAkC,CAAC;IAC3C,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6GAA6G;IAC7G,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uJAAuJ;IACvJ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mHAAmH;IACnH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAeD,mNAAmN;AACnN,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA0OlE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { EditorLayoutProps } from '../../models/editor-layout-props';
3
+ /**
4
+ * Two-column editor shell with a header row (back button, title, actions).
5
+ * On mobile/tablet, `actions` move out of the header into a dedicated bar
6
+ * pinned to the bottom of the page, outside the scrollable body.
7
+ */
8
+ export declare const EditorLayout: FC<EditorLayoutProps>;
9
+ //# sourceMappingURL=EditorLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorLayout.d.ts","sourceRoot":"","sources":["../../../src/components/EditorLayout/EditorLayout.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+F9C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { EditorSectionProps } from '../../models/editor-section-props';
3
+ /** Bordered card wrapper for a named section inside an editor layout. */
4
+ export declare const EditorSection: FC<EditorSectionProps>;
5
+ //# sourceMappingURL=EditorSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorSection.d.ts","sourceRoot":"","sources":["../../../src/components/EditorSection/EditorSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAG5E,yEAAyE;AACzE,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA0BhD,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._header_8b0ws_4{border-color:var(--bfh-border,var(--stroke-tertiary,#e0e6f0))}._title_8b0ws_8{font-family:var(--bfh-font-family,inherit)}._container_d8tdv_1{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa))}._footer_d8tdv_10{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa));box-shadow:0 2px 12px 0 var(--shadow-xs-2,#161b2d08), 0 2px 6px 0 var(--shadow-xs-1,#2764d933)}
1
+ ._header_8b0ws_4{border-color:var(--bfh-border,var(--stroke-tertiary,#e0e6f0))}._title_8b0ws_8{font-family:var(--bfh-font-family,inherit)}._container_d8tdv_1{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa))}._footer_d8tdv_10{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa));box-shadow:0 2px 12px 0 var(--shadow-xs-2,#161b2d08), 0 2px 6px 0 var(--shadow-xs-1,#2764d933)}._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_1kidu_1{border-bottom-color:var(--el-header-border-color,var(--stroke-tertiary,#e0e6f0))}._footerBorder_1kidu_5{border-top-color:var(--el-header-border-color,var(--stroke-tertiary,#e0e6f0))}._sidebarBorder_1kidu_9{border-inline-end-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))}
2
2
  /*$vite$:1*/
package/index.d.ts CHANGED
@@ -2,4 +2,19 @@ export { BuilderFormContainer } from './components/BuilderFormContainer/BuilderF
2
2
  export type { BuilderFormContainerProps, BuilderFormContainerStyles, BuilderFormContainerColors, } from './models/builder-form-container-props';
3
3
  export type { BuilderFormActionsLabels } from './models/builder-form-actions-props';
4
4
  export type { BuilderFormHeaderLabels, BuilderFormHeaderStyles, BuilderFormHeaderColors, BuilderFormHeaderTypography, } from './models/builder-form-header-props';
5
+ export type { EditorSectionProps, EditorSectionStyles, } from './models/editor-section-props';
6
+ export type { EditorLayoutProps, EditorLayoutLabels, EditorLayoutStyles, } from './models/editor-layout-props';
7
+ export type { AddAvatarProps, AddAvatarColors, AddAvatarStyles, } from './models/add-avatar-props';
8
+ export { EditorSection } from './components/EditorSection/EditorSection';
9
+ export { EditorLayout } from './components/EditorLayout/EditorLayout';
10
+ export { AddAvatar } from './components/AddAvatar/AddAvatar';
11
+ export { AvatarPickerModal } from './components/AvatarPickerModal/AvatarPickerModal';
12
+ export { DeploymentCreationForm } from './components/DeploymentCreationForm/DeploymentCreationForm';
13
+ export { DeploymentLocalesField } from './components/DeploymentLocalesField/DeploymentLocalesField';
14
+ export type { DeploymentLocalesFieldProps } from './components/DeploymentLocalesField/DeploymentLocalesField';
15
+ export type { AvatarPickerFileManagerModalProps, AvatarPickerModalLabels, AvatarPickerModalProps, } from './models/avatar-picker-modal';
16
+ export type { DeploymentCreationFormFieldErrors, DeploymentCreationFormFieldLabels, DeploymentCreationFormIconLabels, DeploymentCreationFormLabels, DeploymentCreationFormLocaleEntry, DeploymentCreationFormLocaleLabels, DeploymentCreationFormLocaleOption, DeploymentCreationFormProps, DeploymentCreationFormStyles, DeploymentCreationFormValues, } from './models/deployment-creation-form';
17
+ export type { DeploymentCreationFormErrorCodes, DeploymentCreationFormValidationOptions, } from './models/validation';
18
+ export { DeploymentCreationFieldErrorCode } from './models/validation';
19
+ export { NAME_PATTERN, SEMVER_VERSION_PATTERN, VERSION_PATTERN, validateDeploymentCreationFields, } from './utils/validate-deployment-creation-fields';
5
20
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AACpG,YAAY,EAAE,2BAA2B,EAAE,MAAM,4DAA4D,CAAC;AAC9G,YAAY,EACV,iCAAiC,EACjC,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,iCAAiC,EACjC,iCAAiC,EACjC,gCAAgC,EAChC,4BAA4B,EAC5B,iCAAiC,EACjC,kCAAkC,EAClC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,gCAAgC,EAChC,uCAAuC,GACxC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,gCAAgC,GACjC,MAAM,6CAA6C,CAAC"}
package/index.js CHANGED
@@ -1,121 +1,122 @@
1
- import { buildCssVars as e, mergeClasses as t } from "@epam/ai-dial-chat-shared";
2
- import { DIAL_ICON_SIZE as n, DIAL_KIT_ICON_STROKE as r, GhostIconButton as i, NeutralButton as a, PrimaryButton as o, Spinner as s } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
4
- import { IconArrowLeft as d } from "@tabler/icons-react";
1
+ import { RESIZABLE_TEXTAREA_CLASS_NAME as e, TAG_INPUT_TAG_CLASS_NAME as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
+ import { ButtonAppearance as i, ButtonVariant as a, DIAL_ICON_SIZE as o, DIAL_KIT_ICON_STROKE as s, DangerIconButton as c, ElementSize as l, GhostIconButton as u, Input as d, Label as f, LinkButton as p, NeutralButton as m, Popup as h, PrimaryButton as g, Select as _, Spinner as v, TagInput as y, Textarea as b, TextareaResize as x } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
4
+ import { IconArrowLeft as T, IconArrowNarrowLeft as E, IconPhoto as D, IconPlus as O, IconTrashX as ee } from "@tabler/icons-react";
5
+ import { Suspense as te, useCallback as k, useEffect as A, useId as j, useRef as M, useState as N } from "react";
5
6
  //#region src/components/BuilderFormActions/BuilderFormActions.tsx
6
- var f = ({ labels: e, onCancel: t, onSubmit: r, isCancelDisabled: i = !1, isSubmitDisabled: d = !1, isSubmitting: f = !1, buttonClassName: p }) => /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(a, {
7
+ var P = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubmitDisabled: i = !1, isSubmitting: a = !1, buttonClassName: s }) => /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(m, {
7
8
  label: e.cancelButtonLabel,
8
9
  onClick: t,
9
- disabled: i,
10
- className: p
11
- }), /* @__PURE__ */ l(o, {
10
+ disabled: r,
11
+ className: s
12
+ }), /* @__PURE__ */ C(g, {
12
13
  label: e.submitButtonLabel,
13
- onClick: r,
14
- disabled: d,
15
- "aria-busy": f,
16
- className: p,
17
- iconBefore: f ? /* @__PURE__ */ l("span", {
14
+ onClick: n,
15
+ disabled: i,
16
+ "aria-busy": a,
17
+ className: s,
18
+ iconBefore: a ? /* @__PURE__ */ C("span", {
18
19
  "aria-hidden": !0,
19
- children: /* @__PURE__ */ l(s, { size: n.SM })
20
+ children: /* @__PURE__ */ C(v, { size: o.SM })
20
21
  }) : void 0
21
- })] }), p = "flex w-full flex-col desktop:w-[360px] desktop:shrink-0", m = ({ left: e, children: t, metadata: n }) => /* @__PURE__ */ u("div", {
22
+ })] }), F = "flex w-full flex-col desktop:w-[360px] desktop:shrink-0", I = ({ left: e, children: t, metadata: n }) => /* @__PURE__ */ w("div", {
22
23
  className: "flex flex-1 flex-col desktop:flex-row",
23
24
  children: [
24
- e != null && /* @__PURE__ */ l("div", {
25
- className: p,
25
+ e != null && /* @__PURE__ */ C("div", {
26
+ className: F,
26
27
  children: e
27
28
  }),
28
- /* @__PURE__ */ l("div", {
29
+ /* @__PURE__ */ C("div", {
29
30
  className: "flex w-full min-w-0 flex-1 flex-col",
30
31
  children: t
31
32
  }),
32
- n != null && /* @__PURE__ */ l("div", {
33
- className: p,
33
+ n != null && /* @__PURE__ */ C("div", {
34
+ className: F,
34
35
  children: n
35
36
  }),
36
- e != null && n == null && /* @__PURE__ */ l("div", {
37
+ e != null && n == null && /* @__PURE__ */ C("div", {
37
38
  "aria-hidden": !0,
38
39
  className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
39
40
  })
40
41
  ]
41
- }), h = {
42
+ }), L = {
42
43
  header: "_header_8b0ws_4",
43
44
  title: "_title_8b0ws_8"
44
- }, g = ({ labels: a, onBack: o, onCancel: s, onSubmit: c, isCancelDisabled: p = !1, isSubmitDisabled: m = !1, isSubmitting: g = !1, styles: _ }) => {
45
- let { colors: v, typography: y } = _ ?? {}, b = y?.fontClassName ?? "dial-h1-text", x = !!y?.fontClassName;
46
- return /* @__PURE__ */ u("div", {
47
- style: e({
48
- "--bfh-border": v?.borderColor,
49
- "--bfh-font-family": x ? void 0 : y?.fontFamily
45
+ }, R = ({ labels: e, onBack: t, onCancel: i, onSubmit: a, isCancelDisabled: c = !1, isSubmitDisabled: l = !1, isSubmitting: d = !1, styles: f }) => {
46
+ let { colors: p, typography: m } = f ?? {}, h = m?.fontClassName ?? "dial-h1-text", g = !!m?.fontClassName;
47
+ return /* @__PURE__ */ w("div", {
48
+ style: n({
49
+ "--bfh-border": p?.borderColor,
50
+ "--bfh-font-family": g ? void 0 : m?.fontFamily
50
51
  }),
51
- className: t("flex h-16 items-center justify-between gap-6 border-t px-4 desktop:border-b desktop:border-t-0 desktop:px-8", h.header),
52
+ className: r("flex h-16 items-center justify-between gap-6 border-t px-4 desktop:border-b desktop:border-t-0 desktop:px-8", L.header),
52
53
  children: [
53
- /* @__PURE__ */ u("div", {
54
+ /* @__PURE__ */ w("div", {
54
55
  className: "flex min-w-0 flex-1 items-center gap-2",
55
- children: [/* @__PURE__ */ l(i, {
56
- icon: /* @__PURE__ */ l(d, {
57
- size: n.LG,
56
+ children: [/* @__PURE__ */ C(u, {
57
+ icon: /* @__PURE__ */ C(T, {
58
+ size: o.LG,
58
59
  className: "rtl:scale-x-[-1]",
59
60
  "aria-hidden": !0,
60
- stroke: r
61
+ stroke: s
61
62
  }),
62
- "aria-label": a.backButtonLabel,
63
- onClick: o
64
- }), /* @__PURE__ */ l("h1", {
65
- className: t("truncate", h.title, b),
66
- children: a.title
63
+ "aria-label": e.backButtonLabel,
64
+ onClick: t
65
+ }), /* @__PURE__ */ C("h1", {
66
+ className: r("truncate", L.title, h),
67
+ children: e.title
67
68
  })]
68
69
  }),
69
- /* @__PURE__ */ l("div", {
70
+ /* @__PURE__ */ C("div", {
70
71
  className: "hidden items-center gap-2 desktop:flex",
71
- children: /* @__PURE__ */ l(f, {
72
- labels: a,
73
- onCancel: s,
74
- onSubmit: c,
75
- isCancelDisabled: p,
76
- isSubmitDisabled: m,
77
- isSubmitting: g
72
+ children: /* @__PURE__ */ C(P, {
73
+ labels: e,
74
+ onCancel: i,
75
+ onSubmit: a,
76
+ isCancelDisabled: c,
77
+ isSubmitDisabled: l,
78
+ isSubmitting: d
78
79
  })
79
80
  }),
80
- /* @__PURE__ */ l("span", {
81
+ /* @__PURE__ */ C("span", {
81
82
  role: "status",
82
83
  "aria-live": "polite",
83
84
  className: "sr-only",
84
- children: g ? a.submittingLabel ?? "Submitting" : ""
85
+ children: d ? e.submittingLabel ?? "Submitting" : ""
85
86
  })
86
87
  ]
87
88
  });
88
- }, _ = {
89
+ }, z = {
89
90
  container: "_container_d8tdv_1",
90
91
  footer: "_footer_d8tdv_10"
91
- }, v = ({ labels: n, onBack: r, onCancel: i, onSubmit: a, isCancelDisabled: o = !1, isSubmitDisabled: s = !1, isSubmitting: c = !1, left: d, children: p, metadata: h, styles: v }) => {
92
- let { colors: y, header: b, cssVars: x } = v ?? {};
93
- return /* @__PURE__ */ u("div", {
92
+ }, B = ({ labels: e, onBack: t, onCancel: i, onSubmit: a, isCancelDisabled: o = !1, isSubmitDisabled: s = !1, isSubmitting: c = !1, left: l, children: u, metadata: d, styles: f }) => {
93
+ let { colors: p, header: m, cssVars: h } = f ?? {};
94
+ return /* @__PURE__ */ w("div", {
94
95
  style: {
95
- ...e({ "--bfc-bg": y?.background }),
96
- ...x
96
+ ...n({ "--bfc-bg": p?.background }),
97
+ ...h
97
98
  },
98
- className: t("flex h-full w-full flex-col overflow-y-auto", _.container),
99
+ className: r("flex h-full w-full flex-col overflow-y-auto", z.container),
99
100
  children: [
100
- /* @__PURE__ */ l(g, {
101
- labels: n,
102
- onBack: r,
101
+ /* @__PURE__ */ C(R, {
102
+ labels: e,
103
+ onBack: t,
103
104
  onCancel: i,
104
105
  onSubmit: a,
105
106
  isCancelDisabled: o,
106
107
  isSubmitDisabled: s,
107
108
  isSubmitting: c,
108
- styles: b
109
+ styles: m
109
110
  }),
110
- /* @__PURE__ */ l(m, {
111
- left: d,
112
- metadata: h,
113
- children: p
111
+ /* @__PURE__ */ C(I, {
112
+ left: l,
113
+ metadata: d,
114
+ children: u
114
115
  }),
115
- /* @__PURE__ */ l("div", {
116
- className: t("sticky bottom-0 z-10 flex items-center gap-2 p-3 desktop:hidden", _.footer),
117
- children: /* @__PURE__ */ l(f, {
118
- labels: n,
116
+ /* @__PURE__ */ C("div", {
117
+ className: r("sticky bottom-0 z-10 flex items-center gap-2 p-3 desktop:hidden", z.footer),
118
+ children: /* @__PURE__ */ C(P, {
119
+ labels: e,
119
120
  onCancel: i,
120
121
  onSubmit: a,
121
122
  isCancelDisabled: o,
@@ -126,6 +127,423 @@ var f = ({ labels: e, onCancel: t, onSubmit: r, isCancelDisabled: i = !1, isSubm
126
127
  })
127
128
  ]
128
129
  });
130
+ }, V = {
131
+ section: "_section_l1mnx_1",
132
+ title: "_title_l1mnx_5"
133
+ }, H = ({ title: e, children: t, styles: i, className: a }) => {
134
+ let o = n({
135
+ "--es-border-color": i?.colors?.borderColor,
136
+ "--es-title-color": i?.colors?.titleColor
137
+ });
138
+ return /* @__PURE__ */ w("section", {
139
+ className: r("flex flex-col gap-4 rounded border p-6", V.section, a),
140
+ style: o,
141
+ children: [e != null && /* @__PURE__ */ C("h2", {
142
+ className: r("dial-h3-text", V.title),
143
+ children: e
144
+ }), t]
145
+ });
146
+ }, U = {
147
+ headerBorder: "_headerBorder_1kidu_1",
148
+ footerBorder: "_footerBorder_1kidu_5",
149
+ sidebarBorder: "_sidebarBorder_1kidu_9"
150
+ }, W = ({ title: e, onBack: t, backAriaLabel: i = "Back", actions: a, leftContent: c, rightContent: l, isSaving: d = !1, labels: f, styles: p, dir: m }) => {
151
+ let h = j(), g = d ? f?.savingStatusLabel ?? "Saving" : "";
152
+ return /* @__PURE__ */ w("div", {
153
+ dir: m,
154
+ className: "flex min-h-0 flex-1 flex-col",
155
+ style: n({
156
+ "--el-header-border-color": p?.colors?.headerBorderColor,
157
+ "--el-sidebar-border-color": p?.colors?.sidebarBorderColor
158
+ }),
159
+ children: [
160
+ /* @__PURE__ */ C("span", {
161
+ role: "status",
162
+ "aria-live": "polite",
163
+ className: "sr-only",
164
+ id: h,
165
+ children: g
166
+ }),
167
+ /* @__PURE__ */ w("div", {
168
+ className: r("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pb-3 desktop:pt-3", U.headerBorder),
169
+ children: [/* @__PURE__ */ w("div", {
170
+ className: "flex min-w-0 flex-1 items-center gap-2",
171
+ children: [/* @__PURE__ */ C(u, {
172
+ icon: /* @__PURE__ */ C(E, {
173
+ size: o.LG,
174
+ stroke: s,
175
+ "aria-hidden": !0,
176
+ className: "rtl:scale-x-[-1]"
177
+ }),
178
+ "aria-label": i,
179
+ onClick: t
180
+ }), /* @__PURE__ */ C("h1", {
181
+ className: "dial-h2-text min-w-0 truncate",
182
+ children: e
183
+ })]
184
+ }), a != null && /* @__PURE__ */ C("div", {
185
+ className: "hidden shrink-0 items-center gap-2 desktop:flex",
186
+ children: a
187
+ })]
188
+ }),
189
+ /* @__PURE__ */ w("div", {
190
+ className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
191
+ children: [/* @__PURE__ */ C("div", {
192
+ className: r(l == null ? "desktop:flex-1" : "desktop:w-[360px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", "desktop:overflow-y-auto", l == null ? void 0 : U.sidebarBorder),
193
+ children: c
194
+ }), l != null && /* @__PURE__ */ C("div", {
195
+ className: "desktop:flex-1 desktop:overflow-y-auto",
196
+ children: l
197
+ })]
198
+ }),
199
+ a != null && /* @__PURE__ */ C("div", {
200
+ className: r("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 desktop:hidden [&>*]:flex-1", U.footerBorder),
201
+ children: a
202
+ })
203
+ ]
204
+ });
205
+ }, G = {
206
+ box: "_box_c9as8_1",
207
+ icon: "_icon_c9as8_6",
208
+ caption: "_caption_c9as8_10"
209
+ }, K = ({ label: e, avatarUrl: t, avatarAlt: i = "", addAvatarLabel: a = "Add avatar", captionText: c = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: u, styles: d, className: m }) => {
210
+ let h = n({
211
+ "--aa-box-bg": d?.colors?.boxBackgroundColor,
212
+ "--aa-box-border": d?.colors?.boxBorderColor,
213
+ "--aa-icon": d?.colors?.placeholderIconColor,
214
+ "--aa-caption": d?.colors?.captionColor
215
+ });
216
+ return /* @__PURE__ */ w("div", {
217
+ className: r("flex flex-col gap-2", m),
218
+ style: h,
219
+ children: [/* @__PURE__ */ C(f, { label: e }), /* @__PURE__ */ w("div", {
220
+ className: "flex items-start gap-3",
221
+ children: [/* @__PURE__ */ C("div", {
222
+ className: r("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", G.box),
223
+ children: t ? /* @__PURE__ */ C("img", {
224
+ src: t,
225
+ alt: i,
226
+ className: "h-16 w-16 object-cover"
227
+ }) : /* @__PURE__ */ C(D, {
228
+ size: o.LG,
229
+ stroke: s,
230
+ "aria-hidden": !0,
231
+ className: G.icon
232
+ })
233
+ }), /* @__PURE__ */ w("div", {
234
+ className: "flex flex-col gap-3",
235
+ children: [/* @__PURE__ */ C(p, {
236
+ size: l.Small,
237
+ iconBefore: /* @__PURE__ */ C(O, {
238
+ size: o.SM,
239
+ stroke: s,
240
+ "aria-hidden": !0
241
+ }),
242
+ className: "w-fit",
243
+ label: a,
244
+ onClick: u
245
+ }), /* @__PURE__ */ C("span", {
246
+ className: r("dial-tiny-text", G.caption),
247
+ children: c
248
+ })]
249
+ })]
250
+ })]
251
+ });
252
+ }, q = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: o, labels: s }) => {
253
+ let c = k((e) => e.length === 1 ? s.deleteConfirmTitleSingle : s.deleteConfirmTitleMultiple, [s.deleteConfirmTitleSingle, s.deleteConfirmTitleMultiple]), l = k((e) => /* @__PURE__ */ C("div", {
254
+ className: "dial-small-text px-6 py-3",
255
+ children: /* @__PURE__ */ C("p", {
256
+ className: "mb-3 text-secondary",
257
+ children: e.length === 1 ? /* @__PURE__ */ w(S, { children: [
258
+ s.deleteConfirmSingleText,
259
+ " ",
260
+ /* @__PURE__ */ w("span", {
261
+ className: "break-words text-primary",
262
+ children: [
263
+ "\"",
264
+ e[0].split("/").pop(),
265
+ "\"?"
266
+ ]
267
+ })
268
+ ] }) : /* @__PURE__ */ w(S, { children: [
269
+ s.deleteConfirmMultipleText,
270
+ " ",
271
+ /* @__PURE__ */ w("span", {
272
+ className: "text-primary",
273
+ children: [
274
+ e.length,
275
+ " ",
276
+ s.deleteConfirmItemsLabel
277
+ ]
278
+ })
279
+ ] })
280
+ })
281
+ }), [
282
+ s.deleteConfirmSingleText,
283
+ s.deleteConfirmMultipleText,
284
+ s.deleteConfirmItemsLabel
285
+ ]);
286
+ return /* @__PURE__ */ C(te, {
287
+ fallback: null,
288
+ children: e && /* @__PURE__ */ C(i, {
289
+ isOpen: e,
290
+ onClose: t,
291
+ onAttach: n,
292
+ bucket: r,
293
+ allowedTypes: a,
294
+ maxSelectableFileSize: o,
295
+ maximumAttachmentsAmount: 1,
296
+ canAttachFolders: !1,
297
+ title: s.title,
298
+ attachLabel: s.attachLabel,
299
+ emptyTitle: s.emptyTitle,
300
+ emptyDescription: s.emptyDescription,
301
+ errorMessage: s.errorMessage,
302
+ retryLabel: s.retryLabel,
303
+ hiddenFilesLabel: s.hiddenFilesLabel,
304
+ showHiddenFilesLabel: s.showHiddenFilesLabel,
305
+ hideHiddenFilesLabel: s.hideHiddenFilesLabel,
306
+ getSelectionLabel: s.getSelectionLabel,
307
+ uploadFilesLabel: s.uploadFilesLabel,
308
+ newFolderLabel: s.newFolderLabel,
309
+ downloadLabel: s.downloadLabel,
310
+ downloadingLabel: s.downloadingLabel,
311
+ deleteLabel: s.deleteLabel,
312
+ deletingLabel: s.deletingLabel,
313
+ deleteConfirmTitle: c,
314
+ deleteConfirmBody: l,
315
+ deleteConfirmLabel: s.deleteConfirmLabel,
316
+ deleteCancelLabel: s.deleteCancelLabel,
317
+ uploadProgressTitle: s.uploadProgressTitle,
318
+ cancelLabel: s.cancelLabel
319
+ })
320
+ });
321
+ }, J = (e, t, n) => ({
322
+ id: e,
323
+ language: n.find((e) => !t.has(e.code))?.code ?? "",
324
+ name: "",
325
+ description: ""
326
+ }), Y = ({ value: t, onChange: n, availableLocaleOptions: u = [], labels: f, className: m, summaryClassName: g = "dial-body-text text-secondary", rowLabelClassName: v = "dial-tiny-lead-text text-secondary", requiredMarkClassName: y = "text-error" }) => {
327
+ let { summaryLabel: T, addLabel: E, editLabel: D, popupTitle: te, addLocaleLabel: k, localeRowLabel: j = "Locale", languageLabel: P, nameLabel: F, namePlaceholder: I, descriptionLabel: L, descriptionPlaceholder: R, deleteAriaLabel: z, cancelLabel: B = "Cancel", saveLabel: V = "Save" } = f, [H, U] = N(!1), [W, G] = N([]), K = M(0);
328
+ A(() => {
329
+ H && G(t.length > 0 ? t : [J(`locale-row-${++K.current}`, /* @__PURE__ */ new Set(), u)]);
330
+ }, [
331
+ H,
332
+ t,
333
+ u
334
+ ]);
335
+ let q = () => U(!0), Y = () => U(!1), X = () => {
336
+ n(W.filter((e) => e.language && e.name)), U(!1);
337
+ }, Z = () => {
338
+ let e = new Set(W.map((e) => e.language).filter(Boolean));
339
+ G((t) => [...t, J(`locale-row-${++K.current}`, e, u)]);
340
+ }, Q = (e, t) => {
341
+ G((n) => n.map((n) => n.id === e ? {
342
+ ...n,
343
+ ...t
344
+ } : n));
345
+ }, $ = (e) => {
346
+ G((t) => t.filter((t) => t.id !== e));
347
+ }, ne = (e) => u.find((t) => t.code === e)?.label ?? e.toUpperCase(), re = W.some((e) => !e.language || !e.name);
348
+ return /* @__PURE__ */ w("div", {
349
+ className: r("flex items-center gap-2", m),
350
+ children: [
351
+ t.length > 0 && /* @__PURE__ */ C("span", {
352
+ className: g,
353
+ children: `${T}: ${t.map((e) => `[${ne(e.language)}]`).join(", ")}`
354
+ }),
355
+ /* @__PURE__ */ C(p, {
356
+ label: t.length > 0 ? D : E,
357
+ iconBefore: /* @__PURE__ */ C(O, {
358
+ size: o.SM,
359
+ "aria-hidden": !0,
360
+ stroke: s
361
+ }),
362
+ className: "!px-0",
363
+ onClick: q
364
+ }),
365
+ /* @__PURE__ */ C(h, {
366
+ open: H,
367
+ header: te,
368
+ onClose: Y,
369
+ mainButtons: [{
370
+ label: B,
371
+ onClick: Y
372
+ }, {
373
+ label: V,
374
+ variant: a.Primary,
375
+ disabled: re,
376
+ onClick: X
377
+ }],
378
+ children: /* @__PURE__ */ w("div", {
379
+ className: "flex flex-col gap-8 px-6 py-3",
380
+ children: [W.map((t, n) => {
381
+ let r = new Set(W.filter((e) => e.id !== t.id).map((e) => e.language).filter(Boolean));
382
+ return /* @__PURE__ */ w("div", {
383
+ className: "flex flex-col gap-2",
384
+ children: [/* @__PURE__ */ w("div", {
385
+ className: "flex items-center justify-between",
386
+ children: [/* @__PURE__ */ w("span", {
387
+ className: v,
388
+ children: [
389
+ j,
390
+ " ",
391
+ n + 1
392
+ ]
393
+ }), /* @__PURE__ */ C(c, {
394
+ appearance: i.Ghost,
395
+ size: l.Small,
396
+ icon: /* @__PURE__ */ C(ee, {
397
+ size: o.SM,
398
+ "aria-hidden": !0,
399
+ stroke: s
400
+ }),
401
+ "aria-label": `${z} ${n + 1}`,
402
+ onClick: () => $(t.id)
403
+ })]
404
+ }), /* @__PURE__ */ w("div", {
405
+ role: "group",
406
+ "aria-label": `${j} ${n + 1}`,
407
+ className: "flex flex-col gap-5",
408
+ children: [/* @__PURE__ */ w("div", {
409
+ className: "flex items-start gap-5",
410
+ children: [/* @__PURE__ */ C(_, {
411
+ id: `${t.id}-language`,
412
+ labelProps: { label: P },
413
+ className: "shrink-0 basis-20",
414
+ options: u.map((e) => ({
415
+ value: e.code,
416
+ label: e.label,
417
+ disabled: r.has(e.code)
418
+ })),
419
+ value: t.language,
420
+ onChange: (e) => Q(t.id, { language: e })
421
+ }), /* @__PURE__ */ C(d, {
422
+ id: `${t.id}-name`,
423
+ containerClassName: "min-w-0 flex-1",
424
+ required: !0,
425
+ value: t.name,
426
+ onChange: (e) => Q(t.id, { name: e ?? "" }),
427
+ labelProps: { label: /* @__PURE__ */ w(S, { children: [F, /* @__PURE__ */ C("span", {
428
+ "aria-hidden": !0,
429
+ className: y,
430
+ children: "*"
431
+ })] }) },
432
+ placeholder: I
433
+ })]
434
+ }), /* @__PURE__ */ C(b, {
435
+ id: `${t.id}-description`,
436
+ className: e,
437
+ resize: x.Vertical,
438
+ value: t.description,
439
+ onChange: (e) => Q(t.id, { description: e }),
440
+ labelProps: { label: L },
441
+ placeholder: R
442
+ })]
443
+ })]
444
+ }, t.id);
445
+ }), /* @__PURE__ */ C(p, {
446
+ label: k,
447
+ iconBefore: /* @__PURE__ */ C(O, {
448
+ size: o.SM,
449
+ "aria-hidden": !0,
450
+ stroke: s
451
+ }),
452
+ className: "self-start",
453
+ onClick: Z,
454
+ disabled: W.length >= u.length
455
+ })]
456
+ })
457
+ })
458
+ ]
459
+ });
460
+ }, X = ({ values: n, errors: i, onChange: a, onNameBlur: o, onVersionBlur: s, iconPreviewUrl: c, onAddAvatarClick: l, labels: u, styles: f, availableLocaleOptions: p = [] }) => {
461
+ let m = M(null), h = M(null), g = M(!1), _ = !!(i.name || i.version);
462
+ return A(() => {
463
+ _ && !g.current && (i.name ? m : h).current?.focus(), g.current = _;
464
+ }, [
465
+ _,
466
+ i.name,
467
+ i.version
468
+ ]), /* @__PURE__ */ w("div", {
469
+ role: u.ariaLabel ? "group" : void 0,
470
+ "aria-label": u.ariaLabel,
471
+ className: r("flex flex-col gap-4", f?.root),
472
+ children: [
473
+ /* @__PURE__ */ C(K, {
474
+ label: u.iconUrl.label,
475
+ avatarUrl: c,
476
+ addAvatarLabel: u.iconUrl.addAvatarLabel,
477
+ captionText: u.iconUrl.captionText,
478
+ onAddAvatarClick: l,
479
+ className: f?.field
480
+ }),
481
+ /* @__PURE__ */ w("div", {
482
+ className: r("flex items-start gap-4", f?.field),
483
+ children: [/* @__PURE__ */ C(d, {
484
+ id: "deployment-creation-form-name",
485
+ inputRef: m,
486
+ value: n.name,
487
+ onChange: (e) => a({ name: e ?? "" }),
488
+ onBlur: o,
489
+ labelProps: {
490
+ label: u.name.label,
491
+ required: !0
492
+ },
493
+ placeholder: u.name.placeholder,
494
+ error: i.name || void 0,
495
+ invalid: !!i.name,
496
+ containerClassName: "min-w-0 basis-0 grow-[2]"
497
+ }), /* @__PURE__ */ C(d, {
498
+ id: "deployment-creation-form-version",
499
+ inputRef: h,
500
+ value: n.version,
501
+ onChange: (e) => a({ version: e ?? "" }),
502
+ onBlur: s,
503
+ labelProps: { label: u.version.label },
504
+ placeholder: u.version.placeholder,
505
+ error: i.version || void 0,
506
+ invalid: !!i.version,
507
+ containerClassName: "min-w-0 basis-0 grow-[1]"
508
+ })]
509
+ }),
510
+ /* @__PURE__ */ C(b, {
511
+ id: "deployment-creation-form-description",
512
+ value: n.description,
513
+ onChange: (e) => a({ description: e }),
514
+ labelProps: { label: u.description.label },
515
+ placeholder: u.description.placeholder,
516
+ containerClassName: f?.field,
517
+ className: e,
518
+ resize: x.Vertical
519
+ }),
520
+ /* @__PURE__ */ C(Y, {
521
+ value: n.otherLocales,
522
+ onChange: (e) => a({ otherLocales: e }),
523
+ availableLocaleOptions: p,
524
+ labels: u.otherLocales,
525
+ className: f?.field
526
+ }),
527
+ /* @__PURE__ */ C("div", {
528
+ className: f?.field,
529
+ children: /* @__PURE__ */ C(y, {
530
+ id: "deployment-creation-form-topics",
531
+ labelProps: { label: u.topics.label },
532
+ placeholder: u.topics.placeholder,
533
+ value: n.topics,
534
+ onChange: (e) => a({ topics: e }),
535
+ tagClassName: t
536
+ })
537
+ })
538
+ ]
539
+ });
540
+ }, Z = /* @__PURE__ */ function(e) {
541
+ return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e;
542
+ }({}), Q = /^[a-zA-Z0-9 _.-]+$/, $ = /^[a-zA-Z0-9._-]+$/, ne = /^\d+(\.\d+)*$/, re = (e, t = {}) => {
543
+ let n = {}, r = e.name.trim();
544
+ r ? t.validateNamePattern && !Q.test(r) && (n.name = Z.InvalidFormat) : n.name = Z.Required;
545
+ let i = e.version.trim();
546
+ return t.validateVersionPattern && i && ((t.validateVersionPattern instanceof RegExp ? t.validateVersionPattern : $).test(i) || (n.version = Z.InvalidFormat)), n;
129
547
  };
130
548
  //#endregion
131
- export { v as BuilderFormContainer };
549
+ export { K as AddAvatar, q as AvatarPickerModal, B as BuilderFormContainer, Z as DeploymentCreationFieldErrorCode, X as DeploymentCreationForm, Y as DeploymentLocalesField, W as EditorLayout, H as EditorSection, Q as NAME_PATTERN, ne as SEMVER_VERSION_PATTERN, $ as VERSION_PATTERN, re as validateDeploymentCreationFields };
@@ -0,0 +1,36 @@
1
+ /** CSS custom property overrides for `AddAvatar`. */
2
+ export interface AddAvatarColors {
3
+ /** Background color of the 64x64 preview box shown when no avatar is set. Defaults to `--bg-layer-raised`. */
4
+ boxBackgroundColor?: string;
5
+ /** Border color of the 64x64 preview box. Defaults to `--stroke-tertiary`. */
6
+ boxBorderColor?: string;
7
+ /** Color of the placeholder photo icon shown when no avatar is set. Defaults to `--text-secondary`. */
8
+ placeholderIconColor?: string;
9
+ /** Color of the format/size caption text. Defaults to `--text-tertiary`. */
10
+ captionColor?: string;
11
+ }
12
+ /** Style overrides for `AddAvatar`. */
13
+ export interface AddAvatarStyles {
14
+ /** Color token overrides. */
15
+ colors?: AddAvatarColors;
16
+ }
17
+ /** Props for `AddAvatar`. */
18
+ export interface AddAvatarProps {
19
+ /** Field label rendered above the preview box and button (e.g. `'Avatar'`). */
20
+ label: string;
21
+ /** URL of the currently selected avatar image. When set, it fills the 64x64 preview box instead of the placeholder icon. */
22
+ avatarUrl?: string;
23
+ /** Alt text for the avatar image. Defaults to `''` (decorative — the field label and button already describe the control). */
24
+ avatarAlt?: string;
25
+ /** Label for the "Add avatar" button. Defaults to `'Add avatar'`. */
26
+ addAvatarLabel?: string;
27
+ /** Caption text describing the accepted formats and max size. Defaults to `'PNG, JPG or SVG (max 1 MB)'`. */
28
+ captionText?: string;
29
+ /** Called when the "Add avatar" button is clicked. The host opens its own file picker/manager and, once a file is chosen, passes its URL back in as `avatarUrl`. */
30
+ onAddAvatarClick: () => void;
31
+ /** Style overrides applied via CSS custom properties. */
32
+ styles?: AddAvatarStyles;
33
+ /** Additional CSS class applied to the root element. */
34
+ className?: string;
35
+ }
36
+ //# sourceMappingURL=add-avatar-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-avatar-props.d.ts","sourceRoot":"","sources":["../../src/models/add-avatar-props.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,8GAA8G;IAC9G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uGAAuG;IACvG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,uCAAuC;AACvC,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED,6BAA6B;AAC7B,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,4HAA4H;IAC5H,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8HAA8H;IAC9H,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6GAA6G;IAC7G,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oKAAoK;IACpK,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,yDAAyD;IACzD,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,146 @@
1
+ import { AttachResult } from '@epam/ai-dial-chat-shared';
2
+ import { ComponentType, ReactNode } from 'react';
3
+ /** Pre-translated labels for `AvatarPickerModal`, supplied by the host app. */
4
+ export interface AvatarPickerModalLabels {
5
+ /** Modal title. */
6
+ title: string;
7
+ /** Label for the confirm/attach button. */
8
+ attachLabel: string;
9
+ /** Title shown when the current folder has no files. */
10
+ emptyTitle: string;
11
+ /** Description shown when the current folder has no files. */
12
+ emptyDescription: string;
13
+ /** Message shown when file listing fails. */
14
+ errorMessage: string;
15
+ /** Label for the retry-after-error button. */
16
+ retryLabel: string;
17
+ /** Label for the hidden-files row/toggle. */
18
+ hiddenFilesLabel: string;
19
+ /** Label for the action that reveals hidden files. */
20
+ showHiddenFilesLabel: string;
21
+ /** Label for the action that hides hidden files again. */
22
+ hideHiddenFilesLabel: string;
23
+ /** Returns the selection-count summary text for the given count. */
24
+ getSelectionLabel: (count: number) => string;
25
+ /** Label for the upload-files action. */
26
+ uploadFilesLabel: string;
27
+ /** Label for the new-folder action. */
28
+ newFolderLabel: string;
29
+ /** Label for the download action. */
30
+ downloadLabel: string;
31
+ /** Label shown while a download is in progress. */
32
+ downloadingLabel: string;
33
+ /** Label for the delete action. */
34
+ deleteLabel: string;
35
+ /** Label shown while a delete is in progress. */
36
+ deletingLabel: string;
37
+ /** Delete-confirmation title used when deleting a single item. */
38
+ deleteConfirmTitleSingle: string;
39
+ /** Delete-confirmation title used when deleting multiple items. */
40
+ deleteConfirmTitleMultiple: string;
41
+ /** Confirmation body text used when deleting a single item, followed by its name. */
42
+ deleteConfirmSingleText: string;
43
+ /** Confirmation body text used when deleting multiple items, followed by the count. */
44
+ deleteConfirmMultipleText: string;
45
+ /** Unit label appended after the count in the multiple-item confirmation (e.g. `'items'`). */
46
+ deleteConfirmItemsLabel: string;
47
+ /** Label for the delete-confirmation confirm button. */
48
+ deleteConfirmLabel: string;
49
+ /** Label for the delete-confirmation cancel button. */
50
+ deleteCancelLabel: string;
51
+ /** Title shown while an upload is in progress. */
52
+ uploadProgressTitle: string;
53
+ /** Label for the cancel button. */
54
+ cancelLabel: string;
55
+ }
56
+ /**
57
+ * Props of the host-provided DIAL file manager modal that `AvatarPickerModal`
58
+ * renders through `FileManagerModal`. A host component satisfies this shape by
59
+ * accepting these props (e.g. one built on `@epam/ai-dial-react-file-manager`).
60
+ */
61
+ export interface AvatarPickerFileManagerModalProps {
62
+ /** Whether the modal is open. */
63
+ isOpen: boolean;
64
+ /** Called when the modal should close without a selection. */
65
+ onClose: () => void;
66
+ /** Called with the picked file(s) once the user confirms. */
67
+ onAttach: (result: AttachResult) => void;
68
+ /** Storage bucket to browse. */
69
+ bucket: string;
70
+ /** Modal title. */
71
+ title: string;
72
+ /** Label for the confirm/attach button. */
73
+ attachLabel: string;
74
+ /** Title shown when the current folder has no files. */
75
+ emptyTitle: string;
76
+ /** Description shown when the current folder has no files. */
77
+ emptyDescription: string;
78
+ /** Message shown when file listing fails. */
79
+ errorMessage: string;
80
+ /** Label for the retry-after-error button. */
81
+ retryLabel: string;
82
+ /** Label for the hidden-files row/toggle. */
83
+ hiddenFilesLabel: string;
84
+ /** Label for the action that reveals hidden files. */
85
+ showHiddenFilesLabel: string;
86
+ /** Label for the action that hides hidden files again. */
87
+ hideHiddenFilesLabel: string;
88
+ /** Returns the selection-count summary text for the given count. */
89
+ getSelectionLabel: (count: number) => string;
90
+ /** Label for the upload-files action. */
91
+ uploadFilesLabel: string;
92
+ /** Label for the new-folder action. */
93
+ newFolderLabel: string;
94
+ /** Label for the download action. */
95
+ downloadLabel: string;
96
+ /** Label shown while a download is in progress. */
97
+ downloadingLabel: string;
98
+ /** Label for the delete action. */
99
+ deleteLabel: string;
100
+ /** Label shown while a delete is in progress. */
101
+ deletingLabel: string;
102
+ /** Renders the delete-confirmation title for the given item names. */
103
+ deleteConfirmTitle: (names: string[]) => ReactNode;
104
+ /** Renders the delete-confirmation body for the given item names. */
105
+ deleteConfirmBody: (names: string[]) => ReactNode;
106
+ /** Label for the delete-confirmation confirm button. */
107
+ deleteConfirmLabel: string;
108
+ /** Label for the delete-confirmation cancel button. */
109
+ deleteCancelLabel: string;
110
+ /** Title shown while an upload is in progress. */
111
+ uploadProgressTitle: string;
112
+ /** Label for the cancel button. */
113
+ cancelLabel: string;
114
+ /** MIME types selectable in the modal. Unset means no type restriction. */
115
+ allowedTypes?: string[];
116
+ /** Maximum size, in bytes, of a selectable file. */
117
+ maxSelectableFileSize?: number;
118
+ /** Maximum number of items that can be selected at once. */
119
+ maximumAttachmentsAmount?: number;
120
+ /** Whether folders can be selected. */
121
+ canAttachFolders?: boolean;
122
+ }
123
+ /** Props accepted by the `AvatarPickerModal` component. */
124
+ export interface AvatarPickerModalProps {
125
+ /** Whether the modal is open. */
126
+ isOpen: boolean;
127
+ /** Called when the modal is dismissed, with or without a selection. */
128
+ onClose: () => void;
129
+ /**
130
+ * Called with the picked file once the user confirms a single-image
131
+ * selection. The host resolves the file to a DIAL resource URL (and calls
132
+ * `onClose`) — this lib never resolves storage identifiers itself.
133
+ */
134
+ onAttach: (result: AttachResult) => void;
135
+ /** Storage bucket to browse, resolved by the host from the current user. */
136
+ bucket: string;
137
+ /** The host's own DIAL file manager modal component, rendered for the actual picking UI. */
138
+ FileManagerModal: ComponentType<AvatarPickerFileManagerModalProps>;
139
+ /** MIME types selectable in the modal (e.g. PNG/JPG/SVG). */
140
+ allowedMimeTypes: string[];
141
+ /** Maximum size, in bytes, of a selectable avatar file. */
142
+ maxFileSizeBytes: number;
143
+ /** Pre-translated labels for the modal. */
144
+ labels: AvatarPickerModalLabels;
145
+ }
146
+ //# sourceMappingURL=avatar-picker-modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-picker-modal.d.ts","sourceRoot":"","sources":["../../src/models/avatar-picker-modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE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,SAAS,CAAC;IAClD,wDAAwD;IACxD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kDAAkD;IAClD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,oDAAoD;IACpD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,4DAA4D;IAC5D,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,2DAA2D;AAC3D,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,gBAAgB,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IACnE,6DAA6D;IAC7D,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,2DAA2D;IAC3D,gBAAgB,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,MAAM,EAAE,uBAAuB,CAAC;CACjC"}
@@ -0,0 +1,139 @@
1
+ /** One additional (non-primary) locale's name/description translation, edited via the "Add locale" popup. */
2
+ export interface DeploymentCreationFormLocaleEntry {
3
+ /** Stable client-side id for list rendering; not part of the persisted locale map. */
4
+ id: string;
5
+ /** Locale code this entry translates into (e.g. `'de'`). */
6
+ language: string;
7
+ /** Translated name for this locale. */
8
+ name: string;
9
+ /** Translated description for this locale. */
10
+ description: string;
11
+ }
12
+ /** A selectable language option for an additional-locale row. */
13
+ export interface DeploymentCreationFormLocaleOption {
14
+ /** Locale code (e.g. `'de'`). */
15
+ code: string;
16
+ /** Display label for the option (e.g. `'DE'`). */
17
+ label: string;
18
+ }
19
+ /** Field values shared by Quick App and Toolset creation's General step. */
20
+ export interface DeploymentCreationFormValues {
21
+ /** Display name of the entity being created. */
22
+ name: string;
23
+ /** Long-form description of the entity. */
24
+ description: string;
25
+ /** Icon/avatar reference (a DIAL file id or absolute URL), set by the host once a file is picked. */
26
+ iconUrl: string;
27
+ /** Version string (e.g. `'1.0.0'`). */
28
+ version: string;
29
+ /** Free-entry topic tags. */
30
+ topics: string[];
31
+ /** Additional (non-primary) locale entries for name/description, edited via the "Add locale" popup. */
32
+ otherLocales: DeploymentCreationFormLocaleEntry[];
33
+ }
34
+ /** Translated, display-ready field errors for the shared form. */
35
+ export interface DeploymentCreationFormFieldErrors {
36
+ /** Error message for the name field. */
37
+ name?: string;
38
+ /** Error message for the version field. */
39
+ version?: string;
40
+ }
41
+ /** Label and placeholder text for a single field, supplied by the host app. */
42
+ export interface DeploymentCreationFormFieldLabels {
43
+ /** Field label text. */
44
+ label: string;
45
+ /** Placeholder text shown when the field is empty. */
46
+ placeholder?: string;
47
+ }
48
+ /** Text labels for the icon/avatar field, supplied by the host app. */
49
+ export interface DeploymentCreationFormIconLabels {
50
+ /** Field label rendered above the avatar preview and button (e.g. `'Avatar'`). */
51
+ label: string;
52
+ /** Label for the "Add avatar" button. */
53
+ addAvatarLabel: string;
54
+ /** Caption describing the accepted formats and max size (e.g. `'PNG, JPG or SVG (max 1 MB)'`). */
55
+ captionText: string;
56
+ }
57
+ /** Pre-translated labels/placeholders for the "Add locale" summary row and popup, supplied by the host app. */
58
+ export interface DeploymentCreationFormLocaleLabels {
59
+ /** Text preceding the list of configured locale codes, e.g. `'Locales'`. */
60
+ summaryLabel: string;
61
+ /** Label for the link that opens the popup when no locale has been added yet, e.g. `'Add locales'`. */
62
+ addLabel: string;
63
+ /** Label for the link that opens the popup once at least one locale exists, e.g. `'Edit locales'`. */
64
+ editLabel: string;
65
+ /** Title of the "Add locale" popup. */
66
+ popupTitle: string;
67
+ /** Label for the button that adds a new locale row. */
68
+ addLocaleLabel: string;
69
+ /** Label prefix for each row's heading (e.g. `'Locale'` -> `'Locale 1'`). Defaults to `'Locale'`. */
70
+ localeRowLabel?: string;
71
+ /** Label for the language select field. */
72
+ languageLabel: string;
73
+ /** Label for the per-locale name field. */
74
+ nameLabel: string;
75
+ /** Placeholder for the per-locale name field. */
76
+ namePlaceholder?: string;
77
+ /** Label for the per-locale description field. */
78
+ descriptionLabel: string;
79
+ /** Placeholder for the per-locale description field. */
80
+ descriptionPlaceholder?: string;
81
+ /** Accessible name for a row's delete button. */
82
+ deleteAriaLabel: string;
83
+ /** Label for the popup's cancel button. */
84
+ cancelLabel?: string;
85
+ /** Label for the popup's save button. */
86
+ saveLabel?: string;
87
+ }
88
+ /** Pre-translated labels/placeholders for every field, supplied by the host app. */
89
+ export interface DeploymentCreationFormLabels {
90
+ /** Labels for the name field. */
91
+ name: DeploymentCreationFormFieldLabels;
92
+ /** Labels for the description field. */
93
+ description: DeploymentCreationFormFieldLabels;
94
+ /** Labels for the icon/avatar field. */
95
+ iconUrl: DeploymentCreationFormIconLabels;
96
+ /** Labels for the version field. */
97
+ version: DeploymentCreationFormFieldLabels;
98
+ /** Labels for the topics field. */
99
+ topics: DeploymentCreationFormFieldLabels;
100
+ /** Labels for the additional-locales summary row and popup. */
101
+ otherLocales: DeploymentCreationFormLocaleLabels;
102
+ /** Accessible name for the field set group. */
103
+ ariaLabel?: string;
104
+ }
105
+ /** Optional per-slot class name overrides for visual composition by the host app. */
106
+ export interface DeploymentCreationFormStyles {
107
+ /** Class applied to the root container. Defaults to a vertical flex stack. */
108
+ root?: string;
109
+ /** Class applied to each individual field wrapper. */
110
+ field?: string;
111
+ }
112
+ /** Props accepted by the `DeploymentCreationForm` component. */
113
+ export interface DeploymentCreationFormProps {
114
+ /** Current field values. The component holds no state of its own. */
115
+ values: DeploymentCreationFormValues;
116
+ /** Field-level errors to surface, already translated by the host app. */
117
+ errors: DeploymentCreationFormFieldErrors;
118
+ /** Called with a partial patch whenever a field value changes. */
119
+ onChange: (patch: Partial<DeploymentCreationFormValues>) => void;
120
+ /** Called when the name field loses focus, so the host can run on-blur validation. */
121
+ onNameBlur?: () => void;
122
+ /** Called when the version field loses focus, so the host can run on-blur validation. */
123
+ onVersionBlur?: () => void;
124
+ /**
125
+ * URL to display in the avatar preview box. Resolved by the host from
126
+ * `values.iconUrl` (a DIAL file id or absolute URL) — this lib never
127
+ * resolves storage identifiers itself.
128
+ */
129
+ iconPreviewUrl?: string;
130
+ /** Called when the "Add avatar" button is clicked. The host opens its own file picker/manager and reports the result via `onChange({ iconUrl })`. */
131
+ onAddAvatarClick: () => void;
132
+ /** Pre-translated labels/placeholders for every field. */
133
+ labels: DeploymentCreationFormLabels;
134
+ /** Optional per-slot class name overrides. */
135
+ styles?: DeploymentCreationFormStyles;
136
+ /** Selectable language options for additional-locale rows. Defaults to an empty list (no locales addable). */
137
+ availableLocaleOptions?: DeploymentCreationFormLocaleOption[];
138
+ }
139
+ //# sourceMappingURL=deployment-creation-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment-creation-form.d.ts","sourceRoot":"","sources":["../../src/models/deployment-creation-form.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,MAAM,WAAW,iCAAiC;IAChD,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,iEAAiE;AACjE,MAAM,WAAW,kCAAkC;IACjD,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,gDAAgD;IACh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EAAE,4BAA4B,CAAC;IACrC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,8GAA8G;IAC9G,sBAAsB,CAAC,EAAE,kCAAkC,EAAE,CAAC;CAC/D"}
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from 'react';
2
+ /** Text labels for `EditorLayout`. All strings have English defaults. */
3
+ export interface EditorLayoutLabels {
4
+ /** SR-only text announced while `isSaving` is `true`. Defaults to `'Saving'`. */
5
+ savingStatusLabel?: string;
6
+ }
7
+ /** CSS custom property overrides for `EditorLayout`. */
8
+ export interface EditorLayoutColors {
9
+ /** Bottom border color of the header row. Defaults to `--stroke-tertiary`. */
10
+ headerBorderColor?: string;
11
+ /** Inline-end border color of the left sidebar panel. Defaults to `--stroke-tertiary`. */
12
+ sidebarBorderColor?: string;
13
+ }
14
+ /** Style overrides for `EditorLayout`. */
15
+ export interface EditorLayoutStyles {
16
+ /** Color token overrides. */
17
+ colors?: EditorLayoutColors;
18
+ }
19
+ /** Props for `EditorLayout`. */
20
+ export interface EditorLayoutProps {
21
+ /** Heading text rendered as `<h1>` in the header row. */
22
+ title: string;
23
+ /** Called when the back-arrow button is clicked. */
24
+ onBack: () => void;
25
+ /** Accessible label for the back-arrow button. Defaults to `'Back'`. */
26
+ backAriaLabel?: string;
27
+ /** Inline-end slot in the header row — typically Cancel + Save buttons. */
28
+ actions?: ReactNode;
29
+ /** Left column content (Metadata section at desktop; top on mobile). */
30
+ leftContent?: ReactNode;
31
+ /** Right column content (Setup section at desktop; bottom on mobile). When absent, left content fills full width. */
32
+ rightContent?: ReactNode;
33
+ /** When `true`, the SR-only saving status region announces `labels.savingStatusLabel`. */
34
+ isSaving?: boolean;
35
+ /** Text labels with English defaults. */
36
+ labels?: EditorLayoutLabels;
37
+ /** Style overrides applied via CSS custom properties. */
38
+ styles?: EditorLayoutStyles;
39
+ /** `dir` attribute forwarded to the root element for explicit direction override. */
40
+ dir?: 'ltr' | 'rtl';
41
+ }
42
+ //# sourceMappingURL=editor-layout-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-layout-props.d.ts","sourceRoot":"","sources":["../../src/models/editor-layout-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wDAAwD;AACxD,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0FAA0F;IAC1F,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wEAAwE;IACxE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,qHAAqH;IACrH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,yDAAyD;IACzD,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,qFAAqF;IACrF,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CACrB"}
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from 'react';
2
+ /** CSS custom property overrides for `EditorSection`. */
3
+ export interface EditorSectionColors {
4
+ /** Border color of the section card. Defaults to `--stroke-tertiary`. */
5
+ borderColor?: string;
6
+ /** Color of the section title heading. Defaults to `--text-primary`. */
7
+ titleColor?: string;
8
+ }
9
+ /** Style overrides for `EditorSection`. */
10
+ export interface EditorSectionStyles {
11
+ /** Color token overrides. */
12
+ colors?: EditorSectionColors;
13
+ }
14
+ /** Props for `EditorSection`. */
15
+ export interface EditorSectionProps {
16
+ /** Optional heading rendered above the section body. */
17
+ title?: string;
18
+ /** Section body content. */
19
+ children?: ReactNode;
20
+ /** Optional style overrides applied via CSS custom properties. */
21
+ styles?: EditorSectionStyles;
22
+ /** Additional CSS class applied to the root element. */
23
+ className?: string;
24
+ }
25
+ //# sourceMappingURL=editor-section-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-section-props.d.ts","sourceRoot":"","sources":["../../src/models/editor-section-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED,iCAAiC;AACjC,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kEAAkE;IAClE,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,29 @@
1
+ /** Reason a shared field failed validation, for the host app to map to a translated message. */
2
+ export declare enum DeploymentCreationFieldErrorCode {
3
+ /** The field is required and was left empty. */
4
+ Required = "required",
5
+ /** The field's value does not match the required character pattern. */
6
+ InvalidFormat = "invalid-format",
7
+ /** The field's value exceeds its maximum length. */
8
+ TooLong = "too-long"
9
+ }
10
+ /** Untranslated error codes returned by `validateDeploymentCreationFields`. */
11
+ export interface DeploymentCreationFormErrorCodes {
12
+ /** Error code for the name field, if invalid. */
13
+ name?: DeploymentCreationFieldErrorCode;
14
+ /** Error code for the version field, if invalid. */
15
+ version?: DeploymentCreationFieldErrorCode;
16
+ }
17
+ /** Optional pattern-check toggles for field validation. */
18
+ export interface DeploymentCreationFormValidationOptions {
19
+ /** Whether to reject a name containing characters outside `NAME_PATTERN`. */
20
+ validateNamePattern?: boolean;
21
+ /**
22
+ * Whether to reject a non-empty version that doesn't match a pattern.
23
+ * `true` checks against the default `VERSION_PATTERN`; passing a `RegExp`
24
+ * checks against that pattern instead (e.g. `SEMVER_VERSION_PATTERN` for a
25
+ * host that requires a strict dot-separated numeric version).
26
+ */
27
+ validateVersionPattern?: boolean | RegExp;
28
+ }
29
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/models/validation.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,oBAAY,gCAAgC;IAC1C,gDAAgD;IAChD,QAAQ,aAAa;IACrB,uEAAuE;IACvE,aAAa,mBAAmB;IAChC,oDAAoD;IACpD,OAAO,aAAa;CACrB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gCAAgC;IAC/C,iDAAiD;IACjD,IAAI,CAAC,EAAE,gCAAgC,CAAC;IACxC,oDAAoD;IACpD,OAAO,CAAC,EAAE,gCAAgC,CAAC;CAC5C;AAED,2DAA2D;AAC3D,MAAM,WAAW,uCAAuC;IACtD,6EAA6E;IAC7E,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-builder-form",
3
- "description": "Presentational builder form components for composing and editing DIAL entities",
4
- "version": "1.1.0-dev.456",
3
+ "description": "Presentational builder form shells, editor layouts, and shared deployment field sets for composing and editing DIAL entities",
4
+ "version": "1.1.0-dev.465",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@epam/ai-dial-chat-shared": "1.1.0-dev.456",
20
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.465",
21
21
  "@epam/ai-dial-ui-kit": "^0.14.0-dev.15",
22
22
  "@tabler/icons-react": "^3.44.0",
23
23
  "react": "^19.0.0"
@@ -0,0 +1,11 @@
1
+ import { DeploymentCreationFormValues } from '../models/deployment-creation-form';
2
+ import { DeploymentCreationFormErrorCodes, DeploymentCreationFormValidationOptions } from '../models/validation';
3
+ /** Allowed characters for the name field: letters, digits, spaces, underscores, dots, dashes. */
4
+ export declare const NAME_PATTERN: RegExp;
5
+ /** Allowed characters for the version field: letters, digits, dots, underscores, dashes. */
6
+ export declare const VERSION_PATTERN: RegExp;
7
+ /** Stricter version shape: one or more dot-separated numeric segments (e.g. `0.0.1`). */
8
+ export declare const SEMVER_VERSION_PATTERN: RegExp;
9
+ /** Validates the General-step fields and returns untranslated error codes; has no side effects. */
10
+ export declare const validateDeploymentCreationFields: (values: DeploymentCreationFormValues, options?: DeploymentCreationFormValidationOptions) => DeploymentCreationFormErrorCodes;
11
+ //# sourceMappingURL=validate-deployment-creation-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-deployment-creation-fields.d.ts","sourceRoot":"","sources":["../../src/utils/validate-deployment-creation-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACxC,MAAM,sBAAsB,CAAC;AAG9B,iGAAiG;AACjG,eAAO,MAAM,YAAY,QAAuB,CAAC;AAEjD,4FAA4F;AAC5F,eAAO,MAAM,eAAe,QAAsB,CAAC;AAEnD,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,QAAkB,CAAC;AAEtD,mGAAmG;AACnG,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,4BAA4B,EACpC,UAAS,uCAA4C,KACpD,gCAsBF,CAAC"}