@datorama/core 22.2.4 → 22.5.1
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/bundle.scss +22 -0
- package/bundles/datorama-core.umd.js +35 -23
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +23 -23
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/date-picker/date-picker-container/date-picker-container.component.js +5 -5
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +7 -3
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +10 -8
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +2 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -1
- package/esm2015/lib/select/select.component.js +12 -7
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/date-picker/date-picker-container/date-picker-container.component.js +5 -5
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +7 -3
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-store/grid.query.js +10 -8
- package/esm5/lib/grid-v2/grid-store/grid.service.js +4 -4
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -1
- package/esm5/lib/select/select.component.js +13 -7
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +32 -21
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +35 -23
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/date-picker/date-picker-container/date-picker-container.component.d.ts +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +4 -2
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +2 -2
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +0 -1
- package/lib/grid-v2/grid-store/grid.query.d.ts +1 -1
- package/lib/select/select.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7592,8 +7592,8 @@ let DatoSelectComponent = class DatoSelectComponent extends BaseCustomControl {
|
|
|
7592
7592
|
}
|
|
7593
7593
|
}
|
|
7594
7594
|
this.onChange(this._model);
|
|
7595
|
-
this.datoOverlay.scheduleUpdate();
|
|
7596
7595
|
this.cdr.markForCheck();
|
|
7596
|
+
this.asyncUpdateDropdownPosition();
|
|
7597
7597
|
}
|
|
7598
7598
|
reorderOptions(newOrder) {
|
|
7599
7599
|
this._model = newOrder;
|
|
@@ -7613,9 +7613,7 @@ let DatoSelectComponent = class DatoSelectComponent extends BaseCustomControl {
|
|
|
7613
7613
|
updateDisabled && this.updateDisabledState();
|
|
7614
7614
|
this.onChange(this._model);
|
|
7615
7615
|
this.cdr.markForCheck();
|
|
7616
|
-
|
|
7617
|
-
this.datoOverlay.scheduleUpdate();
|
|
7618
|
-
}
|
|
7616
|
+
this.asyncUpdateDropdownPosition();
|
|
7619
7617
|
}
|
|
7620
7618
|
preventBodyScroll(event) {
|
|
7621
7619
|
if (isArrowUpDown(event)) {
|
|
@@ -7812,7 +7810,7 @@ let DatoSelectComponent = class DatoSelectComponent extends BaseCustomControl {
|
|
|
7812
7810
|
this.searchTerm = value;
|
|
7813
7811
|
this.keyManager.setActiveItem(-1);
|
|
7814
7812
|
this.cdr.markForCheck();
|
|
7815
|
-
this.
|
|
7813
|
+
this.asyncUpdateDropdownPosition();
|
|
7816
7814
|
});
|
|
7817
7815
|
}
|
|
7818
7816
|
/**
|
|
@@ -7900,7 +7898,7 @@ let DatoSelectComponent = class DatoSelectComponent extends BaseCustomControl {
|
|
|
7900
7898
|
updateDisabled && this.updateDisabledState();
|
|
7901
7899
|
this.onChange(this._model);
|
|
7902
7900
|
this.cdr.markForCheck();
|
|
7903
|
-
this.
|
|
7901
|
+
this.asyncUpdateDropdownPosition();
|
|
7904
7902
|
}
|
|
7905
7903
|
activateInfiniteScroll() {
|
|
7906
7904
|
this.infiniteSubscription = fromEvent(document.querySelector('.dato-select__dropdown'), 'scroll')
|
|
@@ -7941,6 +7939,13 @@ let DatoSelectComponent = class DatoSelectComponent extends BaseCustomControl {
|
|
|
7941
7939
|
}
|
|
7942
7940
|
}
|
|
7943
7941
|
}
|
|
7942
|
+
// Make sure the overlay will be update AFTER Change Detection was done
|
|
7943
|
+
// So the items in the input (and its height) is update
|
|
7944
|
+
asyncUpdateDropdownPosition() {
|
|
7945
|
+
if (this.datoOverlay && this.datoOverlay.attached) {
|
|
7946
|
+
setTimeout(() => this.datoOverlay.scheduleUpdate(), 0);
|
|
7947
|
+
}
|
|
7948
|
+
}
|
|
7944
7949
|
};
|
|
7945
7950
|
DatoSelectComponent.ctorParameters = () => [
|
|
7946
7951
|
{ type: ChangeDetectorRef },
|
|
@@ -10139,16 +10144,18 @@ let GridQuery = class GridQuery extends Query {
|
|
|
10139
10144
|
selectFilter() {
|
|
10140
10145
|
return this.select(state => state.settings.filter);
|
|
10141
10146
|
}
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10147
|
+
getExternalFilter() {
|
|
10148
|
+
const gridFilters = this.getFilter();
|
|
10149
|
+
if (gridFilters) {
|
|
10150
|
+
return Object.keys(gridFilters).reduce((filters, field) => {
|
|
10151
|
+
const filter = gridFilters[field];
|
|
10152
|
+
if (filter) {
|
|
10153
|
+
filters.push({ field, filter });
|
|
10148
10154
|
}
|
|
10149
10155
|
return filters;
|
|
10150
10156
|
}, []);
|
|
10151
|
-
}
|
|
10157
|
+
}
|
|
10158
|
+
return [];
|
|
10152
10159
|
}
|
|
10153
10160
|
getSearchTerm() {
|
|
10154
10161
|
return this.getValue().settings.searchTerm;
|
|
@@ -12683,7 +12690,7 @@ let GridService = class GridService {
|
|
|
12683
12690
|
if (this.api && filters) {
|
|
12684
12691
|
let appliedFilter = {};
|
|
12685
12692
|
for (const { filter, field } of filters) {
|
|
12686
|
-
appliedFilter
|
|
12693
|
+
appliedFilter[field] = filter;
|
|
12687
12694
|
}
|
|
12688
12695
|
this.updateSettings({ filter: appliedFilter });
|
|
12689
12696
|
this.api.grid.onFilterChanged();
|
|
@@ -13773,8 +13780,12 @@ let DatoGridControllerComponent = class DatoGridControllerComponent {
|
|
|
13773
13780
|
const settingsDiff = this.gridService.getSettingsDiff();
|
|
13774
13781
|
this.gridService.updateSettings(settingsDiff);
|
|
13775
13782
|
const data = this.getGridData();
|
|
13776
|
-
this.onGridChange.emit(
|
|
13777
|
-
|
|
13783
|
+
this.onGridChange.emit({
|
|
13784
|
+
filter: this.gridQuery.getExternalFilter(),
|
|
13785
|
+
sort: this.gridQuery.getSort(),
|
|
13786
|
+
type,
|
|
13787
|
+
data
|
|
13788
|
+
});
|
|
13778
13789
|
});
|
|
13779
13790
|
}
|
|
13780
13791
|
listenToStoreSettingsChanges() {
|
|
@@ -16302,9 +16313,11 @@ let DatoDatePickerContainerComponent = class DatoDatePickerContainerComponent ex
|
|
|
16302
16313
|
.subscribe(event => {
|
|
16303
16314
|
this.toggle.emit(event);
|
|
16304
16315
|
this.open = false;
|
|
16316
|
+
this.cdr.detectChanges();
|
|
16305
16317
|
this.input && this.setInputValue();
|
|
16306
16318
|
});
|
|
16307
16319
|
this.open = true;
|
|
16320
|
+
this.cdr.detectChanges();
|
|
16308
16321
|
this.input && this.handleEnter();
|
|
16309
16322
|
}
|
|
16310
16323
|
}
|
|
@@ -16357,9 +16370,7 @@ let DatoDatePickerContainerComponent = class DatoDatePickerContainerComponent ex
|
|
|
16357
16370
|
this.initialInputValue = currentValue;
|
|
16358
16371
|
}
|
|
16359
16372
|
handleEnter() {
|
|
16360
|
-
this.input.keydown$
|
|
16361
|
-
.pipe(filter$1(isEnter), takeUntil(this.toggle))
|
|
16362
|
-
.subscribe(() => {
|
|
16373
|
+
this.input.keydown$.pipe(filter$1(isEnter), takeUntil(this.toggle)).subscribe(() => {
|
|
16363
16374
|
this.setInputValue();
|
|
16364
16375
|
this.popover.closeById(DATE_PICKER_POPOVER_ID);
|
|
16365
16376
|
this.input.blur();
|
|
@@ -16425,7 +16436,7 @@ __decorate([
|
|
|
16425
16436
|
DatoDatePickerContainerComponent = __decorate([
|
|
16426
16437
|
Component({
|
|
16427
16438
|
selector: 'dato-date-picker',
|
|
16428
|
-
template: "<div class=\"d-flex {{ triggerStyle }} items-center dato-date-picker-trigger\" (click)=\"openDatepicker(origin)\" #origin\n [class.pointer]=\"!viewMode\">\n <ng-template #defaultView>\n <dato-icon datoIcon=\"calendarcore\" width=\"16px\" class=\"primary-400-color\"></dato-icon>\n <div class=\"ellipsis\"\n [datoTooltip]=\"dateLabel + ' ' + dateRange\"\n [datoTooltipPosition]=\"labelTooltipPosition\"\n [datoTooltipOnTextOverflow]=\"true\">\n <span class=\"dato-note date-label\" *ngIf=\"dateLabel\">{{dateLabel | translate}} </span>\n <span class=\"dato-note date-range\">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"triggerTpl ? triggerTpl : defaultView\"\n [ngTemplateOutletContext]=\"{label: dateLabel, range: dateRange, icon: 'calendar'}\"></ng-template>\n </div>\n",
|
|
16439
|
+
template: "<div class=\"d-flex {{ triggerStyle }} items-center dato-date-picker-trigger\" [class.open]=\"open\" (click)=\"openDatepicker(origin)\" #origin\n [class.pointer]=\"!viewMode\">\n <ng-template #defaultView>\n <dato-icon datoIcon=\"calendarcore\" width=\"16px\" class=\"primary-400-color\"></dato-icon>\n <div class=\"ellipsis\"\n [datoTooltip]=\"dateLabel + ' ' + dateRange\"\n [datoTooltipPosition]=\"labelTooltipPosition\"\n [datoTooltipOnTextOverflow]=\"true\">\n <span class=\"dato-note date-label\" *ngIf=\"dateLabel\">{{dateLabel | translate}} </span>\n <span class=\"dato-note date-range\">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"triggerTpl ? triggerTpl : defaultView\"\n [ngTemplateOutletContext]=\"{label: dateLabel, range: dateRange, icon: 'calendar'}\"></ng-template>\n </div>\n",
|
|
16429
16440
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
16430
16441
|
}),
|
|
16431
16442
|
__param(0, Self()), __param(0, Optional()),
|
|
@@ -22644,7 +22655,7 @@ function fixNgLeaks() {
|
|
|
22644
22655
|
};
|
|
22645
22656
|
}
|
|
22646
22657
|
|
|
22647
|
-
window.coreVersion = '22.
|
|
22658
|
+
window.coreVersion = '22.5.1';
|
|
22648
22659
|
|
|
22649
22660
|
/**
|
|
22650
22661
|
* @license
|