@progress/kendo-react-pivotgrid 5.4.0-dev.202205180853 → 5.4.0-dev.202205271059

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 (62) hide show
  1. package/dist/cdn/js/kendo-react-pivotgrid.js +1 -15
  2. package/dist/es/PivotGrid.js +1 -1
  3. package/dist/es/components/AxesEditor.d.ts +1 -1
  4. package/dist/es/components/AxesEditor.js +2 -2
  5. package/dist/es/components/AxisEditor.js +7 -2
  6. package/dist/es/components/AxisFilterFieldsEditor.js +1 -1
  7. package/dist/es/components/Configurator.js +1 -1
  8. package/dist/es/components/ConfiguratorEditor.js +1 -1
  9. package/dist/es/components/FieldsEditor.js +8 -3
  10. package/dist/es/hooks/useExpansion.js +9 -4
  11. package/dist/es/hooks/useHeaders.d.ts +5 -1
  12. package/dist/es/hooks/useHeaders.js +1 -1
  13. package/dist/es/hooks/useHorizontalScrollSync.d.ts +1 -1
  14. package/dist/es/hooks/usePivotConfiguratorEditor.d.ts +1 -2
  15. package/dist/es/hooks/usePivotConfiguratorEditor.js +1 -1
  16. package/dist/es/hooks/usePivotLocalDataService.js +8 -3
  17. package/dist/es/hooks/usePivotOLAPService.js +9 -9
  18. package/dist/es/hooks/useVerticalScrollSync.d.ts +1 -1
  19. package/dist/es/messages/index.d.ts +12 -12
  20. package/dist/es/models/index.js +1 -0
  21. package/dist/es/package-metadata.js +1 -1
  22. package/dist/es/shared/PivotGridConfiguratorEditorStateContext.d.ts +1 -1
  23. package/dist/es/utils/index.d.ts +5 -5
  24. package/dist/es/utils/index.js +6 -1
  25. package/dist/npm/PivotGrid.js +2 -1
  26. package/dist/npm/components/AxesEditor.d.ts +1 -1
  27. package/dist/npm/components/AxesEditor.js +3 -2
  28. package/dist/npm/components/AxisEditor.js +8 -2
  29. package/dist/npm/components/AxisFilterFieldsEditor.js +2 -1
  30. package/dist/npm/components/Cell.js +1 -0
  31. package/dist/npm/components/Column.js +1 -0
  32. package/dist/npm/components/Configurator.js +2 -1
  33. package/dist/npm/components/ConfiguratorButton.js +1 -0
  34. package/dist/npm/components/ConfiguratorEditor.js +2 -1
  35. package/dist/npm/components/Container.js +1 -0
  36. package/dist/npm/components/FieldsEditor.js +9 -3
  37. package/dist/npm/components/HeaderCell.js +1 -0
  38. package/dist/npm/components/Row.js +1 -0
  39. package/dist/npm/hooks/index.js +12 -5
  40. package/dist/npm/hooks/useExpansion.js +12 -5
  41. package/dist/npm/hooks/useHeaders.d.ts +5 -1
  42. package/dist/npm/hooks/useHeaders.js +5 -3
  43. package/dist/npm/hooks/useHorizontalScrollSync.d.ts +1 -1
  44. package/dist/npm/hooks/useHorizontalScrollSync.js +3 -1
  45. package/dist/npm/hooks/usePivotConfiguratorEditor.d.ts +1 -2
  46. package/dist/npm/hooks/usePivotConfiguratorEditor.js +4 -2
  47. package/dist/npm/hooks/usePivotLocalDataService.js +13 -5
  48. package/dist/npm/hooks/usePivotOLAPService.js +14 -11
  49. package/dist/npm/hooks/useVerticalScrollSync.d.ts +1 -1
  50. package/dist/npm/hooks/useVerticalScrollSync.js +3 -1
  51. package/dist/npm/main.js +23 -22
  52. package/dist/npm/messages/index.d.ts +12 -12
  53. package/dist/npm/messages/index.js +2 -1
  54. package/dist/npm/package-metadata.js +2 -1
  55. package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.js +1 -0
  56. package/dist/npm/shared/PivotGridConfiguratorEditorStateContext.d.ts +1 -1
  57. package/dist/npm/shared/PivotGridConfiguratorEditorStateContext.js +1 -0
  58. package/dist/npm/shared/index.js +12 -5
  59. package/dist/npm/utils/index.d.ts +5 -5
  60. package/dist/npm/utils/index.js +23 -9
  61. package/dist/systemjs/kendo-react-pivotgrid.js +1 -1
  62. package/package.json +10 -10
@@ -27,7 +27,7 @@ import { toColumns, toRows, toTree, toData } from '@progress/kendo-pivotgrid-com
27
27
  */
