@epam/ai-dial-skill-editor 1.2.0-rc.6 → 1.2.0-rc.7

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 CHANGED
@@ -364,38 +364,40 @@ 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, renderDescription: _, focusRequestKey: v }) => {
368
- let y = V(null), b = V(null), x = V(null), S = V(!1), C = (e) => p.includes(e), w = C(U.Name), E = C(U.Version), D = !!(t.name || t.version || t.description), O = V(v);
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);
369
369
  pe(() => {
370
370
  let e = () => {
371
- t.name ? y.current?.focus() : t.version ? b.current?.focus() : t.description && x.current?.focus();
371
+ t.name ? x.current?.focus() : t.version ? S.current?.focus() : t.description && C.current?.focus();
372
372
  };
373
- if (v !== void 0) {
374
- v !== O.current && (O.current = v, e());
373
+ if (b !== void 0) {
374
+ b !== ee.current && (ee.current = b, e());
375
375
  return;
376
376
  }
377
- D && !S.current && e(), S.current = D;
377
+ k && !w.current && e(), w.current = k;
378
378
  }, [
379
- v,
380
- D,
379
+ b,
380
+ k,
381
381
  t.name,
382
382
  t.version,
383
383
  t.description
384
384
  ]);
385
- let k = /* @__PURE__ */ F(M, {
385
+ let A = /* @__PURE__ */ F(M, {
386
386
  id: ke,
387
- ref: x,
387
+ ref: C,
388
388
  value: e.description,
389
389
  onChange: (e) => n({ description: e }),
390
390
  "aria-required": g || void 0,
391
- labelProps: _ ? void 0 : {
391
+ labelProps: y ? 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
398
  error: t.description || void 0,
397
399
  invalid: !!t.description,
398
- containerClassName: _ ? void 0 : d?.field,
400
+ containerClassName: y ? void 0 : d?.field,
399
401
  className: r,
400
402
  resize: N.Vertical
401
403
  });
@@ -404,7 +406,7 @@ var ve = {
404
406
  "aria-label": u.ariaLabel,
405
407
  className: c("flex flex-col gap-4", d?.root),
406
408
  children: [
407
- C(U.Avatar) && /* @__PURE__ */ F(we, {
409
+ E(U.Avatar) && /* @__PURE__ */ F(we, {
408
410
  label: u.iconUrl.label,
409
411
  avatarUrl: s,
410
412
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -412,11 +414,11 @@ var ve = {
412
414
  onAddAvatarClick: l,
413
415
  className: d?.field
414
416
  }),
415
- (w || E) && /* @__PURE__ */ I("div", {
417
+ (D || O) && /* @__PURE__ */ I("div", {
416
418
  className: c("flex items-start gap-4", d?.field),
417
- children: [w && /* @__PURE__ */ F(T, {
419
+ children: [D && /* @__PURE__ */ F(T, {
418
420
  id: "deployment-creation-form-name",
419
- inputRef: y,
421
+ inputRef: x,
420
422
  value: e.name,
421
423
  onChange: (e) => n({ name: e ?? "" }),
422
424
  onBlur: a,
@@ -429,10 +431,10 @@ var ve = {
429
431
  caption: h,
430
432
  error: t.name || void 0,
431
433
  invalid: !!t.name,
432
- containerClassName: E ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
433
- }), E && /* @__PURE__ */ F(T, {
434
+ containerClassName: O ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
435
+ }), O && /* @__PURE__ */ F(T, {
434
436
  id: "deployment-creation-form-version",
435
- inputRef: b,
437
+ inputRef: S,
436
438
  value: e.version,
437
439
  onChange: (e) => n({ version: e ?? "" }),
438
440
  onBlur: o,
@@ -440,21 +442,21 @@ var ve = {
440
442
  placeholder: u.version.placeholder,
441
443
  error: t.version || void 0,
442
444
  invalid: !!t.version,
443
- containerClassName: w ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
445
+ containerClassName: D ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
444
446
  })]
445
447
  }),
446
- C(U.Description) && (_ ? /* @__PURE__ */ F("div", {
448
+ E(U.Description) && (y ? /* @__PURE__ */ F("div", {
447
449
  className: d?.field,
448
- children: _(k, ke)
449
- }) : k),
450
- C(U.Locales) && /* @__PURE__ */ F(W, {
450
+ children: y(A, ke)
451
+ }) : A),
452
+ E(U.Locales) && /* @__PURE__ */ F(W, {
451
453
  value: e.otherLocales,
452
454
  onChange: (e) => n({ otherLocales: e }),
453
455
  availableLocaleOptions: f,
454
456
  labels: u.otherLocales,
455
457
  className: d?.field
456
458
  }),
457
- C(U.Tags) && /* @__PURE__ */ F("div", {
459
+ E(U.Tags) && /* @__PURE__ */ F("div", {
458
460
  className: d?.field,
459
461
  children: /* @__PURE__ */ F(j, {
460
462
  id: "deployment-creation-form-topics",
@@ -576,36 +578,38 @@ var ve = {
576
578
  deleteConfirmItemsLabel: "items?",
577
579
  deleteConfirmLabel: "Delete",
578
580
  deleteCancelLabel: "Cancel"
579
- }, 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, renderDescription: d, focusRequestKey: f, labels: p }) => {
580
- let [m, h] = H(!1), g = B(() => a ? s : s.filter((e) => e !== U.Avatar), [a, s]), _ = e.iconUrl, v = a?.resolveIconUrl, y = B(() => v ? v(_) : void 0, [_, v]), b = z(() => h(!0), []), x = z(() => h(!1), []), S = a?.resolveAttachedIconUrl, C = z((e) => {
581
- let t = S?.(e);
582
- t && n({ iconUrl: t }), h(!1);
583
- }, [n, S]);
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]);
584
586
  return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(G, {
585
587
  values: e,
586
588
  errors: t,
587
589
  onChange: n,
588
590
  onNameBlur: r,
589
591
  onVersionBlur: i,
590
- iconPreviewUrl: y,
591
- onAddAvatarClick: b,
592
- labels: p?.form ?? Pe,
592
+ iconPreviewUrl: x,
593
+ onAddAvatarClick: S,
594
+ labels: h?.form ?? Pe,
593
595
  availableLocaleOptions: o,
594
- fields: g,
596
+ fields: v,
595
597
  isNameReadOnly: c,
596
598
  nameCaption: l,
597
599
  isDescriptionRequired: u,
598
- renderDescription: d,
599
- focusRequestKey: f
600
+ descriptionMaxLength: d,
601
+ descriptionCaption: f,
602
+ renderDescription: p,
603
+ focusRequestKey: m
600
604
  }), a && /* @__PURE__ */ F(Te, {
601
- isOpen: m,
602
- onClose: x,
603
- onAttach: C,
605
+ isOpen: g,
606
+ onClose: C,
607
+ onAttach: T,
604
608
  bucket: a.bucket,
605
609
  FileManagerModal: a.FileManagerModal,
606
610
  allowedMimeTypes: a.allowedMimeTypes,
607
611
  maxFileSizeBytes: a.maxFileSizeBytes,
608
- labels: p?.avatarPicker ?? Fe
612
+ labels: h?.avatarPicker ?? Fe
609
613
  })] });
610
614
  }), Le = /* @__PURE__ */ function(e) {
611
615
  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.2.0-rc.6",
4
+ "version": "1.2.0-rc.7",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,12 +20,12 @@
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.2.0-rc.6"
23
+ "@epam/ai-dial-builder-form": "1.2.0-rc.7"
24
24
  },
25
25
  "peerDependencies": {
26
- "@epam/ai-dial-chat-shared": "1.2.0-rc.6",
26
+ "@epam/ai-dial-chat-shared": "1.2.0-rc.7",
27
27
  "@epam/ai-dial-ui-kit": "^0.15.3",
28
- "@epam/ai-dial-react-file-manager": "^0.3.4",
28
+ "@epam/ai-dial-react-file-manager": "^0.3.5",
29
29
  "react": "^19.2.8"
30
30
  },
31
31
  "repository": {
package/utils/icon.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { TablerIcon } from '@tabler/icons-react';
2
2
  /** Returns a decorative Tabler icon at the kit stroke, sized `DIAL_ICON_SIZE.MD` unless `size` is given. */
3
- export declare const renderIcon: (Icon: TablerIcon, className?: string, size?: number) => import("react").JSX.Element;
3
+ export declare const renderIcon: (Icon: TablerIcon, className?: string, size?: number) => import('react').JSX.Element;
4
4
  //# sourceMappingURL=icon.d.ts.map