@ynput/ayon-frontend-shared 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/DetailsPanel.es.js +88 -86
  2. package/dist/Feed.es.js +22 -22
  3. package/dist/ListTable.es.js +77 -67
  4. package/dist/ProjectTreeTable.es.js +1164 -1150
  5. package/dist/Slicer.es.js +2 -2
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +331 -329
  8. package/dist/chunks/Actions.es.js +23 -23
  9. package/dist/chunks/DeleteEntitiesContext.es.js +115 -115
  10. package/dist/chunks/DetailsDialog.es.js +3 -3
  11. package/dist/chunks/DetailsPanelContext.es.js +155 -0
  12. package/dist/chunks/EntityPath.es.js +20 -20
  13. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  14. package/dist/chunks/EntityTooltip.es.js +12 -12
  15. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  16. package/dist/chunks/Feed.es.js +2208 -2611
  17. package/dist/chunks/FilterErrorActions.es.js +1 -1
  18. package/dist/chunks/GlobalContext.es.js +14 -14
  19. package/dist/chunks/Menu.es.js +1 -1
  20. package/dist/chunks/MenuContext.es.js +51 -242
  21. package/dist/chunks/MenuItem.es.js +1 -1
  22. package/dist/chunks/MetaWidget.es.js +3341 -3899
  23. package/dist/chunks/NewEntityContext.es.js +40 -40
  24. package/dist/chunks/PlayableIcon.es.js +4261 -1163
  25. package/dist/chunks/ProjectContext.es.js +13 -13
  26. package/dist/chunks/ProjectFoldersContext.es.js +5 -5
  27. package/dist/chunks/RepresentationsList.es.js +3 -3
  28. package/dist/chunks/ReviewablesSelector.es.js +85 -76
  29. package/dist/chunks/SimpleForm.es.js +9 -9
  30. package/dist/chunks/SimpleTable.es.js +1 -1
  31. package/dist/chunks/Slicer.es.js +173 -171
  32. package/dist/chunks/TableSettingsFallback.es.js +6 -6
  33. package/dist/chunks/ThumbnailSimple.es.js +410 -61
  34. package/dist/chunks/VersionUploadContext.es.js +29 -29
  35. package/dist/chunks/ViewsContext.es.js +90 -90
  36. package/dist/chunks/Watchers.es.js +628 -598
  37. package/dist/chunks/entityDefinitions.es.js +31 -31
  38. package/dist/chunks/expandRelativeDates.es.js +27 -0
  39. package/dist/chunks/getBundleMode.es.js +16 -61
  40. package/dist/chunks/getUris.es.js +271 -269
  41. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  42. package/dist/chunks/searchTerms.es.js +177 -173
  43. package/dist/chunks/uriUtils.es.js +48 -0
  44. package/dist/chunks/useAttributeEnums.es.js +11 -11
  45. package/dist/chunks/useColumnDragRestriction.es.js +37 -27
  46. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  47. package/dist/chunks/useLocalStorage.es.js +9 -9
  48. package/dist/chunks/useSessionStorage.es.js +61 -0
  49. package/dist/chunks/viewUpdateHelper.es.js +19 -19
  50. package/dist/components.es.js +165 -160
  51. package/dist/context.es.js +60 -58
  52. package/dist/hooks.es.js +104 -98
  53. package/dist/index.es.js +18 -13
  54. package/dist/types/Actions.d.ts +16 -16
  55. package/dist/types/ContextMenu.d.ts +16 -16
  56. package/dist/types/DetailsPanel.d.ts +16 -16
  57. package/dist/types/EntityPickerDialog.d.ts +16 -16
  58. package/dist/types/Feed.d.ts +16 -16
  59. package/dist/types/ListTable.d.ts +16 -16
  60. package/dist/types/NewEntity.d.ts +16 -16
  61. package/dist/types/ProjectTreeTable.d.ts +20 -16
  62. package/dist/types/RepresentationsList.d.ts +16 -16
  63. package/dist/types/SimpleTable.d.ts +16 -16
  64. package/dist/types/Slicer.d.ts +16 -16
  65. package/dist/types/Views.d.ts +17 -17
  66. package/dist/types/api.d.ts +391 -95
  67. package/dist/types/components.d.ts +79 -20
  68. package/dist/types/context.d.ts +60 -17
  69. package/dist/types/hooks.d.ts +16 -16
  70. package/dist/types/index.d.ts +16 -16
  71. package/dist/types/util.d.ts +16 -16
  72. package/dist/util.es.js +108 -97
  73. package/package.json +16 -4
  74. package/dist/chunks/mentionTypeOptions.es.js +0 -15
