@posiwise/shared-components 0.0.171 → 0.0.173

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": "@posiwise/shared-components",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.6",
6
6
  "@angular/core": "^21.2.6",
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, EventEmitter, Injector, ChangeDetectorRef, OnInit, OnDestroy, AfterViewInit, OnChanges, ElementRef, SimpleChanges, Type, ViewContainerRef, AfterContentInit } from '@angular/core';
2
+ import { TemplateRef, ElementRef, EventEmitter, Injector, ChangeDetectorRef, OnInit, OnDestroy, AfterViewInit, OnChanges, SimpleChanges, Type, ViewContainerRef, AfterContentInit } from '@angular/core';
3
+ import * as i32 from '@ng-bootstrap/ng-bootstrap';
4
+ import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
3
5
  import { AppBaseComponent } from '@posiwise/app-base-component';
4
- import * as i31 from '@ng-bootstrap/ng-bootstrap';
5
- import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
6
6
  import { MenuItem } from 'primeng/api';
7
7
  import moment from 'moment';
8
- import * as i41 from 'ngx-daterangepicker-material';
8
+ import * as i42 from 'ngx-daterangepicker-material';
9
9
  import { DaterangepickerDirective } from 'ngx-daterangepicker-material';
10
10
  import { DomSanitizer } from '@angular/platform-browser';
11
11
  import { AdminService } from '@posiwise/admin-module-utils';
@@ -14,7 +14,7 @@ import { AppConfigService } from '@posiwise/app-config-service';
14
14
  import { AuthService, MCPFieldDiff, MCPOrchestratorService, LocalStorage, BrainSocketService, GroupService, SubscriptionService, DataService, NumberPickerService, FeatureFlagService, UserService, PermissionService, MainApiHttpService } from '@posiwise/common-services';
15
15
  import * as rxjs from 'rxjs';
16
16
  import { Observable } from 'rxjs';
17
- import * as i30 from '@angular/router';
17
+ import * as i31 from '@angular/router';
18
18
  import { Router } from '@angular/router';
19
19
  import { AppState } from '@posiwise/app-store';
20
20
  import { Store } from '@ngrx/store';
