@tetacom/ng-components 1.0.46 → 1.0.50
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/assets/icons.svg +315 -141
- package/esm2020/component/table/default/default-head-cell/default-head-cell.component.mjs +3 -3
- package/esm2020/directive/drag-drop/drag.directive.mjs +6 -3
- package/esm2020/util/export-dom-image.mjs +22 -0
- package/esm2020/util/public-api.mjs +2 -1
- package/fesm2015/tetacom-ng-components.mjs +32 -6
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +30 -5
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +5 -4
- package/style/presets/color-presets.scss +11 -11
- package/style/table.scss +8 -6
- package/util/export-dom-image.d.ts +12 -0
- package/util/public-api.d.ts +1 -0
|
@@ -19,6 +19,7 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
|
|
19
19
|
import * as d3 from 'd3';
|
|
20
20
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
21
21
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
22
|
+
import { toBlob, toPng, toCanvas, toJpeg, toSvg, toPixelData } from 'html-to-image';
|
|
22
23
|
|
|
23
24
|
class AccordionComponent {
|
|
24
25
|
constructor() {
|
|
@@ -8136,10 +8137,10 @@ class DefaultHeadCellComponent extends HeadCellComponentBase {
|
|
|
8136
8137
|
}
|
|
8137
8138
|
}
|
|
8138
8139
|
DefaultHeadCellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DefaultHeadCellComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8139
|
-
DefaultHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: DefaultHeadCellComponent, selector: "teta-default-head-cell", inputs: { column: "column", columns: "columns", data: "data" }, usesInheritance: true, ngImport: i0, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8140
|
+
DefaultHeadCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: DefaultHeadCellComponent, selector: "teta-default-head-cell", inputs: { column: "column", columns: "columns", data: "data" }, usesInheritance: true, ngImport: i0, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption color-text-70\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: HintDirective, selector: "[tetaHint]", inputs: ["tetaHint", "align", "verticalAlign", "delay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8140
8141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DefaultHeadCellComponent, decorators: [{
|
|
8141
8142
|
type: Component,
|
|
8142
|
-
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"] }]
|
|
8143
|
+
args: [{ selector: 'teta-default-head-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"column column_auto\" [tetaHint]=\"column.hint || column.caption\">\n <div class=\"table-head__cell__text\">\n {{column.caption}}\n </div>\n <div *ngIf=\"column.unit\" class=\"table-head__cell__text font-caption color-text-70\" style=\"overflow: visible;\">\n [{{column.unit}}]\n </div>\n</div>\n", styles: [":host{align-items:center;justify-content:center;display:flex;min-width:0;padding:6px 8px}\n"] }]
|
|
8143
8144
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { column: [{
|
|
8144
8145
|
type: Input
|
|
8145
8146
|
}], columns: [{
|
|
@@ -11420,11 +11421,14 @@ class DragDirective {
|
|
|
11420
11421
|
return this.dropTarget === this.instance;
|
|
11421
11422
|
}
|
|
11422
11423
|
mousedown(event) {
|
|
11424
|
+
if (!this.allowDrag) {
|
|
11425
|
+
return;
|
|
11426
|
+
}
|
|
11423
11427
|
if (event.ctrlKey && this._container?.multiple) {
|
|
11424
|
-
this._dragService.addSelection(this.instance, this._container
|
|
11428
|
+
this._dragService.addSelection(this.instance, this._container?.instance);
|
|
11425
11429
|
}
|
|
11426
11430
|
else {
|
|
11427
|
-
this._dragService.setSelection(this.instance, this._container
|
|
11431
|
+
this._dragService.setSelection(this.instance, this._container?.instance);
|
|
11428
11432
|
}
|
|
11429
11433
|
this._dragService.setStartPosition({
|
|
11430
11434
|
x: event.x,
|
|
@@ -12107,6 +12111,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
12107
12111
|
args: [DOCUMENT]
|
|
12108
12112
|
}] }]; } });
|
|
12109
12113
|
|
|
12114
|
+
var ExportType;
|
|
12115
|
+
(function (ExportType) {
|
|
12116
|
+
ExportType[ExportType["png"] = 0] = "png";
|
|
12117
|
+
ExportType[ExportType["svg"] = 1] = "svg";
|
|
12118
|
+
ExportType[ExportType["jpeg"] = 2] = "jpeg";
|
|
12119
|
+
ExportType[ExportType["blob"] = 3] = "blob";
|
|
12120
|
+
ExportType[ExportType["canvas"] = 4] = "canvas";
|
|
12121
|
+
ExportType[ExportType["pixelData"] = 5] = "pixelData";
|
|
12122
|
+
})(ExportType || (ExportType = {}));
|
|
12123
|
+
const renderMapping = new Map()
|
|
12124
|
+
.set(ExportType.blob, toBlob)
|
|
12125
|
+
.set(ExportType.png, toPng)
|
|
12126
|
+
.set(ExportType.canvas, toCanvas)
|
|
12127
|
+
.set(ExportType.jpeg, toJpeg)
|
|
12128
|
+
.set(ExportType.svg, toSvg)
|
|
12129
|
+
.set(ExportType.pixelData, toPixelData);
|
|
12130
|
+
const exportDomToImage = (node, type = ExportType.png, options) => {
|
|
12131
|
+
const render = renderMapping.get(type) ?? toPng;
|
|
12132
|
+
return render(node, { filter: options?.filter ?? null });
|
|
12133
|
+
};
|
|
12134
|
+
|
|
12110
12135
|
const ruLocale = {
|
|
12111
12136
|
apply: 'Применить',
|
|
12112
12137
|
cancel: 'Отменить',
|
|
@@ -12186,5 +12211,5 @@ function tetaZoneOptimized(ngZone) {
|
|
|
12186
12211
|
* Generated bundle index. Do not edit.
|
|
12187
12212
|
*/
|
|
12188
12213
|
|
|
12189
|
-
export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutoPositionModule, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, MONTH_PICKER_CONTROL_VALUE_ACCESSOR, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, MonthPickerComponent, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollIntoViewModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarModule, SidebarPosition, SortEvent, SortParam, StateUtil, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, SwitchModule, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableModule, TableService, TableUtil, TabsComponent, TabsModule, TetaConfigService, TetaContentRef, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, enLocale, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
|
|
12214
|
+
export { AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AccordionModule, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutoPositionModule, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, ButtonModule, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dModule, Chart3dOptions, CheckboxComponent, CheckboxModule, ClickOutsideDirective, ClickOutsideModule, ClickService, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, ContextMenuModule, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DAY_SELECT_CONTROL_VALUE_ACCESSOR, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerModule, DateTimeCellComponent, DateUtil, DaySelectComponent, DelimiterComponent, DelimiterModule, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DisableControlModule, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropModule, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DragSortModule, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DropdownModule, DynamicComponentModule, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandCardModule, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExpandPanelModule, ExportType, FileItemComponent, FileUploadAreaComponent, FileUploadModule, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterModule, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HighlightModule, HintDirective, HintModule, IconComponent, IconModule, IconService, IconSpriteDirective, InputComponent, InputModule, LetContext, LetDirective, LetModule, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, LoaderModule, MONTH_PICKER_CONTROL_VALUE_ACCESSOR, Message, MessageComponent, MessageHostComponent, MessageModule, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, MonthPickerComponent, NoAutofillDirective, NoAutofillModule, NumberPipe, NumberPipeModule, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OnlyNumberModule, OverlayContainerService, PagerComponent, PagerModule, PagerState, PagerUtil, PanelComponent, PanelModule, PopupContentComponent, PositionUtil, ProgressBarComponent, ProgressBarModule, PropertyGridComponent, PropertyGridModule, RadioButtonComponent, RadioComponent, RadioModule, ResizeDragDirective, ResizeDragModule, ResizePanelComponent, ResizePanelModule, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollIntoViewModule, SelectComponent, SelectModule, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarModule, SidebarPosition, SortEvent, SortParam, StateUtil, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, SwitchModule, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableModule, TableService, TableUtil, TabsComponent, TabsModule, TetaConfigService, TetaContentRef, TetaSize, TetaTemplateDirective, TetaTemplateModule, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchModule, ThemeSwitchService, ToggleComponent, ToggleModule, ToolbarComponent, ToolbarModule, TooltipDirective, TooltipModule, TreeComponent, TreeItemToggleComponent, TreeModule, TreeService, VerticalAlign, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
|
|
12190
12215
|
//# sourceMappingURL=tetacom-ng-components.mjs.map
|