28
28
  export var PivotGrid = React.forwardRef(function (props, ref) {
29
29
  validatePackage(packageMetadata);
30
- var _a = __assign({}, defaultProps, props), rows = _a.rows, rowAxes = _a.rowAxes, columns = _a.columns, columnAxes = _a.columnAxes, data = _a.data;
30
+ var _a = __assign(__assign({}, defaultProps), props), rows = _a.rows, rowAxes = _a.rowAxes, columns = _a.columns, columnAxes = _a.columnAxes, data = _a.data;
31
31
  var element = React.useRef(null);
32
32
  var target = React.useRef(null);
33
33
  React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
@@ -31,7 +31,7 @@ export interface PivotGridAxesEditorProps extends FieldProps {
31
31
  * @hidden
32
32
  */
33
33
  export declare const PivotGridConfiguratorEditorAxesContext: React.Context<{
34
- axes: string;
34
+ axes: string | null;
35
35
  }>;
36
36
  /**
37
37
  * Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridAxesEditor component.
@@ -21,7 +21,7 @@ export var PivotGridConfiguratorEditorAxesContext = React.createContext({ axes:
21
21
  * Represents the [KendoReact PivotGridAxesEditor component]({% slug api_pivotgrid_pivotgridaxeseditorprops %}).
22
22
  */
23
23
  export var PivotGridAxesEditor = React.forwardRef(function (props, ref) {
24
- var _a = __assign({}, defaultProps, props), value = _a.value, field = _a.field;
24
+ var _a = __assign(__assign({}, defaultProps), props), value = _a.value, field = _a.field;
25
25
  var chipList = React.useRef(null);
26
26
  var element = React.useRef(null);
27
27
  var target = React.useRef(null);
@@ -31,7 +31,7 @@ export var PivotGridAxesEditor = React.forwardRef(function (props, ref) {
31
31
  React.useImperativeHandle(ref, function () { return target.current; });
32
32
  var data = value
33
33
  .filter(function (v) { return v.name.length === 1 && v.name.every(function (n) { return n.indexOf('&') === -1; }); })
34
- .map(function (i) { return (__assign({}, i, { text: String(i.name) })); });
34
+ .map(function (i) { return (__assign(__assign({}, i), { text: String(i.name) })); });
35
35
  return (React.createElement(PivotGridConfiguratorEditorAxesContext.Provider, { value: { axes: field } },
36
36
  React.createElement(ChipListComponent, __assign({ ref: canUseRef(ChipListComponent) ? chipList : undefined, textField: "text", valueField: "name", data: data, chip: PivotGridAxisEditor, style: { position: 'relative' }, className: props.className, selection: "none" }, ChipListProps))));
37
37
  });
@@ -9,6 +9,11 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
13
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
14
+ to[j] = from[i];
15
+ return to;
16
+ };
12
17
  import * as React from 'react';
13
18
  import { compareAxes } from '@progress/kendo-pivotgrid-common';
14
19
  import { useDraggable, useCustomComponent, canUseRef } from '@progress/kendo-react-common';
@@ -47,7 +52,7 @@ export var PivotGridAxisEditor = React.forwardRef(function (props, ref) {
47
52
  if (filter.length) {
48
53
  dispatchState({
49
54
  type: PIVOT_CONFIGURATOR_ACTION.setFilter,
50
- payload: (inFilter || []).concat(filter.reduce(function (acc, current) { return acc.concat(current.filters.filter(function (f) { return f.value; })); }, []))
55
+ payload: __spreadArray(__spreadArray([], (inFilter || [])), filter.reduce(function (acc, current) { return __spreadArray(__spreadArray([], acc), current.filters.filter(function (f) { return f.value; })); }, []))
51
56
  }, syntheticEvent);
52
57
  }
53
58
  else {
@@ -82,7 +87,7 @@ export var PivotGridAxisEditor = React.forwardRef(function (props, ref) {
82
87
  setDrag(false);
83
88
  if (state.dragItem) {
84
89
  if (element.current) {
85
- element.current.style.transform = null;
90
+ element.current.style.transform = '';
86
91
  }
87
92
  dispatchState({ type: PIVOT_CONFIGURATOR_ACTION.drop, payload: props.dataItem });
88
93
  }
@@ -25,7 +25,7 @@ import { PivotGridConfiguratorEditorEventsContext, PivotGridConfiguratorEditorSt
25
25
  * Represents the [KendoReact PivotGridAxisFilterFieldsEditor component]({% slug api_pivotgrid_pivotgridaxisfilterfieldseditorprops %}).
26
26
  */
27
27
  export var PivotGridAxisFilterFieldsEditor = React.forwardRef(function (props, ref) {
28
- var _a = __assign({}, defaultProps, props), data = _a.data, dataItem = _a.dataItem, defaultFilter = _a.defaultFilter;
28
+ var _a = __assign(__assign({}, defaultProps), props), data = _a.data, dataItem = _a.dataItem, defaultFilter = _a.defaultFilter;
29
29
  var element = React.useRef(null);
30
30
  var target = React.useRef(null);
31
31
  var localization = useLocalization();
@@ -20,7 +20,7 @@ import { messages, configuratorTitle, configuratorCancel, configuratorApply } fr
20
20
  * Represents the [KendoReact PivotGridConfigurator component]({% slug api_pivotgrid_pivotgridconfiguratorprops %}).
21
21
  */
22
22
  export var PivotGridConfigurator = React.forwardRef(function (props, ref) {
23
- var _a = __assign({}, defaultProps, props), horizontal = _a.horizontal, data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes;
23
+ var _a = __assign(__assign({}, defaultProps), props), horizontal = _a.horizontal, data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes;
24
24
  var element = React.useRef(null);
25
25
  var target = React.useRef(null);
26
26
  var form = React.useRef(null);
@@ -146,7 +146,7 @@ export var PivotGridConfiguratorEditor = React.forwardRef(function (props, ref)
146
146
  React.createElement(PivotGridConfiguratorEditorStateContext.Provider, { value: [state, dispatchState] },
147
147
  React.createElement(Container, __assign({}, ContainerProps),
148
148
  React.createElement("div", { className: "k-form-field" },
149
- React.createElement(FieldsLabelComponent, __assign({}, FieldsLabelProps), localization.toLanguageString(configuratorEditorSearchTitle, messages[configuratorEditorSearchTitle]))),
149
+ React.createElement(FieldsLabelComponent, __assign({ name: "", component: Label }, FieldsLabelProps), localization.toLanguageString(configuratorEditorSearchTitle, messages[configuratorEditorSearchTitle]))),
150
150
  React.createElement("div", { className: "k-form-field" },
151
151
  React.createElement("div", { className: "k-fields-list-wrapper" },
152
152
  React.createElement(FieldsEditorComponent, __assign({ data: props.data, onExpand: handleFieldsEditorFieldExpand, onCheck: handleFieldsEditorFieldCheck, columnAxes: state.columnAxes, rowAxes: state.rowAxes, measureAxes: state.measureAxes }, FieldsEditorProps))))),
@@ -9,6 +9,11 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
13
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
14
+ to[j] = from[i];
15
+ return to;
16
+ };
12
17
  import * as React from 'react';
13
18
  import { TreeView as KendoReactTreeView, TreeViewItemPropsContext } from '@progress/kendo-react-treeview';
14
19
  import { useCustomComponent, canUseRef } from '@progress/kendo-react-common';
@@ -18,7 +23,7 @@ import { recursiveMap, flatMap, extractDefaultFields } from '../utils';
18
23
  * Represents the [KendoReact PivotGridFieldsEditor component]({% slug api_pivotgrid_pivotgridfieldseditorprops %}).
19
24
  */
20
25
  export var PivotGridFieldsEditor = React.forwardRef(function (props, ref) {
21
- var _a = __assign({}, defaultProps, props), data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes, onExpand = _a.onExpand, onCheck = _a.onCheck;
26
+ var _a = __assign(__assign({}, defaultProps), props), data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes, onExpand = _a.onExpand, onCheck = _a.onCheck;
22
27
  var treeView = React.useRef(null);
23
28
  var target = React.useRef(null);
24
29
  var _b = useCustomComponent(props.treeView || defaultProps.treeView), TreeViewComponent = _b[0], TreeViewProps = _b[1];
@@ -30,7 +35,7 @@ export var PivotGridFieldsEditor = React.forwardRef(function (props, ref) {
30
35
  var rowHierarchies = extractDefaultFields(rowAxes);
31
36
  var measureHierarchies = extractDefaultFields(measureAxes);
32
37
  var fieldsFlatMap = flatMap(data);
33
- var checked = fieldsFlatMap.filter(function (f) { return columnHierarchies.concat(rowHierarchies, measureHierarchies).some(function (h) { return (h === f.uniqueName || h === f.defaultHierarchy); }); });
38
+ var checked = fieldsFlatMap.filter(function (f) { return __spreadArray(__spreadArray(__spreadArray([], columnHierarchies), rowHierarchies), measureHierarchies).some(function (h) { return (h === f.uniqueName || h === f.defaultHierarchy); }); });
34
39
  var map = {
35
40
  caption: function (node) { return node.dataItem.caption; },
36
41
  id: function (node) { return node.dataItem.uniqueName; },
@@ -65,7 +70,7 @@ export var PivotGridFieldsEditor = React.forwardRef(function (props, ref) {
65
70
  }
66
71
  };
67
72
  var fields = recursiveMap(props.data, map);
68
- return (React.createElement(TreeViewItemPropsContext.Provider, { value: function (p) { return (__assign({}, p, { checkboxes: p.item.selectable })); } }, (fields && fields.length)
73
+ return (React.createElement(TreeViewItemPropsContext.Provider, { value: function (p) { return (__assign(__assign({}, p), { checkboxes: p.item.selectable })); } }, (fields && fields.length)
69
74
  ? React.createElement(TreeViewComponent, __assign({ ref: canUseRef(TreeViewComponent) ? treeView : undefined, data: fields, checkboxes: true, onExpandChange: handleExpand, onCheckChange: handleCheck, textField: 'caption', expandIcons: true, hasChildrenField: "hasChildren", checkIndeterminateField: "checkIndeterminate", childrenField: "children" }, TreeViewProps))
70
75
  : (React.createElement(NoDataComponent, __assign({}, NoDataProps)))));
71
76
  });
@@ -1,3 +1,8 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
2
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3
+ to[j] = from[i];
4
+ return to;
5
+ };
1
6
  import * as React from 'react';
2
7
  /**
3
8
  * @hidden
@@ -16,10 +21,10 @@ var expansionReducer = function (state, action, compare) {
16
21
  case EXPANSION_ACTION.toggle:
17
22
  if (Array.isArray(state)) {
18
23
  if (state.find(function (s) { return compare(s, action.payload); })) {
19
- return state.filter(function (s) { return !compare(s, action.payload); }).slice();
24
+ return __spreadArray([], state.filter(function (s) { return !compare(s, action.payload); }));
20
25
  }
21
26
  else {
22
- return state.concat([action.payload]);
27
+ return __spreadArray(__spreadArray([], state), [action.payload]);
23
28
  }
24
29
  }
25
30
  else {
@@ -33,7 +38,7 @@ var expansionReducer = function (state, action, compare) {
33
38
  case EXPANSION_ACTION.expand:
34
39
  if (Array.isArray(state)) {
35
40
  if (!state.find(function (s) { return compare(s, action.payload); })) {
36
- return state.concat([action.payload]);
41
+ return __spreadArray(__spreadArray([], state), [action.payload]);
37
42
  }
38
43
  }
39
44
  else {
@@ -45,7 +50,7 @@ var expansionReducer = function (state, action, compare) {
45
50
  case EXPANSION_ACTION.collapse:
46
51
  if (Array.isArray(state)) {
47
52
  if (state.find(function (s) { return compare(s, action.payload); })) {
48
- return state.filter(function (s) { return !compare(s, action.payload); }).slice();
53
+ return __spreadArray([], state.filter(function (s) { return !compare(s, action.payload); }));
49
54
  }
50
55
  }
51
56
  else {
@@ -5,4 +5,8 @@ export { HEADERS_ACTION } from '@progress/kendo-pivotgrid-common';
5
5
  /**
6
6
  * @hidden
7
7
  */
8
- export declare const useHeaders: (prop: PivotGridAxis[], tree: AxisDataItem, onChange?: (value: PivotGridAxis[], event: React.SyntheticEvent<Element, Event>) => void) => [PivotGridAxis[], (action: Pick<HeadersAction, "type" | "payload">, event: React.SyntheticEvent<Element, Event>) => void];
8
+ export declare const useHeaders: (prop: PivotGridAxis[], tree: AxisDataItem, onChange?: (value: PivotGridAxis[], event: React.SyntheticEvent) => void) => [PivotGridAxis[], (action: Omit<HeadersAction, 'tree'>, event: React.SyntheticEvent) => void];
9
+ /**
10
+ * @hidden
11
+ */
12
+ declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
@@ -16,7 +16,7 @@ export { HEADERS_ACTION } from '@progress/kendo-pivotgrid-common';
16
16
  */
17
17
  export var useHeaders = function (prop, tree, onChange) {
18
18
  var handleHeadersAction = function (action, event) {
19
- var newHeaders = headersReducer(prop, __assign({}, action, { tree: tree }));
19
+ var newHeaders = headersReducer(prop, __assign(__assign({}, action), { tree: tree }));
20
20
  if (onChange) {
21
21
  onChange(newHeaders, event);
22
22
  }
@@ -2,4 +2,4 @@ import * as React from 'react';
2
2
  /**
3
3
  * @hidden
4
4
  */
5
- export declare const useHorizontalScrollSync: (...elements: React.RefObject<HTMLElement>[]) => (event: React.SyntheticEvent<Element, Event>) => void;
5
+ export declare const useHorizontalScrollSync: (...elements: React.RefObject<HTMLElement>[]) => (event: React.SyntheticEvent) => void;
@@ -15,7 +15,6 @@ declare type PIVOT_CONFIGURATOR_ACTION_TYPE = COMMON_CONFIGURATOR_ACTION | EXTEN
15
15
  * @hidden
16
16
  */
17
17
  export declare const PIVOT_CONFIGURATOR_ACTION: {
18
- [x: number]: string;
19
18
  toggleExpansion: EXTENDED_CONFIGURATOR_ACTION.toggleExpansion;
20
19
  toggleSelection: COMMON_CONFIGURATOR_ACTION.toggleSelection;
21
20
  addColumnAxis: COMMON_CONFIGURATOR_ACTION.addColumnAxis;
@@ -80,5 +79,5 @@ export interface PivotGridConfiguratorAction {
80
79
  /**
81
80
  * @hidden
82
81
  */
83
- export declare const usePivotConfiguratorEditor: (props: PivotGridConfiguratorEditorProps, target: any) => [PivotGridConfiguratorEditorState, (action: PivotGridConfiguratorAction, syntheticEvent?: React.SyntheticEvent<Element, Event>) => void];
82
+ export declare const usePivotConfiguratorEditor: (props: PivotGridConfiguratorEditorProps, target: any) => [PivotGridConfiguratorEditorState, (action: PivotGridConfiguratorAction, syntheticEvent?: React.SyntheticEvent) => void];
84
83
  export {};
@@ -21,7 +21,7 @@ var EXTENDED_CONFIGURATOR_ACTION;
21
21
  /**
22
22
  * @hidden
23
23
  */
24
- export var PIVOT_CONFIGURATOR_ACTION = __assign({}, COMMON_CONFIGURATOR_ACTION, EXTENDED_CONFIGURATOR_ACTION);
24
+ export var PIVOT_CONFIGURATOR_ACTION = __assign(__assign({}, COMMON_CONFIGURATOR_ACTION), EXTENDED_CONFIGURATOR_ACTION);
25
25
  ;
26
26
  /**
27
27
  * @hidden
@@ -50,9 +50,14 @@ export var usePivotLocalDataService = function (args) {
50
50
  var dataTree = React.useMemo(function () { return createDataTree(args.data, rowSettings, columnSettings, measuresSettings, bindingFields, filter); }, [args.data, rowSettings, columnSettings, measuresSettings, filter]);
51
51
  var configuratorData = React.useMemo(function () { return createFlatSchemaDimensions(args.dimensions, args.measures); }, [args.dimensions, args.measures]);
52
52
  var dataState = React.useMemo(function () { return createLocalDataState({
53
- dataTree: dataTree, rowSettings: rowSettings, columnSettings: columnSettings,
54
- rowAxes: rowAxes, columnAxes: columnAxes, measures: measuresSettings,
55
- sort: sort, fields: bindingFields
53
+ dataTree: dataTree,
54
+ rowSettings: rowSettings,
55
+ columnSettings: columnSettings,
56
+ rowAxes: rowAxes,
57
+ columnAxes: columnAxes,
58
+ measures: measuresSettings,
59
+ sort: sort,
60
+ fields: bindingFields
56
61
  }); }, [columnAxes, columnSettings, dataTree, measuresSettings, rowAxes, rowSettings, sort]);
57
62
  return {
58
63
  pivotProps: {
@@ -1,8 +1,9 @@
1
1
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2
3
  return new (P || (P = Promise))(function (resolve, reject) {
3
4
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
4
5
  function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
5
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
7
8
  });
8
9
  };
@@ -33,7 +34,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
33
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
34
35
  }
35
36
  };
36
- var _this = this;
37
37
  /* eslint-disable max-len */
38
38
  import * as React from 'react';
39
39
  import { fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
@@ -132,7 +132,7 @@ export var usePivotOLAPService = function (args) {
132
132
  }
133
133
  return null;
134
134
  };
135
- var loadAxisFields = function (axis) { return __awaiter(_this, void 0, void 0, function () {
135
+ var loadAxisFields = function (axis) { return __awaiter(void 0, void 0, void 0, function () {
136
136
  var command, dimensionUniqueName, hierarchyUniqueName, levelUniqueName, memberUniqueName, treeOp, options;
137
137
  return __generator(this, function (_a) {
138
138
  if (axis.name) {
@@ -158,7 +158,7 @@ export var usePivotOLAPService = function (args) {
158
158
  return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
159
159
  });
160
160
  }); };
161
- var loadSubFields = function (axis) { return __awaiter(_this, void 0, void 0, function () {
161
+ var loadSubFields = function (axis) { return __awaiter(void 0, void 0, void 0, function () {
162
162
  var command, dimensionUniqueName, hierarchyUniqueName, levelUniqueName, memberUniqueName, treeOp, options;
163
163
  return __generator(this, function (_a) {
164
164
  if (axis.uniqueName) {
@@ -185,7 +185,7 @@ export var usePivotOLAPService = function (args) {
185
185
  return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
186
186
  });
187
187
  }); };
188
- var loadFields = function (field) { return __awaiter(_this, void 0, void 0, function () {
188
+ var loadFields = function (field) { return __awaiter(void 0, void 0, void 0, function () {
189
189
  var command, dimensionUniqueName, hierarchyUniqueName, levelUniqueName, memberUniqueName, treeOp, options;
190
190
  return __generator(this, function (_a) {
191
191
  if (field.type === 2) {
@@ -218,7 +218,7 @@ export var usePivotOLAPService = function (args) {
218
218
  return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
219
219
  });
220
220
  }); };
221
- var loadKPIs = function () { return __awaiter(_this, void 0, void 0, function () {
221
+ var loadKPIs = function () { return __awaiter(void 0, void 0, void 0, function () {
222
222
  var options;
223
223
  return __generator(this, function (_a) {
224
224
  options = {
@@ -235,7 +235,7 @@ export var usePivotOLAPService = function (args) {
235
235
  return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
236
236
  });
237
237
  }); };
238
- var handleFieldExpand = function (event) { return __awaiter(_this, void 0, void 0, function () {
238
+ var handleFieldExpand = function (event) { return __awaiter(void 0, void 0, void 0, function () {
239
239
  var newFields, field, KPIs, _a, additionalFields;
240
240
  return __generator(this, function (_b) {
241
241
  switch (_b.label) {
@@ -266,7 +266,7 @@ export var usePivotOLAPService = function (args) {
266
266
  }
267
267
  });
268
268
  }); };
269
- var handleAxisFilterFieldsExpandChange = function (event) { return __awaiter(_this, void 0, void 0, function () {
269
+ var handleAxisFilterFieldsExpandChange = function (event) { return __awaiter(void 0, void 0, void 0, function () {
270
270
  var map, _a, axes, setter, newAxes, axis, axisFields;
271
271
  return __generator(this, function (_b) {
272
272
  switch (_b.label) {
@@ -290,7 +290,7 @@ export var usePivotOLAPService = function (args) {
290
290
  }
291
291
  });
292
292
  }); };
293
- var handleAxisFilterFieldExpand = function (event) { return __awaiter(_this, void 0, void 0, function () {
293
+ var handleAxisFilterFieldExpand = function (event) { return __awaiter(void 0, void 0, void 0, function () {
294
294
  var map, _a, axes, setter, newAxes, axis, newFields, field, axisFilterFieldChildren;
295
295
  return __generator(this, function (_b) {
296
296
  switch (_b.label) {
@@ -2,4 +2,4 @@ import * as React from 'react';
2
2
  /**
3
3
  * @hidden
4
4
  */
5
- export declare const useVerticalScrollSync: (...elements: React.RefObject<HTMLElement>[]) => (event: React.SyntheticEvent<Element, Event>) => void;
5
+ export declare const useVerticalScrollSync: (...elements: React.RefObject<HTMLElement>[]) => (event: React.SyntheticEvent) => void;
@@ -50,16 +50,16 @@ export declare const configuratorButtonLabel = "pivotgrid.configuratorButtonLabe
50
50
  * @hidden
51
51
  */
52
52
  export declare const messages: {
53
- [fieldMenuReset]: string;
54
- [fieldMenuApply]: string;
55
- [configuratorCancel]: string;
56
- [configuratorApply]: string;
57
- [configuratorTitle]: string;
58
- [configuratorEditorSearchTitle]: string;
59
- [configuratorEditorSearchPlaceholder]: string;
60
- [configuratorColumnsTitle]: string;
61
- [configuratorRowsTitle]: string;
62
- [configuratorMeasuresTitle]: string;
63
- [configuratorButtonLabel]: string;
64
- [configuratorMissingFields]: string;
53
+ "pivotgrid.fieldMenuReset": string;
54
+ "pivotgrid.fieldMenuApply": string;
55
+ "pivotgrid.configuratorCancel": string;
56
+ "pivotgrid.configuratorApply": string;
57
+ "pivotgrid.configuratorTitle": string;
58
+ "pivotgrid.configuratorEditorSearchTitle": string;
59
+ "pivotgrid.configuratorEditorSearchPlaceholder": string;
60
+ "pivotgrid.configuratorColumnsTitle": string;
61
+ "pivotgrid.configuratorRowsTitle": string;
62
+ "pivotgrid.configuratorMeasuresTitle": string;
63
+ "pivotgrid.configuratorButtonLabel": string;
64
+ "pivotgrid.configuratorMissingFields": string;
65
65
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-pivotgrid',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1652863451,
8
+ publishDate: 1653648745,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -3,4 +3,4 @@ import { PivotGridConfiguratorAction, PivotGridConfiguratorEditorState } from '.
3
3
  /**
4
4
  * @hidden
5
5
  */
6
- export declare const PivotGridConfiguratorEditorStateContext: React.Context<[PivotGridConfiguratorEditorState, (action: PivotGridConfiguratorAction, event?: React.SyntheticEvent<Element, Event>) => void]>;
6
+ export declare const PivotGridConfiguratorEditorStateContext: React.Context<[PivotGridConfiguratorEditorState, (action: PivotGridConfiguratorAction, event?: React.SyntheticEvent) => void]>;
@@ -3,17 +3,17 @@ import { PivotGridField } from '@progress/kendo-pivotgrid-common';
3
3
  /**
4
4
  * @hidden
5
5
  */
6
- export declare const recursiveMap: <I extends any, O extends any>(nodes?: I[], map?: {
6
+ export declare const recursiveMap: <I extends unknown, O extends unknown>(nodes?: I[], map?: {
7
7
  [key: string]: Function;
8
8
  }, parent?: any) => O[];
9
9
  /**
10
10
  * @hidden
11
11
  */
12
- export declare const flatMap: <T extends any>(nodes?: T[]) => T[];
12
+ export declare const flatMap: <T extends unknown>(nodes?: T[]) => T[];
13
13
  /**
14
14
  * @hidden
15
15
  */
16
- export declare const extractDefaultFields: (columns?: AxisDescriptor[]) => any[];
16
+ export declare const extractDefaultFields: (columns?: AxisDescriptor[]) => unknown[];
17
17
  /**
18
18
  * @hidden
19
19
  */
@@ -25,11 +25,11 @@ export declare const generateDataKey: (rows: any, columns: any) => string;
25
25
  /**
26
26
  * @hidden
27
27
  */
28
- export declare const findFilter: (filter: any[], member: any, operator?: any) => any;
28
+ export declare const findFilter: (filter: any[] | undefined, member: any, operator?: any) => any;
29
29
  /**
30
30
  * @hidden
31
31
  */
32
- export declare const findFilters: (filter: any[], member: any, operator?: any) => any;
32
+ export declare const findFilters: (filter: any[] | undefined, member: any, operator?: any) => any;
33
33
  /**
34
34
  * @hidden
35
35
  */
@@ -1,3 +1,8 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
2
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3
+ to[j] = from[i];
4
+ return to;
5
+ };
1
6
  /**
2
7
  * @hidden
3
8
  */
@@ -18,7 +23,7 @@ export var recursiveMap = function (nodes, map, parent) {
18
23
  */
19
24
  export var flatMap = function (nodes) {
20
25
  if (nodes === void 0) { nodes = []; }
21
- var result = nodes.slice();
26
+ var result = __spreadArray([], nodes);
22
27
  (nodes || []).forEach(function (child) {
23
28
  result = result.concat(flatMap(child.children));
24
29
  });
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGrid = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_common_1 = require("@progress/kendo-react-common");
16
17
  var package_metadata_1 = require("./package-metadata");
@@ -29,7 +30,7 @@ var kendo_pivotgrid_common_1 = require("@progress/kendo-pivotgrid-common");
29
30
  */
30
31
  exports.PivotGrid = React.forwardRef(function (props, ref) {
31
32
  kendo_react_common_1.validatePackage(package_metadata_1.packageMetadata);
32
- var _a = __assign({}, defaultProps, props), rows = _a.rows, rowAxes = _a.rowAxes, columns = _a.columns, columnAxes = _a.columnAxes, data = _a.data;
33
+ var _a = __assign(__assign({}, defaultProps), props), rows = _a.rows, rowAxes = _a.rowAxes, columns = _a.columns, columnAxes = _a.columnAxes, data = _a.data;
33
34
  var element = React.useRef(null);
34
35
  var target = React.useRef(null);
35
36
  React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
@@ -31,7 +31,7 @@ export interface PivotGridAxesEditorProps extends FieldProps {
31
31
  * @hidden
32
32
  */
33
33
  export declare const PivotGridConfiguratorEditorAxesContext: React.Context<{
34
- axes: string;
34
+ axes: string | null;
35
35
  }>;
36
36
  /**
37
37
  * Represents the object which is passed to the [`ref`](https://reactjs.org/docs/refs-and-the-dom.html) callback of the PivotGridAxesEditor component.
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridAxesEditor = exports.PivotGridConfiguratorEditorAxesContext = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
16
17
  var kendo_react_common_1 = require("@progress/kendo-react-common");
@@ -23,7 +24,7 @@ exports.PivotGridConfiguratorEditorAxesContext = React.createContext({ axes: nul
23
24
  * Represents the [KendoReact PivotGridAxesEditor component]({% slug api_pivotgrid_pivotgridaxeseditorprops %}).
24
25
  */
25
26
  exports.PivotGridAxesEditor = React.forwardRef(function (props, ref) {
26
- var _a = __assign({}, defaultProps, props), value = _a.value, field = _a.field;
27
+ var _a = __assign(__assign({}, defaultProps), props), value = _a.value, field = _a.field;
27
28
  var chipList = React.useRef(null);
28
29
  var element = React.useRef(null);
29
30
  var target = React.useRef(null);
@@ -33,7 +34,7 @@ exports.PivotGridAxesEditor = React.forwardRef(function (props, ref) {
33
34
  React.useImperativeHandle(ref, function () { return target.current; });
34
35
  var data = value
35
36
  .filter(function (v) { return v.name.length === 1 && v.name.every(function (n) { return n.indexOf('&') === -1; }); })
36
- .map(function (i) { return (__assign({}, i, { text: String(i.name) })); });
37
+ .map(function (i) { return (__assign(__assign({}, i), { text: String(i.name) })); });
37
38
  return (React.createElement(exports.PivotGridConfiguratorEditorAxesContext.Provider, { value: { axes: field } },
38
39
  React.createElement(ChipListComponent, __assign({ ref: kendo_react_common_1.canUseRef(ChipListComponent) ? chipList : undefined, textField: "text", valueField: "name", data: data, chip: AxisEditor_1.PivotGridAxisEditor, style: { position: 'relative' }, className: props.className, selection: "none" }, ChipListProps))));
39
40
  });
@@ -10,7 +10,13 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
14
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
15
+ to[j] = from[i];
16
+ return to;
17
+ };
13
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.PivotGridAxisEditor = void 0;
14
20
  var React = require("react");
15
21
  var kendo_pivotgrid_common_1 = require("@progress/kendo-pivotgrid-common");
16
22
  var kendo_react_common_1 = require("@progress/kendo-react-common");
@@ -49,7 +55,7 @@ exports.PivotGridAxisEditor = React.forwardRef(function (props, ref) {
49
55
  if (filter.length) {
50
56
  dispatchState({
51
57
  type: hooks_1.PIVOT_CONFIGURATOR_ACTION.setFilter,
52
- payload: (inFilter || []).concat(filter.reduce(function (acc, current) { return acc.concat(current.filters.filter(function (f) { return f.value; })); }, []))
58
+ payload: __spreadArray(__spreadArray([], (inFilter || [])), filter.reduce(function (acc, current) { return __spreadArray(__spreadArray([], acc), current.filters.filter(function (f) { return f.value; })); }, []))
53
59
  }, syntheticEvent);
54
60
  }
55
61
  else {
@@ -84,7 +90,7 @@ exports.PivotGridAxisEditor = React.forwardRef(function (props, ref) {
84
90
  setDrag(false);
85
91
  if (state.dragItem) {
86
92
  if (element.current) {
87
- element.current.style.transform = null;
93
+ element.current.style.transform = '';
88
94
  }
89
95
  dispatchState({ type: hooks_1.PIVOT_CONFIGURATOR_ACTION.drop, payload: props.dataItem });
90
96
  }
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridAxisFilterFieldsEditor = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_treeview_1 = require("@progress/kendo-react-treeview");
16
17
  var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
@@ -27,7 +28,7 @@ var shared_1 = require("../shared");
27
28
  * Represents the [KendoReact PivotGridAxisFilterFieldsEditor component]({% slug api_pivotgrid_pivotgridaxisfilterfieldseditorprops %}).
28
29
  */
29
30
  exports.PivotGridAxisFilterFieldsEditor = React.forwardRef(function (props, ref) {
30
- var _a = __assign({}, defaultProps, props), data = _a.data, dataItem = _a.dataItem, defaultFilter = _a.defaultFilter;
31
+ var _a = __assign(__assign({}, defaultProps), props), data = _a.data, dataItem = _a.dataItem, defaultFilter = _a.defaultFilter;
31
32
  var element = React.useRef(null);
32
33
  var target = React.useRef(null);
33
34
  var localization = kendo_react_intl_1.useLocalization();
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridCell = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_common_1 = require("@progress/kendo-react-common");
16
17
  ;
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridColumn = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_common_1 = require("@progress/kendo-react-common");
16
17
  ;
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridConfigurator = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
16
17
  var kendo_react_common_1 = require("@progress/kendo-react-common");
@@ -22,7 +23,7 @@ var messages_1 = require("../messages");
22
23
  * Represents the [KendoReact PivotGridConfigurator component]({% slug api_pivotgrid_pivotgridconfiguratorprops %}).
23
24
  */
24
25
  exports.PivotGridConfigurator = React.forwardRef(function (props, ref) {
25
- var _a = __assign({}, defaultProps, props), horizontal = _a.horizontal, data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes;
26
+ var _a = __assign(__assign({}, defaultProps), props), horizontal = _a.horizontal, data = _a.data, rowAxes = _a.rowAxes, columnAxes = _a.columnAxes, measureAxes = _a.measureAxes;
26
27
  var element = React.useRef(null);
27
28
  var target = React.useRef(null);
28
29
  var form = React.useRef(null);
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridConfiguratorButton = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_common_1 = require("@progress/kendo-react-common");
16
17
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PivotGridConfiguratorEditor = void 0;
14
15
  var React = require("react");
15
16
  var kendo_react_form_1 = require("@progress/kendo-react-form");
16
17
  var kendo_react_labels_1 = require("@progress/kendo-react-labels");
@@ -148,7 +149,7 @@ exports.PivotGridConfiguratorEditor = React.forwardRef(function (props, ref) {
148
149
  React.createElement(shared_1.PivotGridConfiguratorEditorStateContext.Provider, { value: [state, dispatchState] },
149
150
  React.createElement(Container, __assign({}, ContainerProps),
150
151
  React.createElement("div", { className: "k-form-field" },
151
- React.createElement(FieldsLabelComponent, __assign({}, FieldsLabelProps), localization.toLanguageString(messages_1.configuratorEditorSearchTitle, messages_1.messages[messages_1.configuratorEditorSearchTitle]))),
152
+ React.createElement(FieldsLabelComponent, __assign({ name: "", component: kendo_react_labels_1.Label }, FieldsLabelProps), localization.toLanguageString(messages_1.configuratorEditorSearchTitle, messages_1.messages[messages_1.configuratorEditorSearchTitle]))),
152
153
  React.createElement("div", { className: "k-form-field" },
153
154
  React.createElement("div", { className: "k-fields-list-wrapper" },
154
155
  React.createElement(FieldsEditorComponent, __assign({ data: props.data, onExpand: handleFieldsEditorFieldExpand, onCheck: handleFieldsEditorFieldCheck, columnAxes: state.columnAxes, rowAxes: state.rowAxes, measureAxes: state.measureAxes }, FieldsEditorProps))))),
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PivotGridContainer = void 0;
3
4
  var React = require("react");
4
5
  var kendo_react_common_1 = require("@progress/kendo-react-common");
5
6
  /**