@tetacom/ng-components 1.6.9 → 1.6.11

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.
@@ -44,6 +44,7 @@ export interface ITableColumnOptions extends IFilterItemOptions {
44
44
  minValue?: number;
45
45
  maxLength?: number;
46
46
  required?: boolean;
47
+ decimalLength?: number;
47
48
  validators?: ValidatorFn[];
48
49
  }
49
50
  export declare class TableColumn extends FilterItem {
@@ -125,6 +126,10 @@ export declare class TableColumn extends FilterItem {
125
126
  * Поле обязательно для заполнения
126
127
  */
127
128
  required: boolean;
129
+ /**
130
+ * Размер дробной части для числовых полей
131
+ */
132
+ decimalLength?: number;
128
133
  /**
129
134
  * Функции валидации
130
135
  */
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FullScreenToggleDirective {
3
+ private fullScreen;
4
+ onClick(): Promise<void>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<FullScreenToggleDirective, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FullScreenToggleDirective, "[tetaFullScreenToggle]", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,12 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FullScreenDirective {
4
+ private service;
5
+ elementRef: ElementRef<any>;
6
+ enter(): Promise<void>;
7
+ exit(): Promise<void>;
8
+ toggle(): Promise<void>;
9
+ onEsc(ev: KeyboardEvent): Promise<void>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<FullScreenDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FullScreenDirective, "[tetaFullScreen]", never, {}, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FullScreenService {
3
+ private active?;
4
+ enter(el: Element): Promise<void>;
5
+ exit(): Promise<void>;
6
+ toggle(el: Element): Promise<void>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<FullScreenService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<FullScreenService>;
9
+ }
@@ -5,6 +5,9 @@ export * from './disable-control/public-api';
5
5
  export * from './drag-drop/public-api';
6
6
  export * from './drag-sort/public-api';
7
7
  export * from './dynamic-content-base.directive';
8
+ export * from './full-screen/full-screen.directive';
9
+ export * from './full-screen/full-screen.service';
10
+ export * from './full-screen/full-screen-toggle.directive';
8
11
  export * from './highlight/public-api';
9
12
  export * from './hint/public-api';
10
13
  export * from './loader/public-api';
@@ -6853,6 +6853,7 @@ class TableColumn extends FilterItem {
6853
6853
  this.minValue = options?.minValue;
6854
6854
  this.maxLength = options?.maxLength;
6855
6855
  this.required = options?.required;
6856
+ this.decimalLength = options?.decimalLength;
6856
6857
  this.columns = options?.columns?.map((x) => new TableColumn(x)) ?? [];
6857
6858
  this.validators = options?.validators;
6858
6859
  }
@@ -7832,11 +7833,11 @@ class NumericCellComponent extends CellComponentBase {
7832
7833
  this.cdr.markForCheck();
7833
7834
  }
7834
7835
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NumericCellComponent, deps: [{ token: TableService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
7835
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NumericCellComponent, isStandalone: true, selector: "teta-numeric-cell", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator", "onlyPositive"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7836
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NumericCellComponent, isStandalone: true, selector: "teta-numeric-cell", viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: column.decimalLength ?? 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: OnlyNumberDirective, selector: "[tetaOnlyNumber]", inputs: ["tetaOnlyNumber", "allowDecimals", "allowSign", "decimalSeparator", "commaSeparator", "onlyPositive"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: NumberPipe, name: "tetaNumber" }], viewProviders: [FormsUtil.formProvider], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7836
7837
  }
7837
7838
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NumericCellComponent, decorators: [{
7838
7839
  type: Component,
7839
- args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [FormsUtil.formProvider], imports: [FormsModule, OnlyNumberDirective, ReactiveFormsModule, NumberPipe], template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n" }]
7840
+ args: [{ selector: 'teta-numeric-cell', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [FormsUtil.formProvider], imports: [FormsModule, OnlyNumberDirective, ReactiveFormsModule, NumberPipe], template: "<span [style.display]=\"edit ? 'none' : 'block'\" class=\"cell-text\" [class.cell-text_disabled]=\"!editable\">\n {{ control?.value | tetaNumber: column.decimalLength ?? 2 }}\n</span>\n@if (edit) {\n <input\n #input\n [tetaOnlyNumber]=\"true\"\n type=\"text\"\n class=\"input row_auto border-radius-0\"\n (keydown.enter)=\"input.blur()\"\n [formControl]=\"control\"\n />\n}\n" }]
7840
7841
  }], ctorParameters: () => [{ type: TableService }, { type: i0.ChangeDetectorRef }], propDecorators: { input: [{
7841
7842
  type: ViewChild,
7842
7843
  args: ['input', { static: false }]
@@ -11291,6 +11292,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
11291
11292
  args: ['drop', ['$event']]
11292
11293
  }] } });
11293
11294
 
11295
+ class FullScreenService {
11296
+ async enter(el) {
11297
+ if (this.active) {
11298
+ await this.exit();
11299
+ }
11300
+ this.active = el;
11301
+ await el.requestFullscreen();
11302
+ }
11303
+ async exit() {
11304
+ if (document.fullscreenElement) {
11305
+ await document.exitFullscreen();
11306
+ }
11307
+ this.active = undefined;
11308
+ }
11309
+ async toggle(el) {
11310
+ if (document.fullscreenElement === el) {
11311
+ await this.exit();
11312
+ }
11313
+ else {
11314
+ await this.enter(el);
11315
+ }
11316
+ }
11317
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
11318
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenService, providedIn: 'root' }); }
11319
+ }
11320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenService, decorators: [{
11321
+ type: Injectable,
11322
+ args: [{
11323
+ providedIn: 'root',
11324
+ }]
11325
+ }] });
11326
+
11327
+ class FullScreenDirective {
11328
+ constructor() {
11329
+ this.service = inject(FullScreenService);
11330
+ this.elementRef = inject(ElementRef);
11331
+ }
11332
+ async enter() {
11333
+ await this.service.enter(this.elementRef.nativeElement);
11334
+ }
11335
+ async exit() {
11336
+ await this.service.exit();
11337
+ }
11338
+ async toggle() {
11339
+ await this.service.toggle(this.elementRef.nativeElement);
11340
+ }
11341
+ async onEsc(ev) {
11342
+ if (document.fullscreenElement === this.elementRef.nativeElement) {
11343
+ ev.stopPropagation();
11344
+ await this.exit();
11345
+ }
11346
+ }
11347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11348
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: FullScreenDirective, isStandalone: true, selector: "[tetaFullScreen]", host: { listeners: { "keydown.escape": "onEsc($event)" } }, providers: [FullScreenService], ngImport: i0 }); }
11349
+ }
11350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenDirective, decorators: [{
11351
+ type: Directive,
11352
+ args: [{
11353
+ selector: '[tetaFullScreen]',
11354
+ providers: [FullScreenService],
11355
+ host: {
11356
+ '(keydown.escape)': 'onEsc($event)',
11357
+ },
11358
+ }]
11359
+ }] });
11360
+
11361
+ class FullScreenToggleDirective {
11362
+ constructor() {
11363
+ this.fullScreen = inject(FullScreenDirective, {
11364
+ optional: true,
11365
+ });
11366
+ }
11367
+ async onClick() {
11368
+ await this.fullScreen?.toggle();
11369
+ }
11370
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11371
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: FullScreenToggleDirective, isStandalone: true, selector: "[tetaFullScreenToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
11372
+ }
11373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FullScreenToggleDirective, decorators: [{
11374
+ type: Directive,
11375
+ args: [{
11376
+ selector: '[tetaFullScreenToggle]',
11377
+ host: {
11378
+ '(click)': 'onClick()',
11379
+ },
11380
+ }]
11381
+ }] });
11382
+
11294
11383
  class LoaderDirective {
11295
11384
  set tetaLoader(value) {
11296
11385
  this._loading = value;
@@ -11713,5 +11802,5 @@ function tetaZoneOptimized(ngZone) {
11713
11802
  * Generated bundle index. Do not edit.
11714
11803
  */
11715
11804
 
11716
- export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutocompleteComponent, AvatarComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dOptions, CheckboxComponent, ClickOutsideDirective, ClickService, ColorCellComponent, ColorInputComponent, ColorUtil, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DividerComponent, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExportType, FileItemComponent, FileUploadAreaComponent, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HintDirective, IconComponent, IconFileComponent, IconService, IconSpriteDirective, InputComponent, LetContext, LetDirective, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, Message, MessageComponent, MessageHostComponent, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NumberPipe, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OverlayContainerService, PagerComponent, PagerState, PagerUtil, PanelComponent, PopupContentComponent, PositionUtil, PrependZeroPipe, ProgressBarComponent, PropertyGridComponent, PropertyGridItemComponent, PropertyGridItemDescriptionDirective, RadioButtonComponent, RadioComponent, RangeCalendarComponent, ResizeDragDirective, ResizePanelComponent, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollableComponent, ScrollableDirective, SelectComponent, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarPosition, SortEvent, SortParam, StateUtil, StepperComponent, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableRow, TableRowComponent, TableService, TableUtil, TabsComponent, TetaConfigService, TetaContentRef, TetaDatePipe, TetaSize, TetaTemplateDirective, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchService, ToggleComponent, ToolbarComponent, TooltipDirective, TreeComponent, TreeItemToggleComponent, TreeService, VerticalAlign, WINDOW, boolOrFuncCallback, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, isFunction, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
11805
+ export { ANIMATION_FRAME, AccordionComponent, AccordionContentDirective, AccordionHeadComponent, AccordionItemComponent, AggregationType, Align, ArrayUtil, AutoPositionDirective, AutocompleteComponent, AvatarComponent, BooleanCellComponent, BooleanFilter, BooleanFilterComponent, ButtonComponent, CHECKBOX_CONTROL_VALUE_ACCESSOR, CellComponent, CellComponentBase, CellHostComponent, Chart3dComponent, Chart3dOptions, CheckboxComponent, ClickOutsideDirective, ClickService, ColorCellComponent, ColorInputComponent, ColorUtil, ColumnReorderEvent, ColumnResizeEvent, ContextMenuDirective, CurrentModal, DATE_PICKER_CONTROL_VALUE_ACCESSOR, DATE_Range_CONTROL_VALUE_ACCESSOR, DateCalendarComponent, DateCellComponent, DateFilter, DateFilterComponent, DateFilterValue, DatePeriod, DatePickerComponent, DatePickerMode, DateRangeComponent, DateTimeCellComponent, DateUtil, DayModel, DelimiterComponent, DetailComponentBase, DialogComponent, DialogService, DisableControlDirective, DividerComponent, DomUtil, DragContainerDirective, DragContainerInstance, DragDirective, DragDropService, DragInstance, DragPlaceholderDirective, DragPreviewDirective, DragSortContainerDirective, DragSortItemDirective, DropdownComponent, DropdownContentDirective, DropdownDirective, DropdownHeadDirective, DynamicComponentService, DynamicContentBaseDirective, DynamicData, EditEvent, EditType, ExpandCardComponent, ExpandItemComponent, ExpandPanelComponent, ExpandPanelContentDirective, ExpandPanelHeadDirective, ExportType, FileItemComponent, FileUploadAreaComponent, FilterBase, FilterComponentBase, FilterHostComponent, FilterItem, FilterState, FilterType, FormGroupTitleComponent, FormsUtil, FullScreenDirective, FullScreenService, FullScreenToggleDirective, HeadCellComponentBase, HeadCellHostComponent, HighlightDirective, HintDirective, IconComponent, IconFileComponent, IconService, IconSpriteDirective, InputComponent, LetContext, LetDirective, ListCellComponent, ListFilter, ListFilterComponent, ListFilterType, LoaderDirective, Message, MessageComponent, MessageHostComponent, MessageService, ModalCloseReason, ModalContainerComponent, ModalInstance, ModalModule, ModalService, NoAutofillDirective, NumberPipe, NumericCellComponent, NumericFilter, NumericFilterComponent, NumericFilterValue, OnlyNumberDirective, OverlayContainerService, PagerComponent, PagerState, PagerUtil, PanelComponent, PopupContentComponent, PositionUtil, PrependZeroPipe, ProgressBarComponent, PropertyGridComponent, PropertyGridItemComponent, PropertyGridItemDescriptionDirective, RadioButtonComponent, RadioComponent, RangeCalendarComponent, ResizeDragDirective, ResizePanelComponent, SLIDER_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, ScrollIntoViewDirective, ScrollableComponent, ScrollableDirective, SelectComponent, SelectOptionDirective, SelectType, SelectValueDirective, SidebarComponent, SidebarPosition, SortEvent, SortParam, StateUtil, StepperComponent, StringCellComponent, StringFilter, StringFilterComponent, StringFilterType, StringUtil, SwitchButtonComponent, SwitchComponent, TOGGLE_CONTROL_VALUE_ACCESSOR, TabComponent, TabContentDirective, TabTitleDirective, TableBodyComponent, TableColumn, TableColumnStore, TableComponent, TableHeadComponent, TableRow, TableRowComponent, TableService, TableUtil, TabsComponent, TetaConfigService, TetaContentRef, TetaDatePipe, TetaSize, TetaTemplateDirective, TextFieldComponent, ThemeSwitchComponent, ThemeSwitchService, ToggleComponent, ToolbarComponent, TooltipDirective, TreeComponent, TreeItemToggleComponent, TreeService, VerticalAlign, WINDOW, boolOrFuncCallback, enLocale, exportDomToImage, formatNumber, getCellComponent, getPrecision, isFunction, prependZero, ruLocale, tetaZoneFree, tetaZoneFull, tetaZoneOptimized };
11717
11806
  //# sourceMappingURL=tetacom-ng-components.mjs.map