@wolkabout/commons 0.0.51 → 0.0.53

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.
@@ -267,7 +267,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
267
267
  }] });
268
268
 
269
269
  function isContextAccessible(authority, isMainContext) {
270
- return authority.mainContext === isMainContext;
270
+ return !isMainContext || authority.contextId === 1;
271
271
  }
272
272
 
273
273
  var DataType;
@@ -463,7 +463,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
463
463
  /**
464
464
  * Returns 'true' if the route is accessible,
465
465
  * Returns the first available route if the requested route is NOT accessible
466
- * Returns the fallback route if there are no routes accessible.
467
466
  *
468
467
  * Define "requiredPermissions" in the route data section.
469
468
  * The permissions are checked globally, and the result will match if ANY permission is present.
@@ -5644,6 +5643,9 @@ class StandardListViewComponent {
5644
5643
  dataControl.itemUpdated$.pipe(map((item) => dataSource.prepareItem(item)), takeUntilDestroyed(destroyRef)).subscribe((updatedItem) => {
5645
5644
  this.items.update(items => items.map(item => item.id === updatedItem.id ? updatedItem : item).sort(dataSource.sortingFunction));
5646
5645
  });
5646
+ dataControl.itemPartiallyUpdated$.pipe(takeUntilDestroyed(destroyRef)).subscribe((partialUpdate) => {
5647
+ this.items.update(items => items.map(item => item.id === partialUpdate.id ? dataSource.prepareItem({ ...item, ...partialUpdate.update }) : item).sort(dataSource.sortingFunction));
5648
+ });
5647
5649
  });
5648
5650
  afterRenderEffect(() => {
5649
5651
  const items = this.filteredItems();
@@ -5704,10 +5706,12 @@ class StandardListDataControl {
5704
5706
  _itemUpdated$ = new Subject();
5705
5707
  _itemAdded$ = new Subject();
5706
5708
  _itemRemoved$ = new Subject();
5709
+ _itemPartiallyUpdated$ = new Subject();
5707
5710
  selectItem = (id) => this._changeSelection$.next(id);
5708
5711
  updateItem = (item) => this._itemUpdated$.next(item);
5709
5712
  addItem = (item) => this._itemAdded$.next(item);
5710
5713
  removeItem = (id) => this._itemRemoved$.next(id);
5714
+ updateItemPartially = (id, update) => this._itemPartiallyUpdated$.next({ id, update });
5711
5715
  /**
5712
5716
  * Internal event hook. Do not use outside the Standard List Component
5713
5717
  */
@@ -5720,6 +5724,12 @@ class StandardListDataControl {
5720
5724
  get itemUpdated$() {
5721
5725
  return this._itemUpdated$.asObservable();
5722
5726
  }
5727
+ /**
5728
+ * Internal event hook. Do not use outside of the Standard List Component
5729
+ */
5730
+ get itemPartiallyUpdated$() {
5731
+ return this._itemPartiallyUpdated$.asObservable();
5732
+ }
5723
5733
  /**
5724
5734
  * Internal event hook. Do not use outside the Standard List Component
5725
5735
  */