@ynput/ayon-frontend-shared 0.6.8 → 0.7.0

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 (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. package/dist/chunks/MenuItem.es.js +0 -420
@@ -1,420 +0,0 @@
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
- import { forwardRef as O } from "react";
4
- import r, { keyframes as z } from "styled-components";
5
- import { isArray as L } from "lodash";
6
- import { Link as S } from "react-router-dom";
7
- import T from "clsx";
8
- import "@module-federation/enhanced/runtime";
9
- import "react-toastify";
10
- import "./searchTerms.es.js";
11
- import "./getUris.es.js";
12
- import "primereact/confirmdialog";
13
- import { a as $ } from "./DeleteEntitiesContextInstance.es.js";
14
- import "uuid";
15
- import "semver";
16
- import "./ContextMenuContextInstance.es.js";
17
- import "react-dom";
18
- import "react-redux";
19
- const v = 42, C = 8, po = v + C, mo = r.dialog`
20
- position: fixed;
21
- margin: 0;
22
- inset: 0;
23
- top: ${v}px;
24
- width: auto;
25
- height: auto;
26
- z-index: 1000;
27
- border: none;
28
- background-color: unset;
29
- padding: 0;
30
-
31
- user-select: none;
32
-
33
- overflow: auto;
34
- /* remove scroll bar */
35
- scrollbar-width: none;
36
- -ms-overflow-style: none;
37
- &::-webkit-scrollbar {
38
- display: none;
39
- }
40
- padding-bottom: 60px;
41
- `, G = z`
42
- from {
43
- scale: 0.95;
44
- opacity: 0.6;
45
- }
46
- to {
47
- scale: 1;
48
- opacity: 1;
49
- }
50
- `, go = r.div`
51
- display: flex;
52
- flex-direction: column;
53
- gap: var(--base-gap-large);
54
- min-height: 0;
55
-
56
- /* position */
57
- position: absolute;
58
- right: 0;
59
- top: 0;
60
- width: fit-content;
61
- z-index: 30;
62
-
63
- /* animate */
64
- animation: ${G} 0.03s ease-in forwards;
65
-
66
- /* transform origin based on alignment */
67
- &.right {
68
- transform-origin: top right;
69
- }
70
- &.left {
71
- transform-origin: top left;
72
- }
73
-
74
- /* add shadow to each item */
75
- & > *:not(.sub-menu),
76
- .sub-menu menu {
77
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
78
- }
79
-
80
- /* theme support */
81
- &.dark {
82
- color: var(--md-sys-color-on-surface, #fff);
83
- /* override children backgrounds if needed */
84
- & > * {
85
- color: var(--md-sys-color-on-surface, #fff) !important;
86
- }
87
- }
88
- `, uo = r.section`
89
- position: relative;
90
- display: flex;
91
- flex-direction: column;
92
- min-height: 0;
93
-
94
- padding: 0px;
95
- border-radius: 8px;
96
- /* colors */
97
- background-color: var(--md-sys-color-surface-container-high);
98
- color: var(--md-sys-color-on-surface);
99
- z-index: 10;
100
- overflow: hidden;
101
- `, ho = r.div`
102
- position: relative;
103
- border-radius: 8px;
104
- display: flex;
105
- flex-direction: column;
106
- min-height: 0;
107
-
108
- & > * {
109
- min-height: 0;
110
- }
111
-
112
- /* sub menu */
113
- &.sub-menu {
114
- position: absolute;
115
-
116
- border-radius: 8px;
117
- width: max-content;
118
- z-index: 30;
119
-
120
- & > * {
121
- border-radius: 8px;
122
- overflow-x: hidden;
123
- }
124
- }
125
- `, fo = r.menu`
126
- /* reset defaults */
127
- display: flex;
128
- list-style-type: none;
129
- margin-block-start: 0;
130
- margin-block-end: 0;
131
- margin-inline-start: 0px;
132
- margin-inline-end: 0px;
133
- padding-inline-start: 0;
134
-
135
- /* custom */
136
- flex-direction: column;
137
- gap: var(--base-gap-large);
138
- padding: 8px;
139
- flex: 1 1 auto;
140
- min-height: 0;
141
- overflow-y: auto;
142
-
143
- /* shrink the padding when compact */
144
- &.compact {
145
- padding: 4px;
146
- gap: var(--base-gap-small);
147
- }
148
-
149
- /* colors */
150
- background-color: var(--md-sys-color-surface-container-high);
151
-
152
- /* divider */
153
- hr {
154
- margin: 0;
155
- width: 100%;
156
- border-style: solid;
157
- opacity: 0.5;
158
- border-color: var(--md-sys-color-surface-container-highest);
159
- }
160
- `, U = r.li`
161
- display: flex;
162
- padding: 6px 16px 6px 12px;
163
- justify-content: flex-start;
164
- align-items: center;
165
- gap: var(--base-gap-large);
166
- align-self: stretch;
167
- border-radius: 4px;
168
- cursor: pointer;
169
- position: relative;
170
- user-select: none;
171
-
172
- span {
173
- display: inline-block;
174
- }
175
-
176
- &:hover {
177
- background-color: var(--md-sys-color-surface-container-highest);
178
- }
179
-
180
- .hover-swap {
181
- display: none;
182
- cursor: grab;
183
- }
184
- &:hover {
185
- .hover-swap-default {
186
- display: none;
187
- }
188
- .hover-swap {
189
- display: inline-block;
190
- }
191
- }
192
-
193
- .more {
194
- margin-left: auto;
195
- }
196
-
197
- /* highlighted item */
198
- &.highlighted {
199
- background-color: var(--md-sys-color-secondary-container);
200
- &:hover {
201
- background-color: var(--md-sys-color-secondary-container-hover);
202
- }
203
- }
204
-
205
- /* selected item */
206
- &.selected {
207
- background-color: var(--md-sys-color-primary-container);
208
- color: var(--md-sys-color-on-primary-container);
209
- &:hover {
210
- background-color: var(--md-sys-color-primary-container-hover);
211
- }
212
- }
213
-
214
- &.notification::after {
215
- content: '';
216
- position: absolute;
217
- right: 0;
218
- top: 0;
219
- transform: translate(25%, -25%);
220
- width: 8px;
221
- height: 8px;
222
- border-radius: 50%;
223
- background-color: var(--md-sys-color-error);
224
- }
225
-
226
- &.danger {
227
- &,
228
- .icon {
229
- color: var(--md-sys-color-error);
230
- }
231
-
232
- &:hover {
233
- background-color: var(--md-sys-color-error-container);
234
-
235
- &,
236
- .icon {
237
- color: var(--md-sys-color-on-error-container);
238
- }
239
- }
240
- }
241
-
242
- &.dev {
243
- &,
244
- .icon {
245
- color: var(--color-hl-developer);
246
- }
247
-
248
- &:hover {
249
- background-color: var(--color-hl-developer-container-hover);
250
- }
251
- }
252
-
253
- &.power {
254
- &,
255
- .icon {
256
- color: var(--md-sys-color-tertiary);
257
- }
258
- [icon='bolt'] {
259
- font-variation-settings: 'FILL' 1;
260
- }
261
- .shortcut {
262
- color: var(--md-sys-color-on-surface);
263
- }
264
- }
265
-
266
- &.disabled {
267
- user-select: none;
268
- pointer-events: none;
269
- &,
270
- .icon {
271
- color: var(--md-sys-color-outline);
272
- }
273
- background-color: unset;
274
- }
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`
295
- width: 18px;
296
- height: 18px;
297
- object-fit: contain;
298
- `, vo = r.footer`
299
- position: relative;
300
- display: flex;
301
- padding: 8px;
302
- flex-direction: column;
303
- justify-content: center;
304
- align-items: center;
305
- align-self: stretch;
306
- background-color: var(--md-sys-color-surface-container-lowest);
307
-
308
- user-select: text;
309
-
310
- button {
311
- display: none;
312
-
313
- position: absolute;
314
- right: 2px;
315
- border-radius: 8px;
316
- top: 50%;
317
- transform: translateY(-50%);
318
- cursor: pointer;
319
- }
320
-
321
- /* hover show button */
322
- &:hover {
323
- button {
324
- display: flex;
325
- }
326
- }
327
- `, R = O(
328
- ({
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,
351
- {
352
- ref: M,
353
- className: T(
354
- "menu-item",
355
- {
356
- highlighted: y,
357
- selected: x,
358
- notification: b,
359
- danger: w,
360
- dev: N,
361
- disabled: I,
362
- power: n
363
- },
364
- D
365
- ),
366
- ...u,
367
- "aria-label": h.join(", "),
368
- children: [
369
- (l || n) && /* @__PURE__ */ o(
370
- a,
371
- {
372
- icon: n ? "bolt" : l,
373
- className: s && !n ? "hover-swap-default" : void 0
374
- }
375
- ),
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,
382
- {
383
- icon: "check",
384
- style: { marginLeft: "auto", visibility: m ? "visible" : "hidden" }
385
- }
386
- ),
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" })
403
- ]
404
- }
405
- );
406
- return d ? /* @__PURE__ */ o(S, { to: d, target: u.target, children: f }) : f;
407
- }
408
- );
409
- R.displayName = "MenuItem";
410
- export {
411
- v as D,
412
- vo as F,
413
- ho as M,
414
- uo as S,
415
- fo as a,
416
- R as b,
417
- po as c,
418
- mo as d,
419
- go as e
420
- };