@epam/ai-dial-skill-editor 1.3.0-dev.70 → 1.3.0-dev.83
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/index.js +42 -44
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -364,40 +364,39 @@ var ve = {
|
|
|
364
364
|
})
|
|
365
365
|
]
|
|
366
366
|
});
|
|
367
|
-
}, Oe = "Add tags, comma separated", ke = "deployment-creation-form-description", G = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = Ee, isNameReadOnly: m = !1, nameCaption: h, isDescriptionRequired: g = !1,
|
|
368
|
-
let
|
|
367
|
+
}, Oe = "Add tags, comma separated", ke = "deployment-creation-form-description", G = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], fields: p = Ee, isNameReadOnly: m = !1, nameCaption: h, isDescriptionRequired: g = !1, descriptionCaption: _, renderDescription: v, focusRequestKey: y }) => {
|
|
368
|
+
let b = V(null), x = V(null), S = V(null), C = V(!1), w = (e) => p.includes(e), E = w(U.Name), D = w(U.Version), O = !!(t.name || t.version || t.description), k = V(y);
|
|
369
369
|
pe(() => {
|
|
370
370
|
let e = () => {
|
|
371
|
-
t.name ?
|
|
371
|
+
t.name ? b.current?.focus() : t.version ? x.current?.focus() : t.description && S.current?.focus();
|
|
372
372
|
};
|
|
373
|
-
if (
|
|
374
|
-
|
|
373
|
+
if (y !== void 0) {
|
|
374
|
+
y !== k.current && (k.current = y, e());
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
|
-
|
|
377
|
+
O && !C.current && e(), C.current = O;
|
|
378
378
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
y,
|
|
380
|
+
O,
|
|
381
381
|
t.name,
|
|
382
382
|
t.version,
|
|
383
383
|
t.description
|
|
384
384
|
]);
|
|
385
|
-
let
|
|
385
|
+
let ee = /* @__PURE__ */ F(M, {
|
|
386
386
|
id: ke,
|
|
387
|
-
ref:
|
|
387
|
+
ref: S,
|
|
388
388
|
value: e.description,
|
|
389
389
|
onChange: (e) => n({ description: e }),
|
|
390
390
|
"aria-required": g || void 0,
|
|
391
|
-
labelProps:
|
|
391
|
+
labelProps: v ? void 0 : {
|
|
392
392
|
label: u.description.label,
|
|
393
393
|
required: g
|
|
394
394
|
},
|
|
395
395
|
placeholder: u.description.placeholder,
|
|
396
|
-
|
|
397
|
-
caption: v,
|
|
396
|
+
caption: _,
|
|
398
397
|
error: t.description || void 0,
|
|
399
398
|
invalid: !!t.description,
|
|
400
|
-
containerClassName:
|
|
399
|
+
containerClassName: v ? void 0 : d?.field,
|
|
401
400
|
className: r,
|
|
402
401
|
resize: N.Vertical
|
|
403
402
|
});
|
|
@@ -406,7 +405,7 @@ var ve = {
|
|
|
406
405
|
"aria-label": u.ariaLabel,
|
|
407
406
|
className: c("flex flex-col gap-4", d?.root),
|
|
408
407
|
children: [
|
|
409
|
-
|
|
408
|
+
w(U.Avatar) && /* @__PURE__ */ F(we, {
|
|
410
409
|
label: u.iconUrl.label,
|
|
411
410
|
avatarUrl: s,
|
|
412
411
|
addAvatarLabel: u.iconUrl.addAvatarLabel,
|
|
@@ -414,11 +413,11 @@ var ve = {
|
|
|
414
413
|
onAddAvatarClick: l,
|
|
415
414
|
className: d?.field
|
|
416
415
|
}),
|
|
417
|
-
(
|
|
416
|
+
(E || D) && /* @__PURE__ */ I("div", {
|
|
418
417
|
className: c("flex items-start gap-4", d?.field),
|
|
419
|
-
children: [
|
|
418
|
+
children: [E && /* @__PURE__ */ F(T, {
|
|
420
419
|
id: "deployment-creation-form-name",
|
|
421
|
-
inputRef:
|
|
420
|
+
inputRef: b,
|
|
422
421
|
value: e.name,
|
|
423
422
|
onChange: (e) => n({ name: e ?? "" }),
|
|
424
423
|
onBlur: a,
|
|
@@ -431,10 +430,10 @@ var ve = {
|
|
|
431
430
|
caption: h,
|
|
432
431
|
error: t.name || void 0,
|
|
433
432
|
invalid: !!t.name,
|
|
434
|
-
containerClassName:
|
|
435
|
-
}),
|
|
433
|
+
containerClassName: D ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
|
|
434
|
+
}), D && /* @__PURE__ */ F(T, {
|
|
436
435
|
id: "deployment-creation-form-version",
|
|
437
|
-
inputRef:
|
|
436
|
+
inputRef: x,
|
|
438
437
|
value: e.version,
|
|
439
438
|
onChange: (e) => n({ version: e ?? "" }),
|
|
440
439
|
onBlur: o,
|
|
@@ -442,21 +441,21 @@ var ve = {
|
|
|
442
441
|
placeholder: u.version.placeholder,
|
|
443
442
|
error: t.version || void 0,
|
|
444
443
|
invalid: !!t.version,
|
|
445
|
-
containerClassName:
|
|
444
|
+
containerClassName: E ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
|
|
446
445
|
})]
|
|
447
446
|
}),
|
|
448
|
-
|
|
447
|
+
w(U.Description) && (v ? /* @__PURE__ */ F("div", {
|
|
449
448
|
className: d?.field,
|
|
450
|
-
children:
|
|
451
|
-
}) :
|
|
452
|
-
|
|
449
|
+
children: v(ee, ke)
|
|
450
|
+
}) : ee),
|
|
451
|
+
w(U.Locales) && /* @__PURE__ */ F(W, {
|
|
453
452
|
value: e.otherLocales,
|
|
454
453
|
onChange: (e) => n({ otherLocales: e }),
|
|
455
454
|
availableLocaleOptions: f,
|
|
456
455
|
labels: u.otherLocales,
|
|
457
456
|
className: d?.field
|
|
458
457
|
}),
|
|
459
|
-
|
|
458
|
+
w(U.Tags) && /* @__PURE__ */ F("div", {
|
|
460
459
|
className: d?.field,
|
|
461
460
|
children: /* @__PURE__ */ F(j, {
|
|
462
461
|
id: "deployment-creation-form-topics",
|
|
@@ -578,38 +577,37 @@ var ve = {
|
|
|
578
577
|
deleteConfirmItemsLabel: "items?",
|
|
579
578
|
deleteConfirmLabel: "Delete",
|
|
580
579
|
deleteCancelLabel: "Cancel"
|
|
581
|
-
}, Ie = fe(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = Ee, isNameReadOnly: c, nameCaption: l, isDescriptionRequired: u,
|
|
582
|
-
let [
|
|
583
|
-
let t =
|
|
584
|
-
t && n({ iconUrl: t }),
|
|
585
|
-
}, [n,
|
|
580
|
+
}, Ie = fe(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, fields: s = Ee, isNameReadOnly: c, nameCaption: l, isDescriptionRequired: u, descriptionCaption: d, renderDescription: f, focusRequestKey: p, labels: m }) => {
|
|
581
|
+
let [h, g] = H(!1), _ = B(() => a ? s : s.filter((e) => e !== U.Avatar), [a, s]), v = e.iconUrl, y = a?.resolveIconUrl, b = B(() => y ? y(v) : void 0, [v, y]), x = z(() => g(!0), []), S = z(() => g(!1), []), C = a?.resolveAttachedIconUrl, w = z((e) => {
|
|
582
|
+
let t = C?.(e);
|
|
583
|
+
t && n({ iconUrl: t }), g(!1);
|
|
584
|
+
}, [n, C]);
|
|
586
585
|
return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(G, {
|
|
587
586
|
values: e,
|
|
588
587
|
errors: t,
|
|
589
588
|
onChange: n,
|
|
590
589
|
onNameBlur: r,
|
|
591
590
|
onVersionBlur: i,
|
|
592
|
-
iconPreviewUrl:
|
|
593
|
-
onAddAvatarClick:
|
|
594
|
-
labels:
|
|
591
|
+
iconPreviewUrl: b,
|
|
592
|
+
onAddAvatarClick: x,
|
|
593
|
+
labels: m?.form ?? Pe,
|
|
595
594
|
availableLocaleOptions: o,
|
|
596
|
-
fields:
|
|
595
|
+
fields: _,
|
|
597
596
|
isNameReadOnly: c,
|
|
598
597
|
nameCaption: l,
|
|
599
598
|
isDescriptionRequired: u,
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
focusRequestKey: m
|
|
599
|
+
descriptionCaption: d,
|
|
600
|
+
renderDescription: f,
|
|
601
|
+
focusRequestKey: p
|
|
604
602
|
}), a && /* @__PURE__ */ F(Te, {
|
|
605
|
-
isOpen:
|
|
606
|
-
onClose:
|
|
607
|
-
onAttach:
|
|
603
|
+
isOpen: h,
|
|
604
|
+
onClose: S,
|
|
605
|
+
onAttach: w,
|
|
608
606
|
bucket: a.bucket,
|
|
609
607
|
FileManagerModal: a.FileManagerModal,
|
|
610
608
|
allowedMimeTypes: a.allowedMimeTypes,
|
|
611
609
|
maxFileSizeBytes: a.maxFileSizeBytes,
|
|
612
|
-
labels:
|
|
610
|
+
labels: m?.avatarPicker ?? Fe
|
|
613
611
|
})] });
|
|
614
612
|
}), Le = /* @__PURE__ */ function(e) {
|
|
615
613
|
return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-skill-editor",
|
|
3
3
|
"description": "Host-agnostic form for authoring a DIAL Skill, with an inline supporting-file tree",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.83",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
21
|
"@uiw/react-markdown-preview": "^5.2.1",
|
|
22
22
|
"@uiw/react-md-editor": "^4.1.1",
|
|
23
|
-
"@epam/ai-dial-builder-form": "1.3.0-dev.
|
|
23
|
+
"@epam/ai-dial-builder-form": "1.3.0-dev.83"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.83",
|
|
27
27
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.11",
|
|
28
28
|
"@epam/ai-dial-react-file-manager": "^0.4.0-dev.7",
|
|
29
29
|
"react": "^19.2.8"
|