@datorama/core 22.0.4-rc.1 → 22.0.4
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 +55 -78
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +14 -14
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +0 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +1 -2
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +2 -5
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +2 -3
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
- package/esm2015/lib/progress-bar/progress-bar.component.js +12 -5
- package/esm2015/lib/rich-text/rich-text.directive.js +33 -15
- package/esm2015/lib/select/select.component.js +10 -5
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +1 -2
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +2 -5
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +2 -3
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
- package/esm5/lib/progress-bar/progress-bar.component.js +12 -5
- package/esm5/lib/rich-text/rich-text.directive.js +34 -16
- package/esm5/lib/select/select.component.js +10 -5
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +55 -70
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +56 -78
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +0 -1
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
- package/lib/progress-bar/progress-bar.component.d.ts +3 -1
- package/lib/rich-text/rich-text.directive.d.ts +6 -4
- package/package.json +2 -2
- package/esm2015/lib/rich-text/rich-text.service.js +0 -50
- package/esm5/lib/rich-text/rich-text.service.js +0 -51
- package/lib/rich-text/rich-text.service.d.ts +0 -10
|
@@ -8629,8 +8629,9 @@
|
|
|
8629
8629
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8630
8630
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8631
8631
|
if (this.options) {
|
|
8632
|
+
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8632
8633
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8633
|
-
|
|
8634
|
+
overTheLimit && this.updateDisabledState();
|
|
8634
8635
|
}
|
|
8635
8636
|
/** For later updates */
|
|
8636
8637
|
this.cdr.markForCheck();
|
|
@@ -8667,7 +8668,7 @@
|
|
|
8667
8668
|
*/
|
|
8668
8669
|
if (this.hasValue && this._initialOpen) {
|
|
8669
8670
|
this.markAsActive(this._model);
|
|
8670
|
-
if (this.limitSelectedTo) {
|
|
8671
|
+
if (this.limitSelectedTo && this._model.length === this.limitSelectedTo) {
|
|
8671
8672
|
this.updateDisabledState();
|
|
8672
8673
|
}
|
|
8673
8674
|
this._initialOpen = false;
|
|
@@ -8756,6 +8757,7 @@
|
|
|
8756
8757
|
};
|
|
8757
8758
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8758
8759
|
var _this = this;
|
|
8760
|
+
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8759
8761
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8760
8762
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8761
8763
|
/**
|
|
@@ -8765,7 +8767,7 @@
|
|
|
8765
8767
|
if (optionToRemove) {
|
|
8766
8768
|
optionToRemove.active = false;
|
|
8767
8769
|
}
|
|
8768
|
-
|
|
8770
|
+
updateDisabled && this.updateDisabledState();
|
|
8769
8771
|
this.onChange(this._model);
|
|
8770
8772
|
this.cdr.markForCheck();
|
|
8771
8773
|
if (this.datoOverlay.attached) {
|
|
@@ -9115,6 +9117,9 @@
|
|
|
9115
9117
|
if (!datoOption) {
|
|
9116
9118
|
return;
|
|
9117
9119
|
}
|
|
9120
|
+
var modelLength = this._model.length;
|
|
9121
|
+
var updateDisabled = this.limitSelectedTo &&
|
|
9122
|
+
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9118
9123
|
datoOption.active = !datoOption.active;
|
|
9119
9124
|
var rawOption = datoOption.option;
|
|
9120
9125
|
if (datoOption.active) {
|
|
@@ -9123,7 +9128,7 @@
|
|
|
9123
9128
|
else {
|
|
9124
9129
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9125
9130
|
}
|
|
9126
|
-
|
|
9131
|
+
updateDisabled && this.updateDisabledState();
|
|
9127
9132
|
this.onChange(this._model);
|
|
9128
9133
|
this.cdr.markForCheck();
|
|
9129
9134
|
this.datoOverlay.scheduleUpdate();
|
|
@@ -12010,7 +12015,7 @@
|
|
|
12010
12015
|
return contextActions;
|
|
12011
12016
|
}
|
|
12012
12017
|
|
|
12013
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12018
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12014
12019
|
|
|
12015
12020
|
var defaultEditableColumnRenderer = function (params) {
|
|
12016
12021
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14461,8 +14466,7 @@
|
|
|
14461
14466
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14462
14467
|
};
|
|
14463
14468
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14464
|
-
|
|
14465
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14469
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14466
14470
|
};
|
|
14467
14471
|
/**
|
|
14468
14472
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15460,10 +15464,7 @@
|
|
|
15460
15464
|
.pipe(operators.switchMap(function () {
|
|
15461
15465
|
_this.gridOptions = _this.normalizeOptions();
|
|
15462
15466
|
agGrid.gridOptions = _this.gridOptions;
|
|
15463
|
-
var
|
|
15464
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15465
|
-
? rxjs.of(null)
|
|
15466
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15467
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15467
15468
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15468
15469
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15469
15470
|
.subscribe(function (_a) {
|
|
@@ -16738,18 +16739,6 @@
|
|
|
16738
16739
|
this.registerGroupListeners();
|
|
16739
16740
|
this.subscribeRowsSelectionData();
|
|
16740
16741
|
};
|
|
16741
|
-
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16742
|
-
var _this = this;
|
|
16743
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16744
|
-
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16745
|
-
});
|
|
16746
|
-
};
|
|
16747
|
-
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16748
|
-
var _this = this;
|
|
16749
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16750
|
-
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16751
|
-
});
|
|
16752
|
-
};
|
|
16753
16742
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16754
16743
|
if (isFunction(action.onClick)) {
|
|
16755
16744
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21225,40 +21214,6 @@
|
|
|
21225
21214
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21226
21215
|
*/
|
|
21227
21216
|
|
|
21228
|
-
var RichTextService = /** @class */ (function () {
|
|
21229
|
-
function RichTextService(http, config) {
|
|
21230
|
-
this.http = http;
|
|
21231
|
-
this.config = config;
|
|
21232
|
-
}
|
|
21233
|
-
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21234
|
-
if (!this.richTextScript$) {
|
|
21235
|
-
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21236
|
-
}
|
|
21237
|
-
return this.richTextScript$;
|
|
21238
|
-
};
|
|
21239
|
-
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21240
|
-
this.richTextScript$ = rxjs.combineLatest([
|
|
21241
|
-
this.http
|
|
21242
|
-
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21243
|
-
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21244
|
-
this.http
|
|
21245
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21246
|
-
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21247
|
-
]).pipe(operators.shareReplay(1));
|
|
21248
|
-
};
|
|
21249
|
-
RichTextService.ctorParameters = function () { return [
|
|
21250
|
-
{ type: http.HttpClient },
|
|
21251
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21252
|
-
]; };
|
|
21253
|
-
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21254
|
-
RichTextService = __decorate([
|
|
21255
|
-
core.Injectable({ providedIn: 'root' }),
|
|
21256
|
-
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21257
|
-
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21258
|
-
], RichTextService);
|
|
21259
|
-
return RichTextService;
|
|
21260
|
-
}());
|
|
21261
|
-
|
|
21262
21217
|
/**
|
|
21263
21218
|
* @license
|
|
21264
21219
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21272,12 +21227,12 @@
|
|
|
21272
21227
|
var ɵ0$3 = getTinymce;
|
|
21273
21228
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21274
21229
|
__extends(DatoRichTextDirective, _super);
|
|
21275
|
-
function DatoRichTextDirective(ngZone,
|
|
21230
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21276
21231
|
var _this = _super.call(this) || this;
|
|
21277
21232
|
_this.ngZone = ngZone;
|
|
21278
|
-
_this.
|
|
21279
|
-
_this.config = config;
|
|
21233
|
+
_this.http = http;
|
|
21280
21234
|
_this.host = host;
|
|
21235
|
+
_this.config = config;
|
|
21281
21236
|
_this.autocompleteOptions = {};
|
|
21282
21237
|
_this.forcePlainTextPasting = false;
|
|
21283
21238
|
_this.format = 'html';
|
|
@@ -21311,11 +21266,28 @@
|
|
|
21311
21266
|
base: this.config.paths.richText,
|
|
21312
21267
|
query: ''
|
|
21313
21268
|
};
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21269
|
+
/**
|
|
21270
|
+
* We support only one instance in load time
|
|
21271
|
+
*/
|
|
21272
|
+
if (window.tinymce) {
|
|
21273
|
+
this.init.call(this);
|
|
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');
|
|
21319
21291
|
});
|
|
21320
21292
|
};
|
|
21321
21293
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21408,9 +21380,9 @@
|
|
|
21408
21380
|
var DatoRichTextDirective_1;
|
|
21409
21381
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21410
21382
|
{ type: core.NgZone },
|
|
21411
|
-
{ type:
|
|
21412
|
-
{ type:
|
|
21413
|
-
{ type: core.
|
|
21383
|
+
{ type: http.HttpClient },
|
|
21384
|
+
{ type: core.ElementRef },
|
|
21385
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21414
21386
|
]; };
|
|
21415
21387
|
__decorate([
|
|
21416
21388
|
core.Input(),
|
|
@@ -21476,9 +21448,10 @@
|
|
|
21476
21448
|
}
|
|
21477
21449
|
]
|
|
21478
21450
|
}),
|
|
21479
|
-
__param(
|
|
21451
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21480
21452
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21481
|
-
|
|
21453
|
+
http.HttpClient,
|
|
21454
|
+
core.ElementRef, Object])
|
|
21482
21455
|
], DatoRichTextDirective);
|
|
21483
21456
|
return DatoRichTextDirective;
|
|
21484
21457
|
}(BaseCustomControl));
|
|
@@ -24001,9 +23974,7 @@
|
|
|
24001
23974
|
};
|
|
24002
23975
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24003
23976
|
var _this = this;
|
|
24004
|
-
this.headerControl.valueChanges
|
|
24005
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24006
|
-
.subscribe(function (res) {
|
|
23977
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24007
23978
|
_this.updateEditableText.emit(res);
|
|
24008
23979
|
_this.cdr.detectChanges();
|
|
24009
23980
|
});
|
|
@@ -24692,12 +24663,14 @@
|
|
|
24692
24663
|
}());
|
|
24693
24664
|
|
|
24694
24665
|
var DatoProgressBarComponent = /** @class */ (function () {
|
|
24695
|
-
function DatoProgressBarComponent() {
|
|
24666
|
+
function DatoProgressBarComponent(cdr) {
|
|
24667
|
+
this.cdr = cdr;
|
|
24696
24668
|
this.barColor = 'primary-100';
|
|
24697
24669
|
this.thresholds = [33, 66];
|
|
24698
24670
|
}
|
|
24699
24671
|
DatoProgressBarComponent.prototype.ngOnInit = function () {
|
|
24700
|
-
if (!this.parts
|
|
24672
|
+
if (!this.parts) {
|
|
24673
|
+
this.percent = this.percent || 0;
|
|
24701
24674
|
this.isByPercent = true;
|
|
24702
24675
|
this.hasInitialColor = !!this.color;
|
|
24703
24676
|
this.initSinglePart();
|
|
@@ -24714,6 +24687,7 @@
|
|
|
24714
24687
|
(changes.color && !changes.color.firstChange) ||
|
|
24715
24688
|
(changes.tooltip && !changes.tooltip.firstChange))) {
|
|
24716
24689
|
this.initSinglePart();
|
|
24690
|
+
this.cdr.detectChanges();
|
|
24717
24691
|
}
|
|
24718
24692
|
};
|
|
24719
24693
|
DatoProgressBarComponent.prototype.initSinglePart = function () {
|
|
@@ -24768,6 +24742,9 @@
|
|
|
24768
24742
|
}
|
|
24769
24743
|
}
|
|
24770
24744
|
};
|
|
24745
|
+
DatoProgressBarComponent.ctorParameters = function () { return [
|
|
24746
|
+
{ type: core.ChangeDetectorRef }
|
|
24747
|
+
]; };
|
|
24771
24748
|
__decorate([
|
|
24772
24749
|
core.Input(),
|
|
24773
24750
|
__metadata("design:type", String)
|
|
@@ -24807,7 +24784,8 @@
|
|
|
24807
24784
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
24808
24785
|
encapsulation: core.ViewEncapsulation.None,
|
|
24809
24786
|
styles: ["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:16px;height:16px;min-width:16px;border-radius:50%}"]
|
|
24810
|
-
})
|
|
24787
|
+
}),
|
|
24788
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
24811
24789
|
], DatoProgressBarComponent);
|
|
24812
24790
|
return DatoProgressBarComponent;
|
|
24813
24791
|
}());
|
|
@@ -25359,7 +25337,7 @@
|
|
|
25359
25337
|
};
|
|
25360
25338
|
}
|
|
25361
25339
|
|
|
25362
|
-
window.coreVersion = '22.
|
|
25340
|
+
window.coreVersion = '22.0.4';
|
|
25363
25341
|
|
|
25364
25342
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25365
25343
|
exports.AceService = AceService;
|
|
@@ -25801,7 +25779,6 @@
|
|
|
25801
25779
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25802
25780
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25803
25781
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25804
|
-
exports.ɵo = RichTextService;
|
|
25805
25782
|
|
|
25806
25783
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25807
25784
|
|