@rt-tools/ui-kit 0.0.5 → 0.0.7

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,19 +1,19 @@
1
1
  {
2
2
  "name": "@rt-tools/ui-kit",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Yauheni Krumin",
6
6
  "type": "module",
7
7
  "dependencies": {
8
8
  "tslib": "^2.8.0",
9
- "@rt-tools/core": "^0.0.1",
10
- "@rt-tools/store": "^0.0.1",
11
- "@rt-tools/utils": "^0.0.1"
9
+ "@rt-tools/core": "^0.0.2",
10
+ "@rt-tools/store": "^0.0.4",
11
+ "@rt-tools/utils": "^0.0.3"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "@rt-tools/core": "^0.0.2",
15
- "@rt-tools/store": "^0.0.2",
16
- "@rt-tools/utils": "^0.0.2",
15
+ "@rt-tools/store": "^0.0.4",
16
+ "@rt-tools/utils": "^0.0.3",
17
17
  "@angular/animations": "^21.0.0",
18
18
  "@angular/cdk": "^21.0.0",
19
19
  "@angular/common": "^21.0.0",
Binary file
@@ -1,14 +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
- export * from '@rt-tools/utils';
5
- export * from '@rt-tools/store';
6
- import { Observable } from 'rxjs';
3
+ import { Nullable, POSITION_ENUM, OSTypes } from '@rt-tools/utils';
4
+ import { Observable, Subject } from 'rxjs';
7
5
  import { FormControl, ControlValueAccessor, Validator, FormGroup, ValidationErrors } from '@angular/forms';
8
6
  import { ThemePalette } from '@angular/material/core';
7
+ import { Nullable as Nullable$1 } from '@rt-tools/core';
9
8
  import { MatDialogConfig } from '@angular/material/dialog';
10
9
  import { MatDrawer } from '@angular/material/sidenav';
11
- 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';
12
12
  import { HttpErrorResponse } from '@angular/common/http';
13
13
  import { MatFormFieldAppearance } from '@angular/material/form-field';
14
14
  import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
@@ -16,7 +16,6 @@ import { TooltipPosition } from '@angular/material/tooltip';
16
16
  import { AnimationPlayer, AnimationTriggerMetadata } from '@angular/animations';
17
17
  import { MatSnackBarConfig, MatSnackBarRef } from '@angular/material/snack-bar';
18
18
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
19
- import { ConnectedPosition, CdkOverlayOrigin } from '@angular/cdk/overlay';
20
19
  import { MatInput } from '@angular/material/input';
21
20
  import { ImageCroppedEvent } from 'ngx-image-cropper';
22
21
 
@@ -346,11 +345,33 @@ declare function provideRtIDBStorage(): Provider[];
346
345
  */
347
346
  declare const IDB_STORAGE_SERVICE_TOKEN: InjectionToken<IDBStorageService<any>>;
348
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
+ }
349
370
  declare namespace IModal {
350
371
  interface Button<T> {
351
372
  text: string;
352
373
  color?: ThemePalette;
353
- value: Nullable<T>;
374
+ value: Nullable$1<T>;
354
375
  appearance?: 'standard' | 'raised' | 'flat' | 'stroked' | 'fab' | 'mini-fab';
355
376
  validateSelect?: boolean;
356
377
  assignSelectedValue?: boolean;
@@ -383,11 +404,11 @@ declare namespace IModal {
383
404
  value: T;
384
405
  message: string;
385
406
  }
386
- type ConfirmResponsePredicate<T> = (answer: Nullable<IModal.DataAnswer<T>>) => boolean;
407
+ type ConfirmResponsePredicate<T> = (answer: Nullable$1<IModal.DataAnswer<T>>) => boolean;
387
408
  interface ConfirmResponse<T> {
388
- on(predicate: ConfirmResponsePredicate<T>): Observable<Nullable<IModal.DataAnswer<T>>>;
389
- onCancel(cancel?: ConfirmResponsePredicate<T>): Observable<Nullable<IModal.DataAnswer<T>>>;
390
- 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>>>;
391
412
  }
392
413
  }
393
414
 
@@ -432,6 +453,21 @@ declare class RtuiScrollableContainerComponent {
432
453
  static ɵcmp: i0.ɵɵComponentDeclaration<RtuiScrollableContainerComponent, "rtui-scrollable", never, {}, {}, ["headerTpl", "contentTpl", "footerTpl"], never, true, never>;
433
454
  }
434
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
+
435
471
  declare class RtuiSideMenuHeaderDirective {
436
472
  static ɵfac: i0.ɵɵFactoryDeclaration<RtuiSideMenuHeaderDirective, never>;
437
473
  static ɵdir: i0.ɵɵDirectiveDeclaration<RtuiSideMenuHeaderDirective, "[rtuiSideMenuHeader]", never, {}, {}, never, never, true, never>;
@@ -491,6 +527,40 @@ declare class RtuiSpinnerComponent {
491
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>;
492
528
  }
493
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
+
494
564
  declare class RtAsideService {
495
565
  #private;
496
566
  /**
@@ -506,7 +576,7 @@ declare class RtAsideService {
506
576
  *
507
577
  * @returns An observable that emits the response from the aside panel when it is closed.
508
578
  */
509
- 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>;
510
580
  static ɵfac: i0.ɵɵFactoryDeclaration<RtAsideService, never>;
511
581
  static ɵprov: i0.ɵɵInjectableDeclaration<RtAsideService>;
512
582
  }
@@ -1871,5 +1941,5 @@ declare class RtActionBarService {
1871
1941
  static ɵprov: i0.ɵɵInjectableDeclaration<RtActionBarService>;
1872
1942
  }
1873
1943
 
1874
- 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 };
1875
- export type { ButtonAppearanceType, ButtonColorType, ButtonSizeType, FilterModel, FilterOperatorType, IBemConfig, IIDBStorageServiceInterface, IImageUploadFormat, IInfoBadgeSizeType, IModsObject, IRtuiTable, IStorageConfig, IStorageConverter, IconSideType, InfoBadgeType, ListSortOrderType, ListState, MenuItemTrigger, PageModel, SortModel, StorageType, ToggleSizeType };
1944
+ export { ASIDE_BUTTONS_ENUM, ASIDE_REF, AsideRef, BUTTON_APPEARANCE, BUTTON_COLOR, BUTTON_SIZE, BlockDirective, CUSTOM_STORAGE, ConcatClassesPipe, DEFAULT_PAGE_MODEL, DEFAULT_PAGE_SIZE, ElemDirective, FILTER_OPERATORS, FILTER_OPERATOR_TYPE_ENUM, IAside, IDBStorageService, IDB_STORAGE_SERVICE_TOKEN, IModal, INFO_BADGE_SIZE_ENUM, INFO_BADGE_TYPE_ENUM, IN_MEMORY_STORAGE, IRtActionBar, IRtSnackBar, ISideMenu, ITable, InMemoryStorageService, JsonConverter, LIST_SORT_ORDER_ENUM, 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 };
1945
+ export type { AsideButtonsType, AsidePositions, ButtonAppearanceType, ButtonColorType, ButtonSizeType, FilterModel, FilterOperatorType, IBemConfig, IIDBStorageServiceInterface, IImageUploadFormat, IInfoBadgeSizeType, IModsObject, IRtuiTable, IStorageConfig, IStorageConverter, Icon, IconSideType, InfoBadgeType, ListSortOrderType, ListState, MenuItemTrigger, ModalWindowSizeType, NameValueType, PageModel, Select, SortModel, StorageType, ToggleSizeType };
Binary file