@ynput/ayon-frontend-shared 0.6.9 → 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/ListTable.es.js +420 -420
- package/dist/NewEntity.es.js +42 -41
- 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 +19 -18
- 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 +864 -859
- 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 +2457 -2196
- package/dist/chunks/PlayableIcon.es.js +77 -76
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +625 -609
- package/dist/chunks/SimpleForm.es.js +1 -1
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +954 -821
- 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 +222 -221
- package/dist/chunks/getBundleMode.es.js +1 -1
- 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/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +16 -15
- package/dist/components.es.js +565 -531
- package/dist/context.es.js +529 -503
- package/dist/hooks.es.js +13 -13
- package/dist/index.es.js +4 -4
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +123 -13
- 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 +30 -4
- package/dist/types/context.d.ts +94 -2
- package/dist/types/util.d.ts +54 -0
- package/dist/util.es.js +129 -119
- package/package.json +2 -2
- package/dist/chunks/MenuItem.es.js +0 -420
|
@@ -352,6 +352,8 @@ export declare type BuildFilterOptions = {
|
|
|
352
352
|
|
|
353
353
|
export declare const buildScopes: (scopes: ScopeType_2[], exclude?: Partial<Record<ScopeType_2, FilterFieldType[]>>) => ScopeWithFilterTypes[];
|
|
354
354
|
|
|
355
|
+
export declare const buildSortMenuItem: <T extends string>({ options, sort, onChange, id, label, icon, }: SortMenuItemArgs<T>) => MenuItemType;
|
|
356
|
+
|
|
355
357
|
declare type BundleMode = 'production' | 'staging' | 'developer';
|
|
356
358
|
|
|
357
359
|
declare const Button: IStyledComponentBase<"web", FastOmit<Omit< ButtonProps & RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
@@ -367,6 +369,7 @@ export declare const Chips: FC<ChipsProps>;
|
|
|
367
369
|
declare interface ChipsProps {
|
|
368
370
|
values: ChipValue[];
|
|
369
371
|
disabled?: boolean;
|
|
372
|
+
className?: string;
|
|
370
373
|
pt?: {
|
|
371
374
|
chip?: Partial<HTMLAttributes<HTMLDivElement>>;
|
|
372
375
|
};
|
|
@@ -378,6 +381,7 @@ export declare type ChipValue = {
|
|
|
378
381
|
icon?: string;
|
|
379
382
|
prefix?: default_2.ReactNode;
|
|
380
383
|
suffix?: default_2.ReactNode;
|
|
384
|
+
onClick?: default_2.MouseEventHandler<HTMLDivElement>;
|
|
381
385
|
};
|
|
382
386
|
|
|
383
387
|
declare type ColorInputPt = Partial<React.InputHTMLAttributes<HTMLInputElement>>;
|
|
@@ -750,7 +754,7 @@ declare interface DescriptionSectionProps {
|
|
|
750
754
|
}, target: HTMLElement) => void;
|
|
751
755
|
}
|
|
752
756
|
|
|
753
|
-
export declare const DetailsDialog: ({ projectName, entityType, entityIds, visible, onHide, }: DetailsDialogProps) => JSX_2.Element | null;
|
|
757
|
+
export declare const DetailsDialog: ({ projectName, entityType, entityIds, visible, onHide, data: dataProp, header, }: DetailsDialogProps) => JSX_2.Element | null;
|
|
754
758
|
|
|
755
759
|
export declare interface DetailsDialogProps {
|
|
756
760
|
projectName?: string;
|
|
@@ -758,6 +762,8 @@ export declare interface DetailsDialogProps {
|
|
|
758
762
|
entityIds: string[];
|
|
759
763
|
visible: boolean;
|
|
760
764
|
onHide: () => void;
|
|
765
|
+
data?: unknown;
|
|
766
|
+
header?: string;
|
|
761
767
|
}
|
|
762
768
|
|
|
763
769
|
declare type DetailsField = Pick<AttributeField, 'name' | 'data' | 'hidden'>;
|
|
@@ -1397,7 +1403,7 @@ export declare interface FilterErrorActionsProps {
|
|
|
1397
1403
|
errorMessage?: string;
|
|
1398
1404
|
}
|
|
1399
1405
|
|
|
1400
|
-
export declare type FilterFieldType = 'folderType' | 'taskType' | 'productType' | 'productBaseType' | ('users' | 'assignees' | 'author') | 'attributes' | 'status' | 'tags' | 'version' | 'hasReviewables' | 'productName' | 'name' | 'createdAt' | 'updatedAt';
|
|
1406
|
+
export declare type FilterFieldType = 'folderType' | 'taskType' | 'productType' | 'productBaseType' | ('users' | 'assignees' | 'author') | 'attributes' | 'status' | 'tags' | 'version' | 'hasReviewables' | 'productName' | 'name' | 'extension' | 'createdAt' | 'updatedAt';
|
|
1401
1407
|
|
|
1402
1408
|
export declare const FLOATING_TOOLBAR: ToolbarLayout;
|
|
1403
1409
|
|
|
@@ -2441,7 +2447,7 @@ declare type PowerpackDialogType = {
|
|
|
2441
2447
|
icon?: string;
|
|
2442
2448
|
};
|
|
2443
2449
|
|
|
2444
|
-
declare type PowerpackFeature = 'slicer' | 'annotations' | 'releases' | 'advancedFilters' | 'listAttributes' | 'listFolders' | 'listAccess' | 'groupAttributes' | 'sharedViews' | 'commentCategories' | 'projectFolders' | 'columnSummaries' | 'entityLinks';
|
|
2450
|
+
declare type PowerpackFeature = 'slicer' | 'annotations' | 'releases' | 'advancedFilters' | 'listAttributes' | 'listFolders' | 'listAccess' | 'groupAttributes' | 'sharedViews' | 'commentCategories' | 'projectFolders' | 'columnSummaries' | 'listValues' | 'entityLinks' | 'tableExport';
|
|
2445
2451
|
|
|
2446
2452
|
declare interface Processing extends ReviewableProcessingStatus {
|
|
2447
2453
|
progress?: number;
|
|
@@ -3015,7 +3021,7 @@ declare type Scalars = {
|
|
|
3015
3021
|
|
|
3016
3022
|
declare type Scope = ScopeType | ScopeType[];
|
|
3017
3023
|
|
|
3018
|
-
declare type ScopeType = 'folder' | 'product' | 'task' | 'user' | 'version';
|
|
3024
|
+
declare type ScopeType = 'folder' | 'product' | 'task' | 'user' | 'version' | 'representation';
|
|
3019
3025
|
|
|
3020
3026
|
declare type ScopeType_2 = ScopeWithFilterTypes['scope'];
|
|
3021
3027
|
|
|
@@ -3215,6 +3221,26 @@ declare type SlideOut = {
|
|
|
3215
3221
|
projectName: string;
|
|
3216
3222
|
};
|
|
3217
3223
|
|
|
3224
|
+
declare interface SortMenuItemArgs<T extends string> {
|
|
3225
|
+
options: SortMenuOption<T>[];
|
|
3226
|
+
sort: SortMenuValue<T>;
|
|
3227
|
+
onChange: (sort: SortMenuValue<T>) => void;
|
|
3228
|
+
id?: string;
|
|
3229
|
+
label?: string;
|
|
3230
|
+
icon?: string;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
export declare interface SortMenuOption<T extends string = string> {
|
|
3234
|
+
id: T;
|
|
3235
|
+
label: string;
|
|
3236
|
+
desc: boolean;
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
export declare interface SortMenuValue<T extends string = string> {
|
|
3240
|
+
by: T;
|
|
3241
|
+
desc: boolean;
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3218
3244
|
/**
|
|
3219
3245
|
* Splits combined Filter objects by their scope and removes the scope prefix from filter IDs.
|
|
3220
3246
|
* Used to separate multi-scope Filter arrays back into individual scope Filter arrays.
|
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
|
@@ -352,6 +352,8 @@ declare type CustomTemplate = {
|
|
|
352
352
|
|
|
353
353
|
declare type DataType = 'string' | 'list_of_strings' | string;
|
|
354
354
|
|
|
355
|
+
export declare const DEFAULT_LISTS_SORT: ListsSort;
|
|
356
|
+
|
|
355
357
|
declare type DefaultProductBaseType = {
|
|
356
358
|
color?: string;
|
|
357
359
|
icon?: string;
|
|
@@ -431,10 +433,15 @@ declare type EnumItem_2 = {
|
|
|
431
433
|
/** Icon name (material symbol) or IconModel object */
|
|
432
434
|
icon?: string | IconModel_2;
|
|
433
435
|
color?: string;
|
|
436
|
+
shortName?: string;
|
|
434
437
|
/** Enum item is visible, but not selectable */
|
|
435
438
|
disabled?: boolean;
|
|
436
439
|
/** Message to show when the option is disabled */
|
|
437
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[];
|
|
438
445
|
};
|
|
439
446
|
|
|
440
447
|
declare type EnumItem_3 = {
|
|
@@ -492,6 +499,8 @@ export declare const extractEntityHierarchyFromParents: (parents: string[], enti
|
|
|
492
499
|
*/
|
|
493
500
|
export declare function extractVersionFromFilename(filename: string): number | null;
|
|
494
501
|
|
|
502
|
+
export declare const filterBySearchQuery: <T>(items: T[], query: string, toHaystack: (item: T) => string) => T[];
|
|
503
|
+
|
|
495
504
|
/**
|
|
496
505
|
* Result of building a folder hierarchy
|
|
497
506
|
*/
|
|
@@ -577,6 +586,12 @@ export declare const getEnumItemIcon: (icon: EnumItem_4["icon"]) => string | und
|
|
|
577
586
|
*/
|
|
578
587
|
export declare const getErrorMessage: (error: unknown, prefix: string) => string;
|
|
579
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
|
+
|
|
580
595
|
/**
|
|
581
596
|
* Determines the data type for a groupBy field.
|
|
582
597
|
* Handles special cases for built-in group types (assignees, tags) and attribute-based grouping.
|
|
@@ -593,6 +608,11 @@ export declare const getErrorMessage: (error: unknown, prefix: string) => string
|
|
|
593
608
|
*/
|
|
594
609
|
export declare const getGroupByDataType: (groupBy: TableGroupBy | undefined, attribFields: (ProjectTableAttribute | AttributeModel)[]) => DataType;
|
|
595
610
|
|
|
611
|
+
export declare const getListIcon: (list: {
|
|
612
|
+
entityListType: string;
|
|
613
|
+
entityType: string;
|
|
614
|
+
}) => string;
|
|
615
|
+
|
|
596
616
|
export declare const getMixedState: (values: any[]) => {
|
|
597
617
|
value: any;
|
|
598
618
|
isMixed: boolean;
|
|
@@ -769,6 +789,8 @@ export declare enum KeyMode {
|
|
|
769
789
|
Shift = "shift"
|
|
770
790
|
}
|
|
771
791
|
|
|
792
|
+
export declare const labelCollator: Intl.Collator;
|
|
793
|
+
|
|
772
794
|
declare type LinkType = {
|
|
773
795
|
link_type: string;
|
|
774
796
|
input_type: 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile';
|
|
@@ -777,6 +799,19 @@ declare type LinkType = {
|
|
|
777
799
|
style?: 'solid' | 'dashed';
|
|
778
800
|
};
|
|
779
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
|
+
|
|
780
815
|
declare type MainCalc = 'count' | 'breakdown';
|
|
781
816
|
|
|
782
817
|
export declare const matchSearchQuery: (haystack: string, groups: string[][]) => RankingInfo;
|
|
@@ -953,6 +988,8 @@ export declare type RealtimeBatchProcessor<T> = (items: T[], isActive: () => boo
|
|
|
953
988
|
|
|
954
989
|
export declare const replaceRoot: (input?: string | null, roots?: Record<string, string | undefined>) => string | undefined;
|
|
955
990
|
|
|
991
|
+
export declare const resolveListsSort: (sort: unknown) => ListsSort;
|
|
992
|
+
|
|
956
993
|
/**
|
|
957
994
|
* Convert RGB components to hex color string
|
|
958
995
|
*/
|
|
@@ -982,6 +1019,14 @@ export declare const sanitizeProductName: (name: string) => string;
|
|
|
982
1019
|
|
|
983
1020
|
declare type ScopeEntityType = 'folder' | 'product' | 'version' | 'representation' | 'task' | 'workfile' | 'project' | 'user';
|
|
984
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
|
+
|
|
985
1030
|
/**
|
|
986
1031
|
* Writes the sorting of a view, see `parseViewSorting` for the format.
|
|
987
1032
|
* No sorting is `undefined` so the view falls back to its default order.
|
|
@@ -1026,6 +1071,13 @@ declare type SimpleTableRow = {
|
|
|
1026
1071
|
badge?: string | React.ReactNode;
|
|
1027
1072
|
};
|
|
1028
1073
|
|
|
1074
|
+
declare interface SortableList {
|
|
1075
|
+
label: string;
|
|
1076
|
+
active: boolean;
|
|
1077
|
+
createdAt?: unknown;
|
|
1078
|
+
updatedAt?: unknown;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1029
1081
|
export declare type SortArgs = {
|
|
1030
1082
|
sortBy: string | string[] | undefined;
|
|
1031
1083
|
desc: boolean;
|
|
@@ -1038,6 +1090,8 @@ export declare type SortKey = {
|
|
|
1038
1090
|
|
|
1039
1091
|
export declare const sortKeysDeep: (value: unknown) => unknown;
|
|
1040
1092
|
|
|
1093
|
+
export declare const sortLists: <T extends SortableList>(lists: T[], { by, desc }?: ListsSort) => T[];
|
|
1094
|
+
|
|
1041
1095
|
declare type StagingDirectory = {
|
|
1042
1096
|
name: string;
|
|
1043
1097
|
directory?: string;
|
package/dist/util.es.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
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
28
|
const t = /* @__PURE__ */ new Map(), s = [];
|
|
28
29
|
for (const a of e)
|
|
@@ -40,7 +41,7 @@ const E = (e) => {
|
|
|
40
41
|
itemTypeName: o,
|
|
41
42
|
messageDetail: l
|
|
42
43
|
}) => {
|
|
43
|
-
const n = Array.isArray(e) ? e : [e], i = n.map((r) => t?.find((p) => p.id === r)).filter(Boolean),
|
|
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 {
|
|
@@ -49,10 +50,10 @@ const E = (e) => {
|
|
|
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,105 +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
|
-
|
|
83
|
-
ma as
|
|
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,
|
|
84
87
|
E as buildFolderHierarchy,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
_a as buildHierarchicalTableRows,
|
|
89
|
+
Fe as buildSortArgs,
|
|
90
|
+
W as checkLabel,
|
|
91
|
+
X as checkName,
|
|
92
|
+
N as clearActiveEntities,
|
|
90
93
|
d as confirmDelete,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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,
|
|
101
|
+
Ce as createRealtimeBatcher,
|
|
102
|
+
Je as createVersionHelper,
|
|
103
|
+
L as entityTypesWithIcons,
|
|
104
|
+
O as extractEntityHierarchyFromParents,
|
|
105
|
+
ke as extractVersionFromFilename,
|
|
106
|
+
oe as filterBySearchQuery,
|
|
103
107
|
H as getActiveEntities,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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,
|
|
116
120
|
g as getErrorMessage,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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,
|
|
123
129
|
T as getProjectDisplayName,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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,
|
|
131
137
|
f as handleDeleteFolders,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
138
|
+
qe as handleUploadError,
|
|
139
|
+
de as hasEnumOptions,
|
|
140
|
+
ge as hasEnumResolver,
|
|
141
|
+
da as hexToRgb,
|
|
136
142
|
q as humanizeField,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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,
|
|
156
165
|
V as setActiveEntities,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
La as shouldBlockShortcuts,
|
|
167
|
+
ye as sortKeysDeep,
|
|
168
|
+
ia as sortLists,
|
|
169
|
+
Oe as subscribeToThumbnailUpdates,
|
|
170
|
+
xe as toDropdownErrorText,
|
|
161
171
|
k as useActiveEntities,
|
|
162
172
|
K as useRegisterActiveEntities,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
Ra as useStagingModeState,
|
|
174
|
+
He as validateEntityId,
|
|
175
|
+
We as validateFormData,
|
|
176
|
+
Xe as validateProductName,
|
|
177
|
+
$e as validateVersion,
|
|
178
|
+
Be as waitForRealtimeJitter
|
|
169
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",
|