@ynput/ayon-frontend-shared 0.6.5 → 0.6.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.
Files changed (46) hide show
  1. package/dist/DetailsPanel.es.js +3 -3
  2. package/dist/NewEntity.es.js +15 -15
  3. package/dist/ProjectTreeTable.es.js +430 -433
  4. package/dist/Slicer.es.js +11 -11
  5. package/dist/Views.es.js +213 -206
  6. package/dist/chunks/CodeEditor.es.js +30 -0
  7. package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
  8. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  9. package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
  10. package/dist/chunks/EntityPath.es.js +2 -2
  11. package/dist/chunks/EntityTooltip.es.js +1 -1
  12. package/dist/chunks/Feed.es.js +958 -931
  13. package/dist/chunks/JsonViewer.es.js +1 -1
  14. package/dist/chunks/Menu.es.js +169 -167
  15. package/dist/chunks/MenuItem.es.js +109 -74
  16. package/dist/chunks/MetaWidget.es.js +1537 -1516
  17. package/dist/chunks/PlayableIcon.es.js +127 -127
  18. package/dist/chunks/ReviewablesSelector.es.js +199 -196
  19. package/dist/chunks/SimpleForm.es.js +78 -75
  20. package/dist/chunks/SimpleTable.es.js +110 -110
  21. package/dist/chunks/Slicer.es.js +22 -22
  22. package/dist/chunks/TableSettingsFallback.es.js +1 -1
  23. package/dist/chunks/ThumbnailSimple.es.js +2 -2
  24. package/dist/chunks/VideoPlayer.es.js +1 -1
  25. package/dist/chunks/Watchers.es.js +19 -19
  26. package/dist/chunks/afterStartup.es.js +13 -0
  27. package/dist/chunks/getUris.es.js +926 -964
  28. package/dist/chunks/queryFilterToClientFilter.es.js +90 -81
  29. package/dist/chunks/searchTerms.es.js +1 -0
  30. package/dist/chunks/useHierarchySelection.es.js +2 -2
  31. package/dist/chunks/useLoadModule.es.js +24 -23
  32. package/dist/components.es.js +202 -200
  33. package/dist/context.es.js +521 -492
  34. package/dist/hooks.es.js +190 -166
  35. package/dist/types/ContextMenu.d.ts +1 -0
  36. package/dist/types/Feed.d.ts +1 -1
  37. package/dist/types/ProjectTreeTable.d.ts +4 -5
  38. package/dist/types/Slicer.d.ts +1 -1
  39. package/dist/types/Views.d.ts +13 -2
  40. package/dist/types/api.d.ts +203 -1175
  41. package/dist/types/components.d.ts +14 -3
  42. package/dist/types/context.d.ts +3 -2
  43. package/dist/types/hooks.d.ts +25 -1
  44. package/dist/types/util.d.ts +11 -1
  45. package/dist/util.es.js +44 -41
  46. package/package.json +2 -2
@@ -1,26 +1,26 @@
1
- import { jsxs as j, jsx as o } from "react/jsx-runtime";
2
- import { Icon as i, ShortcutTag as F } from "@ynput/ayon-react-components";
1
+ import { jsxs as _, jsx as o } from "react/jsx-runtime";
2
+ import { Button as j, Icon as a, ShortcutTag as F } from "@ynput/ayon-react-components";
3
3
  import { forwardRef as O } from "react";
4
4
  import r, { keyframes as z } from "styled-components";
5
- import { isArray as E } from "lodash";
6
- import { Link as L } from "react-router-dom";
7
- import P from "clsx";
5
+ import { isArray as L } from "lodash";
6
+ import { Link as S } from "react-router-dom";
7
+ import T from "clsx";
8
8
  import "@module-federation/enhanced/runtime";
9
+ import "react-toastify";
9
10
  import "./searchTerms.es.js";
10
11
  import "./getUris.es.js";
11
12
  import "primereact/confirmdialog";
12
- import { a as G } from "./DeleteEntitiesContextInstance.es.js";
13
- import "react-toastify";
13
+ import { a as $ } from "./DeleteEntitiesContextInstance.es.js";
14
14
  import "uuid";
15
15
  import "semver";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import "react-dom";
18
18
  import "react-redux";
19
- const u = 42, S = 8, ao = u + S, so = r.dialog`
19
+ const v = 42, C = 8, po = v + C, mo = r.dialog`
20
20
  position: fixed;
21
21
  margin: 0;
22
22
  inset: 0;
23
- top: ${u}px;
23
+ top: ${v}px;
24
24
  width: auto;
25
25
  height: auto;
26
26
  z-index: 1000;
