@progress/kendo-react-orgchart 7.2.4-develop.3 → 7.3.0-develop.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.
Files changed (53) hide show
  1. package/OrgChart.js +8 -0
  2. package/OrgChart.mjs +83 -0
  3. package/client/ClientOrgChart.js +8 -0
  4. package/client/ClientOrgChart.mjs +236 -0
  5. package/client/ExpandButton.js +8 -0
  6. package/client/ExpandButton.mjs +36 -0
  7. package/client/OrgChartCard.js +8 -0
  8. package/client/OrgChartCard.mjs +59 -0
  9. package/client/OrgChartCardBody.js +8 -0
  10. package/client/OrgChartCardBody.mjs +18 -0
  11. package/client/OrgChartGroupContainer.js +8 -0
  12. package/client/OrgChartGroupContainer.mjs +58 -0
  13. package/dist/cdn/js/kendo-react-orgchart.js +8 -18
  14. package/index.d.mts +520 -5
  15. package/index.d.ts +520 -12
  16. package/index.js +8 -18
  17. package/index.mjs +17 -1146
  18. package/package-metadata.js +8 -0
  19. package/package-metadata.mjs +19 -0
  20. package/package.json +4 -4
  21. package/processOrgChartItems.js +8 -0
  22. package/processOrgChartItems.mjs +84 -0
  23. package/server/ServerGroupedOrgChart.js +8 -0
  24. package/server/ServerGroupedOrgChart.mjs +260 -0
  25. package/server/ServerOrgChart.js +8 -0
  26. package/server/ServerOrgChart.mjs +210 -0
  27. package/server/ServerOrgChartGroup.js +8 -0
  28. package/server/ServerOrgChartGroup.mjs +114 -0
  29. package/server/ServerOrgChartNode.js +8 -0
  30. package/server/ServerOrgChartNode.mjs +95 -0
  31. package/theming/theme-service.js +21 -0
  32. package/theming/theme-service.mjs +60 -0
  33. package/utils/consts.js +8 -0
  34. package/utils/consts.mjs +24 -0
  35. package/OrgChart.d.ts +0 -10
  36. package/OrgChartOperationDescriptors.d.ts +0 -80
  37. package/client/ClientOrgChart.d.ts +0 -98
  38. package/client/ExpandButton.d.ts +0 -17
  39. package/client/OrgChartCard.d.ts +0 -23
  40. package/client/OrgChartCardBody.d.ts +0 -16
  41. package/client/OrgChartGroupContainer.d.ts +0 -23
  42. package/interfaces/ChildGroup.d.ts +0 -20
  43. package/interfaces/OrgChartActionEvent.d.ts +0 -25
  44. package/interfaces/OrgChartExpandChangeEvent.d.ts +0 -25
  45. package/interfaces/SeverOrgChartProps.d.ts +0 -109
  46. package/package-metadata.d.ts +0 -9
  47. package/processOrgChartItems.d.ts +0 -55
  48. package/server/ServerGroupedOrgChart.d.ts +0 -12
  49. package/server/ServerOrgChart.d.ts +0 -12
  50. package/server/ServerOrgChartGroup.d.ts +0 -100
  51. package/server/ServerOrgChartNode.d.ts +0 -79
  52. package/theming/theme-service.d.ts +0 -9
  53. package/utils/consts.d.ts +0 -76
