@datorama/core 22.7.0 → 22.8.1-rc.2
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 +82 -49
- 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 +1 -0
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +2 -1
- 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 +10 -6
- 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 +5 -10
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +2 -1
- 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 +10 -6
- 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 +5 -10
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +74 -49
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +82 -50
- package/fesm5/datorama-core.js.map +1 -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/package.json +1 -1
|
@@ -8748,9 +8748,8 @@
|
|
|
8748
8748
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8749
8749
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8750
8750
|
if (this.options) {
|
|
8751
|
-
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8752
8751
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8753
|
-
|
|
8752
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8754
8753
|
}
|
|
8755
8754
|
/** For later updates */
|
|
8756
8755
|
this.cdr.markForCheck();
|
|
@@ -8787,7 +8786,7 @@
|
|
|
8787
8786
|
*/
|
|
8788
8787
|
if (this.hasValue && this._initialOpen) {
|
|
8789
8788
|
this.markAsActive(this._model);
|
|
8790
|
-
if (this.limitSelectedTo
|
|
8789
|
+
if (this.limitSelectedTo) {
|
|
8791
8790
|
this.updateDisabledState();
|
|
8792
8791
|
}
|
|
8793
8792
|
this._initialOpen = false;
|
|
@@ -8876,7 +8875,6 @@
|
|
|
8876
8875
|
};
|
|
8877
8876
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8878
8877
|
var _this = this;
|
|
8879
|
-
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8880
8878
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8881
8879
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8882
8880
|
/**
|
|
@@ -8886,7 +8884,7 @@
|
|
|
8886
8884
|
if (optionToRemove) {
|
|
8887
8885
|
optionToRemove.active = false;
|
|
8888
8886
|
}
|
|
8889
|
-
|
|
8887
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8890
8888
|
this.onChange(this._model);
|
|
8891
8889
|
this.cdr.markForCheck();
|
|
8892
8890
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9234,9 +9232,6 @@
|
|
|
9234
9232
|
if (!datoOption) {
|
|
9235
9233
|
return;
|
|
9236
9234
|
}
|
|
9237
|
-
var modelLength = this._model.length;
|
|
9238
|
-
var updateDisabled = this.limitSelectedTo &&
|
|
9239
|
-
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9240
9235
|
datoOption.active = !datoOption.active;
|
|
9241
9236
|
var rawOption = datoOption.option;
|
|
9242
9237
|
if (datoOption.active) {
|
|
@@ -9245,7 +9240,7 @@
|
|
|
9245
9240
|
else {
|
|
9246
9241
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9247
9242
|
}
|
|
9248
|
-
|
|
9243
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9249
9244
|
this.onChange(this._model);
|
|
9250
9245
|
this.cdr.markForCheck();
|
|
9251
9246
|
this.asyncUpdateDropdownPosition();
|
|
@@ -12048,7 +12043,7 @@
|
|
|
12048
12043
|
return contextActions;
|
|
12049
12044
|
}
|
|
12050
12045
|
|
|
12051
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12046
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12052
12047
|
|
|
12053
12048
|
var defaultEditableColumnRenderer = function (params) {
|
|
12054
12049
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14471,12 +14466,15 @@
|
|
|
14471
14466
|
if (!isNil(sortIndex)) {
|
|
14472
14467
|
var gridColumns = this.api.columns.getAllGridColumns();
|
|
14473
14468
|
if (gridColumns) {
|
|
14474
|
-
var
|
|
14475
|
-
var
|
|
14476
|
-
|
|
14469
|
+
var valueColumns = this.api.columns.getValueColumns();
|
|
14470
|
+
var valueColumn = valueColumns.find(function (col) { return col.getColId() === colId_1; });
|
|
14471
|
+
var isPivotColId = colId_1.startsWith('pivot');
|
|
14472
|
+
if (isPivotColId || valueColumn) {
|
|
14477
14473
|
/** Column is pivot value column, sort by index */
|
|
14478
14474
|
var columnByIndex = gridColumns[sortIndex];
|
|
14479
|
-
|
|
14475
|
+
var pivotValueColumn = columnByIndex && columnByIndex.getColDef().pivotValueColumn;
|
|
14476
|
+
var pivotValueColumnId = pivotValueColumn && pivotValueColumn.getColId();
|
|
14477
|
+
if (pivotValueColumnId === colId_1) {
|
|
14480
14478
|
sortToApply = { colId: columnByIndex.getColId(), sort: sort };
|
|
14481
14479
|
}
|
|
14482
14480
|
}
|
|
@@ -14550,7 +14548,8 @@
|
|
|
14550
14548
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14551
14549
|
};
|
|
14552
14550
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14553
|
-
this.
|
|
14551
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14552
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14554
14553
|
};
|
|
14555
14554
|
/**
|
|
14556
14555
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15555,7 +15554,10 @@
|
|
|
15555
15554
|
.pipe(operators.switchMap(function () {
|
|
15556
15555
|
_this.gridOptions = _this.normalizeOptions();
|
|
15557
15556
|
agGrid.gridOptions = _this.gridOptions;
|
|
15558
|
-
var
|
|
15557
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15558
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15559
|
+
? rxjs.of(null)
|
|
15560
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15559
15561
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15560
15562
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15561
15563
|
.subscribe(function (_a) {
|
|
@@ -16837,6 +16839,18 @@
|
|
|
16837
16839
|
this.registerGroupListeners();
|
|
16838
16840
|
this.subscribeRowsSelectionData();
|
|
16839
16841
|
};
|
|
16842
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16843
|
+
var _this = this;
|
|
16844
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16845
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16846
|
+
});
|
|
16847
|
+
};
|
|
16848
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16849
|
+
var _this = this;
|
|
16850
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16851
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16852
|
+
});
|
|
16853
|
+
};
|
|
16840
16854
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16841
16855
|
if (isFunction(action.onClick)) {
|
|
16842
16856
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21312,6 +21326,40 @@
|
|
|
21312
21326
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21313
21327
|
*/
|
|
21314
21328
|
|
|
21329
|
+
var RichTextService = /** @class */ (function () {
|
|
21330
|
+
function RichTextService(http, config) {
|
|
21331
|
+
this.http = http;
|
|
21332
|
+
this.config = config;
|
|
21333
|
+
}
|
|
21334
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21335
|
+
if (!this.richTextScript$) {
|
|
21336
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21337
|
+
}
|
|
21338
|
+
return this.richTextScript$;
|
|
21339
|
+
};
|
|
21340
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21341
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21342
|
+
this.http
|
|
21343
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21344
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21345
|
+
this.http
|
|
21346
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21347
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21348
|
+
]).pipe(operators.shareReplay(1));
|
|
21349
|
+
};
|
|
21350
|
+
RichTextService.ctorParameters = function () { return [
|
|
21351
|
+
{ type: http.HttpClient },
|
|
21352
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21353
|
+
]; };
|
|
21354
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21355
|
+
RichTextService = __decorate([
|
|
21356
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21357
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21358
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21359
|
+
], RichTextService);
|
|
21360
|
+
return RichTextService;
|
|
21361
|
+
}());
|
|
21362
|
+
|
|
21315
21363
|
/**
|
|
21316
21364
|
* @license
|
|
21317
21365
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21325,12 +21373,12 @@
|
|
|
21325
21373
|
var ɵ0$3 = getTinymce;
|
|
21326
21374
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21327
21375
|
__extends(DatoRichTextDirective, _super);
|
|
21328
|
-
function DatoRichTextDirective(ngZone,
|
|
21376
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21329
21377
|
var _this = _super.call(this) || this;
|
|
21330
21378
|
_this.ngZone = ngZone;
|
|
21331
|
-
_this.
|
|
21332
|
-
_this.host = host;
|
|
21379
|
+
_this.richTextService = richTextService;
|
|
21333
21380
|
_this.config = config;
|
|
21381
|
+
_this.host = host;
|
|
21334
21382
|
_this.autocompleteOptions = {};
|
|
21335
21383
|
_this.forcePlainTextPasting = false;
|
|
21336
21384
|
_this.format = 'html';
|
|
@@ -21364,28 +21412,11 @@
|
|
|
21364
21412
|
base: this.config.paths.richText,
|
|
21365
21413
|
query: ''
|
|
21366
21414
|
};
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21371
|
-
|
|
21372
|
-
}
|
|
21373
|
-
else {
|
|
21374
|
-
this.loadLib().subscribe(function (lib) {
|
|
21375
|
-
appendScript(lib, 'rich-text-editor');
|
|
21376
|
-
_this.init.call(_this);
|
|
21377
|
-
_this.loadAutoCompleteStyle();
|
|
21378
|
-
});
|
|
21379
|
-
}
|
|
21380
|
-
};
|
|
21381
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21382
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21383
|
-
};
|
|
21384
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21385
|
-
this.http
|
|
21386
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21387
|
-
.subscribe(function (style) {
|
|
21388
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21415
|
+
this.richTextService
|
|
21416
|
+
.getLib(appendScript, appendStyle)
|
|
21417
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21418
|
+
.subscribe(function () {
|
|
21419
|
+
_this.init.call(_this);
|
|
21389
21420
|
});
|
|
21390
21421
|
};
|
|
21391
21422
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21478,9 +21509,9 @@
|
|
|
21478
21509
|
var DatoRichTextDirective_1;
|
|
21479
21510
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21480
21511
|
{ type: core.NgZone },
|
|
21481
|
-
{ type:
|
|
21482
|
-
{ type: core.
|
|
21483
|
-
{ type:
|
|
21512
|
+
{ type: RichTextService },
|
|
21513
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21514
|
+
{ type: core.ElementRef }
|
|
21484
21515
|
]; };
|
|
21485
21516
|
__decorate([
|
|
21486
21517
|
core.Input(),
|
|
@@ -21546,10 +21577,9 @@
|
|
|
21546
21577
|
}
|
|
21547
21578
|
]
|
|
21548
21579
|
}),
|
|
21549
|
-
__param(
|
|
21580
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21550
21581
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21551
|
-
|
|
21552
|
-
core.ElementRef, Object])
|
|
21582
|
+
RichTextService, Object, core.ElementRef])
|
|
21553
21583
|
], DatoRichTextDirective);
|
|
21554
21584
|
return DatoRichTextDirective;
|
|
21555
21585
|
}(BaseCustomControl));
|
|
@@ -24072,7 +24102,9 @@
|
|
|
24072
24102
|
};
|
|
24073
24103
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24074
24104
|
var _this = this;
|
|
24075
|
-
this.headerControl.valueChanges
|
|
24105
|
+
this.headerControl.valueChanges
|
|
24106
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24107
|
+
.subscribe(function (res) {
|
|
24076
24108
|
_this.updateEditableText.emit(res);
|
|
24077
24109
|
_this.cdr.detectChanges();
|
|
24078
24110
|
});
|
|
@@ -25435,7 +25467,7 @@
|
|
|
25435
25467
|
};
|
|
25436
25468
|
}
|
|
25437
25469
|
|
|
25438
|
-
window.coreVersion = '22.
|
|
25470
|
+
window.coreVersion = '22.8.1-rc.';
|
|
25439
25471
|
|
|
25440
25472
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25441
25473
|
exports.AceService = AceService;
|
|
@@ -25877,6 +25909,7 @@
|
|
|
25877
25909
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25878
25910
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25879
25911
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25912
|
+
exports.ɵo = RichTextService;
|
|
25880
25913
|
|
|
25881
25914
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25882
25915
|
|