@ynput/ayon-frontend-shared 0.6.6 → 0.6.8
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/dist/DetailsPanel.es.js +4 -4
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +49 -49
- package/dist/ProjectTreeTable.es.js +501 -496
- package/dist/Slicer.es.js +27 -27
- package/dist/Views.es.js +213 -206
- package/dist/api.es.js +362 -360
- package/dist/chunks/Actions.es.js +21 -21
- package/dist/chunks/CodeEditor.es.js +30 -0
- package/dist/chunks/ColumnDropIndicator.es.js +5 -5
- package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +96 -96
- package/dist/chunks/EmptyPlaceholder.es.js +9 -9
- package/dist/chunks/EntityPath.es.js +3 -3
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +1625 -1573
- package/dist/chunks/JsonViewer.es.js +1 -1
- package/dist/chunks/Menu.es.js +1 -1
- package/dist/chunks/MenuItem.es.js +25 -25
- package/dist/chunks/MetaWidget.es.js +1537 -1516
- package/dist/chunks/PlayableIcon.es.js +128 -128
- package/dist/chunks/ProjectContext.es.js +11 -11
- package/dist/chunks/ReviewablesSelector.es.js +553 -462
- package/dist/chunks/SimpleForm.es.js +7 -7
- package/dist/chunks/SimpleTable.es.js +110 -110
- package/dist/chunks/Slicer.es.js +80 -80
- package/dist/chunks/TableSettingsFallback.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +17 -17
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +50 -50
- package/dist/chunks/afterStartup.es.js +13 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +797 -827
- package/dist/chunks/searchTerms.es.js +353 -336
- package/dist/chunks/useAttributeEnums.es.js +16 -16
- package/dist/chunks/useHierarchySelection.es.js +2 -2
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +8 -8
- package/dist/components.es.js +205 -202
- package/dist/context.es.js +525 -496
- package/dist/hooks.es.js +190 -166
- package/dist/types/ContextMenu.d.ts +1 -0
- package/dist/types/ProjectTreeTable.d.ts +1 -0
- package/dist/types/Views.d.ts +11 -0
- package/dist/types/api.d.ts +823 -1427
- package/dist/types/components.d.ts +9 -1
- package/dist/types/context.d.ts +1 -0
- package/dist/types/hooks.d.ts +25 -1
- package/dist/types/util.d.ts +10 -0
- package/dist/util.es.js +45 -42
- package/package.json +2 -2
|
@@ -17,6 +17,7 @@ import { DetailedHTMLProps } from 'react';
|
|
|
17
17
|
import { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES } from 'react';
|
|
18
18
|
import { DocumentNode } from 'graphql';
|
|
19
19
|
import { DropdownRef } from '@ynput/ayon-react-components';
|
|
20
|
+
import { ExecutionProps } from 'styled-components';
|
|
20
21
|
import { FastOmit } from 'styled-components';
|
|
21
22
|
import { FC } from 'react';
|
|
22
23
|
import { FetchArgs } from '@reduxjs/toolkit/query';
|
|
@@ -36,6 +37,7 @@ import { LabelHTMLAttributes } from 'react';
|
|
|
36
37
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
37
38
|
import { MutationActionCreatorResult } from '@reduxjs/toolkit/query';
|
|
38
39
|
import { MutationDefinition } from '@reduxjs/toolkit/query';
|
|
40
|
+
import { NamedExoticComponent } from 'react';
|
|
39
41
|
import { Option as Option_2 } from '@ynput/ayon-react-components';
|
|
40
42
|
import { OverrideResultType } from '@reduxjs/toolkit/query';
|
|
41
43
|
import { QueryDefinition } from '@reduxjs/toolkit/query';
|
|
@@ -2286,7 +2288,11 @@ declare type QueryFilter_5 = {
|
|
|
2286
2288
|
operator?: 'and' | 'or';
|
|
2287
2289
|
};
|
|
2288
2290
|
|
|
2289
|
-
export declare const RefreshToast: () => JSX_2.Element;
|
|
2291
|
+
export declare const RefreshToast: ({ message }: RefreshToastProps) => JSX_2.Element;
|
|
2292
|
+
|
|
2293
|
+
declare type RefreshToastProps = {
|
|
2294
|
+
message?: string;
|
|
2295
|
+
};
|
|
2290
2296
|
|
|
2291
2297
|
export declare interface RemotePageContext {
|
|
2292
2298
|
detailsPanel?: DetailsPanelContextType;
|
|
@@ -2828,6 +2834,8 @@ export declare const splitClientFiltersByScope: (filters: (Filter | SliceFilter)
|
|
|
2828
2834
|
*/
|
|
2829
2835
|
export declare const splitFiltersByScope: (combinedFilter: Record<string, any> | null, scopes: ScopeType[], config?: FilterConfig, filterIdToScopeMap?: Record<string, ScopeType>) => Record<ScopeType | "unscoped", Record<string, any>>;
|
|
2830
2836
|
|
|
2837
|
+
export declare const SplitterStyles: NamedExoticComponent< ExecutionProps & object>;
|
|
2838
|
+
|
|
2831
2839
|
export declare const StackedThumbnails: ({ thumbnails, isLoading, className, style, ...props }: StackedThumbnailsProps) => JSX_2.Element | null;
|
|
2832
2840
|
|
|
2833
2841
|
export declare interface StackedThumbnailsProps extends Omit<ThumbnailProps, 'entityType' | 'entityId' | 'projectName' | 'thumbnailHash'> {
|
package/dist/types/context.d.ts
CHANGED
package/dist/types/hooks.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Dispatch } from 'react';
|
|
|
5
5
|
import { FC } from 'react';
|
|
6
6
|
import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
|
|
7
7
|
import { OnChangeFn } from '@tanstack/react-table';
|
|
8
|
+
import { RefObject } from 'react';
|
|
8
9
|
import { SerializedError } from '@reduxjs/toolkit';
|
|
9
10
|
import { SetStateAction } from 'react';
|
|
10
11
|
import { SortingState } from '@tanstack/react-table';
|
|
@@ -336,6 +337,12 @@ declare type Options<T extends ReviewableLike> = {
|
|
|
336
337
|
enabled?: boolean;
|
|
337
338
|
};
|
|
338
339
|
|
|
340
|
+
declare type Options_2 = {
|
|
341
|
+
containerRef: RefObject<HTMLElement>;
|
|
342
|
+
toolsRef: RefObject<HTMLElement>;
|
|
343
|
+
reviewablesCount: number;
|
|
344
|
+
};
|
|
345
|
+
|
|
339
346
|
declare type PathDefinition = {
|
|
340
347
|
windows?: string;
|
|
341
348
|
linux?: string;
|
|
@@ -356,6 +363,7 @@ declare interface Props<T> {
|
|
|
356
363
|
debug?: boolean;
|
|
357
364
|
minVersion?: string;
|
|
358
365
|
skip?: boolean;
|
|
366
|
+
defer?: boolean;
|
|
359
367
|
}
|
|
360
368
|
|
|
361
369
|
declare type Props_2 = {
|
|
@@ -396,6 +404,8 @@ declare type ReviewableLike = {
|
|
|
396
404
|
label?: string | null;
|
|
397
405
|
};
|
|
398
406
|
|
|
407
|
+
export declare type ReviewablesLayout = 'column' | 'row';
|
|
408
|
+
|
|
399
409
|
declare type RowItemData = {
|
|
400
410
|
id: string;
|
|
401
411
|
name?: string | null;
|
|
@@ -474,6 +484,13 @@ export declare const useActionTriggers: ({ searchParams, onSetSearchParams, onNa
|
|
|
474
484
|
handleActionPayload: (actionType: string, payload: ActionPayload | null) => void;
|
|
475
485
|
};
|
|
476
486
|
|
|
487
|
+
/**
|
|
488
|
+
* False until the page has had time to load (see afterStartup), then true.
|
|
489
|
+
* Use it to skip queries nobody waits for on load, e.g. prompts and banners,
|
|
490
|
+
* so they don't compete with the page's own requests.
|
|
491
|
+
*/
|
|
492
|
+
export declare const useAfterStartup: (delay?: number) => boolean;
|
|
493
|
+
|
|
477
494
|
export declare const useAttributeEnumOptions: (data: AttributeData | undefined, { projectName, skip }?: UseAttributeEnumOptionsParams) => AttributeEnumState;
|
|
478
495
|
|
|
479
496
|
export declare interface UseAttributeEnumOptionsParams {
|
|
@@ -551,7 +568,7 @@ export declare const useHierarchyTable: ({ projectName, folderTypes, includeColo
|
|
|
551
568
|
isFetching: boolean;
|
|
552
569
|
};
|
|
553
570
|
|
|
554
|
-
export declare const useLoadModule: <T>({ addon, remote, module, fallback, minVersion, skip, }: Props<T>) => [T, {
|
|
571
|
+
export declare const useLoadModule: <T>({ addon, remote, module, fallback, minVersion, skip, defer, }: Props<T>) => [T, {
|
|
555
572
|
isLoaded: boolean;
|
|
556
573
|
isLoading: boolean;
|
|
557
574
|
outdated?: {
|
|
@@ -579,6 +596,13 @@ export declare const useQueryArgumentChangeLoading: <T extends Record<string, an
|
|
|
579
596
|
|
|
580
597
|
export declare function useReviewablesKeyboardNavigation<T extends ReviewableLike>({ reviewables, selected, onChange, onNavigate, enabled, }: Options<T>): void;
|
|
581
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Stacks the reviewables above the annotation tools while there is room for them.
|
|
601
|
+
* Once there are more than 3 reviewables and they would get less than 30% of the
|
|
602
|
+
* container height, the tools and reviewables are laid out side by side instead.
|
|
603
|
+
*/
|
|
604
|
+
export declare function useReviewablesLayout({ containerRef, toolsRef, reviewablesCount, }: Options_2): ReviewablesLayout;
|
|
605
|
+
|
|
582
606
|
export declare const useScopedStatuses: (projects: string[], entityTypes: string[]) => EntityStatus[] | undefined;
|
|
583
607
|
|
|
584
608
|
export declare const useScopedTypes: (projects: string[], entityType: string) => EntityType[];
|
package/dist/types/util.d.ts
CHANGED
|
@@ -22,6 +22,14 @@ export declare type ActiveEntity = {
|
|
|
22
22
|
projectName: string;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Runs `callback` once the page has had time to load: after `delay` ms, at the next idle
|
|
27
|
+
* period (or straight away where requestIdleCallback is missing).
|
|
28
|
+
* Use it for work nobody waits for on load, like third party widgets or rarely used addon code.
|
|
29
|
+
* Returns a function that cancels it.
|
|
30
|
+
*/
|
|
31
|
+
export declare const afterStartup: (callback: () => void, delay?: number) => () => void;
|
|
32
|
+
|
|
25
33
|
declare type Anatomy = {
|
|
26
34
|
/** Settings for automatic entity name generation */
|
|
27
35
|
entity_naming?: EntityNaming;
|
|
@@ -1033,6 +1041,8 @@ declare type StagingDirectory = {
|
|
|
1033
1041
|
directory?: string;
|
|
1034
1042
|
};
|
|
1035
1043
|
|
|
1044
|
+
export declare const STARTUP_DELAY = 3000;
|
|
1045
|
+
|
|
1036
1046
|
declare type Status = {
|
|
1037
1047
|
name: string;
|
|
1038
1048
|
original_name?: string;
|
package/dist/util.es.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { K as S, g as
|
|
1
|
+
import { K as S, g as A, a as I } from "./chunks/platform.es.js";
|
|
2
2
|
import { c as d } from "./chunks/confirmDelete.es.js";
|
|
3
3
|
import { a as R } from "./chunks/confirmDelete.es.js";
|
|
4
4
|
import { e as F, g as M } from "./chunks/getEntityTypeIcon.es.js";
|
|
5
5
|
import { g as v, r as D } from "./chunks/replaceRoot.es.js";
|
|
6
6
|
import { A as U, c as w, e as N, g as O, a as V, s as k, u as H, b as K } from "./chunks/activeEntities.es.js";
|
|
7
7
|
import { c as z } from "./chunks/copyToClipboard.es.js";
|
|
8
|
-
import { g as
|
|
9
|
-
import { c as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { M as
|
|
8
|
+
import { g as j, h as q } from "./chunks/humanizeFieldName.es.js";
|
|
9
|
+
import { c as Q, a as W, g as X, b as $, d as G, p as Z, e as ee } from "./chunks/iconUtils.es.js";
|
|
10
|
+
import { bl as g } from "./chunks/searchTerms.es.js";
|
|
11
|
+
import { bm as ae, bf as re, bn as se, bh as oe, bo as ie, bj as ne, bp as le, bq as me, bk as ce, bg as pe, br as de, bs as ge, bt as ue, bi as be, bu as Ee, bv as fe, bw as Te, bx as he } from "./chunks/searchTerms.es.js";
|
|
12
|
+
import { M as ye, a as Se, b as Ae, d as Ie, e as Pe, f as Re, c as Ce, g as Fe, h as Me, i as _e, p as ve, s as De, j as Le, v as Ue, w as we } from "./chunks/realtimeUpdatesUtils.es.js";
|
|
13
13
|
import { e as Oe } from "./chunks/extractVersionFromFilename.es.js";
|
|
14
|
-
import { c as ke, a as He, b as Ke, g as Be, h as ze, s as
|
|
15
|
-
import { c as
|
|
14
|
+
import { c as ke, a as He, b as Ke, g as Be, h as ze, s as Ye, v as je, d as qe, e as Je } from "./chunks/versionUploadHelpers.es.js";
|
|
15
|
+
import { c as We, a as Xe } from "./chunks/columnConfigConverter.es.js";
|
|
16
16
|
import { p as Ge } from "./chunks/pluralize.es.js";
|
|
17
17
|
import { b as et, a as tt, h as at, p as rt, r as st } from "./chunks/colorUtils.es.js";
|
|
18
18
|
import { g as it } from "./chunks/getGroupByDataType.es.js";
|
|
19
19
|
import { b as lt, g as mt, a as ct, c as pt, p as dt, u as gt } from "./chunks/getBundleMode.es.js";
|
|
20
|
-
import { b as
|
|
21
|
-
import { g as
|
|
22
|
-
import { p as
|
|
23
|
-
import { i as
|
|
24
|
-
import {
|
|
20
|
+
import { b as bt, s as Et } from "./chunks/buildHierarchicalTableRows.es.js";
|
|
21
|
+
import { g as Tt, a as ht } from "./chunks/getThumbnailUrl.es.js";
|
|
22
|
+
import { p as yt } from "./chunks/parseFilename.es.js";
|
|
23
|
+
import { i as At } from "./chunks/isHTMLElement.es.js";
|
|
24
|
+
import { S as Pt, a as Rt } from "./chunks/afterStartup.es.js";
|
|
25
|
+
import { ConfirmDialog as Ft } from "primereact/confirmdialog";
|
|
25
26
|
const E = (e) => {
|
|
26
27
|
const a = /* @__PURE__ */ new Map(), s = [];
|
|
27
28
|
for (const t of e)
|
|
@@ -51,7 +52,7 @@ const E = (e) => {
|
|
|
51
52
|
label: m,
|
|
52
53
|
message: l || c
|
|
53
54
|
});
|
|
54
|
-
},
|
|
55
|
+
}, T = (e) => e ? e.label?.trim() || e.name : "", h = {
|
|
55
56
|
"@@@": {
|
|
56
57
|
id: "task"
|
|
57
58
|
},
|
|
@@ -65,28 +66,30 @@ const E = (e) => {
|
|
|
65
66
|
};
|
|
66
67
|
export {
|
|
67
68
|
U as ACTIVE_ENTITIES_PRIORITY,
|
|
68
|
-
|
|
69
|
+
Ft as ConfirmDialog,
|
|
69
70
|
ae as ENUM_CONTEXT_PARAMS,
|
|
70
71
|
S as KeyMode,
|
|
71
|
-
|
|
72
|
+
ye as MAX_SORT_KEYS,
|
|
72
73
|
re as PubSub,
|
|
73
74
|
Se as REALTIME_REST_CALL_LIMIT,
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
Ae as REALTIME_REST_JITTER,
|
|
76
|
+
Ie as REALTIME_TASK_SUPPORTED_VALUE_FIELDS,
|
|
76
77
|
Pe as REALTIME_UPDATE_DEBOUNCE,
|
|
78
|
+
Pt as STARTUP_DELAY,
|
|
79
|
+
Rt as afterStartup,
|
|
77
80
|
et as blendCategoryColor,
|
|
78
81
|
tt as blendColors,
|
|
79
82
|
lt as buildEntityUri,
|
|
80
83
|
E as buildFolderHierarchy,
|
|
81
|
-
|
|
84
|
+
bt as buildHierarchicalTableRows,
|
|
82
85
|
Re as buildSortArgs,
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
Q as checkLabel,
|
|
87
|
+
W as checkName,
|
|
85
88
|
w as clearActiveEntities,
|
|
86
89
|
d as confirmDelete,
|
|
87
90
|
R as confirmDeleteDialog,
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
We as convertColumnConfigToTanstackStates,
|
|
92
|
+
Xe as convertTanstackStatesToColumnConfig,
|
|
90
93
|
z as copyToClipboard,
|
|
91
94
|
ke as createProductAndVersion,
|
|
92
95
|
He as createProductHelper,
|
|
@@ -96,27 +99,27 @@ export {
|
|
|
96
99
|
N as extractEntityHierarchyFromParents,
|
|
97
100
|
Oe as extractVersionFromFilename,
|
|
98
101
|
O as getActiveEntities,
|
|
99
|
-
|
|
102
|
+
X as getAttributeIcon,
|
|
100
103
|
mt as getBundleModeFromUser,
|
|
101
|
-
|
|
104
|
+
A as getCurrentPlatform,
|
|
102
105
|
$ as getEntityColor,
|
|
103
106
|
G as getEntityIcon,
|
|
104
107
|
Fe as getEntityId,
|
|
105
108
|
ct as getEntityStateFromUri,
|
|
106
|
-
|
|
109
|
+
Tt as getEntityThumbnailUrl,
|
|
107
110
|
M as getEntityTypeIcon,
|
|
108
111
|
se as getEnumContextParams,
|
|
109
112
|
oe as getEnumErrorText,
|
|
110
113
|
ie as getEnumItemIcon,
|
|
111
114
|
g as getErrorMessage,
|
|
112
115
|
it as getGroupByDataType,
|
|
113
|
-
|
|
116
|
+
j as getMixedState,
|
|
114
117
|
Be as getNextVersionNumber,
|
|
115
|
-
|
|
118
|
+
I as getPlatformShortcutKey,
|
|
116
119
|
Me as getPrimarySortKey,
|
|
117
120
|
V as getPriorityOptions,
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
T as getProjectDisplayName,
|
|
122
|
+
ht as getProjectThumbnailUrl,
|
|
120
123
|
ne as getRequestErrorString,
|
|
121
124
|
le as getSelectableAssignees,
|
|
122
125
|
me as getSelectableEnumItems,
|
|
@@ -128,16 +131,16 @@ export {
|
|
|
128
131
|
ce as hasEnumOptions,
|
|
129
132
|
pe as hasEnumResolver,
|
|
130
133
|
at as hexToRgb,
|
|
131
|
-
|
|
134
|
+
q as humanizeField,
|
|
132
135
|
de as isEnumContextParam,
|
|
133
136
|
ge as isEnumIconImage,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
At as isHTMLElement,
|
|
138
|
+
ue as matchSearchQuery,
|
|
139
|
+
h as mentionTypeOptions,
|
|
140
|
+
be as normalizeEnumItems,
|
|
138
141
|
Z as parseAndFormatName,
|
|
139
142
|
rt as parseColor,
|
|
140
|
-
|
|
143
|
+
yt as parseFilename,
|
|
141
144
|
ee as parseHtmlToPlainTextWithLinks,
|
|
142
145
|
Ee as parseSearchQuery,
|
|
143
146
|
dt as parseUri,
|
|
@@ -146,19 +149,19 @@ export {
|
|
|
146
149
|
Ge as pluralize,
|
|
147
150
|
D as replaceRoot,
|
|
148
151
|
st as rgbToHex,
|
|
149
|
-
|
|
152
|
+
Ye as sanitizeProductName,
|
|
150
153
|
De as serializeViewSorting,
|
|
151
154
|
k as setActiveEntities,
|
|
152
155
|
Et as shouldBlockShortcuts,
|
|
153
|
-
|
|
156
|
+
Te as sortKeysDeep,
|
|
154
157
|
Le as subscribeToThumbnailUpdates,
|
|
155
|
-
|
|
158
|
+
he as toDropdownErrorText,
|
|
156
159
|
H as useActiveEntities,
|
|
157
160
|
K as useRegisterActiveEntities,
|
|
158
161
|
gt as useStagingModeState,
|
|
159
162
|
Ue as validateEntityId,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
je as validateFormData,
|
|
164
|
+
qe as validateProductName,
|
|
165
|
+
Je as validateVersion,
|
|
163
166
|
we as waitForRealtimeJitter
|
|
164
167
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ynput/ayon-frontend-shared",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Shared React components for AYON frontend",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@tanstack/react-virtual": "3.13.23",
|
|
138
138
|
"@uiw/react-textarea-code-editor": "2.1.9",
|
|
139
139
|
"@ynput/ayon-player": "1.0.2",
|
|
140
|
-
"@ynput/ayon-react-components": "^1.
|
|
140
|
+
"@ynput/ayon-react-components": "^1.22.0",
|
|
141
141
|
"axios": "1.20.0",
|
|
142
142
|
"clsx": "2.1.1",
|
|
143
143
|
"custom-protocol-check": "1.4.0",
|