@@ -1,25 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Represents the OrgChartExpandChangeEvent event argument.
7
- */
8
- export interface OrgChartExpandChangeEvent {
9
- /**
10
- * Represents the triggered React event.
11
- */
12
- event: React.MouseEvent | React.KeyboardEvent;
13
- /**
14
- * Represents expand value of the item or group.
15
- */
16
- expand: boolean;
17
- /**
18
- * Item that triggers the event.
19
- */
20
- item?: any;
21
- /**
22
- * Items that belong to the group that triggers the event.
23
- */
24
- items?: any[];
25
- }
@@ -1,109 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { OrgChartGroupSubtitleProps, OrgChartGroupTitleProps } from '../server/ServerOrgChartGroup';
6
- import { OrgChartItemRenderProps } from '../server/ServerOrgChartNode';
7
- /**
8
- * @hidden
9
- */
10
- export interface ServerOrgChartProps {
11
- /**
12
- * @hidden
13
- */
14
- children?: React.ReactNode;
15
- /**
16
- * Sets additional classes to the OrgChart.
17
- */
18
- className?: string;
19
- /**
20
- * Sets custom id to the OrgChart.
21
- */
22
- id?: string;
23
- /**
24
- * Sets custom aria-label to the OrgChart. The default value is "Org Chart"
25
- */
26
- ariaLabel?: string;
27
- /**
28
- * Specifies the name of the field which will provide a id for the item. Defaults to `id`.
29
- */
30
- idField?: string;
31
- /**
32
- * Specifies the name of the field which will provide an array representation of the item children.
33
- */
34
- childrenField?: string;
35
- /**
36
- * Specifies the name of the field which will provide a Boolean representation for the expanded state of the item. Defaults to `expanded`.
37
- */
38
- expandField?: string;
39
- /**
40
- * Specifies the name of the field which will provide a title representation for the item. Defaults to `text`.
41
- */
42
- titleField?: string;
43
- /**
44
- * Specifies the name of the field which indicates to the OrgChart that an item has
45
- * children even if the children are not initially passed. Used for implementing the load-on-demand feature.
46
- * Defaults to `undefined`.
47
- */
48
- hasChildrenField?: string;
49
- /**
50
- * Specifies the name of the field which will provide a subtitle representation for the item. Defaults to `text`.
51
- */
52
- subtitleField?: string;
53
- /**
54
- * Specifies the avatar of the field which will provide a avatar representation for the item. Defaults to `text`.
55
- */
56
- avatarField?: string;
57
- /**
58
- * Specifies a string array with the colors applied to the items. By default the colors come from the Kendo Theme that is used.
59
- */
60
- cardsColors?: string[];
61
- /**
62
- * The styles that are applied to the OrgChart.
63
- */
64
- style?: React.CSSProperties;
65
- /**
66
- * Sets the data of the OrgChart.
67
- */
68
- data?: any[];
69
- /**
70
- * Specifies the field by which the OrgChart data is grouped.
71
- */
72
- groupField?: string;
73
- /**
74
- * Specifies the height of the card of the OrgChart.
75
- */
76
- cardHeight?: number;
77
- /**
78
- * Specifies the width of the card of the OrgChart.
79
- */
80
- cardWidth?: number;
81
- /**
82
- * Specifies the height of the title of the grouped OrgChart.
83
- */
84
- groupTitleHeight?: number;
85
- /**
86
- * Specifies the height of the subtitle of the grouped OrgChart.
87
- */
88
- groupSubtitleHeight?: number;
89
- /**
90
- * Defines the component that will be used for rendering each of the OrgChart items.
91
- */
92
- itemRender?: React.ComponentType<OrgChartItemRenderProps>;
93
- /**
94
- * Defines the component that will be used for rendering each of the grouped OrgChart title.
95
- */
96
- groupTitleRender?: React.ComponentType<OrgChartGroupTitleProps>;
97
- /**
98
- * Defines the component that will be used for rendering each of the grouped OrgChart subtitle.
99
- */
100
- groupSubtitleRender?: React.ComponentType<OrgChartGroupSubtitleProps>;
101
- /**
102
- * Specifies the height of the vertical line of the OrgChart.
103
- */
104
- verticalLine?: number;
105
- /**
106
- * Specifies the width the OrgChart.
107
- */
108
- height?: string | number;
109
- }
@@ -1,9 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { PackageMetadata } from '@progress/kendo-licensing';
6
- /**
7
- * @hidden
8
- */
9
- export declare const packageMetadata: PackageMetadata;
@@ -1,55 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { OrgChartOperationDescriptors } from './OrgChartOperationDescriptors';
6
- /**
7
- * A helper function which applies the specified operation descriptors to the data.
8
- * * [Expanding and collapsing items]({% slug expansion_ways_treeview %}#toc-using-a-helper-function)
9
- * * [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)
10
- * * [Checking and unchecking items]({% slug check_helper_funcs_treeview %})
11
- *
12
- * @param data - The data that will be processed.
13
- * @param operations - The operation descriptors that will be applied to the data.
14
- * @returns - The processed copy of the input data.
15
- *
16
- * @example
17
- * ```jsx
18
- * class App extends React.Component {
19
- * state = { items: tree, expand: [], select: [], check: [] };
20
- * render() {
21
- * const { expand, select, check } = this.state;
22
- * return (
23
- * <OrgChart
24
- * data={processOrgChartItems(this.state.items, { expand, select, check })}
25
- * expandIcons={true} onExpandChange={this.onExpandChange} checkboxes={true}
26
- * onCheckChange={event => this.setState({ check: [ event.itemHierarchicalIndex ] })}
27
- * onItemClick={event => this.setState({ select: [ event.itemHierarchicalIndex ] })}
28
- * />
29
- * );
30
- * }
31
- * onExpandChange = (event) => {
32
- * let expand = this.state.expand.slice();
33
- * const index = expand.indexOf(event.itemHierarchicalIndex);
34
- * index === -1 ? expand.push(event.itemHierarchicalIndex) : expand.splice(index, 1);
35
- * this.setState({ expand });
36
- * }
37
- * }
38
- *
39
- * const tree = [{
40
- * text: 'Item1',
41
- * items: [
42
- * { text: 'Item1.1' },
43
- * { text: 'Item1.2' },
44
- * { text: 'Item1.3', items: [{ text: 'Item1.3.1' }] }]
45
- * }, {
46
- * text: 'Item2', disabled: true,
47
- * items: [{ text: 'Item2.1' }, { text: 'Item2.2' }, { text: 'Item2.3' }]
48
- * }, {
49
- * text: 'Item3'
50
- * }];
51
- *
52
- * ReactDOM.render(<App />, document.querySelector('my-app'));
53
- * ```
54
- */
55
- export declare function processOrgChartItems(data: any[] | null | undefined, operations: OrgChartOperationDescriptors): any[];
@@ -1,12 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ServerOrgChartProps } from '../interfaces/SeverOrgChartProps';
6
- /**
7
- * @hidden
8
- */
9
- export declare const ServerGroupedOrgChart: {
10
- (props: ServerOrgChartProps): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
@@ -1,12 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ServerOrgChartProps } from '../interfaces/SeverOrgChartProps';
6
- /**
7
- * @hidden
8
- */
9
- export declare const ServerOrgChart: {
10
- (props: ServerOrgChartProps): import("react/jsx-runtime").JSX.Element;
11
- displayName: string;
12
- };
@@ -1,100 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- /**
7
- * @hidden
8
- */
9
- export interface OrgChartGroupTitleProps {
10
- /**
11
- * The styles that are applied to the OrgChart group title.
12
- */
13
- style?: React.CSSProperties;
14
- /**
15
- * The default class that is applied to the OrgChart group title.
16
- */
17
- className?: string;
18
- /**
19
- * The default title that are passed to the OrgChart group.
20
- */
21
- title?: string;
22
- /**
23
- * The collection of inner items of the group.
24
- */
25
- items?: any[];
26
- /**
27
- * The level of the group.
28
- */
29
- level?: number;
30
- /**
31
- * The expanded state of the group.
32
- */
33
- expanded?: boolean;
34
- }
35
- /**
36
- * @hidden
37
- */
38
- export interface OrgChartGroupSubtitleProps {
39
- /**
40
- * The styles that are applied to the OrgChart.
41
- */
42
- style?: React.CSSProperties;
43
- /**
44
- * The default class that is applied to the OrgChart group title.
45
- */
46
- className?: string;
47
- /**
48
- * The default subtitle that are passed to the OrgChart group.
49
- */
50
- subtitle?: string;
51
- /**
52
- * The collection of inner items of the group.
53
- */
54
- items?: any[];
55
- /**
56
- * The level of the group.
57
- */
58
- level?: number;
59
- /**
60
- * The expanded state of the group.
61
- */
62
- expanded?: boolean;
63
- }
64
- /**
65
- * @hidden
66
- */
67
- export interface ServerOrgChartGroupProps {
68
- /**
69
- * @hidden
70
- */
71
- children?: React.ReactNode;
72
- /**
73
- * Sets additional classes to the OrgChart.
74
- */
75
- className?: string;
76
- id?: string;
77
- /**
78
- * The styles that are applied to the OrgChart.
79
- */
80
- style?: React.CSSProperties;
81
- title?: string;
82
- subtitle?: string;
83
- line?: boolean;
84
- plus?: boolean;
85
- focus?: boolean;
86
- expanded?: boolean;
87
- nodes?: any[];
88
- level: number;
89
- groupTitleHeight?: number;
90
- groupSubtitleHeight?: number;
91
- childLineWidth?: number;
92
- verticalLine?: number;
93
- orientation?: 'horizontal' | 'vertical';
94
- groupTitleRender?: React.ComponentType<OrgChartGroupTitleProps>;
95
- groupSubtitleRender?: React.ComponentType<OrgChartGroupSubtitleProps>;
96
- }
97
- /**
98
- * @hidden
99
- */
100
- export declare const ServerOrgChartGroup: React.FunctionComponent<ServerOrgChartGroupProps>;
@@ -1,79 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { OrgChartActionEvent, OrgChartExpandChangeEvent } from '..';
7
- /**
8
- * The props that are passed to the itemRender component.
9
- */
10
- export interface OrgChartItemRenderProps {
11
- /**
12
- * The item passed to the ItemRender.
13
- */
14
- item?: any;
15
- /**
16
- * The title of the item.
17
- */
18
- title?: string;
19
- /**
20
- * The subtitle of the item.
21
- */
22
- subtitle?: string;
23
- /**
24
- * The level of the item.
25
- */
26
- level?: number;
27
- /**
28
- * The expanded state of the item.
29
- */
30
- expanded?: boolean;
31
- /**
32
- * The color of the item.
33
- */
34
- color?: string;
35
- }
36
- /**
37
- * @hidden
38
- */
39
- export interface ServerOrgChartNodeProps {
40
- /**
41
- * @hidden
42
- */
43
- children?: React.ReactNode;
44
- /**
45
- * Sets additional classes to the OrgChart.
46
- */
47
- className?: string;
48
- /**
49
- * Passes the OrgChart id to the node.
50
- */
51
- id?: string;
52
- /**
53
- * The styles that are applied to the OrgChart.
54
- */
55
- style?: React.CSSProperties;
56
- level: number;
57
- childLineWidth?: number;
58
- title?: string;
59
- subtitle?: string;
60
- details?: boolean;
61
- color?: string;
62
- line?: boolean;
63
- plus?: boolean;
64
- expanded?: boolean;
65
- avatar?: string;
66
- avatarType?: string;
67
- cardHeight?: number;
68
- cardWidth?: number;
69
- verticalLine?: number;
70
- itemRender?: React.ComponentType<OrgChartItemRenderProps>;
71
- onExpandChange?: (ev: OrgChartExpandChangeEvent) => void;
72
- onItemAction?: (ev: OrgChartActionEvent) => void;
73
- onItemKeyDown?: (ev: OrgChartActionEvent) => void;
74
- node?: any;
75
- }
76
- /**
77
- * @hidden
78
- */
79
- export declare const ServerOrgChartNode: React.FunctionComponent<ServerOrgChartNodeProps>;
@@ -1,9 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- declare const loadTheme: (done: any, doc: Document) => void;
9
- export { loadTheme };
package/utils/consts.d.ts DELETED
@@ -1,76 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export declare const EXPAND_FIELD = "expanded";
9
- /**
10
- * @hidden
11
- */
12
- export declare const TEXT_FIELD = "text";
13
- /**
14
- * @hidden
15
- */
16
- export declare const DISABLED_FIELD = "disabled";
17
- /**
18
- * @hidden
19
- */
20
- export declare const CHILDREN_FIELD = "items";
21
- /**
22
- * @hidden
23
- */
24
- export declare const HAS_CHILDREN_FIELD = "hasChildren";
25
- /**
26
- * @hidden
27
- */
28
- export declare const SELECT_FIELD = "selected";
29
- /**
30
- * @hidden
31
- */
32
- export declare const CHECK_FIELD = "checked";
33
- /**
34
- * @hidden
35
- */
36
- export declare const CHECK_INDETERMINATE_FIELD = "checkIndeterminate";
37
- /**
38
- * @hidden
39
- */
40
- export declare const DOM_KENDO_ITEM_ID_FIELD = "_kendoItemId";
41
- /**
42
- * @hidden
43
- */
44
- export declare const DOM_KENDO_TREEVIEW_GUID_FIELD = "_kendoOrgChartGuid";
45
- /**
46
- * @hidden
47
- */
48
- export declare const ORGCHART_CLASSNAME = "k-orgchart";
49
- /**
50
- * @hidden
51
- */
52
- export declare const NODE_HEIGHT = 80;
53
- /**
54
- * @hidden
55
- */
56
- export declare const NODE_WIDTH = 300;
57
- /**
58
- * @hidden
59
- */
60
- export declare const HORIZONTAL_GAP = 25;
61
- /**
62
- * @hidden
63
- */
64
- export declare const VERTICAL_LINE = 40;
65
- /**
66
- * @hidden
67
- */
68
- export declare const GROUP_TITLE_HEIGHT = 20;
69
- /**
70
- * @hidden
71
- */
72
- export declare const GROUP_SUBTITLE_HEIGHT = 20;
73
- /**
74
- * @hidden
75
- */
76
- export declare const GROUP_PADDINGS = 82;