@epam/ai-dial-skill-editor 1.3.0-dev.70 → 1.3.0-dev.79

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 (2) hide show
  1. package/index.js +42 -44
  2. 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, descriptionMaxLength: _, descriptionCaption: v, renderDescription: y, focusRequestKey: b }) => {
368
- let x = V(null), S = V(null), C = V(null), w = V(!1), E = (e) => p.includes(e), D = E(U.Name), O = E(U.Version), k = !!(t.name || t.version || t.description), ee = V(b);
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 ? x.current?.focus() : t.version ? S.current?.focus() : t.description && C.current?.focus();
371
+ t.name ? b.current?.focus() : t.version ? x.current?.focus() : t.description && S.current?.focus();
372
372
  };
373
- if (b !== void 0) {
374
- b !== ee.current && (ee.current = b, e());
373
+ if (y !== void 0) {
374
+ y !== k.current && (k.current = y, e());
375
375
  return;
376
376
  }
377
- k && !w.current && e(), w.current = k;
377
+ O && !C.current && e(), C.current = O;
378
378
  }, [
379
- b,
380
- k,
379
+ y,
380
+ O,
381
381
  t.name,
382
382
  t.version,
383
383
  t.description
384
384
  ]);
385
- let A = /* @__PURE__ */ F(M, {
385
+ let ee = /* @__PURE__ */ F(M, {
386
386
  id: ke,
387
- ref: C,
387
+ ref: S,
388
388
  value: e.description,
389
389
  onChange: (e) => n({ description: e }),
390
390
  "aria-required": g || void 0,
391
- labelProps: y ? void 0 : {
391
+ labelProps: v ? void 0 : {
392
392
  label: u.description.label,
393
393
  required: g
394
394
  },
395
395
  placeholder: u.description.placeholder,
396
- maxLength: _,
397
- caption: v,
396
+ caption: _,
398
397
  error: t.description || void 0,
399
398
  invalid: !!t.description,
400
- containerClassName: y ? void 0 : d?.field,
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
- E(U.Avatar) && /* @__PURE__ */ F(we, {
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
- (D || O) && /* @__PURE__ */ I("div", {
416
+ (E || D) && /* @__PURE__ */ I("div", {
418
417
  className: c("flex items-start gap-4", d?.field),
419
- children: [D && /* @__PURE__ */ F(T, {
418
+ children: [E && /* @__PURE__ */ F(T, {
420
419
  id: "deployment-creation-form-name",
421
- inputRef: x,
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: O ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
435
- }), O && /* @__PURE__ */ F(T, {
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: S,
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: D ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
444
+ containerClassName: E ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
446
445
  })]
447
446
  }),
448
- E(U.Description) && (y ? /* @__PURE__ */ F("div", {
447
+ w(U.Description) && (v ? /* @__PURE__ */ F("div", {
449
448
  className: d?.field,
450
- children: y(A, ke)
451
- }) : A),
452
- E(U.Locales) && /* @__PURE__ */ F(W, {
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
- E(U.Tags) && /* @__PURE__ */ F("div", {
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, descriptionMaxLength: d, descriptionCaption: f, renderDescription: p, focusRequestKey: m, labels: h }) => {
582
- let [g, _] = H(!1), v = B(() => a ? s : s.filter((e) => e !== U.Avatar), [a, s]), y = e.iconUrl, b = a?.resolveIconUrl, x = B(() => b ? b(y) : void 0, [y, b]), S = z(() => _(!0), []), C = z(() => _(!1), []), w = a?.resolveAttachedIconUrl, T = z((e) => {
583
- let t = w?.(e);
584
- t && n({ iconUrl: t }), _(!1);
585
- }, [n, w]);
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: x,
593
- onAddAvatarClick: S,
594
- labels: h?.form ?? Pe,
591
+ iconPreviewUrl: b,
592
+ onAddAvatarClick: x,
593
+ labels: m?.form ?? Pe,
595
594
  availableLocaleOptions: o,
596
- fields: v,
595
+ fields: _,
597
596
  isNameReadOnly: c,
598
597
  nameCaption: l,
599
598
  isDescriptionRequired: u,
600
- descriptionMaxLength: d,
601
- descriptionCaption: f,
602
- renderDescription: p,
603
- focusRequestKey: m
599
+ descriptionCaption: d,
600
+ renderDescription: f,
601
+ focusRequestKey: p
604
602
  }), a && /* @__PURE__ */ F(Te, {
605
- isOpen: g,
606
- onClose: C,
607
- onAttach: T,
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: h?.avatarPicker ?? Fe
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.70",
4
+ "version": "1.3.0-dev.79",
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.70"
23
+ "@epam/ai-dial-builder-form": "1.3.0-dev.79"
24
24
  },
25
25
  "peerDependencies": {
26
- "@epam/ai-dial-chat-shared": "1.3.0-dev.70",
26
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.79",
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"