@wolkabout/commons 0.1.4 → 0.1.6
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 +17 -17
- package/fesm2022/wolkabout-commons.mjs +293 -113
- package/fesm2022/wolkabout-commons.mjs.map +1 -1
- package/package.json +1 -1
- package/types/wolkabout-commons.d.ts +70 -7
package/package.json
CHANGED
|
@@ -339,6 +339,19 @@ declare class FullscreenService {
|
|
|
339
339
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FullscreenService>;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
declare class NavigationPersistenceService {
|
|
343
|
+
private readonly registeredKeys;
|
|
344
|
+
private readonly STORAGE_SUFFIX;
|
|
345
|
+
constructor();
|
|
346
|
+
save(key: string, value: string): void;
|
|
347
|
+
restore(key: string): string | null;
|
|
348
|
+
remove(key: string): void;
|
|
349
|
+
clearMultiple(keys: string[]): void;
|
|
350
|
+
clearAll(): void;
|
|
351
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NavigationPersistenceService, never>;
|
|
352
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NavigationPersistenceService>;
|
|
353
|
+
}
|
|
354
|
+
|
|
342
355
|
declare class LoadingIndicatorDirective {
|
|
343
356
|
private element;
|
|
344
357
|
set appLoadingShimmer(isLoading: boolean | unknown);
|
|
@@ -992,6 +1005,7 @@ interface NestedListItem<ItemType> {
|
|
|
992
1005
|
idPath: string;
|
|
993
1006
|
type?: string;
|
|
994
1007
|
icon: string | LoadedIcon | SvgIcon;
|
|
1008
|
+
rightNumber?: number;
|
|
995
1009
|
isRoot: boolean;
|
|
996
1010
|
data: ItemType;
|
|
997
1011
|
}
|
|
@@ -1008,6 +1022,10 @@ declare abstract class NestedListDataSource<ItemType> {
|
|
|
1008
1022
|
* Loads children for the currently selected item.
|
|
1009
1023
|
*/
|
|
1010
1024
|
abstract loadChildren(item: NestedListItem<ItemType>): Observable<ItemType[]>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Loads all the scopes of associated items.
|
|
1027
|
+
*/
|
|
1028
|
+
loadAssociatedItemsScopes(): Observable<string[]>;
|
|
1011
1029
|
/**
|
|
1012
1030
|
* Sets the id of the item that should be loaded first.
|
|
1013
1031
|
*/
|
|
@@ -1015,19 +1033,29 @@ declare abstract class NestedListDataSource<ItemType> {
|
|
|
1015
1033
|
/**
|
|
1016
1034
|
* Generalized the item and prepares it for display.
|
|
1017
1035
|
*/
|
|
1018
|
-
abstract prepareItem(item: ItemType, isRoot?: boolean): NestedListItem<ItemType>;
|
|
1036
|
+
abstract prepareItem(item: ItemType, isRoot?: boolean, countsMap?: Map<string, number>): NestedListItem<ItemType>;
|
|
1019
1037
|
sortingFunction(item1: NestedListItem<ItemType>, item2: NestedListItem<ItemType>): number;
|
|
1020
1038
|
}
|
|
1021
1039
|
|
|
1022
1040
|
declare class NestedListDataControl<ItemType> {
|
|
1041
|
+
private readonly navigationPersistence;
|
|
1023
1042
|
private _changeSelection$;
|
|
1024
1043
|
private _itemUpdated$;
|
|
1025
1044
|
private _childAdded;
|
|
1026
1045
|
private _itemRemoved$;
|
|
1046
|
+
private _associatedItemAdded$;
|
|
1047
|
+
private _associatedItemRemoved$;
|
|
1048
|
+
private _associatedItemScopeChanged$;
|
|
1049
|
+
storageKey?: string;
|
|
1050
|
+
constructor(storageKey?: string);
|
|
1027
1051
|
readonly selectItem: (id: string) => void;
|
|
1052
|
+
readonly deselectItem: () => void;
|
|
1028
1053
|
readonly updateItem: (item: ItemType) => void;
|
|
1029
1054
|
readonly addItem: (item: ItemType) => void;
|
|
1030
1055
|
readonly removeItem: (id: string) => void;
|
|
1056
|
+
readonly associatedItemAdded: (scopeGuid: string) => void;
|
|
1057
|
+
readonly associatedItemRemoved: (scopeGuid: string) => void;
|
|
1058
|
+
readonly associatedItemScopeChanged: (fromGuid: string, toGuid: string) => void;
|
|
1031
1059
|
/**
|
|
1032
1060
|
* Internal event hook. Do not use outside the Nested List Component
|
|
1033
1061
|
*/
|
|
@@ -1044,6 +1072,25 @@ declare class NestedListDataControl<ItemType> {
|
|
|
1044
1072
|
* Internal event hook. Do not use outside the Nested List Component
|
|
1045
1073
|
*/
|
|
1046
1074
|
get itemRemoved$(): Observable<string>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Internal event hook. Do not use outside the Nested List Component
|
|
1077
|
+
*/
|
|
1078
|
+
get associatedItemAdded$(): Observable<string>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Internal event hook. Do not use outside the Nested List Component
|
|
1081
|
+
*/
|
|
1082
|
+
get associatedItemRemoved$(): Observable<string>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Internal event hook. Do not use outside the Nested List Component
|
|
1085
|
+
*/
|
|
1086
|
+
get associatedItemScopeChanged$(): Observable<{
|
|
1087
|
+
from: string;
|
|
1088
|
+
to: string;
|
|
1089
|
+
}>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Internal event hook. Do not use outside the Nested List Component
|
|
1092
|
+
*/
|
|
1093
|
+
persist(id: string | null): void;
|
|
1047
1094
|
}
|
|
1048
1095
|
|
|
1049
1096
|
interface SearchAction {
|
|
@@ -1083,7 +1130,8 @@ declare class NestedListViewComponent<ItemType> {
|
|
|
1083
1130
|
children: _angular_core.WritableSignal<NestedListItem<ItemType>[]>;
|
|
1084
1131
|
filteredChildren: _angular_core.Signal<NestedListItem<ItemType>[]>;
|
|
1085
1132
|
itemSelected: _angular_core.OutputEmitterRef<ItemType | null>;
|
|
1086
|
-
|
|
1133
|
+
private countsMap;
|
|
1134
|
+
private readonly currentScopes;
|
|
1087
1135
|
constructor(destroyRef: DestroyRef);
|
|
1088
1136
|
private initiateState;
|
|
1089
1137
|
selectBreadcrumb(item: NestedListItem<ItemType>): void;
|
|
@@ -1091,8 +1139,11 @@ declare class NestedListViewComponent<ItemType> {
|
|
|
1091
1139
|
dragStart(event: DragEvent, item: ItemType): void;
|
|
1092
1140
|
resetNavigation(): void;
|
|
1093
1141
|
shouldDisableBreadcrumbClick(item: NestedListItem<ItemType>): boolean | "" | null | undefined;
|
|
1142
|
+
private buildCountsMap;
|
|
1143
|
+
private adjustCount;
|
|
1144
|
+
private refreshCount;
|
|
1094
1145
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NestedListViewComponent<any>, never>;
|
|
1095
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NestedListViewComponent<any>, "app-nested-list-view", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "dataControl": { "alias": "dataControl"; "required": true; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "disableThresholdId": { "alias": "disableThresholdId"; "required": false; "isSignal": true; }; "isColoredInput": { "alias": "isColoredInput"; "required": false; "isSignal": true; }; "searchActions": { "alias": "searchActions"; "required": false; "isSignal": true; }; "selectionConfirmationAction": { "alias": "selectionConfirmationAction"; "required": false; "isSignal": true; }; "hideSearch": { "alias": "hideSearch"; "required": false; "isSignal": true; }; "rootButtonText": { "alias": "rootButtonText"; "required": false; "isSignal": true; }; "enableDrag": { "alias": "enableDrag"; "required": false; "isSignal": true; }; }, { "dragging": "dragging"; "itemSelected": "itemSelected"; },
|
|
1146
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NestedListViewComponent<any>, "app-nested-list-view", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "dataControl": { "alias": "dataControl"; "required": true; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "disableThresholdId": { "alias": "disableThresholdId"; "required": false; "isSignal": true; }; "isColoredInput": { "alias": "isColoredInput"; "required": false; "isSignal": true; }; "searchActions": { "alias": "searchActions"; "required": false; "isSignal": true; }; "selectionConfirmationAction": { "alias": "selectionConfirmationAction"; "required": false; "isSignal": true; }; "hideSearch": { "alias": "hideSearch"; "required": false; "isSignal": true; }; "rootButtonText": { "alias": "rootButtonText"; "required": false; "isSignal": true; }; "enableDrag": { "alias": "enableDrag"; "required": false; "isSignal": true; }; }, { "dragging": "dragging"; "itemSelected": "itemSelected"; }, never, ["[app-no-items-message]", "[app-actions]", "[app-details]"], true, never>;
|
|
1096
1147
|
}
|
|
1097
1148
|
|
|
1098
1149
|
declare class PdfViewerComponent {
|
|
@@ -1139,12 +1190,16 @@ interface PartialUpdate<ItemType> {
|
|
|
1139
1190
|
update: (oldItem: ItemType) => ItemType;
|
|
1140
1191
|
}
|
|
1141
1192
|
declare class StandardListDataControl<ItemType> {
|
|
1193
|
+
private readonly navigationPersistence;
|
|
1142
1194
|
private _changeSelection$;
|
|
1143
1195
|
private _itemUpdated$;
|
|
1144
1196
|
private _itemPartiallyUpdated$;
|
|
1145
1197
|
private _itemAdded$;
|
|
1146
1198
|
private _itemRemoved$;
|
|
1199
|
+
storageKey?: string;
|
|
1200
|
+
constructor(storageKey?: string);
|
|
1147
1201
|
readonly selectItem: (id: string) => void;
|
|
1202
|
+
readonly deselectItem: () => void;
|
|
1148
1203
|
readonly updateItem: (item: ItemType) => void;
|
|
1149
1204
|
readonly updateItemPartially: (id: string, update: (oldItem: ItemType) => ItemType) => void;
|
|
1150
1205
|
readonly addItem: (item: ItemType) => void;
|
|
@@ -1169,6 +1224,10 @@ declare class StandardListDataControl<ItemType> {
|
|
|
1169
1224
|
* Internal event hook. Do not use outside the Standard List Component
|
|
1170
1225
|
*/
|
|
1171
1226
|
get itemRemoved$(): Observable<string>;
|
|
1227
|
+
/**
|
|
1228
|
+
* Internal event hook. Do not use outside the Standard List Component
|
|
1229
|
+
*/
|
|
1230
|
+
persist(id: string | null): void;
|
|
1172
1231
|
}
|
|
1173
1232
|
|
|
1174
1233
|
declare class StandardListViewComponent<ItemType> {
|
|
@@ -1201,11 +1260,12 @@ declare const LAST_ACTIVE_TAB_KEY = "WOLK_LAST_ACTIVE_TAB";
|
|
|
1201
1260
|
declare class TabulatedChipViewComponent {
|
|
1202
1261
|
private router;
|
|
1203
1262
|
private route;
|
|
1263
|
+
private navigationPersistenceService;
|
|
1204
1264
|
tabs: _angular_core.InputSignal<Tab[]>;
|
|
1205
1265
|
queryParamHandling: _angular_core.InputSignal<QueryParamsHandling>;
|
|
1206
1266
|
saveLastActiveTab: _angular_core.InputSignal<boolean>;
|
|
1207
1267
|
navBarLayoutClasses: _angular_core.InputSignal<string>;
|
|
1208
|
-
constructor(router: Router, route: ActivatedRoute);
|
|
1268
|
+
constructor(router: Router, route: ActivatedRoute, navigationPersistenceService: NavigationPersistenceService);
|
|
1209
1269
|
isActive(route: string): boolean;
|
|
1210
1270
|
navigate(route: string): void;
|
|
1211
1271
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabulatedChipViewComponent, never>;
|
|
@@ -1215,12 +1275,15 @@ declare class TabulatedChipViewComponent {
|
|
|
1215
1275
|
declare class TabulatedViewComponent {
|
|
1216
1276
|
private router;
|
|
1217
1277
|
private route;
|
|
1278
|
+
private navigationPersistenceService;
|
|
1218
1279
|
tabs: Tab[];
|
|
1219
|
-
|
|
1280
|
+
queryParamHandling: QueryParamsHandling;
|
|
1281
|
+
saveLastActiveTab: boolean;
|
|
1282
|
+
constructor(router: Router, route: ActivatedRoute, navigationPersistenceService: NavigationPersistenceService);
|
|
1220
1283
|
isActive(route: string): boolean;
|
|
1221
1284
|
navigate(route: string): void;
|
|
1222
1285
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabulatedViewComponent, never>;
|
|
1223
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabulatedViewComponent, "app-tabulated-view", never, { "tabs": { "alias": "tabs"; "required": true; }; }, {}, never, never, true, never>;
|
|
1286
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabulatedViewComponent, "app-tabulated-view", never, { "tabs": { "alias": "tabs"; "required": true; }; "queryParamHandling": { "alias": "queryParamHandling"; "required": false; }; "saveLastActiveTab": { "alias": "saveLastActiveTab"; "required": false; }; }, {}, never, never, true, never>;
|
|
1224
1287
|
}
|
|
1225
1288
|
|
|
1226
1289
|
interface TreeNode<Type> {
|
|
@@ -1603,5 +1666,5 @@ declare class DoubleDrawerLayoutComponent {
|
|
|
1603
1666
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DoubleDrawerLayoutComponent, "app-double-drawer-layout", never, { "leftDrawerConfig": { "alias": "leftDrawerConfig"; "required": true; "isSignal": true; }; "rightDrawerConfig": { "alias": "rightDrawerConfig"; "required": false; "isSignal": true; }; "backdropConfig": { "alias": "backdropConfig"; "required": true; "isSignal": true; }; "dialogConfig": { "alias": "dialogConfig"; "required": false; "isSignal": true; }; "enableFullScreen": { "alias": "enableFullScreen"; "required": false; "isSignal": true; }; }, { "leftDrawerToggled": "leftDrawerToggled"; "rightDrawerToggled": "rightDrawerToggled"; }, never, ["[left-drawer]", "[details]", "[right-drawer]"], true, never>;
|
|
1604
1667
|
}
|
|
1605
1668
|
|
|
1606
|
-
export { AUTHENTICATION_CLIENT, AssetManager, AuthenticationService, AutocompleteChipsComponent, AutocompleteComponent, BasicTimeSeriesGraphComponent, COLORS, CUSTOM_PERIOD, CardLabeledValueComponent, ConfirmationDialogComponent, DEFAULT_LOCALE, DEFAULT_TIMEZONES, DEFAULT_TIME_ZONE, DataType, DateRangeInputComponent, DateTimeFormFieldComponent, DoubleDrawerLayoutComponent, DragDropFileUploadComponent, DurationPipe, FeatureRegistry, FullscreenService, GoogleMapComponent, IconComponent, IconRegistryService, ImageDisplayComponent, ImagePreviewComponent, LAST_ACTIVE_TAB_KEY, LOCALES, LabeledValueComponent, LoadedIconComponent, LoadingIndicatorDirective, LocalSortTableComponent, Locale, LocalizedNumberPipe, LocalizedNumericInputDirective, MILLISECONDS_IN_DAY, MapsLoaderService, MasterDetailsViewComponent, MessageTooltipDirective, MissingTranslationHelper, NestedListDataControl, NestedListDataSource, NestedListViewComponent, NotificationService, OverflowClassDirective, PdfViewerComponent, PeriodErrorStateMatcher, PermissionsService, RELATIVE_TIME_PERIODS, RelativeTimePeriod, RequiresAllGlobalOrAssetPermissionsDirective, RequiresAllPermissionDirective, RequiresGlobalOrAsserPermissionDirective, RequiresPermissionDirective, ScrollIntoViewDirective, SharedModule, SimpleDatePipe, SimpleDateTimePipe, SimpleTimePipe, SortPipe, StandardListDataControl, StandardListDataSource, StandardListViewComponent, TIMEZONES, TabulatedChipViewComponent, TabulatedViewComponent, TenantPropertiesService, ThemeService, TreeComponent, TreeNodeComponent, USERS_TIME_ZONE, ValueDisplayComponent, ValueInputBooleanComponent, ValueInputColorComponent, ValueInputComponent, ValueInputDateComponent, ValueInputDurationComponent, ValueInputEnumComponent, ValueInputHexadecimalComponent, ValueInputLinkComponent, ValueInputLocationComponent, ValueInputNumericComponent, ValueInputStringComponent, ValueInputVectorComponent, arrayToObject, chartThemeDark, chartThemeLight, daysAway, determineMagnitude, determineMinMaxValues, endOfPeriod, equalsByValue, fileSizeValidator, flatMap, flatten, format, formatDuration, generateRandomString, globalPermissionGuard, groupBy, hoursAway, isContextAccessible, lookUpPathPart, lookUpQueryParam, parseDateRangeInputPeriod, parseTimeInput, saveFile, scale, startOfMonth, startOfPeriod, startOfTheDay, startOfWeek, startOfYear, tenantHostUrlValidator, toDate, toEndOfMonth, toEndOfYear, toJsDate, toOffset, toStartOfMonth, toStartOfTheDay, toStartOfWeek, toStartOfYear, toTime, uniqueBy, uniqueFrom, validateAssetName, validateTypeAssetName };
|
|
1669
|
+
export { AUTHENTICATION_CLIENT, AssetManager, AuthenticationService, AutocompleteChipsComponent, AutocompleteComponent, BasicTimeSeriesGraphComponent, COLORS, CUSTOM_PERIOD, CardLabeledValueComponent, ConfirmationDialogComponent, DEFAULT_LOCALE, DEFAULT_TIMEZONES, DEFAULT_TIME_ZONE, DataType, DateRangeInputComponent, DateTimeFormFieldComponent, DoubleDrawerLayoutComponent, DragDropFileUploadComponent, DurationPipe, FeatureRegistry, FullscreenService, GoogleMapComponent, IconComponent, IconRegistryService, ImageDisplayComponent, ImagePreviewComponent, LAST_ACTIVE_TAB_KEY, LOCALES, LabeledValueComponent, LoadedIconComponent, LoadingIndicatorDirective, LocalSortTableComponent, Locale, LocalizedNumberPipe, LocalizedNumericInputDirective, MILLISECONDS_IN_DAY, MapsLoaderService, MasterDetailsViewComponent, MessageTooltipDirective, MissingTranslationHelper, NavigationPersistenceService, NestedListDataControl, NestedListDataSource, NestedListViewComponent, NotificationService, OverflowClassDirective, PdfViewerComponent, PeriodErrorStateMatcher, PermissionsService, RELATIVE_TIME_PERIODS, RelativeTimePeriod, RequiresAllGlobalOrAssetPermissionsDirective, RequiresAllPermissionDirective, RequiresGlobalOrAsserPermissionDirective, RequiresPermissionDirective, ScrollIntoViewDirective, SharedModule, SimpleDatePipe, SimpleDateTimePipe, SimpleTimePipe, SortPipe, StandardListDataControl, StandardListDataSource, StandardListViewComponent, TIMEZONES, TabulatedChipViewComponent, TabulatedViewComponent, TenantPropertiesService, ThemeService, TreeComponent, TreeNodeComponent, USERS_TIME_ZONE, ValueDisplayComponent, ValueInputBooleanComponent, ValueInputColorComponent, ValueInputComponent, ValueInputDateComponent, ValueInputDurationComponent, ValueInputEnumComponent, ValueInputHexadecimalComponent, ValueInputLinkComponent, ValueInputLocationComponent, ValueInputNumericComponent, ValueInputStringComponent, ValueInputVectorComponent, arrayToObject, chartThemeDark, chartThemeLight, daysAway, determineMagnitude, determineMinMaxValues, endOfPeriod, equalsByValue, fileSizeValidator, flatMap, flatten, format, formatDuration, generateRandomString, globalPermissionGuard, groupBy, hoursAway, isContextAccessible, lookUpPathPart, lookUpQueryParam, parseDateRangeInputPeriod, parseTimeInput, saveFile, scale, startOfMonth, startOfPeriod, startOfTheDay, startOfWeek, startOfYear, tenantHostUrlValidator, toDate, toEndOfMonth, toEndOfYear, toJsDate, toOffset, toStartOfMonth, toStartOfTheDay, toStartOfWeek, toStartOfYear, toTime, uniqueBy, uniqueFrom, validateAssetName, validateTypeAssetName };
|
|
1607
1670
|
export type { Authentication, AuthenticationClient, Authority, Color, ConfirmationData, DateRangeValues, ExternalFeature, Feature, ImportError, LayoutBackdropConfig, LayoutDialogConfig, LayoutDrawerConfig, LoadedIcon, MapItem, MasterDetailDisplayRatio, NestedListItem, PartialUpdate, RelativeTimePeriodWithCustom, SearchAction, SortDirection$1 as SortDirection, StandardListItem, SvgIcon, Tab, Theme, TimeSeries, TimeSeriesData, TreeNode, User, ValueInputValidationConditions };
|