@datorama/core 22.9.2-rc.7 → 22.9.3
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 +61 -90
- 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-filter/grid-filter.component.js +2 -2
- 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/icon/icon.types.js +1 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +38 -20
- package/esm2015/lib/select/select.component.js +17 -14
- 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-filter/grid-filter.component.js +5 -2
- 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/icon/icon.types.js +1 -1
- package/esm5/lib/rich-text/rich-text.directive.js +39 -21
- package/esm5/lib/select/select.component.js +17 -14
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +58 -82
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +62 -90
- 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/icon/icon.types.d.ts +1 -1
- package/lib/rich-text/rich-text.directive.d.ts +6 -4
- package/package.json +1 -1
- 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
|
@@ -8748,8 +8748,9 @@
|
|
|
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;
|
|
8751
8752
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8752
|
-
|
|
8753
|
+
overTheLimit && this.updateDisabledState();
|
|
8753
8754
|
}
|
|
8754
8755
|
/** For later updates */
|
|
8755
8756
|
this.cdr.markForCheck();
|
|
@@ -8780,18 +8781,16 @@
|
|
|
8780
8781
|
});
|
|
8781
8782
|
this.datoOverlay.attach({ placement: this.placement }, this._dropdownClass);
|
|
8782
8783
|
this.toggle();
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
this._initialOpen = false;
|
|
8791
|
-
}
|
|
8792
|
-
if (this.limitSelectedTo) {
|
|
8784
|
+
/**
|
|
8785
|
+
* When we first open the dropdown we need to mark the
|
|
8786
|
+
* FormControl values as actives
|
|
8787
|
+
*/
|
|
8788
|
+
if (this.hasValue && this._initialOpen) {
|
|
8789
|
+
this.markAsActive(this._model);
|
|
8790
|
+
if (this.limitSelectedTo && this._model.length === this.limitSelectedTo) {
|
|
8793
8791
|
this.updateDisabledState();
|
|
8794
8792
|
}
|
|
8793
|
+
this._initialOpen = false;
|
|
8795
8794
|
}
|
|
8796
8795
|
if (this._withInfiniteScroll) {
|
|
8797
8796
|
this.activateInfiniteScroll();
|
|
@@ -8877,6 +8876,7 @@
|
|
|
8877
8876
|
};
|
|
8878
8877
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8879
8878
|
var _this = this;
|
|
8879
|
+
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8880
8880
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8881
8881
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8882
8882
|
/**
|
|
@@ -8886,7 +8886,7 @@
|
|
|
8886
8886
|
if (optionToRemove) {
|
|
8887
8887
|
optionToRemove.active = false;
|
|
8888
8888
|
}
|
|
8889
|
-
|
|
8889
|
+
updateDisabled && this.updateDisabledState();
|
|
8890
8890
|
this.onChange(this._model);
|
|
8891
8891
|
this.cdr.markForCheck();
|
|
8892
8892
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9234,6 +9234,9 @@
|
|
|
9234
9234
|
if (!datoOption) {
|
|
9235
9235
|
return;
|
|
9236
9236
|
}
|
|
9237
|
+
var modelLength = this._model.length;
|
|
9238
|
+
var updateDisabled = this.limitSelectedTo &&
|
|
9239
|
+
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9237
9240
|
datoOption.active = !datoOption.active;
|
|
9238
9241
|
var rawOption = datoOption.option;
|
|
9239
9242
|
if (datoOption.active) {
|
|
@@ -9242,7 +9245,7 @@
|
|
|
9242
9245
|
else {
|
|
9243
9246
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9244
9247
|
}
|
|
9245
|
-
|
|
9248
|
+
updateDisabled && this.updateDisabledState();
|
|
9246
9249
|
this.onChange(this._model);
|
|
9247
9250
|
this.cdr.markForCheck();
|
|
9248
9251
|
this.asyncUpdateDropdownPosition();
|
|
@@ -12047,7 +12050,7 @@
|
|
|
12047
12050
|
return contextActions;
|
|
12048
12051
|
}
|
|
12049
12052
|
|
|
12050
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12053
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12051
12054
|
|
|
12052
12055
|
var defaultEditableColumnRenderer = function (params) {
|
|
12053
12056
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -12943,7 +12946,10 @@
|
|
|
12943
12946
|
this.listOptions = rawValues.map(mapToListItem);
|
|
12944
12947
|
}
|
|
12945
12948
|
else {
|
|
12946
|
-
var columnValues = this.getColumnValues()
|
|
12949
|
+
var columnValues = this.getColumnValues().filter(function (_a) {
|
|
12950
|
+
var value = _a.value;
|
|
12951
|
+
return !isNil(value);
|
|
12952
|
+
});
|
|
12947
12953
|
this.columnValues = columnValues.map(function (_a) {
|
|
12948
12954
|
var value = _a.value;
|
|
12949
12955
|
return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
|
|
@@ -14576,8 +14582,7 @@
|
|
|
14576
14582
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14577
14583
|
};
|
|
14578
14584
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14579
|
-
|
|
14580
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14585
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14581
14586
|
};
|
|
14582
14587
|
/**
|
|
14583
14588
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15582,10 +15587,7 @@
|
|
|
15582
15587
|
.pipe(operators.switchMap(function () {
|
|
15583
15588
|
_this.gridOptions = _this.normalizeOptions();
|
|
15584
15589
|
agGrid.gridOptions = _this.gridOptions;
|
|
15585
|
-
var
|
|
15586
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15587
|
-
? rxjs.of(null)
|
|
15588
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15590
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15589
15591
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15590
15592
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15591
15593
|
.subscribe(function (_a) {
|
|
@@ -16867,18 +16869,6 @@
|
|
|
16867
16869
|
this.registerGroupListeners();
|
|
16868
16870
|
this.subscribeRowsSelectionData();
|
|
16869
16871
|
};
|
|
16870
|
-
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16871
|
-
var _this = this;
|
|
16872
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16873
|
-
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16874
|
-
});
|
|
16875
|
-
};
|
|
16876
|
-
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16877
|
-
var _this = this;
|
|
16878
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16879
|
-
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16880
|
-
});
|
|
16881
|
-
};
|
|
16882
16872
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16883
16873
|
if (isFunction(action.onClick)) {
|
|
16884
16874
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21354,40 +21344,6 @@
|
|
|
21354
21344
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21355
21345
|
*/
|
|
21356
21346
|
|
|
21357
|
-
var RichTextService = /** @class */ (function () {
|
|
21358
|
-
function RichTextService(http, config) {
|
|
21359
|
-
this.http = http;
|
|
21360
|
-
this.config = config;
|
|
21361
|
-
}
|
|
21362
|
-
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21363
|
-
if (!this.richTextScript$) {
|
|
21364
|
-
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21365
|
-
}
|
|
21366
|
-
return this.richTextScript$;
|
|
21367
|
-
};
|
|
21368
|
-
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21369
|
-
this.richTextScript$ = rxjs.combineLatest([
|
|
21370
|
-
this.http
|
|
21371
|
-
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21372
|
-
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21373
|
-
this.http
|
|
21374
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21375
|
-
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21376
|
-
]).pipe(operators.shareReplay(1));
|
|
21377
|
-
};
|
|
21378
|
-
RichTextService.ctorParameters = function () { return [
|
|
21379
|
-
{ type: http.HttpClient },
|
|
21380
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21381
|
-
]; };
|
|
21382
|
-
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21383
|
-
RichTextService = __decorate([
|
|
21384
|
-
core.Injectable({ providedIn: 'root' }),
|
|
21385
|
-
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21386
|
-
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21387
|
-
], RichTextService);
|
|
21388
|
-
return RichTextService;
|
|
21389
|
-
}());
|
|
21390
|
-
|
|
21391
21347
|
/**
|
|
21392
21348
|
* @license
|
|
21393
21349
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21401,20 +21357,20 @@
|
|
|
21401
21357
|
var ɵ0$3 = getTinymce;
|
|
21402
21358
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21403
21359
|
__extends(DatoRichTextDirective, _super);
|
|
21404
|
-
function DatoRichTextDirective(ngZone,
|
|
21360
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21405
21361
|
var _this = _super.call(this) || this;
|
|
21406
21362
|
_this.ngZone = ngZone;
|
|
21407
|
-
_this.
|
|
21408
|
-
_this.config = config;
|
|
21363
|
+
_this.http = http;
|
|
21409
21364
|
_this.host = host;
|
|
21365
|
+
_this.config = config;
|
|
21410
21366
|
_this.autocompleteOptions = {};
|
|
21411
21367
|
_this.forcePlainTextPasting = false;
|
|
21412
21368
|
_this.format = 'html';
|
|
21413
21369
|
_this.isOneLine = false;
|
|
21414
21370
|
_this.initialValue = '';
|
|
21415
|
-
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21371
|
+
_this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
|
|
21416
21372
|
_this.defaultToolbar = [
|
|
21417
|
-
'
|
|
21373
|
+
'fontselect fontsizeselect forecolor backcolor bold italic underline link',
|
|
21418
21374
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21419
21375
|
];
|
|
21420
21376
|
return _this;
|
|
@@ -21440,11 +21396,28 @@
|
|
|
21440
21396
|
base: this.config.paths.richText,
|
|
21441
21397
|
query: ''
|
|
21442
21398
|
};
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21399
|
+
/**
|
|
21400
|
+
* We support only one instance in load time
|
|
21401
|
+
*/
|
|
21402
|
+
if (window.tinymce) {
|
|
21403
|
+
this.init.call(this);
|
|
21404
|
+
}
|
|
21405
|
+
else {
|
|
21406
|
+
this.loadLib().subscribe(function (lib) {
|
|
21407
|
+
appendScript(lib, 'rich-text-editor');
|
|
21408
|
+
_this.init.call(_this);
|
|
21409
|
+
_this.loadAutoCompleteStyle();
|
|
21410
|
+
});
|
|
21411
|
+
}
|
|
21412
|
+
};
|
|
21413
|
+
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21414
|
+
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21415
|
+
};
|
|
21416
|
+
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21417
|
+
this.http
|
|
21418
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21419
|
+
.subscribe(function (style) {
|
|
21420
|
+
appendStyle(style, 'tinymce-autocomplete');
|
|
21448
21421
|
});
|
|
21449
21422
|
};
|
|
21450
21423
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21468,6 +21441,8 @@
|
|
|
21468
21441
|
target: this.host.nativeElement,
|
|
21469
21442
|
width: this.width || 600,
|
|
21470
21443
|
height: this.height || 300,
|
|
21444
|
+
force_br_newlines: true,
|
|
21445
|
+
force_p_newlines: false,
|
|
21471
21446
|
resize: 'both',
|
|
21472
21447
|
branding: false,
|
|
21473
21448
|
inline: this.inline,
|
|
@@ -21475,12 +21450,10 @@
|
|
|
21475
21450
|
readonly: this.disabled,
|
|
21476
21451
|
plugins: this.plugins || this.defaultPlugins,
|
|
21477
21452
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21478
|
-
|
|
21453
|
+
fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21479
21454
|
min_width: 480,
|
|
21480
21455
|
menubar: false,
|
|
21481
21456
|
autocomplete: this.autocompleteOptions,
|
|
21482
|
-
suffix: '.min',
|
|
21483
|
-
skin: 'tinymce-5',
|
|
21484
21457
|
setup: function (editor) {
|
|
21485
21458
|
_this.editor = editor;
|
|
21486
21459
|
editor.on('init', function (e) {
|
|
@@ -21537,9 +21510,9 @@
|
|
|
21537
21510
|
var DatoRichTextDirective_1;
|
|
21538
21511
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21539
21512
|
{ type: core.NgZone },
|
|
21540
|
-
{ type:
|
|
21541
|
-
{ type:
|
|
21542
|
-
{ type: core.
|
|
21513
|
+
{ type: http.HttpClient },
|
|
21514
|
+
{ type: core.ElementRef },
|
|
21515
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21543
21516
|
]; };
|
|
21544
21517
|
__decorate([
|
|
21545
21518
|
core.Input(),
|
|
@@ -21605,9 +21578,10 @@
|
|
|
21605
21578
|
}
|
|
21606
21579
|
]
|
|
21607
21580
|
}),
|
|
21608
|
-
__param(
|
|
21581
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21609
21582
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21610
|
-
|
|
21583
|
+
http.HttpClient,
|
|
21584
|
+
core.ElementRef, Object])
|
|
21611
21585
|
], DatoRichTextDirective);
|
|
21612
21586
|
return DatoRichTextDirective;
|
|
21613
21587
|
}(BaseCustomControl));
|
|
@@ -24130,9 +24104,7 @@
|
|
|
24130
24104
|
};
|
|
24131
24105
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24132
24106
|
var _this = this;
|
|
24133
|
-
this.headerControl.valueChanges
|
|
24134
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24135
|
-
.subscribe(function (res) {
|
|
24107
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24136
24108
|
_this.updateEditableText.emit(res);
|
|
24137
24109
|
_this.cdr.detectChanges();
|
|
24138
24110
|
});
|
|
@@ -25495,7 +25467,7 @@
|
|
|
25495
25467
|
};
|
|
25496
25468
|
}
|
|
25497
25469
|
|
|
25498
|
-
window.coreVersion = '22.
|
|
25470
|
+
window.coreVersion = '22.9.3';
|
|
25499
25471
|
|
|
25500
25472
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25501
25473
|
exports.AceService = AceService;
|
|
@@ -25937,7 +25909,6 @@
|
|
|
25937
25909
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25938
25910
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25939
25911
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25940
|
-
exports.ɵo = RichTextService;
|
|
25941
25912
|
|
|
25942
25913
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25943
25914
|
|