@tetacom/ng-components 1.0.48 → 1.0.49

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.
@@ -0,0 +1,22 @@
1
+ import { toPng, toBlob, toCanvas, toJpeg, toSvg, toPixelData } from 'html-to-image';
2
+ export var ExportType;
3
+ (function (ExportType) {
4
+ ExportType[ExportType["png"] = 0] = "png";
5
+ ExportType[ExportType["svg"] = 1] = "svg";
6
+ ExportType[ExportType["jpeg"] = 2] = "jpeg";
7
+ ExportType[ExportType["blob"] = 3] = "blob";
8
+ ExportType[ExportType["canvas"] = 4] = "canvas";
9
+ ExportType[ExportType["pixelData"] = 5] = "pixelData";
10
+ })(ExportType || (ExportType = {}));
11
+ const renderMapping = new Map()
12
+ .set(ExportType.blob, toBlob)
13
+ .set(ExportType.png, toPng)
14
+ .set(ExportType.canvas, toCanvas)
15
+ .set(ExportType.jpeg, toJpeg)
16
+ .set(ExportType.svg, toSvg)
17
+ .set(ExportType.pixelData, toPixelData);
18
+ export const exportDomToImage = (node, type = ExportType.png, options) => {
19
+ const render = renderMapping.get(type) ?? toPng;
20
+ return render(node, { filter: options?.filter ?? null });
21
+ };
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhwb3J0LWRvbS1pbWFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlsL2V4cG9ydC1kb20taW1hZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRWxGLE1BQU0sQ0FBTixJQUFZLFVBT1g7QUFQRCxXQUFZLFVBQVU7SUFDcEIseUNBQUcsQ0FBQTtJQUNILHlDQUFHLENBQ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lJztcblxuZXhwb3J0IGVudW0gRXhwb3J0VHlwZSB7XG4gIHBuZyxcbiAgc3ZnLFxuICBqcGVnLFxuICBibG9iLFxuICBjYW52YXMsXG4gIHBpeGVsRGF0YVxufVxuXG5leHBvcnQgdHlwZSBFeHBvcnRPcHRpb25zID0ge1xuICBmaWx0ZXI6IChub2RlOiBIVE1MRWxlbWVudCkgPT4gYm9vbGVhblxufVxuXG5jb25zdCByZW5kZXJNYXBwaW5nID0gbmV3IE1hcDxFeHBvcnRUeXBlLCBhbnk+KClcbiAgLnNldChFeHBvcnRUeXBlLmJsb2IsIHRvQmxvYilcbiAgLnNldChFeHBvcnRUeXBlLnBuZywgdG9QbmcpXG4gIC5zZXQoRXhwb3J0VHlwZS5jYW52YXMsIHRvQ2FudmFzKVxuICAuc2V0KEV4cG9ydFR5cGUuanBlZywgdG9KcGVnKVxuICAuc2V0KEV4cG9ydFR5cGUuc3ZnLCB0b1N2ZylcbiAgLnNldChFeHBvcnRUeXBlLnBpeGVsRGF0YSwgdG9QaXhlbERhdGEpXG5cbmV4cG9ydCBjb25zdCBleHBvcnREb21Ub0ltYWdlID0gKG5vZGU6IEhUTUxFbGVtZW50LCB0eXBlID0gRXhwb3J0VHlwZS5wbmcsIG9wdGlvbnM/OiBFeHBvcnRPcHRpb25zKSA9PiB7XG4gIGNvbnN0IHJlbmRlciA9IHJlbmRlck1hcHBpbmcuZ2V0KHR5cGUpID8/IHRvUG5nO1xuICByZXR1cm4gcmVuZGVyKG5vZGUsIHtmaWx0ZXI6IG9wdGlvbnM/LmZpbHRlciA/PyBudWxsfSlcbn1cbiJdfQ==
@@ -1,4 +1,5 @@
1
1
  export * from './date-util';
2
2
  export * from './forms-util';
3
3
  export * from './string-util';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlsL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxlQUFlLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2RhdGUtdXRpbCc7XG5leHBvcnQgKiBmcm9tICcuL2Zvcm1zLXV0aWwnO1xuZXhwb3J0ICogZnJvbSAnLi9zdHJpbmctdXRpbCc7XG4iXX0=
4
+ export * from './export-dom-image';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlsL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxvQkFBb0IsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZGF0ZS11dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vZm9ybXMtdXRpbCc7XG5leHBvcnQgKiBmcm9tICcuL3N0cmluZy11dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vZXhwb3J0LWRvbS1pbWFnZSdcbiJdfQ==
@@ -20,6 +20,7 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
20
20
  import * as d3 from 'd3';
21
21
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
22
22
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
23
+ import { toBlob, toPng, toCanvas, toJpeg, toSvg, toPixelData } from 'html-to-image';
23
24
 
24
25
  class AccordionComponent {
25
26
  constructor() {
@@ -12215,6 +12216,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
12215
12216
  }] }];
12216
12217
  } });
12217
12218
 
12219
+ var ExportType;
12220
+ (function (ExportType) {
12221
+ ExportType[ExportType["png"] = 0] = "png";
12222
+ ExportType[ExportType["svg"] = 1] = "svg";
12223
+ ExportType[ExportType["jpeg"] = 2] = "jpeg";
12224
+ ExportType[ExportType["blob"] = 3] = "blob";
12225
+ ExportType[ExportType["canvas"] = 4] = "canvas";
12226
+ ExportType[ExportType["pixelData"] = 5] = "pixelData";
12227
+ })(ExportType || (ExportType = {}));
12228
+ const renderMapping = new Map()
12229
+ .set(ExportType.blob, toBlob)
12230
+ .set(ExportType.png, toPng)
12231
+ .set(ExportType.canvas, toCanvas)
12232
+ .set(ExportType.jpeg, toJpeg)
12233
+ .set(ExportType.svg, toSvg)
12234
+ .set(ExportType.pixelData, toPixelData);
12235
+ const exportDomToImage = (node, type = ExportType.png, options) => {
12236
+ var _a, _b;
12237
+ const render = (_a = renderMapping.get(type)) !== null && _a !== void 0 ? _a : toPng;
12238
+ return render(node, { filter: (_b = options === null || options === void 0 ? void 0 : options.filter) !== null && _b !== void 0 ? _b : null });
12239
+ };
12240
+
12218
12241
  const ruLocale = {
12219
12242
  apply: 'Применить',
12220
12243
  cancel: 'Отменить',
@@ -12294,5 +12317,5 @@ function tetaZoneOptimized(ngZone) {
12294
12317
  * Generated bundle index. Do not edit.
12295
12318
  */
12296
12319
 
12297
- 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 };
12320
+ 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 };
12298
12321
  //# sourceMappingURL=tetacom-ng-components.mjs.map