@datorama/core 22.0.4 → 22.0.6-rc.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 +13 -13
- package/bundles/datorama-core.umd.js +234 -159
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +24 -24
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +1 -0
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +2 -1
- package/esm2015/lib/accordion/accordion/accordion.component.js +11 -3
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +11 -3
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +3 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +12 -4
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +3 -1
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +10 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +15 -33
- package/esm2015/lib/rich-text/rich-text.service.js +50 -0
- package/esm2015/lib/select/select.component.js +16 -16
- package/esm2015/lib/sortable/sortable.component.js +7 -2
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +2 -1
- package/esm5/lib/accordion/accordion/accordion.component.js +15 -3
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +11 -3
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +3 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +12 -4
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +3 -1
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +10 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/rich-text/rich-text.directive.js +16 -34
- package/esm5/lib/rich-text/rich-text.service.js +51 -0
- package/esm5/lib/select/select.component.js +17 -16
- package/esm5/lib/sortable/sortable.component.js +7 -2
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +215 -153
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +234 -160
- package/fesm5/datorama-core.js.map +1 -1
- package/i18n/locale-en_US.json +2 -0
- package/lib/accordion/accordion/accordion.component.d.ts +4 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -0
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +3 -1
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +2 -0
- package/lib/icon/icon.types.d.ts +1 -1
- package/lib/rich-text/rich-text.directive.d.ts +4 -6
- package/lib/rich-text/rich-text.service.d.ts +10 -0
- package/lib/select/select.component.d.ts +1 -0
- package/lib/sortable/sortable.component.d.ts +3 -1
- package/package.json +2 -2
package/bundle.scss
CHANGED
|
@@ -14300,6 +14300,19 @@ dato-grid-v2 .ag-cell {
|
|
|
14300
14300
|
border-right: solid 1px themify(primary-300, 0.5);
|
|
14301
14301
|
}
|
|
14302
14302
|
|
|
14303
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom {
|
|
14304
|
+
border: none !important;
|
|
14305
|
+
}
|
|
14306
|
+
|
|
14307
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom .ag-row {
|
|
14308
|
+
background-color: themify(primary-0) !important;
|
|
14309
|
+
border: 1px solid themify(primary-200);
|
|
14310
|
+
}
|
|
14311
|
+
|
|
14312
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom .ag-row .ag-cell {
|
|
14313
|
+
border-right: none;
|
|
14314
|
+
}
|
|
14315
|
+
|
|
14303
14316
|
dato-grid-v2 ag-grid-angular.enable-v2_1 {
|
|
14304
14317
|
padding-top: 8px;
|
|
14305
14318
|
}
|
|
@@ -14341,19 +14354,6 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group:not(.ag-row-level-0
|
|
|
14341
14354
|
font-weight: 400;
|
|
14342
14355
|
}
|
|
14343
14356
|
|
|
14344
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom {
|
|
14345
|
-
border: none;
|
|
14346
|
-
}
|
|
14347
|
-
|
|
14348
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row {
|
|
14349
|
-
background-color: themify(primary-0);
|
|
14350
|
-
border: 1px solid themify(primary-200);
|
|
14351
|
-
}
|
|
14352
|
-
|
|
14353
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row .ag-cell {
|
|
14354
|
-
border-right: none;
|
|
14355
|
-
}
|
|
14356
|
-
|
|
14357
14357
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-ltr .ag-row-group-leaf-indent {
|
|
14358
14358
|
margin-left: 0;
|
|
14359
14359
|
}
|
|
@@ -7609,6 +7609,114 @@
|
|
|
7609
7609
|
return false;
|
|
7610
7610
|
};
|
|
7611
7611
|
|
|
7612
|
+
/**
|
|
7613
|
+
* @license
|
|
7614
|
+
* Copyright Datorama. All Rights Reserved.
|
|
7615
|
+
*
|
|
7616
|
+
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
7617
|
+
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
7618
|
+
*/
|
|
7619
|
+
var DatoSortableComponent = /** @class */ (function () {
|
|
7620
|
+
function DatoSortableComponent() {
|
|
7621
|
+
this.list = [];
|
|
7622
|
+
this.noop = noop;
|
|
7623
|
+
/**
|
|
7624
|
+
* Sortablejs options
|
|
7625
|
+
*/
|
|
7626
|
+
this.datoOptions = {};
|
|
7627
|
+
/**
|
|
7628
|
+
* Fired once items order has changed
|
|
7629
|
+
*/
|
|
7630
|
+
this.orderUpdated = new core.EventEmitter();
|
|
7631
|
+
this.defaultOptions = {
|
|
7632
|
+
handle: '.dato-sortable-handler',
|
|
7633
|
+
ghostClass: 'dato-sortable-ghost',
|
|
7634
|
+
chosenClass: 'dato-sortable-chosen',
|
|
7635
|
+
dragClass: 'dato-sortable-drag'
|
|
7636
|
+
};
|
|
7637
|
+
}
|
|
7638
|
+
Object.defineProperty(DatoSortableComponent.prototype, "datoList", {
|
|
7639
|
+
set: function (list) {
|
|
7640
|
+
var isArr = Array.isArray(list);
|
|
7641
|
+
var validInput = isArr || (list instanceof forms.FormControl && Array.isArray(list.value));
|
|
7642
|
+
if (!validInput) {
|
|
7643
|
+
throw new Error("DatoSortable - datoList expected array or form control but got " + typeof list);
|
|
7644
|
+
}
|
|
7645
|
+
if (!isArr) {
|
|
7646
|
+
this.formControl = list;
|
|
7647
|
+
this.list = __spread(this.formControl.value);
|
|
7648
|
+
}
|
|
7649
|
+
else {
|
|
7650
|
+
this.list = list;
|
|
7651
|
+
}
|
|
7652
|
+
},
|
|
7653
|
+
enumerable: true,
|
|
7654
|
+
configurable: true
|
|
7655
|
+
});
|
|
7656
|
+
DatoSortableComponent.prototype.ngOnInit = function () {
|
|
7657
|
+
var _this = this;
|
|
7658
|
+
var _a = this.datoOptions, dynamicGhostHeight = _a.dynamicGhostHeight, hasStaticItems = _a.hasStaticItems, sortableOptions = __rest(_a, ["dynamicGhostHeight", "hasStaticItems"]);
|
|
7659
|
+
var mergedOptions = __assign(__assign(__assign({}, this.defaultOptions), sortableOptions), { onUpdate: function (event) { return (sortableOptions.onUpdate ? sortableOptions.onUpdate(event) : _this.emitUpdate(event)); } });
|
|
7660
|
+
if (dynamicGhostHeight) {
|
|
7661
|
+
mergedOptions.onStart = function (event) { return _this.setGhostHeight(event); };
|
|
7662
|
+
}
|
|
7663
|
+
if (hasStaticItems) {
|
|
7664
|
+
mergedOptions.onMove = function (event) {
|
|
7665
|
+
if (event.related.classList.contains('dato-sortable-static-item')) {
|
|
7666
|
+
return false;
|
|
7667
|
+
}
|
|
7668
|
+
return sortableOptions.onMove ? sortableOptions.onMove(event) : true;
|
|
7669
|
+
};
|
|
7670
|
+
}
|
|
7671
|
+
this.mergedOptions = mergedOptions;
|
|
7672
|
+
};
|
|
7673
|
+
DatoSortableComponent.prototype.emitUpdate = function (event) {
|
|
7674
|
+
if (this.formControl) {
|
|
7675
|
+
this.formControl.setValue(this.list);
|
|
7676
|
+
}
|
|
7677
|
+
this.orderUpdated.emit(event);
|
|
7678
|
+
};
|
|
7679
|
+
DatoSortableComponent.prototype.setGhostHeight = function (event) {
|
|
7680
|
+
var originalEl = event.from.children[event.oldIndex];
|
|
7681
|
+
setStyle(originalEl, 'display', 'block');
|
|
7682
|
+
var height = originalEl.getBoundingClientRect().height;
|
|
7683
|
+
setStyle(originalEl, 'display', 'none');
|
|
7684
|
+
var ghostEl = query('.dato-sortable-ghost');
|
|
7685
|
+
setStyle(ghostEl, 'height', height + "px");
|
|
7686
|
+
};
|
|
7687
|
+
__decorate([
|
|
7688
|
+
core.ContentChildren(DatoAccordionGroupComponent),
|
|
7689
|
+
__metadata("design:type", core.QueryList)
|
|
7690
|
+
], DatoSortableComponent.prototype, "accordionGroups", void 0);
|
|
7691
|
+
__decorate([
|
|
7692
|
+
core.Input(),
|
|
7693
|
+
__metadata("design:type", Object),
|
|
7694
|
+
__metadata("design:paramtypes", [Object])
|
|
7695
|
+
], DatoSortableComponent.prototype, "datoList", null);
|
|
7696
|
+
__decorate([
|
|
7697
|
+
core.Input(),
|
|
7698
|
+
__metadata("design:type", Object)
|
|
7699
|
+
], DatoSortableComponent.prototype, "datoOptions", void 0);
|
|
7700
|
+
__decorate([
|
|
7701
|
+
core.Input(),
|
|
7702
|
+
__metadata("design:type", String)
|
|
7703
|
+
], DatoSortableComponent.prototype, "containerClass", void 0);
|
|
7704
|
+
__decorate([
|
|
7705
|
+
core.Output(),
|
|
7706
|
+
__metadata("design:type", Object)
|
|
7707
|
+
], DatoSortableComponent.prototype, "orderUpdated", void 0);
|
|
7708
|
+
DatoSortableComponent = __decorate([
|
|
7709
|
+
core.Component({
|
|
7710
|
+
selector: 'dato-sortable',
|
|
7711
|
+
template: "<section [sortablejs]=\"list\" [sortablejsOptions]=\"mergedOptions\" [ngClass]=\"containerClass\"\n (update.stop)=\"noop()\" (add.stop)=\"noop()\" (sort.stop)=\"noop()\" (remove.stop)=\"noop()\"\n (filter.stop)=\"noop()\" (change.stop)=\"noop()\" (drag.stop)=\"noop()\">\n <ng-content></ng-content>\n</section>",
|
|
7712
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
7713
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
7714
|
+
styles: ["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]
|
|
7715
|
+
})
|
|
7716
|
+
], DatoSortableComponent);
|
|
7717
|
+
return DatoSortableComponent;
|
|
7718
|
+
}());
|
|
7719
|
+
|
|
7612
7720
|
/**
|
|
7613
7721
|
* @license
|
|
7614
7722
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -7654,6 +7762,13 @@
|
|
|
7654
7762
|
enumerable: true,
|
|
7655
7763
|
configurable: true
|
|
7656
7764
|
});
|
|
7765
|
+
Object.defineProperty(DatoAccordionComponent.prototype, "groups", {
|
|
7766
|
+
get: function () {
|
|
7767
|
+
return this.sortable && this.sortable.accordionGroups.length > 0 ? this.sortable.accordionGroups : this.childGroups;
|
|
7768
|
+
},
|
|
7769
|
+
enumerable: true,
|
|
7770
|
+
configurable: true
|
|
7771
|
+
});
|
|
7657
7772
|
DatoAccordionComponent.prototype.ngOnChanges = function (changes) {
|
|
7658
7773
|
var _this = this;
|
|
7659
7774
|
if (changes.expandAll && !changes.expandAll.firstChange) {
|
|
@@ -7871,11 +7986,15 @@
|
|
|
7871
7986
|
__decorate([
|
|
7872
7987
|
core.ContentChildren(DatoAccordionGroupComponent),
|
|
7873
7988
|
__metadata("design:type", core.QueryList)
|
|
7874
|
-
], DatoAccordionComponent.prototype, "
|
|
7989
|
+
], DatoAccordionComponent.prototype, "childGroups", void 0);
|
|
7875
7990
|
__decorate([
|
|
7876
7991
|
core.ContentChildren(DatoAccordionComponent_1, { descendants: true }),
|
|
7877
7992
|
__metadata("design:type", core.QueryList)
|
|
7878
7993
|
], DatoAccordionComponent.prototype, "childAccordion", void 0);
|
|
7994
|
+
__decorate([
|
|
7995
|
+
core.ContentChild(DatoSortableComponent, { static: true }),
|
|
7996
|
+
__metadata("design:type", DatoSortableComponent)
|
|
7997
|
+
], DatoAccordionComponent.prototype, "sortable", void 0);
|
|
7879
7998
|
__decorate([
|
|
7880
7999
|
core.Input(),
|
|
7881
8000
|
__metadata("design:type", Object)
|
|
@@ -8629,9 +8748,8 @@
|
|
|
8629
8748
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8630
8749
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8631
8750
|
if (this.options) {
|
|
8632
|
-
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8633
8751
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8634
|
-
|
|
8752
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8635
8753
|
}
|
|
8636
8754
|
/** For later updates */
|
|
8637
8755
|
this.cdr.markForCheck();
|
|
@@ -8668,7 +8786,7 @@
|
|
|
8668
8786
|
*/
|
|
8669
8787
|
if (this.hasValue && this._initialOpen) {
|
|
8670
8788
|
this.markAsActive(this._model);
|
|
8671
|
-
if (this.limitSelectedTo
|
|
8789
|
+
if (this.limitSelectedTo) {
|
|
8672
8790
|
this.updateDisabledState();
|
|
8673
8791
|
}
|
|
8674
8792
|
this._initialOpen = false;
|
|
@@ -8748,8 +8866,8 @@
|
|
|
8748
8866
|
}
|
|
8749
8867
|
}
|
|
8750
8868
|
this.onChange(this._model);
|
|
8751
|
-
this.datoOverlay.scheduleUpdate();
|
|
8752
8869
|
this.cdr.markForCheck();
|
|
8870
|
+
this.asyncUpdateDropdownPosition();
|
|
8753
8871
|
};
|
|
8754
8872
|
DatoSelectComponent.prototype.reorderOptions = function (newOrder) {
|
|
8755
8873
|
this._model = newOrder;
|
|
@@ -8757,7 +8875,6 @@
|
|
|
8757
8875
|
};
|
|
8758
8876
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8759
8877
|
var _this = this;
|
|
8760
|
-
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8761
8878
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8762
8879
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8763
8880
|
/**
|
|
@@ -8767,12 +8884,10 @@
|
|
|
8767
8884
|
if (optionToRemove) {
|
|
8768
8885
|
optionToRemove.active = false;
|
|
8769
8886
|
}
|
|
8770
|
-
|
|
8887
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8771
8888
|
this.onChange(this._model);
|
|
8772
8889
|
this.cdr.markForCheck();
|
|
8773
|
-
|
|
8774
|
-
this.datoOverlay.scheduleUpdate();
|
|
8775
|
-
}
|
|
8890
|
+
this.asyncUpdateDropdownPosition();
|
|
8776
8891
|
};
|
|
8777
8892
|
DatoSelectComponent.prototype.preventBodyScroll = function (event) {
|
|
8778
8893
|
if (isArrowUpDown(event)) {
|
|
@@ -9027,7 +9142,7 @@
|
|
|
9027
9142
|
_this.searchTerm = value;
|
|
9028
9143
|
_this.keyManager.setActiveItem(-1);
|
|
9029
9144
|
_this.cdr.markForCheck();
|
|
9030
|
-
_this.
|
|
9145
|
+
_this.asyncUpdateDropdownPosition();
|
|
9031
9146
|
});
|
|
9032
9147
|
};
|
|
9033
9148
|
/**
|
|
@@ -9117,9 +9232,6 @@
|
|
|
9117
9232
|
if (!datoOption) {
|
|
9118
9233
|
return;
|
|
9119
9234
|
}
|
|
9120
|
-
var modelLength = this._model.length;
|
|
9121
|
-
var updateDisabled = this.limitSelectedTo &&
|
|
9122
|
-
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9123
9235
|
datoOption.active = !datoOption.active;
|
|
9124
9236
|
var rawOption = datoOption.option;
|
|
9125
9237
|
if (datoOption.active) {
|
|
@@ -9128,10 +9240,10 @@
|
|
|
9128
9240
|
else {
|
|
9129
9241
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9130
9242
|
}
|
|
9131
|
-
|
|
9243
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9132
9244
|
this.onChange(this._model);
|
|
9133
9245
|
this.cdr.markForCheck();
|
|
9134
|
-
this.
|
|
9246
|
+
this.asyncUpdateDropdownPosition();
|
|
9135
9247
|
};
|
|
9136
9248
|
DatoSelectComponent.prototype.activateInfiniteScroll = function () {
|
|
9137
9249
|
var _this = this;
|
|
@@ -9184,6 +9296,14 @@
|
|
|
9184
9296
|
finally { if (e_9) throw e_9.error; }
|
|
9185
9297
|
}
|
|
9186
9298
|
};
|
|
9299
|
+
// Make sure the overlay will be update AFTER Change Detection was done
|
|
9300
|
+
// So the items in the input (and its height) is update
|
|
9301
|
+
DatoSelectComponent.prototype.asyncUpdateDropdownPosition = function () {
|
|
9302
|
+
var _this = this;
|
|
9303
|
+
if (this.datoOverlay && this.datoOverlay.attached) {
|
|
9304
|
+
setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
|
|
9305
|
+
}
|
|
9306
|
+
};
|
|
9187
9307
|
DatoSelectComponent.ctorParameters = function () { return [
|
|
9188
9308
|
{ type: core.ChangeDetectorRef },
|
|
9189
9309
|
{ type: DatoTranslateService },
|
|
@@ -10176,110 +10296,6 @@
|
|
|
10176
10296
|
return DatoOptionsModule;
|
|
10177
10297
|
}());
|
|
10178
10298
|
|
|
10179
|
-
/**
|
|
10180
|
-
* @license
|
|
10181
|
-
* Copyright Datorama. All Rights Reserved.
|
|
10182
|
-
*
|
|
10183
|
-
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
10184
|
-
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
10185
|
-
*/
|
|
10186
|
-
var DatoSortableComponent = /** @class */ (function () {
|
|
10187
|
-
function DatoSortableComponent() {
|
|
10188
|
-
this.list = [];
|
|
10189
|
-
this.noop = noop;
|
|
10190
|
-
/**
|
|
10191
|
-
* Sortablejs options
|
|
10192
|
-
*/
|
|
10193
|
-
this.datoOptions = {};
|
|
10194
|
-
/**
|
|
10195
|
-
* Fired once items order has changed
|
|
10196
|
-
*/
|
|
10197
|
-
this.orderUpdated = new core.EventEmitter();
|
|
10198
|
-
this.defaultOptions = {
|
|
10199
|
-
handle: '.dato-sortable-handler',
|
|
10200
|
-
ghostClass: 'dato-sortable-ghost',
|
|
10201
|
-
chosenClass: 'dato-sortable-chosen',
|
|
10202
|
-
dragClass: 'dato-sortable-drag'
|
|
10203
|
-
};
|
|
10204
|
-
}
|
|
10205
|
-
Object.defineProperty(DatoSortableComponent.prototype, "datoList", {
|
|
10206
|
-
set: function (list) {
|
|
10207
|
-
var isArr = Array.isArray(list);
|
|
10208
|
-
var validInput = isArr || (list instanceof forms.FormControl && Array.isArray(list.value));
|
|
10209
|
-
if (!validInput) {
|
|
10210
|
-
throw new Error("DatoSortable - datoList expected array or form control but got " + typeof list);
|
|
10211
|
-
}
|
|
10212
|
-
if (!isArr) {
|
|
10213
|
-
this.formControl = list;
|
|
10214
|
-
this.list = __spread(this.formControl.value);
|
|
10215
|
-
}
|
|
10216
|
-
else {
|
|
10217
|
-
this.list = list;
|
|
10218
|
-
}
|
|
10219
|
-
},
|
|
10220
|
-
enumerable: true,
|
|
10221
|
-
configurable: true
|
|
10222
|
-
});
|
|
10223
|
-
DatoSortableComponent.prototype.ngOnInit = function () {
|
|
10224
|
-
var _this = this;
|
|
10225
|
-
var _a = this.datoOptions, dynamicGhostHeight = _a.dynamicGhostHeight, hasStaticItems = _a.hasStaticItems, sortableOptions = __rest(_a, ["dynamicGhostHeight", "hasStaticItems"]);
|
|
10226
|
-
var mergedOptions = __assign(__assign(__assign({}, this.defaultOptions), sortableOptions), { onUpdate: function (event) { return (sortableOptions.onUpdate ? sortableOptions.onUpdate(event) : _this.emitUpdate(event)); } });
|
|
10227
|
-
if (dynamicGhostHeight) {
|
|
10228
|
-
mergedOptions.onStart = function (event) { return _this.setGhostHeight(event); };
|
|
10229
|
-
}
|
|
10230
|
-
if (hasStaticItems) {
|
|
10231
|
-
mergedOptions.onMove = function (event) {
|
|
10232
|
-
if (event.related.classList.contains('dato-sortable-static-item')) {
|
|
10233
|
-
return false;
|
|
10234
|
-
}
|
|
10235
|
-
return sortableOptions.onMove ? sortableOptions.onMove(event) : true;
|
|
10236
|
-
};
|
|
10237
|
-
}
|
|
10238
|
-
this.mergedOptions = mergedOptions;
|
|
10239
|
-
};
|
|
10240
|
-
DatoSortableComponent.prototype.emitUpdate = function (event) {
|
|
10241
|
-
if (this.formControl) {
|
|
10242
|
-
this.formControl.setValue(this.list);
|
|
10243
|
-
}
|
|
10244
|
-
this.orderUpdated.emit(event);
|
|
10245
|
-
};
|
|
10246
|
-
DatoSortableComponent.prototype.setGhostHeight = function (event) {
|
|
10247
|
-
var originalEl = event.from.children[event.oldIndex];
|
|
10248
|
-
setStyle(originalEl, 'display', 'block');
|
|
10249
|
-
var height = originalEl.getBoundingClientRect().height;
|
|
10250
|
-
setStyle(originalEl, 'display', 'none');
|
|
10251
|
-
var ghostEl = query('.dato-sortable-ghost');
|
|
10252
|
-
setStyle(ghostEl, 'height', height + "px");
|
|
10253
|
-
};
|
|
10254
|
-
__decorate([
|
|
10255
|
-
core.Input(),
|
|
10256
|
-
__metadata("design:type", Object),
|
|
10257
|
-
__metadata("design:paramtypes", [Object])
|
|
10258
|
-
], DatoSortableComponent.prototype, "datoList", null);
|
|
10259
|
-
__decorate([
|
|
10260
|
-
core.Input(),
|
|
10261
|
-
__metadata("design:type", Object)
|
|
10262
|
-
], DatoSortableComponent.prototype, "datoOptions", void 0);
|
|
10263
|
-
__decorate([
|
|
10264
|
-
core.Input(),
|
|
10265
|
-
__metadata("design:type", String)
|
|
10266
|
-
], DatoSortableComponent.prototype, "containerClass", void 0);
|
|
10267
|
-
__decorate([
|
|
10268
|
-
core.Output(),
|
|
10269
|
-
__metadata("design:type", Object)
|
|
10270
|
-
], DatoSortableComponent.prototype, "orderUpdated", void 0);
|
|
10271
|
-
DatoSortableComponent = __decorate([
|
|
10272
|
-
core.Component({
|
|
10273
|
-
selector: 'dato-sortable',
|
|
10274
|
-
template: "<section [sortablejs]=\"list\" [sortablejsOptions]=\"mergedOptions\" [ngClass]=\"containerClass\"\n (update.stop)=\"noop()\" (add.stop)=\"noop()\" (sort.stop)=\"noop()\" (remove.stop)=\"noop()\"\n (filter.stop)=\"noop()\" (change.stop)=\"noop()\" (drag.stop)=\"noop()\">\n <ng-content></ng-content>\n</section>",
|
|
10275
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
10276
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
10277
|
-
styles: ["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]
|
|
10278
|
-
})
|
|
10279
|
-
], DatoSortableComponent);
|
|
10280
|
-
return DatoSortableComponent;
|
|
10281
|
-
}());
|
|
10282
|
-
|
|
10283
10299
|
/**
|
|
10284
10300
|
* @license
|
|
10285
10301
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -11745,6 +11761,8 @@
|
|
|
11745
11761
|
DatoFilterConditions["NOT_IN_LIST"] = "NOT_IN_LIST";
|
|
11746
11762
|
DatoFilterConditions["IS_EMPTY"] = "IS_EMPTY";
|
|
11747
11763
|
DatoFilterConditions["NOT_EMPTY"] = "NOT_EMPTY";
|
|
11764
|
+
DatoFilterConditions["IS_NULL"] = "IS_NULL";
|
|
11765
|
+
DatoFilterConditions["NOT_NULL"] = "NOT_NULL";
|
|
11748
11766
|
})(exports.DatoFilterConditions || (exports.DatoFilterConditions = {}));
|
|
11749
11767
|
var DatoGridDateFilterOptions = [
|
|
11750
11768
|
exports.DatoFilterConditions.IN_RANGE,
|
|
@@ -11828,8 +11846,10 @@
|
|
|
11828
11846
|
case exports.DatoFilterConditions.IN_RANGE:
|
|
11829
11847
|
return rowValue >= filterValue && rowValue <= parseFloat(rangeEnd);
|
|
11830
11848
|
case exports.DatoFilterConditions.IS_EMPTY:
|
|
11849
|
+
case exports.DatoFilterConditions.IS_NULL:
|
|
11831
11850
|
return isNil(rowValue);
|
|
11832
11851
|
case exports.DatoFilterConditions.NOT_EMPTY:
|
|
11852
|
+
case exports.DatoFilterConditions.NOT_NULL:
|
|
11833
11853
|
return !isNil(rowValue);
|
|
11834
11854
|
}
|
|
11835
11855
|
}
|
|
@@ -12015,7 +12035,7 @@
|
|
|
12015
12035
|
return contextActions;
|
|
12016
12036
|
}
|
|
12017
12037
|
|
|
12018
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12038
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12019
12039
|
|
|
12020
12040
|
var defaultEditableColumnRenderer = function (params) {
|
|
12021
12041
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -12830,10 +12850,11 @@
|
|
|
12830
12850
|
var _a;
|
|
12831
12851
|
var _this = this;
|
|
12832
12852
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12833
|
-
var _c = this.colDef, filter = _c.filter,
|
|
12853
|
+
var _c = this.colDef, filter = _c.filter, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12834
12854
|
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12835
12855
|
this.colField = getColField(this.colDef);
|
|
12836
12856
|
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12857
|
+
var filtersConfig = colDef.filtersConfig || this.colDef.filtersConfig || {};
|
|
12837
12858
|
var colFilter = filter || colDef.filter;
|
|
12838
12859
|
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12839
12860
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
@@ -12855,7 +12876,11 @@
|
|
|
12855
12876
|
if (this.filterSections.Conditional) {
|
|
12856
12877
|
var filterConditions = filterOptions || DatoGridStringFilterOptions;
|
|
12857
12878
|
if (filtersConfig.showEmptyConditions) {
|
|
12858
|
-
|
|
12879
|
+
var emptyConditions = [exports.DatoFilterConditions.IS_EMPTY, exports.DatoFilterConditions.NOT_EMPTY];
|
|
12880
|
+
if (this.filterType === exports.DatoGridFilterTypes.Number) {
|
|
12881
|
+
emptyConditions = [exports.DatoFilterConditions.IS_NULL, exports.DatoFilterConditions.NOT_NULL];
|
|
12882
|
+
}
|
|
12883
|
+
filterConditions = __spread(filterConditions, emptyConditions);
|
|
12859
12884
|
}
|
|
12860
12885
|
this.conditionalFilterOptions = filterConditions.map(function (operand, id) { return ({
|
|
12861
12886
|
id: id,
|
|
@@ -13246,7 +13271,10 @@
|
|
|
13246
13271
|
valueControl.updateValueAndValidity();
|
|
13247
13272
|
};
|
|
13248
13273
|
DatoGridFilterComponent.prototype.isEmptyOperand = function (operand) {
|
|
13249
|
-
return operand === exports.DatoFilterConditions.IS_EMPTY ||
|
|
13274
|
+
return (operand === exports.DatoFilterConditions.IS_EMPTY ||
|
|
13275
|
+
operand === exports.DatoFilterConditions.NOT_EMPTY ||
|
|
13276
|
+
operand === exports.DatoFilterConditions.IS_NULL ||
|
|
13277
|
+
operand === exports.DatoFilterConditions.NOT_NULL);
|
|
13250
13278
|
};
|
|
13251
13279
|
DatoGridFilterComponent.prototype.isStringArray = function (value) {
|
|
13252
13280
|
return isString(value[0]);
|
|
@@ -14466,7 +14494,8 @@
|
|
|
14466
14494
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14467
14495
|
};
|
|
14468
14496
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14469
|
-
this.
|
|
14497
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14498
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14470
14499
|
};
|
|
14471
14500
|
/**
|
|
14472
14501
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -14873,6 +14902,13 @@
|
|
|
14873
14902
|
column: column
|
|
14874
14903
|
};
|
|
14875
14904
|
}
|
|
14905
|
+
if (condition === exports.DatoFilterConditions.IS_NULL || condition === exports.DatoFilterConditions.NOT_NULL) {
|
|
14906
|
+
return {
|
|
14907
|
+
condition: exports.DatoFilterConditions.IS_NULL,
|
|
14908
|
+
value: condition === exports.DatoFilterConditions.IS_NULL ? 'true' : 'false',
|
|
14909
|
+
column: column
|
|
14910
|
+
};
|
|
14911
|
+
}
|
|
14876
14912
|
return __assign(__assign({}, item), { column: column });
|
|
14877
14913
|
})
|
|
14878
14914
|
};
|
|
@@ -15464,7 +15500,10 @@
|
|
|
15464
15500
|
.pipe(operators.switchMap(function () {
|
|
15465
15501
|
_this.gridOptions = _this.normalizeOptions();
|
|
15466
15502
|
agGrid.gridOptions = _this.gridOptions;
|
|
15467
|
-
var
|
|
15503
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15504
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15505
|
+
? rxjs.of(null)
|
|
15506
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15468
15507
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15469
15508
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15470
15509
|
.subscribe(function (_a) {
|
|
@@ -15472,6 +15511,11 @@
|
|
|
15472
15511
|
if (!_this.gridOptions.rowData) {
|
|
15473
15512
|
api.showLoadingOverlay();
|
|
15474
15513
|
}
|
|
15514
|
+
if (!_this.gridOptions.statusBar) {
|
|
15515
|
+
/** Fix ag-grid bug that doesn't add ag-hidden class to the status bar, which only get fixed in later versions */
|
|
15516
|
+
var el = agGridEl.querySelector('.ag-status-bar');
|
|
15517
|
+
addClass(el, 'ag-hidden');
|
|
15518
|
+
}
|
|
15475
15519
|
var gridApi = { grid: api, columns: columnApi };
|
|
15476
15520
|
_this.gridService._setApi(gridApi, agGrid);
|
|
15477
15521
|
_this.gridQuery._setApi(gridApi, agGrid);
|
|
@@ -16739,6 +16783,18 @@
|
|
|
16739
16783
|
this.registerGroupListeners();
|
|
16740
16784
|
this.subscribeRowsSelectionData();
|
|
16741
16785
|
};
|
|
16786
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16787
|
+
var _this = this;
|
|
16788
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16789
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16790
|
+
});
|
|
16791
|
+
};
|
|
16792
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16793
|
+
var _this = this;
|
|
16794
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16795
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16796
|
+
});
|
|
16797
|
+
};
|
|
16742
16798
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16743
16799
|
if (isFunction(action.onClick)) {
|
|
16744
16800
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21214,6 +21270,40 @@
|
|
|
21214
21270
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21215
21271
|
*/
|
|
21216
21272
|
|
|
21273
|
+
var RichTextService = /** @class */ (function () {
|
|
21274
|
+
function RichTextService(http, config) {
|
|
21275
|
+
this.http = http;
|
|
21276
|
+
this.config = config;
|
|
21277
|
+
}
|
|
21278
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21279
|
+
if (!this.richTextScript$) {
|
|
21280
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21281
|
+
}
|
|
21282
|
+
return this.richTextScript$;
|
|
21283
|
+
};
|
|
21284
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21285
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21286
|
+
this.http
|
|
21287
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21288
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21289
|
+
this.http
|
|
21290
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21291
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21292
|
+
]).pipe(operators.shareReplay(1));
|
|
21293
|
+
};
|
|
21294
|
+
RichTextService.ctorParameters = function () { return [
|
|
21295
|
+
{ type: http.HttpClient },
|
|
21296
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21297
|
+
]; };
|
|
21298
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21299
|
+
RichTextService = __decorate([
|
|
21300
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21301
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21302
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21303
|
+
], RichTextService);
|
|
21304
|
+
return RichTextService;
|
|
21305
|
+
}());
|
|
21306
|
+
|
|
21217
21307
|
/**
|
|
21218
21308
|
* @license
|
|
21219
21309
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21227,12 +21317,12 @@
|
|
|
21227
21317
|
var ɵ0$3 = getTinymce;
|
|
21228
21318
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21229
21319
|
__extends(DatoRichTextDirective, _super);
|
|
21230
|
-
function DatoRichTextDirective(ngZone,
|
|
21320
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21231
21321
|
var _this = _super.call(this) || this;
|
|
21232
21322
|
_this.ngZone = ngZone;
|
|
21233
|
-
_this.
|
|
21234
|
-
_this.host = host;
|
|
21323
|
+
_this.richTextService = richTextService;
|
|
21235
21324
|
_this.config = config;
|
|
21325
|
+
_this.host = host;
|
|
21236
21326
|
_this.autocompleteOptions = {};
|
|
21237
21327
|
_this.forcePlainTextPasting = false;
|
|
21238
21328
|
_this.format = 'html';
|
|
@@ -21266,28 +21356,11 @@
|
|
|
21266
21356
|
base: this.config.paths.richText,
|
|
21267
21357
|
query: ''
|
|
21268
21358
|
};
|
|
21269
|
-
|
|
21270
|
-
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21274
|
-
}
|
|
21275
|
-
else {
|
|
21276
|
-
this.loadLib().subscribe(function (lib) {
|
|
21277
|
-
appendScript(lib, 'rich-text-editor');
|
|
21278
|
-
_this.init.call(_this);
|
|
21279
|
-
_this.loadAutoCompleteStyle();
|
|
21280
|
-
});
|
|
21281
|
-
}
|
|
21282
|
-
};
|
|
21283
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21284
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21285
|
-
};
|
|
21286
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21287
|
-
this.http
|
|
21288
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21289
|
-
.subscribe(function (style) {
|
|
21290
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21359
|
+
this.richTextService
|
|
21360
|
+
.getLib(appendScript, appendStyle)
|
|
21361
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21362
|
+
.subscribe(function () {
|
|
21363
|
+
_this.init.call(_this);
|
|
21291
21364
|
});
|
|
21292
21365
|
};
|
|
21293
21366
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21380,9 +21453,9 @@
|
|
|
21380
21453
|
var DatoRichTextDirective_1;
|
|
21381
21454
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21382
21455
|
{ type: core.NgZone },
|
|
21383
|
-
{ type:
|
|
21384
|
-
{ type: core.
|
|
21385
|
-
{ type:
|
|
21456
|
+
{ type: RichTextService },
|
|
21457
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21458
|
+
{ type: core.ElementRef }
|
|
21386
21459
|
]; };
|
|
21387
21460
|
__decorate([
|
|
21388
21461
|
core.Input(),
|
|
@@ -21448,10 +21521,9 @@
|
|
|
21448
21521
|
}
|
|
21449
21522
|
]
|
|
21450
21523
|
}),
|
|
21451
|
-
__param(
|
|
21524
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21452
21525
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21453
|
-
|
|
21454
|
-
core.ElementRef, Object])
|
|
21526
|
+
RichTextService, Object, core.ElementRef])
|
|
21455
21527
|
], DatoRichTextDirective);
|
|
21456
21528
|
return DatoRichTextDirective;
|
|
21457
21529
|
}(BaseCustomControl));
|
|
@@ -23974,7 +24046,9 @@
|
|
|
23974
24046
|
};
|
|
23975
24047
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
23976
24048
|
var _this = this;
|
|
23977
|
-
this.headerControl.valueChanges
|
|
24049
|
+
this.headerControl.valueChanges
|
|
24050
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24051
|
+
.subscribe(function (res) {
|
|
23978
24052
|
_this.updateEditableText.emit(res);
|
|
23979
24053
|
_this.cdr.detectChanges();
|
|
23980
24054
|
});
|
|
@@ -25337,7 +25411,7 @@
|
|
|
25337
25411
|
};
|
|
25338
25412
|
}
|
|
25339
25413
|
|
|
25340
|
-
window.coreVersion = '22.
|
|
25414
|
+
window.coreVersion = '22.1.5-rc.';
|
|
25341
25415
|
|
|
25342
25416
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25343
25417
|
exports.AceService = AceService;
|
|
@@ -25779,6 +25853,7 @@
|
|
|
25779
25853
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25780
25854
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25781
25855
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25856
|
+
exports.ɵo = RichTextService;
|
|
25782
25857
|
|
|
25783
25858
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25784
25859
|
|