@datorama/core 22.8.2 → 22.9.2-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 +79 -47
- 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 +3 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +19 -35
- 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 +3 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
- package/esm5/lib/rich-text/rich-text.directive.js +20 -36
- 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 +71 -47
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +79 -48
- 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();
|
|
@@ -12050,7 +12045,7 @@
|
|
|
12050
12045
|
return contextActions;
|
|
12051
12046
|
}
|
|
12052
12047
|
|
|
12053
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12048
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12054
12049
|
|
|
12055
12050
|
var defaultEditableColumnRenderer = function (params) {
|
|
12056
12051
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14559,7 +14554,8 @@
|
|
|
14559
14554
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14560
14555
|
};
|
|
14561
14556
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14562
|
-
this.
|
|
14557
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14558
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14563
14559
|
};
|
|
14564
14560
|
/**
|
|
14565
14561
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15564,7 +15560,10 @@
|
|
|
15564
15560
|
.pipe(operators.switchMap(function () {
|
|
15565
15561
|
_this.gridOptions = _this.normalizeOptions();
|
|
15566
15562
|
agGrid.gridOptions = _this.gridOptions;
|
|
15567
|
-
var
|
|
15563
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15564
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15565
|
+
? rxjs.of(null)
|
|
15566
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15568
15567
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15569
15568
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15570
15569
|
.subscribe(function (_a) {
|
|
@@ -16846,6 +16845,18 @@
|
|
|
16846
16845
|
this.registerGroupListeners();
|
|
16847
16846
|
this.subscribeRowsSelectionData();
|
|
16848
16847
|
};
|
|
16848
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16849
|
+
var _this = this;
|
|
16850
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16851
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16852
|
+
});
|
|
16853
|
+
};
|
|
16854
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16855
|
+
var _this = this;
|
|
16856
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16857
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16858
|
+
});
|
|
16859
|
+
};
|
|
16849
16860
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16850
16861
|
if (isFunction(action.onClick)) {
|
|
16851
16862
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21321,6 +21332,40 @@
|
|
|
21321
21332
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21322
21333
|
*/
|
|
21323
21334
|
|
|
21335
|
+
var RichTextService = /** @class */ (function () {
|
|
21336
|
+
function RichTextService(http, config) {
|
|
21337
|
+
this.http = http;
|
|
21338
|
+
this.config = config;
|
|
21339
|
+
}
|
|
21340
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21341
|
+
if (!this.richTextScript$) {
|
|
21342
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21343
|
+
}
|
|
21344
|
+
return this.richTextScript$;
|
|
21345
|
+
};
|
|
21346
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21347
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21348
|
+
this.http
|
|
21349
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21350
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21351
|
+
this.http
|
|
21352
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21353
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21354
|
+
]).pipe(operators.shareReplay(1));
|
|
21355
|
+
};
|
|
21356
|
+
RichTextService.ctorParameters = function () { return [
|
|
21357
|
+
{ type: http.HttpClient },
|
|
21358
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21359
|
+
]; };
|
|
21360
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21361
|
+
RichTextService = __decorate([
|
|
21362
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21363
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21364
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21365
|
+
], RichTextService);
|
|
21366
|
+
return RichTextService;
|
|
21367
|
+
}());
|
|
21368
|
+
|
|
21324
21369
|
/**
|
|
21325
21370
|
* @license
|
|
21326
21371
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21334,20 +21379,20 @@
|
|
|
21334
21379
|
var ɵ0$3 = getTinymce;
|
|
21335
21380
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21336
21381
|
__extends(DatoRichTextDirective, _super);
|
|
21337
|
-
function DatoRichTextDirective(ngZone,
|
|
21382
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21338
21383
|
var _this = _super.call(this) || this;
|
|
21339
21384
|
_this.ngZone = ngZone;
|
|
21340
|
-
_this.
|
|
21341
|
-
_this.host = host;
|
|
21385
|
+
_this.richTextService = richTextService;
|
|
21342
21386
|
_this.config = config;
|
|
21387
|
+
_this.host = host;
|
|
21343
21388
|
_this.autocompleteOptions = {};
|
|
21344
21389
|
_this.forcePlainTextPasting = false;
|
|
21345
21390
|
_this.format = 'html';
|
|
21346
21391
|
_this.isOneLine = false;
|
|
21347
21392
|
_this.initialValue = '';
|
|
21348
|
-
_this.defaultPlugins = 'link fullscreen
|
|
21393
|
+
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21349
21394
|
_this.defaultToolbar = [
|
|
21350
|
-
'
|
|
21395
|
+
'fontfamily fontsize forecolor backcolor bold italic underline link',
|
|
21351
21396
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21352
21397
|
];
|
|
21353
21398
|
return _this;
|
|
@@ -21373,28 +21418,11 @@
|
|
|
21373
21418
|
base: this.config.paths.richText,
|
|
21374
21419
|
query: ''
|
|
21375
21420
|
};
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
|
|
21379
|
-
|
|
21380
|
-
|
|
21381
|
-
}
|
|
21382
|
-
else {
|
|
21383
|
-
this.loadLib().subscribe(function (lib) {
|
|
21384
|
-
appendScript(lib, 'rich-text-editor');
|
|
21385
|
-
_this.init.call(_this);
|
|
21386
|
-
_this.loadAutoCompleteStyle();
|
|
21387
|
-
});
|
|
21388
|
-
}
|
|
21389
|
-
};
|
|
21390
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21391
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21392
|
-
};
|
|
21393
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21394
|
-
this.http
|
|
21395
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21396
|
-
.subscribe(function (style) {
|
|
21397
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21421
|
+
this.richTextService
|
|
21422
|
+
.getLib(appendScript, appendStyle)
|
|
21423
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21424
|
+
.subscribe(function () {
|
|
21425
|
+
_this.init.call(_this);
|
|
21398
21426
|
});
|
|
21399
21427
|
};
|
|
21400
21428
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21431,6 +21459,8 @@
|
|
|
21431
21459
|
min_width: 480,
|
|
21432
21460
|
menubar: false,
|
|
21433
21461
|
autocomplete: this.autocompleteOptions,
|
|
21462
|
+
suffix: '.min',
|
|
21463
|
+
skin: 'tinymce-5',
|
|
21434
21464
|
setup: function (editor) {
|
|
21435
21465
|
_this.editor = editor;
|
|
21436
21466
|
editor.on('init', function (e) {
|
|
@@ -21487,9 +21517,9 @@
|
|
|
21487
21517
|
var DatoRichTextDirective_1;
|
|
21488
21518
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21489
21519
|
{ type: core.NgZone },
|
|
21490
|
-
{ type:
|
|
21491
|
-
{ type: core.
|
|
21492
|
-
{ type:
|
|
21520
|
+
{ type: RichTextService },
|
|
21521
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21522
|
+
{ type: core.ElementRef }
|
|
21493
21523
|
]; };
|
|
21494
21524
|
__decorate([
|
|
21495
21525
|
core.Input(),
|
|
@@ -21555,10 +21585,9 @@
|
|
|
21555
21585
|
}
|
|
21556
21586
|
]
|
|
21557
21587
|
}),
|
|
21558
|
-
__param(
|
|
21588
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21559
21589
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21560
|
-
|
|
21561
|
-
core.ElementRef, Object])
|
|
21590
|
+
RichTextService, Object, core.ElementRef])
|
|
21562
21591
|
], DatoRichTextDirective);
|
|
21563
21592
|
return DatoRichTextDirective;
|
|
21564
21593
|
}(BaseCustomControl));
|
|
@@ -24081,7 +24110,9 @@
|
|
|
24081
24110
|
};
|
|
24082
24111
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24083
24112
|
var _this = this;
|
|
24084
|
-
this.headerControl.valueChanges
|
|
24113
|
+
this.headerControl.valueChanges
|
|
24114
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24115
|
+
.subscribe(function (res) {
|
|
24085
24116
|
_this.updateEditableText.emit(res);
|
|
24086
24117
|
_this.cdr.detectChanges();
|
|
24087
24118
|
});
|
|
@@ -25444,7 +25475,7 @@
|
|
|
25444
25475
|
};
|
|
25445
25476
|
}
|
|
25446
25477
|
|
|
25447
|
-
window.coreVersion = '22.
|
|
25478
|
+
window.coreVersion = '22.9.2-rc.';
|
|
25448
25479
|
|
|
25449
25480
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25450
25481
|
exports.AceService = AceService;
|
|
@@ -25886,6 +25917,7 @@
|
|
|
25886
25917
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25887
25918
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25888
25919
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25920
|
+
exports.ɵo = RichTextService;
|
|
25889
25921
|
|
|
25890
25922
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25891
25923
|
|