@datorama/core 22.12.3-rc.3 → 22.12.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 +49 -79
- 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 +2 -3
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
- 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 +2 -3
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
- 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 +49 -71
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +50 -79
- 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/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();
|
|
@@ -12100,7 +12105,7 @@
|
|
|
12100
12105
|
return contextActions;
|
|
12101
12106
|
}
|
|
12102
12107
|
|
|
12103
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12108
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12104
12109
|
|
|
12105
12110
|
var defaultEditableColumnRenderer = function (params) {
|
|
12106
12111
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14762,8 +14767,7 @@
|
|
|
14762
14767
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14763
14768
|
};
|
|
14764
14769
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14765
|
-
|
|
14766
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14770
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14767
14771
|
};
|
|
14768
14772
|
/**
|
|
14769
14773
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15773,10 +15777,7 @@
|
|
|
15773
15777
|
.pipe(operators.switchMap(function () {
|
|
15774
15778
|
_this.gridOptions = _this.normalizeOptions();
|
|
15775
15779
|
agGrid.gridOptions = _this.gridOptions;
|
|
15776
|
-
var
|
|
15777
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15778
|
-
? rxjs.of(null)
|
|
15779
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15780
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15780
15781
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15781
15782
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15782
15783
|
.subscribe(function (_a) {
|
|
@@ -17071,18 +17072,6 @@
|
|
|
17071
17072
|
this.registerGroupListeners();
|
|
17072
17073
|
this.subscribeRowsSelectionData();
|
|
17073
17074
|
};
|
|
17074
|
-
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
17075
|
-
var _this = this;
|
|
17076
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
17077
|
-
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
17078
|
-
});
|
|
17079
|
-
};
|
|
17080
|
-
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
17081
|
-
var _this = this;
|
|
17082
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
17083
|
-
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
17084
|
-
});
|
|
17085
|
-
};
|
|
17086
17075
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
17087
17076
|
if (isFunction(action.onClick)) {
|
|
17088
17077
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21570,40 +21559,6 @@
|
|
|
21570
21559
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21571
21560
|
*/
|
|
21572
21561
|
|
|
21573
|
-
var RichTextService = /** @class */ (function () {
|
|
21574
|
-
function RichTextService(http, config) {
|
|
21575
|
-
this.http = http;
|
|
21576
|
-
this.config = config;
|
|
21577
|
-
}
|
|
21578
|
-
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21579
|
-
if (!this.richTextScript$) {
|
|
21580
|
-
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21581
|
-
}
|
|
21582
|
-
return this.richTextScript$;
|
|
21583
|
-
};
|
|
21584
|
-
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21585
|
-
this.richTextScript$ = rxjs.combineLatest([
|
|
21586
|
-
this.http
|
|
21587
|
-
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21588
|
-
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21589
|
-
this.http
|
|
21590
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21591
|
-
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21592
|
-
]).pipe(operators.shareReplay(1));
|
|
21593
|
-
};
|
|
21594
|
-
RichTextService.ctorParameters = function () { return [
|
|
21595
|
-
{ type: http.HttpClient },
|
|
21596
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21597
|
-
]; };
|
|
21598
|
-
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21599
|
-
RichTextService = __decorate([
|
|
21600
|
-
core.Injectable({ providedIn: 'root' }),
|
|
21601
|
-
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21602
|
-
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21603
|
-
], RichTextService);
|
|
21604
|
-
return RichTextService;
|
|
21605
|
-
}());
|
|
21606
|
-
|
|
21607
21562
|
/**
|
|
21608
21563
|
* @license
|
|
21609
21564
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21617,20 +21572,20 @@
|
|
|
21617
21572
|
var ɵ0$3 = getTinymce;
|
|
21618
21573
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21619
21574
|
__extends(DatoRichTextDirective, _super);
|
|
21620
|
-
function DatoRichTextDirective(ngZone,
|
|
21575
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21621
21576
|
var _this = _super.call(this) || this;
|
|
21622
21577
|
_this.ngZone = ngZone;
|
|
21623
|
-
_this.
|
|
21624
|
-
_this.config = config;
|
|
21578
|
+
_this.http = http;
|
|
21625
21579
|
_this.host = host;
|
|
21580
|
+
_this.config = config;
|
|
21626
21581
|
_this.autocompleteOptions = {};
|
|
21627
21582
|
_this.forcePlainTextPasting = false;
|
|
21628
21583
|
_this.format = 'html';
|
|
21629
21584
|
_this.isOneLine = false;
|
|
21630
21585
|
_this.initialValue = '';
|
|
21631
|
-
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21586
|
+
_this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
|
|
21632
21587
|
_this.defaultToolbar = [
|
|
21633
|
-
'
|
|
21588
|
+
'fontselect fontsizeselect forecolor backcolor bold italic underline link',
|
|
21634
21589
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21635
21590
|
];
|
|
21636
21591
|
return _this;
|
|
@@ -21656,11 +21611,28 @@
|
|
|
21656
21611
|
base: this.config.paths.richText,
|
|
21657
21612
|
query: ''
|
|
21658
21613
|
};
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21614
|
+
/**
|
|
21615
|
+
* We support only one instance in load time
|
|
21616
|
+
*/
|
|
21617
|
+
if (window.tinymce) {
|
|
21618
|
+
this.init.call(this);
|
|
21619
|
+
}
|
|
21620
|
+
else {
|
|
21621
|
+
this.loadLib().subscribe(function (lib) {
|
|
21622
|
+
appendScript(lib, 'rich-text-editor');
|
|
21623
|
+
_this.init.call(_this);
|
|
21624
|
+
_this.loadAutoCompleteStyle();
|
|
21625
|
+
});
|
|
21626
|
+
}
|
|
21627
|
+
};
|
|
21628
|
+
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21629
|
+
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21630
|
+
};
|
|
21631
|
+
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21632
|
+
this.http
|
|
21633
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21634
|
+
.subscribe(function (style) {
|
|
21635
|
+
appendStyle(style, 'tinymce-autocomplete');
|
|
21664
21636
|
});
|
|
21665
21637
|
};
|
|
21666
21638
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21684,6 +21656,8 @@
|
|
|
21684
21656
|
target: this.host.nativeElement,
|
|
21685
21657
|
width: this.width || 600,
|
|
21686
21658
|
height: this.height || 300,
|
|
21659
|
+
force_br_newlines: true,
|
|
21660
|
+
force_p_newlines: false,
|
|
21687
21661
|
resize: 'both',
|
|
21688
21662
|
branding: false,
|
|
21689
21663
|
inline: this.inline,
|
|
@@ -21691,12 +21665,10 @@
|
|
|
21691
21665
|
readonly: this.disabled,
|
|
21692
21666
|
plugins: this.plugins || this.defaultPlugins,
|
|
21693
21667
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21694
|
-
|
|
21668
|
+
fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21695
21669
|
min_width: 480,
|
|
21696
21670
|
menubar: false,
|
|
21697
21671
|
autocomplete: this.autocompleteOptions,
|
|
21698
|
-
suffix: '.min',
|
|
21699
|
-
skin: 'tinymce-5',
|
|
21700
21672
|
setup: function (editor) {
|
|
21701
21673
|
_this.editor = editor;
|
|
21702
21674
|
editor.on('init', function (e) {
|
|
@@ -21753,9 +21725,9 @@
|
|
|
21753
21725
|
var DatoRichTextDirective_1;
|
|
21754
21726
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21755
21727
|
{ type: core.NgZone },
|
|
21756
|
-
{ type:
|
|
21757
|
-
{ type:
|
|
21758
|
-
{ type: core.
|
|
21728
|
+
{ type: http.HttpClient },
|
|
21729
|
+
{ type: core.ElementRef },
|
|
21730
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21759
21731
|
]; };
|
|
21760
21732
|
__decorate([
|
|
21761
21733
|
core.Input(),
|
|
@@ -21821,9 +21793,10 @@
|
|
|
21821
21793
|
}
|
|
21822
21794
|
]
|
|
21823
21795
|
}),
|
|
21824
|
-
__param(
|
|
21796
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21825
21797
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21826
|
-
|
|
21798
|
+
http.HttpClient,
|
|
21799
|
+
core.ElementRef, Object])
|
|
21827
21800
|
], DatoRichTextDirective);
|
|
21828
21801
|
return DatoRichTextDirective;
|
|
21829
21802
|
}(BaseCustomControl));
|
|
@@ -24346,9 +24319,7 @@
|
|
|
24346
24319
|
};
|
|
24347
24320
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24348
24321
|
var _this = this;
|
|
24349
|
-
this.headerControl.valueChanges
|
|
24350
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24351
|
-
.subscribe(function (res) {
|
|
24322
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24352
24323
|
_this.updateEditableText.emit(res);
|
|
24353
24324
|
_this.cdr.detectChanges();
|
|
24354
24325
|
});
|
|
@@ -25711,7 +25682,7 @@
|
|
|
25711
25682
|
};
|
|
25712
25683
|
}
|
|
25713
25684
|
|
|
25714
|
-
window.coreVersion = '22.
|
|
25685
|
+
window.coreVersion = '22.12.3';
|
|
25715
25686
|
|
|
25716
25687
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25717
25688
|
exports.AceService = AceService;
|
|
@@ -26155,7 +26126,6 @@
|
|
|
26155
26126
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
26156
26127
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
26157
26128
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
26158
|
-
exports.ɵo = RichTextService;
|
|
26159
26129
|
|
|
26160
26130
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
26161
26131
|
|