@ynput/ayon-frontend-shared 0.7.3 → 0.7.5
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/LICENSE +105 -0
- package/dist/DetailsPanel.es.js +1088 -969
- package/dist/ListTable.es.js +70 -67
- package/dist/NewEntity.es.js +8 -5
- package/dist/ProjectTreeTable.es.js +4134 -3825
- package/dist/ProjectsTable.es.js +526 -0
- package/dist/Slicer.es.js +75 -73
- package/dist/Views.es.js +86 -84
- package/dist/chunks/Actions.es.js +4 -2
- package/dist/chunks/ColumnDropIndicator.es.js +21 -18
- package/dist/chunks/ColumnDropIndicator.styled.es.js +14 -13
- package/dist/chunks/ColumnHeaderMenuUI.es.js +9 -7
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +12 -11
- package/dist/chunks/EmptyPlaceholder.es.js +9 -8
- package/dist/chunks/EntityPath.es.js +15 -14
- package/dist/chunks/EntityPickerDialog.es.js +5 -3
- package/dist/chunks/EntityTooltip.es.js +10 -8
- package/dist/chunks/EntityUpdatesContext.es.js +13 -12
- package/dist/chunks/Feed.es.js +12 -11
- package/dist/chunks/FilterErrorActions.es.js +6 -4
- package/dist/chunks/GroupSettingsFallback.es.js +75 -0
- package/dist/chunks/JsonViewer.es.js +3 -2
- package/dist/chunks/Menu.es.js +105 -103
- package/dist/chunks/MetaWidget.es.js +278 -275
- package/dist/chunks/PlayableIcon.es.js +868 -862
- package/dist/chunks/ProjectContext.es.js +5 -4
- package/dist/chunks/RepresentationsList.es.js +3 -2
- package/dist/chunks/ReviewablesSelector.es.js +3471 -2067
- package/dist/chunks/SimpleTable.es.js +492 -402
- package/dist/chunks/Slicer.es.js +936 -896
- package/dist/chunks/TableExportContextInstance.es.js +437 -339
- package/dist/chunks/TableSettingsFallback.es.js +5 -3
- package/dist/chunks/ThumbnailSimple.es.js +15 -13
- package/dist/chunks/VideoPlayer.es.js +14 -12
- package/dist/chunks/Watchers.es.js +97 -95
- package/dist/chunks/getProjectDisplayName.es.js +4 -0
- package/dist/chunks/getUris.es.js +375 -374
- package/dist/chunks/useHierarchySelection.es.js +5 -3
- package/dist/chunks/useLoadModule.es.js +10 -8
- package/dist/chunks/viewUpdateHelper.es.js +12 -10
- package/dist/components.es.js +1488 -1186
- package/dist/context.es.js +589 -539
- package/dist/hooks.es.js +169 -212
- package/dist/index.es.js +17 -12
- package/dist/types/Actions.d.ts +3 -0
- package/dist/types/ContextMenu.d.ts +3 -0
- package/dist/types/DetailsPanel.d.ts +3 -0
- package/dist/types/EntityPickerDialog.d.ts +3 -0
- package/dist/types/Feed.d.ts +3 -0
- package/dist/types/ListTable.d.ts +3 -0
- package/dist/types/NewEntity.d.ts +3 -0
- package/dist/types/ProjectTreeTable.d.ts +735 -1
- package/dist/types/ProjectsTable.d.ts +228 -0
- package/dist/types/RepresentationsList.d.ts +3 -0
- package/dist/types/SimpleTable.d.ts +17 -0
- package/dist/types/Slicer.d.ts +4 -0
- package/dist/types/Views.d.ts +3 -0
- package/dist/types/api.d.ts +3 -0
- package/dist/types/components.d.ts +808 -11
- package/dist/types/context.d.ts +39 -1
- package/dist/types/hooks.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/util.d.ts +7 -0
- package/dist/util.es.js +152 -144
- package/package.json +16 -8
- /package/dist/{ContextMenuContextInstance.css → style.css} +0 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
import { ExpandedState } from '@tanstack/react-table';
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
import { RefObject } from 'react';
|
|
6
|
+
import { Row } from '@tanstack/react-table';
|
|
7
|
+
import { RowPinningState } from '@tanstack/react-table';
|
|
8
|
+
import { RowSelectionState } from '@tanstack/react-table';
|
|
9
|
+
import { SetStateAction } from 'react';
|
|
10
|
+
|
|
11
|
+
export declare const buildProjectFolderRowId: (folderId: string) => string;
|
|
12
|
+
|
|
13
|
+
export declare const buildProjectsTableData: (projects?: ListProjectsItemModel[], folders?: ProjectFolderModel[], showEmptyFolders?: boolean, powerLicense?: boolean) => SimpleTableRow[];
|
|
14
|
+
|
|
15
|
+
declare type ButtonType = 'delete' | 'add' | 'filter' | 'search' | 'select-all';
|
|
16
|
+
|
|
17
|
+
declare interface CommandEvent {
|
|
18
|
+
originalEvent: default_2.MouseEvent;
|
|
19
|
+
item: {
|
|
20
|
+
label: string;
|
|
21
|
+
command: (event: CommandEvent) => void;
|
|
22
|
+
shortcut?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare interface ContextMenuItemProps {
|
|
27
|
+
icon?: string;
|
|
28
|
+
iconFilled?: boolean;
|
|
29
|
+
label?: string;
|
|
30
|
+
shortcut?: string;
|
|
31
|
+
command?: (event: CommandEvent) => void;
|
|
32
|
+
children?: default_2.ReactNode;
|
|
33
|
+
contextMenuRef: RefObject<{
|
|
34
|
+
hide: () => void;
|
|
35
|
+
}>;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
hidden?: boolean;
|
|
38
|
+
items?: any[];
|
|
39
|
+
isSave?: boolean;
|
|
40
|
+
danger?: boolean;
|
|
41
|
+
developer?: boolean;
|
|
42
|
+
style?: default_2.CSSProperties;
|
|
43
|
+
powerFeature?: PowerpackFeature;
|
|
44
|
+
powerLicense?: boolean;
|
|
45
|
+
onPowerClick?: (feature: PowerpackFeature) => void;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare interface ContextMenuItemType extends Omit<ContextMenuItemProps, 'contextMenuRef'> {
|
|
50
|
+
items?: ContextMenuItemType[];
|
|
51
|
+
template?: React.ReactNode;
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare type ListProjectsItemModel = {
|
|
56
|
+
name: string;
|
|
57
|
+
code: string;
|
|
58
|
+
label?: string;
|
|
59
|
+
color?: string;
|
|
60
|
+
active?: boolean;
|
|
61
|
+
library?: boolean;
|
|
62
|
+
skeleton?: boolean;
|
|
63
|
+
pinned?: boolean;
|
|
64
|
+
projectFolder?: string;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export declare const parseProjectFolderRowId: (rowId: string) => string | null;
|
|
70
|
+
|
|
71
|
+
declare type PowerpackFeature = 'slicer' | 'annotations' | 'releases' | 'advancedFilters' | 'listAttributes' | 'listFolders' | 'listAccess' | 'groupAttributes' | 'sharedViews' | 'commentCategories' | 'projectFolders' | 'columnSummaries' | 'listValues' | 'entityLinks' | 'tableExport';
|
|
72
|
+
|
|
73
|
+
export declare const PROJECT_FOLDER_ROW_ID_PREFIX = "folder";
|
|
74
|
+
|
|
75
|
+
declare type ProjectFolderData = {
|
|
76
|
+
/** Hex color code */
|
|
77
|
+
color?: string;
|
|
78
|
+
/** Icon name */
|
|
79
|
+
icon?: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
declare type ProjectFolderModel = {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
parentId?: string;
|
|
86
|
+
position?: number;
|
|
87
|
+
isEmpty?: boolean;
|
|
88
|
+
data?: ProjectFolderData;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export declare const PROJECTS_LIST_MENU_ID = "projects-list-menu";
|
|
92
|
+
|
|
93
|
+
export declare const ProjectsTable: FC<ProjectsTableProps>;
|
|
94
|
+
|
|
95
|
+
export declare interface ProjectsTableProps {
|
|
96
|
+
data: SimpleTableRow[];
|
|
97
|
+
isLoading?: boolean;
|
|
98
|
+
error?: string | undefined;
|
|
99
|
+
search?: string | undefined;
|
|
100
|
+
onSearch?: (search: string | undefined) => void;
|
|
101
|
+
rowSelection?: RowSelectionState;
|
|
102
|
+
onRowSelectionChange?: (newSelection: RowSelectionState) => void;
|
|
103
|
+
rowPinning: string[];
|
|
104
|
+
onRowPinningChange?: (pinning: RowPinningState) => void;
|
|
105
|
+
expanded: ExpandedState;
|
|
106
|
+
setExpanded: Dispatch<SetStateAction<ExpandedState>>;
|
|
107
|
+
multiSelect?: boolean;
|
|
108
|
+
readonly?: boolean;
|
|
109
|
+
buildMenuItems?: (selection: string[], options?: any) => any[];
|
|
110
|
+
rowContextMenuBuilders?: SimpleTableRowContextMenuBuilder[];
|
|
111
|
+
selection: string[];
|
|
112
|
+
onSelect?: (ids: string[]) => void;
|
|
113
|
+
onOpenProject?: (projectName: string) => void;
|
|
114
|
+
onSettingsClick?: (projectId: string) => void;
|
|
115
|
+
title?: string;
|
|
116
|
+
showAddProject?: boolean;
|
|
117
|
+
onNewProject?: () => void;
|
|
118
|
+
toggleMenu?: (open?: boolean) => void;
|
|
119
|
+
onSelectAll?: () => void;
|
|
120
|
+
hiddenButtons?: ButtonType[];
|
|
121
|
+
renamingFolder?: string | null;
|
|
122
|
+
onSubmitRenameFolder?: (value: string) => void;
|
|
123
|
+
closeRenameFolder?: () => void;
|
|
124
|
+
renamingProject?: string | null;
|
|
125
|
+
onSubmitRenameProject?: (value: string) => void;
|
|
126
|
+
closeRenameProject?: () => void;
|
|
127
|
+
onRenameFolder?: (folderId: string) => void;
|
|
128
|
+
onRenameProject?: (projectName: string) => void;
|
|
129
|
+
containerClassName?: string;
|
|
130
|
+
enableClickToDeselect?: boolean;
|
|
131
|
+
pt?: {
|
|
132
|
+
container?: React.HTMLAttributes<HTMLDivElement>;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare type RowItemData = {
|
|
137
|
+
id: string;
|
|
138
|
+
name?: string | null;
|
|
139
|
+
label?: string | null;
|
|
140
|
+
subType?: string | null;
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
declare type SimpleTableRow = {
|
|
145
|
+
id: string;
|
|
146
|
+
parentId?: string;
|
|
147
|
+
name: string;
|
|
148
|
+
label: string;
|
|
149
|
+
parents?: string[];
|
|
150
|
+
icon?: string | null;
|
|
151
|
+
iconColor?: string;
|
|
152
|
+
iconFilled?: boolean;
|
|
153
|
+
img?: string | null;
|
|
154
|
+
imgShape?: 'square' | 'circle';
|
|
155
|
+
startContent?: JSX.Element;
|
|
156
|
+
endContent?: JSX.Element;
|
|
157
|
+
subRows: SimpleTableRow[];
|
|
158
|
+
data: RowItemData;
|
|
159
|
+
isDisabled?: boolean;
|
|
160
|
+
disabledMessage?: string;
|
|
161
|
+
inactive?: boolean;
|
|
162
|
+
badge?: string | React.ReactNode;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
declare type SimpleTableRowContextMenuBuilder = (e: React.MouseEvent<HTMLTableRowElement>, context: SimpleTableRowContextMenuContext) => ContextMenuItemType | ContextMenuItemType[] | undefined;
|
|
166
|
+
|
|
167
|
+
declare type SimpleTableRowContextMenuContext = {
|
|
168
|
+
rowId: string;
|
|
169
|
+
rowIndex: number;
|
|
170
|
+
row: Row<SimpleTableRow>;
|
|
171
|
+
selectedRows: string[];
|
|
172
|
+
selectedTableRows: Row<SimpleTableRow>[];
|
|
173
|
+
isSelected: boolean;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export { }
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
declare module '@tanstack/react-table' {
|
|
180
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
181
|
+
addonColumn?: AddonColumnMeta;
|
|
182
|
+
}
|
|
183
|
+
interface TableMeta<TData extends RowData> {
|
|
184
|
+
options?: BuiltInFieldOptions;
|
|
185
|
+
readOnly?: ProjectTreeTableProps['readOnly'];
|
|
186
|
+
projectName?: string;
|
|
187
|
+
updateEntities?: CellUpdate;
|
|
188
|
+
toggleExpandAll?: ToggleExpandAll;
|
|
189
|
+
selection?: string[];
|
|
190
|
+
columnsConfig?: ColumnsConfig;
|
|
191
|
+
loadingLinksEntityIds?: Set<string>;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
declare module '@tanstack/react-table' {
|
|
197
|
+
interface FilterFns {
|
|
198
|
+
fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
|
|
199
|
+
}
|
|
200
|
+
interface FilterMeta {
|
|
201
|
+
itemRank: RankingInfo;
|
|
202
|
+
}
|
|
203
|
+
interface TableMeta<TData extends RowData> {
|
|
204
|
+
isExpandable?: boolean;
|
|
205
|
+
isLoading?: boolean;
|
|
206
|
+
children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
|
|
207
|
+
[key: string]: any;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
declare global {
|
|
213
|
+
interface Window {
|
|
214
|
+
senderId: string;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
declare module '@tanstack/react-table' {
|
|
220
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
221
|
+
listTableCustomCell?: boolean;
|
|
222
|
+
editable?: boolean;
|
|
223
|
+
}
|
|
224
|
+
interface TableMeta<TData extends RowData> {
|
|
225
|
+
updateData: (columnId: string, value: unknown, rowId: string) => void;
|
|
226
|
+
openViewerDialog?: (row: TData) => void;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
@@ -145,6 +145,9 @@ export { }
|
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
declare module '@tanstack/react-table' {
|
|
148
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
149
|
+
addonColumn?: AddonColumnMeta;
|
|
150
|
+
}
|
|
148
151
|
interface TableMeta<TData extends RowData> {
|
|
149
152
|
options?: BuiltInFieldOptions;
|
|
150
153
|
readOnly?: ProjectTreeTableProps['readOnly'];
|
|
@@ -80,6 +80,9 @@ export declare const HeaderButton: IStyledComponentBase<"web", FastOmit<Omit< Bu
|
|
|
80
80
|
|
|
81
81
|
declare type PowerpackFeature = 'slicer' | 'annotations' | 'releases' | 'advancedFilters' | 'listAttributes' | 'listFolders' | 'listAccess' | 'groupAttributes' | 'sharedViews' | 'commentCategories' | 'projectFolders' | 'columnSummaries' | 'listValues' | 'entityLinks' | 'tableExport';
|
|
82
82
|
|
|
83
|
+
/** The project pages with a project table (ProjectTreeTable). */
|
|
84
|
+
declare type ProjectTablePage = 'overview' | 'products' | 'lists'
|
|
85
|
+
|
|
83
86
|
export declare const RowExpander: ({ isRowExpandable, isRowExpanded, enableNonFolderIndent, isTableExpandable, onExpandClick, }: RowExpanderProps) => false | JSX_2.Element | undefined;
|
|
84
87
|
|
|
85
88
|
export declare type RowExpanderProps = {
|
|
@@ -98,6 +101,13 @@ export declare type RowItemData = {
|
|
|
98
101
|
[key: string]: any;
|
|
99
102
|
};
|
|
100
103
|
|
|
104
|
+
/**
|
|
105
|
+
* A table with addon shortcuts: the project tables (`overview`, `products`, `lists`) and the
|
|
106
|
+
* panels' tables: the slicer, the project list, the Lists page's lists and the Products page's
|
|
107
|
+
* versions.
|
|
108
|
+
*/
|
|
109
|
+
declare type ShortcutTable = ProjectTablePage | 'slicer' | 'projects' | 'listsPanel' | 'versionsPanel'
|
|
110
|
+
|
|
101
111
|
declare const SimpleTable: FC<SimpleTableProps>;
|
|
102
112
|
export default SimpleTable;
|
|
103
113
|
|
|
@@ -181,6 +191,10 @@ export declare interface SimpleTableProps extends Omit<React.HTMLAttributes<HTML
|
|
|
181
191
|
fitContent?: boolean;
|
|
182
192
|
rowIdPrefix?: string;
|
|
183
193
|
rowContextMenuBuilders?: SimpleTableRowContextMenuBuilder[];
|
|
194
|
+
addonShortcuts?: {
|
|
195
|
+
table: ShortcutTable;
|
|
196
|
+
projectName: string | null;
|
|
197
|
+
};
|
|
184
198
|
children?: (props: SimpleTableCellTemplateProps, row: Row<SimpleTableRow>, table: Table<SimpleTableRow>) => JSX.Element;
|
|
185
199
|
pt?: {
|
|
186
200
|
cell?: Partial<SimpleTableCellTemplateProps>;
|
|
@@ -247,6 +261,9 @@ export { }
|
|
|
247
261
|
|
|
248
262
|
|
|
249
263
|
declare module '@tanstack/react-table' {
|
|
264
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
265
|
+
addonColumn?: AddonColumnMeta;
|
|
266
|
+
}
|
|
250
267
|
interface TableMeta<TData extends RowData> {
|
|
251
268
|
options?: BuiltInFieldOptions;
|
|
252
269
|
readOnly?: ProjectTreeTableProps['readOnly'];
|
package/dist/types/Slicer.d.ts
CHANGED
|
@@ -821,6 +821,7 @@ declare interface UseFiltersWithHierarchyProps {
|
|
|
821
821
|
|
|
822
822
|
export declare const useHierarchyContextMenuItems: (onAddToList?: OnAddToList, entityMap?: SliceMap, onOpenViewer?: OnOpenViewer, openMoveDialog?: OpenMoveDialog) => {
|
|
823
823
|
rowContextMenuBuilders: SimpleTableRowContextMenuBuilder[];
|
|
824
|
+
deleteContextMenuBuilder: SimpleTableRowContextMenuBuilder;
|
|
824
825
|
onOptionClick: (row: SimpleTableRow, selectedRows?: string[]) => void;
|
|
825
826
|
onRename: (row: SimpleTableRow) => void;
|
|
826
827
|
renamingRow: SimpleTableRow | null;
|
|
@@ -957,6 +958,9 @@ export { }
|
|
|
957
958
|
|
|
958
959
|
|
|
959
960
|
declare module '@tanstack/react-table' {
|
|
961
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
962
|
+
addonColumn?: AddonColumnMeta;
|
|
963
|
+
}
|
|
960
964
|
interface TableMeta<TData extends RowData> {
|
|
961
965
|
options?: BuiltInFieldOptions;
|
|
962
966
|
readOnly?: ProjectTreeTableProps['readOnly'];
|
package/dist/types/Views.d.ts
CHANGED
|
@@ -984,6 +984,9 @@ export { }
|
|
|
984
984
|
|
|
985
985
|
|
|
986
986
|
declare module '@tanstack/react-table' {
|
|
987
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
988
|
+
addonColumn?: AddonColumnMeta;
|
|
989
|
+
}
|
|
987
990
|
interface TableMeta<TData extends RowData> {
|
|
988
991
|
options?: BuiltInFieldOptions;
|
|
989
992
|
readOnly?: ProjectTreeTableProps['readOnly'];
|
package/dist/types/api.d.ts
CHANGED
|
@@ -75130,6 +75130,9 @@ export { }
|
|
|
75130
75130
|
|
|
75131
75131
|
|
|
75132
75132
|
declare module '@tanstack/react-table' {
|
|
75133
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
75134
|
+
addonColumn?: AddonColumnMeta;
|
|
75135
|
+
}
|
|
75133
75136
|
interface TableMeta<TData extends RowData> {
|
|
75134
75137
|
options?: BuiltInFieldOptions;
|
|
75135
75138
|
readOnly?: ProjectTreeTableProps['readOnly'];
|