@epam/ai-dial-builder-form 1.3.0-dev.325 → 1.3.0-dev.326
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/avatar-picker.d.ts +5 -0
- package/constants/avatar-picker.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +40 -36
- package/package.json +2 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Largest file `AvatarPickerModal` lets a user select as an avatar (1 MB). */
|
|
2
|
+
export declare const AVATAR_MAX_FILE_SIZE_BYTES: number;
|
|
3
|
+
/** MIME types `AvatarPickerModal` lets a user select as an avatar. */
|
|
4
|
+
export declare const AVATAR_ALLOWED_MIME_TYPES: string[];
|
|
5
|
+
//# sourceMappingURL=avatar-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-picker.d.ts","sourceRoot":"","sources":["../../src/constants/avatar-picker.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,QAAc,CAAC;AAEtD,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,UAIrC,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -26,4 +26,5 @@ export { DeploymentCreationFieldErrorCode } from './models/validation';
|
|
|
26
26
|
export { DEFAULT_DEPLOYMENT_VERSION, NAME_PATTERN, SEMVER_VERSION_PATTERN, VERSION_PATTERN, validateDeploymentCreationFields, } from './utils/validate-deployment-creation-fields';
|
|
27
27
|
export { BUILDER_FORM_CLASS } from './constants/public-class-names';
|
|
28
28
|
export { DEFAULT_METADATA_FORM_LABELS } from './constants/metadata-form';
|
|
29
|
+
export { AVATAR_ALLOWED_MIME_TYPES, AVATAR_MAX_FILE_SIZE_BYTES, } from './constants/avatar-picker';
|
|
29
30
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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AA4B,EAC5B,iCAAiC,EACjC,kCAAkC,EAClC,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,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,0BAA0B,EAC1B,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,gCAAgC,GACjC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EACL,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC"}
|
package/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { ENTITY_DESCRIPTION_MAX_LENGTH as e, ENTITY_NAME_MAX_LENGTH as t, RESIZA
|
|
|
2
2
|
import { ButtonAppearance as c, ButtonVariant as l, DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, DangerIconButton as f, ElementSize as p, GhostButton as m, GhostIconButton as h, Input as g, Label as _, LinkButton as v, LiveRegion as y, LiveRegionElement as b, LiveRegionPoliteness as x, NeutralButton as S, Popup as C, PrimaryButton as w, ResizeHandle as T, Select as E, Spinner as D, TagInput as O, Textarea as k, TextareaResize as A } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
4
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 re, useId as ie, useLayoutEffect as
|
|
5
|
+
import { Suspense as te, memo as ne, useCallback as R, useEffect as re, useId as ie, useLayoutEffect as ae, useMemo as z, useRef as B, useState as V } from "react";
|
|
6
6
|
//#region src/components/BuilderFormActions/BuilderFormActions.tsx
|
|
7
|
-
var
|
|
7
|
+
var H = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubmitDisabled: i = !1, isSubmitting: a = !1, buttonClassName: o }) => /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(S, {
|
|
8
8
|
label: e.cancelButtonLabel,
|
|
9
9
|
onClick: t,
|
|
10
10
|
disabled: r,
|
|
@@ -19,18 +19,18 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
19
19
|
"aria-hidden": !0,
|
|
20
20
|
children: /* @__PURE__ */ M(D, { size: u.SM })
|
|
21
21
|
}) : void 0
|
|
22
|
-
})] }),
|
|
22
|
+
})] }), U = {
|
|
23
23
|
body: "_body_1xd7h_2",
|
|
24
24
|
sideColumn: "_sideColumn_1xd7h_6",
|
|
25
25
|
reservedColumn: "_reservedColumn_1xd7h_10"
|
|
26
|
-
},
|
|
26
|
+
}, W = s("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", U.sideColumn), oe = ({ left: e, children: t, metadata: n, layout: r }) => {
|
|
27
27
|
let i = e != null && n == null && r?.reserveEndColumn !== !1, a = r ? { "--bfb-side-column-width": r.sideColumnWidth ?? "400px" } : void 0, o = r ? { columnGap: r.columnGap ?? "0px" } : void 0;
|
|
28
28
|
return /* @__PURE__ */ N("div", {
|
|
29
|
-
className: s("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
|
|
29
|
+
className: s("flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden", U.body),
|
|
30
30
|
style: o,
|
|
31
31
|
children: [
|
|
32
32
|
e != null && /* @__PURE__ */ M("div", {
|
|
33
|
-
className:
|
|
33
|
+
className: W,
|
|
34
34
|
style: a,
|
|
35
35
|
children: e
|
|
36
36
|
}),
|
|
@@ -39,14 +39,14 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
39
39
|
children: t
|
|
40
40
|
}),
|
|
41
41
|
n != null && /* @__PURE__ */ M("div", {
|
|
42
|
-
className:
|
|
42
|
+
className: W,
|
|
43
43
|
style: a,
|
|
44
44
|
children: n
|
|
45
45
|
}),
|
|
46
46
|
i && /* @__PURE__ */ M("div", {
|
|
47
47
|
"aria-hidden": !0,
|
|
48
48
|
style: a,
|
|
49
|
-
className: s(
|
|
49
|
+
className: s(U.reservedColumn, U.sideColumn)
|
|
50
50
|
})
|
|
51
51
|
]
|
|
52
52
|
});
|
|
@@ -81,7 +81,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
81
81
|
}),
|
|
82
82
|
/* @__PURE__ */ M("div", {
|
|
83
83
|
className: s("items-center gap-2", G.actions),
|
|
84
|
-
children: /* @__PURE__ */ M(
|
|
84
|
+
children: /* @__PURE__ */ M(H, {
|
|
85
85
|
labels: e,
|
|
86
86
|
onCancel: n,
|
|
87
87
|
onSubmit: r,
|
|
@@ -128,7 +128,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ M("div", {
|
|
130
130
|
className: s("sticky bottom-0 z-10 items-center gap-2 p-3 shadow-sm", ce.footer),
|
|
131
|
-
children: /* @__PURE__ */ M(
|
|
131
|
+
children: /* @__PURE__ */ M(H, {
|
|
132
132
|
labels: e,
|
|
133
133
|
onCancel: n,
|
|
134
134
|
onSubmit: r,
|
|
@@ -170,7 +170,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
170
170
|
footerBorder: "_footerBorder_1adw2_5",
|
|
171
171
|
columnBorder: "_columnBorder_1adw2_10"
|
|
172
172
|
}, ue = ({ 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 _ = ie(), v = f ? p?.savingStatusLabel ?? "Saving" : "", x =
|
|
173
|
+
let _ = ie(), v = f ? p?.savingStatusLabel ?? "Saving" : "", x = B(null), [S, C] = V(), w = l != null && o != null, E = l?.minWidth, D = l?.maxWidth, O = {
|
|
174
174
|
min: E,
|
|
175
175
|
max: D,
|
|
176
176
|
containerWidth: S
|
|
@@ -400,27 +400,27 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
400
400
|
let b = i({
|
|
401
401
|
"--dlf-summary-text": y?.summaryText,
|
|
402
402
|
"--dlf-row-label-text": y?.rowLabelText
|
|
403
|
-
}), { summaryLabel: x, addLabel: S, editLabel: w, popupTitle: T, addLocaleLabel: D, localeRowLabel: O = "Locale", languageLabel: j, nameLabel: P, namePlaceholder: F, descriptionLabel: I, descriptionPlaceholder: te, deleteAriaLabel: ne, cancelLabel: R = "Cancel", saveLabel: ie = "Save" } = o, [
|
|
403
|
+
}), { summaryLabel: x, addLabel: S, editLabel: w, popupTitle: T, addLocaleLabel: D, localeRowLabel: O = "Locale", languageLabel: j, nameLabel: P, namePlaceholder: F, descriptionLabel: I, descriptionPlaceholder: te, deleteAriaLabel: ne, cancelLabel: R = "Cancel", saveLabel: ie = "Save" } = o, [ae, z] = V(!1), [H, U] = V([]), W = B(0);
|
|
404
404
|
re(() => {
|
|
405
|
-
|
|
405
|
+
ae && U(e.length > 0 ? e : [ge(`locale-row-${++W.current}`, /* @__PURE__ */ new Set(), r)]);
|
|
406
406
|
}, [
|
|
407
|
-
|
|
407
|
+
ae,
|
|
408
408
|
e,
|
|
409
409
|
r
|
|
410
410
|
]);
|
|
411
|
-
let oe = () =>
|
|
412
|
-
t(
|
|
411
|
+
let oe = () => z(!0), G = () => z(!1), se = () => {
|
|
412
|
+
t(H.filter((e) => e.language && e.name)), z(!1);
|
|
413
413
|
}, ce = () => {
|
|
414
|
-
let e = new Set(
|
|
415
|
-
|
|
414
|
+
let e = new Set(H.map((e) => e.language).filter(Boolean));
|
|
415
|
+
U((t) => [...t, ge(`locale-row-${++W.current}`, e, r)]);
|
|
416
416
|
}, K = (e, t) => {
|
|
417
|
-
|
|
417
|
+
U((n) => n.map((n) => n.id === e ? {
|
|
418
418
|
...n,
|
|
419
419
|
...t
|
|
420
420
|
} : n));
|
|
421
421
|
}, q = (e) => {
|
|
422
|
-
|
|
423
|
-
}, J = new Set(r.map((e) => e.code)), Y = (e) => e !== "" && !J.has(e), le = e.some((e) => Y(e.language)), X = new Set(
|
|
422
|
+
U((t) => t.filter((t) => t.id !== e));
|
|
423
|
+
}, J = new Set(r.map((e) => e.code)), Y = (e) => e !== "" && !J.has(e), le = e.some((e) => Y(e.language)), X = new Set(H.map((e) => e.language).filter((e) => J.has(e))).size, ue = (t, n) => {
|
|
424
424
|
let i = e.find((e) => e.id === t.id)?.language, o = [...new Set([i ?? "", t.language].filter(Y))];
|
|
425
425
|
return [...r.map((e) => ({
|
|
426
426
|
value: e.code,
|
|
@@ -431,7 +431,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
431
431
|
label: a(e),
|
|
432
432
|
disabled: n.has(e)
|
|
433
433
|
}))];
|
|
434
|
-
}, Z =
|
|
434
|
+
}, Z = H.some((e) => !e.language || !e.name);
|
|
435
435
|
return r.length === 0 && !le ? null : /* @__PURE__ */ N("div", {
|
|
436
436
|
className: s("flex items-center gap-2", m),
|
|
437
437
|
style: b,
|
|
@@ -451,7 +451,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
451
451
|
onClick: oe
|
|
452
452
|
}),
|
|
453
453
|
/* @__PURE__ */ M(C, {
|
|
454
|
-
open:
|
|
454
|
+
open: ae,
|
|
455
455
|
header: T,
|
|
456
456
|
onClose: G,
|
|
457
457
|
mainButtons: [{
|
|
@@ -466,8 +466,8 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
466
466
|
children: /* @__PURE__ */ N("div", {
|
|
467
467
|
className: "flex flex-col gap-8 px-6 py-3",
|
|
468
468
|
style: b,
|
|
469
|
-
children: [
|
|
470
|
-
let r = new Set(
|
|
469
|
+
children: [H.map((e, t) => {
|
|
470
|
+
let r = new Set(H.filter((t) => t.id !== e.id).map((e) => e.language).filter(Boolean));
|
|
471
471
|
return /* @__PURE__ */ N("div", {
|
|
472
472
|
className: "flex flex-col gap-2",
|
|
473
473
|
children: [/* @__PURE__ */ N("div", {
|
|
@@ -545,7 +545,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
545
545
|
]
|
|
546
546
|
});
|
|
547
547
|
}, ye = "Add tags, comma separated", be = "deployment-creation-form-description", xe = ({ values: e, errors: t, onChange: i, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: c, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], formatLocaleLabel: p, fields: m = me, isNameReadOnly: h = !1, nameReadOnlyTooltip: _, nameCaption: v, isDescriptionRequired: y = !1, descriptionCaption: b, renderDescription: x, focusRequestKey: S }) => {
|
|
548
|
-
let C =
|
|
548
|
+
let C = B(null), w = B(null), T = B(null), E = B(!1), D = (e) => m.includes(e), j = D(Q.Name), P = D(Q.Version), F = !!(t.name || t.version || t.description), I = B(S);
|
|
549
549
|
re(() => {
|
|
550
550
|
let e = () => {
|
|
551
551
|
t.name ? C.current?.focus() : t.version ? w.current?.focus() : t.description && T.current?.focus();
|
|
@@ -762,7 +762,7 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
762
762
|
deleteConfirmLabel: "Delete",
|
|
763
763
|
deleteCancelLabel: "Cancel"
|
|
764
764
|
}, ke = ne(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, formatLocaleLabel: s, fields: c = me, isNameReadOnly: l, nameReadOnlyTooltip: u, nameCaption: d, isDescriptionRequired: f, descriptionCaption: p, renderDescription: m, focusRequestKey: h, labels: g }) => {
|
|
765
|
-
let [_, v] =
|
|
765
|
+
let [_, v] = V(!1), y = z(() => a ? c : c.filter((e) => e !== Q.Avatar), [a, c]), b = e.iconUrl, x = a?.resolveIconUrl, S = z(() => x ? x(b) : void 0, [b, x]), C = R(() => v(!0), []), w = R(() => v(!1), []), T = a?.resolveAttachedIconUrl, E = R((e) => {
|
|
766
766
|
let t = T?.(e);
|
|
767
767
|
t && n({ iconUrl: t }), v(!1);
|
|
768
768
|
}, [n, T]);
|
|
@@ -810,16 +810,16 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
810
810
|
hasAttemptedSubmit: !1,
|
|
811
811
|
submitAttemptCount: 0
|
|
812
812
|
}), Be = ({ initialValues: e, validationOptions: t, reseedKey: n }) => {
|
|
813
|
-
let [r, i] =
|
|
813
|
+
let [r, i] = V(() => ze(e, n));
|
|
814
814
|
r.reseedKey !== n && i(ze(e, n));
|
|
815
|
-
let a = t?.validateNamePattern, o = t?.validateVersionPattern, s =
|
|
815
|
+
let a = t?.validateNamePattern, o = t?.validateVersionPattern, s = z(() => Le(r.values, {
|
|
816
816
|
validateNamePattern: a,
|
|
817
817
|
validateVersionPattern: o
|
|
818
818
|
}), [
|
|
819
819
|
r.values,
|
|
820
820
|
a,
|
|
821
821
|
o
|
|
822
|
-
]), c =
|
|
822
|
+
]), c = z(() => {
|
|
823
823
|
if (r.hasAttemptedSubmit) return s;
|
|
824
824
|
let e = (e, t) => e && (t || Re.has(e)) ? e : void 0;
|
|
825
825
|
return {
|
|
@@ -831,8 +831,8 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
831
831
|
s,
|
|
832
832
|
r.hasAttemptedSubmit,
|
|
833
833
|
r.touched
|
|
834
|
-
]), l =
|
|
835
|
-
|
|
834
|
+
]), l = B(s), u = B(e);
|
|
835
|
+
ae(() => {
|
|
836
836
|
l.current = s, u.current = e;
|
|
837
837
|
});
|
|
838
838
|
let d = R((e) => i((t) => ({
|
|
@@ -851,8 +851,8 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
851
851
|
...e,
|
|
852
852
|
hasAttemptedSubmit: !0,
|
|
853
853
|
submitAttemptCount: e.submitAttemptCount + 1
|
|
854
|
-
})), Me(l.current)), []), m = R((e) => i((t) => ze(e ?? u.current, t.reseedKey)), []), h =
|
|
855
|
-
return
|
|
854
|
+
})), Me(l.current)), []), m = R((e) => i((t) => ze(e ?? u.current, t.reseedKey)), []), h = z(() => !je(r.values, r.baseline), [r.values, r.baseline]);
|
|
855
|
+
return z(() => ({
|
|
856
856
|
values: r.values,
|
|
857
857
|
setValues: d,
|
|
858
858
|
touched: r.touched,
|
|
@@ -875,6 +875,10 @@ var U = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
|
|
|
875
875
|
h,
|
|
876
876
|
m
|
|
877
877
|
]);
|
|
878
|
-
}
|
|
878
|
+
}, Ve = 1048576, He = [
|
|
879
|
+
"image/png",
|
|
880
|
+
"image/jpeg",
|
|
881
|
+
"image/svg+xml"
|
|
882
|
+
];
|
|
879
883
|
//#endregion
|
|
880
|
-
export { de as AddAvatar, pe as AvatarPickerModal, q as BUILDER_FORM_CLASS, K as BuilderFormContainer, Ie as DEFAULT_DEPLOYMENT_VERSION, De as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, xe as DeploymentCreationForm, ve as DeploymentLocalesField, ue as EditorLayout, Y as EditorSection, Ee as EntityEditor, Q as MetadataField, ke as MetadataForm, Ne as NAME_PATTERN, Fe as SEMVER_VERSION_PATTERN, Pe as VERSION_PATTERN, Be as useMetadataForm, Le as validateDeploymentCreationFields };
|
|
884
|
+
export { He as AVATAR_ALLOWED_MIME_TYPES, Ve as AVATAR_MAX_FILE_SIZE_BYTES, de as AddAvatar, pe as AvatarPickerModal, q as BUILDER_FORM_CLASS, K as BuilderFormContainer, Ie as DEFAULT_DEPLOYMENT_VERSION, De as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, xe as DeploymentCreationForm, ve as DeploymentLocalesField, ue as EditorLayout, Y as EditorSection, Ee as EntityEditor, Q as MetadataField, ke as MetadataForm, Ne as NAME_PATTERN, Fe as SEMVER_VERSION_PATTERN, Pe as VERSION_PATTERN, Be as useMetadataForm, Le as validateDeploymentCreationFields };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-builder-form",
|
|
3
3
|
"description": "Presentational builder form shells, editor layouts, and shared deployment field sets for composing and editing DIAL entities",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.326",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@tabler/icons-react": "^3.50.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
23
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.326",
|
|
24
24
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.72",
|
|
25
25
|
"react": "^19.2.8"
|
|
26
26
|
},
|