@@ -38,7 +38,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
38
38
  display: none;
39
39
  }
40
40
  padding-bottom: 60px;
41
- `, T = z`
41
+ `, G = z`
42
42
  from {
43
43
  scale: 0.95;
44
44
  opacity: 0.6;
@@ -47,7 +47,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
47
47
  scale: 1;
48
48
  opacity: 1;
49
49
  }
50
- `, co = r.div`
50
+ `, go = r.div`
51
51
  display: flex;
52
52
  flex-direction: column;
53
53
  gap: var(--base-gap-large);
@@ -61,7 +61,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
61
61
  z-index: 30;
62
62
 
63
63
  /* animate */
64
- animation: ${T} 0.03s ease-in forwards;
64
+ animation: ${G} 0.03s ease-in forwards;
65
65
 
66
66
  /* transform origin based on alignment */
67
67
  &.right {
@@ -85,7 +85,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
85
85
  color: var(--md-sys-color-on-surface, #fff) !important;
86
86
  }
87
87
  }
88
- `, lo = r.section`
88
+ `, uo = r.section`
89
89
  position: relative;
90
90
  display: flex;
91
91
  flex-direction: column;
@@ -98,7 +98,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
98
98
  color: var(--md-sys-color-on-surface);
99
99
  z-index: 10;
100
100
  overflow: hidden;
101
- `, po = r.div`
101
+ `, ho = r.div`
102
102
  position: relative;
103
103
  border-radius: 8px;
104
104
  display: flex;
@@ -122,7 +122,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
122
122
  overflow-x: hidden;
123
123
  }
124
124
  }
125
- `, mo = r.menu`
125
+ `, fo = r.menu`
126
126
  /* reset defaults */
127
127
  display: flex;
128
128
  list-style-type: none;
@@ -157,7 +157,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
157
157
  opacity: 0.5;
158
158
  border-color: var(--md-sys-color-surface-container-highest);
159
159
  }
160
- `, $ = r.li`
160
+ `, U = r.li`
161
161
  display: flex;
162
162
  padding: 6px 16px 6px 12px;
163
163
  justify-content: flex-start;
@@ -176,7 +176,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
176
176
  &:hover {
177
177
  background-color: var(--md-sys-color-surface-container-highest);
178
178
  }
179
-
179
+
180
180
  .hover-swap {
181
181
  display: none;
182
182
  cursor: grab;
@@ -256,7 +256,7 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
256
256
  color: var(--md-sys-color-tertiary);
257
257
  }
258
258
  [icon='bolt'] {
259
- font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 20;
259
+ font-variation-settings: 'FILL' 1;
260
260
  }
261
261
  .shortcut {
262
262
  color: var(--md-sys-color-on-surface);
@@ -272,11 +272,30 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
272
272
  }
273
273
  background-color: unset;
274
274
  }
275
- `, U = r.img`
275
+ `, B = r.div`
276
+ display: flex;
277
+ align-items: center;
278
+ gap: var(--base-gap-small);
279
+ margin-left: auto;
280
+ padding-left: 24px;
281
+ `, W = r(j)`
282
+ margin-left: auto;
283
+ &.hasIcon {
284
+ padding: 4px;
285
+ }
286
+ .icon {
287
+ font-size: 16px;
288
+ }
289
+
290
+ .selected & {
291
+ background-color: var(--md-sys-color-on-primary);
292
+ color: var(--md-sys-color-primary);
293
+ }
294
+ `, K = r.img`
276
295
  width: 18px;
277
296
  height: 18px;
278
297
  object-fit: contain;
279
- `, go = r.footer`
298
+ `, vo = r.footer`
280
299
  position: relative;
281
300
  display: flex;
282
301
  padding: 8px;
