@smartsoft001/angular 2.203.0 → 2.205.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": "@smartsoft001/angular",
3
- "version": "2.203.0",
3
+ "version": "2.205.0",
4
4
  "description": "The Angular UI library: standalone smart-* components, the services, pipes and providers behind them, and the form factory that turns model metadata into a reactive form.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,9 +24,9 @@
24
24
  "@ngrx/effects": "^22.0.1",
25
25
  "@ngrx/store": "^22.0.1",
26
26
  "@ngx-translate/core": "^17.0.0",
27
- "@smartsoft001/domain-core": "2.203.0",
28
- "@smartsoft001/models": "2.203.0",
29
- "@smartsoft001/utils": "2.203.0",
27
+ "@smartsoft001/domain-core": "2.205.0",
28
+ "@smartsoft001/models": "2.205.0",
29
+ "@smartsoft001/utils": "2.205.0",
30
30
  "ng-dynamic-component": "^11.0.0",
31
31
  "ng-lazyload-image": "^9.1.3",
32
32
  "ngx-color-picker": "^20.1.1",
package/styles.css CHANGED
@@ -204,6 +204,7 @@
204
204
  --smart-container-md: 28rem;
205
205
  --smart-container-lg: 32rem;
206
206
  --smart-container-xl: 36rem;
207
+ --smart-container-2xl: 42rem;
207
208
  --smart-container-3xl: 48rem;
208
209
  --smart-container-4xl: 56rem;
209
210
  --smart-container-5xl: 64rem;
@@ -472,6 +473,9 @@
472
473
  .smart\:top-16 {
473
474
  top: calc(var(--smart-spacing) * 16);
474
475
  }
476
+ .smart\:top-auto {
477
+ top: auto;
478
+ }
475
479
  .smart\:top-full {
476
480
  top: 100%;
477
481
  }
@@ -529,6 +533,9 @@
529
533
  .smart\:z-\[90\] {
530
534
  z-index: 90;
531
535
  }
536
+ .smart\:z-\[100\] {
537
+ z-index: 100;
538
+ }
532
539
  .smart\:order-first {
533
540
  order: -9999;
534
541
  }
@@ -544,6 +551,9 @@
544
551
  .smart\:-m-2 {
545
552
  margin: calc(var(--smart-spacing) * -2);
546
553
  }
554
+ .smart\:m-0 {
555
+ margin: 0px;
556
+ }
547
557
  .smart\:m-2 {
548
558
  margin: calc(var(--smart-spacing) * 2);
549
559
  }
@@ -872,6 +882,9 @@
872
882
  .smart\:max-h-96 {
873
883
  max-height: calc(var(--smart-spacing) * 96);
874
884
  }
885
+ .smart\:max-h-\[85dvh\] {
886
+ max-height: 85dvh;
887
+ }
875
888
  .smart\:min-h-9\.5 {
876
889
  min-height: calc(var(--smart-spacing) * 9.5);
877
890
  }
@@ -1990,6 +2003,9 @@
1990
2003
  .smart\:pb-8 {
1991
2004
  padding-bottom: calc(var(--smart-spacing) * 8);
1992
2005
  }
2006
+ .smart\:pb-\[env\(safe-area-inset-bottom\)\] {
2007
+ padding-bottom: env(safe-area-inset-bottom);
2008
+ }
1993
2009
  .smart\:pb-px {
1994
2010
  padding-bottom: 1px;
1995
2011
  }
@@ -3706,6 +3722,9 @@
3706
3722
  .smart\:sm\:w-full {
3707
3723
  width: 100%;
3708
3724
  }
3725
+ .smart\:sm\:max-w-2xl {
3726
+ max-width: var(--smart-container-2xl);
3727
+ }
3709
3728
  .smart\:sm\:max-w-lg {
3710
3729
  max-width: var(--smart-container-lg);
3711
3730
  }
