@progress/kendo-angular-pivotgrid 0.2.0-dev.202209020712 → 0.2.0-dev.202209070927

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 (60) 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 +26 -7
  45. package/esm2015/pivotgrid.module.js +9 -12
  46. package/esm2015/rendering/pivotgrid-table.component.js +8 -2
  47. package/esm2015/shared.module.js +40 -0
  48. package/esm2015/util.js +59 -28
  49. package/fesm2015/kendo-angular-pivotgrid.js +1397 -109
  50. package/localization/messages.d.ts +23 -1
  51. package/localization/pivot-localization.service.d.ts +19 -0
  52. package/main.d.ts +1 -0
  53. package/models/configurator-settings.d.ts +4 -1
  54. package/package.json +2 -2
  55. package/pivotgrid.component.d.ts +6 -1
  56. package/pivotgrid.module.d.ts +6 -7
  57. package/schematics/ngAdd/index.js +1 -1
  58. package/schematics/ngAdd/index.js.map +1 -1
  59. package/shared.module.d.ts +17 -0
  60. package/util.d.ts +32 -8
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
+ }