@progress/kendo-react-pivotgrid 6.1.1 → 7.0.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 (132) hide show
  1. package/LICENSE.md +1 -1
  2. package/{dist/npm/PivotGrid.d.ts → PivotGrid.d.ts} +4 -0
  3. package/{dist/es/components → components}/AxesEditor.d.ts +4 -6
  4. package/{dist/npm/components → components}/AxisEditor.d.ts +4 -0
  5. package/{dist/es/components → components}/AxisFilterFieldsEditor.d.ts +4 -0
  6. package/{dist/npm/components → components}/Cell.d.ts +4 -0
  7. package/{dist/es/components → components}/Column.d.ts +4 -0
  8. package/{dist/npm/components → components}/Configurator.d.ts +4 -0
  9. package/{dist/npm/components → components}/ConfiguratorButton.d.ts +4 -0
  10. package/{dist/es/components → components}/ConfiguratorEditor.d.ts +4 -0
  11. package/{dist/es/components → components}/Container.d.ts +4 -0
  12. package/components/EditorContext.d.ts +11 -0
  13. package/{dist/npm/components → components}/FieldsEditor.d.ts +4 -0
  14. package/{dist/es/components → components}/HeaderCell.d.ts +4 -0
  15. package/{dist/es/components → components}/Row.d.ts +4 -0
  16. package/dist/cdn/js/kendo-react-pivotgrid.js +5 -2
  17. package/hooks/index.d.ts +6 -0
  18. package/{dist/es/hooks → hooks}/useExpansion.d.ts +5 -1
  19. package/{dist/es/hooks → hooks}/useHeaders.d.ts +5 -1
  20. package/hooks/useHorizontalScrollSync.d.ts +9 -0
  21. package/{dist/es/hooks → hooks}/usePivotConfiguratorEditor.d.ts +5 -1
  22. package/{dist/npm/hooks → hooks}/usePivotLocalDataService.d.ts +4 -0
  23. package/{dist/npm/hooks → hooks}/usePivotOLAPService.d.ts +4 -0
  24. package/hooks/useVerticalScrollSync.d.ts +9 -0
  25. package/index.d.ts +22 -0
  26. package/index.js +5 -0
  27. package/index.mjs +1585 -0
  28. package/{dist/es/messages → messages}/index.d.ts +4 -0
  29. package/{dist/es/models → models}/index.d.ts +4 -1
  30. package/package-metadata.d.ts +9 -0
  31. package/package.json +36 -54
  32. package/{dist/es/shared → shared}/PivotGridConfiguratorEditorEventsContext.d.ts +4 -0
  33. package/{dist/npm/shared → shared}/PivotGridConfiguratorEditorStateContext.d.ts +4 -0
  34. package/shared/index.d.ts +6 -0
  35. package/{dist/es/utils → utils}/index.d.ts +4 -0
  36. package/about.md +0 -3
  37. package/dist/cdn/js/kendo-react-pivotgrid.js.LICENSE.txt +0 -14
  38. package/dist/es/PivotGrid.d.ts +0 -177
  39. package/dist/es/PivotGrid.js +0 -245
  40. package/dist/es/components/AxesEditor.js +0 -43
  41. package/dist/es/components/AxisEditor.d.ts +0 -52
  42. package/dist/es/components/AxisEditor.js +0 -138
  43. package/dist/es/components/AxisFilterFieldsEditor.js +0 -150
  44. package/dist/es/components/Cell.d.ts +0 -65
  45. package/dist/es/components/Cell.js +0 -31
  46. package/dist/es/components/Column.js +0 -33
  47. package/dist/es/components/Configurator.d.ts +0 -125
  48. package/dist/es/components/Configurator.js +0 -118
  49. package/dist/es/components/ConfiguratorButton.d.ts +0 -40
  50. package/dist/es/components/ConfiguratorButton.js +0 -39
  51. package/dist/es/components/ConfiguratorEditor.js +0 -191
  52. package/dist/es/components/Container.js +0 -22
  53. package/dist/es/components/FieldsEditor.d.ts +0 -74
  54. package/dist/es/components/FieldsEditor.js +0 -90
  55. package/dist/es/components/HeaderCell.js +0 -50
  56. package/dist/es/components/Row.js +0 -28
  57. package/dist/es/hooks/index.d.ts +0 -2
  58. package/dist/es/hooks/index.js +0 -2
  59. package/dist/es/hooks/useExpansion.js +0 -89
  60. package/dist/es/hooks/useHeaders.js +0 -25
  61. package/dist/es/hooks/useHorizontalScrollSync.d.ts +0 -5
  62. package/dist/es/hooks/useHorizontalScrollSync.js +0 -27
  63. package/dist/es/hooks/usePivotConfiguratorEditor.js +0 -103
  64. package/dist/es/hooks/usePivotLocalDataService.d.ts +0 -79
  65. package/dist/es/hooks/usePivotLocalDataService.js +0 -105
  66. package/dist/es/hooks/usePivotOLAPService.d.ts +0 -41
  67. package/dist/es/hooks/usePivotOLAPService.js +0 -371
  68. package/dist/es/hooks/useVerticalScrollSync.d.ts +0 -5
  69. package/dist/es/hooks/useVerticalScrollSync.js +0 -27
  70. package/dist/es/main.d.ts +0 -18
  71. package/dist/es/main.js +0 -17
  72. package/dist/es/messages/index.js +0 -71
  73. package/dist/es/models/index.js +0 -1
  74. package/dist/es/package-metadata.d.ts +0 -5
  75. package/dist/es/package-metadata.js +0 -11
  76. package/dist/es/shared/PivotGridConfiguratorEditorEventsContext.js +0 -5
  77. package/dist/es/shared/PivotGridConfiguratorEditorStateContext.d.ts +0 -6
  78. package/dist/es/shared/PivotGridConfiguratorEditorStateContext.js +0 -18
  79. package/dist/es/shared/index.d.ts +0 -2
  80. package/dist/es/shared/index.js +0 -2
  81. package/dist/es/utils/index.js +0 -118
  82. package/dist/npm/PivotGrid.js +0 -248
  83. package/dist/npm/components/AxesEditor.d.ts +0 -46
  84. package/dist/npm/components/AxesEditor.js +0 -46
  85. package/dist/npm/components/AxisEditor.js +0 -141
  86. package/dist/npm/components/AxisFilterFieldsEditor.d.ts +0 -114
  87. package/dist/npm/components/AxisFilterFieldsEditor.js +0 -153
  88. package/dist/npm/components/Cell.js +0 -34
  89. package/dist/npm/components/Column.d.ts +0 -42
  90. package/dist/npm/components/Column.js +0 -36
  91. package/dist/npm/components/Configurator.js +0 -121
  92. package/dist/npm/components/ConfiguratorButton.js +0 -42
  93. package/dist/npm/components/ConfiguratorEditor.d.ts +0 -126
  94. package/dist/npm/components/ConfiguratorEditor.js +0 -194
  95. package/dist/npm/components/Container.d.ts +0 -46
  96. package/dist/npm/components/Container.js +0 -25
  97. package/dist/npm/components/FieldsEditor.js +0 -93
  98. package/dist/npm/components/HeaderCell.d.ts +0 -96
  99. package/dist/npm/components/HeaderCell.js +0 -53
  100. package/dist/npm/components/Row.d.ts +0 -50
  101. package/dist/npm/components/Row.js +0 -31
  102. package/dist/npm/hooks/index.d.ts +0 -2
  103. package/dist/npm/hooks/index.js +0 -18
  104. package/dist/npm/hooks/useExpansion.d.ts +0 -19
  105. package/dist/npm/hooks/useExpansion.js +0 -93
  106. package/dist/npm/hooks/useHeaders.d.ts +0 -12
  107. package/dist/npm/hooks/useHeaders.js +0 -30
  108. package/dist/npm/hooks/useHorizontalScrollSync.d.ts +0 -5
  109. package/dist/npm/hooks/useHorizontalScrollSync.js +0 -31
  110. package/dist/npm/hooks/usePivotConfiguratorEditor.d.ts +0 -83
  111. package/dist/npm/hooks/usePivotConfiguratorEditor.js +0 -107
  112. package/dist/npm/hooks/usePivotLocalDataService.js +0 -110
  113. package/dist/npm/hooks/usePivotOLAPService.js +0 -376
  114. package/dist/npm/hooks/useVerticalScrollSync.d.ts +0 -5
  115. package/dist/npm/hooks/useVerticalScrollSync.js +0 -31
  116. package/dist/npm/main.d.ts +0 -18
  117. package/dist/npm/main.js +0 -43
  118. package/dist/npm/messages/index.d.ts +0 -70
  119. package/dist/npm/messages/index.js +0 -74
  120. package/dist/npm/models/index.d.ts +0 -45
  121. package/dist/npm/models/index.js +0 -2
  122. package/dist/npm/package-metadata.d.ts +0 -5
  123. package/dist/npm/package-metadata.js +0 -14
  124. package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.d.ts +0 -13
  125. package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.js +0 -8
  126. package/dist/npm/shared/PivotGridConfiguratorEditorStateContext.js +0 -21
  127. package/dist/npm/shared/index.d.ts +0 -2
  128. package/dist/npm/shared/index.js +0 -18
  129. package/dist/npm/utils/index.d.ts +0 -47
  130. package/dist/npm/utils/index.js +0 -130
  131. package/dist/systemjs/kendo-react-pivotgrid.js +0 -1
  132. package/e2e-next/basic.tests.ts +0 -24
