@rt-tools/ui-kit 0.0.6 → 0.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rt-tools/ui-kit",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Yauheni Krumin",
6
6
  "type": "module",
@@ -8,12 +8,12 @@
8
8
  "tslib": "^2.8.0",
9
9
  "@rt-tools/core": "^0.0.2",
10
10
  "@rt-tools/store": "^0.0.4",
11
- "@rt-tools/utils": "^0.0.2"
11
+ "@rt-tools/utils": "^0.0.5"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "@rt-tools/core": "^0.0.2",
15
15
  "@rt-tools/store": "^0.0.4",
16
- "@rt-tools/utils": "^0.0.2",
16
+ "@rt-tools/utils": "^0.0.5",
17
17
  "@angular/animations": "^21.0.0",
18
18
  "@angular/cdk": "^21.0.0",
19
19
  "@angular/common": "^21.0.0",
Binary file
@@ -1,12 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnChanges, ElementRef, Renderer2, PipeTransform, Provider, InjectionToken, Type, OnInit, Signal, TemplateRef, WritableSignal, InputSignal, InputSignalWithTransform, OutputEmitterRef, ModelSignal, AfterViewInit, AfterViewChecked, AfterContentChecked, OnDestroy } from '@angular/core';
3
- import { Nullable, Icon, Select, ISideMenu, AsidePositions, IAside, AsideButtonsType, POSITION_ENUM, OSTypes } from '@rt-tools/utils';
4
- import { Observable } from 'rxjs';
3
+ import { Nullable, PageModel, SortModel, FilterOperatorType, FilterModel, FILTER_OPERATOR_TYPE_ENUM, POSITION_ENUM, OSTypes } from '@rt-tools/utils';
4
+ import { Observable, Subject } from 'rxjs';
5
5
  import { FormControl, ControlValueAccessor, Validator, FormGroup, ValidationErrors } from '@angular/forms';
6
6
  import { ThemePalette } from '@angular/material/core';
7
+ import { Nullable as Nullable$1 } from '@rt-tools/core';
7
8
  import { MatDialogConfig } from '@angular/material/dialog';
8
9
  import { MatDrawer } from '@angular/material/sidenav';
9
- import { ComponentType } from '@angular/cdk/portal';
10
+ import { OverlayRef, ComponentType, ConnectedPosition, CdkOverlayOrigin } from '@angular/cdk/overlay';
11
+ import { ComponentType as ComponentType$1 } from '@angular/cdk/portal';
10
12
  import { HttpErrorResponse } from '@angular/common/http';
11
13
  import { MatFormFieldAppearance } from '@angular/material/form-field';
12
14
  import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
@@ -14,7 +16,6 @@ import { TooltipPosition } from '@angular/material/tooltip';
14
16
  import { AnimationPlayer, AnimationTriggerMetadata } from '@angular/animations';
15
17
  import { MatSnackBarConfig, MatSnackBarRef } from '@angular/material/snack-bar';
16
18
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
17
- import { ConnectedPosition, CdkOverlayOrigin } from '@angular/cdk/overlay';
18
19
  import { MatInput } from '@angular/material/input';
19
20
  import { ImageCroppedEvent } from 'ngx-image-cropper';
20
21
 
@@ -344,11 +345,33 @@ declare function provideRtIDBStorage(): Provider[];
344
345
  */
345
346
  declare const IDB_STORAGE_SERVICE_TOKEN: InjectionToken<IDBStorageService<any>>;
346
347
 
