@datorama/core 22.0.5 → 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/bundles/datorama-core.umd.js +207 -156
- 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 +5 -2
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -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 +5 -2
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -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 +188 -150
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +207 -157
- package/fesm5/datorama-core.js.map +1 -1
- 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-settings.d.ts +2 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +2 -0
- 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
|
@@ -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.
|
|
@@ -12019,7 +12035,7 @@
|
|
|
12019
12035
|
return contextActions;
|
|
12020
12036
|
}
|
|
12021
12037
|
|
|
12022
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12038
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12023
12039
|
|
|
12024
12040
|
var defaultEditableColumnRenderer = function (params) {
|
|
12025
12041
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14478,7 +14494,8 @@
|
|
|
14478
14494
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14479
14495
|
};
|
|
14480
14496
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14481
|
-
this.
|
|
14497
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14498
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14482
14499
|
};
|
|
14483
14500
|
/**
|
|
14484
14501
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15483,7 +15500,10 @@
|
|
|
15483
15500
|
.pipe(operators.switchMap(function () {
|
|
15484
15501
|
_this.gridOptions = _this.normalizeOptions();
|
|
15485
15502
|
agGrid.gridOptions = _this.gridOptions;
|
|
15486
|
-
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);
|
|
15487
15507
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15488
15508
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15489
15509
|
.subscribe(function (_a) {
|
|
@@ -16763,6 +16783,18 @@
|
|
|
16763
16783
|
this.registerGroupListeners();
|
|
16764
16784
|
this.subscribeRowsSelectionData();
|
|
16765
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
|
+
};
|
|
16766
16798
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16767
16799
|
if (isFunction(action.onClick)) {
|
|
16768
16800
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21238,6 +21270,40 @@
|
|
|
21238
21270
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21239
21271
|
*/
|
|
21240
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
|
+
|
|
21241
21307
|
/**
|
|
21242
21308
|
* @license
|
|
21243
21309
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21251,12 +21317,12 @@
|
|
|
21251
21317
|
var ɵ0$3 = getTinymce;
|
|
21252
21318
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21253
21319
|
__extends(DatoRichTextDirective, _super);
|
|
21254
|
-
function DatoRichTextDirective(ngZone,
|
|
21320
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21255
21321
|
var _this = _super.call(this) || this;
|
|
21256
21322
|
_this.ngZone = ngZone;
|
|
21257
|
-
_this.
|
|
21258
|
-
_this.host = host;
|
|
21323
|
+
_this.richTextService = richTextService;
|
|
21259
21324
|
_this.config = config;
|
|
21325
|
+
_this.host = host;
|
|
21260
21326
|
_this.autocompleteOptions = {};
|
|
21261
21327
|
_this.forcePlainTextPasting = false;
|
|
21262
21328
|
_this.format = 'html';
|
|
@@ -21290,28 +21356,11 @@
|
|
|
21290
21356
|
base: this.config.paths.richText,
|
|
21291
21357
|
query: ''
|
|
21292
21358
|
};
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
}
|
|
21299
|
-
else {
|
|
21300
|
-
this.loadLib().subscribe(function (lib) {
|
|
21301
|
-
appendScript(lib, 'rich-text-editor');
|
|
21302
|
-
_this.init.call(_this);
|
|
21303
|
-
_this.loadAutoCompleteStyle();
|
|
21304
|
-
});
|
|
21305
|
-
}
|
|
21306
|
-
};
|
|
21307
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21308
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21309
|
-
};
|
|
21310
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21311
|
-
this.http
|
|
21312
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21313
|
-
.subscribe(function (style) {
|
|
21314
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21359
|
+
this.richTextService
|
|
21360
|
+
.getLib(appendScript, appendStyle)
|
|
21361
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21362
|
+
.subscribe(function () {
|
|
21363
|
+
_this.init.call(_this);
|
|
21315
21364
|
});
|
|
21316
21365
|
};
|
|
21317
21366
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21404,9 +21453,9 @@
|
|
|
21404
21453
|
var DatoRichTextDirective_1;
|
|
21405
21454
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21406
21455
|
{ type: core.NgZone },
|
|
21407
|
-
{ type:
|
|
21408
|
-
{ type: core.
|
|
21409
|
-
{ type:
|
|
21456
|
+
{ type: RichTextService },
|
|
21457
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21458
|
+
{ type: core.ElementRef }
|
|
21410
21459
|
]; };
|
|
21411
21460
|
__decorate([
|
|
21412
21461
|
core.Input(),
|
|
@@ -21472,10 +21521,9 @@
|
|
|
21472
21521
|
}
|
|
21473
21522
|
]
|
|
21474
21523
|
}),
|
|
21475
|
-
__param(
|
|
21524
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21476
21525
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21477
|
-
|
|
21478
|
-
core.ElementRef, Object])
|
|
21526
|
+
RichTextService, Object, core.ElementRef])
|
|
21479
21527
|
], DatoRichTextDirective);
|
|
21480
21528
|
return DatoRichTextDirective;
|
|
21481
21529
|
}(BaseCustomControl));
|
|
@@ -23998,7 +24046,9 @@
|
|
|
23998
24046
|
};
|
|
23999
24047
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24000
24048
|
var _this = this;
|
|
24001
|
-
this.headerControl.valueChanges
|
|
24049
|
+
this.headerControl.valueChanges
|
|
24050
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24051
|
+
.subscribe(function (res) {
|
|
24002
24052
|
_this.updateEditableText.emit(res);
|
|
24003
24053
|
_this.cdr.detectChanges();
|
|
24004
24054
|
});
|
|
@@ -25361,7 +25411,7 @@
|
|
|
25361
25411
|
};
|
|
25362
25412
|
}
|
|
25363
25413
|
|
|
25364
|
-
window.coreVersion = '22.
|
|
25414
|
+
window.coreVersion = '22.1.5-rc.';
|
|
25365
25415
|
|
|
25366
25416
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25367
25417
|
exports.AceService = AceService;
|
|
@@ -25803,6 +25853,7 @@
|
|
|
25803
25853
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25804
25854
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25805
25855
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25856
|
+
exports.ɵo = RichTextService;
|
|
25806
25857
|
|
|
25807
25858
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25808
25859
|
|