@@ -23,21 +23,62 @@ import { UntypedFormGroup, UntypedFormBuilder, AbstractControl, ControlContainer
23
23
  import * as i7 from '@posiwise/app-loader';
24
24
  import * as i9 from '@posiwise/directives';
25
25
  import * as i8 from '@posiwise/core-transloco';
26
- import * as i32 from 'primeng/table';
27
- import * as i33 from 'primeng/tabs';
26
+ import * as i33 from 'primeng/table';
27
+ import * as i34 from 'primeng/tabs';
28
28
  import * as i10 from 'primeng/button';
29
- import * as i35 from 'primeng/select';
30
- import * as i36 from 'primeng/multiselect';
29
+ import * as i36 from 'primeng/select';
30
+ import * as i37 from 'primeng/multiselect';
31
31
  import * as i13 from 'primeng/progressspinner';
32
32
  import * as i14 from 'primeng/autocomplete';
33
- import * as i39 from 'ngx-image-cropper';
34
- import * as i40 from 'ngx-ui-switch';
35
- import * as i42 from '@posiwise/pipes';
36
- import * as i43 from '@angular/common';
33
+ import * as i40 from 'ngx-image-cropper';
34
+ import * as i41 from 'ngx-ui-switch';
35
+ import * as i43 from '@posiwise/pipes';
36
+ import * as i44 from '@angular/common';
37
37
  import * as i16 from '@posiwise/utils';
38
38
  import * as i12 from 'primeng/tooltip';
39
39
  import * as i15 from '@angular/cdk/drag-drop';
40
40
 
41
+ type ConfirmDialogTone = 'destructive' | 'neutral' | 'info';
42
+ interface ConfirmDialogConfig {
43
+ titleKey?: string;
44
+ title?: string;
45
+ titleParams?: Record<string, unknown>;
46
+ textKey?: string;
47
+ text?: string;
48
+ textParams?: Record<string, unknown>;
49
+ destructive?: boolean;
50
+ confirmOnly?: boolean;
51
+ confirmLabelKey?: string;
52
+ confirmLabel?: string;
53
+ cancelLabelKey?: string;
54
+ cancelLabel?: string;
55
+ icon?: string;
56
+ tone?: ConfirmDialogTone;
57
+ }
58
+
59
+ declare class ConfirmDialogComponent {
60
+ readonly modal: NgbActiveModal;
61
+ config: ConfirmDialogConfig;
62
+ constructor(modal: NgbActiveModal);
63
+ get tone(): ConfirmDialogTone;
64
+ get iconClass(): string;
65
+ get titleKey(): string | null;
66
+ get titleRaw(): string;
67
+ get titleParams(): Record<string, unknown>;
68
+ get textKey(): string | null;
69
+ get textRaw(): string;
70
+ get textParams(): Record<string, unknown>;
71
+ get confirmLabelKey(): string;
72
+ get confirmLabel(): string;
73
+ get cancelLabelKey(): string;
74
+ get cancelLabel(): string;
75
+ get confirmButtonClass(): string;
76
+ confirm(): void;
77
+ cancel(): void;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "pw-confirm-dialog", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, false, never>;
80
+ }
81
+
41
82
  interface SharedModalContext {
42
83
  modal: {
43
84
  dismiss: () => void;
@@ -69,15 +110,20 @@ declare class PasswordValidationComponent extends AppBaseComponent {
69
110
  private readonly modal;
70
111
  private readonly cdr;
71
112
  content: TemplateRef<SharedModalContext>;
113
+ passwordRef: ElementRef<HTMLInputElement>;
72
114
  confirmMessage: string;
115
+ destructive: boolean;
73
116
  successEvent: EventEmitter<boolean>;
74
117
  password: string;
118
+ passwordVisible: boolean;
75
119
  buttonBusy: boolean;
120
+ private modalRef;
76
121
  constructor(injector: Injector, modal: NgbModal, cdr: ChangeDetectorRef);
122
+ get bodyMessage(): string;
77
123
  open(): void;
78
124
  validatePassword(): void;
79
125
  static ɵfac: i0.ɵɵFactoryDeclaration<PasswordValidationComponent, never>;
80
- static ɵcmp: i0.ɵɵComponentDeclaration<PasswordValidationComponent, "pw-password-validation", never, { "confirmMessage": { "alias": "confirmMessage"; "required": false; }; }, { "successEvent": "successEvent"; }, never, ["*"], false, never>;
126
+ static ɵcmp: i0.ɵɵComponentDeclaration<PasswordValidationComponent, "pw-password-validation", never, { "confirmMessage": { "alias": "confirmMessage"; "required": false; }; "destructive": { "alias": "destructive"; "required": false; }; }, { "successEvent": "successEvent"; }, never, ["*"], false, never>;
81
127
  }
82
128
 
83
129
  declare class PwTabsComponent extends AppBaseComponent implements OnInit, OnDestroy {
@@ -575,12 +621,21 @@ declare class EntityGroupComponent extends AppBaseComponent implements OnInit, O
575
621
  static ɵcmp: i0.ɵɵComponentDeclaration<EntityGroupComponent, "pw-entity-group", never, {}, {}, never, never, false, never>;
576
622
  }
577
623
 
624
+ declare class ConfirmDialogService {
625
+ private readonly modal;
626
+ constructor(modal: NgbModal);
627
+ open(config?: ConfirmDialogConfig): Promise<boolean>;
628
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
629
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmDialogService>;
630
+ }
631
+
578
632
  declare class GroupsComponent extends AppBaseComponent implements OnInit, OnDestroy {
579
633
  private readonly fb;
580
634
  private readonly groupService;
581
635
  private readonly subscriptionService;
582
636
  private readonly dataService;
583
637
  private readonly cdr;
638
+ private readonly confirmDialog;
584
639
  private groupsData;
585
640
  subscription: Subscription;
586
641
  message: number;
@@ -610,7 +665,7 @@ declare class GroupsComponent extends AppBaseComponent implements OnInit, OnDest
610
665
  isGroupEdit: boolean;
611
666
  hasAccess: boolean;
612
667
  isLoaded: boolean;
613
- constructor(fb: UntypedFormBuilder, groupService: GroupService, subscriptionService: SubscriptionService, dataService: DataService, injector: Injector, cdr: ChangeDetectorRef);
668
+ constructor(fb: UntypedFormBuilder, groupService: GroupService, subscriptionService: SubscriptionService, dataService: DataService, injector: Injector, cdr: ChangeDetectorRef, confirmDialog: ConfirmDialogService);
614
669
  ngOnInit(): void;
615
670
  /** Function to save group */
616
671
  saveGroup(): void;
@@ -640,6 +695,7 @@ declare class GroupDefinitionComponent extends AppBaseComponent implements OnIni
640
695
  private readonly subscriptionService;
641
696
  private readonly data;
642
697
  private readonly cdr;
698
+ private readonly confirmDialog;
643
699
  subscriptions: any[];
644
700
  message: number;
645
701
  groupDefinition: object[];
@@ -657,7 +713,7 @@ declare class GroupDefinitionComponent extends AppBaseComponent implements OnIni
657
713
  user: User;
658
714
  isLoaded: boolean;
659
715
  categoryBusyButton: boolean;
660
- constructor(groupService: GroupService, fb: UntypedFormBuilder, subscriptionService: SubscriptionService, data: DataService, injector: Injector, cdr: ChangeDetectorRef);
716
+ constructor(groupService: GroupService, fb: UntypedFormBuilder, subscriptionService: SubscriptionService, data: DataService, injector: Injector, cdr: ChangeDetectorRef, confirmDialog: ConfirmDialogService);
661
717
  ngOnInit(): void;
662
718
  private getAllGroupDefinition;
663
719
  private getSubscribedUsers;
@@ -1004,7 +1060,7 @@ declare class RecordsSummaryComponent {
1004
1060
 
1005
1061
  declare class ResourceSharedComponentsModule {
1006
1062
  static ɵfac: i0.ɵɵFactoryDeclaration<ResourceSharedComponentsModule, never>;
1007
- static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedComponentsModule, [typeof NoDataComponent, typeof InputContainerComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent], [typeof i43.CommonModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.AppLoaderModule, typeof i8.CoreTranslocoModule, typeof i9.DirectivesModule, typeof i10.ButtonModule, typeof i31.NgbTooltipModule, typeof i12.TooltipModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i15.DragDropModule, typeof i16.FieldErrorDisplayModule, typeof i16.ProfileImageCropperModule, typeof i16.ResourceHeaderModule], [typeof i16.ProfileImageCropperModule, typeof i16.ResourceHeaderModule, typeof InputContainerComponent, typeof NoDataComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof i10.ButtonModule, typeof i15.DragDropModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i12.TooltipModule, typeof i16.FieldErrorDisplayModule]>;
1063
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ResourceSharedComponentsModule, [typeof NoDataComponent, typeof InputContainerComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent], [typeof i44.CommonModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.AppLoaderModule, typeof i8.CoreTranslocoModule, typeof i9.DirectivesModule, typeof i10.ButtonModule, typeof i32.NgbTooltipModule, typeof i12.TooltipModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i15.DragDropModule, typeof i16.FieldErrorDisplayModule, typeof i16.ProfileImageCropperModule, typeof i16.ResourceHeaderModule], [typeof i16.ProfileImageCropperModule, typeof i16.ResourceHeaderModule, typeof InputContainerComponent, typeof NoDataComponent, typeof CompletionBarComponent, typeof RecordsSummaryComponent, typeof i10.ButtonModule, typeof i15.DragDropModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i12.TooltipModule, typeof i16.FieldErrorDisplayModule]>;
1008
1064
  static ɵinj: i0.ɵɵInjectorDeclaration<ResourceSharedComponentsModule>;
1009
1065
  }
1010
1066
 
@@ -1042,7 +1098,7 @@ declare class CollapsibleSidebarTriggerDirective {
1042
1098
 
1043
1099
  declare class SharedComponentsModule {
1044
1100
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedComponentsModule, never>;
1045
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof PwBrainChatComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof SectionHeadingBlockComponent, typeof DividerBlockComponent, typeof StatCardBlockComponent, typeof DataTableBlockComponent, typeof ChartBlockComponent], [typeof i6.FormsModule, typeof i7.AppLoaderModule, typeof i6.ReactiveFormsModule, typeof i9.DirectivesModule, typeof i8.CoreTranslocoModule, typeof i30.RouterModule, typeof i31.NgbTooltipModule, typeof i31.NgbNavModule, typeof i31.NgbModalModule, typeof i32.TableModule, typeof i33.TabsModule, typeof i10.ButtonModule, typeof i35.SelectModule, typeof i36.MultiSelectModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i39.ImageCropperModule, typeof i40.UiSwitchModule, typeof i41.NgxDaterangepickerMd, typeof i42.PipesModule, typeof i43.CommonModule, typeof i43.NgIf, typeof i16.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule, typeof CollapsibleSidebarTriggerDirective], [typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof i31.NgbTooltipModule, typeof i31.NgbNavModule, typeof i31.NgbModalModule, typeof i32.TableModule, typeof i33.TabsModule, typeof i10.ButtonModule, typeof i35.SelectModule, typeof i36.MultiSelectModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i39.ImageCropperModule, typeof i40.UiSwitchModule, typeof i41.NgxDaterangepickerMd, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof CollapsibleSidebarTriggerDirective, typeof PwBrainChatComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof i16.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule]>;
1101
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedComponentsModule, [typeof ConfirmDialogComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof PwBrainChatComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof SectionHeadingBlockComponent, typeof DividerBlockComponent, typeof StatCardBlockComponent, typeof DataTableBlockComponent, typeof ChartBlockComponent], [typeof i6.FormsModule, typeof i7.AppLoaderModule, typeof i6.ReactiveFormsModule, typeof i9.DirectivesModule, typeof i8.CoreTranslocoModule, typeof i31.RouterModule, typeof i32.NgbTooltipModule, typeof i32.NgbNavModule, typeof i32.NgbModalModule, typeof i33.TableModule, typeof i34.TabsModule, typeof i10.ButtonModule, typeof i36.SelectModule, typeof i37.MultiSelectModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i40.ImageCropperModule, typeof i41.UiSwitchModule, typeof i42.NgxDaterangepickerMd, typeof i43.PipesModule, typeof i44.CommonModule, typeof i44.NgIf, typeof i16.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule, typeof CollapsibleSidebarTriggerDirective], [typeof ConfirmDialogComponent, typeof PasswordValidationComponent, typeof PwTabsComponent, typeof DateRangePickerComponent, typeof i32.NgbTooltipModule, typeof i32.NgbNavModule, typeof i32.NgbModalModule, typeof i33.TableModule, typeof i34.TabsModule, typeof i10.ButtonModule, typeof i36.SelectModule, typeof i37.MultiSelectModule, typeof i13.ProgressSpinnerModule, typeof i14.AutoCompleteModule, typeof i40.ImageCropperModule, typeof i41.UiSwitchModule, typeof i42.NgxDaterangepickerMd, typeof PermissionTreeComponent, typeof PrivacyAndTosComponent, typeof PrivacyPolicyComponent, typeof TermsConditionsComponent, typeof SplashComponent, typeof AuthenticatorComponent, typeof ClearBitIconComponent, typeof ComingSoonComponent, typeof CollapsibleSidebarComponent, typeof CollapsibleSidebarTriggerDirective, typeof PwBrainChatComponent, typeof EntityGroupComponent, typeof GroupsComponent, typeof GroupDefinitionComponent, typeof NumberPickerComponent, typeof HeaderComponent, typeof LandingPageFooterBComponent, typeof PwDynamicPageComponent, typeof i16.FieldErrorDisplayModule, typeof ResourceSharedComponentsModule]>;
1046
1102
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedComponentsModule>;
1047
1103
  }
1048
1104
 
@@ -1097,5 +1153,5 @@ declare const COMPONENT_REGISTRY: Readonly<Record<string, Type<unknown>>>;
1097
1153
  declare function registeredType(type: string): Type<unknown> | null;
1098
1154
  declare function registeredTypeNames(): string[];
1099
1155
 
1100
- export { AuthenticatorComponent, COMPONENT_REGISTRY, ClearBitIconComponent, CollapsibleSidebarComponent, CollapsibleSidebarService, CollapsibleSidebarSuperAdminGuard, CollapsibleSidebarTriggerDirective, ComingSoonComponent, CompletionBarComponent, DateRangePickerComponent, DynamicPageContextService, EntityGroupComponent, GroupDefinitionComponent, GroupsComponent, HeaderComponent, InputContainerComponent, LandingPageFooterBComponent, NoDataComponent, NumberPickerComponent, PasswordValidationComponent, PermissionTreeComponent, PrivacyAndTosComponent, PrivacyPolicyComponent, PwBrainChatComponent, PwDynamicPageComponent, PwTabsComponent, RecordsSummaryComponent, ResourceSharedComponentsModule, SharedComponentsModule, SplashComponent, TermsConditionsComponent, UI_BUILDER_FLAG, UiLayoutService, registeredType, registeredTypeNames };
1101
- export type { ChatMessage, ChatMessageRole, CompletionTier, DynamicPageContext, PendingConfirmation, ResolvedBinding, SidebarContent, UiBinding, UiBlock, UiGrid, UiLayoutConfig, UiLayoutResponse };
1156
+ export { AuthenticatorComponent, COMPONENT_REGISTRY, ClearBitIconComponent, CollapsibleSidebarComponent, CollapsibleSidebarService, CollapsibleSidebarSuperAdminGuard, CollapsibleSidebarTriggerDirective, ComingSoonComponent, CompletionBarComponent, ConfirmDialogComponent, ConfirmDialogService, DateRangePickerComponent, DynamicPageContextService, EntityGroupComponent, GroupDefinitionComponent, GroupsComponent, HeaderComponent, InputContainerComponent, LandingPageFooterBComponent, NoDataComponent, NumberPickerComponent, PasswordValidationComponent, PermissionTreeComponent, PrivacyAndTosComponent, PrivacyPolicyComponent, PwBrainChatComponent, PwDynamicPageComponent, PwTabsComponent, RecordsSummaryComponent, ResourceSharedComponentsModule, SharedComponentsModule, SplashComponent, TermsConditionsComponent, UI_BUILDER_FLAG, UiLayoutService, registeredType, registeredTypeNames };
1157
+ export type { ChatMessage, ChatMessageRole, CompletionTier, ConfirmDialogConfig, ConfirmDialogTone, DynamicPageContext, PendingConfirmation, ResolvedBinding, SidebarContent, UiBinding, UiBlock, UiGrid, UiLayoutConfig, UiLayoutResponse };