@smartsoft001/angular 2.202.0 → 2.204.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/README.md +2 -2
- package/fesm2022/smartsoft001-angular.mjs +2031 -1433
- package/fesm2022/smartsoft001-angular.mjs.map +1 -1
- package/package.json +4 -4
- package/styles.css +33 -0
- package/types/smartsoft001-angular.d.ts +361 -45
|
@@ -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 {
|
|
@@ -964,6 +964,11 @@ export interface IPageOptions {
|
|
|
964
964
|
sidebarTpl?: TemplateRef<unknown>;
|
|
965
965
|
}
|
|
966
966
|
export interface IListProvider<T> {
|
|
967
|
+
/**
|
|
968
|
+
* Reads the data again with `filter` merged into the current one. The list
|
|
969
|
+
* calls it with `{ offset: 0, sortBy, sortDesc }` when a sortable header is
|
|
970
|
+
* clicked (`IListOptions.sort` set).
|
|
971
|
+
*/
|
|
967
972
|
getData: (filter: any) => void;
|
|
968
973
|
onChangeMultiSelected?: (list: Array<T>) => void;
|
|
969
974
|
onCleanMultiSelected$?: Observable<void>;
|
|
@@ -971,6 +976,11 @@ export interface IListProvider<T> {
|
|
|
971
976
|
loading: Signal<boolean>;
|
|
972
977
|
}
|
|
973
978
|
export interface IListPaginationOptions {
|
|
979
|
+
/**
|
|
980
|
+
* `PaginationMode.singlePage` renders `<smart-paging>` below the items;
|
|
981
|
+
* `PaginationMode.infiniteScroll` calls `loadNextPage` when the end of the
|
|
982
|
+
* items scrolls into view, while `page < totalPages`.
|
|
983
|
+
*/
|
|
974
984
|
mode?: PaginationMode;
|
|
975
985
|
/** Not read by the built-in implementations (standard or preset); available to a custom implementation registered for the component. */
|
|
976
986
|
limit: number;
|
|
@@ -1013,10 +1023,20 @@ export interface IListOptions<T> {
|
|
|
1013
1023
|
pagination?: IListPaginationOptions;
|
|
1014
1024
|
cellPipe?: ICellPipe<T>;
|
|
1015
1025
|
componentFactories?: IListComponentFactories<T>;
|
|
1026
|
+
/**
|
|
1027
|
+
* Makes the field headers of the desktop modes sort buttons: a click reads
|
|
1028
|
+
* the data through `provider.getData({ offset: 0, sortBy, sortDesc })`.
|
|
1029
|
+
* `default` / `defaultDesc` is the sort the headers show at first.
|
|
1030
|
+
*/
|
|
1016
1031
|
sort?: boolean | {
|
|
1017
1032
|
default?: string;
|
|
1018
1033
|
defaultDesc?: boolean;
|
|
1019
1034
|
};
|
|
1035
|
+
/**
|
|
1036
|
+
* Adds a details action to every item: it opens `component` (`DetailsPage`
|
|
1037
|
+
* by default) in a modal with the `IDetailsOptions` of `provider` as its
|
|
1038
|
+
* `value`, and asks `provider.getData(id)` for the item.
|
|
1039
|
+
*/
|
|
1020
1040
|
details?: boolean | {
|
|
1021
1041
|
provider?: IDetailsProvider<T>;
|
|
1022
1042
|
componentFactories?: IDetailsComponentFactories<T>;
|
|
@@ -1180,30 +1200,83 @@ export declare class StyleService {
|
|
|
1180
1200
|
static ɵfac: i0.ɵɵFactoryDeclaration<StyleService, never>;
|
|
1181
1201
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1182
1202
|
}
|
|
1183
|
-
export declare class ToastService {
|
|
1184
|
-
static lockError: number;
|
|
1185
|
-
addLockError(): void;
|
|
1186
|
-
removeLockError(): void;
|
|
1187
|
-
error(config: IToastOptions): Promise<void>;
|
|
1188
|
-
info(config: IToastOptions): Promise<void>;
|
|
1189
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToastService, never>;
|
|
1190
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1191
|
-
}
|
|
1192
1203
|
export interface IToastOptions {
|
|
1193
1204
|
title?: string;
|
|
1194
1205
|
message: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Milliseconds before the toast closes itself; 2000 when it is missing,
|
|
1208
|
+
* zero or negative.
|
|
1209
|
+
*/
|
|
1195
1210
|
duration?: number;
|
|
1196
1211
|
buttons?: Array<IToastButton>;
|
|
1197
1212
|
}
|
|
1198
1213
|
export interface IToastButton {
|
|
1199
1214
|
text: string;
|
|
1215
|
+
/** Kept for compatibility; the actions render in the order given. */
|
|
1200
1216
|
position: 'start' | 'end';
|
|
1217
|
+
/** Runs on a click on the button; the toast closes afterwards. */
|
|
1201
1218
|
handler: () => void;
|
|
1202
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
|
+
}
|
|
1264
|
+
/** What `HardwareService.onBackButtonClick` returns. */
|
|
1265
|
+
export interface IBackButtonHandle {
|
|
1266
|
+
/** Stops calling the callback. */
|
|
1267
|
+
remove(): void;
|
|
1268
|
+
}
|
|
1203
1269
|
export declare class HardwareService {
|
|
1270
|
+
private readonly document;
|
|
1204
1271
|
get isMobile(): boolean;
|
|
1205
1272
|
get isMobileWeb(): boolean;
|
|
1206
|
-
|
|
1273
|
+
/**
|
|
1274
|
+
* Calls `callback` when the user goes back in the browser history (the
|
|
1275
|
+
* `popstate` event of the window), until `remove()` is called on the
|
|
1276
|
+
* returned handle. Without a window (server rendering) the handle does
|
|
1277
|
+
* nothing.
|
|
1278
|
+
*/
|
|
1279
|
+
onBackButtonClick(callback: () => void): Promise<IBackButtonHandle>;
|
|
1207
1280
|
static ɵfac: i0.ɵɵFactoryDeclaration<HardwareService, never>;
|
|
1208
1281
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1209
1282
|
}
|
|
@@ -1249,25 +1322,83 @@ export declare class MenuService {
|
|
|
1249
1322
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
|
|
1250
1323
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1251
1324
|
}
|
|
1252
|
-
export declare class ModalService {
|
|
1253
|
-
show(options: IModalServiceOptions): Promise<IModal>;
|
|
1254
|
-
dismiss<T>(data?: T | null): Promise<void>;
|
|
1255
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
1256
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1257
|
-
}
|
|
1258
1325
|
export interface IModalServiceOptions {
|
|
1326
|
+
/** The component rendered in the modal. */
|
|
1259
1327
|
component: any;
|
|
1328
|
+
/**
|
|
1329
|
+
* The inputs of `component`, by input name. Keys the component does not
|
|
1330
|
+
* declare as inputs are left out.
|
|
1331
|
+
*/
|
|
1260
1332
|
props?: any;
|
|
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
|
+
*/
|
|
1261
1338
|
mode?: 'default' | 'bottom';
|
|
1339
|
+
/** Classes added to the modal (`<smart-modal class>`). */
|
|
1262
1340
|
cssClass?: string[];
|
|
1341
|
+
/**
|
|
1342
|
+
* `false` keeps the modal open on a click on its backdrop and on Escape;
|
|
1343
|
+
* its close button and `dismiss()` still close it. Defaults to `true`.
|
|
1344
|
+
*/
|
|
1263
1345
|
backdropDismiss?: boolean;
|
|
1346
|
+
/**
|
|
1347
|
+
* The injector `component` resolves its dependencies from (e.g. the opener's
|
|
1348
|
+
* `inject(Injector)`), the service's injector by default.
|
|
1349
|
+
*/
|
|
1350
|
+
injector?: Injector;
|
|
1264
1351
|
}
|
|
1265
1352
|
export interface IModal {
|
|
1266
|
-
|
|
1353
|
+
/** Closes the modal; `onDidDismiss()` resolves with `{ data }`. */
|
|
1354
|
+
dismiss: (data?: any) => void;
|
|
1355
|
+
/** Resolves once the modal is closed, with the data it was closed with. */
|
|
1267
1356
|
onDidDismiss(): Promise<{
|
|
1268
1357
|
data: any;
|
|
1269
1358
|
}>;
|
|
1270
1359
|
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Opens a component in a `<smart-modal>` at the end of `<body>` (the
|
|
1362
|
+
* implementation registered for `MODAL_STANDARD_COMPONENT_TOKEN`, so the
|
|
1363
|
+
* preset when `provideSmartPresets()` is used). The modals stack: the last one
|
|
1364
|
+
* opened is on top, and `dismiss()` closes it.
|
|
1365
|
+
*
|
|
1366
|
+
* The component gets `props` as its inputs and, when it declares one, a
|
|
1367
|
+
* `dismiss` input with the function that closes its modal. It can also inject
|
|
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;
|
|
1370
|
+
* closing it by the close button, the backdrop or Escape (as the modal
|
|
1371
|
+
* implementation provides them) resolves `onDidDismiss()` with
|
|
1372
|
+
* `{ data: null }`.
|
|
1373
|
+
*/
|
|
1374
|
+
export declare class ModalService implements OnDestroy {
|
|
1375
|
+
private readonly appRef;
|
|
1376
|
+
private readonly environmentInjector;
|
|
1377
|
+
private readonly injector;
|
|
1378
|
+
private readonly document;
|
|
1379
|
+
private readonly entries;
|
|
1380
|
+
/**
|
|
1381
|
+
* Stops Escape before the modal's own document listener (registered after
|
|
1382
|
+
* this one) while the top modal has `backdropDismiss: false`. Elements
|
|
1383
|
+
* inside the modal still receive the key; only document listeners added
|
|
1384
|
+
* after the first modal opened are skipped.
|
|
1385
|
+
*/
|
|
1386
|
+
private readonly onKeydown;
|
|
1387
|
+
show(options: IModalServiceOptions): Promise<IModal>;
|
|
1388
|
+
/** Closes the modal opened last. */
|
|
1389
|
+
dismiss<T>(data?: T | null): Promise<void>;
|
|
1390
|
+
ngOnDestroy(): void;
|
|
1391
|
+
private getClasses;
|
|
1392
|
+
/**
|
|
1393
|
+
* With `backdropDismiss: false`, a click that lands in the modal but outside
|
|
1394
|
+
* its dialog (the backdrop) is stopped before the modal sees it.
|
|
1395
|
+
*/
|
|
1396
|
+
private onBackdropClick;
|
|
1397
|
+
/** Sets the values whose keys `ref`'s component declares as inputs. */
|
|
1398
|
+
private setInputs;
|
|
1399
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
1400
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1401
|
+
}
|
|
1271
1402
|
export declare class AlertService {
|
|
1272
1403
|
private readonly appRef;
|
|
1273
1404
|
private readonly environmentInjector;
|
|
@@ -1283,12 +1414,23 @@ export declare class AlertService {
|
|
|
1283
1414
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
|
|
1284
1415
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1285
1416
|
}
|
|
1417
|
+
/**
|
|
1418
|
+
* Kept for compatibility: the library opens no popovers, so there is nothing
|
|
1419
|
+
* for `close()` to close.
|
|
1420
|
+
*/
|
|
1286
1421
|
export declare class PopoverService {
|
|
1422
|
+
/** Does nothing and resolves; the library has no popover to close. */
|
|
1287
1423
|
close(): Promise<void>;
|
|
1288
1424
|
static ɵfac: i0.ɵɵFactoryDeclaration<PopoverService, never>;
|
|
1289
1425
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1290
1426
|
}
|
|
1291
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
|
+
*/
|
|
1292
1434
|
showAlertWithDismissCallback(heading: string, msg: string, btnText: string, callback: () => void): Promise<void>;
|
|
1293
1435
|
static ɵfac: i0.ɵɵFactoryDeclaration<UIService, never>;
|
|
1294
1436
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
@@ -1331,16 +1473,48 @@ export declare class DynamicContentDirective {
|
|
|
1331
1473
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentDirective, never>;
|
|
1332
1474
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentDirective, ".dynamic-content", never, {}, {}, never, never, true, never>;
|
|
1333
1475
|
}
|
|
1476
|
+
/** What `showDetailsModal` (and `[smartDetails]`) opens. */
|
|
1477
|
+
export interface IDetailsModalOptions {
|
|
1478
|
+
/** Rendered in the modal, with `params` as its `value` input. */
|
|
1479
|
+
component: any;
|
|
1480
|
+
params: any;
|
|
1481
|
+
/** Default `'bottom'`. */
|
|
1482
|
+
mode?: 'bottom' | 'default';
|
|
1483
|
+
}
|
|
1484
|
+
/** The callbacks of `showDetailsModal`. */
|
|
1485
|
+
export interface IDetailsModalCallbacks {
|
|
1486
|
+
/** Once the modal is open. */
|
|
1487
|
+
showed?: () => void;
|
|
1488
|
+
/** Once the modal is closed. */
|
|
1489
|
+
dismissed?: () => void;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Opens `options.component` through `ModalService` with
|
|
1493
|
+
* `{ value: options.params }` as its inputs (e.g. `DetailsPage` with
|
|
1494
|
+
* `IDetailsOptions`), closes it when the browser goes back
|
|
1495
|
+
* (`HardwareService.onBackButtonClick`) and resolves once it is closed.
|
|
1496
|
+
* Without `options` or `options.component` it does nothing.
|
|
1497
|
+
*/
|
|
1498
|
+
export declare function showDetailsModal(services: {
|
|
1499
|
+
modalService: ModalService;
|
|
1500
|
+
hardwareService: HardwareService;
|
|
1501
|
+
injector?: Injector;
|
|
1502
|
+
}, options: IDetailsModalOptions | null | undefined, { showed, dismissed }?: IDetailsModalCallbacks): Promise<void>;
|
|
1503
|
+
/**
|
|
1504
|
+
* Opens `component` in a modal on click (`ModalService`, mode `'bottom'` by
|
|
1505
|
+
* default) with `{ value: params }` as its inputs; the modal closes when the
|
|
1506
|
+
* browser goes back. Emits `smartDetailsShowed` once the modal is open and
|
|
1507
|
+
* `smartDetailsDismissed` once it is closed.
|
|
1508
|
+
*/
|
|
1334
1509
|
export declare class DetailsDirective {
|
|
1335
1510
|
private modalService;
|
|
1336
1511
|
private hardwareService;
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
mode?: "bottom" | "default";
|
|
1341
|
-
}>;
|
|
1512
|
+
private injector;
|
|
1513
|
+
private destroyed;
|
|
1514
|
+
options: import("@angular/core").InputSignal<IDetailsModalOptions>;
|
|
1342
1515
|
smartDetailsShowed: import("@angular/core").OutputEmitterRef<void>;
|
|
1343
1516
|
smartDetailsDismissed: import("@angular/core").OutputEmitterRef<void>;
|
|
1517
|
+
constructor();
|
|
1344
1518
|
click(): Promise<void>;
|
|
1345
1519
|
static ɵfac: i0.ɵɵFactoryDeclaration<DetailsDirective, never>;
|
|
1346
1520
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DetailsDirective, "[smartDetails]", never, {
|
|
@@ -4596,14 +4770,51 @@ export declare abstract class InputFileBaseComponent<T> extends InputBaseCompone
|
|
|
4596
4770
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputFileBaseComponent<any>, never>;
|
|
4597
4771
|
static ɵdir: i0.ɵɵDirectiveDeclaration<InputFileBaseComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
4598
4772
|
}
|
|
4773
|
+
type InputPossibilities = Array<{
|
|
4774
|
+
id: any;
|
|
4775
|
+
text: string;
|
|
4776
|
+
checked: boolean;
|
|
4777
|
+
}> | null;
|
|
4778
|
+
/**
|
|
4779
|
+
* Base of the fields with a list of possibilities (radio, check, enum preset).
|
|
4780
|
+
* `possibilities` holds the list the `MODEL_POSSIBILITIES_PROVIDER` signal
|
|
4781
|
+
* returns (asked again 500 ms after the parent form's value changed), else the
|
|
4782
|
+
* input options' `possibilities`, else the field's own `possibilities`
|
|
4783
|
+
* (`getModelPossibilities()`). A subclass that overrides
|
|
4784
|
+
* `afterSetOptionsHandler()` calls `super.afterSetOptionsHandler()` first.
|
|
4785
|
+
*/
|
|
4599
4786
|
export declare abstract class InputPossibilitiesBaseComponent<T> extends InputBaseComponent<T> {
|
|
4600
4787
|
private modelPossibilitiesProvider;
|
|
4788
|
+
private readonly possibilitiesSources;
|
|
4789
|
+
private readonly resolvedPossibilities;
|
|
4790
|
+
private providerRefresh;
|
|
4791
|
+
possibilities: WritableSignal<InputPossibilities>;
|
|
4792
|
+
constructor();
|
|
4601
4793
|
protected afterSetOptionsHandler(): void;
|
|
4794
|
+
/**
|
|
4795
|
+
* Runs whenever the resolved possibilities may have changed: after the
|
|
4796
|
+
* options are set, after the provider was asked again and when a signal
|
|
4797
|
+
* holding them changes. No base functionality.
|
|
4798
|
+
*/
|
|
4799
|
+
protected afterPossibilitiesChange(): void;
|
|
4800
|
+
/**
|
|
4801
|
+
* The field's own `possibilities` (from its `@Field()` metadata, read
|
|
4802
|
+
* through the first item of an array model) when they are an object map
|
|
4803
|
+
* `{ text: id }`, e.g. an enum, as a list; `null` otherwise.
|
|
4804
|
+
*/
|
|
4805
|
+
protected getModelPossibilities(): InputPossibilities;
|
|
4806
|
+
/**
|
|
4807
|
+
* The raw `possibilities` of the field's `@Field()` metadata, read through
|
|
4808
|
+
* the first item of an array model when the model itself has none.
|
|
4809
|
+
*/
|
|
4810
|
+
protected getModelFieldPossibilities(): any;
|
|
4602
4811
|
protected getPossibilitiesFromProvider(): WritableSignal<{
|
|
4603
4812
|
id: any;
|
|
4604
4813
|
text: string;
|
|
4605
4814
|
checked: boolean;
|
|
4606
4815
|
}[] | null>;
|
|
4816
|
+
private refreshProviderPossibilities;
|
|
4817
|
+
private watchProviderPossibilities;
|
|
4607
4818
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputPossibilitiesBaseComponent<any>, never>;
|
|
4608
4819
|
static ɵdir: i0.ɵɵDirectiveDeclaration<InputPossibilitiesBaseComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
4609
4820
|
}
|
|
@@ -4802,7 +5013,6 @@ declare namespace radio_component_d_exports {
|
|
|
4802
5013
|
export declare class InputRadioComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
4803
5014
|
labelClasses: import("@angular/core").Signal<string>;
|
|
4804
5015
|
groupClasses: import("@angular/core").Signal<string>;
|
|
4805
|
-
protected afterSetOptionsHandler(): void;
|
|
4806
5016
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputRadioComponent<any>, never>;
|
|
4807
5017
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputRadioComponent<any>, "smart-input-radio", never, {}, {}, never, never, true, never>;
|
|
4808
5018
|
}
|
|
@@ -4846,14 +5056,17 @@ declare namespace check_component_d_exports {
|
|
|
4846
5056
|
export { InputCheckComponent };
|
|
4847
5057
|
}
|
|
4848
5058
|
export declare class InputCheckComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
4849
|
-
|
|
4850
|
-
id: any;
|
|
4851
|
-
text: string;
|
|
4852
|
-
checked: boolean;
|
|
4853
|
-
}> | null>;
|
|
5059
|
+
private controlChanges;
|
|
4854
5060
|
labelClasses: import("@angular/core").Signal<string>;
|
|
4855
5061
|
groupClasses: import("@angular/core").Signal<string>;
|
|
4856
5062
|
protected afterSetOptionsHandler(): void;
|
|
5063
|
+
protected afterPossibilitiesChange(): void;
|
|
5064
|
+
/** The field's own `possibilities` when they are a list; `null` otherwise. */
|
|
5065
|
+
protected getModelPossibilities(): Array<{
|
|
5066
|
+
id: any;
|
|
5067
|
+
text: string;
|
|
5068
|
+
checked: boolean;
|
|
5069
|
+
}> | null;
|
|
4857
5070
|
private syncCheckedWithControl;
|
|
4858
5071
|
refresh(item: {
|
|
4859
5072
|
id: any;
|
|
@@ -5020,16 +5233,19 @@ export declare class InputAttachmentPresetComponent<T> extends InputFileBaseComp
|
|
|
5020
5233
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputAttachmentPresetComponent<any>, "smart-input-attachment-preset", never, {}, {}, never, never, true, never>;
|
|
5021
5234
|
}
|
|
5022
5235
|
export declare class InputCheckPresetComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
5023
|
-
|
|
5024
|
-
id: any;
|
|
5025
|
-
text: string;
|
|
5026
|
-
checked: boolean;
|
|
5027
|
-
}> | null>;
|
|
5236
|
+
private controlChanges;
|
|
5028
5237
|
labelClasses: import("@angular/core").Signal<string>;
|
|
5029
5238
|
groupClasses: import("@angular/core").Signal<string>;
|
|
5030
5239
|
checkboxClasses: import("@angular/core").Signal<string>;
|
|
5031
5240
|
optionLabelClasses: import("@angular/core").Signal<string>;
|
|
5032
5241
|
protected afterSetOptionsHandler(): void;
|
|
5242
|
+
protected afterPossibilitiesChange(): void;
|
|
5243
|
+
/** The field's own `possibilities` when they are a list; `null` otherwise. */
|
|
5244
|
+
protected getModelPossibilities(): Array<{
|
|
5245
|
+
id: any;
|
|
5246
|
+
text: string;
|
|
5247
|
+
checked: boolean;
|
|
5248
|
+
}> | null;
|
|
5033
5249
|
private syncCheckedWithControl;
|
|
5034
5250
|
refresh(item: {
|
|
5035
5251
|
id: any;
|
|
@@ -5138,7 +5354,6 @@ export declare class InputEmailPresetComponent<T> extends InputBaseComponent<T>
|
|
|
5138
5354
|
export declare class InputEnumPresetComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
5139
5355
|
labelClasses: import("@angular/core").Signal<string>;
|
|
5140
5356
|
selectClasses: import("@angular/core").Signal<string>;
|
|
5141
|
-
protected afterSetOptionsHandler(): void;
|
|
5142
5357
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputEnumPresetComponent<any>, never>;
|
|
5143
5358
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputEnumPresetComponent<any>, "smart-input-enum-preset", never, {}, {}, never, never, true, never>;
|
|
5144
5359
|
}
|
|
@@ -5326,7 +5541,6 @@ export declare class InputRadioPresetComponent<T> extends InputPossibilitiesBase
|
|
|
5326
5541
|
groupClasses: import("@angular/core").Signal<string>;
|
|
5327
5542
|
radioClasses: import("@angular/core").Signal<string>;
|
|
5328
5543
|
itemLabelClasses: import("@angular/core").Signal<string>;
|
|
5329
|
-
protected afterSetOptionsHandler(): void;
|
|
5330
5544
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputRadioPresetComponent<any>, never>;
|
|
5331
5545
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputRadioPresetComponent<any>, "smart-input-radio-preset", never, {}, {}, never, never, true, never>;
|
|
5332
5546
|
}
|
|
@@ -5799,6 +6013,36 @@ export declare class InfoComponent {
|
|
|
5799
6013
|
};
|
|
5800
6014
|
}, {}, never, never, true, never>;
|
|
5801
6015
|
}
|
|
6016
|
+
/** The sort a list shows: the column key and its direction. */
|
|
6017
|
+
export interface IListSortState {
|
|
6018
|
+
key: string;
|
|
6019
|
+
desc: boolean;
|
|
6020
|
+
}
|
|
6021
|
+
/** What a sortable header passes to `provider.getData`. */
|
|
6022
|
+
export interface IListSortFilter {
|
|
6023
|
+
offset: 0;
|
|
6024
|
+
sortBy: string;
|
|
6025
|
+
sortDesc: boolean;
|
|
6026
|
+
}
|
|
6027
|
+
/**
|
|
6028
|
+
* The sort a list starts with: `sort.default` (descending with
|
|
6029
|
+
* `sort.defaultDesc`), `null` without a default.
|
|
6030
|
+
*/
|
|
6031
|
+
export declare function getListDefaultSort(sort: IListOptions<unknown>['sort']): IListSortState | null;
|
|
6032
|
+
/**
|
|
6033
|
+
* The sort after a click on the header of `key`: ascending for another
|
|
6034
|
+
* column, the opposite direction for the active one.
|
|
6035
|
+
*/
|
|
6036
|
+
export declare function getNextListSort(current: IListSortState | null, key: string): IListSortState;
|
|
6037
|
+
/**
|
|
6038
|
+
* Whether the column `key` can be sorted: every field column, not the
|
|
6039
|
+
* expanded `__array` columns of a `dynamic` field.
|
|
6040
|
+
*/
|
|
6041
|
+
export declare function isListSortableKey(key: string): boolean;
|
|
6042
|
+
/** The `aria-sort` of the header of `key`: only the active one has it. */
|
|
6043
|
+
export declare function getListAriaSort(current: IListSortState | null, key: string): 'ascending' | 'descending' | null;
|
|
6044
|
+
/** The arrow of a sortable header: `↑`, `↓`, or `↕` when it is not active. */
|
|
6045
|
+
export declare function getListSortIndicator(current: IListSortState | null, key: string): string;
|
|
5802
6046
|
export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
5803
6047
|
static smartType: DynamicComponentType;
|
|
5804
6048
|
private _fields;
|
|
@@ -5808,6 +6052,8 @@ export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
|
5808
6052
|
protected alertService: AlertService;
|
|
5809
6053
|
protected cd: ChangeDetectorRef;
|
|
5810
6054
|
protected translateService: TranslateService;
|
|
6055
|
+
protected injector: Injector;
|
|
6056
|
+
private loadingNextPage;
|
|
5811
6057
|
detailsComponent: any;
|
|
5812
6058
|
selectMode?: 'multi';
|
|
5813
6059
|
detailsComponentProps: IDetailsOptions<T>;
|
|
@@ -5815,6 +6061,12 @@ export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
|
5815
6061
|
unselect: () => void;
|
|
5816
6062
|
itemHandler: ((id: string) => void) | null;
|
|
5817
6063
|
removeHandler: ((item: T) => void) | null;
|
|
6064
|
+
/**
|
|
6065
|
+
* Opens the details of an item in a modal (`details` set): `DetailsPage`, or
|
|
6066
|
+
* `details.component`, with `detailsComponentProps` as its `value`; `null`
|
|
6067
|
+
* without `details`.
|
|
6068
|
+
*/
|
|
6069
|
+
detailsHandler: ((item: T) => void) | null;
|
|
5818
6070
|
checkRemoveHandler: (item: T) => boolean;
|
|
5819
6071
|
detailsButtonOptions: IButtonOptions;
|
|
5820
6072
|
removed: Set<string>;
|
|
@@ -5836,11 +6088,43 @@ export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
|
5836
6088
|
options: InputSignal<IListInternalOptions<T>>;
|
|
5837
6089
|
cssClass: InputSignal<string>;
|
|
5838
6090
|
contentTpl: Signal<ViewContainerRef | undefined>;
|
|
6091
|
+
/** Whether the column headers sort the list (`options.sort` set). */
|
|
6092
|
+
sortable: Signal<boolean>;
|
|
6093
|
+
/**
|
|
6094
|
+
* The sort the headers show: `sort.default` / `sort.defaultDesc` at first,
|
|
6095
|
+
* then the last header clicked. It starts over when `options.sort` changes.
|
|
6096
|
+
*/
|
|
6097
|
+
activeSort: import("@angular/core").WritableSignal<IListSortState | null>;
|
|
6098
|
+
/**
|
|
6099
|
+
* `true` with `pagination.mode === PaginationMode.infiniteScroll` and a next
|
|
6100
|
+
* page: the modes render the `#infiniteScrollAnchor` element after the
|
|
6101
|
+
* items, and the next page loads when it scrolls into view.
|
|
6102
|
+
*/
|
|
6103
|
+
infiniteScroll: Signal<boolean>;
|
|
6104
|
+
infiniteScrollAnchor: Signal<ElementRef<HTMLElement> | undefined>;
|
|
5839
6105
|
constructor();
|
|
5840
6106
|
protected initKeys(data?: Array<T> | null): void;
|
|
5841
6107
|
protected initList(val: IListInternalOptions<T>): void;
|
|
5842
6108
|
protected initLoading(): void;
|
|
5843
6109
|
protected afterInitOptions(): void;
|
|
6110
|
+
/** Whether the header of `key` sorts the list. */
|
|
6111
|
+
isSortable(key: string): boolean;
|
|
6112
|
+
/**
|
|
6113
|
+
* Sorts by `key`: ascending for another column, the opposite direction for
|
|
6114
|
+
* the active one, read from the first page through
|
|
6115
|
+
* `provider.getData({ offset: 0, sortBy, sortDesc })`.
|
|
6116
|
+
*/
|
|
6117
|
+
sortBy(key: string): void;
|
|
6118
|
+
/** The `aria-sort` of the header of `key` (only the active one has it). */
|
|
6119
|
+
ariaSort(key: string): 'ascending' | 'descending' | null;
|
|
6120
|
+
/** The arrow shown in the header of `key`. */
|
|
6121
|
+
sortIndicator(key: string): string;
|
|
6122
|
+
/**
|
|
6123
|
+
* Opens the details of `item` in a modal: clears the details provider,
|
|
6124
|
+
* opens the details component (`DetailsPage` by default) through
|
|
6125
|
+
* `ModalService` and asks the provider for the item (`select(id)`).
|
|
6126
|
+
*/
|
|
6127
|
+
openDetails(item: T): Promise<void>;
|
|
5844
6128
|
handlePageChange(nextPage: number): void;
|
|
5845
6129
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListBaseComponent<any>, never>;
|
|
5846
6130
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ListBaseComponent<any>, never, never, {
|
|
@@ -5949,7 +6233,10 @@ export declare class ListMasonryGridComponent<T extends IEntity<string>> extends
|
|
|
5949
6233
|
* select, remove/item actions, pagination, image cells) and restyles it with
|
|
5950
6234
|
* the Preline table look. Styling variations are driven by
|
|
5951
6235
|
* `options.presentation`: `variant` (default | striped | bordered |
|
|
5952
|
-
* borderless), `hoverable`, and `header` (default | muted | none).
|
|
6236
|
+
* borderless), `hoverable`, and `header` (default | muted | none). With
|
|
6237
|
+
* `options.sort` the field headers are sort buttons, with `options.details`
|
|
6238
|
+
* every row gets a details action, and `PaginationMode.infiniteScroll` loads
|
|
6239
|
+
* the next page when the end of the table scrolls into view.
|
|
5953
6240
|
*
|
|
5954
6241
|
* Decorator metadata is not inherited, so the full `imports` list is repeated.
|
|
5955
6242
|
*/
|
|
@@ -5961,6 +6248,8 @@ export declare class ListDesktopPresetComponent<T extends IEntity<string>> exten
|
|
|
5961
6248
|
headerCellClasses: import("@angular/core").Signal<string>;
|
|
5962
6249
|
rowClasses: import("@angular/core").Signal<string>;
|
|
5963
6250
|
cellClasses: import("@angular/core").Signal<string>;
|
|
6251
|
+
protected readonly sortButtonClasses: string;
|
|
6252
|
+
protected readonly sortIndicatorClasses: string;
|
|
5964
6253
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListDesktopPresetComponent<any>, never>;
|
|
5965
6254
|
static ɵcmp: i0.ɵɵComponentDeclaration<ListDesktopPresetComponent<any>, "smart-list-desktop-preset", never, {}, {}, never, never, true, never>;
|
|
5966
6255
|
}
|
|
@@ -6288,6 +6577,7 @@ export declare abstract class ModalBaseComponent {
|
|
|
6288
6577
|
}, never, never, true, never>;
|
|
6289
6578
|
}
|
|
6290
6579
|
export declare class ModalStandardComponent extends ModalBaseComponent {
|
|
6580
|
+
protected readonly dialogClasses: import("@angular/core").Signal<string>;
|
|
6291
6581
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalStandardComponent, never>;
|
|
6292
6582
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalStandardComponent, "smart-modal-standard", never, {}, {}, never, ["*"], true, never>;
|
|
6293
6583
|
}
|
|
@@ -6319,6 +6609,7 @@ export declare class ModalPresetComponent extends ModalBaseComponent {
|
|
|
6319
6609
|
protected footerClasses: import("@angular/core").Signal<string>;
|
|
6320
6610
|
protected actionClasses(variant?: string): string;
|
|
6321
6611
|
protected onBackdropClick(event: MouseEvent): void;
|
|
6612
|
+
constructor();
|
|
6322
6613
|
protected onEscape(): void;
|
|
6323
6614
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalPresetComponent, never>;
|
|
6324
6615
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalPresetComponent, "smart-modal-preset", never, {
|
|
@@ -8640,6 +8931,8 @@ export declare abstract class VerticalNavigationBaseComponent {
|
|
|
8640
8931
|
}, never, never, true, never>;
|
|
8641
8932
|
}
|
|
8642
8933
|
export declare class VerticalNavigationStandardComponent extends VerticalNavigationBaseComponent {
|
|
8934
|
+
private readonly idPrefix;
|
|
8935
|
+
protected groupTitleId(groupIndex: number): string;
|
|
8643
8936
|
protected onItemClick(itemId: string): void;
|
|
8644
8937
|
protected get groups(): import("@smartsoft001/angular").IVerticalNavGroup[];
|
|
8645
8938
|
static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationStandardComponent, never>;
|
|
@@ -8654,7 +8947,9 @@ export declare class VerticalNavigationStandardComponent extends VerticalNavigat
|
|
|
8654
8947
|
* selector directly.
|
|
8655
8948
|
*
|
|
8656
8949
|
* Renders the Preline vertical-tabs look: each item is a tab with a trailing
|
|
8657
|
-
* border, the `current` item gaining the primary border + text accent.
|
|
8950
|
+
* border, the `current` item gaining the primary border + text accent. One
|
|
8951
|
+
* `<nav>` landmark (`options.ariaLabel`, `'Sidebar'` by default) holds every
|
|
8952
|
+
* group; a group is a list labelled by its title.
|
|
8658
8953
|
*/
|
|
8659
8954
|
export declare class VerticalNavigationPresetComponent extends VerticalNavigationBaseComponent {
|
|
8660
8955
|
cssClass: import("@angular/core").InputSignal<string>;
|
|
@@ -8665,6 +8960,9 @@ export declare class VerticalNavigationPresetComponent extends VerticalNavigatio
|
|
|
8665
8960
|
protected iconClasses: string;
|
|
8666
8961
|
protected initialClasses: string;
|
|
8667
8962
|
protected badgeClasses: string;
|
|
8963
|
+
protected listItemClasses: string;
|
|
8964
|
+
private readonly idPrefix;
|
|
8965
|
+
protected groupTitleId(groupIndex: number): string;
|
|
8668
8966
|
protected itemClasses(current: boolean | undefined): string;
|
|
8669
8967
|
protected onItemClick(itemId: string): void;
|
|
8670
8968
|
static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationPresetComponent, never>;
|
|
@@ -8730,18 +9028,36 @@ export declare class SharedFactoriesModule {
|
|
|
8730
9028
|
declare namespace details_page_d_exports {
|
|
8731
9029
|
export { DetailsPage };
|
|
8732
9030
|
}
|
|
9031
|
+
/**
|
|
9032
|
+
* The details of `value` full width, with the application style
|
|
9033
|
+
* (`StyleService`) applied to its element. Open it in a modal with
|
|
9034
|
+
* `[smartDetails]="{ component: DetailsPage, params }"` (or
|
|
9035
|
+
* `ModalService.show({ component: DetailsPage, props: { value } })`), which
|
|
9036
|
+
* passes `params` as `value`.
|
|
9037
|
+
*
|
|
9038
|
+
* `pageOptions()` gives the title and buttons for a page layout around it: a
|
|
9039
|
+
* `trash` button for `removeHandler` and an `arrow-forward-outline` button for
|
|
9040
|
+
* `itemHandler`, both closing the modal through `ModalService.dismiss()`. The
|
|
9041
|
+
* page layout itself moved out of the library (FRA-121), so the page does not
|
|
9042
|
+
* render them.
|
|
9043
|
+
*/
|
|
8733
9044
|
export declare class DetailsPage<T extends IEntity<string>> implements OnInit {
|
|
8734
9045
|
private modalService;
|
|
8735
9046
|
private styleService;
|
|
8736
9047
|
private elementRef;
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
9048
|
+
/** The details to show; `[smartDetails]` passes its `params` here. */
|
|
9049
|
+
value: import("@angular/core").InputSignal<IDetailsOptions<T> | undefined>;
|
|
9050
|
+
pageOptions: Signal<IPageOptions>;
|
|
8740
9051
|
ngOnInit(): void;
|
|
8741
|
-
private
|
|
8742
|
-
private initButtons;
|
|
9052
|
+
private getButtons;
|
|
8743
9053
|
static ɵfac: i0.ɵɵFactoryDeclaration<DetailsPage<any>, never>;
|
|
8744
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DetailsPage<any>, "ng-component", never, {
|
|
9054
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DetailsPage<any>, "ng-component", never, {
|
|
9055
|
+
"value": {
|
|
9056
|
+
"alias": "value";
|
|
9057
|
+
"required": false;
|
|
9058
|
+
"isSignal": true;
|
|
9059
|
+
};
|
|
9060
|
+
}, {}, never, never, true, never>;
|
|
8745
9061
|
}
|
|
8746
9062
|
declare namespace components_module_d_exports {
|
|
8747
9063
|
export { ACCORDION_COMPONENTS, BUTTON_COMPONENTS, CARD_COMPONENTS, COMPONENTS, DATE_EDIT_COMPONENTS, DATE_RANGE_COMPONENTS, DETAILS_COMPONENTS, DETAIL_COMPONENTS, DYNAMIC_COMPONENTS, EXPORT_COMPONENTS, FORM_COMPONENTS, IMPORTS, IMPORT_COMPONENTS, INFO_COMPONENTS, INPUT_COMPONENTS, LIST_COMPONENTS, LOADER_COMPONENTS, PAGE_COMPONENTS, PAGING_COMPONENTS, PASSWORD_STRENGTH_COMPONENTS, SEARCHBAR_COMPONENTS, SharedComponentsModule };
|
|
@@ -8754,7 +9070,7 @@ declare const EXPORT_COMPONENTS: (typeof ExportComponent)[];
|
|
|
8754
9070
|
declare const IMPORT_COMPONENTS: (typeof ImportComponent)[];
|
|
8755
9071
|
declare const DETAIL_COMPONENTS: (typeof DetailAddressComponent | typeof DetailArrayComponent | typeof DetailAttachmentComponent | typeof DetailColorComponent | typeof DetailDateRangeComponent | typeof DetailEmailComponent | typeof DetailEnumComponent | typeof DetailFlagComponent | typeof DetailImageComponent | typeof DetailLogoComponent | typeof DetailObjectComponent | typeof DetailPdfComponent | typeof DetailPhoneNumberPlComponent | typeof DetailTextComponent | typeof DetailVideoComponent | typeof DetailComponent)[];
|
|
8756
9072
|
declare const FORM_COMPONENTS: (typeof FormStandardComponent | typeof FormComponent)[];
|
|
8757
|
-
declare const INPUT_COMPONENTS: (typeof InputAddressComponent | typeof InputColorComponent | typeof InputCurrencyComponent | typeof InputEnumComponent | typeof InputErrorComponent | typeof InputFileComponent | typeof InputArrayComponent | typeof InputAttachmentComponent | typeof
|
|
9073
|
+
declare const INPUT_COMPONENTS: (typeof InputAddressComponent | typeof InputColorComponent | typeof InputCurrencyComponent | typeof InputEnumComponent | typeof InputErrorComponent | typeof InputFileComponent | typeof InputArrayComponent | typeof InputAttachmentComponent | typeof InputDateRangeComponent | typeof InputIntsComponent | typeof InputLogoComponent | typeof InputLongTextComponent | typeof InputObjectComponent | typeof InputRadioComponent | typeof InputStringsComponent | typeof InputComponent)[];
|
|
8758
9074
|
declare const LIST_COMPONENTS: (typeof ListDesktopComponent | typeof ListMasonryGridComponent | typeof ListMobileComponent | typeof ListComponent)[];
|
|
8759
9075
|
declare const LOADER_COMPONENTS: (typeof LoaderStandardComponent | typeof LoaderComponent)[];
|
|
8760
9076
|
declare const PAGE_COMPONENTS: (typeof PageStandardComponent | typeof PageComponent)[];
|