@progress/kendo-angular-pivotgrid 0.2.0-dev.202208250747 → 0.2.0-dev.202209021834

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 (58) hide show
  1. package/bundles/kendo-angular-pivotgrid.umd.js +1 -1
  2. package/configurator/chip-menu/chip-menu-container.component.d.ts +21 -0
  3. package/configurator/chip-menu/chip-menu-filter.component.d.ts +44 -0
  4. package/configurator/chip-menu/chip-menu-item-base.d.ts +22 -0
  5. package/configurator/chip-menu/chip-menu-item-content-template.directive.d.ts +18 -0
  6. package/configurator/chip-menu/chip-menu-item.component.d.ts +50 -0
  7. package/configurator/chip-menu/chip-menu-item.directive.d.ts +32 -0
  8. package/configurator/chip-menu/chip-menu-sort.component.d.ts +33 -0
  9. package/configurator/chip-menu/chip-menu.component.d.ts +35 -0
  10. package/configurator/chip-menu/chip-menu.module.d.ts +26 -0
  11. package/configurator/chip-menu/chip-menu.service.d.ts +22 -0
  12. package/configurator/chip-menu/filtering/filter-menu-container.component.d.ts +47 -0
  13. package/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.d.ts +19 -0
  14. package/configurator/chip-menu/filtering/menu-tabbing.service.d.ts +17 -0
  15. package/configurator/chip-menu/filtering/string-filter-menu.component.d.ts +53 -0
  16. package/configurator/chip-menu/single-popup.service.d.ts +50 -0
  17. package/configurator/configurator.component.d.ts +4 -1
  18. package/data-binding/base-binding-directive.d.ts +10 -1
  19. package/data-binding/pivotgrid-data.service.d.ts +2 -0
  20. package/esm2015/configurator/chip-menu/chip-menu-container.component.js +46 -0
  21. package/esm2015/configurator/chip-menu/chip-menu-filter.component.js +112 -0
  22. package/esm2015/configurator/chip-menu/chip-menu-item-base.js +36 -0
  23. package/esm2015/configurator/chip-menu/chip-menu-item-content-template.directive.js +27 -0
  24. package/esm2015/configurator/chip-menu/chip-menu-item.component.js +157 -0
  25. package/esm2015/configurator/chip-menu/chip-menu-item.directive.js +88 -0
  26. package/esm2015/configurator/chip-menu/chip-menu-sort.component.js +89 -0
  27. package/esm2015/configurator/chip-menu/chip-menu.component.js +130 -0
  28. package/esm2015/configurator/chip-menu/chip-menu.module.js +83 -0
  29. package/esm2015/configurator/chip-menu/chip-menu.service.js +28 -0
  30. package/esm2015/configurator/chip-menu/filtering/filter-menu-container.component.js +173 -0
  31. package/esm2015/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.js +38 -0
  32. package/esm2015/configurator/chip-menu/filtering/menu-tabbing.service.js +20 -0
  33. package/esm2015/configurator/chip-menu/filtering/string-filter-menu.component.js +133 -0
  34. package/esm2015/configurator/chip-menu/single-popup.service.js +121 -0
  35. package/esm2015/configurator/configurator.component.js +56 -33
  36. package/esm2015/configurator/configurator.service.js +2 -2
  37. package/esm2015/data-binding/base-binding-directive.js +17 -7
  38. package/esm2015/data-binding/local-binding.directive.js +3 -3
  39. package/esm2015/data-binding/olap-binding.directive.js +8 -5
  40. package/esm2015/localization/messages.js +3 -1
  41. package/esm2015/localization/pivot-localization.service.js +28 -0
  42. package/esm2015/models/configurator-settings.js +3 -1
  43. package/esm2015/package-metadata.js +1 -1
  44. package/esm2015/pivotgrid.component.js +79 -14
  45. package/esm2015/pivotgrid.module.js +9 -12
  46. package/esm2015/shared.module.js +40 -0
  47. package/esm2015/util.js +59 -28
  48. package/fesm2015/kendo-angular-pivotgrid.js +1507 -180
  49. package/localization/messages.d.ts +23 -1
  50. package/localization/pivot-localization.service.d.ts +19 -0
  51. package/models/configurator-settings.d.ts +4 -1
  52. package/package.json +3 -3
  53. package/pivotgrid.component.d.ts +20 -3
  54. package/pivotgrid.module.d.ts +6 -7
  55. package/schematics/ngAdd/index.js +1 -1
  56. package/schematics/ngAdd/index.js.map +1 -1
  57. package/shared.module.d.ts +17 -0
  58. package/util.d.ts +32 -8
@@ -2,10 +2,8 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { CommonModule } from '@angular/common';
6
5
  import { NgModule } from '@angular/core';
7
6
  import { IndicatorsModule } from "@progress/kendo-angular-indicators";
8
- import { ButtonsModule } from "@progress/kendo-angular-buttons";
9
7
  import { TreeViewModule } from "@progress/kendo-angular-treeview";
10
8
  import { PivotGridComponent } from './pivotgrid.component';
11
9
  import { PivotGridCellDirective } from './rendering/pivotgrid-cell.directive';
@@ -16,18 +14,18 @@ import { PivotOLAPBindingDirective } from './data-binding/olap-binding.directive
16
14
  import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
17
15
  import { CustomMessagesComponent } from './localization/custom-messages.component';
18
16
  import { PivotGridConfiguratorComponent } from './configurator/configurator.component';
19
- import { InputsModule } from '@progress/kendo-angular-inputs';
20
17
  import { DraggableChipDirective } from './configurator/draggable.directive';
21
18
  import { DropTargetDirective } from './configurator/drop-target.directive';
