@epam/ai-dial-publish-panel 1.1.0-dev.135 → 1.1.0-dev.140

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PublishFoldersTree.d.ts","sourceRoot":"","sources":["../../../src/components/PublishFoldersTree/PublishFoldersTree.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAazD,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sFAAsF;IACtF,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3D;;;OAGG;IACH,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8HAA8H;IAC9H,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yHAAyH;IACzH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sMAAsM;IACtM,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6HAA6H;IAC7H,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2JAA2J;IAC3J,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wIAAwI;IACxI,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,sGAAsG;IACtG,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,kLAAkL;AAClL,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA6O1D,CAAC"}
1
+ {"version":3,"file":"PublishFoldersTree.d.ts","sourceRoot":"","sources":["../../../src/components/PublishFoldersTree/PublishFoldersTree.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,EAAE,EAA6B,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAazD,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sFAAsF;IACtF,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3D;;;OAGG;IACH,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8HAA8H;IAC9H,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yHAAyH;IACzH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sMAAsM;IACtM,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6HAA6H;IAC7H,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2JAA2J;IAC3J,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wIAAwI;IACxI,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,sGAAsG;IACtG,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,kLAAkL;AAClL,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA2P1D,CAAC"}
package/index.js CHANGED
@@ -60614,7 +60614,7 @@ var qN = 12, JN = 8, YN = ({ getSelectionLabel: e, onClearSelection: t, actions:
60614
60614
  sharedIndicatorClassName: _,
60615
60615
  sharedIndicatorTooltip: v
60616
60616
  }), /* @__PURE__ */ M(Ee, {
60617
- containerClassName: Ue("!h-6 py-[1px] pl-[7px] pr-[7px]", f),
60617
+ containerClassName: Ue("!h-5 !py-[1px] !pl-[7px] pr-[7px]", f),
60618
60618
  id: n,
60619
60619
  value: e,
60620
60620
  onChange: g,
@@ -60754,6 +60754,7 @@ var qN = 12, JN = 8, YN = ({ getSelectionLabel: e, onClearSelection: t, actions:
60754
60754
  items: ce,
60755
60755
  className: "sticky right-0",
60756
60756
  children: /* @__PURE__ */ M(Te, {
60757
+ size: Se.Small,
60757
60758
  className: "invisible group-hover/item:visible",
60758
60759
  icon: /* @__PURE__ */ M(et, { ...h })
60759
60760
  })
@@ -61846,37 +61847,37 @@ var wP = () => {
61846
61847
  ]
61847
61848
  })
61848
61849
  });
61849
- }, kP = ({ items: e, selectedPath: t, onSelectedPathChange: n, onCreateFolder: r, searchQuery: i, disabled: a = !1, createFolderLabel: o = "Create new folder", addSiblingFolderLabel: s = "Add sibling", addChildFolderLabel: c = "Add child", newFolderDefaultName: l = "New folder", noResultsLabel: u = "No folders match \"{query}\".", emptyFolderNameError: d = "Folder name cannot be empty.", invalidFolderNameError: p = "Folder name contains invalid characters.", duplicateFolderNameError: h = "A folder with this name already exists.", rootLabel: g = "Organization", expandedPaths: _, onExpandedPathsChange: v, loadingPaths: y }) => {
61850
- let [b, x] = m(() => new Set(t?.map((e, n) => Kt(t.slice(0, n + 1))) ?? [])), S = _ ?? b, C = (e) => {
61850
+ }, kP = ({ items: e, selectedPath: t, onSelectedPathChange: n, onCreateFolder: r, searchQuery: i, disabled: a = !1, createFolderLabel: o = "Create new folder", addSiblingFolderLabel: s = "Add sibling", addChildFolderLabel: c = "Add child", newFolderDefaultName: l = "New folder", noResultsLabel: u = "No folders match \"{query}\".", emptyFolderNameError: d = "Folder name cannot be empty.", invalidFolderNameError: h = "Folder name contains invalid characters.", duplicateFolderNameError: g = "A folder with this name already exists.", rootLabel: _ = "Organization", expandedPaths: v, onExpandedPathsChange: y, loadingPaths: b }) => {
61851
+ let [x, S] = m(() => new Set(t?.map((e, n) => Kt(t.slice(0, n + 1))) ?? [])), C = v ?? x, w = (e) => {
61851
61852
  let t = new Set(e);
61852
- t.delete(""), v ? v(t) : x(t);
61853
- }, [w, E] = m(null), [D, O] = m(l), k = i.trim(), ee = w != null, te = f(() => Bt(e, i), [e, i]), ne = k.length > 0 && te.length === 0, A = !ee && k.length > 0, re = f(() => Ht(A ? te : e), [
61853
+ t.delete(""), y ? y(t) : S(t);
61854
+ }, [E, D] = m(null), [O, k] = m(l), ee = p(null), te = i.trim(), ne = E != null, A = f(() => Bt(e, i), [e, i]), re = te.length > 0 && A.length === 0, ie = !ne && te.length > 0, j = f(() => Ht(ie ? A : e), [
61855
+ ie,
61854
61856
  A,
61855
- te,
61856
61857
  e
61857
- ]), ie = f(() => new Set(["", ...Gt(re)]), [re]), j = f(() => new Set(["", ...A ? ie : S]), [
61858
- A,
61858
+ ]), ae = f(() => new Set(["", ...Gt(j)]), [j]), oe = f(() => new Set(["", ...ie ? ae : C]), [
61859
61859
  ie,
61860
- S
61861
- ]), ae = f(() => Jt(re), [re]), oe = f(() => A && ae.length === 0 ? [] : [{
61860
+ ae,
61861
+ C
61862
+ ]), se = f(() => Jt(j), [j]), ce = f(() => ie && se.length === 0 ? [] : [{
61862
61863
  path: "",
61863
- name: g,
61864
+ name: _,
61864
61865
  folderId: "",
61865
61866
  nodeType: BM.FOLDER,
61866
- items: ae
61867
+ items: se
61867
61868
  }], [
61868
- ae,
61869
- g,
61870
- A
61871
- ]), se = w ? Kt(w) : null, ce = {
61869
+ se,
61870
+ _,
61871
+ ie
61872
+ ]), le = E ? Kt(E) : null, ue = {
61872
61873
  empty: d,
61873
- invalid: p,
61874
- duplicate: h
61875
- }, le = (t) => Zt(ne && Xt(k, [], ce) == null ? k : l, Qt(e, t)), ue = (e) => {
61876
- E(e), O(le(e));
61874
+ invalid: h,
61875
+ duplicate: g
61876
+ }, de = (t) => Zt(re && Xt(te, [], ue) == null ? te : l, Qt(e, t)), fe = (e) => {
61877
+ D(e), k(de(e)), ee.current = null;
61877
61878
  let t = Kt(e);
61878
- t && C(new Set(S).add(t));
61879
- }, de = () => ue(t ?? []), fe = (e) => {
61879
+ t && w(new Set(C).add(t));
61880
+ }, pe = () => fe(t ?? []), me = (e) => {
61880
61881
  let t = qt(e.path), n = [{
61881
61882
  key: "add-child",
61882
61883
  label: c,
@@ -61884,7 +61885,7 @@ var wP = () => {
61884
61885
  size: T.SM,
61885
61886
  "aria-hidden": !0
61886
61887
  }),
61887
- onClick: () => ue(t)
61888
+ onClick: () => fe(t)
61888
61889
  }];
61889
61890
  return e.path !== "" && n.push({
61890
61891
  key: "add-sibling",
@@ -61893,34 +61894,38 @@ var wP = () => {
61893
61894
  size: T.SM,
61894
61895
  "aria-hidden": !0
61895
61896
  }),
61896
- onClick: () => ue(t.slice(0, -1))
61897
+ onClick: () => fe(t.slice(0, -1))
61897
61898
  }), n;
61898
- }, pe = (t) => w ? Xt(t, Qt(e, w), ce) : null;
61899
+ }, he = (t) => {
61900
+ if (!E) return null;
61901
+ let n = Xt(t, Qt(e, E), ue);
61902
+ return ee.current = n, n;
61903
+ };
61899
61904
  return /* @__PURE__ */ N("div", {
61900
61905
  className: Br(a && "pointer-events-none opacity-60"),
61901
61906
  children: [/* @__PURE__ */ M(gP, {
61902
- items: oe,
61907
+ items: ce,
61903
61908
  showFiles: !1,
61904
61909
  selectedPath: t == null ? void 0 : Kt(t),
61905
- expandedPaths: j,
61906
- onExpandedPathsChange: C,
61907
- loadingPaths: y,
61910
+ expandedPaths: oe,
61911
+ onExpandedPathsChange: w,
61912
+ loadingPaths: b,
61908
61913
  onItemClick: (e) => {
61909
61914
  n(t != null && Kt(t) === e.path ? void 0 : qt(e.path));
61910
61915
  },
61911
- getContextMenuItems: fe,
61912
- createdFolderPath: se,
61913
- newFolderDefaultName: D,
61916
+ getContextMenuItems: me,
61917
+ createdFolderPath: le,
61918
+ newFolderDefaultName: O,
61914
61919
  onCreateFolderSave: (e) => {
61915
- if (!w) return;
61916
- let t = e.trim();
61917
- pe(e) || (r(w, t), n([...w, t])), E(null);
61920
+ if (!E) return;
61921
+ let t = e.trim(), i = ee.current;
61922
+ (he(e) ?? i) || (r(E, t), n([...E, t])), D(null);
61918
61923
  },
61919
- onCreateFolderCancel: () => E(null),
61920
- onRenameValidate: (e) => pe(e),
61921
- emptyStateTitle: A ? u.replace("{query}", k) : void 0
61924
+ onCreateFolderCancel: () => D(null),
61925
+ onRenameValidate: (e) => he(e),
61926
+ emptyStateTitle: ie ? u.replace("{query}", te) : void 0
61922
61927
  }), /* @__PURE__ */ M(Oe, {
61923
- onClick: de,
61928
+ onClick: pe,
61924
61929
  label: o,
61925
61930
  iconBefore: /* @__PURE__ */ M(pt, {
61926
61931
  size: T.SM,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-publish-panel",
3
3
  "description": "Publish-to-folder UI and state flow shared by catalog entity publish and conversation publish",
4
- "version": "1.1.0-dev.135",
4
+ "version": "1.1.0-dev.140",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,9 +19,9 @@
19
19
  "peerDependencies": {
20
20
  "react": "^19.0.0",
21
21
  "@tabler/icons-react": "^3.0.0",
22
- "@epam/ai-dial-sidebar": "1.1.0-dev.135",
23
- "@epam/ai-dial-chat-shared": "1.1.0-dev.135",
24
- "@epam/ai-dial-kit": "1.1.0-dev.135",
22
+ "@epam/ai-dial-sidebar": "1.1.0-dev.140",
23
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.140",
24
+ "@epam/ai-dial-kit": "1.1.0-dev.140",
25
25
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
26
26
  "@epam/ai-dial-react-file-manager": "^0.1.0-dev.17"
27
27
  },