@@ -39,7 +39,7 @@ import { Option as Option_2 } from '@ynput/ayon-react-components';
39
39
  import { OverrideResultType } from '@reduxjs/toolkit/query';
40
40
  import { QueryDefinition } from '@reduxjs/toolkit/query';
41
41
  import { QueryStatus } from '@reduxjs/toolkit/query';
42
- import { reactHooksModuleName } from '@reduxjs/toolkit/dist/query/react';
42
+ import { reactHooksModuleName } from '@reduxjs/toolkit/query/react';
43
43
  import { ReactNode } from 'react';
44
44
  import { RefAttributes } from 'react';
45
45
  import { RefObject } from 'react';
@@ -155,7 +155,7 @@ declare type Anatomy = {
155
155
  /** Link types configuration */
156
156
  link_types?: LinkType[];
157
157
  /** Statuses configuration */
158
- statuses?: Status_3[];
158
+ statuses?: Status[];
159
159
  /** Tags configuration */
160
160
  tags?: Tag[];
161
161
  product_base_types?: ProductBaseTypes;
@@ -436,6 +436,26 @@ declare interface CommandEvent {
436
436
  };
437
437
  }
438
438
 
439
+ declare type CommentFrameLink = CommentFrameRange & {
440
+ entityId: string;
441
+ };
442
+
443
+ declare interface CommentFrameLinkApi {
444
+ draft: CommentFrameLink | null;
445
+ setDraft: (link: CommentFrameLink | null) => void;
446
+ editPreview: FeedFrameLinkPreview | null;
447
+ setEditPreview: (preview: FeedFrameLinkPreview | null) => void;
448
+ link: (entityId: string) => void;
449
+ unlink: () => void;
450
+ goTo: (link: CommentFrameLink) => void;
451
+ formatFrame?: (frame: number) => string;
452
+ }
453
+
454
+ declare type CommentFrameRange = {
455
+ startFrame: number;
456
+ endFrame: number;
457
+ };
458
+
439
459
  declare interface ContextMenuItemProps {
440
460
  icon?: string;
441
461
  iconFilled?: boolean;
@@ -631,17 +651,36 @@ declare type DeliveryTemplate = {
631
651
  file: string;
632
652
  };
633
653
 
654
+ declare interface DescriptionMentionsContext {
655
+ projectName: string;
656
+ entityType: string;
657
+ entityId: string;
658
+ productTypes?: ProjectContextValue['productTypes'];
659
+ taskTypes?: TaskType_3[];
660
+ }
661
+
634
662
  export declare const DescriptionSection: default_2.FC<DescriptionSectionProps>;
635
663
 
636
664
  declare interface DescriptionSectionProps {
637
665
  description: string;
638
- isLarge: boolean;
666
+ isLarge?: boolean;
639
667
  isMixed: boolean;
640
668
  enableEditing: boolean;
641
669
  initialEdit?: boolean;
642
670
  onChange: (description: string) => void;
643
671
  onCancel?: () => void;
644
672
  isLoading: boolean;
673
+ mentionsContext?: DescriptionMentionsContext;
674
+ onMentionClick?: (mention: {
675
+ type: string;
676
+ id: string;
677
+ label: string;
678
+ }) => void;
679
+ onMentionHover?: (mention: {
680
+ type: string;
681
+ id: string;
682
+ label: string;
683
+ }, target: HTMLElement) => void;
645
684
  }
646
685
 
647
686
  export declare const DetailsDialog: ({ projectName, entityType, entityIds, visible, onHide, }: DetailsDialogProps) => JSX_2.Element | null;
@@ -681,6 +720,7 @@ declare interface DetailsPanelContextProps {
681
720
  };
682
721
  onOpenImage?: (args: any) => void;
683
722
  onGoToFrame?: (frame: number) => void;
723
+ commentFrameLink?: CommentFrameLinkApi;
684
724
  onOpenViewer?: (args: any) => void;
685
725
  onUpdateEntity?: (data: {
686
726
  operations: any[];
@@ -721,6 +761,8 @@ declare interface DetailsPanelContextType extends DetailsPanelContextProps {
721
761
  setEntities: (entities: Entities | null) => void;
722
762
  feedAnnotations: SavedAnnotationMetadata[];
723
763
  setFeedAnnotations: (annotations: SavedAnnotationMetadata[]) => void;
764
+ feedFrameLinks: FeedFrameLink[];
765
+ setFeedFrameLinks: (links: FeedFrameLink[]) => void;
724
766
  onPowerFeature: (feature: PowerpackFeature) => void;
725
767
  }
726
768
 
@@ -1041,7 +1083,7 @@ export declare interface EntityTooltipProjectInfo {
1041
1083
  name: string;
1042
1084
  icon?: string;
1043
1085
  }[];
1044
- statuses?: Status[];
1086
+ statuses?: Status_3[];
1045
1087
  }
1046
1088
 
1047
1089
  export declare interface EntityTooltipProps {
@@ -1174,6 +1216,15 @@ declare type FeedbackProviderProps = {
1174
1216
  children: ReactNode;
1175
1217
  };
1176
1218
 
1219
+ declare type FeedFrameLink = CommentFrameLink & {
1220
+ activityId: string;
1221
+ };
1222
+
1223
+ declare type FeedFrameLinkPreview = {
1224
+ activityId: string;
1225
+ link: CommentFrameLink | null;
1226
+ };
1227
+
1177
1228
  export declare const FieldLabel: default_2.FC<FieldLabelProps>;
1178
1229
 
1179
1230
  declare interface FieldLabelProps extends default_2.HTMLAttributes<HTMLDivElement> {
@@ -2953,6 +3004,14 @@ declare type TaskType_2 = {
2953
3004
  icon?: string;
2954
3005
  };
2955
3006
 
3007
+ declare type TaskType_3 = {
3008
+ name: string;
3009
+ original_name?: string;
3010
+ shortName?: string;
3011
+ color?: string;
3012
+ icon?: string;
3013
+ };
3014
+
2956
3015
  export declare const TEAM_KEY_PREFIX = "team:";
2957
3016
 
2958
3017
  declare type Templates = {
@@ -3670,6 +3729,22 @@ export * from "primereact/confirmdialog";
3670
3729
  export { }
3671
3730
 
3672
3731
 
3732
+ declare module '@tanstack/react-table' {
3733
+ interface FilterFns {
3734
+ fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
3735
+ }
3736
+ interface FilterMeta {
3737
+ itemRank: RankingInfo;
3738
+ }
3739
+ interface TableMeta<TData extends RowData> {
3740
+ isExpandable?: boolean;
3741
+ isLoading?: boolean;
3742
+ children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
3743
+ [key: string]: any;
3744
+ }
3745
+ }
3746
+
3747
+
3673
3748
  declare global {
3674
3749
  interface Window {
3675
3750
  senderId: string;
@@ -3691,22 +3766,6 @@ declare module '@tanstack/react-table' {
3691
3766
  }
3692
3767
 
3693
3768
 
3694
- declare module '@tanstack/react-table' {
3695
- interface FilterFns {
3696
- fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
3697
- }
3698
- interface FilterMeta {
3699
- itemRank: RankingInfo;
3700
- }
3701
- interface TableMeta<TData extends RowData> {
3702
- isExpandable?: boolean;
3703
- isLoading?: boolean;
3704
- children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
3705
- [key: string]: any;
3706
- }
3707
- }
3708
-
3709
-
3710
3769
  declare module '@tanstack/react-table' {
3711
3770
  interface ColumnMeta<TData extends RowData, TValue> {
3712
3771
  listTableCustomCell?: boolean;
@@ -17,7 +17,7 @@ import { NavigateFunction } from 'react-router';
17
17
  import { OverrideResultType } from '@reduxjs/toolkit/query';
18
18
  import { QueryDefinition } from '@reduxjs/toolkit/query';
19
19
  import { QueryStatus } from '@reduxjs/toolkit/query';
20
- import { reactHooksModuleName } from '@reduxjs/toolkit/dist/query/react';
20
+ import { reactHooksModuleName } from '@reduxjs/toolkit/query/react';
21
21
  import { ReactNode } from 'react';
22
22
  import { ReadyState as ReadyState_2 } from 'react-use-websocket';
23
23
  import { RefAttributes } from 'react';
@@ -203,6 +203,26 @@ declare type ColumnItemModel = {
203
203
  width?: number;
204
204
  };
205
205
 
206
+ export declare type CommentFrameLink = CommentFrameRange & {
207
+ entityId: string;
208
+ };
209
+
210
+ export declare interface CommentFrameLinkApi {
211
+ draft: CommentFrameLink | null;
212
+ setDraft: (link: CommentFrameLink | null) => void;
213
+ editPreview: FeedFrameLinkPreview | null;
214
+ setEditPreview: (preview: FeedFrameLinkPreview | null) => void;
215
+ link: (entityId: string) => void;
216
+ unlink: () => void;
217
+ goTo: (link: CommentFrameLink) => void;
218
+ formatFrame?: (frame: number) => string;
219
+ }
220
+
221
+ export declare type CommentFrameRange = {
222
+ startFrame: number;
223
+ endFrame: number;
224
+ };
225
+
206
226
  declare type CreateViewApiArg = {
207
227
  viewType: string;
208
228
  projectName?: string;
@@ -267,6 +287,7 @@ export declare interface DetailsPanelContextProps {
267
287
  };
268
288
  onOpenImage?: (args: any) => void;
269
289
  onGoToFrame?: (frame: number) => void;
290
+ commentFrameLink?: CommentFrameLinkApi;
270
291
  onOpenViewer?: (args: any) => void;
271
292
  onUpdateEntity?: (data: {
272
293
  operations: any[];
@@ -307,6 +328,8 @@ export declare interface DetailsPanelContextType extends DetailsPanelContextProp
307
328
  setEntities: (entities: Entities | null) => void;
308
329
  feedAnnotations: SavedAnnotationMetadata[];
309
330
  setFeedAnnotations: (annotations: SavedAnnotationMetadata[]) => void;
331
+ feedFrameLinks: FeedFrameLink[];
332
+ setFeedFrameLinks: (links: FeedFrameLink[]) => void;
310
333
  onPowerFeature: (feature: PowerpackFeature) => void;
311
334
  }
312
335
 
@@ -450,6 +473,15 @@ declare type EnumItem_6 = {
450
473
 
451
474
  export declare type FeedFilter = QueryFilter;
452
475
 
476
+ export declare type FeedFrameLink = CommentFrameLink & {
477
+ activityId: string;
478
+ };
479
+
480
+ export declare type FeedFrameLinkPreview = {
481
+ activityId: string;
482
+ link: CommentFrameLink | null;
483
+ };
484
+
453
485
  declare type FolderListItem = {
454
486
  id: string;
455
487
  path: string;
@@ -548,6 +580,17 @@ declare type GenericViewPostModel = {
548
580
  viewType: string;
549
581
  };
550
582
 
583
+ export declare const getActivityFrameLink: (activity: {
584
+ activityData?: {
585
+ startFrame?: unknown;
586
+ endFrame?: unknown;
587
+ } | null;
588
+ origin?: {
589
+ id: string;
590
+ } | null;
591
+ entityId?: string | null;
592
+ }) => CommentFrameLink | null;
593
+
551
594
  export declare const getAutoSyncForTopic: (topic: string, autoSyncSettings: RTUpdateConfig | undefined) => boolean;
552
595
 
553
596
  declare type GetBaseViewApiArg = {
@@ -2396,6 +2439,22 @@ declare type YnputCloudSubscriptionModel = {
2396
2439
  export { }
2397
2440
 
2398
2441
 
2442
+ declare module '@tanstack/react-table' {
2443
+ interface FilterFns {
2444
+ fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
2445
+ }
2446
+ interface FilterMeta {
2447
+ itemRank: RankingInfo;
2448
+ }
2449
+ interface TableMeta<TData extends RowData> {
2450
+ isExpandable?: boolean;
2451
+ isLoading?: boolean;
2452
+ children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
2453
+ [key: string]: any;
2454
+ }
2455
+ }
2456
+
2457
+
2399
2458
  declare global {
2400
2459
  interface Window {
2401
2460
  senderId: string;
@@ -2417,22 +2476,6 @@ declare module '@tanstack/react-table' {
2417
2476
  }
2418
2477
 
2419
2478
 
2420
- declare module '@tanstack/react-table' {
2421
- interface FilterFns {
2422
- fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
2423
- }
2424
- interface FilterMeta {
2425
- itemRank: RankingInfo;
2426
- }
2427
- interface TableMeta<TData extends RowData> {
2428
- isExpandable?: boolean;
2429
- isLoading?: boolean;
2430
- children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
2431
- [key: string]: any;
2432
- }
2433
- }
2434
-
2435
-
2436
2479
  declare module '@tanstack/react-table' {
2437
2480
  interface ColumnMeta<TData extends RowData, TValue> {
2438
2481
  listTableCustomCell?: boolean;
@@ -610,6 +610,22 @@ export declare const writeSessionStorage: <T>(key: string, value: T) => void;
610
610
  export { }
611
611
 
612
612
 
613
+ declare module '@tanstack/react-table' {
614
+ interface FilterFns {
615
+ fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
616
+ }
617
+ interface FilterMeta {
618
+ itemRank: RankingInfo;
619
+ }
620
+ interface TableMeta<TData extends RowData> {
621
+ isExpandable?: boolean;
622
+ isLoading?: boolean;
623
+ children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
624
+ [key: string]: any;
625
+ }
626
+ }
627
+
628
+
613
629
  declare global {
614
630
  interface Window {
615
631
  senderId: string;
@@ -631,22 +647,6 @@ declare module '@tanstack/react-table' {
631
647
  }
632
648
 
633
649
 
634
- declare module '@tanstack/react-table' {
635
- interface FilterFns {
636
- fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
637
- }
638
- interface FilterMeta {
639
- itemRank: RankingInfo;
640
- }
641
- interface TableMeta<TData extends RowData> {
642
- isExpandable?: boolean;
643
- isLoading?: boolean;
644
- children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
645
- [key: string]: any;
646
- }
647
- }
648
-
649
-
650
650
  declare module '@tanstack/react-table' {
651
651
  interface ColumnMeta<TData extends RowData, TValue> {
652
652
  listTableCustomCell?: boolean;
@@ -62,6 +62,22 @@ declare interface UserImageProps {
62
62
  export { }
63
63
 
64
64
 
65
+ declare module '@tanstack/react-table' {
66
+ interface FilterFns {
67
+ fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
68
+ }
69
+ interface FilterMeta {
70
+ itemRank: RankingInfo;
71
+ }
72
+ interface TableMeta<TData extends RowData> {
73
+ isExpandable?: boolean;
74
+ isLoading?: boolean;
75
+ children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
76
+ [key: string]: any;
77
+ }
78
+ }
79
+
80
+
65
81
  declare global {
66
82
  interface Window {
67
83
  senderId: string;
@@ -83,22 +99,6 @@ declare module '@tanstack/react-table' {
83
99
  }
84
100
 
85
101
 
86
- declare module '@tanstack/react-table' {
87
- interface FilterFns {
88
- fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
89
- }
90
- interface FilterMeta {
91
- itemRank: RankingInfo;
92
- }
93
- interface TableMeta<TData extends RowData> {
94
- isExpandable?: boolean;
95
- isLoading?: boolean;
96
- children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
97
- [key: string]: any;
98
- }
99
- }
100
-
101
-
102
102
  declare module '@tanstack/react-table' {
103
103
  interface ColumnMeta<TData extends RowData, TValue> {
104
104
  listTableCustomCell?: boolean;
@@ -942,6 +942,22 @@ export declare const waitForRealtimeJitter: () => Promise<void>;
942
942
  export { }
943
943
 
944
944
 
945
+ declare module '@tanstack/react-table' {
946
+ interface FilterFns {
947
+ fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
948
+ }
949
+ interface FilterMeta {
950
+ itemRank: RankingInfo;
951
+ }
952
+ interface TableMeta<TData extends RowData> {
953
+ isExpandable?: boolean;
954
+ isLoading?: boolean;
955
+ children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
956
+ [key: string]: any;
957
+ }
958
+ }
959
+
960
+
945
961
  declare global {
946
962
  interface Window {
947
963
  senderId: string;
@@ -963,22 +979,6 @@ declare module '@tanstack/react-table' {
963
979
  }
964
980
 
965
981
 
966
- declare module '@tanstack/react-table' {
967
- interface FilterFns {
968
- fuzzy: (row: Row<any>, columnId: string, searchValue: string[][], addMeta: (meta: any) => void) => boolean;
969
- }
970
- interface FilterMeta {
971
- itemRank: RankingInfo;
972
- }
973
- interface TableMeta<TData extends RowData> {
974
- isExpandable?: boolean;
975
- isLoading?: boolean;
976
- children?: (props: SimpleTableCellTemplateProps, row: Row<TData>, table: Table<SimpleTableRow>) => JSX.Element;
977
- [key: string]: any;
978
- }
979
- }
980
-
981
-
982
982
  declare module '@tanstack/react-table' {
983
983
  interface ColumnMeta<TData extends RowData, TValue> {
984
984
  listTableCustomCell?: boolean;