@smartsoft001/angular 2.202.0 → 2.203.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/fesm2022/smartsoft001-angular.mjs +1226 -918
- package/fesm2022/smartsoft001-angular.mjs.map +1 -1
- package/package.json +4 -4
- package/styles.css +6 -0
- package/types/smartsoft001-angular.d.ts +293 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/angular",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.203.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.
|
|
28
|
-
"@smartsoft001/models": "2.
|
|
29
|
-
"@smartsoft001/utils": "2.
|
|
27
|
+
"@smartsoft001/domain-core": "2.203.0",
|
|
28
|
+
"@smartsoft001/models": "2.203.0",
|
|
29
|
+
"@smartsoft001/utils": "2.203.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
|
@@ -3096,6 +3096,9 @@
|
|
|
3096
3096
|
color: color-mix(in oklab, var(--smart-color-gray-600) 75%, transparent);
|
|
3097
3097
|
}
|
|
3098
3098
|
}
|
|
3099
|
+
.smart\:hover\:text-gray-800:hover {
|
|
3100
|
+
color: var(--smart-color-gray-800);
|
|
3101
|
+
}
|
|
3099
3102
|
.smart\:hover\:text-gray-900:hover {
|
|
3100
3103
|
color: var(--smart-color-gray-900);
|
|
3101
3104
|
}
|
|
@@ -5124,6 +5127,9 @@
|
|
|
5124
5127
|
.smart\:dark\:hover\:text-fuchsia-400:where(.dark, .dark *):hover {
|
|
5125
5128
|
color: var(--smart-color-fuchsia-400);
|
|
5126
5129
|
}
|
|
5130
|
+
.smart\:dark\:hover\:text-gray-200:where(.dark, .dark *):hover {
|
|
5131
|
+
color: var(--smart-color-gray-200);
|
|
5132
|
+
}
|
|
5127
5133
|
.smart\:dark\:hover\:text-gray-300:where(.dark, .dark *):hover {
|
|
5128
5134
|
color: var(--smart-color-gray-300);
|
|
5129
5135
|
}
|
|
@@ -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>;
|
|
@@ -1200,10 +1220,22 @@ export interface IToastButton {
|
|
|
1200
1220
|
position: 'start' | 'end';
|
|
1201
1221
|
handler: () => void;
|
|
1202
1222
|
}
|
|
1223
|
+
/** What `HardwareService.onBackButtonClick` returns. */
|
|
1224
|
+
export interface IBackButtonHandle {
|
|
1225
|
+
/** Stops calling the callback. */
|
|
1226
|
+
remove(): void;
|
|
1227
|
+
}
|
|
1203
1228
|
export declare class HardwareService {
|
|
1229
|
+
private readonly document;
|
|
1204
1230
|
get isMobile(): boolean;
|
|
1205
1231
|
get isMobileWeb(): boolean;
|
|
1206
|
-
|
|
1232
|
+
/**
|
|
1233
|
+
* Calls `callback` when the user goes back in the browser history (the
|
|
1234
|
+
* `popstate` event of the window), until `remove()` is called on the
|
|
1235
|
+
* returned handle. Without a window (server rendering) the handle does
|
|
1236
|
+
* nothing.
|
|
1237
|
+
*/
|
|
1238
|
+
onBackButtonClick(callback: () => void): Promise<IBackButtonHandle>;
|
|
1207
1239
|
static ɵfac: i0.ɵɵFactoryDeclaration<HardwareService, never>;
|
|
1208
1240
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1209
1241
|
}
|
|
@@ -1249,25 +1281,78 @@ export declare class MenuService {
|
|
|
1249
1281
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, never>;
|
|
1250
1282
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1251
1283
|
}
|
|
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
1284
|
export interface IModalServiceOptions {
|
|
1285
|
+
/** The component rendered in the modal. */
|
|
1259
1286
|
component: any;
|
|
1287
|
+
/**
|
|
1288
|
+
* The inputs of `component`, by input name. Keys the component does not
|
|
1289
|
+
* declare as inputs are left out.
|
|
1290
|
+
*/
|
|
1260
1291
|
props?: any;
|
|
1292
|
+
/** `'bottom'` adds the `smart-modal-bottom` class to the modal. */
|
|
1261
1293
|
mode?: 'default' | 'bottom';
|
|
1294
|
+
/** Classes added to the modal (`<smart-modal class>`). */
|
|
1262
1295
|
cssClass?: string[];
|
|
1296
|
+
/**
|
|
1297
|
+
* `false` keeps the modal open on a click on its backdrop and on Escape;
|
|
1298
|
+
* its close button and `dismiss()` still close it. Defaults to `true`.
|
|
1299
|
+
*/
|
|
1263
1300
|
backdropDismiss?: boolean;
|
|
1301
|
+
/**
|
|
1302
|
+
* The injector `component` resolves its dependencies from (e.g. the opener's
|
|
1303
|
+
* `inject(Injector)`), the service's injector by default.
|
|
1304
|
+
*/
|
|
1305
|
+
injector?: Injector;
|
|
1264
1306
|
}
|
|
1265
1307
|
export interface IModal {
|
|
1266
|
-
|
|
1308
|
+
/** Closes the modal; `onDidDismiss()` resolves with `{ data }`. */
|
|
1309
|
+
dismiss: (data?: any) => void;
|
|
1310
|
+
/** Resolves once the modal is closed, with the data it was closed with. */
|
|
1267
1311
|
onDidDismiss(): Promise<{
|
|
1268
1312
|
data: any;
|
|
1269
1313
|
}>;
|
|
1270
1314
|
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Opens a component in a `<smart-modal>` at the end of `<body>` (the
|
|
1317
|
+
* implementation registered for `MODAL_STANDARD_COMPONENT_TOKEN`, so the
|
|
1318
|
+
* preset when `provideSmartPresets()` is used). The modals stack: the last one
|
|
1319
|
+
* opened is on top, and `dismiss()` closes it.
|
|
1320
|
+
*
|
|
1321
|
+
* The component gets `props` as its inputs and, when it declares one, a
|
|
1322
|
+
* `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;
|
|
1324
|
+
* closing it by the close button, the backdrop or Escape (as the modal
|
|
1325
|
+
* implementation provides them) resolves `onDidDismiss()` with
|
|
1326
|
+
* `{ data: null }`.
|
|
1327
|
+
*/
|
|
1328
|
+
export declare class ModalService implements OnDestroy {
|
|
1329
|
+
private readonly appRef;
|
|
1330
|
+
private readonly environmentInjector;
|
|
1331
|
+
private readonly injector;
|
|
1332
|
+
private readonly document;
|
|
1333
|
+
private readonly entries;
|
|
1334
|
+
/**
|
|
1335
|
+
* Stops Escape before the modal's own document listener (registered after
|
|
1336
|
+
* this one) while the top modal has `backdropDismiss: false`. Elements
|
|
1337
|
+
* inside the modal still receive the key; only document listeners added
|
|
1338
|
+
* after the first modal opened are skipped.
|
|
1339
|
+
*/
|
|
1340
|
+
private readonly onKeydown;
|
|
1341
|
+
show(options: IModalServiceOptions): Promise<IModal>;
|
|
1342
|
+
/** Closes the modal opened last. */
|
|
1343
|
+
dismiss<T>(data?: T | null): Promise<void>;
|
|
1344
|
+
ngOnDestroy(): void;
|
|
1345
|
+
private getClasses;
|
|
1346
|
+
/**
|
|
1347
|
+
* With `backdropDismiss: false`, a click that lands in the modal but outside
|
|
1348
|
+
* its dialog (the backdrop) is stopped before the modal sees it.
|
|
1349
|
+
*/
|
|
1350
|
+
private onBackdropClick;
|
|
1351
|
+
/** Sets the values whose keys `ref`'s component declares as inputs. */
|
|
1352
|
+
private setInputs;
|
|
1353
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
1354
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1355
|
+
}
|
|
1271
1356
|
export declare class AlertService {
|
|
1272
1357
|
private readonly appRef;
|
|
1273
1358
|
private readonly environmentInjector;
|
|
@@ -1331,16 +1416,48 @@ export declare class DynamicContentDirective {
|
|
|
1331
1416
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentDirective, never>;
|
|
1332
1417
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicContentDirective, ".dynamic-content", never, {}, {}, never, never, true, never>;
|
|
1333
1418
|
}
|
|
1419
|
+
/** What `showDetailsModal` (and `[smartDetails]`) opens. */
|
|
1420
|
+
export interface IDetailsModalOptions {
|
|
1421
|
+
/** Rendered in the modal, with `params` as its `value` input. */
|
|
1422
|
+
component: any;
|
|
1423
|
+
params: any;
|
|
1424
|
+
/** Default `'bottom'`. */
|
|
1425
|
+
mode?: 'bottom' | 'default';
|
|
1426
|
+
}
|
|
1427
|
+
/** The callbacks of `showDetailsModal`. */
|
|
1428
|
+
export interface IDetailsModalCallbacks {
|
|
1429
|
+
/** Once the modal is open. */
|
|
1430
|
+
showed?: () => void;
|
|
1431
|
+
/** Once the modal is closed. */
|
|
1432
|
+
dismissed?: () => void;
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* Opens `options.component` through `ModalService` with
|
|
1436
|
+
* `{ value: options.params }` as its inputs (e.g. `DetailsPage` with
|
|
1437
|
+
* `IDetailsOptions`), closes it when the browser goes back
|
|
1438
|
+
* (`HardwareService.onBackButtonClick`) and resolves once it is closed.
|
|
1439
|
+
* Without `options` or `options.component` it does nothing.
|
|
1440
|
+
*/
|
|
1441
|
+
export declare function showDetailsModal(services: {
|
|
1442
|
+
modalService: ModalService;
|
|
1443
|
+
hardwareService: HardwareService;
|
|
1444
|
+
injector?: Injector;
|
|
1445
|
+
}, options: IDetailsModalOptions | null | undefined, { showed, dismissed }?: IDetailsModalCallbacks): Promise<void>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Opens `component` in a modal on click (`ModalService`, mode `'bottom'` by
|
|
1448
|
+
* default) with `{ value: params }` as its inputs; the modal closes when the
|
|
1449
|
+
* browser goes back. Emits `smartDetailsShowed` once the modal is open and
|
|
1450
|
+
* `smartDetailsDismissed` once it is closed.
|
|
1451
|
+
*/
|
|
1334
1452
|
export declare class DetailsDirective {
|
|
1335
1453
|
private modalService;
|
|
1336
1454
|
private hardwareService;
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
mode?: "bottom" | "default";
|
|
1341
|
-
}>;
|
|
1455
|
+
private injector;
|
|
1456
|
+
private destroyed;
|
|
1457
|
+
options: import("@angular/core").InputSignal<IDetailsModalOptions>;
|
|
1342
1458
|
smartDetailsShowed: import("@angular/core").OutputEmitterRef<void>;
|
|
1343
1459
|
smartDetailsDismissed: import("@angular/core").OutputEmitterRef<void>;
|
|
1460
|
+
constructor();
|
|
1344
1461
|
click(): Promise<void>;
|
|
1345
1462
|
static ɵfac: i0.ɵɵFactoryDeclaration<DetailsDirective, never>;
|
|
1346
1463
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DetailsDirective, "[smartDetails]", never, {
|
|
@@ -4596,14 +4713,51 @@ export declare abstract class InputFileBaseComponent<T> extends InputBaseCompone
|
|
|
4596
4713
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputFileBaseComponent<any>, never>;
|
|
4597
4714
|
static ɵdir: i0.ɵɵDirectiveDeclaration<InputFileBaseComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
4598
4715
|
}
|
|
4716
|
+
type InputPossibilities = Array<{
|
|
4717
|
+
id: any;
|
|
4718
|
+
text: string;
|
|
4719
|
+
checked: boolean;
|
|
4720
|
+
}> | null;
|
|
4721
|
+
/**
|
|
4722
|
+
* Base of the fields with a list of possibilities (radio, check, enum preset).
|
|
4723
|
+
* `possibilities` holds the list the `MODEL_POSSIBILITIES_PROVIDER` signal
|
|
4724
|
+
* returns (asked again 500 ms after the parent form's value changed), else the
|
|
4725
|
+
* input options' `possibilities`, else the field's own `possibilities`
|
|
4726
|
+
* (`getModelPossibilities()`). A subclass that overrides
|
|
4727
|
+
* `afterSetOptionsHandler()` calls `super.afterSetOptionsHandler()` first.
|
|
4728
|
+
*/
|
|
4599
4729
|
export declare abstract class InputPossibilitiesBaseComponent<T> extends InputBaseComponent<T> {
|
|
4600
4730
|
private modelPossibilitiesProvider;
|
|
4731
|
+
private readonly possibilitiesSources;
|
|
4732
|
+
private readonly resolvedPossibilities;
|
|
4733
|
+
private providerRefresh;
|
|
4734
|
+
possibilities: WritableSignal<InputPossibilities>;
|
|
4735
|
+
constructor();
|
|
4601
4736
|
protected afterSetOptionsHandler(): void;
|
|
4737
|
+
/**
|
|
4738
|
+
* Runs whenever the resolved possibilities may have changed: after the
|
|
4739
|
+
* options are set, after the provider was asked again and when a signal
|
|
4740
|
+
* holding them changes. No base functionality.
|
|
4741
|
+
*/
|
|
4742
|
+
protected afterPossibilitiesChange(): void;
|
|
4743
|
+
/**
|
|
4744
|
+
* The field's own `possibilities` (from its `@Field()` metadata, read
|
|
4745
|
+
* through the first item of an array model) when they are an object map
|
|
4746
|
+
* `{ text: id }`, e.g. an enum, as a list; `null` otherwise.
|
|
4747
|
+
*/
|
|
4748
|
+
protected getModelPossibilities(): InputPossibilities;
|
|
4749
|
+
/**
|
|
4750
|
+
* The raw `possibilities` of the field's `@Field()` metadata, read through
|
|
4751
|
+
* the first item of an array model when the model itself has none.
|
|
4752
|
+
*/
|
|
4753
|
+
protected getModelFieldPossibilities(): any;
|
|
4602
4754
|
protected getPossibilitiesFromProvider(): WritableSignal<{
|
|
4603
4755
|
id: any;
|
|
4604
4756
|
text: string;
|
|
4605
4757
|
checked: boolean;
|
|
4606
4758
|
}[] | null>;
|
|
4759
|
+
private refreshProviderPossibilities;
|
|
4760
|
+
private watchProviderPossibilities;
|
|
4607
4761
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputPossibilitiesBaseComponent<any>, never>;
|
|
4608
4762
|
static ɵdir: i0.ɵɵDirectiveDeclaration<InputPossibilitiesBaseComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
4609
4763
|
}
|
|
@@ -4802,7 +4956,6 @@ declare namespace radio_component_d_exports {
|
|
|
4802
4956
|
export declare class InputRadioComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
4803
4957
|
labelClasses: import("@angular/core").Signal<string>;
|
|
4804
4958
|
groupClasses: import("@angular/core").Signal<string>;
|
|
4805
|
-
protected afterSetOptionsHandler(): void;
|
|
4806
4959
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputRadioComponent<any>, never>;
|
|
4807
4960
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputRadioComponent<any>, "smart-input-radio", never, {}, {}, never, never, true, never>;
|
|
4808
4961
|
}
|
|
@@ -4846,14 +4999,17 @@ declare namespace check_component_d_exports {
|
|
|
4846
4999
|
export { InputCheckComponent };
|
|
4847
5000
|
}
|
|
4848
5001
|
export declare class InputCheckComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
4849
|
-
|
|
4850
|
-
id: any;
|
|
4851
|
-
text: string;
|
|
4852
|
-
checked: boolean;
|
|
4853
|
-
}> | null>;
|
|
5002
|
+
private controlChanges;
|
|
4854
5003
|
labelClasses: import("@angular/core").Signal<string>;
|
|
4855
5004
|
groupClasses: import("@angular/core").Signal<string>;
|
|
4856
5005
|
protected afterSetOptionsHandler(): void;
|
|
5006
|
+
protected afterPossibilitiesChange(): void;
|
|
5007
|
+
/** The field's own `possibilities` when they are a list; `null` otherwise. */
|
|
5008
|
+
protected getModelPossibilities(): Array<{
|
|
5009
|
+
id: any;
|
|
5010
|
+
text: string;
|
|
5011
|
+
checked: boolean;
|
|
5012
|
+
}> | null;
|
|
4857
5013
|
private syncCheckedWithControl;
|
|
4858
5014
|
refresh(item: {
|
|
4859
5015
|
id: any;
|
|
@@ -5020,16 +5176,19 @@ export declare class InputAttachmentPresetComponent<T> extends InputFileBaseComp
|
|
|
5020
5176
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputAttachmentPresetComponent<any>, "smart-input-attachment-preset", never, {}, {}, never, never, true, never>;
|
|
5021
5177
|
}
|
|
5022
5178
|
export declare class InputCheckPresetComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
5023
|
-
|
|
5024
|
-
id: any;
|
|
5025
|
-
text: string;
|
|
5026
|
-
checked: boolean;
|
|
5027
|
-
}> | null>;
|
|
5179
|
+
private controlChanges;
|
|
5028
5180
|
labelClasses: import("@angular/core").Signal<string>;
|
|
5029
5181
|
groupClasses: import("@angular/core").Signal<string>;
|
|
5030
5182
|
checkboxClasses: import("@angular/core").Signal<string>;
|
|
5031
5183
|
optionLabelClasses: import("@angular/core").Signal<string>;
|
|
5032
5184
|
protected afterSetOptionsHandler(): void;
|
|
5185
|
+
protected afterPossibilitiesChange(): void;
|
|
5186
|
+
/** The field's own `possibilities` when they are a list; `null` otherwise. */
|
|
5187
|
+
protected getModelPossibilities(): Array<{
|
|
5188
|
+
id: any;
|
|
5189
|
+
text: string;
|
|
5190
|
+
checked: boolean;
|
|
5191
|
+
}> | null;
|
|
5033
5192
|
private syncCheckedWithControl;
|
|
5034
5193
|
refresh(item: {
|
|
5035
5194
|
id: any;
|
|
@@ -5138,7 +5297,6 @@ export declare class InputEmailPresetComponent<T> extends InputBaseComponent<T>
|
|
|
5138
5297
|
export declare class InputEnumPresetComponent<T> extends InputPossibilitiesBaseComponent<T> {
|
|
5139
5298
|
labelClasses: import("@angular/core").Signal<string>;
|
|
5140
5299
|
selectClasses: import("@angular/core").Signal<string>;
|
|
5141
|
-
protected afterSetOptionsHandler(): void;
|
|
5142
5300
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputEnumPresetComponent<any>, never>;
|
|
5143
5301
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputEnumPresetComponent<any>, "smart-input-enum-preset", never, {}, {}, never, never, true, never>;
|
|
5144
5302
|
}
|
|
@@ -5326,7 +5484,6 @@ export declare class InputRadioPresetComponent<T> extends InputPossibilitiesBase
|
|
|
5326
5484
|
groupClasses: import("@angular/core").Signal<string>;
|
|
5327
5485
|
radioClasses: import("@angular/core").Signal<string>;
|
|
5328
5486
|
itemLabelClasses: import("@angular/core").Signal<string>;
|
|
5329
|
-
protected afterSetOptionsHandler(): void;
|
|
5330
5487
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputRadioPresetComponent<any>, never>;
|
|
5331
5488
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputRadioPresetComponent<any>, "smart-input-radio-preset", never, {}, {}, never, never, true, never>;
|
|
5332
5489
|
}
|
|
@@ -5799,6 +5956,36 @@ export declare class InfoComponent {
|
|
|
5799
5956
|
};
|
|
5800
5957
|
}, {}, never, never, true, never>;
|
|
5801
5958
|
}
|
|
5959
|
+
/** The sort a list shows: the column key and its direction. */
|
|
5960
|
+
export interface IListSortState {
|
|
5961
|
+
key: string;
|
|
5962
|
+
desc: boolean;
|
|
5963
|
+
}
|
|
5964
|
+
/** What a sortable header passes to `provider.getData`. */
|
|
5965
|
+
export interface IListSortFilter {
|
|
5966
|
+
offset: 0;
|
|
5967
|
+
sortBy: string;
|
|
5968
|
+
sortDesc: boolean;
|
|
5969
|
+
}
|
|
5970
|
+
/**
|
|
5971
|
+
* The sort a list starts with: `sort.default` (descending with
|
|
5972
|
+
* `sort.defaultDesc`), `null` without a default.
|
|
5973
|
+
*/
|
|
5974
|
+
export declare function getListDefaultSort(sort: IListOptions<unknown>['sort']): IListSortState | null;
|
|
5975
|
+
/**
|
|
5976
|
+
* The sort after a click on the header of `key`: ascending for another
|
|
5977
|
+
* column, the opposite direction for the active one.
|
|
5978
|
+
*/
|
|
5979
|
+
export declare function getNextListSort(current: IListSortState | null, key: string): IListSortState;
|
|
5980
|
+
/**
|
|
5981
|
+
* Whether the column `key` can be sorted: every field column, not the
|
|
5982
|
+
* expanded `__array` columns of a `dynamic` field.
|
|
5983
|
+
*/
|
|
5984
|
+
export declare function isListSortableKey(key: string): boolean;
|
|
5985
|
+
/** The `aria-sort` of the header of `key`: only the active one has it. */
|
|
5986
|
+
export declare function getListAriaSort(current: IListSortState | null, key: string): 'ascending' | 'descending' | null;
|
|
5987
|
+
/** The arrow of a sortable header: `↑`, `↓`, or `↕` when it is not active. */
|
|
5988
|
+
export declare function getListSortIndicator(current: IListSortState | null, key: string): string;
|
|
5802
5989
|
export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
5803
5990
|
static smartType: DynamicComponentType;
|
|
5804
5991
|
private _fields;
|
|
@@ -5808,6 +5995,8 @@ export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
|
5808
5995
|
protected alertService: AlertService;
|
|
5809
5996
|
protected cd: ChangeDetectorRef;
|
|
5810
5997
|
protected translateService: TranslateService;
|
|
5998
|
+
protected injector: Injector;
|
|
5999
|
+
private loadingNextPage;
|
|
5811
6000
|
detailsComponent: any;
|
|
5812
6001
|
selectMode?: 'multi';
|
|
5813
6002
|
detailsComponentProps: IDetailsOptions<T>;
|
|
@@ -5815,6 +6004,12 @@ export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
|
5815
6004
|
unselect: () => void;
|
|
5816
6005
|
itemHandler: ((id: string) => void) | null;
|
|
5817
6006
|
removeHandler: ((item: T) => void) | null;
|
|
6007
|
+
/**
|
|
6008
|
+
* Opens the details of an item in a modal (`details` set): `DetailsPage`, or
|
|
6009
|
+
* `details.component`, with `detailsComponentProps` as its `value`; `null`
|
|
6010
|
+
* without `details`.
|
|
6011
|
+
*/
|
|
6012
|
+
detailsHandler: ((item: T) => void) | null;
|
|
5818
6013
|
checkRemoveHandler: (item: T) => boolean;
|
|
5819
6014
|
detailsButtonOptions: IButtonOptions;
|
|
5820
6015
|
removed: Set<string>;
|
|
@@ -5836,11 +6031,43 @@ export declare abstract class ListBaseComponent<T extends IEntity<string>> {
|
|
|
5836
6031
|
options: InputSignal<IListInternalOptions<T>>;
|
|
5837
6032
|
cssClass: InputSignal<string>;
|
|
5838
6033
|
contentTpl: Signal<ViewContainerRef | undefined>;
|
|
6034
|
+
/** Whether the column headers sort the list (`options.sort` set). */
|
|
6035
|
+
sortable: Signal<boolean>;
|
|
6036
|
+
/**
|
|
6037
|
+
* The sort the headers show: `sort.default` / `sort.defaultDesc` at first,
|
|
6038
|
+
* then the last header clicked. It starts over when `options.sort` changes.
|
|
6039
|
+
*/
|
|
6040
|
+
activeSort: import("@angular/core").WritableSignal<IListSortState | null>;
|
|
6041
|
+
/**
|
|
6042
|
+
* `true` with `pagination.mode === PaginationMode.infiniteScroll` and a next
|
|
6043
|
+
* page: the modes render the `#infiniteScrollAnchor` element after the
|
|
6044
|
+
* items, and the next page loads when it scrolls into view.
|
|
6045
|
+
*/
|
|
6046
|
+
infiniteScroll: Signal<boolean>;
|
|
6047
|
+
infiniteScrollAnchor: Signal<ElementRef<HTMLElement> | undefined>;
|
|
5839
6048
|
constructor();
|
|
5840
6049
|
protected initKeys(data?: Array<T> | null): void;
|
|
5841
6050
|
protected initList(val: IListInternalOptions<T>): void;
|
|
5842
6051
|
protected initLoading(): void;
|
|
5843
6052
|
protected afterInitOptions(): void;
|
|
6053
|
+
/** Whether the header of `key` sorts the list. */
|
|
6054
|
+
isSortable(key: string): boolean;
|
|
6055
|
+
/**
|
|
6056
|
+
* Sorts by `key`: ascending for another column, the opposite direction for
|
|
6057
|
+
* the active one, read from the first page through
|
|
6058
|
+
* `provider.getData({ offset: 0, sortBy, sortDesc })`.
|
|
6059
|
+
*/
|
|
6060
|
+
sortBy(key: string): void;
|
|
6061
|
+
/** The `aria-sort` of the header of `key` (only the active one has it). */
|
|
6062
|
+
ariaSort(key: string): 'ascending' | 'descending' | null;
|
|
6063
|
+
/** The arrow shown in the header of `key`. */
|
|
6064
|
+
sortIndicator(key: string): string;
|
|
6065
|
+
/**
|
|
6066
|
+
* Opens the details of `item` in a modal: clears the details provider,
|
|
6067
|
+
* opens the details component (`DetailsPage` by default) through
|
|
6068
|
+
* `ModalService` and asks the provider for the item (`select(id)`).
|
|
6069
|
+
*/
|
|
6070
|
+
openDetails(item: T): Promise<void>;
|
|
5844
6071
|
handlePageChange(nextPage: number): void;
|
|
5845
6072
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListBaseComponent<any>, never>;
|
|
5846
6073
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ListBaseComponent<any>, never, never, {
|
|
@@ -5949,7 +6176,10 @@ export declare class ListMasonryGridComponent<T extends IEntity<string>> extends
|
|
|
5949
6176
|
* select, remove/item actions, pagination, image cells) and restyles it with
|
|
5950
6177
|
* the Preline table look. Styling variations are driven by
|
|
5951
6178
|
* `options.presentation`: `variant` (default | striped | bordered |
|
|
5952
|
-
* borderless), `hoverable`, and `header` (default | muted | none).
|
|
6179
|
+
* borderless), `hoverable`, and `header` (default | muted | none). With
|
|
6180
|
+
* `options.sort` the field headers are sort buttons, with `options.details`
|
|
6181
|
+
* every row gets a details action, and `PaginationMode.infiniteScroll` loads
|
|
6182
|
+
* the next page when the end of the table scrolls into view.
|
|
5953
6183
|
*
|
|
5954
6184
|
* Decorator metadata is not inherited, so the full `imports` list is repeated.
|
|
5955
6185
|
*/
|
|
@@ -5961,6 +6191,8 @@ export declare class ListDesktopPresetComponent<T extends IEntity<string>> exten
|
|
|
5961
6191
|
headerCellClasses: import("@angular/core").Signal<string>;
|
|
5962
6192
|
rowClasses: import("@angular/core").Signal<string>;
|
|
5963
6193
|
cellClasses: import("@angular/core").Signal<string>;
|
|
6194
|
+
protected readonly sortButtonClasses: string;
|
|
6195
|
+
protected readonly sortIndicatorClasses: string;
|
|
5964
6196
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListDesktopPresetComponent<any>, never>;
|
|
5965
6197
|
static ɵcmp: i0.ɵɵComponentDeclaration<ListDesktopPresetComponent<any>, "smart-list-desktop-preset", never, {}, {}, never, never, true, never>;
|
|
5966
6198
|
}
|
|
@@ -6319,6 +6551,7 @@ export declare class ModalPresetComponent extends ModalBaseComponent {
|
|
|
6319
6551
|
protected footerClasses: import("@angular/core").Signal<string>;
|
|
6320
6552
|
protected actionClasses(variant?: string): string;
|
|
6321
6553
|
protected onBackdropClick(event: MouseEvent): void;
|
|
6554
|
+
constructor();
|
|
6322
6555
|
protected onEscape(): void;
|
|
6323
6556
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalPresetComponent, never>;
|
|
6324
6557
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalPresetComponent, "smart-modal-preset", never, {
|
|
@@ -8640,6 +8873,8 @@ export declare abstract class VerticalNavigationBaseComponent {
|
|
|
8640
8873
|
}, never, never, true, never>;
|
|
8641
8874
|
}
|
|
8642
8875
|
export declare class VerticalNavigationStandardComponent extends VerticalNavigationBaseComponent {
|
|
8876
|
+
private readonly idPrefix;
|
|
8877
|
+
protected groupTitleId(groupIndex: number): string;
|
|
8643
8878
|
protected onItemClick(itemId: string): void;
|
|
8644
8879
|
protected get groups(): import("@smartsoft001/angular").IVerticalNavGroup[];
|
|
8645
8880
|
static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationStandardComponent, never>;
|
|
@@ -8654,7 +8889,9 @@ export declare class VerticalNavigationStandardComponent extends VerticalNavigat
|
|
|
8654
8889
|
* selector directly.
|
|
8655
8890
|
*
|
|
8656
8891
|
* 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.
|
|
8892
|
+
* border, the `current` item gaining the primary border + text accent. One
|
|
8893
|
+
* `<nav>` landmark (`options.ariaLabel`, `'Sidebar'` by default) holds every
|
|
8894
|
+
* group; a group is a list labelled by its title.
|
|
8658
8895
|
*/
|
|
8659
8896
|
export declare class VerticalNavigationPresetComponent extends VerticalNavigationBaseComponent {
|
|
8660
8897
|
cssClass: import("@angular/core").InputSignal<string>;
|
|
@@ -8665,6 +8902,9 @@ export declare class VerticalNavigationPresetComponent extends VerticalNavigatio
|
|
|
8665
8902
|
protected iconClasses: string;
|
|
8666
8903
|
protected initialClasses: string;
|
|
8667
8904
|
protected badgeClasses: string;
|
|
8905
|
+
protected listItemClasses: string;
|
|
8906
|
+
private readonly idPrefix;
|
|
8907
|
+
protected groupTitleId(groupIndex: number): string;
|
|
8668
8908
|
protected itemClasses(current: boolean | undefined): string;
|
|
8669
8909
|
protected onItemClick(itemId: string): void;
|
|
8670
8910
|
static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationPresetComponent, never>;
|
|
@@ -8730,18 +8970,36 @@ export declare class SharedFactoriesModule {
|
|
|
8730
8970
|
declare namespace details_page_d_exports {
|
|
8731
8971
|
export { DetailsPage };
|
|
8732
8972
|
}
|
|
8973
|
+
/**
|
|
8974
|
+
* The details of `value` full width, with the application style
|
|
8975
|
+
* (`StyleService`) applied to its element. Open it in a modal with
|
|
8976
|
+
* `[smartDetails]="{ component: DetailsPage, params }"` (or
|
|
8977
|
+
* `ModalService.show({ component: DetailsPage, props: { value } })`), which
|
|
8978
|
+
* passes `params` as `value`.
|
|
8979
|
+
*
|
|
8980
|
+
* `pageOptions()` gives the title and buttons for a page layout around it: a
|
|
8981
|
+
* `trash` button for `removeHandler` and an `arrow-forward-outline` button for
|
|
8982
|
+
* `itemHandler`, both closing the modal through `ModalService.dismiss()`. The
|
|
8983
|
+
* page layout itself moved out of the library (FRA-121), so the page does not
|
|
8984
|
+
* render them.
|
|
8985
|
+
*/
|
|
8733
8986
|
export declare class DetailsPage<T extends IEntity<string>> implements OnInit {
|
|
8734
8987
|
private modalService;
|
|
8735
8988
|
private styleService;
|
|
8736
8989
|
private elementRef;
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8990
|
+
/** The details to show; `[smartDetails]` passes its `params` here. */
|
|
8991
|
+
value: import("@angular/core").InputSignal<IDetailsOptions<T> | undefined>;
|
|
8992
|
+
pageOptions: Signal<IPageOptions>;
|
|
8740
8993
|
ngOnInit(): void;
|
|
8741
|
-
private
|
|
8742
|
-
private initButtons;
|
|
8994
|
+
private getButtons;
|
|
8743
8995
|
static ɵfac: i0.ɵɵFactoryDeclaration<DetailsPage<any>, never>;
|
|
8744
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DetailsPage<any>, "ng-component", never, {
|
|
8996
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DetailsPage<any>, "ng-component", never, {
|
|
8997
|
+
"value": {
|
|
8998
|
+
"alias": "value";
|
|
8999
|
+
"required": false;
|
|
9000
|
+
"isSignal": true;
|
|
9001
|
+
};
|
|
9002
|
+
}, {}, never, never, true, never>;
|
|
8745
9003
|
}
|
|
8746
9004
|
declare namespace components_module_d_exports {
|
|
8747
9005
|
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 +9012,7 @@ declare const EXPORT_COMPONENTS: (typeof ExportComponent)[];
|
|
|
8754
9012
|
declare const IMPORT_COMPONENTS: (typeof ImportComponent)[];
|
|
8755
9013
|
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
9014
|
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
|
|
9015
|
+
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
9016
|
declare const LIST_COMPONENTS: (typeof ListDesktopComponent | typeof ListMasonryGridComponent | typeof ListMobileComponent | typeof ListComponent)[];
|
|
8759
9017
|
declare const LOADER_COMPONENTS: (typeof LoaderStandardComponent | typeof LoaderComponent)[];
|
|
8760
9018
|
declare const PAGE_COMPONENTS: (typeof PageStandardComponent | typeof PageComponent)[];
|