@progress/kendo-react-pivotgrid 6.1.1 → 7.0.0-develop.10
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/LICENSE.md +1 -1
- package/{dist/npm/PivotGrid.d.ts → PivotGrid.d.ts} +4 -0
- package/{dist/es/components → components}/AxesEditor.d.ts +4 -6
- package/{dist/npm/components → components}/AxisEditor.d.ts +4 -0
- package/{dist/es/components → components}/AxisFilterFieldsEditor.d.ts +4 -0
- package/{dist/npm/components → components}/Cell.d.ts +4 -0
- package/{dist/es/components → components}/Column.d.ts +4 -0
- package/{dist/npm/components → components}/Configurator.d.ts +4 -0
- package/{dist/npm/components → components}/ConfiguratorButton.d.ts +4 -0
- package/{dist/es/components → components}/ConfiguratorEditor.d.ts +4 -0
- package/{dist/es/components → components}/Container.d.ts +4 -0
- package/components/EditorContext.d.ts +11 -0
- package/{dist/npm/components → components}/FieldsEditor.d.ts +4 -0
- package/{dist/es/components → components}/HeaderCell.d.ts +4 -0
- package/{dist/es/components → components}/Row.d.ts +4 -0
- package/dist/cdn/js/kendo-react-pivotgrid.js +5 -2
- package/hooks/index.d.ts +6 -0
- package/{dist/es/hooks → hooks}/useExpansion.d.ts +5 -1
- package/{dist/es/hooks → hooks}/useHeaders.d.ts +5 -1
- package/hooks/useHorizontalScrollSync.d.ts +9 -0
- package/{dist/es/hooks → hooks}/usePivotConfiguratorEditor.d.ts +5 -1
- package/{dist/npm/hooks → hooks}/usePivotLocalDataService.d.ts +4 -0
- package/{dist/npm/hooks → hooks}/usePivotOLAPService.d.ts +4 -0
- package/hooks/useVerticalScrollSync.d.ts +9 -0
- package/index.d.ts +22 -0
- package/index.js +5 -0
- package/index.mjs +1585 -0
- package/{dist/es/messages → messages}/index.d.ts +4 -0
- package/{dist/es/models → models}/index.d.ts +4 -1
- package/package-metadata.d.ts +9 -0
- package/package.json +36 -54
- package/{dist/es/shared → shared}/PivotGridConfiguratorEditorEventsContext.d.ts +4 -0
- package/{dist/npm/shared → shared}/PivotGridConfiguratorEditorStateContext.d.ts +4 -0
- package/shared/index.d.ts +6 -0
- package/{dist/es/utils → utils}/index.d.ts +4 -0
- package/about.md +0 -3
- package/dist/cdn/js/kendo-react-pivotgrid.js.LICENSE.txt +0 -14
- package/dist/es/PivotGrid.d.ts +0 -177
- package/dist/es/PivotGrid.js +0 -245
- package/dist/es/components/AxesEditor.js +0 -43
- package/dist/es/components/AxisEditor.d.ts +0 -52
- package/dist/es/components/AxisEditor.js +0 -138
- package/dist/es/components/AxisFilterFieldsEditor.js +0 -150
- package/dist/es/components/Cell.d.ts +0 -65
- package/dist/es/components/Cell.js +0 -31
- package/dist/es/components/Column.js +0 -33
- package/dist/es/components/Configurator.d.ts +0 -125
- package/dist/es/components/Configurator.js +0 -118
- package/dist/es/components/ConfiguratorButton.d.ts +0 -40
- package/dist/es/components/ConfiguratorButton.js +0 -39
- package/dist/es/components/ConfiguratorEditor.js +0 -191
- package/dist/es/components/Container.js +0 -22
- package/dist/es/components/FieldsEditor.d.ts +0 -74
- package/dist/es/components/FieldsEditor.js +0 -90
- package/dist/es/components/HeaderCell.js +0 -50
- package/dist/es/components/Row.js +0 -28
- package/dist/es/hooks/index.d.ts +0 -2
- package/dist/es/hooks/index.js +0 -2
- package/dist/es/hooks/useExpansion.js +0 -89
- package/dist/es/hooks/useHeaders.js +0 -25
- package/dist/es/hooks/useHorizontalScrollSync.d.ts +0 -5
- package/dist/es/hooks/useHorizontalScrollSync.js +0 -27
- package/dist/es/hooks/usePivotConfiguratorEditor.js +0 -103
- package/dist/es/hooks/usePivotLocalDataService.d.ts +0 -79
- package/dist/es/hooks/usePivotLocalDataService.js +0 -105
- package/dist/es/hooks/usePivotOLAPService.d.ts +0 -41
- package/dist/es/hooks/usePivotOLAPService.js +0 -371
- package/dist/es/hooks/useVerticalScrollSync.d.ts +0 -5
- package/dist/es/hooks/useVerticalScrollSync.js +0 -27
- package/dist/es/main.d.ts +0 -18
- package/dist/es/main.js +0 -17
- package/dist/es/messages/index.js +0 -71
- package/dist/es/models/index.js +0 -1
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/shared/PivotGridConfiguratorEditorEventsContext.js +0 -5
- package/dist/es/shared/PivotGridConfiguratorEditorStateContext.d.ts +0 -6
- package/dist/es/shared/PivotGridConfiguratorEditorStateContext.js +0 -18
- package/dist/es/shared/index.d.ts +0 -2
- package/dist/es/shared/index.js +0 -2
- package/dist/es/utils/index.js +0 -118
- package/dist/npm/PivotGrid.js +0 -248
- package/dist/npm/components/AxesEditor.d.ts +0 -46
- package/dist/npm/components/AxesEditor.js +0 -46
- package/dist/npm/components/AxisEditor.js +0 -141
- package/dist/npm/components/AxisFilterFieldsEditor.d.ts +0 -114
- package/dist/npm/components/AxisFilterFieldsEditor.js +0 -153
- package/dist/npm/components/Cell.js +0 -34
- package/dist/npm/components/Column.d.ts +0 -42
- package/dist/npm/components/Column.js +0 -36
- package/dist/npm/components/Configurator.js +0 -121
- package/dist/npm/components/ConfiguratorButton.js +0 -42
- package/dist/npm/components/ConfiguratorEditor.d.ts +0 -126
- package/dist/npm/components/ConfiguratorEditor.js +0 -194
- package/dist/npm/components/Container.d.ts +0 -46
- package/dist/npm/components/Container.js +0 -25
- package/dist/npm/components/FieldsEditor.js +0 -93
- package/dist/npm/components/HeaderCell.d.ts +0 -96
- package/dist/npm/components/HeaderCell.js +0 -53
- package/dist/npm/components/Row.d.ts +0 -50
- package/dist/npm/components/Row.js +0 -31
- package/dist/npm/hooks/index.d.ts +0 -2
- package/dist/npm/hooks/index.js +0 -18
- package/dist/npm/hooks/useExpansion.d.ts +0 -19
- package/dist/npm/hooks/useExpansion.js +0 -93
- package/dist/npm/hooks/useHeaders.d.ts +0 -12
- package/dist/npm/hooks/useHeaders.js +0 -30
- package/dist/npm/hooks/useHorizontalScrollSync.d.ts +0 -5
- package/dist/npm/hooks/useHorizontalScrollSync.js +0 -31
- package/dist/npm/hooks/usePivotConfiguratorEditor.d.ts +0 -83
- package/dist/npm/hooks/usePivotConfiguratorEditor.js +0 -107
- package/dist/npm/hooks/usePivotLocalDataService.js +0 -110
- package/dist/npm/hooks/usePivotOLAPService.js +0 -376
- package/dist/npm/hooks/useVerticalScrollSync.d.ts +0 -5
- package/dist/npm/hooks/useVerticalScrollSync.js +0 -31
- package/dist/npm/main.d.ts +0 -18
- package/dist/npm/main.js +0 -43
- package/dist/npm/messages/index.d.ts +0 -70
- package/dist/npm/messages/index.js +0 -74
- package/dist/npm/models/index.d.ts +0 -45
- package/dist/npm/models/index.js +0 -2
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.d.ts +0 -13
- package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.js +0 -8
- package/dist/npm/shared/PivotGridConfiguratorEditorStateContext.js +0 -21
- package/dist/npm/shared/index.d.ts +0 -2
- package/dist/npm/shared/index.js +0 -18
- package/dist/npm/utils/index.d.ts +0 -47
- package/dist/npm/utils/index.js +0 -130
- package/dist/systemjs/kendo-react-pivotgrid.js +0 -1
- package/e2e-next/basic.tests.ts +0 -24
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FormRenderProps, FieldProps } from '@progress/kendo-react-form';
|
|
3
|
-
import { LabelProps } from '@progress/kendo-react-labels';
|
|
4
|
-
import { CustomComponent } from '@progress/kendo-react-common';
|
|
5
|
-
import { PivotGridAxisFilterFieldExpandEvent, PivotGridAxisFilterFieldsExpandChangeEvent } from './AxisFilterFieldsEditor';
|
|
6
|
-
import { PivotGridConfiguratorState, PivotGridField } from '@progress/kendo-pivotgrid-common';
|
|
7
|
-
import { PivotGridAxesEditorProps } from './AxesEditor';
|
|
8
|
-
import { PivotGridFieldsEditorProps, PivotGridFieldsEditorFieldExpandEvent, PivotGridFieldsEditorFieldCheckEvent } from './FieldsEditor';
|
|
9
|
-
import { PivotGridConfiguratorEditorState, PivotGridConfiguratorAction } from '../hooks';
|
|
10
|
-
/**
|
|
11
|
-
* Represents the props of the [KendoReact PivotGridConfiguratorEditor component]({% slug api_pivotgrid_pivotgridconfiguratoreditor %}).
|
|
12
|
-
*/
|
|
13
|
-
export interface PivotGridConfiguratorEditorProps extends FormRenderProps {
|
|
14
|
-
/**
|
|
15
|
-
* Sets the `data` of the PivotGridConfiguratorEditor.
|
|
16
|
-
*
|
|
17
|
-
* The `data` represents all fields available in the configurator.
|
|
18
|
-
*/
|
|
19
|
-
data: PivotGridField[];
|
|
20
|
-
/**
|
|
21
|
-
* Renders the PivotGridConfiguratorEditor in `horizontal` orientation.
|
|
22
|
-
*/
|
|
23
|
-
horizontal?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Overrides the default `fieldsLabel` component.
|
|
26
|
-
*
|
|
27
|
-
* The default component is: [KendoReactLabel]({% slug api_labels_label %}).
|
|
28
|
-
*/
|
|
29
|
-
fieldsLabel?: CustomComponent<FieldProps & LabelProps>;
|
|
30
|
-
/**
|
|
31
|
-
* Overrides the default `fieldsEditor` component.
|
|
32
|
-
*
|
|
33
|
-
* The default component is: [PivotGridFieldsEditor]({% slug api_pivotgrid_pivotgridfieldseditor %}).
|
|
34
|
-
*/
|
|
35
|
-
fieldsEditor?: CustomComponent<PivotGridFieldsEditorProps>;
|
|
36
|
-
/**
|
|
37
|
-
* Overrides the default `columnAxesLabel` component.
|
|
38
|
-
*
|
|
39
|
-
* The default component is: [KendoReactLabel]({% slug api_labels_label %}).
|
|
40
|
-
*/
|
|
41
|
-
columnAxesLabel?: CustomComponent<FieldProps & LabelProps>;
|
|
42
|
-
/**
|
|
43
|
-
* Overrides the default `columnAxesEditor` component.
|
|
44
|
-
*
|
|
45
|
-
* The default component is: [PivotGridAxesEditor]({% slug api_pivotgrid_pivotgridaxeseditor %}).
|
|
46
|
-
*/
|
|
47
|
-
columnAxesEditor?: CustomComponent<PivotGridAxesEditorProps>;
|
|
48
|
-
/**
|
|
49
|
-
* Overrides the default `rowAxesLabel` component.
|
|
50
|
-
*
|
|
51
|
-
* The default component is: [KendoReactLabel]({% slug api_labels_label %}).
|
|
52
|
-
*/
|
|
53
|
-
rowAxesLabel?: CustomComponent<FieldProps & LabelProps>;
|
|
54
|
-
/**
|
|
55
|
-
* Overrides the default `rowAxesEditor` component.
|
|
56
|
-
*
|
|
57
|
-
* The default component is: [PivotGridAxesEditor]({% slug api_pivotgrid_pivotgridaxeseditor %}).
|
|
58
|
-
*/
|
|
59
|
-
rowAxesEditor?: CustomComponent<PivotGridAxesEditorProps>;
|
|
60
|
-
/**
|
|
61
|
-
* Overrides the default `measureAxesLabel` component.
|
|
62
|
-
*
|
|
63
|
-
* The default component is: [KendoReactLabel]({% slug api_labels_label %}).
|
|
64
|
-
*/
|
|
65
|
-
measureAxesLabel?: CustomComponent<FieldProps & LabelProps>;
|
|
66
|
-
/**
|
|
67
|
-
* Overrides the default `measureAxesEditor` component.
|
|
68
|
-
*
|
|
69
|
-
* The default component is: [PivotGridAxesEditor]({% slug api_pivotgrid_pivotgridaxeseditor %}).
|
|
70
|
-
*/
|
|
71
|
-
measureAxesEditor?: CustomComponent<PivotGridAxesEditorProps>;
|
|
72
|
-
/**
|
|
73
|
-
* A callback, fired whenever a `FieldEditorField` is expanded.
|
|
74
|
-
*/
|
|
75
|
-
onFieldsEditorFieldExpand?: (event: PivotGridFieldsEditorFieldExpandEvent & {
|
|
76
|
-
currentTarget: PivotGridConfiguratorEditorHandle;
|
|
77
|
-
}) => void;
|
|
78
|
-
/**
|
|
79
|
-
* An action callback. Used to define the component behavior when a `FieldsEditorFieldExpand` is triggered.
|
|
80
|
-
*
|
|
81
|
-
* Internal state change will be triggered depending on the specific action types.
|
|
82
|
-
*
|
|
83
|
-
* @hidden
|
|
84
|
-
*/
|
|
85
|
-
onFieldsEditorFieldExpandAction?: (event: PivotGridFieldsEditorFieldCheckEvent & {
|
|
86
|
-
currentTarget: PivotGridConfiguratorEditorHandle;
|
|
87
|
-
}, props: PivotGridConfiguratorEditorProps, state: PivotGridConfiguratorEditorState) => PivotGridConfiguratorAction | PivotGridConfiguratorAction[];
|
|
88
|
-
/**
|
|
89
|
-
* A callback, fired whenever a `FieldEditorField` is checked.
|
|
90
|
-
*/
|
|
91
|
-
onFieldsEditorFieldCheck?: (event: PivotGridFieldsEditorFieldCheckEvent & {
|
|
92
|
-
currentTarget: PivotGridConfiguratorEditorHandle;
|
|
93
|
-
}) => void;
|
|
94
|
-
/**
|
|
95
|
-
* An action callback. Used to define the component behavior when a `FieldsEditorFieldCheck` is triggered.
|
|
96
|
-
*
|
|
97
|
-
* Internal state change will be triggered depending on the specific action types.
|
|
98
|
-
*
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
onFieldsEditorFieldCheckAction?: (event: PivotGridFieldsEditorFieldCheckEvent & {
|
|
102
|
-
currentTarget: PivotGridConfiguratorEditorHandle;
|
|
103
|
-
}, props: PivotGridConfiguratorEditorProps, state: PivotGridConfiguratorEditorState) => PivotGridConfiguratorAction | PivotGridConfiguratorAction[];
|
|
104
|
-
/**
|
|
105
|
-
* A callback, fired whenever an `AxisFilterField` is expanded.
|
|
106
|
-
*/
|
|
107
|
-
onAxisFilterFieldExpand?: (event: PivotGridAxisFilterFieldExpandEvent & {
|
|
108
|
-
currentTarget: PivotGridConfiguratorEditorHandle;
|
|
109
|
-
}) => void;
|
|
110
|
-
/**
|
|
111
|
-
* A callback, fired whenever `expanded` state of the AxisFilterFields is changed.
|
|
112
|
-
*/
|
|
113
|
-
onAxisFilterFieldsExpandChange?: (event: PivotGridAxisFilterFieldsExpandChangeEvent) => void;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridConfiguratorEditor component.
|
|
117
|
-
*/
|
|
118
|
-
export interface PivotGridConfiguratorEditorHandle {
|
|
119
|
-
props: PivotGridConfiguratorEditorProps;
|
|
120
|
-
state: PivotGridConfiguratorState;
|
|
121
|
-
element: HTMLDivElement;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Represents the [KendoReact PivotGridConfiguratorEditor component]({% slug api_pivotgrid_pivotgridconfiguratoreditorprops %}).
|
|
125
|
-
*/
|
|
126
|
-
export declare const PivotGridConfiguratorEditor: React.ForwardRefExoticComponent<PivotGridConfiguratorEditorProps & React.RefAttributes<PivotGridConfiguratorEditorHandle>>;
|
|
@@ -1,194 +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.PivotGridConfiguratorEditor = void 0;
|
|
15
|
-
var React = require("react");
|
|
16
|
-
var kendo_react_form_1 = require("@progress/kendo-react-form");
|
|
17
|
-
var kendo_react_labels_1 = require("@progress/kendo-react-labels");
|
|
18
|
-
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
19
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
20
|
-
var AxesEditor_1 = require("./AxesEditor");
|
|
21
|
-
var FieldsEditor_1 = require("./FieldsEditor");
|
|
22
|
-
var hooks_1 = require("../hooks");
|
|
23
|
-
var shared_1 = require("../shared");
|
|
24
|
-
var messages_1 = require("../messages");
|
|
25
|
-
/**
|
|
26
|
-
* Represents the [KendoReact PivotGridConfiguratorEditor component]({% slug api_pivotgrid_pivotgridconfiguratoreditorprops %}).
|
|
27
|
-
*/
|
|
28
|
-
exports.PivotGridConfiguratorEditor = React.forwardRef(function (props, ref) {
|
|
29
|
-
var onFieldsEditorFieldCheck = props.onFieldsEditorFieldCheck, onFieldsEditorFieldCheckAction = props.onFieldsEditorFieldCheckAction, onFieldsEditorFieldExpand = props.onFieldsEditorFieldExpand, onFieldsEditorFieldExpandAction = props.onFieldsEditorFieldExpandAction, onAxisFilterFieldExpand = props.onAxisFilterFieldExpand, onAxisFilterFieldsExpandChange = props.onAxisFilterFieldsExpandChange;
|
|
30
|
-
var _a = (0, kendo_react_common_1.useCustomComponent)(props.fieldsLabel || defaultProps.fieldsLabel), FieldsLabelComponent = _a[0], FieldsLabelProps = _a[1];
|
|
31
|
-
var _b = (0, kendo_react_common_1.useCustomComponent)(props.fieldsEditor || defaultProps.fieldsEditor), FieldsEditorComponent = _b[0], FieldsEditorProps = _b[1];
|
|
32
|
-
var _c = (0, kendo_react_common_1.useCustomComponent)(props.columnAxesLabel || defaultProps.columnAxesLabel), ColumnAxesLabelComponent = _c[0], ColumnAxesLabelProps = _c[1];
|
|
33
|
-
var _d = (0, kendo_react_common_1.useCustomComponent)((props.columnAxesEditor || defaultProps.columnAxesEditor)), ColumnAxesEditorComponent = _d[0], ColumnAxesEditorProps = _d[1];
|
|
34
|
-
var _e = (0, kendo_react_common_1.useCustomComponent)(props.rowAxesLabel || defaultProps.rowAxesLabel), RowAxesLabelComponent = _e[0], RowAxesLabelProps = _e[1];
|
|
35
|
-
var _f = (0, kendo_react_common_1.useCustomComponent)((props.rowAxesEditor || defaultProps.rowAxesEditor)), RowAxesEditorComponent = _f[0], RowAxesEditorProps = _f[1];
|
|
36
|
-
var _g = (0, kendo_react_common_1.useCustomComponent)(props.measureAxesLabel || defaultProps.measureAxesLabel), MeasureAxesLabelComponent = _g[0], MeasureAxesLabelProps = _g[1];
|
|
37
|
-
var _h = (0, kendo_react_common_1.useCustomComponent)((props.measureAxesEditor || defaultProps.measureAxesEditor)), MeasureAxesEditorComponent = _h[0], MeasureAxesEditorProps = _h[1];
|
|
38
|
-
var element = React.useRef(null);
|
|
39
|
-
var target = React.useRef(null);
|
|
40
|
-
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
41
|
-
var _j = (0, hooks_1.usePivotConfiguratorEditor)(props, target), state = _j[0], dispatchState = _j[1];
|
|
42
|
-
React.useImperativeHandle(target, function () { return ({
|
|
43
|
-
element: element.current,
|
|
44
|
-
props: props,
|
|
45
|
-
state: state
|
|
46
|
-
}); });
|
|
47
|
-
React.useImperativeHandle(ref, function () { return target.current; });
|
|
48
|
-
var handleColumnsMouseEnter = function () {
|
|
49
|
-
if (state.dragItem) {
|
|
50
|
-
dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: 'columnAxes' });
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var handleColumnsMouseLeave = function () {
|
|
54
|
-
if (state.dragItem) {
|
|
55
|
-
dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: null });
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var handleRowsMouseEnter = function () {
|
|
59
|
-
if (state.dragItem) {
|
|
60
|
-
dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: 'rowAxes' });
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var handleRowsMouseLeave = function () {
|
|
64
|
-
if (state.dragItem) {
|
|
65
|
-
dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: null });
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
var handleMeasuresMouseEnter = function () {
|
|
69
|
-
if (state.dragItem) {
|
|
70
|
-
dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: 'measureAxes' });
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var handleMeasuresMouseLeave = function () {
|
|
74
|
-
if (state.dragItem) {
|
|
75
|
-
dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setDropZone, payload: null });
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var handleFieldsEditorFieldExpand = function (event) {
|
|
79
|
-
var eventArgs = {
|
|
80
|
-
target: event.target,
|
|
81
|
-
currentTarget: target.current,
|
|
82
|
-
value: event.value,
|
|
83
|
-
syntheticEvent: event.syntheticEvent
|
|
84
|
-
};
|
|
85
|
-
if (onFieldsEditorFieldExpandAction) {
|
|
86
|
-
var actions = onFieldsEditorFieldExpandAction(eventArgs, props, state);
|
|
87
|
-
if (actions) {
|
|
88
|
-
Array.isArray(actions)
|
|
89
|
-
? actions.filter(Boolean).map(function (action) { return action && dispatchState(__assign({}, action), event.syntheticEvent); })
|
|
90
|
-
: dispatchState(__assign({}, actions), event.syntheticEvent);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (onFieldsEditorFieldExpand) {
|
|
94
|
-
onFieldsEditorFieldExpand({
|
|
95
|
-
target: event.target,
|
|
96
|
-
currentTarget: target.current,
|
|
97
|
-
value: event.value,
|
|
98
|
-
syntheticEvent: event.syntheticEvent
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
var handleFieldsEditorFieldCheck = function (event) {
|
|
103
|
-
var eventArgs = {
|
|
104
|
-
target: event.target,
|
|
105
|
-
currentTarget: target.current,
|
|
106
|
-
value: event.value,
|
|
107
|
-
syntheticEvent: event.syntheticEvent
|
|
108
|
-
};
|
|
109
|
-
if (onFieldsEditorFieldCheckAction) {
|
|
110
|
-
var actions = onFieldsEditorFieldCheckAction(eventArgs, props, state);
|
|
111
|
-
if (actions) {
|
|
112
|
-
Array.isArray(actions)
|
|
113
|
-
? actions.filter(Boolean).map(function (action) { return action && dispatchState(__assign({}, action), event.syntheticEvent); })
|
|
114
|
-
: dispatchState(__assign({}, actions), event.syntheticEvent);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (onFieldsEditorFieldCheck) {
|
|
118
|
-
onFieldsEditorFieldCheck(eventArgs);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
var handleAxisFilterFieldExpand = function (event) {
|
|
122
|
-
var eventArgs = {
|
|
123
|
-
target: event.target,
|
|
124
|
-
currentTarget: target.current,
|
|
125
|
-
value: event.value,
|
|
126
|
-
syntheticEvent: event.syntheticEvent
|
|
127
|
-
};
|
|
128
|
-
if (onAxisFilterFieldExpand) {
|
|
129
|
-
onAxisFilterFieldExpand(eventArgs);
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
var handleAxisFilterFieldsExpandChange = function (event) {
|
|
133
|
-
var eventArgs = {
|
|
134
|
-
target: event.target,
|
|
135
|
-
currentTarget: target.current,
|
|
136
|
-
value: event.value,
|
|
137
|
-
syntheticEvent: event.syntheticEvent
|
|
138
|
-
};
|
|
139
|
-
if (onAxisFilterFieldsExpandChange) {
|
|
140
|
-
onAxisFilterFieldsExpandChange(eventArgs);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
var Container = props.horizontal ? 'div' : React.Fragment;
|
|
144
|
-
var ContainerProps = props.horizontal ? { className: 'k-form-field-wrapper' } : {};
|
|
145
|
-
return (React.createElement(shared_1.PivotGridConfiguratorEditorEventsContext.Provider, { value: {
|
|
146
|
-
onAxisFilterFieldExpand: handleAxisFilterFieldExpand,
|
|
147
|
-
onAxisFilterFieldsExpandChange: handleAxisFilterFieldsExpandChange
|
|
148
|
-
} },
|
|
149
|
-
React.createElement(shared_1.PivotGridConfiguratorEditorStateContext.Provider, { value: [state, dispatchState] },
|
|
150
|
-
React.createElement(Container, __assign({}, ContainerProps),
|
|
151
|
-
React.createElement("div", { className: "k-form-field" },
|
|
152
|
-
React.createElement(FieldsLabelComponent, __assign({ name: "", component: kendo_react_labels_1.Label }, FieldsLabelProps), localization.toLanguageString(messages_1.configuratorEditorSearchTitle, messages_1.messages[messages_1.configuratorEditorSearchTitle]))),
|
|
153
|
-
React.createElement("div", { className: "k-form-field" },
|
|
154
|
-
React.createElement("div", { className: "k-fields-list-wrapper" },
|
|
155
|
-
React.createElement(FieldsEditorComponent, __assign({ data: props.data, onExpand: handleFieldsEditorFieldExpand, onCheck: handleFieldsEditorFieldCheck, columnAxes: state.columnAxes, rowAxes: state.rowAxes, measureAxes: state.measureAxes }, FieldsEditorProps))))),
|
|
156
|
-
React.createElement(Container, __assign({}, ContainerProps),
|
|
157
|
-
React.createElement("div", { className: "k-form-field", onMouseEnter: handleColumnsMouseEnter, onMouseLeave: handleColumnsMouseLeave },
|
|
158
|
-
React.createElement(kendo_react_form_1.Field, __assign({ name: "columnAxes", field: "columnAxes", component: ColumnAxesLabelComponent }, ColumnAxesLabelProps), localization.toLanguageString(messages_1.configuratorColumnsTitle, messages_1.messages[messages_1.configuratorColumnsTitle]))),
|
|
159
|
-
props.valueGetter('columnAxes').length
|
|
160
|
-
? (React.createElement(kendo_react_form_1.Field, __assign({ name: "columnAxes", field: "columnAxes", component: ColumnAxesEditorComponent, onMouseEnter: handleColumnsMouseEnter, onMouseLeave: handleColumnsMouseLeave, className: "k-column-fields" }, ColumnAxesEditorProps)))
|
|
161
|
-
: (React.createElement("div", { className: "k-settings-description", onMouseEnter: handleColumnsMouseEnter, onMouseLeave: handleColumnsMouseLeave }, localization.toLanguageString(messages_1.configuratorMissingFields, messages_1.messages[messages_1.configuratorMissingFields]))),
|
|
162
|
-
React.createElement("div", { className: "k-form-field", onMouseEnter: handleRowsMouseEnter, onMouseLeave: handleRowsMouseLeave },
|
|
163
|
-
React.createElement(kendo_react_form_1.Field, __assign({ name: "rowAxes", field: "rowAxes", component: RowAxesLabelComponent }, RowAxesLabelProps), localization.toLanguageString(messages_1.configuratorRowsTitle, messages_1.messages[messages_1.configuratorRowsTitle]))),
|
|
164
|
-
props.valueGetter('rowAxes').length
|
|
165
|
-
? (React.createElement(kendo_react_form_1.Field, __assign({ name: "rowAxes", field: "rowAxes", component: RowAxesEditorComponent, onMouseEnter: handleRowsMouseEnter, onMouseLeave: handleRowsMouseLeave, className: "k-column-fields" }, RowAxesEditorProps)))
|
|
166
|
-
: (React.createElement("div", { className: "k-settings-description", onMouseEnter: handleRowsMouseEnter, onMouseLeave: handleRowsMouseLeave }, localization.toLanguageString(messages_1.configuratorMissingFields, messages_1.messages[messages_1.configuratorMissingFields])))),
|
|
167
|
-
React.createElement(Container, __assign({}, ContainerProps),
|
|
168
|
-
React.createElement("div", { className: "k-form-field", onMouseEnter: handleMeasuresMouseEnter, onMouseLeave: handleMeasuresMouseLeave },
|
|
169
|
-
React.createElement(kendo_react_form_1.Field, __assign({ name: "measureAxes", field: "measureAxes", component: MeasureAxesLabelComponent }, MeasureAxesLabelProps), localization.toLanguageString(messages_1.configuratorMeasuresTitle, messages_1.messages[messages_1.configuratorMeasuresTitle]))),
|
|
170
|
-
props.valueGetter('measureAxes').length
|
|
171
|
-
? (React.createElement(kendo_react_form_1.Field, __assign({ name: "measureAxes", field: "measureAxes", component: MeasureAxesEditorComponent, onMouseEnter: handleMeasuresMouseEnter, onMouseLeave: handleMeasuresMouseLeave, className: "k-column-fields" }, MeasureAxesEditorProps)))
|
|
172
|
-
: (React.createElement("div", { className: "k-settings-description", onMouseEnter: handleMeasuresMouseEnter, onMouseLeave: handleMeasuresMouseLeave }, localization.toLanguageString(messages_1.configuratorMissingFields, messages_1.messages[messages_1.configuratorMissingFields])))))));
|
|
173
|
-
});
|
|
174
|
-
var defaultProps = {
|
|
175
|
-
data: [],
|
|
176
|
-
horizontal: false,
|
|
177
|
-
fieldsLabel: kendo_react_labels_1.Label,
|
|
178
|
-
fieldsEditor: FieldsEditor_1.PivotGridFieldsEditor,
|
|
179
|
-
columnAxesLabel: kendo_react_labels_1.Label,
|
|
180
|
-
columnAxesEditor: AxesEditor_1.PivotGridAxesEditor,
|
|
181
|
-
rowAxesLabel: kendo_react_labels_1.Label,
|
|
182
|
-
rowAxesEditor: AxesEditor_1.PivotGridAxesEditor,
|
|
183
|
-
measureAxesLabel: kendo_react_labels_1.Label,
|
|
184
|
-
measureAxesEditor: AxesEditor_1.PivotGridAxesEditor,
|
|
185
|
-
axesEditor: AxesEditor_1.PivotGridAxesEditor,
|
|
186
|
-
onFieldsEditorFieldCheckAction: function (event) {
|
|
187
|
-
return ({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.toggleSelection, payload: event.value });
|
|
188
|
-
},
|
|
189
|
-
onFieldsEditorFieldExpandAction: function (event) {
|
|
190
|
-
return ({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.toggleExpansion, payload: event.value });
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
exports.PivotGridConfiguratorEditor.defaultProps = defaultProps;
|
|
194
|
-
exports.PivotGridConfiguratorEditor.displayName = 'KendoReactPivotGridConfiguratorEditor';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Represents the props of the [KendoReact PivotGridContainer component]({% slug api_pivotgrid_pivotgridcontainer %}).
|
|
4
|
-
*/
|
|
5
|
-
export interface PivotGridContainerProps {
|
|
6
|
-
/**
|
|
7
|
-
* Sets the `id` property of the top-most element of the PivotGridContainer.
|
|
8
|
-
*/
|
|
9
|
-
id?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Sets the `tabIndex` property of the top-most element of the PivotGridContainer.
|
|
12
|
-
*/
|
|
13
|
-
tabIndex?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Sets the `className` property of the top-most element of the PivotGridContainer in addition to the default `k-d-flex k-pos-relative` class.
|
|
16
|
-
*/
|
|
17
|
-
className?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Sets the `children` property of the top-most element of the PivotGridContainer.
|
|
20
|
-
*/
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Sets the `style` property of the top-most element of the PivotGridContainer.
|
|
24
|
-
*/
|
|
25
|
-
style?: React.CSSProperties;
|
|
26
|
-
/**
|
|
27
|
-
* Sets the configurator position in the container.
|
|
28
|
-
* The available values are:
|
|
29
|
-
* - top
|
|
30
|
-
* - left
|
|
31
|
-
* - right
|
|
32
|
-
* - bottom
|
|
33
|
-
*/
|
|
34
|
-
configuratorPosition?: 'top' | 'left' | 'right' | 'bottom';
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridContainer component.
|
|
38
|
-
*/
|
|
39
|
-
export interface PivotGridContainerHandle {
|
|
40
|
-
element: HTMLDivElement | null;
|
|
41
|
-
props: PivotGridContainerProps;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Represents the [KendoReact PivotGridContainer component]({% slug api_pivotgrid_pivotgridcontainerprops %}).
|
|
45
|
-
*/
|
|
46
|
-
export declare const PivotGridContainer: React.ForwardRefExoticComponent<PivotGridContainerProps & React.RefAttributes<PivotGridContainerHandle | null>>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PivotGridContainer = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
6
|
-
/**
|
|
7
|
-
* Represents the [KendoReact PivotGridContainer component]({% slug api_pivotgrid_pivotgridcontainerprops %}).
|
|
8
|
-
*/
|
|
9
|
-
exports.PivotGridContainer = React.forwardRef(function (props, ref) {
|
|
10
|
-
var element = React.useRef(null);
|
|
11
|
-
var target = React.useRef(null);
|
|
12
|
-
React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
|
|
13
|
-
React.useImperativeHandle(ref, function () { return target.current; });
|
|
14
|
-
return (React.createElement("div", { ref: element, id: props.id, style: props.style, tabIndex: props.tabIndex, className: (0, kendo_react_common_1.classNames)('k-d-flex k-pos-relative', {
|
|
15
|
-
'k-flex-row': props.configuratorPosition === 'right',
|
|
16
|
-
'k-flex-row-reverse': props.configuratorPosition === 'left',
|
|
17
|
-
'k-flex-column': props.configuratorPosition === 'bottom',
|
|
18
|
-
'k-flex-column-reverse': props.configuratorPosition === 'top'
|
|
19
|
-
}, props.className) }, props.children));
|
|
20
|
-
});
|
|
21
|
-
var defaultProps = {
|
|
22
|
-
configuratorPosition: 'right'
|
|
23
|
-
};
|
|
24
|
-
exports.PivotGridContainer.defaultProps = defaultProps;
|
|
25
|
-
exports.PivotGridContainer.displayName = 'KendoReactPivotGridContainer';
|
|
@@ -1,93 +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
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.PivotGridFieldsEditor = void 0;
|
|
24
|
-
var React = require("react");
|
|
25
|
-
var kendo_react_treeview_1 = require("@progress/kendo-react-treeview");
|
|
26
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
27
|
-
var shared_1 = require("../shared");
|
|
28
|
-
var utils_1 = require("../utils");
|
|
29
|
-
/**
|
|
30
|
-
* Represents the [KendoReact PivotGridFieldsEditor component]({% slug api_pivotgrid_pivotgridfieldseditorprops %}).
|
|
31
|
-
*/
|
|
32
|
-
exports.PivotGridFieldsEditor = React.forwardRef(function (props, ref) {
|
|
33
|
-
var _a = __assign(__assign({}, defaultProps), props), data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes, onExpand = _a.onExpand, onCheck = _a.onCheck;
|
|
34
|
-
var treeView = React.useRef(null);
|
|
35
|
-
var target = React.useRef(null);
|
|
36
|
-
var _b = (0, kendo_react_common_1.useCustomComponent)(props.treeView || defaultProps.treeView), TreeViewComponent = _b[0], TreeViewProps = _b[1];
|
|
37
|
-
var _c = (0, kendo_react_common_1.useCustomComponent)(props.noData || defaultProps.noData), NoDataComponent = _c[0], NoDataProps = _c[1];
|
|
38
|
-
React.useImperativeHandle(target, function () { return ({ props: props, element: treeView.current && treeView.current.element }); });
|
|
39
|
-
React.useImperativeHandle(ref, function () { return target.current; });
|
|
40
|
-
var state = React.useContext(shared_1.PivotGridConfiguratorEditorStateContext)[0];
|
|
41
|
-
var columnHierarchies = (0, utils_1.extractDefaultFields)(columnAxes);
|
|
42
|
-
var rowHierarchies = (0, utils_1.extractDefaultFields)(rowAxes);
|
|
43
|
-
var measureHierarchies = (0, utils_1.extractDefaultFields)(measureAxes);
|
|
44
|
-
var fieldsFlatMap = (0, utils_1.flatMap)(data);
|
|
45
|
-
var checked = fieldsFlatMap.filter(function (f) { return __spreadArray(__spreadArray(__spreadArray([], columnHierarchies, true), rowHierarchies, true), measureHierarchies, true).some(function (h) { return (h === f.uniqueName || h === f.defaultHierarchy); }); });
|
|
46
|
-
var map = {
|
|
47
|
-
caption: function (node) { return node.dataItem.caption; },
|
|
48
|
-
id: function (node) { return node.dataItem.uniqueName; },
|
|
49
|
-
value: function (node) { return (node.dataItem.defaultHierarchy || node.dataItem.uniqueName); },
|
|
50
|
-
expanded: function (node) { return state.expanded.some(function (e) { return e.uniqueName === node.dataItem.uniqueName; }); },
|
|
51
|
-
hasChildren: function (node) { return !('hierarchyUniqueName' in node.dataItem) && !('aggregator' in node.dataItem); },
|
|
52
|
-
selectable: function (node) { return !Boolean((!node.hasChildren && !node.dataItem.aggregator && !node.dataItem.measure)
|
|
53
|
-
|| (node.dataItem.type === 2)
|
|
54
|
-
|| node.dataItem.uniqueName === '[KPIs]'); },
|
|
55
|
-
children: function (node) { return (0, utils_1.recursiveMap)(node.dataItem.children, map, node); },
|
|
56
|
-
checked: function (node) { return checked.some(function (s) { return node.dataItem.defaultHierarchy
|
|
57
|
-
? s.defaultHierarchy === node.dataItem.defaultHierarchy
|
|
58
|
-
: s.uniqueName === node.dataItem.uniqueName; })
|
|
59
|
-
|| (node.children.length && node.children.every(function (c) { return c.checked; })); }
|
|
60
|
-
};
|
|
61
|
-
var handleExpand = function (event) {
|
|
62
|
-
if (onExpand) {
|
|
63
|
-
onExpand({
|
|
64
|
-
value: event.item.dataItem,
|
|
65
|
-
target: target.current,
|
|
66
|
-
syntheticEvent: event.syntheticEvent
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var handleCheck = function (event) {
|
|
71
|
-
if (onCheck) {
|
|
72
|
-
onCheck({
|
|
73
|
-
value: event.item.dataItem,
|
|
74
|
-
target: target.current,
|
|
75
|
-
syntheticEvent: event.syntheticEvent
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
var fields = (0, utils_1.recursiveMap)(props.data, map);
|
|
80
|
-
return (React.createElement(kendo_react_treeview_1.TreeViewItemPropsContext.Provider, { value: function (p) { return (__assign(__assign({}, p), { checkboxes: p.item.selectable })); } }, (fields && fields.length)
|
|
81
|
-
? React.createElement(TreeViewComponent, __assign({ ref: (0, kendo_react_common_1.canUseRef)(TreeViewComponent) ? treeView : undefined, data: fields, checkboxes: true, onExpandChange: handleExpand, onCheckChange: handleCheck, textField: 'caption', expandIcons: true, hasChildrenField: "hasChildren", checkIndeterminateField: "checkIndeterminate", childrenField: "children" }, TreeViewProps))
|
|
82
|
-
: (React.createElement(NoDataComponent, __assign({}, NoDataProps)))));
|
|
83
|
-
});
|
|
84
|
-
var defaultProps = {
|
|
85
|
-
data: [],
|
|
86
|
-
rowAxes: [],
|
|
87
|
-
columnAxes: [],
|
|
88
|
-
measureAxes: [],
|
|
89
|
-
treeView: kendo_react_treeview_1.TreeView,
|
|
90
|
-
noData: function () { return React.createElement("div", null, "NO DATA"); }
|
|
91
|
-
};
|
|
92
|
-
exports.PivotGridFieldsEditor.defaultProps = defaultProps;
|
|
93
|
-
exports.PivotGridFieldsEditor.displayName = 'KendoReactPivotGridFieldsEditor';
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { KendoMouse, KendoMouseEvent, SvgIconProps } from '@progress/kendo-react-common';
|
|
3
|
-
import { IconProps as KendoIconProps, CustomComponent } from '@progress/kendo-react-common';
|
|
4
|
-
import { AxisDataItem } from '@progress/kendo-pivotgrid-common';
|
|
5
|
-
/**
|
|
6
|
-
* Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridHeaderCell component.
|
|
7
|
-
*/
|
|
8
|
-
export interface PivotGridHeaderCellHandle {
|
|
9
|
-
props: PivotGridHeaderCellProps;
|
|
10
|
-
element: HTMLTableHeaderCellElement | null;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Represents the props of the [KendoReact PivotGridHeaderCell component]({% slug api_pivotgrid_pivotgridheadercell %}).
|
|
14
|
-
*/
|
|
15
|
-
export interface PivotGridHeaderCellProps extends KendoMouse<PivotGridHeaderCellHandle, HTMLTableHeaderCellElement> {
|
|
16
|
-
/**
|
|
17
|
-
* Represents the `dataItem` of the PivotGridHeaderCell.
|
|
18
|
-
*
|
|
19
|
-
* The `dataItem` is a single [AxisDataItem]({% slug api_pivotgrid_axisdataitem %}) object.
|
|
20
|
-
*/
|
|
21
|
-
dataItem: AxisDataItem;
|
|
22
|
-
/**
|
|
23
|
-
* Sets the `id` property of the top-most element of the PivotGridHeaderCell.
|
|
24
|
-
*/
|
|
25
|
-
id?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Sets the `className` property of the top-most element of the PivotGridHeaderCell in addition to the default `k-pivotgrid-cell` class.
|
|
28
|
-
*/
|
|
29
|
-
className?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the `tabIndex` property of the top-most element of the PivotGridHeaderCell.
|
|
32
|
-
*/
|
|
33
|
-
tabIndex?: number;
|
|
34
|
-
/**
|
|
35
|
-
* Sets the `children` property of the top-most element of the PivotGridHeaderCell.
|
|
36
|
-
*/
|
|
37
|
-
children?: React.ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the `style` property of the top-most element of the PivotGridHeaderCell.
|
|
40
|
-
*/
|
|
41
|
-
style?: React.CSSProperties;
|
|
42
|
-
/**
|
|
43
|
-
* Represents the calculated `rowSpan` property of the cell.
|
|
44
|
-
*/
|
|
45
|
-
rowSpan?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Represents the calculated `colSpan` property of the cell.
|
|
48
|
-
*/
|
|
49
|
-
colSpan?: number;
|
|
50
|
-
/**
|
|
51
|
-
* Represents the columns `path` leading to the current cell.
|
|
52
|
-
*/
|
|
53
|
-
columnPath?: string[];
|
|
54
|
-
/**
|
|
55
|
-
* Represents the row `path` leading to the current cell.
|
|
56
|
-
*/
|
|
57
|
-
rowPath?: string[];
|
|
58
|
-
/**
|
|
59
|
-
* Indicates if the current cell represents a `total` value.
|
|
60
|
-
*/
|
|
61
|
-
total?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Indicates if the current cell represents the first level of a hierarchy.
|
|
64
|
-
*/
|
|
65
|
-
root?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Indicates if the current cell can be expanded.
|
|
68
|
-
*/
|
|
69
|
-
expandable?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Indicates if the current cell is expanded.
|
|
72
|
-
*/
|
|
73
|
-
expanded?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
first?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Overrides the default `icon` component.
|
|
80
|
-
*
|
|
81
|
-
* The default component is: [KendoReactIcon]({% slug api_common_icon %}).
|
|
82
|
-
*/
|
|
83
|
-
icon?: CustomComponent<KendoIconProps & SvgIconProps>;
|
|
84
|
-
/**
|
|
85
|
-
* A callback, fired whenever the `icon` is clicked.
|
|
86
|
-
*/
|
|
87
|
-
onIconClick?: (args: KendoMouseEvent<PivotGridHeaderCellHandle, HTMLSpanElement>) => void;
|
|
88
|
-
/**
|
|
89
|
-
* Sets the `role` property of the top-most element of the PivotGridHeaderCell.
|
|
90
|
-
*/
|
|
91
|
-
role?: string;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Represents the [KendoReact PivotGridHeaderCell component]({% slug api_pivotgrid_pivotgridheadercellprops %}).
|
|
95
|
-
*/
|
|
96
|
-
export declare const PivotGridHeaderCell: React.ForwardRefExoticComponent<PivotGridHeaderCellProps & React.RefAttributes<PivotGridHeaderCellHandle | null>>;
|
|
@@ -1,53 +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.PivotGridHeaderCell = void 0;
|
|
15
|
-
var React = require("react");
|
|
16
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
17
|
-
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
18
|
-
;
|
|
19
|
-
/**
|
|
20
|
-
* Represents the [KendoReact PivotGridHeaderCell component]({% slug api_pivotgrid_pivotgridheadercellprops %}).
|
|
21
|
-
*/
|
|
22
|
-
exports.PivotGridHeaderCell = React.forwardRef(function (props, ref) {
|
|
23
|
-
var target = React.useRef(null);
|
|
24
|
-
var element = React.useRef(null);
|
|
25
|
-
React.useImperativeHandle(target, function () { return ({
|
|
26
|
-
element: element.current,
|
|
27
|
-
props: props
|
|
28
|
-
}); });
|
|
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 mouseProps = (0, kendo_react_common_1.useMouse)(props, target);
|
|
32
|
-
var handleIconClick = function (event) {
|
|
33
|
-
if (props.onIconClick) {
|
|
34
|
-
props.onIconClick.call(undefined, {
|
|
35
|
-
syntheticEvent: event.syntheticEvent,
|
|
36
|
-
target: target.current
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
return (React.createElement("th", __assign({ ref: element }, mouseProps, { colSpan: props.colSpan, rowSpan: props.rowSpan, id: props.id, style: props.style, tabIndex: props.tabIndex, role: props.role }, (props.expandable ? { 'aria-expanded': props.expanded } : {}), { className: (0, kendo_react_common_1.classNames)('k-pivotgrid-cell', {
|
|
41
|
-
'k-pivotgrid-header-total': props.total,
|
|
42
|
-
'k-pivotgrid-header-root': props.root,
|
|
43
|
-
'k-pivotgrid-expanded': props.expanded,
|
|
44
|
-
'k-first': props.first
|
|
45
|
-
}, props.className) }),
|
|
46
|
-
props.expandable && (React.createElement(IconComponent, __assign({}, IconProps, { onClick: handleIconClick, name: "chevron-".concat(props.expanded ? 'up' : 'down'), "aria-hidden": true, icon: props.expanded ? kendo_svg_icons_1.chevronUpIcon : kendo_svg_icons_1.chevronDownIcon }))),
|
|
47
|
-
props.children));
|
|
48
|
-
});
|
|
49
|
-
var defaultProps = {
|
|
50
|
-
icon: kendo_react_common_1.IconWrap
|
|
51
|
-
};
|
|
52
|
-
exports.PivotGridHeaderCell.defaultProps = defaultProps;
|
|
53
|
-
exports.PivotGridHeaderCell.displayName = 'KendoReactPivotGridHeaderCell';
|