@ynput/ayon-frontend-shared 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +765 -739
- package/dist/ListTable.es.js +80 -80
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +1424 -1409
- package/dist/Views.es.js +572 -570
- package/dist/api.es.js +300 -298
- package/dist/chunks/Actions.es.js +5 -5
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/EntityPath.es.js +14 -14
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +18 -18
- package/dist/chunks/Feed.es.js +2 -2
- package/dist/chunks/MetaWidget.es.js +2422 -2149
- package/dist/chunks/PlayableIcon.es.js +20 -20
- package/dist/chunks/ProjectContext.es.js +6 -6
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +2 -2
- package/dist/chunks/Slicer.es.js +2 -2
- package/dist/chunks/TableExportContextInstance.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +12 -12
- package/dist/chunks/Watchers.es.js +907 -855
- package/dist/chunks/getUris.es.js +1272 -1209
- package/dist/chunks/searchTerms.es.js +30 -66
- package/dist/chunks/useAttributeEnums.es.js +37 -37
- package/dist/chunks/viewUpdateHelper.es.js +10 -10
- package/dist/components.es.js +132 -131
- package/dist/context.es.js +76 -76
- package/dist/hooks.es.js +51 -50
- package/dist/types/ProjectTreeTable.d.ts +21 -1
- package/dist/types/Slicer.d.ts +6 -4
- package/dist/types/Views.d.ts +4 -0
- package/dist/types/api.d.ts +411 -438
- package/dist/types/components.d.ts +22 -0
- package/dist/types/context.d.ts +2 -0
- package/dist/types/hooks.d.ts +36 -1
- package/package.json +3 -3
|
@@ -44,6 +44,7 @@ import { LabelHTMLAttributes } from 'react';
|
|
|
44
44
|
import { LexicalCommand } from 'lexical';
|
|
45
45
|
import { LexicalEditor } from 'lexical';
|
|
46
46
|
import { LexicalNode } from 'lexical';
|
|
47
|
+
import { MixedChange } from '@ynput/ayon-react-components';
|
|
47
48
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
48
49
|
import { MutationActionCreatorResult } from '@reduxjs/toolkit/query';
|
|
49
50
|
import { MutationDefinition } from '@reduxjs/toolkit/query';
|
|
@@ -778,6 +779,7 @@ export declare interface DetailsPanelAttributesEditorProps {
|
|
|
778
779
|
form: Record<string, string | number | boolean | Date | any[] | Record<string, any> | undefined | null>;
|
|
779
780
|
mixedFields?: string[];
|
|
780
781
|
onChange?: (key: string, value: any) => void;
|
|
782
|
+
onMixedChange?: (key: string, change: MixedChange) => void;
|
|
781
783
|
entities?: any[];
|
|
782
784
|
projectName?: string;
|
|
783
785
|
entityType?: string;
|
|
@@ -1253,6 +1255,26 @@ declare const EnumItemBody: IStyledComponentBase<"web", FastOmit<DetailedHTMLPro
|
|
|
1253
1255
|
|
|
1254
1256
|
declare const EnumItemBodyExpander: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
1255
1257
|
|
|
1258
|
+
export declare const EnumItemDialog: FC<EnumItemDialogProps>;
|
|
1259
|
+
|
|
1260
|
+
export declare interface EnumItemDialogProps {
|
|
1261
|
+
item?: EnumItemDraft;
|
|
1262
|
+
isNew?: boolean;
|
|
1263
|
+
fields: EnumItemField[];
|
|
1264
|
+
itemLabel?: string;
|
|
1265
|
+
onSave: (item: EnumItemDraft) => void;
|
|
1266
|
+
onCancel: () => void;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
export declare interface EnumItemDraft {
|
|
1270
|
+
value: string;
|
|
1271
|
+
label?: string;
|
|
1272
|
+
icon?: string;
|
|
1273
|
+
color?: string;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
export declare type EnumItemField = 'label' | 'icon' | 'color';
|
|
1277
|
+
|
|
1256
1278
|
declare const EnumItemHeader: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
1257
1279
|
|
|
1258
1280
|
declare const EnumItemWrapper: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
package/dist/types/context.d.ts
CHANGED
|
@@ -1682,6 +1682,8 @@ export declare type TableExportListQuery = {
|
|
|
1682
1682
|
export declare type TableExportOptions = {
|
|
1683
1683
|
includeImportColumns: boolean;
|
|
1684
1684
|
selectionColumns: 'selected' | 'visible';
|
|
1685
|
+
format?: 'xlsx' | 'csv';
|
|
1686
|
+
content?: 'readable' | 'raw';
|
|
1685
1687
|
};
|
|
1686
1688
|
|
|
1687
1689
|
export declare type TableExportProductsQuery = {
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -204,6 +204,24 @@ declare type EnumItem = {
|
|
|
204
204
|
hidden?: boolean;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
declare interface EnumItemDialogProps {
|
|
208
|
+
item?: EnumItemDraft;
|
|
209
|
+
isNew?: boolean;
|
|
210
|
+
fields: EnumItemField[];
|
|
211
|
+
itemLabel?: string;
|
|
212
|
+
onSave: (item: EnumItemDraft) => void;
|
|
213
|
+
onCancel: () => void;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare interface EnumItemDraft {
|
|
217
|
+
value: string;
|
|
218
|
+
label?: string;
|
|
219
|
+
icon?: string;
|
|
220
|
+
color?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
declare type EnumItemField = 'label' | 'icon' | 'color';
|
|
224
|
+
|
|
207
225
|
export declare type FetchAttributeEnumOptions = (data: AttributeData, projectName?: string) => Promise<EnumItem[]>;
|
|
208
226
|
|
|
209
227
|
declare type FilesystemSourceInfo = {
|
|
@@ -505,11 +523,28 @@ export declare interface UseAttributeEnumsParams {
|
|
|
505
523
|
request?: AttributeEnumsRequest;
|
|
506
524
|
}
|
|
507
525
|
|
|
526
|
+
/**
|
|
527
|
+
* Edits the project anatomy's tags from a tags dropdown: new tags saved on entities are added to
|
|
528
|
+
* it, and a dialog (render `dialog` with EnumItemDialog) creates a tag with a colour or changes a
|
|
529
|
+
* tag's colour. Undefined when the user can't change the project (managers and admins can), or
|
|
530
|
+
* without a project.
|
|
531
|
+
*/
|
|
532
|
+
export declare const useEditProjectTags: (projectName: string | undefined, anatomyTags?: {
|
|
533
|
+
name: string;
|
|
534
|
+
}[]) => {
|
|
535
|
+
onEditOption: (tag: {
|
|
536
|
+
name?: string;
|
|
537
|
+
color?: string;
|
|
538
|
+
}, isNew: boolean) => Promise<string | undefined>;
|
|
539
|
+
dialog: EnumItemDialogProps;
|
|
540
|
+
addTags: (names: string[]) => void;
|
|
541
|
+
} | undefined;
|
|
542
|
+
|
|
508
543
|
/**
|
|
509
544
|
* Hook for updating entities with proper error handling and version-specific logic
|
|
510
545
|
*/
|
|
511
546
|
export declare const useEntityUpdate: ({ entities, entityType }: UseEntityUpdateParams) => {
|
|
512
|
-
updateEntity: (field: string, value: any) => Promise<void>;
|
|
547
|
+
updateEntity: (field: string, value: any | ((entityId: string) => any)) => Promise<void>;
|
|
513
548
|
};
|
|
514
549
|
|
|
515
550
|
export declare interface UseEntityUpdateParams {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ynput/ayon-frontend-shared",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Shared React components for AYON frontend",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"react": "18.3.1",
|
|
103
103
|
"react-dom": "18.3.1",
|
|
104
104
|
"react-redux": "9.2.0",
|
|
105
|
-
"react-router": "7.18.
|
|
106
|
-
"react-router-dom": "7.18.
|
|
105
|
+
"react-router": "7.18.4",
|
|
106
|
+
"react-router-dom": "7.18.4",
|
|
107
107
|
"react-toastify": "9.1.3",
|
|
108
108
|
"styled-components": "6.4.0"
|
|
109
109
|
},
|