@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
package/bundle.scss
CHANGED
|
@@ -11199,8 +11199,30 @@ dato-date-picker .icon-text-border {
|
|
|
11199
11199
|
border-radius: 2px;
|
|
11200
11200
|
}
|
|
11201
11201
|
|
|
11202
|
+
.dato-date-picker-trigger {
|
|
11203
|
+
font-weight: 600;
|
|
11204
|
+
color: themify(primary-300);
|
|
11205
|
+
}
|
|
11206
|
+
|
|
11202
11207
|
.dato-date-picker-trigger dato-icon {
|
|
11203
11208
|
margin-right: 7px;
|
|
11209
|
+
color: themify(primary-300);
|
|
11210
|
+
}
|
|
11211
|
+
|
|
11212
|
+
.dato-date-picker-trigger:hover {
|
|
11213
|
+
color: themify(primary-400);
|
|
11214
|
+
}
|
|
11215
|
+
|
|
11216
|
+
.dato-date-picker-trigger:hover dato-icon {
|
|
11217
|
+
color: themify(primary-400);
|
|
11218
|
+
}
|
|
11219
|
+
|
|
11220
|
+
.dato-date-picker-trigger.open {
|
|
11221
|
+
color: themify(accent-400);
|
|
11222
|
+
}
|
|
11223
|
+
|
|
11224
|
+
.dato-date-picker-trigger.open dato-icon {
|
|
11225
|
+
color: themify(accent-400);
|
|
11204
11226
|
}
|
|
11205
11227
|
|
|
11206
11228
|
.date-picker-months-0 [datoicon="up"] {
|
|
@@ -8748,8 +8748,8 @@
|
|
|
8748
8748
|
}
|
|
8749
8749
|
}
|
|
8750
8750
|
this.onChange(this._model);
|
|
8751
|
-
this.datoOverlay.scheduleUpdate();
|
|
8752
8751
|
this.cdr.markForCheck();
|
|
8752
|
+
this.asyncUpdateDropdownPosition();
|
|
8753
8753
|
};
|
|
8754
8754
|
DatoSelectComponent.prototype.reorderOptions = function (newOrder) {
|
|
8755
8755
|
this._model = newOrder;
|
|
@@ -8770,9 +8770,7 @@
|
|
|
8770
8770
|
updateDisabled && this.updateDisabledState();
|
|
8771
8771
|
this.onChange(this._model);
|
|
8772
8772
|
this.cdr.markForCheck();
|
|
8773
|
-
|
|
8774
|
-
this.datoOverlay.scheduleUpdate();
|
|
8775
|
-
}
|
|
8773
|
+
this.asyncUpdateDropdownPosition();
|
|
8776
8774
|
};
|
|
8777
8775
|
DatoSelectComponent.prototype.preventBodyScroll = function (event) {
|
|
8778
8776
|
if (isArrowUpDown(event)) {
|
|
@@ -9027,7 +9025,7 @@
|
|
|
9027
9025
|
_this.searchTerm = value;
|
|
9028
9026
|
_this.keyManager.setActiveItem(-1);
|
|
9029
9027
|
_this.cdr.markForCheck();
|
|
9030
|
-
_this.
|
|
9028
|
+
_this.asyncUpdateDropdownPosition();
|
|
9031
9029
|
});
|
|
9032
9030
|
};
|
|
9033
9031
|
/**
|
|
@@ -9131,7 +9129,7 @@
|
|
|
9131
9129
|
updateDisabled && this.updateDisabledState();
|
|
9132
9130
|
this.onChange(this._model);
|
|
9133
9131
|
this.cdr.markForCheck();
|
|
9134
|
-
this.
|
|
9132
|
+
this.asyncUpdateDropdownPosition();
|
|
9135
9133
|
};
|
|
9136
9134
|
DatoSelectComponent.prototype.activateInfiniteScroll = function () {
|
|
9137
9135
|
var _this = this;
|
|
@@ -9184,6 +9182,14 @@
|
|
|
9184
9182
|
finally { if (e_9) throw e_9.error; }
|
|
9185
9183
|
}
|
|
9186
9184
|
};
|
|
9185
|
+
// Make sure the overlay will be update AFTER Change Detection was done
|
|
9186
|
+
// So the items in the input (and its height) is update
|
|
9187
|
+
DatoSelectComponent.prototype.asyncUpdateDropdownPosition = function () {
|
|
9188
|
+
var _this = this;
|
|
9189
|
+
if (this.datoOverlay && this.datoOverlay.attached) {
|
|
9190
|
+
setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
|
|
9191
|
+
}
|
|
9192
|
+
};
|
|
9187
9193
|
DatoSelectComponent.ctorParameters = function () { return [
|
|
9188
9194
|
{ type: core.ChangeDetectorRef },
|
|
9189
9195
|
{ type: DatoTranslateService },
|
|
@@ -11623,16 +11629,18 @@
|
|
|
11623
11629
|
GridQuery.prototype.selectFilter = function () {
|
|
11624
11630
|
return this.select(function (state) { return state.settings.filter; });
|
|
11625
11631
|
};
|
|
11626
|
-
GridQuery.prototype.
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
+
GridQuery.prototype.getExternalFilter = function () {
|
|
11633
|
+
var gridFilters = this.getFilter();
|
|
11634
|
+
if (gridFilters) {
|
|
11635
|
+
return Object.keys(gridFilters).reduce(function (filters, field) {
|
|
11636
|
+
var filter = gridFilters[field];
|
|
11637
|
+
if (filter) {
|
|
11638
|
+
filters.push({ field: field, filter: filter });
|
|
11632
11639
|
}
|
|
11633
11640
|
return filters;
|
|
11634
11641
|
}, []);
|
|
11635
|
-
}
|
|
11642
|
+
}
|
|
11643
|
+
return [];
|
|
11636
11644
|
};
|
|
11637
11645
|
GridQuery.prototype.getSearchTerm = function () {
|
|
11638
11646
|
return this.getValue().settings.searchTerm;
|
|
@@ -14404,13 +14412,13 @@
|
|
|
14404
14412
|
}
|
|
14405
14413
|
};
|
|
14406
14414
|
GridService.prototype.setGridFilters = function (filters) {
|
|
14407
|
-
var e_2, _a
|
|
14415
|
+
var e_2, _a;
|
|
14408
14416
|
if (this.api && filters) {
|
|
14409
14417
|
var appliedFilter = {};
|
|
14410
14418
|
try {
|
|
14411
14419
|
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14412
|
-
var
|
|
14413
|
-
appliedFilter
|
|
14420
|
+
var _b = filters_1_1.value, filter = _b.filter, field = _b.field;
|
|
14421
|
+
appliedFilter[field] = filter;
|
|
14414
14422
|
}
|
|
14415
14423
|
}
|
|
14416
14424
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -15616,8 +15624,12 @@
|
|
|
15616
15624
|
var settingsDiff = _this.gridService.getSettingsDiff();
|
|
15617
15625
|
_this.gridService.updateSettings(settingsDiff);
|
|
15618
15626
|
var data = _this.getGridData();
|
|
15619
|
-
_this.onGridChange.emit(
|
|
15620
|
-
|
|
15627
|
+
_this.onGridChange.emit({
|
|
15628
|
+
filter: _this.gridQuery.getExternalFilter(),
|
|
15629
|
+
sort: _this.gridQuery.getSort(),
|
|
15630
|
+
type: type,
|
|
15631
|
+
data: data
|
|
15632
|
+
});
|
|
15621
15633
|
});
|
|
15622
15634
|
};
|
|
15623
15635
|
DatoGridControllerComponent.prototype.listenToStoreSettingsChanges = function () {
|
|
@@ -18464,9 +18476,11 @@
|
|
|
18464
18476
|
.subscribe(function (event) {
|
|
18465
18477
|
_this.toggle.emit(event);
|
|
18466
18478
|
_this.open = false;
|
|
18479
|
+
_this.cdr.detectChanges();
|
|
18467
18480
|
_this.input && _this.setInputValue();
|
|
18468
18481
|
});
|
|
18469
18482
|
this.open = true;
|
|
18483
|
+
this.cdr.detectChanges();
|
|
18470
18484
|
this.input && this.handleEnter();
|
|
18471
18485
|
}
|
|
18472
18486
|
};
|
|
@@ -18520,9 +18534,7 @@
|
|
|
18520
18534
|
};
|
|
18521
18535
|
DatoDatePickerContainerComponent.prototype.handleEnter = function () {
|
|
18522
18536
|
var _this = this;
|
|
18523
|
-
this.input.keydown
|
|
18524
|
-
.pipe(operators.filter(isEnter), operators.takeUntil(this.toggle))
|
|
18525
|
-
.subscribe(function () {
|
|
18537
|
+
this.input.keydown$.pipe(operators.filter(isEnter), operators.takeUntil(this.toggle)).subscribe(function () {
|
|
18526
18538
|
_this.setInputValue();
|
|
18527
18539
|
_this.popover.closeById(DATE_PICKER_POPOVER_ID);
|
|
18528
18540
|
_this.input.blur();
|
|
@@ -18587,7 +18599,7 @@
|
|
|
18587
18599
|
DatoDatePickerContainerComponent = __decorate([
|
|
18588
18600
|
core.Component({
|
|
18589
18601
|
selector: 'dato-date-picker',
|
|
18590
|
-
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",
|
|
18602
|
+
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",
|
|
18591
18603
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
18592
18604
|
}),
|
|
18593
18605
|
__param(0, core.Self()), __param(0, core.Optional()),
|
|
@@ -25380,7 +25392,7 @@
|
|
|
25380
25392
|
};
|
|
25381
25393
|
}
|
|
25382
25394
|
|
|
25383
|
-
window.coreVersion = '22.
|
|
25395
|
+
window.coreVersion = '22.5.1';
|
|
25384
25396
|
|
|
25385
25397
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25386
25398
|
exports.AceService = AceService;
|