@datorama/core 22.12.8-rc → 22.12.8
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 +57 -86
- 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 +8 -8
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +4 -10
- package/esm2015/lib/rich-text/rich-text.directive.js +38 -20
- package/esm2015/lib/select/select.component.js +9 -4
- 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 +8 -8
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +4 -16
- package/esm5/lib/rich-text/rich-text.directive.js +39 -21
- package/esm5/lib/select/select.component.js +9 -4
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +57 -78
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +58 -86
- 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-store/grid.service.d.ts +3 -3
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +1 -3
- 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
|
@@ -8873,8 +8873,9 @@
|
|
|
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;
|
|
8876
8877
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8877
|
-
|
|
8878
|
+
overTheLimit && this.updateDisabledState();
|
|
8878
8879
|
}
|
|
8879
8880
|
/** For later updates */
|
|
8880
8881
|
this.cdr.markForCheck();
|
|
@@ -9002,6 +9003,7 @@
|
|
|
9002
9003
|
};
|
|
9003
9004
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
9004
9005
|
var _this = this;
|
|
9006
|
+
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
9005
9007
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
9006
9008
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
9007
9009
|
/**
|
|
@@ -9011,7 +9013,7 @@
|
|
|
9011
9013
|
if (optionToRemove) {
|
|
9012
9014
|
optionToRemove.active = false;
|
|
9013
9015
|
}
|
|
9014
|
-
|
|
9016
|
+
updateDisabled && this.updateDisabledState();
|
|
9015
9017
|
this.onChange(this._model);
|
|
9016
9018
|
this.cdr.markForCheck();
|
|
9017
9019
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9359,6 +9361,9 @@
|
|
|
9359
9361
|
if (!datoOption) {
|
|
9360
9362
|
return;
|
|
9361
9363
|
}
|
|
9364
|
+
var modelLength = this._model.length;
|
|
9365
|
+
var updateDisabled = this.limitSelectedTo &&
|
|
9366
|
+
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9362
9367
|
datoOption.active = !datoOption.active;
|
|
9363
9368
|
var rawOption = datoOption.option;
|
|
9364
9369
|
if (datoOption.active) {
|
|
@@ -9367,7 +9372,7 @@
|
|
|
9367
9372
|
else {
|
|
9368
9373
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9369
9374
|
}
|
|
9370
|
-
|
|
9375
|
+
updateDisabled && this.updateDisabledState();
|
|
9371
9376
|
this.onChange(this._model);
|
|
9372
9377
|
this.cdr.markForCheck();
|
|
9373
9378
|
this.asyncUpdateDropdownPosition();
|
|
@@ -12103,7 +12108,7 @@
|
|
|
12103
12108
|
return contextActions;
|
|
12104
12109
|
}
|
|
12105
12110
|
|
|
12106
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12111
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12107
12112
|
|
|
12108
12113
|
var defaultEditableColumnRenderer = function (params) {
|
|
12109
12114
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14223,6 +14228,7 @@
|
|
|
14223
14228
|
this.logger = logger;
|
|
14224
14229
|
this.treeConfig = defaultGridTreeLabel;
|
|
14225
14230
|
this.pageNumberToReturnAfterRefresh = -1;
|
|
14231
|
+
this.reloadGridActionsSubject = new rxjs.Subject();
|
|
14226
14232
|
this.CHECKBOX_SELECTION_COL_ID = 'grid-checkbox-selection';
|
|
14227
14233
|
}
|
|
14228
14234
|
Object.defineProperty(GridService.prototype, "treeData", {
|
|
@@ -14255,11 +14261,11 @@
|
|
|
14255
14261
|
? context
|
|
14256
14262
|
: deepmerge(this.gridRef.gridOptions.context || {}, context);
|
|
14257
14263
|
};
|
|
14258
|
-
GridService.prototype.
|
|
14259
|
-
this.
|
|
14264
|
+
GridService.prototype.reloadGridActions = function () {
|
|
14265
|
+
this.reloadGridActionsSubject.next();
|
|
14260
14266
|
};
|
|
14261
|
-
GridService.prototype.
|
|
14262
|
-
return this.
|
|
14267
|
+
GridService.prototype.onReloadGridActions = function () {
|
|
14268
|
+
return this.reloadGridActionsSubject.asObservable();
|
|
14263
14269
|
};
|
|
14264
14270
|
/**
|
|
14265
14271
|
* @deprecated use selectRows instead
|
|
@@ -14756,8 +14762,7 @@
|
|
|
14756
14762
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14757
14763
|
};
|
|
14758
14764
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14759
|
-
|
|
14760
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14765
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14761
14766
|
};
|
|
14762
14767
|
/**
|
|
14763
14768
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15795,10 +15800,7 @@
|
|
|
15795
15800
|
.pipe(operators.switchMap(function () {
|
|
15796
15801
|
_this.gridOptions = _this.normalizeOptions();
|
|
15797
15802
|
agGrid.gridOptions = _this.gridOptions;
|
|
15798
|
-
var
|
|
15799
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15800
|
-
? rxjs.of(null)
|
|
15801
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15803
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15802
15804
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15803
15805
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15804
15806
|
.subscribe(function (_a) {
|
|
@@ -17093,19 +17095,7 @@
|
|
|
17093
17095
|
});
|
|
17094
17096
|
this.registerGroupListeners();
|
|
17095
17097
|
this.subscribeRowsSelectionData();
|
|
17096
|
-
this.
|
|
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
|
-
});
|
|
17098
|
+
this.subscribeReloadGridActions();
|
|
17109
17099
|
};
|
|
17110
17100
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
17111
17101
|
if (isFunction(action.onClick)) {
|
|
@@ -17361,9 +17351,9 @@
|
|
|
17361
17351
|
_this.cdr.detectChanges();
|
|
17362
17352
|
});
|
|
17363
17353
|
};
|
|
17364
|
-
DatoGridV2ToolbarComponent.prototype.
|
|
17354
|
+
DatoGridV2ToolbarComponent.prototype.subscribeReloadGridActions = function () {
|
|
17365
17355
|
var _this = this;
|
|
17366
|
-
this.gridService.
|
|
17356
|
+
this.gridService.onReloadGridActions().subscribe(function () {
|
|
17367
17357
|
_this.initGridActions();
|
|
17368
17358
|
});
|
|
17369
17359
|
};
|
|
@@ -21600,40 +21590,6 @@
|
|
|
21600
21590
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21601
21591
|
*/
|
|
21602
21592
|
|
|
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
|
-
|
|
21637
21593
|
/**
|
|
21638
21594
|
* @license
|
|
21639
21595
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21647,20 +21603,20 @@
|
|
|
21647
21603
|
var ɵ0$3 = getTinymce;
|
|
21648
21604
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21649
21605
|
__extends(DatoRichTextDirective, _super);
|
|
21650
|
-
function DatoRichTextDirective(ngZone,
|
|
21606
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21651
21607
|
var _this = _super.call(this) || this;
|
|
21652
21608
|
_this.ngZone = ngZone;
|
|
21653
|
-
_this.
|
|
21654
|
-
_this.config = config;
|
|
21609
|
+
_this.http = http;
|
|
21655
21610
|
_this.host = host;
|
|
21611
|
+
_this.config = config;
|
|
21656
21612
|
_this.autocompleteOptions = {};
|
|
21657
21613
|
_this.forcePlainTextPasting = false;
|
|
21658
21614
|
_this.format = 'html';
|
|
21659
21615
|
_this.isOneLine = false;
|
|
21660
21616
|
_this.initialValue = '';
|
|
21661
|
-
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21617
|
+
_this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
|
|
21662
21618
|
_this.defaultToolbar = [
|
|
21663
|
-
'
|
|
21619
|
+
'fontselect fontsizeselect forecolor backcolor bold italic underline link',
|
|
21664
21620
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21665
21621
|
];
|
|
21666
21622
|
return _this;
|
|
@@ -21686,11 +21642,28 @@
|
|
|
21686
21642
|
base: this.config.paths.richText,
|
|
21687
21643
|
query: ''
|
|
21688
21644
|
};
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
|
|
21693
|
-
|
|
21645
|
+
/**
|
|
21646
|
+
* We support only one instance in load time
|
|
21647
|
+
*/
|
|
21648
|
+
if (window.tinymce) {
|
|
21649
|
+
this.init.call(this);
|
|
21650
|
+
}
|
|
21651
|
+
else {
|
|
21652
|
+
this.loadLib().subscribe(function (lib) {
|
|
21653
|
+
appendScript(lib, 'rich-text-editor');
|
|
21654
|
+
_this.init.call(_this);
|
|
21655
|
+
_this.loadAutoCompleteStyle();
|
|
21656
|
+
});
|
|
21657
|
+
}
|
|
21658
|
+
};
|
|
21659
|
+
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21660
|
+
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21661
|
+
};
|
|
21662
|
+
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21663
|
+
this.http
|
|
21664
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21665
|
+
.subscribe(function (style) {
|
|
21666
|
+
appendStyle(style, 'tinymce-autocomplete');
|
|
21694
21667
|
});
|
|
21695
21668
|
};
|
|
21696
21669
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21714,6 +21687,8 @@
|
|
|
21714
21687
|
target: this.host.nativeElement,
|
|
21715
21688
|
width: this.width || 600,
|
|
21716
21689
|
height: this.height || 300,
|
|
21690
|
+
force_br_newlines: true,
|
|
21691
|
+
force_p_newlines: false,
|
|
21717
21692
|
resize: 'both',
|
|
21718
21693
|
branding: false,
|
|
21719
21694
|
inline: this.inline,
|
|
@@ -21721,12 +21696,10 @@
|
|
|
21721
21696
|
readonly: this.disabled,
|
|
21722
21697
|
plugins: this.plugins || this.defaultPlugins,
|
|
21723
21698
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21724
|
-
|
|
21699
|
+
fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21725
21700
|
min_width: 480,
|
|
21726
21701
|
menubar: false,
|
|
21727
21702
|
autocomplete: this.autocompleteOptions,
|
|
21728
|
-
suffix: '.min',
|
|
21729
|
-
skin: 'tinymce-5',
|
|
21730
21703
|
setup: function (editor) {
|
|
21731
21704
|
_this.editor = editor;
|
|
21732
21705
|
editor.on('init', function (e) {
|
|
@@ -21783,9 +21756,9 @@
|
|
|
21783
21756
|
var DatoRichTextDirective_1;
|
|
21784
21757
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21785
21758
|
{ type: core.NgZone },
|
|
21786
|
-
{ type:
|
|
21787
|
-
{ type:
|
|
21788
|
-
{ type: core.
|
|
21759
|
+
{ type: http.HttpClient },
|
|
21760
|
+
{ type: core.ElementRef },
|
|
21761
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21789
21762
|
]; };
|
|
21790
21763
|
__decorate([
|
|
21791
21764
|
core.Input(),
|
|
@@ -21851,9 +21824,10 @@
|
|
|
21851
21824
|
}
|
|
21852
21825
|
]
|
|
21853
21826
|
}),
|
|
21854
|
-
__param(
|
|
21827
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21855
21828
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21856
|
-
|
|
21829
|
+
http.HttpClient,
|
|
21830
|
+
core.ElementRef, Object])
|
|
21857
21831
|
], DatoRichTextDirective);
|
|
21858
21832
|
return DatoRichTextDirective;
|
|
21859
21833
|
}(BaseCustomControl));
|
|
@@ -24376,9 +24350,7 @@
|
|
|
24376
24350
|
};
|
|
24377
24351
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24378
24352
|
var _this = this;
|
|
24379
|
-
this.headerControl.valueChanges
|
|
24380
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24381
|
-
.subscribe(function (res) {
|
|
24353
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24382
24354
|
_this.updateEditableText.emit(res);
|
|
24383
24355
|
_this.cdr.detectChanges();
|
|
24384
24356
|
});
|
|
@@ -25741,7 +25713,7 @@
|
|
|
25741
25713
|
};
|
|
25742
25714
|
}
|
|
25743
25715
|
|
|
25744
|
-
window.coreVersion = '22.
|
|
25716
|
+
window.coreVersion = '22.12.8';
|
|
25745
25717
|
|
|
25746
25718
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25747
25719
|
exports.AceService = AceService;
|
|
@@ -26185,7 +26157,6 @@
|
|
|
26185
26157
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
26186
26158
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
26187
26159
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
26188
|
-
exports.ɵo = RichTextService;
|
|
26189
26160
|
|
|
26190
26161
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
26191
26162
|
|