@datorama/core 22.12.7 → 22.12.8-rc
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 +92 -49
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +31 -31
- 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 +9 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +20 -38
- package/esm2015/lib/rich-text/rich-text.service.js +50 -0
- package/esm2015/lib/select/select.component.js +4 -9
- 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 +9 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +20 -1
- package/esm5/lib/rich-text/rich-text.directive.js +21 -39
- package/esm5/lib/rich-text/rich-text.service.js +51 -0
- package/esm5/lib/select/select.component.js +4 -9
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +83 -49
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +92 -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-store/grid.service.d.ts +4 -0
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +3 -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 +2 -2
|
@@ -8873,9 +8873,8 @@
|
|
|
8873
8873
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8874
8874
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8875
8875
|
if (this.options) {
|
|
8876
|
-
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8877
8876
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8878
|
-
|
|
8877
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8879
8878
|
}
|
|
8880
8879
|
/** For later updates */
|
|
8881
8880
|
this.cdr.markForCheck();
|
|
@@ -9003,7 +9002,6 @@
|
|
|
9003
9002
|
};
|
|
9004
9003
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
9005
9004
|
var _this = this;
|
|
9006
|
-
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
9007
9005
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
9008
9006
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
9009
9007
|
/**
|
|
@@ -9013,7 +9011,7 @@
|
|
|
9013
9011
|
if (optionToRemove) {
|
|
9014
9012
|
optionToRemove.active = false;
|
|
9015
9013
|
}
|
|
9016
|
-
|
|
9014
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9017
9015
|
this.onChange(this._model);
|
|
9018
9016
|
this.cdr.markForCheck();
|
|
9019
9017
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9361,9 +9359,6 @@
|
|
|
9361
9359
|
if (!datoOption) {
|
|
9362
9360
|
return;
|
|
9363
9361
|
}
|
|
9364
|
-
var modelLength = this._model.length;
|
|
9365
|
-
var updateDisabled = this.limitSelectedTo &&
|
|
9366
|
-
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9367
9362
|
datoOption.active = !datoOption.active;
|
|
9368
9363
|
var rawOption = datoOption.option;
|
|
9369
9364
|
if (datoOption.active) {
|
|
@@ -9372,7 +9367,7 @@
|
|
|
9372
9367
|
else {
|
|
9373
9368
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9374
9369
|
}
|
|
9375
|
-
|
|
9370
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9376
9371
|
this.onChange(this._model);
|
|
9377
9372
|
this.cdr.markForCheck();
|
|
9378
9373
|
this.asyncUpdateDropdownPosition();
|
|
@@ -12108,7 +12103,7 @@
|
|
|
12108
12103
|
return contextActions;
|
|
12109
12104
|
}
|
|
12110
12105
|
|
|
12111
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12106
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12112
12107
|
|
|
12113
12108
|
var defaultEditableColumnRenderer = function (params) {
|
|
12114
12109
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14260,6 +14255,12 @@
|
|
|
14260
14255
|
? context
|
|
14261
14256
|
: deepmerge(this.gridRef.gridOptions.context || {}, context);
|
|
14262
14257
|
};
|
|
14258
|
+
GridService.prototype.updateGridActions = function () {
|
|
14259
|
+
this.updateGridActionsSubject.next(true);
|
|
14260
|
+
};
|
|
14261
|
+
GridService.prototype.getUpdateGridActionsStatus = function () {
|
|
14262
|
+
return this.updateGridActionsSubject.asObservable();
|
|
14263
|
+
};
|
|
14263
14264
|
/**
|
|
14264
14265
|
* @deprecated use selectRows instead
|
|
14265
14266
|
* @param row
|
|
@@ -14755,7 +14756,8 @@
|
|
|
14755
14756
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14756
14757
|
};
|
|
14757
14758
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14758
|
-
this.
|
|
14759
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14760
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14759
14761
|
};
|
|
14760
14762
|
/**
|
|
14761
14763
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15793,7 +15795,10 @@
|
|
|
15793
15795
|
.pipe(operators.switchMap(function () {
|
|
15794
15796
|
_this.gridOptions = _this.normalizeOptions();
|
|
15795
15797
|
agGrid.gridOptions = _this.gridOptions;
|
|
15796
|
-
var
|
|
15798
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15799
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15800
|
+
? rxjs.of(null)
|
|
15801
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15797
15802
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15798
15803
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15799
15804
|
.subscribe(function (_a) {
|
|
@@ -17088,6 +17093,19 @@
|
|
|
17088
17093
|
});
|
|
17089
17094
|
this.registerGroupListeners();
|
|
17090
17095
|
this.subscribeRowsSelectionData();
|
|
17096
|
+
this.subscribeUpdateGridActions();
|
|
17097
|
+
};
|
|
17098
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
17099
|
+
var _this = this;
|
|
17100
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
17101
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
17102
|
+
});
|
|
17103
|
+
};
|
|
17104
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
17105
|
+
var _this = this;
|
|
17106
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
17107
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
17108
|
+
});
|
|
17091
17109
|
};
|
|
17092
17110
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
17093
17111
|
if (isFunction(action.onClick)) {
|
|
@@ -17343,6 +17361,12 @@
|
|
|
17343
17361
|
_this.cdr.detectChanges();
|
|
17344
17362
|
});
|
|
17345
17363
|
};
|
|
17364
|
+
DatoGridV2ToolbarComponent.prototype.subscribeUpdateGridActions = function () {
|
|
17365
|
+
var _this = this;
|
|
17366
|
+
this.gridService.getUpdateGridActionsStatus().subscribe(function () {
|
|
17367
|
+
_this.initGridActions();
|
|
17368
|
+
});
|
|
17369
|
+
};
|
|
17346
17370
|
DatoGridV2ToolbarComponent.prototype.selectAllPages = function () {
|
|
17347
17371
|
if (this.gridQuery.isServerSide) {
|
|
17348
17372
|
this.gridService.setServerSidePagination({ selectAllRowsEnabled: true, excludedFromSelectAll: [] });
|
|
@@ -21576,6 +21600,40 @@
|
|
|
21576
21600
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21577
21601
|
*/
|
|
21578
21602
|
|
|
21603
|
+
var RichTextService = /** @class */ (function () {
|
|
21604
|
+
function RichTextService(http, config) {
|
|
21605
|
+
this.http = http;
|
|
21606
|
+
this.config = config;
|
|
21607
|
+
}
|
|
21608
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21609
|
+
if (!this.richTextScript$) {
|
|
21610
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21611
|
+
}
|
|
21612
|
+
return this.richTextScript$;
|
|
21613
|
+
};
|
|
21614
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21615
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21616
|
+
this.http
|
|
21617
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21618
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21619
|
+
this.http
|
|
21620
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21621
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21622
|
+
]).pipe(operators.shareReplay(1));
|
|
21623
|
+
};
|
|
21624
|
+
RichTextService.ctorParameters = function () { return [
|
|
21625
|
+
{ type: http.HttpClient },
|
|
21626
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21627
|
+
]; };
|
|
21628
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21629
|
+
RichTextService = __decorate([
|
|
21630
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21631
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21632
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21633
|
+
], RichTextService);
|
|
21634
|
+
return RichTextService;
|
|
21635
|
+
}());
|
|
21636
|
+
|
|
21579
21637
|
/**
|
|
21580
21638
|
* @license
|
|
21581
21639
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21589,20 +21647,20 @@
|
|
|
21589
21647
|
var ɵ0$3 = getTinymce;
|
|
21590
21648
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21591
21649
|
__extends(DatoRichTextDirective, _super);
|
|
21592
|
-
function DatoRichTextDirective(ngZone,
|
|
21650
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21593
21651
|
var _this = _super.call(this) || this;
|
|
21594
21652
|
_this.ngZone = ngZone;
|
|
21595
|
-
_this.
|
|
21596
|
-
_this.host = host;
|
|
21653
|
+
_this.richTextService = richTextService;
|
|
21597
21654
|
_this.config = config;
|
|
21655
|
+
_this.host = host;
|
|
21598
21656
|
_this.autocompleteOptions = {};
|
|
21599
21657
|
_this.forcePlainTextPasting = false;
|
|
21600
21658
|
_this.format = 'html';
|
|
21601
21659
|
_this.isOneLine = false;
|
|
21602
21660
|
_this.initialValue = '';
|
|
21603
|
-
_this.defaultPlugins = 'link fullscreen
|
|
21661
|
+
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21604
21662
|
_this.defaultToolbar = [
|
|
21605
|
-
'
|
|
21663
|
+
'fontfamily fontsize forecolor backcolor bold italic underline link',
|
|
21606
21664
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21607
21665
|
];
|
|
21608
21666
|
return _this;
|
|
@@ -21628,28 +21686,11 @@
|
|
|
21628
21686
|
base: this.config.paths.richText,
|
|
21629
21687
|
query: ''
|
|
21630
21688
|
};
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
}
|
|
21637
|
-
else {
|
|
21638
|
-
this.loadLib().subscribe(function (lib) {
|
|
21639
|
-
appendScript(lib, 'rich-text-editor');
|
|
21640
|
-
_this.init.call(_this);
|
|
21641
|
-
_this.loadAutoCompleteStyle();
|
|
21642
|
-
});
|
|
21643
|
-
}
|
|
21644
|
-
};
|
|
21645
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21646
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21647
|
-
};
|
|
21648
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21649
|
-
this.http
|
|
21650
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21651
|
-
.subscribe(function (style) {
|
|
21652
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21689
|
+
this.richTextService
|
|
21690
|
+
.getLib(appendScript, appendStyle)
|
|
21691
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21692
|
+
.subscribe(function () {
|
|
21693
|
+
_this.init.call(_this);
|
|
21653
21694
|
});
|
|
21654
21695
|
};
|
|
21655
21696
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21673,8 +21714,6 @@
|
|
|
21673
21714
|
target: this.host.nativeElement,
|
|
21674
21715
|
width: this.width || 600,
|
|
21675
21716
|
height: this.height || 300,
|
|
21676
|
-
force_br_newlines: true,
|
|
21677
|
-
force_p_newlines: false,
|
|
21678
21717
|
resize: 'both',
|
|
21679
21718
|
branding: false,
|
|
21680
21719
|
inline: this.inline,
|
|
@@ -21682,10 +21721,12 @@
|
|
|
21682
21721
|
readonly: this.disabled,
|
|
21683
21722
|
plugins: this.plugins || this.defaultPlugins,
|
|
21684
21723
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21685
|
-
|
|
21724
|
+
font_size_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21686
21725
|
min_width: 480,
|
|
21687
21726
|
menubar: false,
|
|
21688
21727
|
autocomplete: this.autocompleteOptions,
|
|
21728
|
+
suffix: '.min',
|
|
21729
|
+
skin: 'tinymce-5',
|
|
21689
21730
|
setup: function (editor) {
|
|
21690
21731
|
_this.editor = editor;
|
|
21691
21732
|
editor.on('init', function (e) {
|
|
@@ -21742,9 +21783,9 @@
|
|
|
21742
21783
|
var DatoRichTextDirective_1;
|
|
21743
21784
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21744
21785
|
{ type: core.NgZone },
|
|
21745
|
-
{ type:
|
|
21746
|
-
{ type: core.
|
|
21747
|
-
{ type:
|
|
21786
|
+
{ type: RichTextService },
|
|
21787
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21788
|
+
{ type: core.ElementRef }
|
|
21748
21789
|
]; };
|
|
21749
21790
|
__decorate([
|
|
21750
21791
|
core.Input(),
|
|
@@ -21810,10 +21851,9 @@
|
|
|
21810
21851
|
}
|
|
21811
21852
|
]
|
|
21812
21853
|
}),
|
|
21813
|
-
__param(
|
|
21854
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21814
21855
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21815
|
-
|
|
21816
|
-
core.ElementRef, Object])
|
|
21856
|
+
RichTextService, Object, core.ElementRef])
|
|
21817
21857
|
], DatoRichTextDirective);
|
|
21818
21858
|
return DatoRichTextDirective;
|
|
21819
21859
|
}(BaseCustomControl));
|
|
@@ -24336,7 +24376,9 @@
|
|
|
24336
24376
|
};
|
|
24337
24377
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24338
24378
|
var _this = this;
|
|
24339
|
-
this.headerControl.valueChanges
|
|
24379
|
+
this.headerControl.valueChanges
|
|
24380
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24381
|
+
.subscribe(function (res) {
|
|
24340
24382
|
_this.updateEditableText.emit(res);
|
|
24341
24383
|
_this.cdr.detectChanges();
|
|
24342
24384
|
});
|
|
@@ -25699,7 +25741,7 @@
|
|
|
25699
25741
|
};
|
|
25700
25742
|
}
|
|
25701
25743
|
|
|
25702
|
-
window.coreVersion = '22.
|
|
25744
|
+
window.coreVersion = '22.13.7-rc.';
|
|
25703
25745
|
|
|
25704
25746
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25705
25747
|
exports.AceService = AceService;
|
|
@@ -26143,6 +26185,7 @@
|
|
|
26143
26185
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
26144
26186
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
26145
26187
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
26188
|
+
exports.ɵo = RichTextService;
|
|
26146
26189
|
|
|
26147
26190
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
26148
26191
|
|