@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.
- package/dist/ContextMenu.es.js +44 -27
- package/dist/DetailsPanel.es.js +225 -224
- package/dist/Feed.es.js +64 -58
- package/dist/ListTable.es.js +423 -423
- package/dist/NewEntity.es.js +44 -43
- package/dist/ProjectTreeTable.es.js +3517 -3378
- package/dist/Slicer.es.js +301 -276
- package/dist/Views.es.js +366 -352
- package/dist/api.es.js +428 -413
- package/dist/chunks/Actions.es.js +18 -17
- package/dist/chunks/ColumnDropIndicator.es.js +21 -20
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
- package/dist/chunks/DetailsDialog.es.js +26 -24
- package/dist/chunks/EmptyPlaceholder.es.js +3 -3
- package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
- package/dist/chunks/EntityPath.es.js +60 -59
- package/dist/chunks/EntityPickerDialog.es.js +88 -83
- package/dist/chunks/EntityTooltip.es.js +15 -14
- package/dist/chunks/EntityUpdatesContext.es.js +11 -11
- package/dist/chunks/Feed.es.js +1072 -1088
- package/dist/chunks/FilterErrorActions.es.js +4 -3
- package/dist/chunks/Menu.es.js +633 -289
- package/dist/chunks/MenuContext.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +2449 -2199
- package/dist/chunks/PlayableIcon.es.js +128 -88
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +627 -611
- package/dist/chunks/SimpleForm.es.js +11 -10
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +956 -823
- package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
- package/dist/chunks/TableSettingsFallback.es.js +4 -3
- package/dist/chunks/ThumbnailSimple.es.js +100 -99
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +224 -223
- package/dist/chunks/getBundleMode.es.js +33 -25
- package/dist/chunks/getEntityTypeIcon.es.js +5 -4
- package/dist/chunks/getUris.es.js +3873 -3736
- package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
- package/dist/chunks/searchTerms.es.js +621 -499
- package/dist/chunks/sortLists.es.js +22 -0
- package/dist/chunks/useAttributeEnums.es.js +43 -43
- package/dist/chunks/useDateRangeFilter.es.js +85 -59
- package/dist/chunks/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +41 -40
- package/dist/components.es.js +963 -891
- package/dist/context.es.js +528 -501
- package/dist/hooks.es.js +15 -15
- package/dist/index.es.js +6 -6
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +55 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +128 -15
- package/dist/types/SimpleTable.d.ts +2 -1
- package/dist/types/Slicer.d.ts +26 -1
- package/dist/types/Views.d.ts +2 -0
- package/dist/types/api.d.ts +2359 -590
- package/dist/types/components.d.ts +542 -4
- package/dist/types/context.d.ts +94 -2
- package/dist/types/util.d.ts +58 -0
- package/dist/util.es.js +141 -129
- package/package.json +2 -2
- package/dist/chunks/MenuItem.es.js +0 -420
package/dist/types/context.d.ts
CHANGED
|
@@ -983,7 +983,7 @@ export declare type PowerpackDialogType = {
|
|
|
983
983
|
icon?: string;
|
|
984
984
|
};
|
|
985
985
|
|
|
986
|
-
export declare type PowerpackFeature = 'slicer' | 'annotations' | 'releases' | 'advancedFilters' | 'listAttributes' | 'listFolders' | 'listAccess' | 'groupAttributes' | 'sharedViews' | 'commentCategories' | 'projectFolders' | 'columnSummaries' | 'entityLinks';
|
|
986
|
+
export declare type PowerpackFeature = 'slicer' | 'annotations' | 'releases' | 'advancedFilters' | 'listAttributes' | 'listFolders' | 'listAccess' | 'groupAttributes' | 'sharedViews' | 'commentCategories' | 'projectFolders' | 'columnSummaries' | 'listValues' | 'entityLinks' | 'tableExport';
|
|
987
987
|
|
|
988
988
|
export declare const powerpackFeatureOrder: PowerpackFeature[];
|
|
989
989
|
|
|
@@ -1646,7 +1646,7 @@ declare interface SubtasksManagerProps extends Omit<React.HTMLAttributes<HTMLDiv
|
|
|
1646
1646
|
export declare const SubtasksModulesContext: Context<SubtasksModulesContextType | undefined>;
|
|
1647
1647
|
|
|
1648
1648
|
export declare interface SubtasksModulesContextType {
|
|
1649
|
-
SubtasksManager
|
|
1649
|
+
SubtasksManager?: typeof SubtasksManagerFallback;
|
|
1650
1650
|
requiredVersion: string | undefined;
|
|
1651
1651
|
isLoading: boolean;
|
|
1652
1652
|
}
|
|
@@ -1655,6 +1655,96 @@ export declare const SubtasksModulesProvider: FC<{
|
|
|
1655
1655
|
children: ReactNode;
|
|
1656
1656
|
}>;
|
|
1657
1657
|
|
|
1658
|
+
export declare const TABLE_EXPORT_SEARCH_PARAM = "tableExport";
|
|
1659
|
+
|
|
1660
|
+
export declare type TableExportContent = TableExportRows & {
|
|
1661
|
+
columns: string[];
|
|
1662
|
+
columnLabels: Record<string, string>;
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
export declare const TableExportContext: Context<TableExportContextType | null>;
|
|
1666
|
+
|
|
1667
|
+
export declare type TableExportContextType = {
|
|
1668
|
+
source: TableExportSource | null;
|
|
1669
|
+
isAvailable: boolean;
|
|
1670
|
+
openExport: (scope: TableExportScope) => void;
|
|
1671
|
+
registerSource: (source: TableExportSource) => () => void;
|
|
1672
|
+
};
|
|
1673
|
+
|
|
1674
|
+
export declare type TableExportListQuery = {
|
|
1675
|
+
id: string;
|
|
1676
|
+
itemIds?: string[];
|
|
1677
|
+
filter?: string;
|
|
1678
|
+
search?: string;
|
|
1679
|
+
sortBy?: string[];
|
|
1680
|
+
};
|
|
1681
|
+
|
|
1682
|
+
export declare type TableExportOptions = {
|
|
1683
|
+
includeImportColumns: boolean;
|
|
1684
|
+
selectionColumns: 'selected' | 'visible';
|
|
1685
|
+
};
|
|
1686
|
+
|
|
1687
|
+
export declare type TableExportProductsQuery = {
|
|
1688
|
+
ids?: string[];
|
|
1689
|
+
folderIds?: string[];
|
|
1690
|
+
includeFolderChildren?: boolean;
|
|
1691
|
+
filter?: string;
|
|
1692
|
+
folderFilter?: string;
|
|
1693
|
+
versionFilter?: string;
|
|
1694
|
+
taskFilter?: string;
|
|
1695
|
+
representationFilter?: string;
|
|
1696
|
+
sortBy?: string[];
|
|
1697
|
+
featuredVersionOrder?: string[];
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
export declare const TableExportProvider: ({ children }: {
|
|
1701
|
+
children: ReactNode;
|
|
1702
|
+
}) => JSX_2.Element;
|
|
1703
|
+
|
|
1704
|
+
export declare type TableExportRows = {
|
|
1705
|
+
folderIds?: string[];
|
|
1706
|
+
tasks?: TableExportTasksQuery;
|
|
1707
|
+
products?: TableExportProductsQuery;
|
|
1708
|
+
versions?: TableExportVersionsQuery;
|
|
1709
|
+
entityList?: TableExportListQuery;
|
|
1710
|
+
};
|
|
1711
|
+
|
|
1712
|
+
export declare type TableExportScope = 'table' | 'selection';
|
|
1713
|
+
|
|
1714
|
+
export declare type TableExportSource = {
|
|
1715
|
+
projectName: string;
|
|
1716
|
+
canImport: boolean;
|
|
1717
|
+
selectedRowsCount: number;
|
|
1718
|
+
getContent: (scope: TableExportScope, options: TableExportOptions) => TableExportContent;
|
|
1719
|
+
getSkippedColumns: (scope: TableExportScope, options: TableExportOptions) => string[];
|
|
1720
|
+
};
|
|
1721
|
+
|
|
1722
|
+
export declare type TableExportTasksQuery = {
|
|
1723
|
+
ids?: string[];
|
|
1724
|
+
folderIds?: string[];
|
|
1725
|
+
includeFolderChildren?: boolean;
|
|
1726
|
+
filter?: string;
|
|
1727
|
+
folderFilter?: string;
|
|
1728
|
+
search?: string;
|
|
1729
|
+
sortBy?: string[];
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
export declare type TableExportVersionsQuery = {
|
|
1733
|
+
ids?: string[];
|
|
1734
|
+
productIds?: string[];
|
|
1735
|
+
folderIds?: string[];
|
|
1736
|
+
includeFolderChildren?: boolean;
|
|
1737
|
+
filter?: string;
|
|
1738
|
+
folderFilter?: string;
|
|
1739
|
+
productFilter?: string;
|
|
1740
|
+
taskFilter?: string;
|
|
1741
|
+
representationFilter?: string;
|
|
1742
|
+
featuredOnly?: string[];
|
|
1743
|
+
latestPerFolder?: boolean;
|
|
1744
|
+
hasReviewables?: boolean;
|
|
1745
|
+
sortBy?: string[];
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1658
1748
|
export declare const TABS_BY_SCOPE_KEY = "details/tabs-by-scope";
|
|
1659
1749
|
|
|
1660
1750
|
export declare interface TabStateByScope {
|
|
@@ -1988,6 +2078,8 @@ declare type UseSyncUpdatesParams = {
|
|
|
1988
2078
|
shouldSyncOnUpdate?: (update: RTEntityUpdate) => boolean;
|
|
1989
2079
|
};
|
|
1990
2080
|
|
|
2081
|
+
export declare const useTableExportContext: () => TableExportContextType | null;
|
|
2082
|
+
|
|
1991
2083
|
export declare const useThumbnailUploadContext: () => {
|
|
1992
2084
|
resetFileUploadState?: Function;
|
|
1993
2085
|
triggerThumbnailUpload?: () => void;
|
package/dist/types/util.d.ts
CHANGED
|
@@ -302,6 +302,8 @@ export declare interface ConfirmDeleteOptions extends Omit<ConfirmDialogOptions,
|
|
|
302
302
|
|
|
303
303
|
export { ConfirmDialog }
|
|
304
304
|
|
|
305
|
+
export declare const consumeUriHandoff: () => string;
|
|
306
|
+
|
|
305
307
|
/**
|
|
306
308
|
* Converts ColumnItemModel array from OverviewSettings to TanStack table states
|
|
307
309
|
*/
|
|
@@ -350,6 +352,8 @@ declare type CustomTemplate = {
|
|
|
350
352
|
|
|
351
353
|
declare type DataType = 'string' | 'list_of_strings' | string;
|
|
352
354
|
|
|
355
|
+
export declare const DEFAULT_LISTS_SORT: ListsSort;
|
|
356
|
+
|
|
353
357
|
declare type DefaultProductBaseType = {
|
|
354
358
|
color?: string;
|
|
355
359
|
icon?: string;
|
|
@@ -429,10 +433,15 @@ declare type EnumItem_2 = {
|
|
|
429
433
|
/** Icon name (material symbol) or IconModel object */
|
|
430
434
|
icon?: string | IconModel_2;
|
|
431
435
|
color?: string;
|
|
436
|
+
shortName?: string;
|
|
432
437
|
/** Enum item is visible, but not selectable */
|
|
433
438
|
disabled?: boolean;
|
|
434
439
|
/** Message to show when the option is disabled */
|
|
435
440
|
disabledMessage?: string;
|
|
441
|
+
/** Enum item is not visible in the dropdown */
|
|
442
|
+
hidden?: boolean;
|
|
443
|
+
/** Extra badge labels to display next to the item */
|
|
444
|
+
badges?: string[];
|
|
436
445
|
};
|
|
437
446
|
|
|
438
447
|
declare type EnumItem_3 = {
|
|
@@ -490,6 +499,8 @@ export declare const extractEntityHierarchyFromParents: (parents: string[], enti
|
|
|
490
499
|
*/
|
|
491
500
|
export declare function extractVersionFromFilename(filename: string): number | null;
|
|
492
501
|
|
|
502
|
+
export declare const filterBySearchQuery: <T>(items: T[], query: string, toHaystack: (item: T) => string) => T[];
|
|
503
|
+
|
|
493
504
|
/**
|
|
494
505
|
* Result of building a folder hierarchy
|
|
495
506
|
*/
|
|
@@ -575,6 +586,12 @@ export declare const getEnumItemIcon: (icon: EnumItem_4["icon"]) => string | und
|
|
|
575
586
|
*/
|
|
576
587
|
export declare const getErrorMessage: (error: unknown, prefix: string) => string;
|
|
577
588
|
|
|
589
|
+
/**
|
|
590
|
+
* The `sortBy` of `buildSortArgs` for a query read forwards (`first`/`after`), where every
|
|
591
|
+
* key carries its own direction.
|
|
592
|
+
*/
|
|
593
|
+
export declare const getForwardSortBy: ({ sortBy, desc }: SortArgs) => string[] | undefined;
|
|
594
|
+
|
|
578
595
|
/**
|
|
579
596
|
* Determines the data type for a groupBy field.
|
|
580
597
|
* Handles special cases for built-in group types (assignees, tags) and attribute-based grouping.
|
|
@@ -591,6 +608,11 @@ export declare const getErrorMessage: (error: unknown, prefix: string) => string
|
|
|
591
608
|
*/
|
|
592
609
|
export declare const getGroupByDataType: (groupBy: TableGroupBy | undefined, attribFields: (ProjectTableAttribute | AttributeModel)[]) => DataType;
|
|
593
610
|
|
|
611
|
+
export declare const getListIcon: (list: {
|
|
612
|
+
entityListType: string;
|
|
613
|
+
entityType: string;
|
|
614
|
+
}) => string;
|
|
615
|
+
|
|
594
616
|
export declare const getMixedState: (values: any[]) => {
|
|
595
617
|
value: any;
|
|
596
618
|
isMixed: boolean;
|
|
@@ -767,6 +789,8 @@ export declare enum KeyMode {
|
|
|
767
789
|
Shift = "shift"
|
|
768
790
|
}
|
|
769
791
|
|
|
792
|
+
export declare const labelCollator: Intl.Collator;
|
|
793
|
+
|
|
770
794
|
declare type LinkType = {
|
|
771
795
|
link_type: string;
|
|
772
796
|
input_type: 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile';
|
|
@@ -775,6 +799,19 @@ declare type LinkType = {
|
|
|
775
799
|
style?: 'solid' | 'dashed';
|
|
776
800
|
};
|
|
777
801
|
|
|
802
|
+
export declare const LISTS_SORT_OPTIONS: {
|
|
803
|
+
id: ListsSortBy;
|
|
804
|
+
label: string;
|
|
805
|
+
desc: boolean;
|
|
806
|
+
}[];
|
|
807
|
+
|
|
808
|
+
export declare interface ListsSort {
|
|
809
|
+
by: ListsSortBy;
|
|
810
|
+
desc: boolean;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export declare type ListsSortBy = 'createdAt' | 'updatedAt' | 'label';
|
|
814
|
+
|
|
778
815
|
declare type MainCalc = 'count' | 'breakdown';
|
|
779
816
|
|
|
780
817
|
export declare const matchSearchQuery: (haystack: string, groups: string[][]) => RankingInfo;
|
|
@@ -951,6 +988,8 @@ export declare type RealtimeBatchProcessor<T> = (items: T[], isActive: () => boo
|
|
|
951
988
|
|
|
952
989
|
export declare const replaceRoot: (input?: string | null, roots?: Record<string, string | undefined>) => string | undefined;
|
|
953
990
|
|
|
991
|
+
export declare const resolveListsSort: (sort: unknown) => ListsSort;
|
|
992
|
+
|
|
954
993
|
/**
|
|
955
994
|
* Convert RGB components to hex color string
|
|
956
995
|
*/
|
|
@@ -980,6 +1019,14 @@ export declare const sanitizeProductName: (name: string) => string;
|
|
|
980
1019
|
|
|
981
1020
|
declare type ScopeEntityType = 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile' | 'project' | 'user';
|
|
982
1021
|
|
|
1022
|
+
export declare const searchQueryToFilter: <C>(query: string, toCondition: (term: string) => C) => {
|
|
1023
|
+
operator: "or";
|
|
1024
|
+
conditions: {
|
|
1025
|
+
operator: "and";
|
|
1026
|
+
conditions: C[];
|
|
1027
|
+
}[];
|
|
1028
|
+
} | null;
|
|
1029
|
+
|
|
983
1030
|
/**
|
|
984
1031
|
* Writes the sorting of a view, see `parseViewSorting` for the format.
|
|
985
1032
|
* No sorting is `undefined` so the view falls back to its default order.
|
|
@@ -1024,6 +1071,13 @@ declare type SimpleTableRow = {
|
|
|
1024
1071
|
badge?: string | React.ReactNode;
|
|
1025
1072
|
};
|
|
1026
1073
|
|
|
1074
|
+
declare interface SortableList {
|
|
1075
|
+
label: string;
|
|
1076
|
+
active: boolean;
|
|
1077
|
+
createdAt?: unknown;
|
|
1078
|
+
updatedAt?: unknown;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1027
1081
|
export declare type SortArgs = {
|
|
1028
1082
|
sortBy: string | string[] | undefined;
|
|
1029
1083
|
desc: boolean;
|
|
@@ -1036,6 +1090,8 @@ export declare type SortKey = {
|
|
|
1036
1090
|
|
|
1037
1091
|
export declare const sortKeysDeep: (value: unknown) => unknown;
|
|
1038
1092
|
|
|
1093
|
+
export declare const sortLists: <T extends SortableList>(lists: T[], { by, desc }?: ListsSort) => T[];
|
|
1094
|
+
|
|
1039
1095
|
declare type StagingDirectory = {
|
|
1040
1096
|
name: string;
|
|
1041
1097
|
directory?: string;
|
|
@@ -1122,6 +1178,8 @@ export declare type ThumbnailUpdater = (messages: ThumbnailUpdateMessage[]) => v
|
|
|
1122
1178
|
|
|
1123
1179
|
export declare const toDropdownErrorText: (text?: string) => string | undefined;
|
|
1124
1180
|
|
|
1181
|
+
export declare const URL_PARAM_ID = "uri";
|
|
1182
|
+
|
|
1125
1183
|
export declare const useActiveEntities: () => ActiveEntity[];
|
|
1126
1184
|
|
|
1127
1185
|
declare type UserAttribModel = {
|
package/dist/util.es.js
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import { K as
|
|
1
|
+
import { K as x, g as I, a as A } from "./chunks/platform.es.js";
|
|
2
2
|
import { c as d } from "./chunks/confirmDelete.es.js";
|
|
3
|
-
import { a as
|
|
4
|
-
import { e as
|
|
5
|
-
import { g as
|
|
6
|
-
import { A as
|
|
7
|
-
import { c as
|
|
8
|
-
import { g as
|
|
9
|
-
import { c as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { M as
|
|
13
|
-
import { e as
|
|
14
|
-
import { c as
|
|
15
|
-
import { c as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { b as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
3
|
+
import { a as P } from "./chunks/confirmDelete.es.js";
|
|
4
|
+
import { e as L, g as F, a as C } from "./chunks/getEntityTypeIcon.es.js";
|
|
5
|
+
import { g as M, r as U } from "./chunks/replaceRoot.es.js";
|
|
6
|
+
import { A as w, c as N, e as O, g as H, a as B, s as V, u as k, b as K } from "./chunks/activeEntities.es.js";
|
|
7
|
+
import { c as Q } from "./chunks/copyToClipboard.es.js";
|
|
8
|
+
import { g as Y, h as q } from "./chunks/humanizeFieldName.es.js";
|
|
9
|
+
import { c as W, a as X, g as $, b as j, d as Z, p as ee, e as ae } from "./chunks/iconUtils.es.js";
|
|
10
|
+
import { bu as g } from "./chunks/searchTerms.es.js";
|
|
11
|
+
import { bv as re, bp as se, bw as oe, bx as ie, br as ne, by as le, bt as ce, bz as me, bA as pe, bB as de, bq as ge, bC as ue, bD as be, bE as Ee, bs as fe, bF as Te, bG as Se, bH as he, bI as ye, bJ as xe } from "./chunks/searchTerms.es.js";
|
|
12
|
+
import { M as Ae, a as Re, b as Pe, d as _e, e as Le, f as Fe, c as Ce, g as De, h as Me, i as Ue, j as ve, p as we, s as Ne, k as Oe, v as He, w as Be } from "./chunks/realtimeUpdatesUtils.es.js";
|
|
13
|
+
import { e as ke } from "./chunks/extractVersionFromFilename.es.js";
|
|
14
|
+
import { c as ze, a as Qe, b as Je, g as Ye, h as qe, s as Ge, v as We, d as Xe, e as $e } from "./chunks/versionUploadHelpers.es.js";
|
|
15
|
+
import { c as Ze, a as ea } from "./chunks/columnConfigConverter.es.js";
|
|
16
|
+
import { D as ta, L as ra, l as sa, r as oa, s as ia } from "./chunks/sortLists.es.js";
|
|
17
|
+
import { p as la } from "./chunks/pluralize.es.js";
|
|
18
|
+
import { b as ma, a as pa, h as da, p as ga, r as ua } from "./chunks/colorUtils.es.js";
|
|
19
|
+
import { g as Ea } from "./chunks/getGroupByDataType.es.js";
|
|
20
|
+
import { U as Ta, b as Sa, c as ha, g as ya, a as xa, d as Ia, p as Aa, u as Ra } from "./chunks/getBundleMode.es.js";
|
|
21
|
+
import { b as _a, s as La } from "./chunks/buildHierarchicalTableRows.es.js";
|
|
22
|
+
import { g as Ca, a as Da } from "./chunks/getThumbnailUrl.es.js";
|
|
23
|
+
import { p as Ua } from "./chunks/parseFilename.es.js";
|
|
24
|
+
import { i as wa } from "./chunks/isHTMLElement.es.js";
|
|
25
|
+
import { S as Oa, a as Ha } from "./chunks/afterStartup.es.js";
|
|
26
|
+
import { ConfirmDialog as Va } from "primereact/confirmdialog";
|
|
26
27
|
const E = (e) => {
|
|
27
|
-
const
|
|
28
|
-
for (const
|
|
29
|
-
|
|
30
|
-
for (const
|
|
31
|
-
const o =
|
|
32
|
-
|
|
28
|
+
const t = /* @__PURE__ */ new Map(), s = [];
|
|
29
|
+
for (const a of e)
|
|
30
|
+
t.set(a.id, { ...a, children: [] });
|
|
31
|
+
for (const a of e) {
|
|
32
|
+
const o = t.get(a.id);
|
|
33
|
+
a.parentId && t.has(a.parentId) ? t.get(a.parentId).children.push(o) : s.push(o);
|
|
33
34
|
}
|
|
34
|
-
return { folderMap:
|
|
35
|
+
return { folderMap: t, rootFolders: s };
|
|
35
36
|
}, f = async ({
|
|
36
37
|
folderIds: e,
|
|
37
|
-
folders:
|
|
38
|
+
folders: t,
|
|
38
39
|
deleteMutation: s,
|
|
39
|
-
onSelect:
|
|
40
|
+
onSelect: a,
|
|
40
41
|
itemTypeName: o,
|
|
41
42
|
messageDetail: l
|
|
42
43
|
}) => {
|
|
43
|
-
const n = Array.isArray(e) ? e : [e], i = n.map((r) =>
|
|
44
|
+
const n = Array.isArray(e) ? e : [e], i = n.map((r) => t?.find((p) => p.id === r)).filter(Boolean), c = i.length === 1 ? i[0]?.label || "Folder" : i.length > 1 ? `${i.length} folders` : "Folder", m = `Only the folder(s) will be deleted. ${o} inside the folder will remain.`;
|
|
44
45
|
d({
|
|
45
46
|
accept: async () => {
|
|
46
47
|
try {
|
|
47
|
-
await Promise.all(n.map((r) => s(r))),
|
|
48
|
+
await Promise.all(n.map((r) => s(r))), a([]);
|
|
48
49
|
} catch (r) {
|
|
49
50
|
throw g(r, "Failed to delete folder(s)");
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
|
-
label:
|
|
53
|
-
message: l ||
|
|
53
|
+
label: c,
|
|
54
|
+
message: l || m
|
|
54
55
|
});
|
|
55
|
-
}, T = (e) => e ? e.label?.trim() || e.name : "",
|
|
56
|
+
}, T = (e) => e ? e.label?.trim() || e.name : "", S = {
|
|
56
57
|
"@@@": {
|
|
57
58
|
id: "task"
|
|
58
59
|
},
|
|
@@ -65,103 +66,114 @@ const E = (e) => {
|
|
|
65
66
|
}
|
|
66
67
|
};
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Pe as
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
w as ACTIVE_ENTITIES_PRIORITY,
|
|
70
|
+
Va as ConfirmDialog,
|
|
71
|
+
ta as DEFAULT_LISTS_SORT,
|
|
72
|
+
re as ENUM_CONTEXT_PARAMS,
|
|
73
|
+
x as KeyMode,
|
|
74
|
+
ra as LISTS_SORT_OPTIONS,
|
|
75
|
+
Ae as MAX_SORT_KEYS,
|
|
76
|
+
se as PubSub,
|
|
77
|
+
Re as REALTIME_REST_CALL_LIMIT,
|
|
78
|
+
Pe as REALTIME_REST_JITTER,
|
|
79
|
+
_e as REALTIME_TASK_SUPPORTED_VALUE_FIELDS,
|
|
80
|
+
Le as REALTIME_UPDATE_DEBOUNCE,
|
|
81
|
+
Oa as STARTUP_DELAY,
|
|
82
|
+
Ta as URL_PARAM_ID,
|
|
83
|
+
Ha as afterStartup,
|
|
84
|
+
ma as blendCategoryColor,
|
|
85
|
+
pa as blendColors,
|
|
86
|
+
Sa as buildEntityUri,
|
|
83
87
|
E as buildFolderHierarchy,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
_a as buildHierarchicalTableRows,
|
|
89
|
+
Fe as buildSortArgs,
|
|
90
|
+
W as checkLabel,
|
|
91
|
+
X as checkName,
|
|
92
|
+
N as clearActiveEntities,
|
|
89
93
|
d as confirmDelete,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
P as confirmDeleteDialog,
|
|
95
|
+
ha as consumeUriHandoff,
|
|
96
|
+
Ze as convertColumnConfigToTanstackStates,
|
|
97
|
+
ea as convertTanstackStatesToColumnConfig,
|
|
98
|
+
Q as copyToClipboard,
|
|
99
|
+
ze as createProductAndVersion,
|
|
100
|
+
Qe as createProductHelper,
|
|
96
101
|
Ce as createRealtimeBatcher,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
102
|
+
Je as createVersionHelper,
|
|
103
|
+
L as entityTypesWithIcons,
|
|
104
|
+
O as extractEntityHierarchyFromParents,
|
|
105
|
+
ke as extractVersionFromFilename,
|
|
106
|
+
oe as filterBySearchQuery,
|
|
107
|
+
H as getActiveEntities,
|
|
108
|
+
$ as getAttributeIcon,
|
|
109
|
+
ya as getBundleModeFromUser,
|
|
110
|
+
I as getCurrentPlatform,
|
|
111
|
+
j as getEntityColor,
|
|
112
|
+
Z as getEntityIcon,
|
|
113
|
+
De as getEntityId,
|
|
114
|
+
xa as getEntityStateFromUri,
|
|
115
|
+
Ca as getEntityThumbnailUrl,
|
|
116
|
+
F as getEntityTypeIcon,
|
|
117
|
+
ie as getEnumContextParams,
|
|
118
|
+
ne as getEnumErrorText,
|
|
119
|
+
le as getEnumItemIcon,
|
|
114
120
|
g as getErrorMessage,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
Me as getForwardSortBy,
|
|
122
|
+
Ea as getGroupByDataType,
|
|
123
|
+
C as getListIcon,
|
|
124
|
+
Y as getMixedState,
|
|
125
|
+
Ye as getNextVersionNumber,
|
|
126
|
+
A as getPlatformShortcutKey,
|
|
127
|
+
Ue as getPrimarySortKey,
|
|
128
|
+
B as getPriorityOptions,
|
|
121
129
|
T as getProjectDisplayName,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
Da as getProjectThumbnailUrl,
|
|
131
|
+
ce as getRequestErrorString,
|
|
132
|
+
me as getSelectableAssignees,
|
|
133
|
+
pe as getSelectableEnumItems,
|
|
134
|
+
Ia as getSettingsStateFromUri,
|
|
135
|
+
ve as getSupportedEntityPatch,
|
|
136
|
+
M as groupResult,
|
|
129
137
|
f as handleDeleteFolders,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
138
|
+
qe as handleUploadError,
|
|
139
|
+
de as hasEnumOptions,
|
|
140
|
+
ge as hasEnumResolver,
|
|
141
|
+
da as hexToRgb,
|
|
134
142
|
q as humanizeField,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
143
|
+
ue as isEnumContextParam,
|
|
144
|
+
be as isEnumIconImage,
|
|
145
|
+
wa as isHTMLElement,
|
|
146
|
+
sa as labelCollator,
|
|
147
|
+
Ee as matchSearchQuery,
|
|
148
|
+
S as mentionTypeOptions,
|
|
149
|
+
fe as normalizeEnumItems,
|
|
150
|
+
ee as parseAndFormatName,
|
|
151
|
+
ga as parseColor,
|
|
152
|
+
Ua as parseFilename,
|
|
153
|
+
ae as parseHtmlToPlainTextWithLinks,
|
|
154
|
+
Te as parseSearchQuery,
|
|
155
|
+
Aa as parseUri,
|
|
156
|
+
we as parseViewSorting,
|
|
157
|
+
Se as pastedListToSearch,
|
|
158
|
+
la as pluralize,
|
|
159
|
+
U as replaceRoot,
|
|
160
|
+
oa as resolveListsSort,
|
|
161
|
+
ua as rgbToHex,
|
|
162
|
+
Ge as sanitizeProductName,
|
|
163
|
+
he as searchQueryToFilter,
|
|
164
|
+
Ne as serializeViewSorting,
|
|
165
|
+
V as setActiveEntities,
|
|
166
|
+
La as shouldBlockShortcuts,
|
|
167
|
+
ye as sortKeysDeep,
|
|
168
|
+
ia as sortLists,
|
|
169
|
+
Oe as subscribeToThumbnailUpdates,
|
|
170
|
+
xe as toDropdownErrorText,
|
|
171
|
+
k as useActiveEntities,
|
|
160
172
|
K as useRegisterActiveEntities,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
173
|
+
Ra as useStagingModeState,
|
|
174
|
+
He as validateEntityId,
|
|
175
|
+
We as validateFormData,
|
|
176
|
+
Xe as validateProductName,
|
|
177
|
+
$e as validateVersion,
|
|
178
|
+
Be as waitForRealtimeJitter
|
|
167
179
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ynput/ayon-frontend-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
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.22.
|
|
140
|
+
"@ynput/ayon-react-components": "^1.22.1",
|
|
141
141
|
"axios": "1.20.0",
|
|
142
142
|
"clsx": "2.1.1",
|
|
143
143
|
"custom-protocol-check": "1.4.0",
|