@datorama/core 22.12.2 → 22.12.3-rc.1
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 +81 -51
- 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 +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 +3 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
- package/esm2015/lib/progress-bar/progress-bar.component.js +3 -3
- 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 +3 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
- package/esm5/lib/progress-bar/progress-bar.component.js +3 -3
- 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 +73 -51
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +81 -52
- 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-toolbar/grid-toolbar.component.d.ts +2 -0
- package/lib/progress-bar/progress-bar.component.d.ts +1 -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
|
@@ -8833,9 +8833,8 @@
|
|
|
8833
8833
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8834
8834
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8835
8835
|
if (this.options) {
|
|
8836
|
-
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8837
8836
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8838
|
-
|
|
8837
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8839
8838
|
}
|
|
8840
8839
|
/** For later updates */
|
|
8841
8840
|
this.cdr.markForCheck();
|
|
@@ -8963,7 +8962,6 @@
|
|
|
8963
8962
|
};
|
|
8964
8963
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8965
8964
|
var _this = this;
|
|
8966
|
-
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8967
8965
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8968
8966
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8969
8967
|
/**
|
|
@@ -8973,7 +8971,7 @@
|
|
|
8973
8971
|
if (optionToRemove) {
|
|
8974
8972
|
optionToRemove.active = false;
|
|
8975
8973
|
}
|
|
8976
|
-
|
|
8974
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8977
8975
|
this.onChange(this._model);
|
|
8978
8976
|
this.cdr.markForCheck();
|
|
8979
8977
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9321,9 +9319,6 @@
|
|
|
9321
9319
|
if (!datoOption) {
|
|
9322
9320
|
return;
|
|
9323
9321
|
}
|
|
9324
|
-
var modelLength = this._model.length;
|
|
9325
|
-
var updateDisabled = this.limitSelectedTo &&
|
|
9326
|
-
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9327
9322
|
datoOption.active = !datoOption.active;
|
|
9328
9323
|
var rawOption = datoOption.option;
|
|
9329
9324
|
if (datoOption.active) {
|
|
@@ -9332,7 +9327,7 @@
|
|
|
9332
9327
|
else {
|
|
9333
9328
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9334
9329
|
}
|
|
9335
|
-
|
|
9330
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9336
9331
|
this.onChange(this._model);
|
|
9337
9332
|
this.cdr.markForCheck();
|
|
9338
9333
|
this.asyncUpdateDropdownPosition();
|
|
@@ -12065,7 +12060,7 @@
|
|
|
12065
12060
|
return contextActions;
|
|
12066
12061
|
}
|
|
12067
12062
|
|
|
12068
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12063
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12069
12064
|
|
|
12070
12065
|
var defaultEditableColumnRenderer = function (params) {
|
|
12071
12066
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14727,7 +14722,8 @@
|
|
|
14727
14722
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14728
14723
|
};
|
|
14729
14724
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14730
|
-
this.
|
|
14725
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14726
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14731
14727
|
};
|
|
14732
14728
|
/**
|
|
14733
14729
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15737,7 +15733,10 @@
|
|
|
15737
15733
|
.pipe(operators.switchMap(function () {
|
|
15738
15734
|
_this.gridOptions = _this.normalizeOptions();
|
|
15739
15735
|
agGrid.gridOptions = _this.gridOptions;
|
|
15740
|
-
var
|
|
15736
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15737
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15738
|
+
? rxjs.of(null)
|
|
15739
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15741
15740
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15742
15741
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15743
15742
|
.subscribe(function (_a) {
|
|
@@ -17032,6 +17031,18 @@
|
|
|
17032
17031
|
this.registerGroupListeners();
|
|
17033
17032
|
this.subscribeRowsSelectionData();
|
|
17034
17033
|
};
|
|
17034
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
17035
|
+
var _this = this;
|
|
17036
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
17037
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
17038
|
+
});
|
|
17039
|
+
};
|
|
17040
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
17041
|
+
var _this = this;
|
|
17042
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
17043
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
17044
|
+
});
|
|
17045
|
+
};
|
|
17035
17046
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
17036
17047
|
if (isFunction(action.onClick)) {
|
|
17037
17048
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21519,6 +21530,40 @@
|
|
|
21519
21530
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21520
21531
|
*/
|
|
21521
21532
|
|
|
21533
|
+
var RichTextService = /** @class */ (function () {
|
|
21534
|
+
function RichTextService(http, config) {
|
|
21535
|
+
this.http = http;
|
|
21536
|
+
this.config = config;
|
|
21537
|
+
}
|
|
21538
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21539
|
+
if (!this.richTextScript$) {
|
|
21540
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21541
|
+
}
|
|
21542
|
+
return this.richTextScript$;
|
|
21543
|
+
};
|
|
21544
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21545
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21546
|
+
this.http
|
|
21547
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21548
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21549
|
+
this.http
|
|
21550
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21551
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21552
|
+
]).pipe(operators.shareReplay(1));
|
|
21553
|
+
};
|
|
21554
|
+
RichTextService.ctorParameters = function () { return [
|
|
21555
|
+
{ type: http.HttpClient },
|
|
21556
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21557
|
+
]; };
|
|
21558
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21559
|
+
RichTextService = __decorate([
|
|
21560
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21561
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21562
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21563
|
+
], RichTextService);
|
|
21564
|
+
return RichTextService;
|
|
21565
|
+
}());
|
|
21566
|
+
|
|
21522
21567
|
/**
|
|
21523
21568
|
* @license
|
|
21524
21569
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21532,20 +21577,20 @@
|
|
|
21532
21577
|
var ɵ0$3 = getTinymce;
|
|
21533
21578
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21534
21579
|
__extends(DatoRichTextDirective, _super);
|
|
21535
|
-
function DatoRichTextDirective(ngZone,
|
|
21580
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21536
21581
|
var _this = _super.call(this) || this;
|
|
21537
21582
|
_this.ngZone = ngZone;
|
|
21538
|
-
_this.
|
|
21539
|
-
_this.host = host;
|
|
21583
|
+
_this.richTextService = richTextService;
|
|
21540
21584
|
_this.config = config;
|
|
21585
|
+
_this.host = host;
|
|
21541
21586
|
_this.autocompleteOptions = {};
|
|
21542
21587
|
_this.forcePlainTextPasting = false;
|
|
21543
21588
|
_this.format = 'html';
|
|
21544
21589
|
_this.isOneLine = false;
|
|
21545
21590
|
_this.initialValue = '';
|
|
21546
|
-
_this.defaultPlugins = 'link fullscreen
|
|
21591
|
+
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21547
21592
|
_this.defaultToolbar = [
|
|
21548
|
-
'
|
|
21593
|
+
'fontfamily fontsize forecolor backcolor bold italic underline link',
|
|
21549
21594
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21550
21595
|
];
|
|
21551
21596
|
return _this;
|
|
@@ -21571,28 +21616,11 @@
|
|
|
21571
21616
|
base: this.config.paths.richText,
|
|
21572
21617
|
query: ''
|
|
21573
21618
|
};
|
|
21574
|
-
|
|
21575
|
-
|
|
21576
|
-
|
|
21577
|
-
|
|
21578
|
-
|
|
21579
|
-
}
|
|
21580
|
-
else {
|
|
21581
|
-
this.loadLib().subscribe(function (lib) {
|
|
21582
|
-
appendScript(lib, 'rich-text-editor');
|
|
21583
|
-
_this.init.call(_this);
|
|
21584
|
-
_this.loadAutoCompleteStyle();
|
|
21585
|
-
});
|
|
21586
|
-
}
|
|
21587
|
-
};
|
|
21588
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21589
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21590
|
-
};
|
|
21591
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21592
|
-
this.http
|
|
21593
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21594
|
-
.subscribe(function (style) {
|
|
21595
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21619
|
+
this.richTextService
|
|
21620
|
+
.getLib(appendScript, appendStyle)
|
|
21621
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21622
|
+
.subscribe(function () {
|
|
21623
|
+
_this.init.call(_this);
|
|
21596
21624
|
});
|
|
21597
21625
|
};
|
|
21598
21626
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21616,8 +21644,6 @@
|
|
|
21616
21644
|
target: this.host.nativeElement,
|
|
21617
21645
|
width: this.width || 600,
|
|
21618
21646
|
height: this.height || 300,
|
|
21619
|
-
force_br_newlines: true,
|
|
21620
|
-
force_p_newlines: false,
|
|
21621
21647
|
resize: 'both',
|
|
21622
21648
|
branding: false,
|
|
21623
21649
|
inline: this.inline,
|
|
@@ -21625,10 +21651,12 @@
|
|
|
21625
21651
|
readonly: this.disabled,
|
|
21626
21652
|
plugins: this.plugins || this.defaultPlugins,
|
|
21627
21653
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21628
|
-
|
|
21654
|
+
font_size_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21629
21655
|
min_width: 480,
|
|
21630
21656
|
menubar: false,
|
|
21631
21657
|
autocomplete: this.autocompleteOptions,
|
|
21658
|
+
suffix: '.min',
|
|
21659
|
+
skin: 'tinymce-5',
|
|
21632
21660
|
setup: function (editor) {
|
|
21633
21661
|
_this.editor = editor;
|
|
21634
21662
|
editor.on('init', function (e) {
|
|
@@ -21685,9 +21713,9 @@
|
|
|
21685
21713
|
var DatoRichTextDirective_1;
|
|
21686
21714
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21687
21715
|
{ type: core.NgZone },
|
|
21688
|
-
{ type:
|
|
21689
|
-
{ type: core.
|
|
21690
|
-
{ type:
|
|
21716
|
+
{ type: RichTextService },
|
|
21717
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21718
|
+
{ type: core.ElementRef }
|
|
21691
21719
|
]; };
|
|
21692
21720
|
__decorate([
|
|
21693
21721
|
core.Input(),
|
|
@@ -21753,10 +21781,9 @@
|
|
|
21753
21781
|
}
|
|
21754
21782
|
]
|
|
21755
21783
|
}),
|
|
21756
|
-
__param(
|
|
21784
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21757
21785
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21758
|
-
|
|
21759
|
-
core.ElementRef, Object])
|
|
21786
|
+
RichTextService, Object, core.ElementRef])
|
|
21760
21787
|
], DatoRichTextDirective);
|
|
21761
21788
|
return DatoRichTextDirective;
|
|
21762
21789
|
}(BaseCustomControl));
|
|
@@ -24279,7 +24306,9 @@
|
|
|
24279
24306
|
};
|
|
24280
24307
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24281
24308
|
var _this = this;
|
|
24282
|
-
this.headerControl.valueChanges
|
|
24309
|
+
this.headerControl.valueChanges
|
|
24310
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24311
|
+
.subscribe(function (res) {
|
|
24283
24312
|
_this.updateEditableText.emit(res);
|
|
24284
24313
|
_this.cdr.detectChanges();
|
|
24285
24314
|
});
|
|
@@ -25085,10 +25114,10 @@
|
|
|
25085
25114
|
DatoProgressBarComponent = __decorate([
|
|
25086
25115
|
core.Component({
|
|
25087
25116
|
selector: 'dato-progress-bar',
|
|
25088
|
-
template: "<div class=\"bar d-flex width-100 overflow-hidden\"\n [style.width]=\"width\"\n [class]=\"barColor + '-background-color'\">\n <div *ngFor=\"let part of parts; index as i\"\n class=\"part height-100\"\n [ngClass]=\"part.color ? part.color + '-background-color' : ''\"\n [style.width]=\"i > 0 ? 'calc(' + part.percent + '% + 8px)' : part.percent + '%'\"\n [style.z-index]=\"100 - i\"\n [datoTooltipV2]=\"part.tooltip\">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf=\"showLegend\" class=\"d-flex mt-12\">\n <div *ngFor=\"let part of parts; index as i\" class=\"d-flex mr-16\">\n <div class=\"d-flex dato-note primary-400-color\">\n <div class=\"legend-color mr-
|
|
25117
|
+
template: "<div class=\"bar d-flex width-100 overflow-hidden\"\n [style.width]=\"width\"\n [class]=\"barColor + '-background-color'\">\n <div *ngFor=\"let part of parts; index as i\"\n class=\"part height-100\"\n [ngClass]=\"part.color ? part.color + '-background-color' : ''\"\n [style.width]=\"i > 0 ? 'calc(' + part.percent + '% + 8px)' : part.percent + '%'\"\n [style.z-index]=\"100 - i\"\n [datoTooltipV2]=\"part.tooltip\">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf=\"showLegend\" class=\"d-flex mt-12\">\n <div *ngFor=\"let part of parts; index as i\" class=\"d-flex mr-16\">\n <div class=\"d-flex items-center dato-note primary-400-color\">\n <div class=\"legend-color mr-4\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class=\"primary-300-color ml-3\" *ngIf=\"part.legendSecondaryLabel\">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n",
|
|
25089
25118
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
25090
25119
|
encapsulation: core.ViewEncapsulation.None,
|
|
25091
|
-
styles: ["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:
|
|
25120
|
+
styles: ["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]
|
|
25092
25121
|
}),
|
|
25093
25122
|
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
25094
25123
|
], DatoProgressBarComponent);
|
|
@@ -25642,7 +25671,7 @@
|
|
|
25642
25671
|
};
|
|
25643
25672
|
}
|
|
25644
25673
|
|
|
25645
|
-
window.coreVersion = '22.
|
|
25674
|
+
window.coreVersion = '22.13.2-rc.';
|
|
25646
25675
|
|
|
25647
25676
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25648
25677
|
exports.AceService = AceService;
|
|
@@ -26084,6 +26113,7 @@
|
|
|
26084
26113
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
26085
26114
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
26086
26115
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
26116
|
+
exports.ɵo = RichTextService;
|
|
26087
26117
|
|
|
26088
26118
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
26089
26119
|
|