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