@progress/kendo-angular-pivotgrid 0.2.0-dev.202209020712 → 0.2.0-dev.202209020832
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/bundles/kendo-angular-pivotgrid.umd.js +1 -1
- package/configurator/chip-menu/chip-menu-container.component.d.ts +21 -0
- package/configurator/chip-menu/chip-menu-filter.component.d.ts +44 -0
- package/configurator/chip-menu/chip-menu-item-base.d.ts +22 -0
- package/configurator/chip-menu/chip-menu-item-content-template.directive.d.ts +18 -0
- package/configurator/chip-menu/chip-menu-item.component.d.ts +50 -0
- package/configurator/chip-menu/chip-menu-item.directive.d.ts +32 -0
- package/configurator/chip-menu/chip-menu-sort.component.d.ts +33 -0
- package/configurator/chip-menu/chip-menu.component.d.ts +35 -0
- package/configurator/chip-menu/chip-menu.module.d.ts +26 -0
- package/configurator/chip-menu/chip-menu.service.d.ts +22 -0
- package/configurator/chip-menu/filtering/filter-menu-container.component.d.ts +47 -0
- package/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.d.ts +19 -0
- package/configurator/chip-menu/filtering/menu-tabbing.service.d.ts +17 -0
- package/configurator/chip-menu/filtering/string-filter-menu.component.d.ts +53 -0
- package/configurator/chip-menu/single-popup.service.d.ts +50 -0
- package/configurator/configurator.component.d.ts +4 -1
- package/data-binding/base-binding-directive.d.ts +10 -1
- package/esm2015/configurator/chip-menu/chip-menu-container.component.js +46 -0
- package/esm2015/configurator/chip-menu/chip-menu-filter.component.js +112 -0
- package/esm2015/configurator/chip-menu/chip-menu-item-base.js +36 -0
- package/esm2015/configurator/chip-menu/chip-menu-item-content-template.directive.js +27 -0
- package/esm2015/configurator/chip-menu/chip-menu-item.component.js +157 -0
- package/esm2015/configurator/chip-menu/chip-menu-item.directive.js +88 -0
- package/esm2015/configurator/chip-menu/chip-menu-sort.component.js +89 -0
- package/esm2015/configurator/chip-menu/chip-menu.component.js +130 -0
- package/esm2015/configurator/chip-menu/chip-menu.module.js +83 -0
- package/esm2015/configurator/chip-menu/chip-menu.service.js +28 -0
- package/esm2015/configurator/chip-menu/filtering/filter-menu-container.component.js +173 -0
- package/esm2015/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.js +38 -0
- package/esm2015/configurator/chip-menu/filtering/menu-tabbing.service.js +20 -0
- package/esm2015/configurator/chip-menu/filtering/string-filter-menu.component.js +133 -0
- package/esm2015/configurator/chip-menu/single-popup.service.js +121 -0
- package/esm2015/configurator/configurator.component.js +56 -33
- package/esm2015/configurator/configurator.service.js +2 -2
- package/esm2015/data-binding/base-binding-directive.js +16 -4
- package/esm2015/data-binding/local-binding.directive.js +3 -3
- package/esm2015/data-binding/olap-binding.directive.js +6 -4
- package/esm2015/localization/messages.js +3 -1
- package/esm2015/localization/pivot-localization.service.js +28 -0
- package/esm2015/models/configurator-settings.js +3 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pivotgrid.component.js +14 -5
- package/esm2015/pivotgrid.module.js +9 -12
- package/esm2015/shared.module.js +40 -0
- package/esm2015/util.js +13 -0
- package/fesm2015/kendo-angular-pivotgrid.js +1331 -75
- package/localization/messages.d.ts +23 -1
- package/localization/pivot-localization.service.d.ts +19 -0
- package/models/configurator-settings.d.ts +4 -1
- package/package.json +1 -1
- package/pivotgrid.module.d.ts +6 -7
- package/shared.module.d.ts +17 -0
- package/util.d.ts +12 -0
|
@@ -8,17 +8,19 @@ import { DropCueService } from './drop-cue.service';
|
|
|
8
8
|
import { from, of, Subscription } from 'rxjs';
|
|
9
9
|
import { mergeMap } from 'rxjs/operators';
|
|
10
10
|
import { clone } from '../util';
|
|
11
|
+
import { SinglePopupService } from './chip-menu/single-popup.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
import * as i1 from "../data-binding/pivotgrid-data.service";
|
|
13
14
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
14
15
|
import * as i3 from "./configurator.service";
|
|
15
16
|
import * as i4 from "@progress/kendo-angular-treeview";
|
|
16
17
|
import * as i5 from "@progress/kendo-angular-buttons";
|
|
17
|
-
import * as i6 from "
|
|
18
|
-
import * as i7 from "@
|
|
19
|
-
import * as i8 from "
|
|
20
|
-
import * as i9 from "./
|
|
21
|
-
import * as i10 from "
|
|
18
|
+
import * as i6 from "./chip-menu/chip-menu.component";
|
|
19
|
+
import * as i7 from "@angular/common";
|
|
20
|
+
import * as i8 from "@progress/kendo-angular-inputs";
|
|
21
|
+
import * as i9 from "./drop-target.directive";
|
|
22
|
+
import * as i10 from "./draggable.directive";
|
|
23
|
+
import * as i11 from "@progress/kendo-angular-common";
|
|
22
24
|
/**
|
|
23
25
|
* @hidden
|
|
24
26
|
* Represents the Kendo UI PivotGrid Configurator component for Angular.
|
|
@@ -31,6 +33,7 @@ export class PivotGridConfiguratorComponent {
|
|
|
31
33
|
this.cdr = cdr;
|
|
32
34
|
this.hostClass = true;
|
|
33
35
|
this.horizontal = false;
|
|
36
|
+
this.sort = new Array();
|
|
34
37
|
this.checked = [];
|
|
35
38
|
this.subs = new Subscription();
|
|
36
39
|
/**
|
|
@@ -194,9 +197,10 @@ export class PivotGridConfiguratorComponent {
|
|
|
194
197
|
;
|
|
195
198
|
}
|
|
196
199
|
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: i1.PivotGridDataService }, { token: i2.LocalizationService }, { token: i3.ConfiguratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
-
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { horizontal: "horizontal" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass" } }, providers: [
|
|
200
|
+
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { horizontal: "horizontal", sort: "sort", filter: "filter" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass" } }, providers: [
|
|
198
201
|
ConfiguratorService,
|
|
199
|
-
DropCueService
|
|
202
|
+
DropCueService,
|
|
203
|
+
SinglePopupService
|
|
200
204
|
], ngImport: i0, template: `
|
|
201
205
|
<div
|
|
202
206
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
@@ -265,6 +269,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
265
269
|
[removable]="true"
|
|
266
270
|
>
|
|
267
271
|
{{ getName(item.name) }}
|
|
272
|
+
|
|
273
|
+
<kendo-pivot-chip-menu
|
|
274
|
+
[chip]="item">
|
|
275
|
+
</kendo-pivot-chip-menu>
|
|
268
276
|
</kendo-chip>
|
|
269
277
|
</kendo-chiplist>
|
|
270
278
|
|
|
@@ -291,6 +299,10 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
291
299
|
[removable]="true"
|
|
292
300
|
>
|
|
293
301
|
{{ getName(item.name) }}
|
|
302
|
+
|
|
303
|
+
<kendo-pivot-chip-menu
|
|
304
|
+
[chip]="item">
|
|
305
|
+
</kendo-pivot-chip-menu>
|
|
294
306
|
</kendo-chip>
|
|
295
307
|
</kendo-chiplist>
|
|
296
308
|
|
|
@@ -313,18 +325,17 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
313
325
|
kendoDropTarget
|
|
314
326
|
axes="measureAxes"
|
|
315
327
|
>
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
</kendo-chip>
|
|
328
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
329
|
+
kendoChipDraggable
|
|
330
|
+
kendoDraggable
|
|
331
|
+
kendoDropTarget
|
|
332
|
+
[item]="item"
|
|
333
|
+
axes="measureAxes"
|
|
334
|
+
rounded="full"
|
|
335
|
+
[removable]="true"
|
|
336
|
+
>
|
|
337
|
+
{{ getName(item.name) }}
|
|
338
|
+
</kendo-chip>
|
|
328
339
|
</kendo-chiplist>
|
|
329
340
|
|
|
330
341
|
<ng-template #noMeasureAxes>
|
|
@@ -339,14 +350,15 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
339
350
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
340
351
|
</div>
|
|
341
352
|
</div>
|
|
342
|
-
`, isInline: true, components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }], directives: [{ type:
|
|
353
|
+
`, isInline: true, components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: i6.ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { type: i4.NodeTemplateDirective, selector: "[kendoTreeViewNodeTemplate]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { type: i11.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
343
354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
344
355
|
type: Component,
|
|
345
356
|
args: [{
|
|
346
357
|
selector: 'kendo-pivotgrid-configurator',
|
|
347
358
|
providers: [
|
|
348
359
|
ConfiguratorService,
|
|
349
|
-
DropCueService
|
|
360
|
+
DropCueService,
|
|
361
|
+
SinglePopupService
|
|
350
362
|
],
|
|
351
363
|
template: `
|
|
352
364
|
<div
|
|
@@ -416,6 +428,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
416
428
|
[removable]="true"
|
|
417
429
|
>
|
|
418
430
|
{{ getName(item.name) }}
|
|
431
|
+
|
|
432
|
+
<kendo-pivot-chip-menu
|
|
433
|
+
[chip]="item">
|
|
434
|
+
</kendo-pivot-chip-menu>
|
|
419
435
|
</kendo-chip>
|
|
420
436
|
</kendo-chiplist>
|
|
421
437
|
|
|
@@ -442,6 +458,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
442
458
|
[removable]="true"
|
|
443
459
|
>
|
|
444
460
|
{{ getName(item.name) }}
|
|
461
|
+
|
|
462
|
+
<kendo-pivot-chip-menu
|
|
463
|
+
[chip]="item">
|
|
464
|
+
</kendo-pivot-chip-menu>
|
|
445
465
|
</kendo-chip>
|
|
446
466
|
</kendo-chiplist>
|
|
447
467
|
|
|
@@ -464,18 +484,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
464
484
|
kendoDropTarget
|
|
465
485
|
axes="measureAxes"
|
|
466
486
|
>
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
</kendo-chip>
|
|
487
|
+
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
488
|
+
kendoChipDraggable
|
|
489
|
+
kendoDraggable
|
|
490
|
+
kendoDropTarget
|
|
491
|
+
[item]="item"
|
|
492
|
+
axes="measureAxes"
|
|
493
|
+
rounded="full"
|
|
494
|
+
[removable]="true"
|
|
495
|
+
>
|
|
496
|
+
{{ getName(item.name) }}
|
|
497
|
+
</kendo-chip>
|
|
479
498
|
</kendo-chiplist>
|
|
480
499
|
|
|
481
500
|
<ng-template #noMeasureAxes>
|
|
@@ -497,4 +516,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
497
516
|
args: ['class.k-pivotgrid-configurator']
|
|
498
517
|
}], horizontal: [{
|
|
499
518
|
type: Input
|
|
519
|
+
}], sort: [{
|
|
520
|
+
type: Input
|
|
521
|
+
}], filter: [{
|
|
522
|
+
type: Input
|
|
500
523
|
}] } });
|
|
@@ -14,8 +14,8 @@ export class ConfiguratorService {
|
|
|
14
14
|
}
|
|
15
15
|
parseConfiguratorState(action) {
|
|
16
16
|
const newState = configuratorReducer({
|
|
17
|
-
filter:
|
|
18
|
-
sort:
|
|
17
|
+
filter: this.state.filter,
|
|
18
|
+
sort: this.state.sort,
|
|
19
19
|
rowAxes: this.state.rowAxes,
|
|
20
20
|
columnAxes: this.state.columnAxes,
|
|
21
21
|
measureAxes: this.state.measureAxes,
|
|
@@ -31,6 +31,10 @@ export class PivotBaseBindingDirective {
|
|
|
31
31
|
* Represents the measure axes configuration of the PivotGrid.
|
|
32
32
|
*/
|
|
33
33
|
this.measureAxes = [];
|
|
34
|
+
/**
|
|
35
|
+
* Represents the initial sorted state of the PivotGrid.
|
|
36
|
+
*/
|
|
37
|
+
this.sort = [];
|
|
34
38
|
/**
|
|
35
39
|
* Fires each time a row or column header gets expanded or collapsed by the end user. The event is preventable.
|
|
36
40
|
* If you prevent the event, the PivotGrid will not be rerendered with the new state, resulting from the end user interaction.
|
|
@@ -52,7 +56,7 @@ export class PivotBaseBindingDirective {
|
|
|
52
56
|
* @hidden
|
|
53
57
|
*/
|
|
54
58
|
get state() {
|
|
55
|
-
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes);
|
|
59
|
+
return new PivotGridState(this.columnAxes, this.rowAxes, this.measureAxes, this.sort, this.filter);
|
|
56
60
|
}
|
|
57
61
|
ngOnInit() {
|
|
58
62
|
this.loadData(this.state);
|
|
@@ -78,7 +82,9 @@ export class PivotBaseBindingDirective {
|
|
|
78
82
|
this.dataService.configuredFields.next({
|
|
79
83
|
columnAxes: state.columnAxes,
|
|
80
84
|
rowAxes: state.rowAxes,
|
|
81
|
-
measureAxes: state.measureAxes
|
|
85
|
+
measureAxes: state.measureAxes,
|
|
86
|
+
sort: state.sort,
|
|
87
|
+
filter: state.filter
|
|
82
88
|
});
|
|
83
89
|
this.loadData(state);
|
|
84
90
|
});
|
|
@@ -106,7 +112,9 @@ export class PivotBaseBindingDirective {
|
|
|
106
112
|
this.dataService.configuredFields.next({
|
|
107
113
|
columnAxes: this.columnAxes,
|
|
108
114
|
rowAxes: this.rowAxes,
|
|
109
|
-
measureAxes: this.measureAxes
|
|
115
|
+
measureAxes: this.measureAxes,
|
|
116
|
+
sort: this.sort,
|
|
117
|
+
filter: this.filter
|
|
110
118
|
});
|
|
111
119
|
}
|
|
112
120
|
updateHeaders(axes, tree, path) {
|
|
@@ -133,7 +141,7 @@ export class PivotBaseBindingDirective {
|
|
|
133
141
|
;
|
|
134
142
|
}
|
|
135
143
|
PivotBaseBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, deps: [{ token: i1.PivotGridDataService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
136
|
-
PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotBaseBindingDirective, selector: "kendo-base-binding-directive", inputs: { columnAxes: "columnAxes", rowAxes: "rowAxes", measureAxes: "measureAxes" }, outputs: { expandChange: "expandChange", configurationChange: "configurationChange", dataLoaded: "dataLoaded" }, ngImport: i0 });
|
|
144
|
+
PivotBaseBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotBaseBindingDirective, selector: "kendo-base-binding-directive", inputs: { columnAxes: "columnAxes", rowAxes: "rowAxes", measureAxes: "measureAxes", sort: "sort", filter: "filter" }, outputs: { expandChange: "expandChange", configurationChange: "configurationChange", dataLoaded: "dataLoaded" }, ngImport: i0 });
|
|
137
145
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotBaseBindingDirective, decorators: [{
|
|
138
146
|
type: Directive,
|
|
139
147
|
args: [{
|
|
@@ -145,6 +153,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
145
153
|
type: Input
|
|
146
154
|
}], measureAxes: [{
|
|
147
155
|
type: Input
|
|
156
|
+
}], sort: [{
|
|
157
|
+
type: Input
|
|
158
|
+
}], filter: [{
|
|
159
|
+
type: Input
|
|
148
160
|
}], expandChange: [{
|
|
149
161
|
type: Output
|
|
150
162
|
}], configurationChange: [{
|
|
@@ -37,13 +37,13 @@ export class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
37
37
|
this.updateConfiguratorFields();
|
|
38
38
|
}
|
|
39
39
|
loadData(state) {
|
|
40
|
-
const { columnAxes, rowAxes, measureAxes } = state;
|
|
40
|
+
const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
|
|
41
41
|
const rootColumnAxes = this.getRootAxes(columnAxes);
|
|
42
42
|
const rootRowAxes = this.getRootAxes(rowAxes);
|
|
43
43
|
const columnSettings = rootColumnAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
44
44
|
const rowSettings = rootRowAxes.split(stringSeparator).map(this.createAxisSettings);
|
|
45
45
|
const measuresSettings = measureAxes.map(m => this.measures.find(meas => String(meas.name) === String(m.name))).filter(Boolean);
|
|
46
|
-
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields);
|
|
46
|
+
const dataTree = createDataTree(this.data, rowSettings, columnSettings, measuresSettings, bindingFields, filter);
|
|
47
47
|
this.dataState = createLocalDataState({
|
|
48
48
|
dataTree,
|
|
49
49
|
rowSettings,
|
|
@@ -51,7 +51,7 @@ export class PivotLocalBindingDirective extends PivotBaseBindingDirective {
|
|
|
51
51
|
rowAxes: rowAxes,
|
|
52
52
|
columnAxes: columnAxes,
|
|
53
53
|
measures: measuresSettings,
|
|
54
|
-
sort:
|
|
54
|
+
sort: sort,
|
|
55
55
|
fields: bindingFields
|
|
56
56
|
});
|
|
57
57
|
this.updateDataServiceFields();
|
|
@@ -24,16 +24,18 @@ export class PivotOLAPBindingDirective extends PivotBaseBindingDirective {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
loadData(state) {
|
|
27
|
-
const { columnAxes, rowAxes, measureAxes } = state;
|
|
27
|
+
const { columnAxes, rowAxes, measureAxes, sort, filter } = state;
|
|
28
28
|
this.dataService.loading.next(true);
|
|
29
29
|
const options = {
|
|
30
30
|
connection: {
|
|
31
31
|
catalog: this.catalog,
|
|
32
32
|
cube: this.cube
|
|
33
33
|
},
|
|
34
|
-
columnAxes
|
|
35
|
-
rowAxes
|
|
36
|
-
measureAxes
|
|
34
|
+
columnAxes,
|
|
35
|
+
rowAxes,
|
|
36
|
+
measureAxes,
|
|
37
|
+
sort,
|
|
38
|
+
filter
|
|
37
39
|
};
|
|
38
40
|
fetchData({ url: this.url }, JSON.parse(JSON.stringify(options)))
|
|
39
41
|
.then(createDataState)
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class PivotGridMessages extends ComponentMessages {
|
|
12
12
|
}
|
|
13
13
|
PivotGridMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
PivotGridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridMessages, inputs: { fieldMenuFilterItemLabel: "fieldMenuFilterItemLabel", fieldMenuSortAscendingItemLabel: "fieldMenuSortAscendingItemLabel", fieldMenuSortDescendingItemLabel: "fieldMenuSortDescendingItemLabel", filterInputLabel: "filterInputLabel", filterOperatorsDropDownLabel: "filterOperatorsDropDownLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", loading: "loading", emptyCellLabel: "emptyCellLabel", configuratorButtonText: "configuratorButtonText", configuratorHeaderText: "configuratorHeaderText", configuratorFieldsText: "configuratorFieldsText", configuratorColumnsText: "configuratorColumnsText", configuratorRowsText: "configuratorRowsText", configuratorValuesText: "configuratorValuesText", configuratorCancelButtonText: "configuratorCancelButtonText", configuratorApplyButtonText: "configuratorApplyButtonText", configuratorEmptyRowsText: "configuratorEmptyRowsText", configuratorEmptyColumnsText: "configuratorEmptyColumnsText", configuratorEmptyMeasuresText: "configuratorEmptyMeasuresText" }, usesInheritance: true, ngImport: i0 });
|
|
14
|
+
PivotGridMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridMessages, inputs: { fieldMenuFilterItemLabel: "fieldMenuFilterItemLabel", fieldMenuSortAscendingItemLabel: "fieldMenuSortAscendingItemLabel", fieldMenuSortDescendingItemLabel: "fieldMenuSortDescendingItemLabel", filterInputLabel: "filterInputLabel", filterOperatorsDropDownLabel: "filterOperatorsDropDownLabel", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", loading: "loading", emptyCellLabel: "emptyCellLabel", configuratorButtonText: "configuratorButtonText", configuratorHeaderText: "configuratorHeaderText", configuratorFieldsText: "configuratorFieldsText", configuratorColumnsText: "configuratorColumnsText", configuratorRowsText: "configuratorRowsText", configuratorValuesText: "configuratorValuesText", configuratorCancelButtonText: "configuratorCancelButtonText", configuratorApplyButtonText: "configuratorApplyButtonText", configuratorEmptyRowsText: "configuratorEmptyRowsText", configuratorEmptyColumnsText: "configuratorEmptyColumnsText", configuratorEmptyMeasuresText: "configuratorEmptyMeasuresText", chipMenuIconTitle: "chipMenuIconTitle" }, usesInheritance: true, ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridMessages, decorators: [{
|
|
16
16
|
type: Directive
|
|
17
17
|
}], propDecorators: { fieldMenuFilterItemLabel: [{
|
|
@@ -74,4 +74,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
74
74
|
type: Input
|
|
75
75
|
}], configuratorEmptyMeasuresText: [{
|
|
76
76
|
type: Input
|
|
77
|
+
}], chipMenuIconTitle: [{
|
|
78
|
+
type: Input
|
|
77
79
|
}] } });
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*
|
|
11
|
+
* Needed to keep the Pivot's LocalizationService reference and be able to use it inside the ChipList component.
|
|
12
|
+
*/
|
|
13
|
+
export class PivotLocalizationService {
|
|
14
|
+
constructor(localization) {
|
|
15
|
+
this.localization = localization;
|
|
16
|
+
}
|
|
17
|
+
get(token) {
|
|
18
|
+
return this.localization.get(token);
|
|
19
|
+
}
|
|
20
|
+
get rtl() {
|
|
21
|
+
return this.localization.rtl;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
PivotLocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalizationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
PivotLocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalizationService });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotLocalizationService, decorators: [{
|
|
27
|
+
type: Injectable
|
|
28
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
8
8
|
export class PivotGridState {
|
|
9
|
-
constructor(columnAxes, rowAxes, measureAxes) {
|
|
9
|
+
constructor(columnAxes, rowAxes, measureAxes, sort, filter) {
|
|
10
10
|
this.columnAxes = columnAxes;
|
|
11
11
|
this.rowAxes = rowAxes;
|
|
12
12
|
this.measureAxes = measureAxes;
|
|
13
|
+
this.sort = sort;
|
|
14
|
+
this.filter = filter;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-pivotgrid',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1662107494,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -13,6 +13,7 @@ import { syncScroll, syncWheel } from './util';
|
|
|
13
13
|
import { merge } from 'rxjs/operators';
|
|
14
14
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
15
15
|
import { PivotGridNavigation } from '@progress/kendo-pivotgrid-common';
|
|
16
|
+
import { PivotLocalizationService } from './localization/pivot-localization.service';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
import * as i1 from "./data-binding/pivotgrid-data.service";
|
|
18
19
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
@@ -198,6 +199,7 @@ PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versi
|
|
|
198
199
|
PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", configurator: "configurator", columnHeadersWidth: "columnHeadersWidth", navigable: "navigable" }, host: { properties: { "class.k-d-flex": "this.hostClass", "class.k-pos-relative": "this.hostClass", "class.k-flex-row": "this.rightPositionClass", "class.k-flex-row-reverse": "this.leftPositionClass", "class.k-flex-column": "this.bottomPositionClass", "class.k-flex-column-reverse": "this.topPositionClass", "attr.dir": "this.dir", "attr.role": "this.ariaRole" } }, providers: [
|
|
199
200
|
PivotGridDataService,
|
|
200
201
|
LocalizationService,
|
|
202
|
+
PivotLocalizationService,
|
|
201
203
|
{
|
|
202
204
|
provide: L10N_PREFIX,
|
|
203
205
|
useValue: 'kendo.pivotgrid'
|
|
@@ -292,7 +294,10 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
292
294
|
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
293
295
|
|
|
294
296
|
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
295
|
-
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
297
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
298
|
+
|
|
299
|
+
i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
|
|
300
|
+
chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
|
|
296
301
|
|
|
297
302
|
<div #table class="k-pivotgrid">
|
|
298
303
|
<span class="k-pivotgrid-empty-cell">
|
|
@@ -332,10 +337,10 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
332
337
|
<div *ngIf="configurator"
|
|
333
338
|
class="k-pivotgrid-configurator-button"
|
|
334
339
|
(click)="showConfigurator = !showConfigurator">
|
|
335
|
-
<span>{{
|
|
340
|
+
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
336
341
|
</span>
|
|
337
342
|
</div>
|
|
338
|
-
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: i4.PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: i6.PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["horizontal"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
343
|
+
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: i4.PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: i6.PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["horizontal", "sort", "filter"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
339
344
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
340
345
|
type: Component,
|
|
341
346
|
args: [{
|
|
@@ -343,6 +348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
343
348
|
providers: [
|
|
344
349
|
PivotGridDataService,
|
|
345
350
|
LocalizationService,
|
|
351
|
+
PivotLocalizationService,
|
|
346
352
|
{
|
|
347
353
|
provide: L10N_PREFIX,
|
|
348
354
|
useValue: 'kendo.pivotgrid'
|
|
@@ -438,7 +444,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
438
444
|
configuratorEmptyColumnsText="Select some fields to begin setup"
|
|
439
445
|
|
|
440
446
|
i18n-configuratorEmptyMeasuresText="kendo.pivotgrid.configuratorEmptyMeasuresText|The text content of the PivotGrid configurator empty measures container"
|
|
441
|
-
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
447
|
+
configuratorEmptyMeasuresText="Select some fields to begin setup"
|
|
448
|
+
|
|
449
|
+
i18n-chipMenuIconTitle="kendo.grid.chipMenuIconTitle|The title of the field menu icon"
|
|
450
|
+
chipMenuIconTitle="{{ '{fieldName} Field Menu' }}"></ng-container>
|
|
442
451
|
|
|
443
452
|
<div #table class="k-pivotgrid">
|
|
444
453
|
<span class="k-pivotgrid-empty-cell">
|
|
@@ -478,7 +487,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
478
487
|
<div *ngIf="configurator"
|
|
479
488
|
class="k-pivotgrid-configurator-button"
|
|
480
489
|
(click)="showConfigurator = !showConfigurator">
|
|
481
|
-
<span>{{
|
|
490
|
+
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
482
491
|
</span>
|
|
483
492
|
</div>
|
|
484
493
|
`,
|
|
@@ -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
|
-
|
|
30
|
-
|
|
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: [
|
|
68
|
-
EventsModule,
|
|
65
|
+
CustomMessagesComponent], imports: [EventsModule,
|
|
69
66
|
IndicatorsModule,
|
|
70
|
-
ButtonsModule,
|
|
71
67
|
TreeViewModule,
|
|
72
|
-
|
|
73
|
-
|
|
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.
|
|
@@ -150,3 +159,7 @@ export const position = (target, before) => {
|
|
|
150
159
|
* @hidden
|
|
151
160
|
*/
|
|
152
161
|
export const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);
|
|
162
|
+
/**
|
|
163
|
+
* @hidden
|
|
164
|
+
*/
|
|
165
|
+
export const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|