ode-explorer 1.4.9 → 1.4.11-develop.202406111044

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/lib/index2.js CHANGED
@@ -2,16 +2,16 @@ var ge = Object.defineProperty;
2
2
  var ye = (e, s, t) => s in e ? ge(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
3
3
  var $ = (e, s, t) => (ye(e, typeof s != "symbol" ? s + "" : s, t), t);
4
4
  import { jsx as c, jsxs as N, Fragment as ce } from "react/jsx-runtime";
5
- import { useState as ie, useRef as Ie, useEffect as M, lazy as F, Suspense as q, Fragment as we } from "react";
6
- import { useScrollToTop as Se, useOdeClient as K, IconButton as xe, useToast as U, useUser as le, useShareMutation as De, useUpdateMutation as be, LoadingScreen as A, FormControl as Te, Input as Fe, SearchButton as Ce, Dropdown as z, useToggle as Ne, TreeView as Re, Button as Pe, useXitiTrackPageLoad as Ae, isActionAvailable as oe, AppHeader as Ee, Breadcrumb as Qe, Grid as te } from "@edifice-ui/react";
7
- import { ArrowLeft as Oe, Filter as qe, Delete as Ue, Plus as ke } from "@edifice-ui/icons";
5
+ import { useState as ie, useRef as Ie, useEffect as M, Suspense as O, lazy as F, Fragment as Se } from "react";
6
+ import { useScrollToTop as we, useOdeClient as K, IconButton as xe, useToast as k, useUser as le, useShareMutation as De, useUpdateMutation as be, LoadingScreen as A, FormControl as Te, Input as Fe, SearchButton as Ce, Dropdown as z, useToggle as Ne, TreeView as Re, Button as Pe, useXitiTrackPageLoad as Ae, isActionAvailable as oe, AppHeader as Ee, Breadcrumb as Qe, Grid as te } from "@edifice-ui/react";
7
+ import { ArrowLeft as qe, Filter as Oe, Delete as ke, Plus as Ue } from "@edifice-ui/icons";
8
8
  import { useTranslation as j } from "react-i18next";
9
- import { odeServices as x, FOLDER as T, SORT_ORDER as ve } from "edifice-ts-client";
10
- import { t as S } from "i18next";
11
- import { create as Le } from "zustand";
12
- import { useQuery as Me, useInfiniteQuery as Ke, useQueryClient as E, useMutation as v } from "@tanstack/react-query";
9
+ import { odeServices as D, FOLDER as w, SORT_ORDER as Le } from "edifice-ts-client";
10
+ import { t as x } from "i18next";
11
+ import { create as ve } from "zustand";
12
+ import { useQuery as Me, useInfiniteQuery as Ke, useQueryClient as E, useMutation as L } from "@tanstack/react-query";
13
13
  const de = async (e) => {
14
- const s = await x.resource(e.application).searchContext(e);
14
+ const s = await D.resource(e.application).searchContext(e);
15
15
  return {
16
16
  ...s,
17
17
  folders: s.folders.filter((t) => !t.trashed)
@@ -27,7 +27,7 @@ const de = async (e) => {
27
27
  application: e.application,
28
28
  type: e.types[0]
29
29
  };
30
- return await x.resource(e.application).createFolder(r);
30
+ return await D.resource(e.application).createFolder(r);
31
31
  }, _e = async ({
32
32
  folderId: e,
33
33
  searchParams: s,
@@ -41,7 +41,7 @@ const de = async (e) => {
41
41
  application: s.application,
42
42
  type: s.types[0]
43
43
  };
44
- return await x.resource(s.application).updateFolder(n);
44
+ return await D.resource(s.application).updateFolder(n);
45
45
  }, $e = async ({
46
46
  searchParams: e,
47
47
  resourceIds: s,
@@ -54,7 +54,7 @@ const de = async (e) => {
54
54
  resourceIds: s,
55
55
  folderIds: r
56
56
  };
57
- return await x.resource(e.application).trashAll(n, t);
57
+ return await D.resource(e.application).trashAll(n, t);
58
58
  }, ze = async ({
59
59
  searchParams: e,
60
60
  resourceIds: s,
@@ -67,7 +67,7 @@ const de = async (e) => {
67
67
  resourceIds: s,
68
68
  folderIds: r
69
69
  };
70
- return await x.resource(e.application).deleteAll(n, t);
70
+ return await D.resource(e.application).deleteAll(n, t);
71
71
  }, je = async ({
72
72
  searchParams: e,
73
73
  resourceIds: s,
@@ -80,8 +80,8 @@ const de = async (e) => {
80
80
  resourceIds: s,
81
81
  folderIds: t
82
82
  };
83
- return await x.resource(e.application).restoreAll(n, r);
84
- }, Ve = async (e, s) => await x.resource(e.application).copy({
83
+ return await D.resource(e.application).restoreAll(n, r);
84
+ }, Ve = async (e, s) => await D.resource(e.application).copy({
85
85
  application: e.application,
86
86
  resourceId: s
87
87
  }), ue = async ({
@@ -97,40 +97,39 @@ const de = async (e) => {
97
97
  resourceIds: s,
98
98
  folderIds: r
99
99
  };
100
- return await x.resource(e.application).moveToFolder(a, n);
101
- };
102
- const He = async (e) => await x.rights().sessionHasWorkflowRights(e), We = ({
100
+ return await D.resource(e.application).moveToFolder(a, n);
101
+ }, He = async (e) => await D.rights().sessionHasWorkflowRights(e), We = ({
103
102
  searchParams: e,
104
103
  assetId: s
105
104
  }) => {
106
- const t = x.resource(e.application).getViewUrl(s);
105
+ const t = D.resource(e.application).getViewUrl(s);
107
106
  window.open(t, "_self");
108
- }, Je = ({
107
+ }, Ge = ({
109
108
  searchParams: e,
110
109
  params: s
111
- }) => x.resource(e.application).create(s), Ge = ({
110
+ }) => D.resource(e.application).create(s), Je = ({
112
111
  searchParams: e,
113
112
  assetId: s
114
113
  }) => {
115
- const t = x.resource(e.application).getPrintUrl(s);
114
+ const t = D.resource(e.application).getPrintUrl(s);
116
115
  return window.open(t, "_blank");
117
116
  }, $t = ({
118
117
  searchParams: e,
119
118
  folderId: s
120
119
  }) => {
121
- const t = x.resource(e.application).getFormUrl(s);
120
+ const t = D.resource(e.application).getFormUrl(s);
122
121
  return window.open(t, "_self");
123
122
  }, zt = ({
124
123
  searchParams: e,
125
124
  assetId: s
126
125
  }) => {
127
- const t = x.resource(e.application).getEditUrl(s);
126
+ const t = D.resource(e.application).getEditUrl(s);
128
127
  return window.open(t, "_self");
129
128
  }, jt = ({
130
129
  searchParams: e,
131
130
  assetId: s
132
131
  }) => {
133
- const t = x.resource(e.application).getExportUrl(s);
132
+ const t = D.resource(e.application).getExportUrl(s);
134
133
  return window.open(t, "_self");
135
134
  };
136
135
  function se(e) {
@@ -144,12 +143,12 @@ function W(e, s) {
144
143
  function Xe(e, s) {
145
144
  var r;
146
145
  const t = W(e, s);
147
- return (r = t == null ? void 0 : t.folder) != null && r.ancestors ? [...(t == null ? void 0 : t.folder.ancestors) || [], e] : e === T.BIN ? [T.BIN] : [T.DEFAULT];
146
+ return (r = t == null ? void 0 : t.folder) != null && r.ancestors ? [...(t == null ? void 0 : t.folder.ancestors) || [], e] : e === w.BIN ? [w.BIN] : [w.DEFAULT];
148
147
  }
149
148
  function fe(e, s) {
150
149
  return s.id === e && s.children ? s.children.length > 0 : s.children ? s.children.some((t) => fe(s.id, t)) : !1;
151
150
  }
152
- function J(e, s) {
151
+ function G(e, s) {
153
152
  return he(e, s) || e;
154
153
  }
155
154
  function he(e, s, t) {
@@ -158,8 +157,8 @@ function he(e, s, t) {
158
157
  if ((n = r == null ? void 0 : r.children) != null && n.length) {
159
158
  const a = [];
160
159
  for (const o of (r == null ? void 0 : r.children) || []) {
161
- const l = he(o, s, r);
162
- l && a.push(l);
160
+ const i = he(o, s, r);
161
+ i && a.push(i);
163
162
  }
164
163
  return {
165
164
  ...r,
@@ -168,7 +167,7 @@ function he(e, s, t) {
168
167
  }
169
168
  return r;
170
169
  }
171
- class G {
170
+ class J {
172
171
  constructor(s) {
173
172
  $(this, "id");
174
173
  $(this, "name");
@@ -178,20 +177,20 @@ class G {
178
177
  this.folder = s, this.id = s.id, this.name = s.name, this.childNumber = s.childNumber;
179
178
  }
180
179
  }
181
- const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? void 0 : s.map((n) => new G(n))), r)), Ye = {
180
+ const pe = (e, s, t) => G(e, (r) => (r.id === t && (r.children = s == null ? void 0 : s.map((n) => new J(n))), r)), Ye = {
182
181
  config: null,
183
182
  searchConfig: {
184
183
  minLength: 1
185
184
  },
186
185
  searchParams: {
187
186
  filters: {
188
- folder: T.DEFAULT,
187
+ folder: w.DEFAULT,
189
188
  owner: void 0,
190
189
  shared: void 0,
191
190
  public: void 0
192
191
  },
193
192
  orders: {
194
- updatedAt: ve.DESC
193
+ updatedAt: Le.DESC
195
194
  },
196
195
  application: "",
197
196
  types: [],
@@ -203,8 +202,8 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
203
202
  trashed: !1
204
203
  },
205
204
  treeData: {
206
- id: T.DEFAULT,
207
- name: S("explorer.filters.mine"),
205
+ id: w.DEFAULT,
206
+ name: x("explorer.filters.mine"),
208
207
  section: !0,
209
208
  children: []
210
209
  },
@@ -219,7 +218,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
219
218
  resourceIsTrash: !1,
220
219
  resourceActionDisable: !1,
221
220
  status: void 0
222
- }, w = Le()((e, s) => ({
221
+ }, S = ve()((e, s) => ({
223
222
  ...Ye,
224
223
  updaters: {
225
224
  setConfig: (t) => e({
@@ -330,7 +329,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
330
329
  if (r.length !== 1)
331
330
  throw new Error("Cannot open more than 1 resource");
332
331
  const a = r.find((o) => o.id === n[0]);
333
- Ge({
332
+ Je({
334
333
  searchParams: t,
335
334
  assetId: a.assetId
336
335
  });
@@ -345,7 +344,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
345
344
  const {
346
345
  searchParams: n,
347
346
  treeData: a
348
- } = s(), o = n.filters.folder, l = Xe(t, a), f = se([...l, t]);
347
+ } = s(), o = n.filters.folder, i = Xe(t, a), f = se([...i, t]);
349
348
  o !== t && e((d) => ({
350
349
  ...d,
351
350
  // reset selection when changing folder
@@ -362,7 +361,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
362
361
  ...n.filters,
363
362
  folder: t
364
363
  },
365
- trashed: t === T.BIN
364
+ trashed: t === w.BIN
366
365
  }
367
366
  }));
368
367
  },
@@ -397,11 +396,11 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
397
396
  folderId: t,
398
397
  trashed: !1
399
398
  }]);
400
- e((l) => {
399
+ e((i) => {
401
400
  var f;
402
401
  return {
403
- ...l,
404
- treeData: pe(n, (f = o == null ? void 0 : o.pages[0]) == null ? void 0 : f.folders, t || T.DEFAULT)
402
+ ...i,
403
+ treeData: pe(n, (f = o == null ? void 0 : o.pages[0]) == null ? void 0 : f.folders, t || w.DEFAULT)
405
404
  };
406
405
  });
407
406
  }
@@ -412,10 +411,10 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
412
411
  } = s(), {
413
412
  openFolder: n
414
413
  } = s().updaters, a = W(t, r);
415
- Se()(), e((l) => ({
416
- ...l,
414
+ we()(), e((i) => ({
415
+ ...i,
417
416
  searchParams: {
418
- ...l.searchParams,
417
+ ...i.searchParams,
419
418
  search: void 0
420
419
  },
421
420
  status: "select",
@@ -437,7 +436,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
437
436
  const o = W(t[a - 2], r);
438
437
  n({
439
438
  folder: o,
440
- folderId: (o == null ? void 0 : o.id) || T.DEFAULT
439
+ folderId: (o == null ? void 0 : o.id) || w.DEFAULT
441
440
  });
442
441
  },
443
442
  goToTrash: () => e((t) => ({
@@ -451,25 +450,25 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
451
450
  ...t.searchParams,
452
451
  search: void 0,
453
452
  filters: {
454
- folder: T.BIN
453
+ folder: w.BIN
455
454
  },
456
455
  trashed: !0
457
456
  },
458
457
  currentFolder: {
459
- id: T.BIN
458
+ id: w.BIN
460
459
  }
461
460
  }))
462
461
  }
463
- })), D = () => w((e) => e.searchParams), re = () => w((e) => e.selectedNodesIds), V = () => w((e) => e.treeData), Vt = () => w((e) => e.selectedFolders), Ht = () => w((e) => e.selectedResources), Ze = () => w((e) => e.searchConfig), X = () => w((e) => e.folderIds), Y = () => w((e) => e.resourceIds), Z = () => w((e) => e.selectedResources.map((s) => s.assetId)), ee = () => w((e) => e.selectedResources.filter((s) => s.assetId === s.id)), H = () => w((e) => e.currentFolder), b = () => w((e) => e.updaters), ne = () => {
462
+ })), b = () => S((e) => e.searchParams), re = () => S((e) => e.selectedNodesIds), V = () => S((e) => e.treeData), Vt = () => S((e) => e.selectedFolders), Ht = () => S((e) => e.selectedResources), Ze = () => S((e) => e.searchConfig), X = () => S((e) => e.folderIds), Y = () => S((e) => e.resourceIds), Z = () => S((e) => e.selectedResources.map((s) => s.assetId)), ee = () => S((e) => e.selectedResources.filter((s) => s.assetId === s.id)), H = () => S((e) => e.currentFolder), T = () => S((e) => e.updaters), ne = () => {
464
463
  const e = H();
465
- return (e == null ? void 0 : e.id) === T.BIN;
466
- }, et = () => w((e) => e.resourceIsTrash), tt = () => w((e) => e.resourceActionDisable), st = () => {
464
+ return (e == null ? void 0 : e.id) === w.BIN;
465
+ }, et = () => S((e) => e.resourceIsTrash), tt = () => S((e) => e.resourceActionDisable), st = () => {
467
466
  const e = H();
468
467
  return (e == null ? void 0 : e.id) === "default";
469
- }, rt = () => re().length > 1, nt = () => w((e) => e.status), me = () => {
470
- const e = D(), [s, t] = ie(""), r = Ze(), n = nt(), a = Ie(null), {
468
+ }, rt = () => re().length > 1, nt = () => S((e) => e.status), me = () => {
469
+ const e = b(), [s, t] = ie(""), r = Ze(), n = nt(), a = Ie(null), {
471
470
  setSearchParams: o
472
- } = b(), l = (u) => {
471
+ } = T(), i = (u) => {
473
472
  const h = u.target.value;
474
473
  t(h.toString());
475
474
  }, f = (u) => {
@@ -499,7 +498,7 @@ const pe = (e, s, t) => J(e, (r) => (r.id === t && (r.children = s == null ? voi
499
498
  }, [e]), {
500
499
  formRef: a,
501
500
  inputSearch: s,
502
- handleInputSearchChange: l,
501
+ handleInputSearchChange: i,
503
502
  handleKeyPress: f,
504
503
  handleSearchSubmit: d
505
504
  };
@@ -509,24 +508,24 @@ function ot() {
509
508
  appCode: e
510
509
  } = K(), {
511
510
  gotoPreviousFolder: s
512
- } = b(), {
511
+ } = T(), {
513
512
  t
514
- } = j(), {
513
+ } = j(["common", e]), {
515
514
  inputSearch: r
516
- } = me(), n = re(), a = ne(), o = H(), l = t("explorer.tree.trash"), f = t("explorer.tree.search"), d = t("explorer.filters.mine", {
515
+ } = me(), n = re(), a = ne(), o = H(), i = t("explorer.tree.trash"), f = t("explorer.tree.search"), d = t("explorer.filters.mine", {
517
516
  ns: e
518
517
  }), u = (o == null ? void 0 : o.name) || d;
519
518
  return /* @__PURE__ */ c("div", { className: "py-16", children: n.length > 1 && !a ? /* @__PURE__ */ N("div", { className: "d-flex align-items-center gap-8", children: [
520
- /* @__PURE__ */ c(xe, { icon: /* @__PURE__ */ c(Oe, {}), variant: "ghost", color: "tertiary", "aria-label": t("back"), className: "ms-n16", onClick: s }),
519
+ /* @__PURE__ */ c(xe, { icon: /* @__PURE__ */ c(qe, {}), variant: "ghost", color: "tertiary", "aria-label": t("back"), className: "ms-n16", onClick: s }),
521
520
  /* @__PURE__ */ c("p", { className: "body py-8 text-truncate", children: /* @__PURE__ */ c("strong", { children: u }) })
522
- ] }) : /* @__PURE__ */ c("h2", { className: "body py-8 fw-bold", children: r.length !== 0 ? f : a ? l : d }) });
521
+ ] }) : /* @__PURE__ */ c("h2", { className: "body py-8 fw-bold", children: r.length !== 0 ? f : a ? i : d }) });
523
522
  }
524
523
  const at = () => {
525
524
  const e = tt(), {
526
525
  clearSelectedIds: s,
527
526
  setResourceActionDisable: t,
528
527
  clearSelectedItems: r
529
- } = b();
528
+ } = T();
530
529
  return {
531
530
  isActionDisableModalOpen: e,
532
531
  onActionDisableCancel: () => {
@@ -538,7 +537,7 @@ const at = () => {
538
537
  clearSelectedIds: s,
539
538
  setResourceIsTrash: t,
540
539
  clearSelectedItems: r
541
- } = b();
540
+ } = T();
542
541
  return {
543
542
  isTrashedModalOpen: e,
544
543
  onTrashedCancel: () => {
@@ -550,13 +549,13 @@ function it(e, {
550
549
  parentId: s,
551
550
  newFolder: t
552
551
  }) {
553
- return J(e, (r) => {
552
+ return G(e, (r) => {
554
553
  var n;
555
554
  if (r.id === s) {
556
555
  const a = [...((n = r.folder) == null ? void 0 : n.ancestors) || []], o = se([...a, r.id]);
557
556
  return {
558
557
  ...r,
559
- children: [...r.children || [], new G({
558
+ children: [...r.children || [], new J({
560
559
  ...t,
561
560
  ancestors: o
562
561
  })]
@@ -568,7 +567,7 @@ function it(e, {
568
567
  function lt(e, {
569
568
  folders: s
570
569
  }) {
571
- return J(e, (t) => {
570
+ return G(e, (t) => {
572
571
  if (!s.includes(t.id))
573
572
  return t;
574
573
  });
@@ -577,13 +576,13 @@ function dt(e, {
577
576
  destinationId: s,
578
577
  folders: t
579
578
  }) {
580
- return J(e, (r, n) => {
579
+ return G(e, (r, n) => {
581
580
  var a, o;
582
581
  if (s === r.id) {
583
- const l = [...((a = r.folder) == null ? void 0 : a.ancestors) || []], f = se([...l, r.id]), d = [...r.children || []], u = ((o = r.children) == null ? void 0 : o.map((i) => i.id)) || [];
584
- for (const i of t)
585
- if (!u.includes(i)) {
586
- const p = W(i, e);
582
+ const i = [...((a = r.folder) == null ? void 0 : a.ancestors) || []], f = se([...i, r.id]), d = [...r.children || []], u = ((o = r.children) == null ? void 0 : o.map((l) => l.id)) || [];
583
+ for (const l of t)
584
+ if (!u.includes(l)) {
585
+ const p = W(l, e);
587
586
  p && d.push({
588
587
  ...p,
589
588
  folder: {
@@ -604,10 +603,10 @@ function ut(e, {
604
603
  folderId: s,
605
604
  newFolder: t
606
605
  }) {
607
- return J(e, (r) => r.id === s ? new G(t) : r);
606
+ return G(e, (r) => r.id === s ? new J(t) : r);
608
607
  }
609
608
  const ft = () => {
610
- const e = w((s) => s.config);
609
+ const e = S((s) => s.config);
611
610
  return Me({
612
611
  queryKey: ["actions"],
613
612
  queryFn: async () => {
@@ -622,7 +621,7 @@ const ft = () => {
622
621
  enabled: !!e
623
622
  });
624
623
  }, ht = () => {
625
- const e = w((o) => o.config), s = D(), {
624
+ const e = S((o) => o.config), s = b(), {
626
625
  filters: t,
627
626
  trashed: r,
628
627
  search: n
@@ -652,12 +651,12 @@ const ft = () => {
652
651
  getNextPageParam: (o) => o.pagination.startIdx + o.pagination.pageSize
653
652
  });
654
653
  }, Wt = () => {
655
- const e = U(), s = E(), t = D(), r = V(), n = X(), a = Z(), o = Y(), l = ee().length > 0, f = l ? a : o, {
654
+ const e = k(), s = E(), t = b(), r = V(), n = X(), a = Z(), o = Y(), i = ee().length > 0, f = i ? a : o, {
656
655
  clearSelectedItems: d,
657
656
  clearSelectedIds: u,
658
657
  setTreeData: h,
659
- setSearchParams: i
660
- } = b(), {
658
+ setSearchParams: l
659
+ } = T(), {
661
660
  filters: p,
662
661
  trashed: m
663
662
  } = t, y = ["context", {
@@ -665,49 +664,49 @@ const ft = () => {
665
664
  filters: p,
666
665
  trashed: m
667
666
  }];
668
- return v({
667
+ return L({
669
668
  mutationFn: async () => await $e({
670
669
  searchParams: t,
671
670
  folderIds: n,
672
671
  resourceIds: f,
673
- useAssetIds: l
672
+ useAssetIds: i
674
673
  }),
675
674
  onError(g) {
676
- typeof g == "string" && e.error(S(g));
675
+ typeof g == "string" && e.error(x(g));
677
676
  },
678
677
  onSuccess: async (g) => {
679
678
  if (await s.cancelQueries({
680
679
  queryKey: y
681
680
  }), s.getQueryData(y))
682
- return e.success(S("explorer.trash.title")), s.setQueryData(y, (C) => {
681
+ return e.success(x("explorer.trash.title")), s.setQueryData(y, (C) => {
683
682
  var Q;
684
683
  if (C) {
685
- const k = {
684
+ const U = {
686
685
  ...C,
687
686
  pages: C == null ? void 0 : C.pages.map((R) => {
688
687
  var P;
689
688
  return {
690
689
  ...R,
691
- folders: R.folders.filter((O) => !n.includes(O.id)),
690
+ folders: R.folders.filter((q) => !n.includes(q.id)),
692
691
  pagination: {
693
692
  ...R.pagination,
694
693
  // @ts-ignore
695
694
  maxIdx: ((P = R == null ? void 0 : R.pagination) == null ? void 0 : P.maxIdx) - g.resources.length
696
695
  },
697
- resources: R.resources.filter((O) => l ? !a.includes(O.assetId) : !f.includes(O.id))
696
+ resources: R.resources.filter((q) => i ? !a.includes(q.assetId) : !f.includes(q.id))
698
697
  };
699
698
  })
700
699
  }, B = lt(r, {
701
700
  folders: n
702
701
  });
703
- return h(B), i({
702
+ return h(B), l({
704
703
  ...t,
705
704
  pagination: {
706
705
  ...t.pagination,
707
706
  // @ts-ignore
708
707
  maxIdx: ((Q = t.pagination) == null ? void 0 : Q.maxIdx) - g.resources.length
709
708
  }
710
- }), k;
709
+ }), U;
711
710
  }
712
711
  });
713
712
  },
@@ -715,42 +714,42 @@ const ft = () => {
715
714
  d(), u();
716
715
  }
717
716
  });
718
- }, Jt = () => {
719
- const e = U(), s = E(), t = D(), r = X(), n = Z(), a = Y(), o = ee().length > 0, l = o ? n : a, {
717
+ }, Gt = () => {
718
+ const e = k(), s = E(), t = b(), r = X(), n = Z(), a = Y(), o = ee().length > 0, i = o ? n : a, {
720
719
  setFolderIds: f,
721
720
  setResourceIds: d,
722
721
  setSelectedResources: u,
723
722
  setSelectedFolders: h
724
- } = b(), {
725
- filters: i,
723
+ } = T(), {
724
+ filters: l,
726
725
  trashed: p
727
726
  } = t, m = ["context", {
728
- folderId: i.folder,
729
- filters: i,
727
+ folderId: l.folder,
728
+ filters: l,
730
729
  trashed: p
731
730
  }];
732
- return v({
731
+ return L({
733
732
  mutationFn: async () => await je({
734
733
  searchParams: t,
735
734
  folderIds: r,
736
- resourceIds: l,
735
+ resourceIds: i,
737
736
  useAssetIds: o
738
737
  }),
739
738
  onError(y) {
740
- typeof y == "string" && e.error(S(y));
739
+ typeof y == "string" && e.error(x(y));
741
740
  },
742
741
  onSuccess: async () => {
743
742
  if (await s.cancelQueries({
744
743
  queryKey: m
745
744
  }), s.getQueryData(m))
746
- return e.success(S("explorer.trash.toast")), s.setQueryData(m, (g) => {
745
+ return e.success(x("explorer.trash.toast")), s.setQueryData(m, (g) => {
747
746
  if (g)
748
747
  return {
749
748
  ...g,
750
749
  pages: g == null ? void 0 : g.pages.map((I) => ({
751
750
  ...I,
752
751
  folders: I.folders.filter((C) => !r.includes(C.id)),
753
- resources: I.resources.filter((C) => o ? !n.includes(C.assetId) : !l.includes(C.id))
752
+ resources: I.resources.filter((C) => o ? !n.includes(C.assetId) : !i.includes(C.id))
754
753
  }))
755
754
  };
756
755
  });
@@ -759,40 +758,40 @@ const ft = () => {
759
758
  d([]), u([]), f([]), h([]);
760
759
  }
761
760
  });
762
- }, Gt = () => {
763
- const e = U(), s = E(), t = D(), r = X(), n = Z(), a = Y(), o = ee().length > 0, l = o ? n : a, {
761
+ }, Jt = () => {
762
+ const e = k(), s = E(), t = b(), r = X(), n = Z(), a = Y(), o = ee().length > 0, i = o ? n : a, {
764
763
  clearSelectedItems: f,
765
764
  clearSelectedIds: d
766
- } = b(), {
765
+ } = T(), {
767
766
  filters: u,
768
767
  trashed: h
769
- } = t, i = ["context", {
768
+ } = t, l = ["context", {
770
769
  folderId: u.folder,
771
770
  filters: u,
772
771
  trashed: h
773
772
  }];
774
- return v({
773
+ return L({
775
774
  mutationFn: async () => await ze({
776
775
  searchParams: t,
777
776
  folderIds: r,
778
- resourceIds: l,
777
+ resourceIds: i,
779
778
  useAssetIds: o
780
779
  }),
781
780
  onError(p) {
782
- typeof p == "string" && e.error(S(p));
781
+ typeof p == "string" && e.error(x(p));
783
782
  },
784
783
  onSuccess: async () => {
785
784
  if (await s.cancelQueries({
786
- queryKey: i
787
- }), s.getQueryData(i))
788
- return e.success(S("explorer.removed.from.trash")), s.setQueryData(i, (m) => {
785
+ queryKey: l
786
+ }), s.getQueryData(l))
787
+ return e.success(x("explorer.removed.from.trash")), s.setQueryData(l, (m) => {
789
788
  if (m)
790
789
  return {
791
790
  ...m,
792
791
  pages: m == null ? void 0 : m.pages.map((g) => ({
793
792
  ...g,
794
793
  folders: g.folders.filter((I) => !r.includes(I.id)),
795
- resources: g.resources.filter((I) => o ? !n.includes(I.assetId) : !l.includes(I.id))
794
+ resources: g.resources.filter((I) => o ? !n.includes(I.assetId) : !i.includes(I.id))
796
795
  }))
797
796
  };
798
797
  });
@@ -802,27 +801,27 @@ const ft = () => {
802
801
  }
803
802
  });
804
803
  }, Xt = () => {
805
- const e = U(), s = D(), t = E(), {
804
+ const e = k(), s = b(), t = E(), {
806
805
  user: r
807
806
  } = le(), n = H(), {
808
807
  filters: a,
809
808
  trashed: o
810
- } = s, l = "duplicate_start", f = ["context", {
809
+ } = s, i = "duplicate_start", f = ["context", {
811
810
  folderId: a.folder,
812
811
  filters: a,
813
812
  trashed: o
814
813
  }];
815
- return v({
816
- mutationFn: async (d) => (e.info(S("duplicate.start"), {
817
- id: l
814
+ return L({
815
+ mutationFn: async (d) => (e.info(x("duplicate.start"), {
816
+ id: i
818
817
  }), await Ve(s, d.assetId)),
819
818
  onSuccess: async (d, u) => {
820
- e.remove(l), e.success(S("duplicate.done")), await t.cancelQueries({
819
+ e.remove(i), e.success(x("duplicate.done")), await t.cancelQueries({
821
820
  queryKey: f
822
821
  });
823
- const h = t.getQueryData(f), i = {
822
+ const h = t.getQueryData(f), l = {
824
823
  ...u,
825
- name: `${u.name}${S("duplicate.suffix")}`,
824
+ name: `${u.name}${x("duplicate.suffix")}`,
826
825
  assetId: d.duplicateId,
827
826
  id: d.duplicateId,
828
827
  creatorId: r == null ? void 0 : r.userId,
@@ -842,10 +841,10 @@ const ft = () => {
842
841
  ...p,
843
842
  pages: p == null ? void 0 : p.pages.map((m) => ({
844
843
  ...m,
845
- resources: [i, ...m.resources]
844
+ resources: [l, ...m.resources]
846
845
  }))
847
846
  };
848
- }), n.id && n.id !== "default" && ue({
847
+ }), n.id && n.id !== w.DEFAULT && ue({
849
848
  searchParams: s,
850
849
  resourceIds: [d.duplicateId],
851
850
  folderId: n.id,
@@ -854,16 +853,16 @@ const ft = () => {
854
853
  });
855
854
  },
856
855
  onError: (d) => {
857
- e.remove(l), typeof d == "string" && e.error(`${S("duplicate.error")}: ${d}`);
856
+ e.remove(i), typeof d == "string" && e.error(`${x("duplicate.error")}: ${d}`);
858
857
  }
859
858
  });
860
859
  }, Yt = () => {
861
- const e = U(), s = E(), t = D(), r = V(), n = X(), a = Z(), o = Y(), l = ee().length > 0, f = l ? a : o, {
860
+ const e = k(), s = E(), t = b(), r = V(), n = X(), a = Z(), o = Y(), i = ee().length > 0, f = i ? a : o, {
862
861
  clearSelectedIds: d,
863
862
  clearSelectedItems: u,
864
863
  setTreeData: h,
865
- setSearchParams: i
866
- } = b(), {
864
+ setSearchParams: l
865
+ } = T(), {
867
866
  filters: p,
868
867
  trashed: m
869
868
  } = t, y = ["context", {
@@ -871,21 +870,21 @@ const ft = () => {
871
870
  filters: p,
872
871
  trashed: m
873
872
  }];
874
- return v({
873
+ return L({
875
874
  mutationFn: async (g) => await ue({
876
875
  searchParams: t,
877
876
  folderId: g,
878
877
  folderIds: n,
879
878
  resourceIds: f,
880
- useAssetIds: l
879
+ useAssetIds: i
881
880
  }),
882
881
  onError(g) {
883
- typeof g == "string" && e.error(S(g));
882
+ typeof g == "string" && e.error(x(g));
884
883
  },
885
884
  onSuccess: async (g, I) => {
886
885
  if (s.getQueryData(y))
887
886
  return s.setQueryData(y, (Q) => {
888
- var k;
887
+ var U;
889
888
  if (Q) {
890
889
  const B = dt(r, {
891
890
  destinationId: I,
@@ -893,25 +892,25 @@ const ft = () => {
893
892
  }), R = {
894
893
  ...Q,
895
894
  pages: Q == null ? void 0 : Q.pages.map((P) => {
896
- var O;
895
+ var q;
897
896
  return {
898
897
  ...P,
899
898
  folders: P.folders.filter((_) => !n.includes(_.id)),
900
899
  pagination: {
901
900
  ...P.pagination,
902
901
  // @ts-ignore
903
- maxIdx: ((O = P.pagination) == null ? void 0 : O.maxIdx) - g.resources.length
902
+ maxIdx: ((q = P.pagination) == null ? void 0 : q.maxIdx) - g.resources.length
904
903
  },
905
- resources: P.resources.filter((_) => l ? !a.includes(_.assetId) : !f.includes(_.id))
904
+ resources: P.resources.filter((_) => i ? !a.includes(_.assetId) : !f.includes(_.id))
906
905
  };
907
906
  })
908
907
  };
909
- return h(B), i({
908
+ return h(B), l({
910
909
  ...t,
911
910
  pagination: {
912
911
  ...t.pagination,
913
912
  // @ts-ignore
914
- maxIdx: ((k = t.pagination) == null ? void 0 : k.maxIdx) - g.resources.length
913
+ maxIdx: ((U = t.pagination) == null ? void 0 : U.maxIdx) - g.resources.length
915
914
  }
916
915
  }), R;
917
916
  }
@@ -922,17 +921,17 @@ const ft = () => {
922
921
  }
923
922
  });
924
923
  }, Zt = () => {
925
- const e = U(), s = E(), t = D(), r = V(), {
924
+ const e = k(), s = E(), t = b(), r = V(), {
926
925
  setTreeData: n
927
- } = b(), {
926
+ } = T(), {
928
927
  filters: a,
929
928
  trashed: o
930
- } = t, l = ["context", {
929
+ } = t, i = ["context", {
931
930
  folderId: a.folder,
932
931
  filters: a,
933
932
  trashed: o
934
933
  }];
935
- return v({
934
+ return L({
936
935
  mutationFn: async ({
937
936
  name: f,
938
937
  parentId: d
@@ -942,24 +941,24 @@ const ft = () => {
942
941
  parentId: d
943
942
  }),
944
943
  onError(f) {
945
- typeof f == "string" && e.error(S(f));
944
+ typeof f == "string" && e.error(x(f));
946
945
  },
947
946
  onSuccess: async (f, d) => {
948
947
  await s.cancelQueries({
949
- queryKey: l
948
+ queryKey: i
950
949
  });
951
- const u = s.getQueryData(l), h = {
950
+ const u = s.getQueryData(i), h = {
952
951
  ...f,
953
952
  parentId: d.parentId,
954
953
  children: [],
955
954
  rights: [`creator:${f == null ? void 0 : f.creator_id}`]
956
955
  };
957
956
  if (u)
958
- return s.setQueryData(l, (i) => {
959
- if (i) {
957
+ return s.setQueryData(i, (l) => {
958
+ if (l) {
960
959
  const p = {
961
- ...i,
962
- pages: i == null ? void 0 : i.pages.map((y) => ({
960
+ ...l,
961
+ pages: l == null ? void 0 : l.pages.map((y) => ({
963
962
  ...y,
964
963
  folders: [...y.folders, h]
965
964
  }))
@@ -973,31 +972,31 @@ const ft = () => {
973
972
  }
974
973
  });
975
974
  }, es = () => {
976
- const e = U(), s = E(), t = D(), r = V(), {
975
+ const e = k(), s = E(), t = b(), r = V(), {
977
976
  setFolderIds: n,
978
977
  setSelectedFolders: a,
979
978
  setTreeData: o
980
- } = b(), {
981
- filters: l,
979
+ } = T(), {
980
+ filters: i,
982
981
  trashed: f
983
982
  } = t, d = ["context", {
984
- folderId: l.folder,
985
- filters: l,
983
+ folderId: i.folder,
984
+ filters: i,
986
985
  trashed: f
987
986
  }];
988
- return v({
987
+ return L({
989
988
  mutationFn: async ({
990
989
  folderId: u,
991
990
  name: h,
992
- parentId: i
991
+ parentId: l
993
992
  }) => await _e({
994
993
  searchParams: t,
995
994
  folderId: u,
996
- parentId: i,
995
+ parentId: l,
997
996
  name: h
998
997
  }),
999
998
  onError(u) {
1000
- typeof u == "string" && e.error(S(u));
999
+ typeof u == "string" && e.error(x(u));
1001
1000
  },
1002
1001
  onSuccess: async (u, h) => {
1003
1002
  if (await s.cancelQueries({
@@ -1028,13 +1027,13 @@ const ft = () => {
1028
1027
  }
1029
1028
  });
1030
1029
  }, ts = (e) => {
1031
- const s = E(), t = D(), {
1030
+ const s = E(), t = b(), {
1032
1031
  setResourceIds: r,
1033
1032
  setSelectedResources: n
1034
- } = b(), {
1033
+ } = T(), {
1035
1034
  filters: a,
1036
1035
  trashed: o
1037
- } = t, l = ["context", {
1036
+ } = t, i = ["context", {
1038
1037
  folderId: a.folder,
1039
1038
  filters: a,
1040
1039
  trashed: o
@@ -1044,15 +1043,15 @@ const ft = () => {
1044
1043
  options: {
1045
1044
  onSuccess: async (f, d) => {
1046
1045
  if (await s.cancelQueries({
1047
- queryKey: l
1048
- }), s.getQueryData(l))
1049
- return s.setQueryData(l, (h) => {
1046
+ queryKey: i
1047
+ }), s.getQueryData(i))
1048
+ return s.setQueryData(i, (h) => {
1050
1049
  if (h)
1051
1050
  return {
1052
1051
  ...h,
1053
- pages: h == null ? void 0 : h.pages.map((i) => ({
1054
- ...i,
1055
- resources: i.resources.map((p) => {
1052
+ pages: h == null ? void 0 : h.pages.map((l) => ({
1053
+ ...l,
1054
+ resources: l.resources.map((p) => {
1056
1055
  if (p.assetId === (d == null ? void 0 : d.resourceId)) {
1057
1056
  let m = [`creator:${p.creatorId}`];
1058
1057
  return (d == null ? void 0 : d.rights.length) >= 1 && (m = [...m, ...d.rights.flatMap((y) => y.actions.map((g) => `${y.type}:${y.id}:${g.id}`))]), {
@@ -1072,7 +1071,7 @@ const ft = () => {
1072
1071
  }
1073
1072
  });
1074
1073
  }, ss = (e) => {
1075
- const s = E(), t = D(), {
1074
+ const s = E(), t = b(), {
1076
1075
  filters: r,
1077
1076
  trashed: n
1078
1077
  } = t, a = ["context", {
@@ -1083,7 +1082,7 @@ const ft = () => {
1083
1082
  return be({
1084
1083
  application: e,
1085
1084
  options: {
1086
- onSuccess: async (o, l) => {
1085
+ onSuccess: async (o, i) => {
1087
1086
  if (await s.cancelQueries({
1088
1087
  queryKey: a
1089
1088
  }), s.getQueryData(a))
@@ -1094,20 +1093,20 @@ const ft = () => {
1094
1093
  pages: d == null ? void 0 : d.pages.map((u) => ({
1095
1094
  ...u,
1096
1095
  resources: u.resources.map((h) => {
1097
- if (h.assetId === (l == null ? void 0 : l.entId)) {
1096
+ if (h.assetId === (i == null ? void 0 : i.entId)) {
1098
1097
  const {
1099
- name: i,
1098
+ name: l,
1100
1099
  thumbnail: p,
1101
1100
  public: m,
1102
1101
  description: y,
1103
1102
  slug: g,
1104
1103
  ...I
1105
- } = l;
1104
+ } = i;
1106
1105
  return {
1107
1106
  ...h,
1108
1107
  ...I,
1109
1108
  // add any custom field
1110
- name: i,
1109
+ name: l,
1111
1110
  thumbnail: typeof p == "string" ? p : URL.createObjectURL(p),
1112
1111
  public: m,
1113
1112
  description: y,
@@ -1122,9 +1121,8 @@ const ft = () => {
1122
1121
  }
1123
1122
  }
1124
1123
  });
1125
- };
1126
- const rs = () => {
1127
- const e = U(), s = E(), t = D(), {
1124
+ }, rs = () => {
1125
+ const e = k(), s = E(), t = b(), {
1128
1126
  user: r
1129
1127
  } = le(), {
1130
1128
  appCode: n
@@ -1133,89 +1131,87 @@ const rs = () => {
1133
1131
  filters: t.filters,
1134
1132
  trashed: t.trashed
1135
1133
  }];
1136
- return v({
1137
- mutationFn: async (o) => await Je({
1134
+ return L({
1135
+ mutationFn: async (o) => await Ge({
1138
1136
  searchParams: t,
1139
1137
  params: o
1140
1138
  }),
1141
1139
  onError(o) {
1142
- typeof o == "string" && e.error(S(o));
1140
+ typeof o == "string" && e.error(x(o));
1143
1141
  },
1144
- onSuccess: async (o, l) => {
1145
- var h, i, p;
1142
+ onSuccess: async (o, i) => {
1143
+ var u, h, l;
1146
1144
  await s.cancelQueries({
1147
1145
  queryKey: a
1148
1146
  });
1149
- const f = s.getQueryData(a), {
1150
- thumbnail: d
1151
- } = l, u = {
1152
- ...l,
1153
- thumbnail: d ? URL.createObjectURL(d) : "",
1147
+ const f = s.getQueryData(a), d = {
1148
+ ...i,
1149
+ thumbnail: o.thumbnail || "",
1154
1150
  application: n,
1155
1151
  assetId: o._id || o.entId || "",
1156
1152
  id: o._id || o.entId || "",
1157
1153
  creatorId: r == null ? void 0 : r.userId,
1158
1154
  creatorName: r == null ? void 0 : r.username,
1159
1155
  createdAt: Date.now(),
1160
- slug: l.slug || "",
1161
- modifiedAt: ((h = o.modified) == null ? void 0 : h.$date) || "",
1162
- modifierId: ((i = o.author) == null ? void 0 : i.userId) || "",
1163
- modifierName: ((p = o.author) == null ? void 0 : p.username) || "",
1156
+ slug: i.slug || "",
1157
+ modifiedAt: ((u = o.modified) == null ? void 0 : u.$date) || "",
1158
+ modifierId: ((h = o.author) == null ? void 0 : h.userId) || "",
1159
+ modifierName: ((l = o.author) == null ? void 0 : l.username) || "",
1164
1160
  updatedAt: Date.now(),
1165
1161
  trashed: !1,
1166
1162
  rights: [`creator:${r == null ? void 0 : r.userId}`]
1167
1163
  };
1168
1164
  if (f)
1169
- return s.setQueryData(a, (m) => {
1170
- if (m)
1165
+ return s.setQueryData(a, (p) => {
1166
+ if (p)
1171
1167
  return {
1172
- ...m,
1173
- pages: m == null ? void 0 : m.pages.map((y) => ({
1174
- ...y,
1175
- resources: [u, ...y.resources]
1168
+ ...p,
1169
+ pages: p == null ? void 0 : p.pages.map((m) => ({
1170
+ ...m,
1171
+ resources: [d, ...m.resources]
1176
1172
  }))
1177
1173
  };
1178
1174
  });
1179
1175
  }
1180
1176
  });
1181
- }, pt = /* @__PURE__ */ F(async () => await import("./EmptyScreenApp.js")), mt = /* @__PURE__ */ F(async () => await import("./EmptyScreenSearch.js")), gt = /* @__PURE__ */ F(async () => await import("./EmptyScreenError.js")), yt = /* @__PURE__ */ F(async () => await import("./EmptyScreenNoContentInFolder.js")), It = /* @__PURE__ */ F(async () => await import("./EmptyScreenTrash.js")), wt = /* @__PURE__ */ F(async () => await import("./FoldersList.js")), St = /* @__PURE__ */ F(async () => await import("./ResourcesList.js")), xt = () => {
1182
- const e = st(), s = ne(), t = rt(), r = D(), n = H(), a = V(), o = U(), {
1183
- appCode: l
1177
+ }, pt = /* @__PURE__ */ F(async () => await import("./EmptyScreenApp.js")), mt = /* @__PURE__ */ F(async () => await import("./EmptyScreenSearch.js")), gt = /* @__PURE__ */ F(async () => await import("./EmptyScreenError.js")), yt = /* @__PURE__ */ F(async () => await import("./EmptyScreenNoContentInFolder.js")), It = /* @__PURE__ */ F(async () => await import("./EmptyScreenTrash.js")), St = /* @__PURE__ */ F(async () => await import("./FoldersList.js")), wt = /* @__PURE__ */ F(async () => await import("./ResourcesList.js")), xt = () => {
1178
+ const e = st(), s = ne(), t = rt(), r = b(), n = H(), a = V(), o = k(), {
1179
+ appCode: i
1184
1180
  } = K(), {
1185
1181
  t: f
1186
- } = j(), {
1182
+ } = j([i]), {
1187
1183
  setSearchParams: d,
1188
1184
  setSearchConfig: u,
1189
1185
  setTreeData: h
1190
- } = b(), {
1191
- data: i,
1186
+ } = T(), {
1187
+ data: l,
1192
1188
  isError: p,
1193
1189
  error: m,
1194
1190
  isLoading: y,
1195
1191
  isFetching: g,
1196
1192
  fetchNextPage: I
1197
- } = ht(), C = (i == null ? void 0 : i.pages[0].folders.length) === 0, Q = (i == null ? void 0 : i.pages[0].resources.length) === 0, k = C && Q;
1193
+ } = ht(), C = (l == null ? void 0 : l.pages[0].folders.length) === 0, Q = (l == null ? void 0 : l.pages[0].resources.length) === 0, U = C && Q;
1198
1194
  return M(() => {
1199
1195
  var B, R, P;
1200
- if (i) {
1201
- const O = [...((B = i == null ? void 0 : i.pages[0]) == null ? void 0 : B.folders) ?? []];
1202
- (R = i == null ? void 0 : i.pages[0]) != null && R.searchConfig && u(i.pages[0].searchConfig), r.search || ((n == null ? void 0 : n.id) === "default" ? h({
1203
- id: T.DEFAULT,
1196
+ if (l) {
1197
+ const q = [...((B = l == null ? void 0 : l.pages[0]) == null ? void 0 : B.folders) ?? []];
1198
+ (R = l == null ? void 0 : l.pages[0]) != null && R.searchConfig && u(l.pages[0].searchConfig), r.search || ((n == null ? void 0 : n.id) === "default" ? h({
1199
+ id: w.DEFAULT,
1204
1200
  section: !0,
1205
- children: O.map((_) => new G(_)),
1201
+ children: q.map((_) => new J(_)),
1206
1202
  name: f("explorer.filters.mine", {
1207
- ns: l
1203
+ ns: i
1208
1204
  })
1209
- }) : h(pe(a, O, r.filters.folder || T.DEFAULT))), d({
1205
+ }) : h(pe(a, q, r.filters.folder || w.DEFAULT))), d({
1210
1206
  ...r,
1211
- pagination: (P = i == null ? void 0 : i.pages[(i == null ? void 0 : i.pages.length) - 1]) == null ? void 0 : P.pagination
1207
+ pagination: (P = l == null ? void 0 : l.pages[(l == null ? void 0 : l.pages.length) - 1]) == null ? void 0 : P.pagination
1212
1208
  });
1213
1209
  }
1214
- }, [i]), M(() => {
1210
+ }, [l]), M(() => {
1215
1211
  m && typeof m == "string" && o.error(f(m));
1216
- }, [m]), y ? /* @__PURE__ */ c(A, {}) : p ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(gt, {}) }) : r.search && k ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(mt, {}) }) : e && k ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(pt, {}) }) : t && k && !s ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(yt, {}) }) : s && (i == null ? void 0 : i.pages[0].resources.length) === 0 ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(It, {}) }) : /* @__PURE__ */ N(q, { fallback: /* @__PURE__ */ c(A, {}), children: [
1217
- /* @__PURE__ */ c(wt, { data: i, isFetching: g }),
1218
- /* @__PURE__ */ c(St, { data: i, isFetching: g, fetchNextPage: I })
1212
+ }, [m]), y ? /* @__PURE__ */ c(A, {}) : p ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(gt, {}) }) : r.search && U ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(mt, {}) }) : e && U ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(pt, {}) }) : t && U && !s ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(yt, {}) }) : s && (l == null ? void 0 : l.pages[0].resources.length) === 0 ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(It, {}) }) : /* @__PURE__ */ N(O, { fallback: /* @__PURE__ */ c(A, {}), children: [
1213
+ /* @__PURE__ */ c(St, { data: l, isFetching: g }),
1214
+ /* @__PURE__ */ c(wt, { data: l, isFetching: g, fetchNextPage: I })
1219
1215
  ] });
1220
1216
  }, Dt = () => {
1221
1217
  const {
@@ -1229,16 +1225,16 @@ const rs = () => {
1229
1225
  return;
1230
1226
  }
1231
1227
  n(u);
1232
- }, o = H(), l = D(), {
1228
+ }, o = H(), i = b(), {
1233
1229
  setSearchParams: f
1234
- } = b();
1230
+ } = T();
1235
1231
  M(() => {
1236
- const u = () => r.includes("1") ? !0 : void 0, h = () => r.includes("2") ? !0 : void 0, i = () => r.includes("7") ? !0 : void 0;
1232
+ const u = () => r.includes("1") ? !0 : void 0, h = () => r.includes("2") ? !0 : void 0, l = () => r.includes("7") ? !0 : void 0;
1237
1233
  f({
1238
- ...l,
1234
+ ...i,
1239
1235
  filters: {
1240
1236
  owner: u(),
1241
- public: i(),
1237
+ public: l(),
1242
1238
  shared: h(),
1243
1239
  folder: o ? o.id : "default"
1244
1240
  }
@@ -1294,22 +1290,22 @@ const rs = () => {
1294
1290
  } = Dt(), {
1295
1291
  formRef: a,
1296
1292
  inputSearch: o,
1297
- handleInputSearchChange: l,
1293
+ handleInputSearchChange: i,
1298
1294
  handleKeyPress: f,
1299
1295
  handleSearchSubmit: d
1300
1296
  } = me(), u = t.length > 0 ? t.length : void 0;
1301
- return /* @__PURE__ */ N("form", { noValidate: !0, className: "bg-light p-16 ps-24 ms-n16 ms-lg-n24 me-n16 position-relative z-3 d-flex gap-8", ref: a, children: [
1297
+ return /* @__PURE__ */ N("form", { noValidate: !0, className: "bg-light p-16 ps-24 ms-n16 ms-lg-n24 me-n16 position-relative d-flex gap-8", ref: a, children: [
1302
1298
  /* @__PURE__ */ N(Te, { id: "search", className: "input-group", children: [
1303
1299
  /* @__PURE__ */ c(Fe, { type: "search", placeholder: s("explorer.label.search", {
1304
1300
  ns: e
1305
- }), size: "lg", noValidationIcon: !0, value: o, onChange: l, onKeyDown: f }),
1301
+ }), size: "lg", noValidationIcon: !0, value: o, onChange: i, onKeyDown: f }),
1306
1302
  /* @__PURE__ */ c(Ce, { type: "submit", "aria-label": s("explorer.label.search", {
1307
1303
  ns: e
1308
1304
  }), onClick: d })
1309
1305
  ] }),
1310
1306
  /* @__PURE__ */ N(z, { placement: "bottom-end", children: [
1311
- /* @__PURE__ */ c(z.Trigger, { label: s("explorer.filters"), icon: /* @__PURE__ */ c(qe, { width: 20 }), variant: "ghost", badgeContent: u }),
1312
- /* @__PURE__ */ c(z.Menu, { children: r.map((h) => h.value === "0" ? /* @__PURE__ */ N(we, { children: [
1307
+ /* @__PURE__ */ c(z.Trigger, { label: s("explorer.filters"), icon: /* @__PURE__ */ c(Oe, { width: 20 }), variant: "ghost", badgeContent: u }),
1308
+ /* @__PURE__ */ c(z.Menu, { children: r.map((h) => h.value === "0" ? /* @__PURE__ */ N(Se, { children: [
1313
1309
  /* @__PURE__ */ c(z.RadioItem, { value: h.value, model: t, onChange: () => n(h.value), children: h.label }),
1314
1310
  /* @__PURE__ */ c(z.Separator, {})
1315
1311
  ] }, "0") : /* @__PURE__ */ c(z.RadioItem, { value: h.value, model: t, onChange: () => n(h.value), children: h.label }, h.value)) })
@@ -1324,39 +1320,44 @@ const rs = () => {
1324
1320
  t: r
1325
1321
  } = j();
1326
1322
  return /* @__PURE__ */ c("div", { className: "treeview", children: /* @__PURE__ */ c("ul", { role: "tree", className: "m-0 p-0", children: /* @__PURE__ */ c("li", { id: e, role: "treeitem", "aria-selected": s, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("div", { className: "action-container", children: /* @__PURE__ */ c("div", { onClick: t, role: "button", tabIndex: 0, children: /* @__PURE__ */ N("div", { className: "d-flex align-items-center gap-8 py-8 ps-24", children: [
1327
- /* @__PURE__ */ c(Ue, { width: "20", height: "20" }),
1323
+ /* @__PURE__ */ c(ke, { width: "20", height: "20" }),
1328
1324
  /* @__PURE__ */ c("span", { children: r("explorer.tree.trash") })
1329
1325
  ] }) }) }) }) }) }) });
1330
1326
  }, Ft = /* @__PURE__ */ F(async () => await import("./FolderModal.js")), Ct = () => {
1331
1327
  const e = E(), [s, t] = Ne(), r = V(), n = ne(), a = re(), {
1332
1328
  appCode: o
1333
1329
  } = K(), {
1334
- t: l
1330
+ t: i
1335
1331
  } = j(["common", o]), {
1336
1332
  goToTrash: f,
1337
1333
  selectTreeItem: d,
1338
1334
  unfoldTreeItem: u,
1339
1335
  foldTreeItem: h,
1340
- clearSelectedItems: i,
1336
+ clearSelectedItems: l,
1341
1337
  clearSelectedIds: p
1342
- } = b(), m = async (g) => {
1338
+ } = T(), m = async (g) => {
1343
1339
  await u(g, e);
1344
1340
  }, y = () => {
1345
- i(), p(), t();
1341
+ l(), p(), t();
1346
1342
  };
1347
1343
  return /* @__PURE__ */ N(ce, { children: [
1348
- /* @__PURE__ */ c(Re, { data: r, selectedNodesIds: a, onTreeItemSelect: d, onTreeItemFold: h, onTreeItemUnfold: m }),
1349
- /* @__PURE__ */ c(Tt, { id: T.BIN, selected: n, onSelect: f }),
1350
- /* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(Pe, { disabled: n, type: "button", color: "primary", variant: "outline", leftIcon: /* @__PURE__ */ c(ke, {}), onClick: y, children: l("explorer.folder.new") }) }),
1351
- /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: s && /* @__PURE__ */ c(Ft, { edit: !1, isOpen: s, onSuccess: t, onCancel: t }) })
1344
+ /* @__PURE__ */ c(Re, { data: {
1345
+ ...r,
1346
+ name: i("explorer.filters.mine", {
1347
+ ns: o
1348
+ })
1349
+ }, selectedNodesIds: a, onTreeItemSelect: d, onTreeItemFold: h, onTreeItemUnfold: m }),
1350
+ /* @__PURE__ */ c(Tt, { id: w.BIN, selected: n, onSelect: f }),
1351
+ /* @__PURE__ */ c("div", { className: "d-grid my-16", children: /* @__PURE__ */ c(Pe, { disabled: n, type: "button", color: "primary", variant: "outline", leftIcon: /* @__PURE__ */ c(Ue, {}), onClick: y, children: i("explorer.folder.new") }) }),
1352
+ /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: s && /* @__PURE__ */ c(Ft, { edit: !1, isOpen: s, onSuccess: t, onCancel: t }) })
1352
1353
  ] });
1353
1354
  }, Nt = /* @__PURE__ */ F(async () => await import("./AppAction.js")), Rt = /* @__PURE__ */ F(async () => await import("./Library.js")), Pt = /* @__PURE__ */ F(async () => await import("./ActionBarContainer.js")), At = /* @__PURE__ */ F(async () => await import("./DisableModal.js")), Et = /* @__PURE__ */ F(async () => await import("./TrashModal.js")), Qt = /* @__PURE__ */ F(async () => await import("./OnboardingModal.js")), ns = ({
1354
1355
  config: e
1355
1356
  }) => {
1356
- const s = D(), {
1357
+ const s = b(), {
1357
1358
  setConfig: t,
1358
1359
  setSearchParams: r
1359
- } = b();
1360
+ } = T();
1360
1361
  M(() => {
1361
1362
  t(e || {}), r({
1362
1363
  ...s,
@@ -1370,7 +1371,7 @@ const rs = () => {
1370
1371
  data: a
1371
1372
  } = ft(), {
1372
1373
  isTrashedModalOpen: o,
1373
- onTrashedCancel: l
1374
+ onTrashedCancel: i
1374
1375
  } = ct(), {
1375
1376
  isActionDisableModalOpen: f,
1376
1377
  onActionDisableCancel: d
@@ -1378,9 +1379,9 @@ const rs = () => {
1378
1379
  Ae();
1379
1380
  const u = oe("publish", a), h = oe("create", a);
1380
1381
  return e && /* @__PURE__ */ N(ce, { children: [
1381
- /* @__PURE__ */ c(Ee, { render: () => h ? /* @__PURE__ */ c(q, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(Nt, {}) }) : null, children: /* @__PURE__ */ c(Qe, { app: n }) }),
1382
+ /* @__PURE__ */ c(Ee, { render: () => h ? /* @__PURE__ */ c(O, { fallback: /* @__PURE__ */ c(A, {}), children: /* @__PURE__ */ c(Nt, {}) }) : null, children: /* @__PURE__ */ c(Qe, { app: n }) }),
1382
1383
  /* @__PURE__ */ N(te, { className: "flex-grow-1", children: [
1383
- /* @__PURE__ */ c(te.Col, { sm: "3", lg: "2", xl: "3", className: "border-end pt-16 pe-16 d-none d-lg-block", as: "aside", children: /* @__PURE__ */ N(q, { fallback: /* @__PURE__ */ c(A, {}), children: [
1384
+ /* @__PURE__ */ c(te.Col, { sm: "3", lg: "2", xl: "3", className: "border-end pt-16 pe-16 d-none d-lg-block", as: "aside", children: /* @__PURE__ */ N(O, { fallback: /* @__PURE__ */ c(A, {}), children: [
1384
1385
  /* @__PURE__ */ c(Ct, {}),
1385
1386
  u && /* @__PURE__ */ c(Rt, {})
1386
1387
  ] }) }),
@@ -1389,7 +1390,7 @@ const rs = () => {
1389
1390
  /* @__PURE__ */ c(ot, {}),
1390
1391
  /* @__PURE__ */ c(xt, {})
1391
1392
  ] }),
1392
- /* @__PURE__ */ N(q, { fallback: /* @__PURE__ */ c(A, {}), children: [
1393
+ /* @__PURE__ */ N(O, { fallback: /* @__PURE__ */ c(A, {}), children: [
1393
1394
  /* @__PURE__ */ c(Pt, {}),
1394
1395
  e.enableOnboarding && /* @__PURE__ */ c(Qt, { id: "showOnboardingTrash", items: [{
1395
1396
  src: "onboarding/illu-trash-menu.svg",
@@ -1409,19 +1410,19 @@ const rs = () => {
1409
1410
  nextText: "explorer.modal.onboarding.trash.next",
1410
1411
  closeText: "explorer.modal.onboarding.trash.close"
1411
1412
  } }),
1412
- o && /* @__PURE__ */ c(Et, { isOpen: o, onCancel: l }),
1413
+ o && /* @__PURE__ */ c(Et, { isOpen: o, onCancel: i }),
1413
1414
  f && /* @__PURE__ */ c(At, { isOpen: f, onCancel: d })
1414
1415
  ] })
1415
1416
  ] })
1416
1417
  ] });
1417
- }, L = document.querySelector("[data-explorer-config]");
1418
+ }, v = document.querySelector("[data-explorer-config]");
1418
1419
  let ae;
1419
1420
  function os() {
1420
1421
  var e;
1421
- if ((e = L == null ? void 0 : L.dataset) != null && e.explorerConfig) {
1422
+ if ((e = v == null ? void 0 : v.dataset) != null && e.explorerConfig) {
1422
1423
  const {
1423
1424
  explorerConfig: s
1424
- } = L.dataset;
1425
+ } = v.dataset;
1425
1426
  try {
1426
1427
  const t = JSON.parse(s);
1427
1428
  ae = {
@@ -1429,7 +1430,7 @@ function os() {
1429
1430
  enableOnboarding: t.enableOnboarding !== void 0 ? t.enableOnboarding : !0
1430
1431
  };
1431
1432
  } catch (t) {
1432
- console.error("[Explorer Config] could not parse app params from root data attributes:", L == null ? void 0 : L.dataset, t);
1433
+ console.error("[Explorer Config] could not parse app params from root data attributes:", v == null ? void 0 : v.dataset, t);
1433
1434
  }
1434
1435
  }
1435
1436
  return ae;
@@ -1439,27 +1440,27 @@ export {
1439
1440
  ft as a,
1440
1441
  H as b,
1441
1442
  rs as c,
1442
- D as d,
1443
+ b as d,
1443
1444
  ne as e,
1444
- w as f,
1445
+ S as f,
1445
1446
  $t as g,
1446
1447
  Y as h,
1447
1448
  Ht as i,
1448
1449
  Vt as j,
1449
1450
  X as k,
1450
- Jt as l,
1451
+ Gt as l,
1451
1452
  et as m,
1452
1453
  Xt as n,
1453
1454
  zt as o,
1454
- jt as p,
1455
- ts as q,
1456
- ss as r,
1457
- Zt as s,
1458
- es as t,
1459
- b as u,
1460
- Gt as v,
1461
- Wt as w,
1462
- Yt as x,
1463
- V as y,
1455
+ ts as p,
1456
+ ss as q,
1457
+ Zt as r,
1458
+ es as s,
1459
+ Jt as t,
1460
+ T as u,
1461
+ Wt as v,
1462
+ Yt as w,
1463
+ V as x,
1464
+ jt as y,
1464
1465
  os as z
1465
1466
  };