@@ -1,114 +0,0 @@
1
- import * as React from 'react';
2
- import { TreeViewProps as KendoReactTreeViewProps } from '@progress/kendo-react-treeview';
3
- import { ButtonProps as KendoReactButtonProps } from '@progress/kendo-react-buttons';
4
- import { FilterDescriptor } from '@progress/kendo-data-query';
5
- import { ColumnMenuItemProps as KendoReactColumnMenuItemProps, ColumnMenuFormProps as KendoReactColumnMenuFormProps } from '@progress/kendo-react-data-tools';
6
- import { PivotGridField, PivotGridAxis } from '@progress/kendo-pivotgrid-common';
7
- import { CustomComponent } from '@progress/kendo-react-common';
8
- /**
9
- * Represents the event arguments of the `PivotGridAxisFilterFields` expand-change event.
10
- */
11
- export interface PivotGridAxisFilterFieldsExpandChangeEvent {
12
- target: PivotGridAxisFilterFieldsEditorHandle;
13
- value: boolean;
14
- syntheticEvent: React.SyntheticEvent;
15
- }
16
- /**
17
- * Represents the event arguments of the `PivotGridAxisFilterField` expand event.
18
- */
19
- export interface PivotGridAxisFilterFieldExpandEvent {
20
- target: PivotGridAxisFilterFieldsEditorHandle;
21
- value: PivotGridField;
22
- syntheticEvent: React.SyntheticEvent;
23
- }
24
- /**
25
- * Represents the props of the [KendoReact PivotGridAxisFilterFieldsEditor component]({% slug api_pivotgrid_pivotgridaxisfilterfieldseditor %}).
26
- */
27
- export interface PivotGridAxisFilterFieldsEditorProps {
28
- /**
29
- * Sets the `className` property of the top-most element of the PivotGridAxisFilterFieldsEditor in addition to the default `k-columnmenu-item-wrapper` class.
30
- */
31
- className?: string;
32
- /**
33
- * Sets the `id` property of the top-most element of the PivotGridAxisFilterFieldsEditor.
34
- */
35
- id?: string;
36
- /**
37
- * Sets the `tabIndex` property of the top-most element of the PivotGridAxisFilterFieldsEditor.
38
- */
39
- tabIndex?: number;
40
- /**
41
- * Sets the `style` property of the top-most element of the PivotGridAxisFilterFieldsEditor.
42
- */
43
- style?: React.CSSProperties;
44
- /**
45
- * Sets the `data` of the PivotGridAxisFilterFieldsEditor.
46
- *
47
- * The `data` represents all fields available for filtering.
48
- */
49
- data?: PivotGridField[];
50
- /**
51
- * Represents the `dataItem` of the AxisEditor.
52
- *
53
- * The `dataItem` is a single [PivotGridAxis]({% slug api_pivotgrid_pivotgridaxis %}) object.
54
- */
55
- dataItem: PivotGridAxis;
56
- /**
57
- * Represents the initial filter value before additional operations are executed.
58
- */
59
- defaultFilter?: FilterDescriptor;
60
- /**
61
- * Indicates which of the three available axes are represented by the editor:
62
- * - columnAxes
63
- * - rowAxes
64
- * - measureAxes
65
- */
66
- axes: string;
67
- /**
68
- * Overrides the default `columnMenuItem` component.
69
- *
70
- * The default component is: [KendoReactColumnMenuItem]({% slug api_data-tools_columnmenuitem %}).
71
- */
72
- columnMenuItem?: CustomComponent<KendoReactColumnMenuItemProps>;
73
- /**
74
- * Overrides the default `columnMenuForm` component.
75
- *
76
- * The default component is: [KendoReactColumnMenuForm]({% slug api_data-tools_columnmenuform %}).
77
- */
78
- columnMenuForm?: CustomComponent<KendoReactColumnMenuFormProps>;
79
- /**
80
- * Overrides the default `resetButton` component.
81
- *
82
- * The default component is: [KendoReactButton]({% slug api_buttons_button %}).
83
- */
84
- resetButton?: CustomComponent<KendoReactButtonProps>;
85
- /**
86
- * Overrides the default `applyButton` component.
87
- *
88
- * The default component is: [KendoReactButton]({% slug api_buttons_button %}).
89
- */
90
- applyButton?: CustomComponent<KendoReactButtonProps>;
91
- /**
92
- * Overrides the default `treeView` component.
93
- *
94
- * The default component is: [KendoReactTreeView]({% slug api_treeview_treeview %}).
95
- */
96
- treeView?: CustomComponent<KendoReactTreeViewProps>;
97
- /**
98
- * Overrides the default `treeView` component.
99
- *
100
- * The default component is: `() => <Skeleton shape={'rectangle'} style={{height: '20px', width:'calc(100% - 16px)', margin: 8}}/>`.
101
- */
102
- noData?: CustomComponent<any>;
103
- }
104
- /**
105
- * Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridAxisFilterFieldsEditor component.
106
- */
107
- export interface PivotGridAxisFilterFieldsEditorHandle {
108
- props: PivotGridAxisFilterFieldsEditorProps;
109
- element: HTMLDivElement | null;
110
- }
111
- /**
112
- * Represents the [KendoReact PivotGridAxisFilterFieldsEditor component]({% slug api_pivotgrid_pivotgridaxisfilterfieldseditorprops %}).
113
- */
114
- export declare const PivotGridAxisFilterFieldsEditor: React.ForwardRefExoticComponent<PivotGridAxisFilterFieldsEditorProps & React.RefAttributes<PivotGridAxisFilterFieldsEditorHandle | null>>;
@@ -1,153 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.PivotGridAxisFilterFieldsEditor = void 0;
15
- var React = require("react");
16
- var kendo_react_treeview_1 = require("@progress/kendo-react-treeview");
17
- var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
18
- var kendo_react_indicators_1 = require("@progress/kendo-react-indicators");
19
- var kendo_react_intl_1 = require("@progress/kendo-react-intl");
20
- var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
21
- var kendo_react_common_1 = require("@progress/kendo-react-common");
22
- var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
23
- var utils_1 = require("../utils");
24
- var messages_1 = require("../messages");
25
- var hooks_1 = require("../hooks");
26
- var shared_1 = require("../shared");
27
- /* eslint-enable max-len */
28
- /**
29
- * Represents the [KendoReact PivotGridAxisFilterFieldsEditor component]({% slug api_pivotgrid_pivotgridaxisfilterfieldseditorprops %}).
30
- */
31
- exports.PivotGridAxisFilterFieldsEditor = React.forwardRef(function (props, ref) {
32
- var _a = __assign(__assign({}, defaultProps), props), data = _a.data, dataItem = _a.dataItem, defaultFilter = _a.defaultFilter;
33
- var element = React.useRef(null);
34
- var target = React.useRef(null);
35
- var localization = (0, kendo_react_intl_1.useLocalization)();
36
- var _b = (0, kendo_react_common_1.useCustomComponent)(props.columnMenuItem || defaultProps.columnMenuItem), ColumnMenuItemComponent = _b[0], ColumnMenuItemProps = _b[1];
37
- var _c = (0, kendo_react_common_1.useCustomComponent)(props.columnMenuForm || defaultProps.columnMenuForm), ColumnMenuFormComponent = _c[0], ColumnMenuFormProps = _c[1];
38
- var _d = (0, kendo_react_common_1.useCustomComponent)(props.resetButton || defaultProps.resetButton), ResetButtonComponent = _d[0], ResetButtonProps = _d[1];
39
- var _e = (0, kendo_react_common_1.useCustomComponent)(props.applyButton || defaultProps.applyButton), ApplyButtonComponent = _e[0], ApplyButtonProps = _e[1];
40
- var _f = (0, kendo_react_common_1.useCustomComponent)(props.treeView || defaultProps.treeView), TreeViewComponent = _f[0], TreeViewProps = _f[1];
41
- var _g = (0, kendo_react_common_1.useCustomComponent)(props.noData || defaultProps.noData), NoDataComponent = _g[0], NoDataProps = _g[1];
42
- React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
43
- React.useImperativeHandle(ref, function () { return target.current; });
44
- var _h = React.useState(false), show = _h[0], setShow = _h[1];
45
- var _j = React.useContext(shared_1.PivotGridConfiguratorEditorEventsContext), onAxisFilterFieldsExpandChange = _j.onAxisFilterFieldsExpandChange, onAxisFilterFieldExpand = _j.onAxisFilterFieldExpand;
46
- var _k = React.useContext(shared_1.PivotGridConfiguratorEditorStateContext), dispatchState = _k[1];
47
- var _l = React.useState(defaultFilter), filter = _l[0], setFilter = _l[1];
48
- var selected = filter ? filter.value.split(',') : [];
49
- var _m = (0, hooks_1.useExpansion)([], undefined, target, utils_1.compareFields), expanded = _m[0], dispatchExpansion = _m[1];
50
- var map = {
51
- caption: function (node) { return node.dataItem.caption; },
52
- id: function (node) { return node.dataItem.uniqueName; },
53
- parent: function (_, parent) { return parent && parent.value; },
54
- value: function (node) { return (node.dataItem.defaultHierarchy || node.dataItem.uniqueName); },
55
- expanded: function (node) { return expanded.some(function (e) { return e.uniqueName === node.id; }); },
56
- checked: function (node) { return !selected.length || (selected || []).some(function (f) { return f === node.dataItem.uniqueName; }); },
57
- hasChildren: function (node) { return parseInt(node.dataItem.childrenCardinality, 10) > 0; },
58
- children: function (node) { return (0, utils_1.recursiveMap)(node.dataItem.children, map, node); },
59
- checkIndeterminate: function (node) {
60
- var everyChildChecked = (node.children || []).length && node.children.every(function (c) { return c.checked; });
61
- if (everyChildChecked) {
62
- node.checked = true;
63
- }
64
- return (node.children || []).some(function (c) { return c.checked; }) && !everyChildChecked;
65
- }
66
- };
67
- var fields = (0, utils_1.recursiveMap)(data, map);
68
- var dataFlatMap = (0, utils_1.flatMap)(fields);
69
- var handleClick = function (syntheticEvent) {
70
- setShow(!show);
71
- if (onAxisFilterFieldsExpandChange) {
72
- onAxisFilterFieldsExpandChange({
73
- value: !show,
74
- target: target.current,
75
- syntheticEvent: syntheticEvent
76
- });
77
- }
78
- };
79
- var handleFieldExpand = function (event) {
80
- dispatchExpansion({ type: hooks_1.EXPANSION_ACTION.toggle, payload: event.item.dataItem }, event.syntheticEvent);
81
- if (onAxisFilterFieldExpand) {
82
- onAxisFilterFieldExpand({
83
- value: event.item.dataItem,
84
- target: target.current,
85
- syntheticEvent: event.syntheticEvent
86
- });
87
- }
88
- };
89
- var handleFieldCheck = function (event) {
90
- var newFilter;
91
- if (event.item.checked) {
92
- newFilter = {
93
- field: String(dataItem.name),
94
- operator: 'in',
95
- value: dataFlatMap
96
- .filter(function (i) { return i.checked; })
97
- .map(function (c) { return String(c.value); })
98
- .filter(function (i) { return i !== event.item.value && i !== event.item.parent; })
99
- .join(',')
100
- };
101
- }
102
- else {
103
- newFilter = {
104
- field: String(dataItem.name),
105
- operator: 'in',
106
- value: dataFlatMap
107
- .filter(function (i) { return i.checked; })
108
- .map(function (c) { return String(c.value); })
109
- .concat([event.item.value])
110
- .join(',')
111
- };
112
- }
113
- setFilter(newFilter);
114
- };
115
- var handleResetClick = function (syntheticEvent) {
116
- setShow(false);
117
- if (filter) {
118
- dispatchState({
119
- type: hooks_1.PIVOT_CONFIGURATOR_ACTION.removeFilter,
120
- payload: filter
121
- }, syntheticEvent);
122
- }
123
- };
124
- var handleApplyClick = function (syntheticEvent) {
125
- setShow(false);
126
- if (filter) {
127
- dispatchState({
128
- type: defaultFilter
129
- ? hooks_1.PIVOT_CONFIGURATOR_ACTION.changeFilter
130
- : hooks_1.PIVOT_CONFIGURATOR_ACTION.addFilter,
131
- payload: filter
132
- }, syntheticEvent);
133
- }
134
- };
135
- return (React.createElement("div", { ref: element, id: props.id, tabIndex: props.tabIndex, style: props.style, className: (0, kendo_react_common_1.classNames)('k-columnmenu-item-wrapper', props.className) },
136
- React.createElement(ColumnMenuItemComponent, __assign({}, ColumnMenuItemProps, { title: "Include Fields", iconClass: "k-i-grid-layout", svgIcon: kendo_svg_icons_1.gridLayoutIcon, onClick: handleClick })),
137
- React.createElement(ColumnMenuFormComponent, __assign({ show: show, actions: (React.createElement(React.Fragment, null,
138
- React.createElement(ResetButtonComponent, __assign({ type: "reset", onClick: handleResetClick }, ResetButtonProps), localization.toLanguageString(messages_1.fieldMenuReset, messages_1.messages[messages_1.fieldMenuReset])),
139
- React.createElement(ApplyButtonComponent, __assign({ themeColor: 'primary', onClick: handleApplyClick }, ApplyButtonProps), localization.toLanguageString(messages_1.fieldMenuApply, messages_1.messages[messages_1.fieldMenuApply])))) }, ColumnMenuFormProps), (fields && fields.length)
140
- ? (React.createElement(TreeViewComponent, __assign({ data: fields, checkboxes: true, onExpandChange: handleFieldExpand, onCheckChange: handleFieldCheck, textField: 'caption', expandIcons: true, hasChildrenField: "hasChildren", checkIndeterminateField: "checkIndeterminate", childrenField: "children" }, TreeViewProps)))
141
- : (React.createElement(NoDataComponent, __assign({}, NoDataProps))))));
142
- });
143
- var defaultProps = {
144
- data: [],
145
- resetButton: kendo_react_buttons_1.Button,
146
- applyButton: kendo_react_buttons_1.Button,
147
- treeView: kendo_react_treeview_1.TreeView,
148
- noData: function () { return React.createElement(kendo_react_indicators_1.Skeleton, { shape: 'rectangle', style: { height: '20px', width: 'calc(100% - 16px)', margin: 8 } }); },
149
- columnMenuItem: kendo_react_data_tools_1.ColumnMenuItem,
150
- columnMenuForm: kendo_react_data_tools_1.ColumnMenuForm
151
- };
152
- exports.PivotGridAxisFilterFieldsEditor.defaultProps = defaultProps;
153
- exports.PivotGridAxisFilterFieldsEditor.displayName = 'KendoReactPivotGridAxisFilterFieldsEditor';
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.PivotGridCell = void 0;
15
- var React = require("react");
16
- var kendo_react_common_1 = require("@progress/kendo-react-common");
17
- ;
18
- /**
19
- * Represents the [KendoReact PivotGridCell component]({% slug api_pivotgrid_pivotgridcellprops %}).
20
- */
21
- exports.PivotGridCell = React.forwardRef(function (props, ref) {
22
- var target = React.useRef(null);
23
- var element = React.useRef(null);
24
- React.useImperativeHandle(target, function () { return ({
25
- element: element.current,
26
- props: props
27
- }); });
28
- React.useImperativeHandle(ref, function () { return target.current; });
29
- var mouseProps = (0, kendo_react_common_1.useMouse)(props, target);
30
- return (React.createElement("td", __assign({ ref: element }, mouseProps, { id: props.id, style: props.style, tabIndex: props.tabIndex, role: props.role, "aria-describedby": props.ariaDescribedby, className: (0, kendo_react_common_1.classNames)('k-pivotgrid-cell', {
31
- 'k-pivotgrid-header-total': props.total
32
- }, props.className) }), props.children));
33
- });
34
- exports.PivotGridCell.displayName = 'KendoReactPivotGridCell';
@@ -1,42 +0,0 @@
1
- import * as React from 'react';
2
- import { KendoMouse } from '@progress/kendo-react-common';
3
- /**
4
- * Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridColumn component.
5
- */
6
- export interface PivotGridColumnHandle {
7
- props: PivotGridColumnProps;
8
- element: HTMLTableColElement | null;
9
- }
10
- /**
11
- * Represents the props of the [KendoReact PivotGridColumn component]({% slug api_pivotgrid_pivotgridcolumn %}).
12
- */
13
- export interface PivotGridColumnProps extends KendoMouse<PivotGridColumnHandle, HTMLTableColElement> {
14
- /**
15
- * Sets the `className` property of the top-most element of the PivotGridColumn in addition to the default `k-pivotgrid-row` class.
16
- */
17
- className?: string;
18
- /**
19
- * Sets the `id` property of the top-most element of the PivotGridColumn.
20
- */
21
- id?: string;
22
- /**
23
- * Sets the `children` property of the top-most element of the PivotGridColumn.
24
- */
25
- children?: React.ReactNode;
26
- /**
27
- * Sets the `style` property of the top-most element of the PivotGridColumn.
28
- */
29
- style?: React.CSSProperties;
30
- /**
31
- * Sets the `tabIndex` property of the top-most element of the PivotGridColumn.
32
- */
33
- tabIndex?: number;
34
- /**
35
- * Represents the `path` leading to the current `column`.
36
- */
37
- path?: string[];
38
- }
39
- /**
40
- * Represents the [KendoReact PivotGridColumn component]({% slug api_pivotgrid_pivotgridcolumnprops %}).
41
- */
42
- export declare const PivotGridColumn: React.ForwardRefExoticComponent<PivotGridColumnProps & React.RefAttributes<PivotGridColumnHandle | null>>;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.PivotGridColumn = void 0;
15
- var React = require("react");
16
- var kendo_react_common_1 = require("@progress/kendo-react-common");
17
- ;
18
- /**
19
- * Represents the [KendoReact PivotGridColumn component]({% slug api_pivotgrid_pivotgridcolumnprops %}).
20
- */
21
- exports.PivotGridColumn = React.forwardRef(function (props, ref) {
22
- var target = React.useRef(null);
23
- var element = React.useRef(null);
24
- React.useImperativeHandle(target, function () { return ({
25
- element: element.current,
26
- props: props
27
- }); });
28
- React.useImperativeHandle(ref, function () { return target.current; });
29
- var mouseProps = (0, kendo_react_common_1.useMouse)(props, target);
30
- return (React.createElement("col", __assign({ ref: element }, mouseProps, { id: props.id, style: props.style, tabIndex: props.tabIndex, children: props.children, className: props.className })));
31
- });
32
- var defaultProps = {
33
- path: []
34
- };
35
- exports.PivotGridColumn.defaultProps = defaultProps;
36
- exports.PivotGridColumn.displayName = 'KendoReactPivotGridColumn';
@@ -1,121 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.PivotGridConfigurator = void 0;
15
- var React = require("react");
16
- var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
17
- var kendo_react_common_1 = require("@progress/kendo-react-common");
18
- var kendo_react_intl_1 = require("@progress/kendo-react-intl");
19
- var kendo_react_form_1 = require("@progress/kendo-react-form");
20
- var ConfiguratorEditor_1 = require("./ConfiguratorEditor");
21
- var messages_1 = require("../messages");
22
- /**
23
- * Represents the [KendoReact PivotGridConfigurator component]({% slug api_pivotgrid_pivotgridconfiguratorprops %}).
24
- */
25
- exports.PivotGridConfigurator = React.forwardRef(function (props, ref) {
26
- var _a = __assign(__assign({}, defaultProps), props), horizontal = _a.horizontal, data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes;
27
- var element = React.useRef(null);
28
- var target = React.useRef(null);
29
- var form = React.useRef(null);
30
- var localization = (0, kendo_react_intl_1.useLocalization)();
31
- var _b = (0, kendo_react_common_1.useCustomComponent)(props.editor || defaultProps.editor), EditorComponent = _b[0], EditorProps = _b[1];
32
- var _c = (0, kendo_react_common_1.useCustomComponent)(props.form || defaultProps.form), FormComponent = _c[0], FormProps = _c[1];
33
- var _d = (0, kendo_react_common_1.useCustomComponent)(props.formElement || defaultProps.formElement), FormElementComponent = _d[0], FormElementProps = _d[1];
34
- React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
35
- React.useImperativeHandle(ref, function () { return target.current; });
36
- var handleFormSubmit = function (newDataItem, syntheticEvent) {
37
- if (props.onRowAxesChange) {
38
- props.onRowAxesChange({
39
- target: target.current,
40
- value: newDataItem.rowAxes,
41
- syntheticEvent: syntheticEvent
42
- });
43
- }
44
- if (props.onColumnAxesChange) {
45
- props.onColumnAxesChange({
46
- target: target.current,
47
- value: newDataItem.columnAxes,
48
- syntheticEvent: syntheticEvent
49
- });
50
- }
51
- if (props.onMeasureAxesChange) {
52
- props.onMeasureAxesChange({
53
- target: target.current,
54
- value: newDataItem.measureAxes,
55
- syntheticEvent: syntheticEvent
56
- });
57
- }
58
- if (props.onSortChange) {
59
- props.onSortChange({
60
- target: target.current,
61
- value: newDataItem.sort,
62
- syntheticEvent: syntheticEvent
63
- });
64
- }
65
- if (props.onFilterChange) {
66
- props.onFilterChange({
67
- target: target.current,
68
- value: newDataItem.filter,
69
- syntheticEvent: syntheticEvent
70
- });
71
- }
72
- };
73
- var initialValues = {
74
- rowAxes: rowAxes,
75
- columnAxes: columnAxes,
76
- measureAxes: measureAxes,
77
- sort: props.sort,
78
- filter: props.filter
79
- };
80
- React.useEffect(function () { if (form.current) {
81
- form.current.onChange('rowAxes', { value: rowAxes });
82
- } }, [rowAxes]);
83
- React.useEffect(function () { if (form.current) {
84
- form.current.onChange('columnAxes', { value: columnAxes });
85
- } }, [columnAxes]);
86
- React.useEffect(function () { if (form.current) {
87
- form.current.onChange('measureAxes', { value: measureAxes });
88
- } }, [measureAxes]);
89
- React.useEffect(function () { if (form.current) {
90
- form.current.onChange('sort', { value: props.sort });
91
- } }, [props.sort]);
92
- React.useEffect(function () { if (form.current) {
93
- form.current.onChange('filter', { value: props.filter });
94
- } }, [props.filter]);
95
- return (React.createElement("div", { ref: element, id: props.id, tabIndex: props.tabIndex, style: props.style, className: (0, kendo_react_common_1.classNames)('k-pivotgrid-configurator', props.className) },
96
- React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-pivotgrid-configurator-panel', 'k-pivotgrid-configurator-push', {
97
- 'k-pivotgrid-configurator-horizontal': horizontal,
98
- 'k-pivotgrid-configurator-vertical': !horizontal
99
- }) },
100
- React.createElement("div", { className: "k-pivotgrid-configurator-header" },
101
- React.createElement("div", { className: "k-pivotgrid-configurator-header-text" }, localization.toLanguageString(messages_1.configuratorTitle, messages_1.messages[messages_1.configuratorTitle]))),
102
- React.createElement(FormComponent, __assign({ ref: (0, kendo_react_common_1.canUseRef)(FormComponent) ? form : undefined, initialValues: initialValues, onSubmit: handleFormSubmit, render: function (renderProps) { return (React.createElement(React.Fragment, null,
103
- React.createElement("div", { className: "k-pivotgrid-configurator-content" },
104
- React.createElement(FormElementComponent, __assign({ horizontal: horizontal }, FormElementProps),
105
- React.createElement(EditorComponent, __assign({}, renderProps, { horizontal: props.horizontal, onFieldsEditorFieldExpand: props.onFieldsEditorFieldExpand, onFieldsEditorFieldCheck: props.onFieldsEditorFieldCheck, onAxisFilterFieldExpand: props.onAxisFilterFieldExpand, onAxisFilterFieldsExpandChange: props.onAxisFilterFieldsExpandChange, data: data }, EditorProps)))),
106
- React.createElement("div", { className: "k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end" },
107
- React.createElement(kendo_react_buttons_1.Button, { type: "submit", onClick: renderProps.onFormReset }, localization.toLanguageString(messages_1.configuratorCancel, messages_1.messages[messages_1.configuratorCancel])),
108
- React.createElement(kendo_react_buttons_1.Button, { themeColor: 'primary', type: "submit", onClick: renderProps.onSubmit }, localization.toLanguageString(messages_1.configuratorApply, messages_1.messages[messages_1.configuratorApply]))))); } }, FormProps)))));
109
- });
110
- var defaultProps = {
111
- form: kendo_react_form_1.Form,
112
- formElement: kendo_react_form_1.FormElement,
113
- editor: ConfiguratorEditor_1.PivotGridConfiguratorEditor,
114
- horizontal: false,
115
- data: [],
116
- columnAxes: [],
117
- rowAxes: [],
118
- measureAxes: []
119
- };
120
- exports.PivotGridConfigurator.defaultProps = defaultProps;
121
- exports.PivotGridConfigurator.displayName = 'KendoReactPivotGridConfigurator';
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.PivotGridConfiguratorButton = void 0;
15
- var React = require("react");
16
- var kendo_react_common_1 = require("@progress/kendo-react-common");
17
- var kendo_react_intl_1 = require("@progress/kendo-react-intl");
18
- var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
19
- var messages_1 = require("../messages");
20
- var kendo_react_common_2 = require("@progress/kendo-react-common");
21
- /**
22
- * Represents the [KendoReact PivotGridConfiguratorButton component]({% slug api_pivotgrid_pivotgridconfiguratorbuttonprops %}).
23
- */
24
- exports.PivotGridConfiguratorButton = React.forwardRef(function (props, ref) {
25
- var target = React.useRef(null);
26
- var element = React.useRef(null);
27
- var localization = (0, kendo_react_intl_1.useLocalization)();
28
- React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
29
- React.useImperativeHandle(ref, function () { return target.current; });
30
- var _a = (0, kendo_react_common_1.useCustomComponent)(props.icon || defaultProps.icon), IconComponent = _a[0], IconProps = _a[1];
31
- var className = React.useMemo(function () { return (0, kendo_react_common_1.classNames)('k-pivotgrid-configurator-button', props.className); }, [props.className]);
32
- var mouseProps = (0, kendo_react_common_2.useMouse)(props, target);
33
- return (React.createElement("div", __assign({ ref: element, id: props.id, className: className, tabIndex: props.tabIndex }, mouseProps),
34
- React.createElement("span", null,
35
- localization.toLanguageString(messages_1.configuratorButtonLabel, messages_1.messages[messages_1.configuratorButtonLabel]),
36
- React.createElement(IconComponent, __assign({ name: "gear", icon: kendo_svg_icons_1.gearIcon }, IconProps)))));
37
- });
38
- var defaultProps = {
39
- icon: kendo_react_common_1.IconWrap
40
- };
41
- exports.PivotGridConfiguratorButton.defaultProps = defaultProps;
42
- exports.PivotGridConfiguratorButton.displayName = 'KendoReactPivotGridConfiguratorButton';