osl-base-extended 13.0.0 → 14.0.0

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": "osl-base-extended",
3
- "version": "13.0.0",
3
+ "version": "14.0.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.0",
6
6
  "@angular/core": "^21.2.0"
@@ -47,6 +47,23 @@ declare class DeleteConfirmationData {
47
47
  data?: any;
48
48
  }
49
49
 
50
+ declare class WarningDialog {
51
+ dialogRef: MatDialogRef<WarningDialog>;
52
+ data: WarningDialogData;
53
+ constructor(dialogRef: MatDialogRef<WarningDialog>, data: WarningDialogData);
54
+ confirm(): void;
55
+ cancel(): void;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<WarningDialog, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<WarningDialog, "warning-dialog", never, {}, {}, never, never, true, never>;
58
+ }
59
+ declare class WarningDialogData {
60
+ title: string;
61
+ message: string;
62
+ yesText: string;
63
+ noText: string;
64
+ data?: any;
65
+ }
66
+
50
67
  declare class baseComponent {
51
68
  private _injector;
52
69
  protected showSuccess(message: any): void;
@@ -55,6 +72,7 @@ declare class baseComponent {
55
72
  private showSnack;
56
73
  protected openDialog(header?: string | TemplateRef<any>, formBody?: TemplateRef<any>, formFooter?: TemplateRef<any>, width?: string, data?: any, component?: any, isDraggable?: boolean): MatDialogRef<any>;
57
74
  protected openDeleteDialog(message?: string, title?: string, confirmText?: string, cancelText?: string, data?: any): MatDialogRef<DeleteConfirmation>;
75
+ protected openWarningDialog(title: string, message: string, onYesClick?: () => void, onClose?: () => void, yesText?: string, noText?: string, data?: any): MatDialogRef<WarningDialog>;
58
76
  protected isValidBeforeSave<T>(formElements: T[], model: any): string[];
59
77
  protected isValidFormGrid(columns: {
60
78
  key: string;
@@ -647,7 +665,7 @@ interface OslMenuAction {
647
665
  label: string;
648
666
  labelIf?: (row: any) => string;
649
667
  hideIf?: (row: any) => boolean;
650
- click: (row: any) => void;
668
+ click: (row: any) => void | Promise<any>;
651
669
  }
652
670
  interface OslSortEvent {
653
671
  key: string;
@@ -697,10 +715,12 @@ declare class OslGrid implements OnChanges {
697
715
  top: number;
698
716
  left: number;
699
717
  };
718
+ loadingActionIndex: number | null;
700
719
  private _restorePage;
701
720
  onDocumentClick(): void;
702
721
  toggleMenu(index: number, event: Event): void;
703
722
  closeMenu(): void;
723
+ onActionClick(action: OslMenuAction, row: any, index: number): Promise<void>;
704
724
  get skeletonRows(): number[];
705
725
  get skeletonColumns(): number[];
706
726
  get _total(): number;
@@ -813,11 +833,13 @@ declare class OslSetup implements OnInit, OnChanges, AfterViewInit {
813
833
  top: number;
814
834
  left: number;
815
835
  };
836
+ cardLoadingActionIndex: number | null;
816
837
  headerMenuOpen: boolean;
817
838
  headerMenuPosition: {
818
839
  top: number;
819
840
  left: number;
820
841
  };
842
+ headerLoadingActionIndex: number | null;
821
843
  onDocumentClick(): void;
822
844
  get hasForm(): boolean;
823
845
  get _effectiveCardPageSize(): number;
@@ -841,8 +863,10 @@ declare class OslSetup implements OnInit, OnChanges, AfterViewInit {
841
863
  private _loadViewMode;
842
864
  toggleView(mode: 'table' | 'card'): void;
843
865
  toggleCardMenu(index: number, event: Event): void;
866
+ onCardActionClick(action: OslMenuAction, row: any, index: number): Promise<void>;
844
867
  get hasVisibleHeaderActions(): boolean;
845
868
  toggleHeaderMenu(event: Event): void;
869
+ onHeaderActionClick(action: OslMenuAction, index: number): Promise<void>;
846
870
  isHighlightedCard(row: any): boolean;
847
871
  getCellValue(row: any, col: OslGridColumn): string;
848
872
  getCardInitial(row: any): string;
@@ -1315,9 +1339,11 @@ declare class OslReportForm implements OnInit {
1315
1339
  top: number;
1316
1340
  left: number;
1317
1341
  };
1342
+ moreMenuLoadingActionIndex: number | null;
1318
1343
  onDocumentClick(): void;
1319
1344
  get hasVisibleMoreMenuActions(): boolean;
1320
1345
  toggleMoreMenu(event: Event): void;
1346
+ onMoreMenuActionClick(action: OslMenuAction, index: number): Promise<void>;
1321
1347
  ngOnInit(): void;
1322
1348
  selectType(type: ReportGenerateType): void;
1323
1349
  generate(): Promise<void>;
@@ -1376,6 +1402,19 @@ declare class OslMenuTriggerFor implements OnDestroy {
1376
1402
  static ɵfac: i0.ɵɵFactoryDeclaration<OslMenuTriggerFor, never>;
1377
1403
  static ɵdir: i0.ɵɵDirectiveDeclaration<OslMenuTriggerFor, "[oslMenuTriggerFor]", never, { "menu": { "alias": "oslMenuTriggerFor"; "required": false; }; }, {}, never, never, false, never>;
1378
1404
  }
1405
+ /**
1406
+ * Apply to a `.osl-menu-item` button to give it a built-in loading state:
1407
+ * `<button class="osl-menu-item" osl-menu-item [loading]="isSaving" (click)="save()">…</button>`
1408
+ * While `loading` is true the button is disabled and its content is replaced with a spinner,
1409
+ * regardless of what was projected inside it.
1410
+ */
1411
+ declare class OslMenuItem {
1412
+ loading: boolean;
1413
+ get isLoading(): boolean;
1414
+ get isDisabled(): boolean;
1415
+ static ɵfac: i0.ɵɵFactoryDeclaration<OslMenuItem, never>;
1416
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OslMenuItem, "[osl-menu-item]", never, { "loading": { "alias": "loading"; "required": false; }; }, {}, never, never, false, never>;
1417
+ }
1379
1418
 
1380
1419
  interface OslSavedDocument {
1381
1420
  id: any;
@@ -1561,7 +1600,7 @@ declare class OslTooltipDirective implements OnDestroy {
1561
1600
 
1562
1601
  declare class FormStructureModule {
1563
1602
  static ɵfac: i0.ɵɵFactoryDeclaration<FormStructureModule, never>;
1564
- static ɵmod: i0.ɵɵNgModuleDeclaration<FormStructureModule, [typeof DynamicForm, typeof Oslinput, typeof Osltextarea, typeof OslSelect, typeof OslRadio, typeof OslSlideToggle, typeof OslAutocomplete, typeof OslFileUpload, typeof OslDatepicker, typeof OslDatetimepicker, typeof OslCheckbox, typeof OslButton, typeof OslSetup, typeof OslSearchbar, typeof OslGrid, typeof OslFormGrid, typeof OslAutocompleteLister, typeof OslReportGrid, typeof OslReportForm, typeof OslUserLog, typeof OslMenu, typeof OslMenuTriggerFor, typeof OslDocumentUploader], [typeof i23.NgTemplateOutlet, typeof i23.NgStyle, typeof i23.NgClass, typeof i23.DatePipe, typeof i23.DecimalPipe, typeof i23.UpperCasePipe, typeof i24.FormsModule, typeof i24.ReactiveFormsModule, typeof i25.MatFormFieldModule, typeof i26.MatInputModule, typeof i25.MatHint, typeof i27.MatIconModule, typeof i28.MatDialogModule, typeof i29.MatButtonModule, typeof OslSkeletonModule, typeof OslTooltipDirective, typeof i32.MatDatepickerModule, typeof i33.MatMenuModule, typeof i34.DragDropModule, typeof i35.MatTooltipModule, typeof i36.OverlayModule, typeof i37.PortalModule, typeof i38.NgxMatDatetimepicker, typeof i38.NgxMatDatepickerInput], [typeof DynamicForm, typeof OslSetup, typeof OslGrid, typeof OslFormGrid, typeof Oslinput, typeof OslUserLog, typeof Osltextarea, typeof OslSelect, typeof OslRadio, typeof OslSlideToggle, typeof OslAutocomplete, typeof OslFileUpload, typeof OslDatepicker, typeof OslDatetimepicker, typeof OslCheckbox, typeof OslButton, typeof OslSetup, typeof OslSearchbar, typeof OslAutocompleteLister, typeof OslReportGrid, typeof OslReportForm, typeof OslMenu, typeof OslMenuTriggerFor, typeof OslDocumentUploader, typeof OslTooltipDirective]>;
1603
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormStructureModule, [typeof DynamicForm, typeof Oslinput, typeof Osltextarea, typeof OslSelect, typeof OslRadio, typeof OslSlideToggle, typeof OslAutocomplete, typeof OslFileUpload, typeof OslDatepicker, typeof OslDatetimepicker, typeof OslCheckbox, typeof OslButton, typeof OslSetup, typeof OslSearchbar, typeof OslGrid, typeof OslFormGrid, typeof OslAutocompleteLister, typeof OslReportGrid, typeof OslReportForm, typeof OslUserLog, typeof OslMenu, typeof OslMenuTriggerFor, typeof OslMenuItem, typeof OslDocumentUploader], [typeof i23.NgTemplateOutlet, typeof i23.NgStyle, typeof i23.NgClass, typeof i23.DatePipe, typeof i23.DecimalPipe, typeof i23.UpperCasePipe, typeof i24.FormsModule, typeof i24.ReactiveFormsModule, typeof i25.MatFormFieldModule, typeof i26.MatInputModule, typeof i25.MatHint, typeof i27.MatIconModule, typeof i28.MatDialogModule, typeof i29.MatButtonModule, typeof OslSkeletonModule, typeof OslTooltipDirective, typeof i32.MatDatepickerModule, typeof i33.MatMenuModule, typeof i34.DragDropModule, typeof i35.MatTooltipModule, typeof i36.OverlayModule, typeof i37.PortalModule, typeof i38.NgxMatDatetimepicker, typeof i38.NgxMatDatepickerInput], [typeof DynamicForm, typeof OslSetup, typeof OslGrid, typeof OslFormGrid, typeof Oslinput, typeof OslUserLog, typeof Osltextarea, typeof OslSelect, typeof OslRadio, typeof OslSlideToggle, typeof OslAutocomplete, typeof OslFileUpload, typeof OslDatepicker, typeof OslDatetimepicker, typeof OslCheckbox, typeof OslButton, typeof OslSetup, typeof OslSearchbar, typeof OslAutocompleteLister, typeof OslReportGrid, typeof OslReportForm, typeof OslMenu, typeof OslMenuTriggerFor, typeof OslMenuItem, typeof OslDocumentUploader, typeof OslTooltipDirective]>;
1565
1604
  static ɵinj: i0.ɵɵInjectorDeclaration<FormStructureModule>;
1566
1605
  }
1567
1606
 
@@ -2471,5 +2510,5 @@ declare class ErrorDialog {
2471
2510
  static ɵcmp: i0.ɵɵComponentDeclaration<ErrorDialog, "error-dialog", never, {}, {}, never, never, true, never>;
2472
2511
  }
2473
2512
 
2474
- export { array_util_d as ArrayUtil, date_util_d as DateUtil, DeleteConfirmation, DeleteConfirmationData, Dialog, DialogWrapper, DirtyStateService, DynamicForm, ErrorDialog, FormStructureModule, Httpbase, number_util_d as NumberUtil, OSL_ATTACH_CALLER_IP, object_util_d as ObjectUtil, OslAutocomplete, OslAutocompleteLister, OslBaseExtended, OslButton, OslCheckbox, OslDatepicker, OslDatetimepicker, OslDocumentUploader, OslFileUpload, OslFormGrid, OslGrid, OslMenu, OslMenuTriggerFor, OslRadio, OslReportForm, OslReportGrid, OslSearchbar, OslSelect, OslSetup, OslSkeletonDirective, OslSkeletonModule, OslSkeletonThemeService, OslSlideToggle, OslTooltipDirective, OslUserLog, Oslinput, Osltextarea, storage_util_d as StorageUtil, string_util_d as StringUtil, UnsavedChangesDialog, validation_util_d as ValidationUtil, baseComponent, provideCallerIpHeader, unsavedChangesGuard };
2513
+ export { array_util_d as ArrayUtil, date_util_d as DateUtil, DeleteConfirmation, DeleteConfirmationData, Dialog, DialogWrapper, DirtyStateService, DynamicForm, ErrorDialog, FormStructureModule, Httpbase, number_util_d as NumberUtil, OSL_ATTACH_CALLER_IP, object_util_d as ObjectUtil, OslAutocomplete, OslAutocompleteLister, OslBaseExtended, OslButton, OslCheckbox, OslDatepicker, OslDatetimepicker, OslDocumentUploader, OslFileUpload, OslFormGrid, OslGrid, OslMenu, OslMenuItem, OslMenuTriggerFor, OslRadio, OslReportForm, OslReportGrid, OslSearchbar, OslSelect, OslSetup, OslSkeletonDirective, OslSkeletonModule, OslSkeletonThemeService, OslSlideToggle, OslTooltipDirective, OslUserLog, Oslinput, Osltextarea, storage_util_d as StorageUtil, string_util_d as StringUtil, UnsavedChangesDialog, validation_util_d as ValidationUtil, WarningDialog, WarningDialogData, baseComponent, provideCallerIpHeader, unsavedChangesGuard };
2475
2514
  export type { ButtonSize, ButtonVariant, DateInputType, DragColumn, DragDropPayload, DragItem, ErrorDialogData, FlatRow, HttpResponse, InputType, InternalColumn, OslDisplayType, OslFileValue, OslFormGridColumn, OslFormGridFooterColumn, OslFormGridRowEvent, OslGridColumn, OslMenuAction, OslMenuPosition, OslPageEvent, OslPdfConfig, OslReportColumn, OslReportPageEvent, OslReportSortEvent, OslSavedDocument, OslSetupSaveEvent, OslSortEvent, PanelPageEvent, PanelSearchEvent, PasswordOptions, ReportGenerateType, SkeletonAnimation, SkeletonTheme, SkeletonType, TextareaResize, UnsavedChangesDialogData, UserLogMeta, elements, myParams, oslListerData };