19
+ import { ChipMenuModule } from './configurator/chip-menu/chip-menu.module';
20
+ import { SharedModule } from './shared.module';
22
21
  import * as i0 from "@angular/core";
23
22
  const IMPORTED_MODULES = [
24
- CommonModule,
25
23
  EventsModule,
26
24
  IndicatorsModule,
27
- ButtonsModule,
28
25
  TreeViewModule,
29
- InputsModule,
30
- DraggableModule
26
+ DraggableModule,
27
+ ChipMenuModule,
28
+ SharedModule
31
29
  ];
32
30
  const DECLARATIONS = [
33
31
  PivotGridComponent,
@@ -64,13 +62,12 @@ PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
64
62
  DraggableChipDirective,
65
63
  DropTargetDirective,
66
64
  LocalizedMessagesDirective,
67
- CustomMessagesComponent], imports: [CommonModule,
68
- EventsModule,
65
+ CustomMessagesComponent], imports: [EventsModule,
69
66
  IndicatorsModule,
70
- ButtonsModule,
71
67
  TreeViewModule,
72
- InputsModule,
73
- DraggableModule], exports: [PivotGridComponent,
68
+ DraggableModule,
69
+ ChipMenuModule,
70
+ SharedModule], exports: [PivotGridComponent,
74
71
  PivotGridTableComponent,
75
72
  PivotGridCellDirective,
76
73
  PivotLocalBindingDirective,
@@ -0,0 +1,40 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { NgModule } from '@angular/core';
6
+ import { CommonModule } from '@angular/common';
7
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
8
+ import { InputsModule } from '@progress/kendo-angular-inputs';
9
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
10
+ import * as i0 from "@angular/core";
11
+ const MODULES = [
12
+ CommonModule,
13
+ DropDownsModule,
14
+ InputsModule,
15
+ ButtonsModule
16
+ ];
17
+ /**
18
+ * @hidden
19
+ */
20
+ export class SharedModule {
21
+ }
22
+ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
23
+ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [CommonModule,
24
+ DropDownsModule,
25
+ InputsModule,
26
+ ButtonsModule], exports: [CommonModule,
27
+ DropDownsModule,
28
+ InputsModule,
29
+ ButtonsModule] });
30
+ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[MODULES], CommonModule,
31
+ DropDownsModule,
32
+ InputsModule,
33
+ ButtonsModule] });
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
35
+ type: NgModule,
36
+ args: [{
37
+ imports: [MODULES],
38
+ exports: [MODULES]
39
+ }]
40
+ }] });
package/esm2015/util.js CHANGED
@@ -2,10 +2,19 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ const EMPTY_REGEX = /^\s*$/;
5
6
  /**
6
7
  * @hidden
7
8
  */
8
9
  export const isPresent = (value) => value !== null && value !== undefined;
10
+ /**
11
+ * @hidden
12
+ */
13
+ export const isBlank = (value) => value === null || value === undefined;
14
+ /**
15
+ * @hidden
16
+ */
17
+ export const isNullOrEmptyString = (value) => isBlank(value) || EMPTY_REGEX.test(value);
9
18
  /**
10
19
  * @hidden
11
20
  * Returns whether two arrays contain the same values.
@@ -64,34 +73,6 @@ export const syncWheel = (event, tables, prop, axis) => {
64
73
  tables[1][prop] += delta;
65
74
  }
66
75
  };
67
- /**
68
- * @hidden
69
- */
70
- export function cloneTo(obj, result) {
71
- for (let field in obj) {
72
- if (obj.hasOwnProperty(field)) {
73
- const value = obj[field];
74
- if (Array.isArray(value)) {
75
- result[field] = value.slice(0);
76
- }
77
- else if (value && typeof value === 'object' && !(value instanceof Date)) {
78
- result[field] = result[field] || {};
79
- cloneTo(value, result[field]);
80
- }
81
- else {
82
- result[field] = value;
83
- }
84
- }
85
- }
86
- }
87
- /**
88
- * @hidden
89
- */
90
- export function clone(obj) {
91
- const result = {};
92
- cloneTo(obj, result);
93
- return result;
94
- }
95
76
  /**
96
77
  * @hidden
97
78
  */
@@ -150,3 +131,53 @@ export const position = (target, before) => {
150
131
  * @hidden
151
132
  */
152
133
  export const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);
134
+ /**
135
+ * @hidden
136
+ */
137
+ export const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
138
+ /**
139
+ * @hidden
140
+ */
141
+ export const cloneDate = (date) => date ? new Date(date.getTime()) : null;
142
+ /**
143
+ * @hidden
144
+ */
145
+ export function clone(obj) {
146
+ const result = {};
147
+ cloneObject(obj, result);
148
+ return result;
149
+ }
150
+ /**
151
+ * @hidden
152
+ */
153
+ export function cloneObject(obj, result) {
154
+ for (let field in obj) {
155
+ if (obj.hasOwnProperty(field)) {
156
+ const value = obj[field];
157
+ result[field] = cloneValue(value, result[field]);
158
+ }
159
+ }
160
+ }
161
+ /**
162
+ * @hidden
163
+ */
164
+ export function cloneValue(value, nextValue) {
165
+ if (Array.isArray(value)) {
166
+ return cloneArray(value);
167
+ }
168
+ else if (value instanceof Date) {
169
+ return cloneDate(value);
170
+ }
171
+ else if (value && typeof value === 'object') {
172
+ const newNextValue = nextValue || {};
173
+ cloneObject(value, newNextValue);
174
+ return newNextValue;
175
+ }
176
+ return value;
177
+ }
178
+ /**
179
+ * @hidden
180
+ */
181
+ export function cloneArray(array) {
182
+ return array.map(value => cloneValue(value, undefined));
183
+ }