@wolkabout/commons 0.0.53 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -99,6 +99,12 @@ interface Authentication {
|
|
|
99
99
|
authorities: Authority[];
|
|
100
100
|
refreshToken: string;
|
|
101
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Checks if the user can edit something based on the context.
|
|
104
|
+
* The main context (context with ID 1) is special and can expose its assets to other contexts.
|
|
105
|
+
* The asset should be editable only if the user (using its authority) and the asset are in the same context.
|
|
106
|
+
* The isMainContext is a bit simplified parameter because only the main context can share its assets, and we only care if it is in the main tenant, or any other.
|
|
107
|
+
*/
|
|
102
108
|
declare function isContextAccessible(authority: Authority, isMainContext: boolean): boolean;
|
|
103
109
|
|
|
104
110
|
interface ImportError {
|
|
@@ -686,7 +692,7 @@ declare class CardLabeledValueComponent {
|
|
|
686
692
|
tooltip: _angular_core.InputSignal<string | undefined>;
|
|
687
693
|
editFunction: _angular_core.InputSignal<(() => void) | undefined>;
|
|
688
694
|
permissionFunction: _angular_core.Signal<rxjs.Observable<boolean>>;
|
|
689
|
-
hasPermission: _angular_core.Signal<boolean
|
|
695
|
+
hasPermission: _angular_core.Signal<boolean>;
|
|
690
696
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardLabeledValueComponent, never>;
|
|
691
697
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardLabeledValueComponent, "app-card-labeled-value", never, { "permissions": { "alias": "permissions"; "required": false; "isSignal": true; }; "useAssetPermissions": { "alias": "useAssetPermissions"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "editFunction": { "alias": "editFunction"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
692
698
|
}
|
|
@@ -1106,19 +1112,19 @@ declare abstract class StandardListDataSource<ItemType> {
|
|
|
1106
1112
|
|
|
1107
1113
|
interface PartialUpdate<ItemType> {
|
|
1108
1114
|
id: string;
|
|
1109
|
-
update:
|
|
1115
|
+
update: (oldItem: ItemType) => ItemType;
|
|
1110
1116
|
}
|
|
1111
1117
|
declare class StandardListDataControl<ItemType> {
|
|
1112
1118
|
private _changeSelection$;
|
|
1113
1119
|
private _itemUpdated$;
|
|
1120
|
+
private _itemPartiallyUpdated$;
|
|
1114
1121
|
private _itemAdded$;
|
|
1115
1122
|
private _itemRemoved$;
|
|
1116
|
-
private _itemPartiallyUpdated$;
|
|
1117
1123
|
readonly selectItem: (id: string) => void;
|
|
1118
1124
|
readonly updateItem: (item: ItemType) => void;
|
|
1125
|
+
readonly updateItemPartially: (id: string, update: (oldItem: ItemType) => ItemType) => void;
|
|
1119
1126
|
readonly addItem: (item: ItemType) => void;
|
|
1120
1127
|
readonly removeItem: (id: string) => void;
|
|
1121
|
-
readonly updateItemPartially: (id: string, update: Partial<ItemType>) => void;
|
|
1122
1128
|
/**
|
|
1123
1129
|
* Internal event hook. Do not use outside the Standard List Component
|
|
1124
1130
|
*/
|