@@ -3768,6 +3787,14 @@
3768
3787
  .smart\:sm\:rounded-xl {
3769
3788
  border-radius: var(--smart-radius-xl);
3770
3789
  }
3790
+ .smart\:sm\:rounded-t-xl {
3791
+ border-top-left-radius: var(--smart-radius-xl);
3792
+ border-top-right-radius: var(--smart-radius-xl);
3793
+ }
3794
+ .smart\:sm\:border-x {
3795
+ border-inline-style: var(--tw-border-style);
3796
+ border-inline-width: 1px;
3797
+ }
3771
3798
  .smart\:sm\:p-5 {
3772
3799
  padding: calc(var(--smart-spacing) * 5);
3773
3800
  }
@@ -448,7 +448,7 @@ export interface ICommandPaletteOptions {
448
448
  emptyText?: string;
449
449
  ariaLabel?: string;
450
450
  }
451
- export type SmartModalVariant = 'centered' | 'wide' | 'alert' | 'left-aligned-buttons';
451
+ export type SmartModalVariant = 'centered' | 'wide' | 'alert' | 'left-aligned-buttons' | 'bottom-sheet';
452
452
  export type SmartModalActionVariant = 'primary' | 'secondary' | 'danger';
453
453
  export type SmartModalFooterStyle = 'default' | 'gray';