@@ -307,79 +326,95 @@ const u = 42, S = 8, ao = u + S, so = r.dialog`
307
326
  }
308
327
  `, R = O(
309
328
  ({
310
- label: t,
311
- icon: a,
312
- hoverIcon: n,
313
- img: s,
314
- highlighted: h,
315
- notification: f,
316
- selected: v,
317
- danger: b,
318
- items: y = [],
319
- className: x,
320
- isLink: c,
321
- isDev: w,
322
- shortcut: l,
323
- disabled: k,
324
- powerFeature: D,
325
- active: d,
326
- reserveActiveSlot: N,
327
- ...p
328
- }, A) => {
329
- const m = E(t) ? t : [t], { powerLicense: I } = G(), e = !I && D, g = /* @__PURE__ */ j(
330
- $,
329
+ label: i,
330
+ icon: l,
331
+ hoverIcon: s,
332
+ img: c,
333
+ highlighted: y,
334
+ notification: b,
335
+ selected: x,
336
+ danger: w,
337
+ items: k = [],
338
+ className: D,
339
+ isLink: d,
340
+ isDev: N,
341
+ shortcut: p,
342
+ disabled: I,
343
+ powerFeature: A,
344
+ active: m,
345
+ reserveActiveSlot: E,
346
+ endActions: g = [],
347
+ ...u
348
+ }, M) => {
349
+ const h = L(i) ? i : [i], { powerLicense: P } = $(), n = !P && A, f = /* @__PURE__ */ _(
350
+ U,
331
351
  {
332
- ref: A,
333
- className: P(
352
+ ref: M,
353
+ className: T(
334
354
  "menu-item",
335
355
  {
336
- highlighted: h,
337
- selected: v,
338
- notification: f,
339
- danger: b,
340
- dev: w,
341
- disabled: k,
342
- power: e
356
+ highlighted: y,
357
+ selected: x,
358
+ notification: b,
359
+ danger: w,
360
+ dev: N,
361
+ disabled: I,
362
+ power: n
343
363
  },
344
- x
364
+ D
345
365
  ),
346
- ...p,
347
- "aria-label": m.join(", "),
366
+ ...u,
367
+ "aria-label": h.join(", "),
348
368
  children: [
349
- (a || e) && /* @__PURE__ */ o(
350
- i,
369
+ (l || n) && /* @__PURE__ */ o(
370
+ a,
351
371
  {
352
- icon: e ? "bolt" : a,
353
- className: n && !e ? "hover-swap-default" : void 0
372
+ icon: n ? "bolt" : l,
373
+ className: s && !n ? "hover-swap-default" : void 0
354
374
  }
355
375
  ),
356
- n && !e && /* @__PURE__ */ o(i, { icon: n, className: "hover-swap" }),
357
- s && /* @__PURE__ */ o(U, { src: s, alt: `${t} icon` }),
358
- m.map((M, _) => /* @__PURE__ */ o("span", { children: M }, _)),
359
- l && /* @__PURE__ */ o(F, { style: { minWidth: 22, textAlign: "center" }, align: "right", children: l }),
360
- (d || N) && /* @__PURE__ */ o(
361
- i,
376
+ s && !n && /* @__PURE__ */ o(a, { icon: s, className: "hover-swap" }),
377
+ c && /* @__PURE__ */ o(K, { src: c, alt: `${i} icon` }),
378
+ h.map((e, t) => /* @__PURE__ */ o("span", { children: e }, t)),
379
+ p && /* @__PURE__ */ o(F, { style: { minWidth: 22, textAlign: "center" }, align: "right", children: p }),
380
+ (m || E) && /* @__PURE__ */ o(
381
+ a,
362
382
  {
363
383
  icon: "check",
364
- style: { marginLeft: "auto", visibility: d ? "visible" : "hidden" }
384
+ style: { marginLeft: "auto", visibility: m ? "visible" : "hidden" }
365
385
  }
366
386
  ),
367
- !!y.length && /* @__PURE__ */ o(i, { icon: "arrow_right", className: "more" })
387
+ !!g.length && /* @__PURE__ */ o(B, { children: g.map((e) => /* @__PURE__ */ o(
388
+ W,
389
+ {
390
+ variant: "text",
391
+ icon: e.icon,
392
+ className: "menu-item-end-action",
393
+ "data-tooltip": e.tooltip,
394
+ "aria-label": e.tooltip,
395
+ onClick: (t) => {
396
+ t.stopPropagation(), e.onClick(t);
397
+ },
398
+ onKeyDown: (t) => t.stopPropagation()
399
+ },
400
+ e.icon
401
+ )) }),
402
+ !!k.length && /* @__PURE__ */ o(a, { icon: "arrow_right", className: "more" })
368
403
  ]
369
404
  }
370
405
  );
371
- return c ? /* @__PURE__ */ o(L, { to: c, target: p.target, children: g }) : g;
406
+ return d ? /* @__PURE__ */ o(S, { to: d, target: u.target, children: f }) : f;
372
407
  }
373
408
  );
374
409
  R.displayName = "MenuItem";
375
410
  export {
376
- u as D,
377
- go as F,
378
- po as M,
379
- lo as S,
380
- mo as a,
411
+ v as D,
412
+ vo as F,
413
+ ho as M,
414
+ uo as S,
415
+ fo as a,
381
416
  R as b,
382
- ao as c,
383
- so as d,
384
- co as e
417
+ po as c,
418
+ mo as d,
419
+ go as e
385
420
  };