@instructure/ui-tree-browser 8.14.1-snapshot.7 → 8.15.1-snapshot.2
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/CHANGELOG.md +4 -0
- package/es/TreeBrowser/TreeBrowserLocator.js +2 -1
- package/es/TreeBrowser/TreeButton/index.js +14 -15
- package/es/TreeBrowser/TreeCollection/index.js +18 -31
- package/es/TreeBrowser/TreeCollection/props.js +1 -9
- package/es/TreeBrowser/TreeNode/index.js +10 -13
- package/es/TreeBrowser/TreeNode/props.js +0 -8
- package/es/TreeBrowser/index.js +36 -32
- package/es/TreeBrowser/props.js +0 -55
- package/lib/TreeBrowser/TreeBrowserLocator.js +2 -1
- package/lib/TreeBrowser/TreeButton/index.js +14 -14
- package/lib/TreeBrowser/TreeCollection/index.js +17 -30
- package/lib/TreeBrowser/TreeCollection/props.js +1 -9
- package/lib/TreeBrowser/TreeNode/index.js +10 -12
- package/lib/TreeBrowser/TreeNode/props.js +0 -8
- package/lib/TreeBrowser/index.js +37 -33
- package/lib/TreeBrowser/props.js +0 -55
- package/package.json +15 -15
- package/src/TreeBrowser/TreeButton/index.tsx +21 -36
- package/src/TreeBrowser/TreeButton/props.ts +11 -10
- package/src/TreeBrowser/TreeCollection/index.tsx +57 -108
- package/src/TreeBrowser/TreeCollection/props.ts +17 -32
- package/src/TreeBrowser/TreeNode/index.tsx +10 -21
- package/src/TreeBrowser/TreeNode/props.ts +5 -7
- package/src/TreeBrowser/index.tsx +81 -108
- package/src/TreeBrowser/props.ts +133 -59
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TreeBrowser/TreeBrowserLocator.d.ts +14 -14
- package/types/TreeBrowser/TreeButton/index.d.ts +5 -51
- package/types/TreeBrowser/TreeButton/index.d.ts.map +1 -1
- package/types/TreeBrowser/TreeButton/props.d.ts +11 -10
- package/types/TreeBrowser/TreeButton/props.d.ts.map +1 -1
- package/types/TreeBrowser/TreeCollection/index.d.ts +33 -85
- package/types/TreeBrowser/TreeCollection/index.d.ts.map +1 -1
- package/types/TreeBrowser/TreeCollection/props.d.ts +11 -25
- package/types/TreeBrowser/TreeCollection/props.d.ts.map +1 -1
- package/types/TreeBrowser/TreeNode/index.d.ts +4 -12
- package/types/TreeBrowser/TreeNode/index.d.ts.map +1 -1
- package/types/TreeBrowser/TreeNode/props.d.ts +5 -1
- package/types/TreeBrowser/TreeNode/props.d.ts.map +1 -1
- package/types/TreeBrowser/index.d.ts +35 -73
- package/types/TreeBrowser/index.d.ts.map +1 -1
- package/types/TreeBrowser/props.d.ts +113 -16
- package/types/TreeBrowser/props.d.ts.map +1 -1
|
@@ -30,7 +30,7 @@ export declare const TreeBrowserLocator: {
|
|
|
30
30
|
debug: (maxLength?: number | undefined, options?: {
|
|
31
31
|
highlight: boolean;
|
|
32
32
|
} | undefined) => void;
|
|
33
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
33
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
34
34
|
getTextContent: () => string | null;
|
|
35
35
|
getParentNode: () => ParentNode | null;
|
|
36
36
|
parent: () => ParentNode | null;
|
|
@@ -169,7 +169,7 @@ export declare const TreeBrowserLocator: {
|
|
|
169
169
|
debug: (maxLength?: number | undefined, options?: {
|
|
170
170
|
highlight: boolean;
|
|
171
171
|
} | undefined) => void;
|
|
172
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
172
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
173
173
|
getTextContent: () => string | null;
|
|
174
174
|
getParentNode: () => ParentNode | null;
|
|
175
175
|
parent: () => ParentNode | null;
|
|
@@ -315,7 +315,7 @@ export declare const TreeBrowserLocator: {
|
|
|
315
315
|
debug: (maxLength?: number | undefined, options?: {
|
|
316
316
|
highlight: boolean;
|
|
317
317
|
} | undefined) => void;
|
|
318
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
318
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
319
319
|
getTextContent: () => string | null;
|
|
320
320
|
getParentNode: () => ParentNode | null;
|
|
321
321
|
parent: () => ParentNode | null;
|
|
@@ -454,7 +454,7 @@ export declare const TreeBrowserLocator: {
|
|
|
454
454
|
debug: (maxLength?: number | undefined, options?: {
|
|
455
455
|
highlight: boolean;
|
|
456
456
|
} | undefined) => void;
|
|
457
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
457
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
458
458
|
getTextContent: () => string | null;
|
|
459
459
|
getParentNode: () => ParentNode | null;
|
|
460
460
|
parent: () => ParentNode | null;
|
|
@@ -593,7 +593,7 @@ export declare const TreeBrowserLocator: {
|
|
|
593
593
|
debug: (maxLength?: number | undefined, options?: {
|
|
594
594
|
highlight: boolean;
|
|
595
595
|
} | undefined) => void;
|
|
596
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
596
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
597
597
|
getTextContent: () => string | null;
|
|
598
598
|
getParentNode: () => ParentNode | null;
|
|
599
599
|
parent: () => ParentNode | null;
|
|
@@ -733,7 +733,7 @@ export declare const TreeBrowserLocator: {
|
|
|
733
733
|
debug: (maxLength?: number | undefined, options?: {
|
|
734
734
|
highlight: boolean;
|
|
735
735
|
} | undefined) => void;
|
|
736
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
736
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
737
737
|
getTextContent: () => string | null;
|
|
738
738
|
getParentNode: () => ParentNode | null;
|
|
739
739
|
parent: () => ParentNode | null;
|
|
@@ -872,7 +872,7 @@ export declare const TreeBrowserLocator: {
|
|
|
872
872
|
debug: (maxLength?: number | undefined, options?: {
|
|
873
873
|
highlight: boolean;
|
|
874
874
|
} | undefined) => void;
|
|
875
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
875
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
876
876
|
getTextContent: () => string | null;
|
|
877
877
|
getParentNode: () => ParentNode | null;
|
|
878
878
|
parent: () => ParentNode | null;
|
|
@@ -1011,7 +1011,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1011
1011
|
debug: (maxLength?: number | undefined, options?: {
|
|
1012
1012
|
highlight: boolean;
|
|
1013
1013
|
} | undefined) => void;
|
|
1014
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1014
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1015
1015
|
getTextContent: () => string | null;
|
|
1016
1016
|
getParentNode: () => ParentNode | null;
|
|
1017
1017
|
parent: () => ParentNode | null;
|
|
@@ -1151,7 +1151,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1151
1151
|
debug: (maxLength?: number | undefined, options?: {
|
|
1152
1152
|
highlight: boolean;
|
|
1153
1153
|
} | undefined) => void;
|
|
1154
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1154
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1155
1155
|
getTextContent: () => string | null;
|
|
1156
1156
|
getParentNode: () => ParentNode | null;
|
|
1157
1157
|
parent: () => ParentNode | null;
|
|
@@ -1290,7 +1290,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1290
1290
|
debug: (maxLength?: number | undefined, options?: {
|
|
1291
1291
|
highlight: boolean;
|
|
1292
1292
|
} | undefined) => void;
|
|
1293
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1293
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1294
1294
|
getTextContent: () => string | null;
|
|
1295
1295
|
getParentNode: () => ParentNode | null;
|
|
1296
1296
|
parent: () => ParentNode | null;
|
|
@@ -1429,7 +1429,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1429
1429
|
debug: (maxLength?: number | undefined, options?: {
|
|
1430
1430
|
highlight: boolean;
|
|
1431
1431
|
} | undefined) => void;
|
|
1432
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1432
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1433
1433
|
getTextContent: () => string | null;
|
|
1434
1434
|
getParentNode: () => ParentNode | null;
|
|
1435
1435
|
parent: () => ParentNode | null;
|
|
@@ -1569,7 +1569,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1569
1569
|
debug: (maxLength?: number | undefined, options?: {
|
|
1570
1570
|
highlight: boolean;
|
|
1571
1571
|
} | undefined) => void;
|
|
1572
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1572
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1573
1573
|
getTextContent: () => string | null;
|
|
1574
1574
|
getParentNode: () => ParentNode | null;
|
|
1575
1575
|
parent: () => ParentNode | null;
|
|
@@ -1708,7 +1708,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1708
1708
|
debug: (maxLength?: number | undefined, options?: {
|
|
1709
1709
|
highlight: boolean;
|
|
1710
1710
|
} | undefined) => void;
|
|
1711
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1711
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1712
1712
|
getTextContent: () => string | null;
|
|
1713
1713
|
getParentNode: () => ParentNode | null;
|
|
1714
1714
|
parent: () => ParentNode | null;
|
|
@@ -1847,7 +1847,7 @@ export declare const TreeBrowserLocator: {
|
|
|
1847
1847
|
debug: (maxLength?: number | undefined, options?: {
|
|
1848
1848
|
highlight: boolean;
|
|
1849
1849
|
} | undefined) => void;
|
|
1850
|
-
accessible: (options?: Record<string, unknown> | undefined) => Promise<
|
|
1850
|
+
accessible: (options?: Record<string, unknown> | undefined) => Promise<true | Error>;
|
|
1851
1851
|
getTextContent: () => string | null;
|
|
1852
1852
|
getParentNode: () => ParentNode | null;
|
|
1853
1853
|
parent: () => ParentNode | null;
|
|
@@ -7,74 +7,28 @@ import type { TreeBrowserButtonProps } from './props';
|
|
|
7
7
|
parent: TreeBrowser
|
|
8
8
|
id: TreeBrowser.Button
|
|
9
9
|
---
|
|
10
|
+
@tsProps
|
|
10
11
|
**/
|
|
11
12
|
declare class TreeButton extends Component<TreeBrowserButtonProps> {
|
|
12
13
|
static readonly componentId = "TreeBrowser.Button";
|
|
13
|
-
static allowedProps: readonly (keyof
|
|
14
|
-
|
|
15
|
-
name?: string | undefined;
|
|
16
|
-
descriptor?: string | undefined;
|
|
17
|
-
type?: string | undefined;
|
|
18
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
19
|
-
variant?: "folderTree" | "indent" | undefined;
|
|
20
|
-
collectionIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
21
|
-
collectionIconExpanded?: import("react").ReactNode | ((...args: any[]) => any);
|
|
22
|
-
itemIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
23
|
-
thumbnail?: string | undefined;
|
|
24
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
25
|
-
expanded?: boolean | undefined;
|
|
26
|
-
selected?: boolean | undefined;
|
|
27
|
-
focused?: boolean | undefined;
|
|
28
|
-
level?: number | undefined;
|
|
29
|
-
containerRef?: ((...args: any[]) => any) | undefined;
|
|
30
|
-
renderContent?: ((...args: any[]) => any) | undefined;
|
|
31
|
-
})[];
|
|
32
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
33
|
-
id?: string | number | undefined;
|
|
34
|
-
name?: string | undefined;
|
|
35
|
-
descriptor?: string | undefined;
|
|
36
|
-
type?: string | undefined;
|
|
37
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
38
|
-
variant?: "folderTree" | "indent" | undefined;
|
|
39
|
-
collectionIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
40
|
-
collectionIconExpanded?: import("react").ReactNode | ((...args: any[]) => any);
|
|
41
|
-
itemIcon?: import("react").ReactNode | ((...args: any[]) => any);
|
|
42
|
-
thumbnail?: string | undefined;
|
|
43
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
44
|
-
expanded?: boolean | undefined;
|
|
45
|
-
selected?: boolean | undefined;
|
|
46
|
-
focused?: boolean | undefined;
|
|
47
|
-
level?: number | undefined;
|
|
48
|
-
containerRef?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
renderContent?: ((...args: any[]) => any) | undefined;
|
|
50
|
-
}>;
|
|
14
|
+
static allowedProps: readonly ("thumbnail" | "expanded" | keyof import("../props").TreeBrowserCommonProps | "id" | "name" | "descriptor" | "type" | "onClick" | "selected" | "focused" | "level" | "containerRef")[];
|
|
15
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"thumbnail" | "expanded" | keyof import("../props").TreeBrowserCommonProps | "id" | "name" | "descriptor" | "type" | "onClick" | "selected" | "focused" | "level" | "containerRef">;
|
|
51
16
|
static defaultProps: {
|
|
52
17
|
type: string;
|
|
53
18
|
size: string;
|
|
54
19
|
variant: string;
|
|
55
20
|
selected: boolean;
|
|
56
21
|
focused: boolean;
|
|
57
|
-
onClick: () => void;
|
|
58
|
-
id: undefined;
|
|
59
|
-
name: undefined;
|
|
60
|
-
collectionIcon: undefined;
|
|
61
|
-
collectionIconExpanded: undefined;
|
|
62
|
-
itemIcon: undefined;
|
|
63
|
-
thumbnail: undefined;
|
|
64
22
|
expanded: boolean;
|
|
65
|
-
descriptor: undefined;
|
|
66
|
-
level: undefined;
|
|
67
|
-
containerRef: () => void;
|
|
68
|
-
renderContent: undefined;
|
|
69
23
|
};
|
|
70
24
|
ref: Element | null;
|
|
71
25
|
componentDidMount(): void;
|
|
72
26
|
componentDidUpdate(): void;
|
|
73
|
-
defaultContentRenderer(props:
|
|
27
|
+
defaultContentRenderer(props: TreeBrowserButtonProps): jsx.JSX.Element;
|
|
74
28
|
renderImage(): jsx.JSX.Element | undefined;
|
|
75
29
|
renderCollectionIcon(): jsx.JSX.Element | undefined;
|
|
76
30
|
renderItemImage(): jsx.JSX.Element | undefined;
|
|
77
|
-
handleRef: (el:
|
|
31
|
+
handleRef: (el: HTMLButtonElement) => void;
|
|
78
32
|
render(): jsx.JSX.Element;
|
|
79
33
|
}
|
|
80
34
|
export default TreeButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeButton/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeButton/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAKrD;;;;;;GAMG;AACH,cAEM,UAAW,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IACxD,MAAM,CAAC,QAAQ,CAAC,WAAW,wBAAuB;IAElD,MAAM,CAAC,YAAY,kMAAe;IAClC,MAAM,CAAC,SAAS,4PAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;MAOlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,iBAAiB;IAIjB,kBAAkB;IAIlB,sBAAsB,CAAC,KAAK,EAAE,sBAAsB;IAiBpD,WAAW;IAaX,oBAAoB;IAcpB,eAAe;IAef,SAAS,OAAQ,iBAAiB,UAKjC;IAED,MAAM;CAiBP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
3
|
import type { PropValidators, TreeBrowserButtonTheme } from '@instructure/shared-types';
|
|
4
|
+
import type { TreeBrowserCommonProps } from '../props';
|
|
4
5
|
declare type TreeBrowserButtonOwnProps = {
|
|
5
6
|
id?: string | number;
|
|
6
7
|
name?: string;
|
|
7
8
|
descriptor?: string;
|
|
8
|
-
type?: string;
|
|
9
|
-
size?: 'small' | 'medium' | 'large';
|
|
10
|
-
variant?: 'folderTree' | 'indent';
|
|
11
|
-
collectionIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
12
|
-
collectionIconExpanded?: React.ReactNode | ((...args: any[]) => any);
|
|
13
|
-
itemIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
9
|
+
type?: 'collection' | 'item' | string;
|
|
14
10
|
thumbnail?: string;
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Called when this button is clicked
|
|
13
|
+
*/
|
|
14
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
16
15
|
expanded?: boolean;
|
|
17
16
|
selected?: boolean;
|
|
18
17
|
focused?: boolean;
|
|
19
18
|
level?: number;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* A function that returns a reference to the parent li element
|
|
21
|
+
*/
|
|
22
|
+
containerRef?: (el: HTMLElement | null) => void;
|
|
23
|
+
} & TreeBrowserCommonProps;
|
|
23
24
|
declare type PropKeys = keyof TreeBrowserButtonOwnProps;
|
|
24
25
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
25
26
|
declare type TreeBrowserButtonProps = TreeBrowserButtonOwnProps & WithStyleProps<TreeBrowserButtonTheme, TreeBrowserButtonStyle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeButton/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEtD,aAAK,yBAAyB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CAChD,GAAG,sBAAsB,CAAA;AAE1B,aAAK,QAAQ,GAAG,MAAM,yBAAyB,CAAA;AAE/C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,sBAAsB,GAAG,yBAAyB,GACrD,cAAc,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAA;AAEhE,aAAK,sBAAsB,GAAG,cAAc,CACxC,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,MAAM,GACN,WAAW,GACX,MAAM,CACT,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAkBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAkBnB,CAAA;AAED,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,69 +1,33 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
/** @jsxFrag React.Fragment */
|
|
3
|
-
import React, { Component } from 'react';
|
|
3
|
+
import React, { Component, ReactElement, SyntheticEvent } from 'react';
|
|
4
4
|
import { jsx } from '@instructure/emotion';
|
|
5
|
-
import type { TreeBrowserCollectionProps } from './props';
|
|
5
|
+
import type { TreeBrowserCollectionProps, TreeCollectionState } from './props';
|
|
6
|
+
import { CollectionItem, CollectionProps, CollectionData } from '../props';
|
|
6
7
|
/**
|
|
7
8
|
---
|
|
8
9
|
parent: TreeBrowser
|
|
9
10
|
id: TreeBrowser.Collection
|
|
10
11
|
---
|
|
12
|
+
@tsProps
|
|
11
13
|
**/
|
|
12
|
-
declare class TreeCollection extends Component<TreeBrowserCollectionProps> {
|
|
14
|
+
declare class TreeCollection extends Component<TreeBrowserCollectionProps, TreeCollectionState> {
|
|
13
15
|
static readonly componentId = "TreeBrowser.Collection";
|
|
14
|
-
static allowedProps: readonly (keyof {
|
|
15
|
-
id
|
|
16
|
-
name
|
|
16
|
+
static allowedProps: readonly ("collections" | "items" | "expanded" | "onItemClick" | "getItemProps" | "getCollectionProps" | "onCollectionClick" | keyof import("../props").TreeBrowserCommonProps | "level" | "position" | "onKeyDown" | "numChildren" | "selection" | "isCollectionFlattened" | keyof {
|
|
17
|
+
id: string | number;
|
|
18
|
+
name: string;
|
|
17
19
|
descriptor?: string | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
selection?: string | undefined;
|
|
22
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
23
|
-
variant?: "folderTree" | "indent" | undefined;
|
|
24
|
-
collectionIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
25
|
-
collectionIconExpanded?: React.ReactNode | ((...args: any[]) => any);
|
|
26
|
-
itemIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
27
|
-
getItemProps?: ((...args: any[]) => any) | undefined;
|
|
28
|
-
getCollectionProps?: ((...args: any[]) => any) | undefined;
|
|
29
|
-
onItemClick?: ((...args: any[]) => any) | undefined;
|
|
30
|
-
onCollectionClick?: ((...args: any[]) => any) | undefined;
|
|
31
|
-
onKeyDown?: ((...args: any[]) => any) | undefined;
|
|
32
|
-
numChildren?: number | undefined;
|
|
33
|
-
level?: number | undefined;
|
|
34
|
-
position?: number | undefined;
|
|
35
|
-
renderBeforeItems?: any;
|
|
36
|
-
renderAfterItems?: any;
|
|
37
|
-
containerRef?: ((...args: any[]) => any) | undefined;
|
|
38
|
-
isCollectionFlattened?: boolean | undefined;
|
|
39
|
-
renderContent?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
containerRef?: ((el: HTMLElement | null) => void) | undefined;
|
|
21
|
+
renderBeforeItems?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
22
|
+
renderAfterItems?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
40
23
|
})[];
|
|
41
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
42
|
-
id
|
|
43
|
-
name
|
|
24
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"collections" | "items" | "expanded" | "onItemClick" | "getItemProps" | "getCollectionProps" | "onCollectionClick" | keyof import("../props").TreeBrowserCommonProps | "level" | "position" | "onKeyDown" | "numChildren" | "selection" | "isCollectionFlattened" | keyof {
|
|
25
|
+
id: string | number;
|
|
26
|
+
name: string;
|
|
44
27
|
descriptor?: string | undefined;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
selection?: string | undefined;
|
|
49
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
50
|
-
variant?: "folderTree" | "indent" | undefined;
|
|
51
|
-
collectionIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
52
|
-
collectionIconExpanded?: React.ReactNode | ((...args: any[]) => any);
|
|
53
|
-
itemIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
54
|
-
getItemProps?: ((...args: any[]) => any) | undefined;
|
|
55
|
-
getCollectionProps?: ((...args: any[]) => any) | undefined;
|
|
56
|
-
onItemClick?: ((...args: any[]) => any) | undefined;
|
|
57
|
-
onCollectionClick?: ((...args: any[]) => any) | undefined;
|
|
58
|
-
onKeyDown?: ((...args: any[]) => any) | undefined;
|
|
59
|
-
numChildren?: number | undefined;
|
|
60
|
-
level?: number | undefined;
|
|
61
|
-
position?: number | undefined;
|
|
62
|
-
renderBeforeItems?: any;
|
|
63
|
-
renderAfterItems?: any;
|
|
64
|
-
containerRef?: ((...args: any[]) => any) | undefined;
|
|
65
|
-
isCollectionFlattened?: boolean | undefined;
|
|
66
|
-
renderContent?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
containerRef?: ((el: HTMLElement | null) => void) | undefined;
|
|
29
|
+
renderBeforeItems?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
30
|
+
renderAfterItems?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
67
31
|
}>;
|
|
68
32
|
static defaultProps: {
|
|
69
33
|
collections: never[];
|
|
@@ -72,51 +36,35 @@ declare class TreeCollection extends Component<TreeBrowserCollectionProps> {
|
|
|
72
36
|
selection: string;
|
|
73
37
|
size: string;
|
|
74
38
|
variant: string;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
onKeyDown: () => void;
|
|
78
|
-
id: undefined;
|
|
79
|
-
name: undefined;
|
|
80
|
-
descriptor: undefined;
|
|
81
|
-
collectionIconExpanded: undefined;
|
|
82
|
-
collectionIcon: undefined;
|
|
83
|
-
itemIcon: undefined;
|
|
84
|
-
getItemProps: (props: any) => any;
|
|
85
|
-
getCollectionProps: (props: any) => any;
|
|
86
|
-
numChildren: undefined;
|
|
87
|
-
level: undefined;
|
|
88
|
-
position: undefined;
|
|
89
|
-
renderBeforeItems: null;
|
|
90
|
-
renderAfterItems: null;
|
|
91
|
-
containerRef: () => void;
|
|
39
|
+
getItemProps: (props: unknown) => unknown;
|
|
40
|
+
getCollectionProps: (props: unknown) => unknown;
|
|
92
41
|
isCollectionFlattened: boolean;
|
|
93
|
-
renderContent: undefined;
|
|
94
42
|
};
|
|
95
43
|
ref: Element | null;
|
|
96
|
-
constructor(props:
|
|
44
|
+
constructor(props: TreeBrowserCollectionProps);
|
|
97
45
|
componentDidMount(): void;
|
|
98
46
|
componentDidUpdate(): void;
|
|
99
|
-
get itemsLevel(): number
|
|
100
|
-
handleFocus: (e:
|
|
101
|
-
handleBlur: (e:
|
|
102
|
-
handleCollectionClick: (e:
|
|
103
|
-
handleCollectionKeyDown: (e:
|
|
47
|
+
get itemsLevel(): number;
|
|
48
|
+
handleFocus: (e: SyntheticEvent, item: CollectionData) => void;
|
|
49
|
+
handleBlur: (e: SyntheticEvent, _item: CollectionData) => void;
|
|
50
|
+
handleCollectionClick: (e: React.MouseEvent) => void;
|
|
51
|
+
handleCollectionKeyDown: (e: React.KeyboardEvent) => void;
|
|
104
52
|
get collectionsCount(): number;
|
|
105
53
|
get itemsCount(): number;
|
|
106
54
|
get childCount(): number;
|
|
107
55
|
renderChildren(): jsx.JSX.Element;
|
|
108
|
-
renderCollectionChildren(collectionId:
|
|
109
|
-
renderCollectionNode(collection:
|
|
110
|
-
renderItemNode(item:
|
|
56
|
+
renderCollectionChildren(collectionId: string | number | undefined, child: ReactElement, position: number, keyword: 'before' | 'after'): jsx.JSX.Element;
|
|
57
|
+
renderCollectionNode(collection: CollectionProps, position: number): jsx.JSX.Element;
|
|
58
|
+
renderItemNode(item: CollectionItem, position: number): jsx.JSX.Element;
|
|
111
59
|
getCommonButtonProps(): {
|
|
112
|
-
id: string | number
|
|
113
|
-
name: string
|
|
60
|
+
id: string | number;
|
|
61
|
+
name: string;
|
|
114
62
|
descriptor: string | undefined;
|
|
115
63
|
size: "small" | "medium" | "large" | undefined;
|
|
116
64
|
variant: "folderTree" | "indent" | undefined;
|
|
117
|
-
itemIcon: React.ReactNode | ((
|
|
118
|
-
level: number
|
|
119
|
-
renderContent: ((
|
|
65
|
+
itemIcon: React.ReactNode | ((props: unknown) => React.ReactNode);
|
|
66
|
+
level: number;
|
|
67
|
+
renderContent: ((props: import("../TreeButton/props").TreeBrowserButtonProps) => JSX.Element) | undefined;
|
|
120
68
|
};
|
|
121
69
|
render(): jsx.JSX.Element;
|
|
122
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeCollection/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,8BAA8B;AAE9B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeCollection/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,8BAA8B;AAE9B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGtE,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAOrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE9E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAI1E;;;;;;GAMG;AACH,cAEM,cAAe,SAAQ,SAAS,CACpC,0BAA0B,EAC1B,mBAAmB,CACpB;IACC,MAAM,CAAC,QAAQ,CAAC,WAAW,4BAA2B;IAEtD,MAAM,CAAC,YAAY;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;8BAOK,OAAO;oCACD,OAAO;;MAEpC;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;gBAEd,KAAK,EAAE,0BAA0B;IAK7C,iBAAiB;IAGjB,kBAAkB;IAIlB,IAAI,UAAU,WAGb;IAED,WAAW,MAAO,cAAc,QAAQ,cAAc,UAGrD;IAED,UAAU,MAAO,cAAc,SAAS,cAAc,UAGrD;IAED,qBAAqB,MAAO,gBAAgB,UAU3C;IAED,uBAAuB,MAAO,mBAAmB,UAUhD;IAED,IAAI,gBAAgB,WAGnB;IAED,IAAI,UAAU,WAGb;IAED,IAAI,UAAU,WAOb;IAED,cAAc;IA+Bd,wBAAwB,CACtB,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACzC,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,QAAQ,GAAG,OAAO;IAqD7B,oBAAoB,CAAC,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM;IAsBlE,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM;IA4CrD,oBAAoB;;;;;;;;;;IAapB,MAAM;CA6DP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { CollectionData } from '../props';
|
|
2
3
|
import type { PropValidators, TreeBrowserCollectionTheme } from '@instructure/shared-types';
|
|
3
4
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
5
|
+
import { CollectionProps, TreeBrowserBaseProps } from '../props';
|
|
4
6
|
declare type TreeBrowserCollectionOwnProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
items?: any[];
|
|
9
|
-
collections?: any[];
|
|
10
|
-
expanded?: boolean;
|
|
11
|
-
selection?: string;
|
|
12
|
-
size?: 'small' | 'medium' | 'large';
|
|
13
|
-
variant?: 'folderTree' | 'indent';
|
|
14
|
-
collectionIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
15
|
-
collectionIconExpanded?: React.ReactNode | ((...args: any[]) => any);
|
|
16
|
-
itemIcon?: React.ReactNode | ((...args: any[]) => any);
|
|
17
|
-
getItemProps?: (...args: any[]) => any;
|
|
18
|
-
getCollectionProps?: (...args: any[]) => any;
|
|
19
|
-
onItemClick?: (...args: any[]) => any;
|
|
20
|
-
onCollectionClick?: (...args: any[]) => any;
|
|
21
|
-
onKeyDown?: (...args: any[]) => any;
|
|
7
|
+
level: number;
|
|
8
|
+
onKeyDown?: (e: React.KeyboardEvent, data: CollectionData) => void;
|
|
9
|
+
onItemClick?: (e: React.MouseEvent, data: CollectionData) => void;
|
|
22
10
|
numChildren?: number;
|
|
23
|
-
level?: number;
|
|
24
11
|
position?: number;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
containerRef?: (...args: any[]) => any;
|
|
28
|
-
isCollectionFlattened?: boolean;
|
|
29
|
-
renderContent?: (...args: any[]) => any;
|
|
30
|
-
};
|
|
12
|
+
selection?: string;
|
|
13
|
+
} & CollectionProps & TreeBrowserBaseProps;
|
|
31
14
|
declare type PropKeys = keyof TreeBrowserCollectionOwnProps;
|
|
32
15
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
33
16
|
declare type TreeBrowserCollectionProps = TreeBrowserCollectionOwnProps & WithStyleProps<TreeBrowserCollectionTheme, TreeBrowserCollectionStyle>;
|
|
34
17
|
declare type TreeBrowserCollectionStyle = ComponentStyle<'treeCollection' | 'list' | 'item'>;
|
|
35
18
|
declare const propTypes: PropValidators<PropKeys>;
|
|
36
19
|
declare const allowedProps: AllowedPropKeys;
|
|
37
|
-
|
|
20
|
+
declare type TreeCollectionState = {
|
|
21
|
+
focused: string;
|
|
22
|
+
};
|
|
23
|
+
export type { TreeBrowserCollectionProps, TreeBrowserCollectionStyle, TreeCollectionState };
|
|
38
24
|
export { propTypes, allowedProps };
|
|
39
25
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeCollection/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeCollection/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,KAAK,EACV,cAAc,EACd,0BAA0B,EAC3B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAEhE,aAAK,6BAA6B,GAAG;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAElE,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IACjE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,eAAe,GACjB,oBAAoB,CAAA;AAEtB,aAAK,QAAQ,GAAG,MAAM,6BAA6B,CAAA;AAEnD,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,0BAA0B,GAAG,6BAA6B,GAC7D,cAAc,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAAA;AAExE,aAAK,0BAA0B,GAAG,cAAc,CAC9C,gBAAgB,GAAG,MAAM,GAAG,MAAM,CACnC,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA0BvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eA0BnB,CAAA;AAED,aAAK,mBAAmB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9C,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,mBAAmB,EACpB,CAAA;AACD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -7,32 +7,24 @@ import type { TreeBrowserNodeProps } from './props';
|
|
|
7
7
|
parent: TreeBrowser
|
|
8
8
|
id: TreeBrowser.Node
|
|
9
9
|
---
|
|
10
|
+
@tsProps
|
|
10
11
|
A helper class used to render the :renderBeforeItems and :renderAfterItems
|
|
11
12
|
in the TreeBrowser.
|
|
12
13
|
**/
|
|
13
14
|
declare class TreeNode extends Component<TreeBrowserNodeProps> {
|
|
14
15
|
static readonly componentId = "TreeBrowser.Node";
|
|
15
|
-
static allowedProps: readonly ("
|
|
16
|
-
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"
|
|
16
|
+
static allowedProps: readonly ("thumbnail" | "size" | "variant" | "itemIcon" | "id" | "onClick" | "selected" | "focused" | "level" | "containerRef" | "children" | "onKeyDown")[];
|
|
17
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<"thumbnail" | "size" | "variant" | "itemIcon" | "id" | "onClick" | "selected" | "focused" | "level" | "containerRef" | "children" | "onKeyDown">;
|
|
17
18
|
static defaultProps: {
|
|
18
|
-
id: undefined;
|
|
19
19
|
size: string;
|
|
20
20
|
variant: string;
|
|
21
21
|
selected: boolean;
|
|
22
22
|
focused: boolean;
|
|
23
|
-
children: undefined;
|
|
24
|
-
itemIcon: undefined;
|
|
25
|
-
thumbnail: undefined;
|
|
26
|
-
level: undefined;
|
|
27
|
-
containerRef: () => void;
|
|
28
|
-
parentRef: undefined;
|
|
29
|
-
onKeyDown: undefined;
|
|
30
|
-
onClick: undefined;
|
|
31
23
|
};
|
|
32
24
|
ref: Element | null;
|
|
33
25
|
componentDidMount(): void;
|
|
34
26
|
componentDidUpdate(): void;
|
|
35
|
-
handleRef: (el:
|
|
27
|
+
handleRef: (el: HTMLDivElement) => void;
|
|
36
28
|
renderItemImage(): jsx.JSX.Element | undefined;
|
|
37
29
|
render(): jsx.JSX.Element;
|
|
38
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeNode/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeNode/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKnD;;;;;;;;GAQG;AACH,cAEM,QAAS,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACpD,MAAM,CAAC,QAAQ,CAAC,WAAW,sBAAqB;IAEhD,MAAM,CAAC,YAAY,+JAAe;IAClC,MAAM,CAAC,SAAS,yNAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,iBAAiB;IAIjB,kBAAkB;IAIlB,SAAS,OAAQ,cAAc,UAK9B;IAED,eAAe;IAef,MAAM;CAWP;AAED,eAAe,QAAQ,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -2,8 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import type { PropValidators, TreeBrowserButtonTheme } from '@instructure/shared-types';
|
|
3
3
|
import type { WithStyleProps } from '@instructure/emotion';
|
|
4
4
|
import type { TreeBrowserButtonProps, TreeBrowserButtonStyle } from '../TreeButton/props';
|
|
5
|
+
import { CollectionData } from '../props';
|
|
5
6
|
declare type TreeBrowserNodeOwnProps = Pick<TreeBrowserButtonProps, 'id' | 'size' | 'variant' | 'selected' | 'focused' | 'itemIcon' | 'thumbnail' | 'level' | 'containerRef' | 'onClick'> & {
|
|
6
|
-
onKeyDown?: (
|
|
7
|
+
onKeyDown?: (e: React.KeyboardEvent, data: CollectionData) => void;
|
|
8
|
+
/**
|
|
9
|
+
* The children to be rendered within the `<TreeNode />`
|
|
10
|
+
*/
|
|
7
11
|
children?: React.ReactNode;
|
|
8
12
|
};
|
|
9
13
|
declare type PropKeys = keyof TreeBrowserNodeOwnProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeNode/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/TreeBrowser/TreeNode/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,aAAK,uBAAuB,GAAG,IAAI,CACjC,sBAAsB,EACpB,IAAI,GACJ,MAAM,GACN,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,WAAW,GACX,OAAO,GACP,cAAc,GACd,SAAS,CACZ,GAAG;IACF,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,uBAAuB,CAAA;AAE7C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,oBAAoB,GAAG,uBAAuB,GACjD,cAAc,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAA;AAEhE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAavC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAanB,CAAA;AAED,YAAY,EAAE,oBAAoB,EAAE,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|