348
+ declare enum MODAL_WINDOW_SIZE_ENUM {
349
+ SM = "25rem",
350
+ MD = "45rem",
351
+ LG = "65rem",
352
+ FULL = "100%"
353
+ }
354
+ type ModalWindowSizeType = MODAL_WINDOW_SIZE_ENUM.SM | MODAL_WINDOW_SIZE_ENUM.MD | MODAL_WINDOW_SIZE_ENUM.LG | MODAL_WINDOW_SIZE_ENUM.FULL;
355
+ interface Icon {
356
+ value: string;
357
+ style?: {
358
+ [className: string]: string;
359
+ };
360
+ }
361
+ interface NameValueType<N = string, V = string> {
362
+ name: N;
363
+ value: V;
364
+ }
365
+ interface Select<T> {
366
+ value: Array<NameValueType<string, T>>;
367
+ label?: string;
368
+ hint?: string;
369
+ }
347
370
  declare namespace IModal {
348
371
  interface Button<T> {
349
372
  text: string;
350
373
  color?: ThemePalette;
351
- value: Nullable<T>;
374
+ value: Nullable$1<T>;
352
375
  appearance?: 'standard' | 'raised' | 'flat' | 'stroked' | 'fab' | 'mini-fab';
353
376
  validateSelect?: boolean;
354
377
  assignSelectedValue?: boolean;
@@ -381,11 +404,11 @@ declare namespace IModal {
381
404
  value: T;
382
405
  message: string;
383
406
  }
384
- type ConfirmResponsePredicate<T> = (answer: Nullable<IModal.DataAnswer<T>>) => boolean;
407
+ type ConfirmResponsePredicate<T> = (answer: Nullable$1<IModal.DataAnswer<T>>) => boolean;
385
408
  interface ConfirmResponse<T> {
386
- on(predicate: ConfirmResponsePredicate<T>): Observable<Nullable<IModal.DataAnswer<T>>>;
387
- onCancel(cancel?: ConfirmResponsePredicate<T>): Observable<Nullable<IModal.DataAnswer<T>>>;
388
- onConfirm(confirm?: ConfirmResponsePredicate<T>): Observable<Nullable<IModal.DataAnswer<T>>>;
409
+ on(predicate: ConfirmResponsePredicate<T>): Observable<Nullable$1<IModal.DataAnswer<T>>>;
410
+ onCancel(cancel?: ConfirmResponsePredicate<T>): Observable<Nullable$1<IModal.DataAnswer<T>>>;
411
+ onConfirm(confirm?: ConfirmResponsePredicate<T>): Observable<Nullable$1<IModal.DataAnswer<T>>>;
389
412
  }
390
413
  }
391
414
 
@@ -430,6 +453,21 @@ declare class RtuiScrollableContainerComponent {
430
453
  static ɵcmp: i0.ɵɵComponentDeclaration<RtuiScrollableContainerComponent, "rtui-scrollable", never, {}, {}, ["headerTpl", "contentTpl", "footerTpl"], never, true, never>;
431
454
  }
432
455
 
456
+ declare namespace ISideMenu {
457
+ type ItemData = string | number | object;
458
+ interface Item {
459
+ id: string | number;
460
+ icon?: string;
461
+ name?: string;
462
+ link?: string;
463
+ submenu?: Item[];
464
+ iconButton?: {
465
+ icon: string;
466
+ data?: ItemData;
467
+ };
468
+ }
469
+ }
470
+
433
471
  declare class RtuiSideMenuHeaderDirective {
434
472
  static ɵfac: i0.ɵɵFactoryDeclaration<RtuiSideMenuHeaderDirective, never>;
435
473
  static ɵdir: i0.ɵɵDirectiveDeclaration<RtuiSideMenuHeaderDirective, "[rtuiSideMenuHeader]", never, {}, {}, never, never, true, never>;
@@ -489,6 +527,40 @@ declare class RtuiSpinnerComponent {
489
527
  static ɵcmp: i0.ɵɵComponentDeclaration<RtuiSpinnerComponent, "rtui-spinner", never, { "diameter": { "alias": "diameter"; "required": false; "isSignal": true; }; "showBox": { "alias": "showBox"; "required": false; "isSignal": true; }; "showBackground": { "alias": "showBackground"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
490
528
  }
491
529
 
530
+ type AsidePositions = 'left' | 'right';
531
+ declare class AsideRef<DATA, ANSWER> {
532
+ private answer;
533
+ overlayRef: OverlayRef;
534
+ component: ComponentType<unknown>;
535
+ position: AsidePositions;
536
+ data: DATA;
537
+ constructor(answer: Subject<ANSWER | null>, overlayRef: OverlayRef, component: ComponentType<unknown>, position: AsidePositions, data: DATA);
538
+ close(answer?: ANSWER): void;
539
+ }
540
+ declare const ASIDE_REF: InjectionToken<AsideRef<object, object>>;
541
+ declare const ddServices: Array<{
542
+ provide: string;
543
+ useValue: unknown;
544
+ }>;
545
+
546
+ declare enum ASIDE_BUTTONS_ENUM {
547
+ USER_ACTIVE = "User active",
548
+ USER_INACTIVE = "User inactive",
549
+ DELETE = "Delete",
550
+ RESET = "Reset"
551
+ }
552
+ type AsideButtonsType = ASIDE_BUTTONS_ENUM.USER_ACTIVE | ASIDE_BUTTONS_ENUM.USER_INACTIVE | ASIDE_BUTTONS_ENUM.DELETE | ASIDE_BUTTONS_ENUM.RESET;
553
+
554
+ declare namespace IAside {
555
+ interface HeaderActionButton {
556
+ name: AsideButtonsType;
557
+ icon: string;
558
+ color: string;
559
+ tooltip: string;
560
+ disabled?: boolean;
561
+ }
562
+ }
563
+
492
564
  declare class RtAsideService {
493
565
  #private;
494
566
  /**
@@ -504,7 +576,7 @@ declare class RtAsideService {
504
576
  *
505
577
  * @returns An observable that emits the response from the aside panel when it is closed.
506
578
  */
507
- Open<COMPONENT = null, DATA = null, ANSWER = null>(component: ComponentType<COMPONENT>, position: AsidePositions, data: DATA): Observable<ANSWER | null>;
579
+ Open<COMPONENT = null, DATA = null, ANSWER = null>(component: ComponentType$1<COMPONENT>, position: AsidePositions, data: DATA): Observable<ANSWER | null>;
508
580
  static ɵfac: i0.ɵɵFactoryDeclaration<RtAsideService, never>;
509
581
  static ɵprov: i0.ɵɵInjectableDeclaration<RtAsideService>;
510
582
  }
@@ -640,51 +712,6 @@ declare class RtuiClearButtonComponent {
640
712
  static ɵcmp: i0.ɵɵComponentDeclaration<RtuiClearButtonComponent, "rtui-clear-button", never, { "isMobile": { "alias": "isMobile"; "required": false; "isSignal": true; }; "isButtonShown": { "alias": "isButtonShown"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; }, { "keydownAction": "keydownAction"; "clickAction": "clickAction"; }, never, never, true, never>;
641
713
  }
642
714
 
643
- declare enum LIST_SORT_ORDER_ENUM {
644
- ASC = "asc",
645
- DESC = "desc"
646
- }
647
- type ListSortOrderType = LIST_SORT_ORDER_ENUM.ASC | LIST_SORT_ORDER_ENUM.DESC;
648
-
649
- interface ListState<T extends string, M extends object> {
650
- pageModel: PageModel;
651
- sortModel: SortModel<T>;
652
- filterModel: M;
653
- searchTerm: string;
654
- }
655
- interface SortModel<T = string> {
656
- propertyName: T;
657
- sortDirection: ListSortOrderType;
658
- }
659
- interface PageModel {
660
- pageNumber: number;
661
- pageSize: number;
662
- totalCount: number;
663
- endIndex?: number;
664
- hasNext?: boolean;
665
- hasPrev?: boolean;
666
- isFirstPage?: boolean;
667
- isLastPage?: boolean;
668
- startIndex?: number;
669
- }
670
- interface FilterModel<M = string> {
671
- operatorType: FilterOperatorType;
672
- propertyName: M;
673
- value?: string | number | boolean;
674
- values?: Array<string | number>;
675
- }
676
- declare enum FILTER_OPERATOR_TYPE_ENUM {
677
- EQUALS = "equals",
678
- NOT_EQUALS = "notEquals",
679
- STARTS_WITH = "startsWith",
680
- ENDS_WITH = "endsWith",
681
- CONTAINS = "contains",
682
- GREATER_THAN = "greaterThan",
683
- LESS_THAN = "lessThan"
684
- }
685
- type FilterOperatorType = FILTER_OPERATOR_TYPE_ENUM.EQUALS | FILTER_OPERATOR_TYPE_ENUM.NOT_EQUALS | FILTER_OPERATOR_TYPE_ENUM.STARTS_WITH | FILTER_OPERATOR_TYPE_ENUM.ENDS_WITH | FILTER_OPERATOR_TYPE_ENUM.CONTAINS | FILTER_OPERATOR_TYPE_ENUM.GREATER_THAN | FILTER_OPERATOR_TYPE_ENUM.LESS_THAN;
686
- declare const FILTER_OPERATORS: ReadonlyArray<FilterOperatorType>;
687
-
688
715
  declare class RtuiPaginationComponent implements OnInit, AfterViewInit {
689
716
  #private;
690
717
  /** Current Page Model */
@@ -1869,5 +1896,5 @@ declare class RtActionBarService {
1869
1896
  static ɵprov: i0.ɵɵInjectableDeclaration<RtActionBarService>;
1870
1897
  }
1871
1898
 
1872
- export { BUTTON_APPEARANCE, BUTTON_COLOR, BUTTON_SIZE, BlockDirective, CUSTOM_STORAGE, ConcatClassesPipe, DEFAULT_PAGE_MODEL, DEFAULT_PAGE_SIZE, ElemDirective, FILTER_OPERATORS, FILTER_OPERATOR_TYPE_ENUM, IDBStorageService, IDB_STORAGE_SERVICE_TOKEN, IModal, INFO_BADGE_SIZE_ENUM, INFO_BADGE_TYPE_ENUM, IN_MEMORY_STORAGE, IRtActionBar, IRtSnackBar, ITable, InMemoryStorageService, JsonConverter, LIST_SORT_ORDER_ENUM, LOCAL_STORAGE, ModDirective, RTUI_TABLE_COMPONENT_TOKEN, RTUI_TABLE_STOP_ROW_CLICK_ATTRIBUTE, RtActionBarService, RtAsideService, RtDynamicListSelectorsDirective, RtModalService, RtPopoverDirective, RtSnackBarService, RtTableConfigService, RtTableSelectorsDirective, RtuiActionBarComponent, RtuiActionBarContainerComponent, RtuiAsideContainerComponent, RtuiAsideContainerHeaderDirective, RtuiButtonComponent, RtuiClearButtonComponent, RtuiCustomTableCellsDirective, RtuiDynamicInputAdditionalControlDirective, RtuiDynamicInputComponent, RtuiDynamicListComponent, RtuiDynamicListCustomTableCellsDirective, RtuiDynamicListRowActionsDirective, RtuiDynamicListRowAdditionalActionsDirective, RtuiDynamicListToolbarActionsDirective, RtuiDynamicListToolbarSelectorsDirective, RtuiDynamicSelectorAdditionalControlDirective, RtuiDynamicSelectorComponent, RtuiDynamicSelectorItemAdditionalControlDirective, RtuiDynamicSelectorListActionsComponent, RtuiDynamicSelectorPlaceholderComponent, RtuiDynamicSelectorSelectedListComponent, RtuiFileUploadComponent, RtuiHeaderCenterDirective, RtuiHeaderComponent, RtuiHeaderLeftDirective, RtuiHeaderRightDirective, RtuiImageUploadComponent, RtuiInfoBadgeComponent, RtuiModalComponent, RtuiMultiButtonComponent, RtuiMultiSelectorPopupComponent, RtuiPaginationComponent, RtuiRoundIconButtonComponent, RtuiScrollableContainerComponent, RtuiScrollableContainerContentDirective, RtuiScrollableContainerFooterDirective, RtuiScrollableContainerHeaderDirective, RtuiSideMenuComponent, RtuiSideMenuFooterDirective, RtuiSideMenuHeaderDirective, RtuiSnackBarComponent, RtuiSpinnerComponent, RtuiStopTableRowClickDirective, RtuiTableAdditionalRowActionsDirective, RtuiTableComponent, RtuiTableRowActionsDirective, RtuiTableRowClickDirective, RtuiToggleComponent, RtuiToolbarCenterDirective, RtuiToolbarComponent, RtuiToolbarLeftDirective, RtuiToolbarRightDirective, SESSION_STORAGE, STORAGE_TYPES_ENUM, StorageService, TABLE_COLUMN_FILTER_TYPES_ENUM, TABLE_COLUMN_TYPES_ENUM, TEXT_CELL_COLOR_ENUM, TOGGLE_SIZE_TYPE_ENUM, darkenHexColor, getColorBasedOnBackground, iDBStorageFactory, inMemoryStorageFactory, localStorageFactory, progressDecreaseAnimation, progressIncreaseAnimation, provideRtIDBStorage, provideRtStorage, provideRtUi, sessionStorageFactory };
1873
- export type { ButtonAppearanceType, ButtonColorType, ButtonSizeType, FilterModel, FilterOperatorType, IBemConfig, IIDBStorageServiceInterface, IImageUploadFormat, IInfoBadgeSizeType, IModsObject, IRtuiTable, IStorageConfig, IStorageConverter, IconSideType, InfoBadgeType, ListSortOrderType, ListState, MenuItemTrigger, PageModel, SortModel, StorageType, ToggleSizeType };
1899
+ export { ASIDE_BUTTONS_ENUM, ASIDE_REF, AsideRef, BUTTON_APPEARANCE, BUTTON_COLOR, BUTTON_SIZE, BlockDirective, CUSTOM_STORAGE, ConcatClassesPipe, DEFAULT_PAGE_MODEL, DEFAULT_PAGE_SIZE, ElemDirective, IAside, IDBStorageService, IDB_STORAGE_SERVICE_TOKEN, IModal, INFO_BADGE_SIZE_ENUM, INFO_BADGE_TYPE_ENUM, IN_MEMORY_STORAGE, IRtActionBar, IRtSnackBar, ISideMenu, ITable, InMemoryStorageService, JsonConverter, LOCAL_STORAGE, MODAL_WINDOW_SIZE_ENUM, ModDirective, RTUI_TABLE_COMPONENT_TOKEN, RTUI_TABLE_STOP_ROW_CLICK_ATTRIBUTE, RtActionBarService, RtAsideService, RtDynamicListSelectorsDirective, RtModalService, RtPopoverDirective, RtSnackBarService, RtTableConfigService, RtTableSelectorsDirective, RtuiActionBarComponent, RtuiActionBarContainerComponent, RtuiAsideContainerComponent, RtuiAsideContainerHeaderDirective, RtuiButtonComponent, RtuiClearButtonComponent, RtuiCustomTableCellsDirective, RtuiDynamicInputAdditionalControlDirective, RtuiDynamicInputComponent, RtuiDynamicListComponent, RtuiDynamicListCustomTableCellsDirective, RtuiDynamicListRowActionsDirective, RtuiDynamicListRowAdditionalActionsDirective, RtuiDynamicListToolbarActionsDirective, RtuiDynamicListToolbarSelectorsDirective, RtuiDynamicSelectorAdditionalControlDirective, RtuiDynamicSelectorComponent, RtuiDynamicSelectorItemAdditionalControlDirective, RtuiDynamicSelectorListActionsComponent, RtuiDynamicSelectorPlaceholderComponent, RtuiDynamicSelectorSelectedListComponent, RtuiFileUploadComponent, RtuiHeaderCenterDirective, RtuiHeaderComponent, RtuiHeaderLeftDirective, RtuiHeaderRightDirective, RtuiImageUploadComponent, RtuiInfoBadgeComponent, RtuiModalComponent, RtuiMultiButtonComponent, RtuiMultiSelectorPopupComponent, RtuiPaginationComponent, RtuiRoundIconButtonComponent, RtuiScrollableContainerComponent, RtuiScrollableContainerContentDirective, RtuiScrollableContainerFooterDirective, RtuiScrollableContainerHeaderDirective, RtuiSideMenuComponent, RtuiSideMenuFooterDirective, RtuiSideMenuHeaderDirective, RtuiSnackBarComponent, RtuiSpinnerComponent, RtuiStopTableRowClickDirective, RtuiTableAdditionalRowActionsDirective, RtuiTableComponent, RtuiTableRowActionsDirective, RtuiTableRowClickDirective, RtuiToggleComponent, RtuiToolbarCenterDirective, RtuiToolbarComponent, RtuiToolbarLeftDirective, RtuiToolbarRightDirective, SESSION_STORAGE, STORAGE_TYPES_ENUM, StorageService, TABLE_COLUMN_FILTER_TYPES_ENUM, TABLE_COLUMN_TYPES_ENUM, TEXT_CELL_COLOR_ENUM, TOGGLE_SIZE_TYPE_ENUM, darkenHexColor, ddServices, getColorBasedOnBackground, iDBStorageFactory, inMemoryStorageFactory, localStorageFactory, progressDecreaseAnimation, progressIncreaseAnimation, provideRtIDBStorage, provideRtStorage, provideRtUi, sessionStorageFactory };
1900
+ export type { AsideButtonsType, AsidePositions, ButtonAppearanceType, ButtonColorType, ButtonSizeType, IBemConfig, IIDBStorageServiceInterface, IImageUploadFormat, IInfoBadgeSizeType, IModsObject, IRtuiTable, IStorageConfig, IStorageConverter, Icon, IconSideType, InfoBadgeType, MenuItemTrigger, ModalWindowSizeType, NameValueType, Select, StorageType, ToggleSizeType };
Binary file