@sd-angular/core 19.0.49 → 19.0.51

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.
Files changed (24) hide show
  1. package/components/badge/src/badge.component.d.ts +9 -2
  2. package/components/modal/src/modal.component.d.ts +10 -1
  3. package/directives/src/sd-scroll-pointer.service.d.ts +18 -0
  4. package/directives/src/sd-scroll.directive.d.ts +3 -1
  5. package/fesm2022/sd-angular-core-components-badge.mjs +40 -23
  6. package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
  7. package/fesm2022/sd-angular-core-components-form-generic.mjs +9 -9
  8. package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
  9. package/fesm2022/sd-angular-core-components-import-excel.mjs +1 -1
  10. package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
  11. package/fesm2022/sd-angular-core-components-modal.mjs +20 -3
  12. package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
  13. package/fesm2022/sd-angular-core-components-table.mjs +2 -2
  14. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  15. package/fesm2022/sd-angular-core-components-upload-file.mjs +1 -1
  16. package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
  17. package/fesm2022/sd-angular-core-directives.mjs +111 -25
  18. package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
  19. package/fesm2022/sd-angular-core-services-confirm.mjs +114 -122
  20. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  21. package/package.json +9 -9
  22. package/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.d.ts +4 -1
  23. package/services/confirm/src/lib/confirm.service.d.ts +24 -8
  24. package/services/confirm/src/public-api.d.ts +0 -1
@@ -1,20 +1,38 @@
1
1
  import { MatDialog } from '@angular/material/dialog';
2
2
  import { Color } from '@sdcorejs/utils/models';
3
3
  import * as i0 from "@angular/core";
4
+ /** Option dùng chung cho mọi method của `SdConfirmService`. */
5
+ interface ConfirmDisplayOption {
6
+ /**
7
+ * Ép kiểu hiển thị. Không truyền: tự dùng `bottom-sheet` trên mobile và `dialog` trên desktop.
8
+ */
9
+ view?: 'dialog' | 'bottom-sheet';
10
+ /**
11
+ * Cho phép đóng bằng cách bấm nền hoặc phím Esc. Không truyền = `false`.
12
+ * Khi được truyền, cờ này quyết định và `disableBackdropClose` bị bỏ qua.
13
+ * Đóng theo cách này làm Promise reject `'CANCEL'`.
14
+ */
15
+ enableBackdropClose?: boolean;
16
+ /**
17
+ * Chặn đóng bằng nền và phím Esc. Mặc định `true`.
18
+ * @deprecated Dùng `enableBackdropClose` (nghĩa ngược lại). Cờ này chỉ có hiệu lực khi không truyền `enableBackdropClose`.
19
+ */
20
+ disableBackdropClose?: boolean;
21
+ }
4
22
  export declare class SdConfirmService {
5
23
  #private;
6
24
  private dialog;
7
25
  constructor(dialog: MatDialog);
8
- confirm: (message: string, option?: {
26
+ confirm: (message: string, option?: ConfirmDisplayOption & {
9
27
  title?: string;
10
28
  yesTitle?: string;
11
29
  noTitle?: string;
12
30
  yesButtonColor?: Color;
13
31
  noButtonColor?: Color;
32
+ /** Chiều rộng dialog. Không áp dụng cho bottom sheet (luôn full-width). */
14
33
  width?: string;
15
- disableBackdropClose?: boolean;
16
34
  }) => Promise<unknown>;
17
- withInput: (message?: string, option?: {
35
+ withInput: (message?: string, option?: ConfirmDisplayOption & {
18
36
  title?: string;
19
37
  yesTitle?: string;
20
38
  noTitle?: string;
@@ -23,9 +41,8 @@ export declare class SdConfirmService {
23
41
  yesButtonColor?: Color;
24
42
  noButtonColor?: Color;
25
43
  defaultValue?: string;
26
- disableBackdropClose?: boolean;
27
44
  }) => Promise<string>;
28
- withRadio: (message?: string, option?: {
45
+ withRadio: (message?: string, option?: ConfirmDisplayOption & {
29
46
  title?: string;
30
47
  yesTitle?: string;
31
48
  noTitle?: string;
@@ -37,9 +54,8 @@ export declare class SdConfirmService {
37
54
  valueField: string;
38
55
  displayField: string;
39
56
  display?: "row" | "column";
40
- disableBackdropClose?: boolean;
41
57
  }) => Promise<string>;
42
- withDate: (message?: string, option?: {
58
+ withDate: (message?: string, option?: ConfirmDisplayOption & {
43
59
  title?: string;
44
60
  yesTitle?: string;
45
61
  noTitle?: string;
@@ -48,8 +64,8 @@ export declare class SdConfirmService {
48
64
  noButtonColor?: Color;
49
65
  defaultValue?: string | Date;
50
66
  placeholder?: string;
51
- disableBackdropClose?: boolean;
52
67
  }) => Promise<string>;
53
68
  static ɵfac: i0.ɵɵFactoryDeclaration<SdConfirmService, never>;
54
69
  static ɵprov: i0.ɵɵInjectableDeclaration<SdConfirmService>;
55
70
  }
71
+ export {};
@@ -1,2 +1 @@
1
- export * from './lib/components/dialog-confirm/dialog-confirm.component';
2
1
  export * from './lib/confirm.service';