454
454
  export interface IModalAction {
@@ -1200,26 +1200,67 @@ export declare class StyleService {
1200
1200
  static ɵfac: i0.ɵɵFactoryDeclaration<StyleService, never>;
1201
1201
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1202
1202
  }
1203
- export declare class ToastService {
1204
- static lockError: number;
1205
- addLockError(): void;
1206
- removeLockError(): void;
1207
- error(config: IToastOptions): Promise<void>;
1208
- info(config: IToastOptions): Promise<void>;
1209
- static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
1210
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1211
- }
1212
1203
  export interface IToastOptions {
1213
1204
  title?: string;
1214
1205
  message: string;
1206
+ /**
1207
+ * Milliseconds before the toast closes itself; 2000 when it is missing,
1208
+ * zero or negative.
1209
+ */
1215
1210
  duration?: number;
1216
1211
  buttons?: Array<IToastButton>;
1217
1212
  }
1218
1213
  export interface IToastButton {
1219
1214
  text: string;
1215
+ /** Kept for compatibility; the actions render in the order given. */
1220
1216
  position: 'start' | 'end';
1217
+ /** Runs on a click on the button; the toast closes afterwards. */
1221
1218
  handler: () => void;
1222
1219
  }
1220
+ export interface IToast extends IToastOptions {
1221
+ id: number;
1222
+ type: 'error' | 'info';
1223
+ }
1224
+ /**
1225
+ * Short messages shown at the bottom of the screen. The toasts render at the
1226
+ * end of `<body>`, in a stack fixed to the bottom of the viewport, each
1227
+ * through `<smart-notification>` (the implementation registered for
1228
+ * `NOTIFICATION_STANDARD_COMPONENT_TOKEN`, so the preset with
1229
+ * `provideSmartPresets()`). A toast closes itself after its `duration`, on its
1230
+ * close button or after one of its buttons ran its handler. Error toasts are
1231
+ * announced assertively, info toasts politely. While an error lock is held
1232
+ * (`addLockError`), error toasts are swallowed, e.g. during a sign-out that
1233
+ * makes every pending request fail.
1234
+ */
1235
+ export declare class ToastService implements OnDestroy {
1236
+ /** The error locks held, shared by every instance. */
1237
+ static lockError: number;
1238
+ private readonly appRef;
1239
+ private readonly environmentInjector;
1240
+ private readonly document;
1241
+ private readonly queue;
1242
+ private readonly timers;
1243
+ private host;
1244
+ private nextId;
1245
+ /** The toasts shown, oldest first. */
1246
+ readonly toasts: Signal<IToast[]>;
1247
+ addLockError(): void;
1248
+ /** Releases one error lock; the count does not go below zero. */
1249
+ removeLockError(): void;
1250
+ error(config: IToastOptions): Promise<void>;
1251
+ info(config: IToastOptions): Promise<void>;
1252
+ /** Closes the toast `id`. */
1253
+ dismiss(id: number): void;
1254
+ ngOnDestroy(): void;
1255
+ private push;
1256
+ private runAction;
1257
+ /** Shows the queue: mounts the host for the first toast, removes it after the last one. */
1258
+ private render;
1259
+ private createHost;
1260
+ private destroyHost;
1261
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
1262
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1263
+ }
1223
1264
  /** What `HardwareService.onBackButtonClick` returns. */
1224
1265
  export interface IBackButtonHandle {
1225
1266
  /** Stops calling the callback. */
@@ -1289,7 +1330,11 @@ export interface IModalServiceOptions {
1289
1330
  * declare as inputs are left out.
1290
1331
  */
1291
1332
  props?: any;
1292
- /** `'bottom'` adds the `smart-modal-bottom` class to the modal. */
1333
+ /**
1334
+ * `'bottom'` opens the modal as a bottom sheet (the `'bottom-sheet'` modal
1335
+ * variant: docked to the bottom of the viewport, full width up to a max
1336
+ * width) and adds the `smart-modal-bottom` class to it.
1337
+ */
1293
1338
  mode?: 'default' | 'bottom';
1294
1339
  /** Classes added to the modal (`<smart-modal class>`). */
1295
1340
  cssClass?: string[];
@@ -1320,7 +1365,8 @@ export interface IModal {
1320
1365
  *
1321
1366
  * The component gets `props` as its inputs and, when it declares one, a
1322
1367
  * `dismiss` input with the function that closes its modal. It can also inject
1323
- * `ModalService` and call `dismiss(data)`. The modal shows its close button;
1368
+ * `ModalService` and call `dismiss(data)`. `mode: 'bottom'` opens it as a
1369
+ * bottom sheet (the `'bottom-sheet'` variant). The modal shows its close button;
1324
1370
  * closing it by the close button, the backdrop or Escape (as the modal
1325
1371
  * implementation provides them) resolves `onDidDismiss()` with
1326
1372
  * `{ data: null }`.
@@ -1368,12 +1414,23 @@ export declare class AlertService {
1368
1414
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
1369
1415
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1370
1416
  }
1417
+ /**
1418
+ * Kept for compatibility: the library opens no popovers, so there is nothing
1419
+ * for `close()` to close.
1420
+ */
1371
1421
  export declare class PopoverService {
1422
+ /** Does nothing and resolves; the library has no popover to close. */
1372
1423
  close(): Promise<void>;
1373
1424
  static ɵfac: i0.ɵɵFactoryDeclaration<PopoverService, never>;
1374
1425
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1375
1426
  }
1376
1427
  export declare class UIService {
1428
+ private readonly alertService;
1429
+ /**
1430
+ * Shows an alert with `heading`, `msg` and one `btnText` button through
1431
+ * `AlertService`, and calls `callback` once it is closed (by its button,
1432
+ * Escape or a click on the backdrop). Resolves once the alert is shown.
1433
+ */
1377
1434
  showAlertWithDismissCallback(heading: string, msg: string, btnText: string, callback: () => void): Promise<void>;
1378
1435
  static ɵfac: i0.ɵɵFactoryDeclaration<UIService, never>;
1379
1436
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
@@ -6520,6 +6577,7 @@ export declare abstract class ModalBaseComponent {
6520
6577
  }, never, never, true, never>;
6521
6578
  }
6522
6579
  export declare class ModalStandardComponent extends ModalBaseComponent {
6580
+ protected readonly dialogClasses: import("@angular/core").Signal<string>;
6523
6581
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalStandardComponent, never>;
6524
6582
  static ɵcmp: i0.ɵɵComponentDeclaration<ModalStandardComponent, "smart-modal-standard", never, {}, {}, never, ["*"], true, never>;
6525
6583
  }