@stemy/ngx-utils 19.9.3 → 19.9.5

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.
@@ -3255,8 +3255,11 @@ class AclService {
3255
3255
  const path = [];
3256
3256
  const config = this.state.getConfig(this.state.route, path);
3257
3257
  const checks = await Promise.all(config.map(async (route) => {
3258
- const guard = (route.canActivate || []).find(g => g instanceof AuthGuard);
3259
- return guard ? await guard.checkRoute(route) : ObjectUtils.isStringWithValue(route.data?.name);
3258
+ if (!ObjectUtils.isStringWithValue(route.data?.name))
3259
+ return false;
3260
+ const guardType = (route.canActivate || []).find(g => g === AuthGuard);
3261
+ const guard = !guardType ? null : this.injector.get(guardType);
3262
+ return guard ? await guard.checkRoute(route) : true;
3260
3263
  }));
3261
3264
  const basePath = path.join("/").replace(/^([a-z]+)/gi, `/$1`);
3262
3265
  return config.map((route, index) => {
@@ -7844,17 +7847,14 @@ class DynamicTableCellComponent {
7844
7847
  this.templateKeys = toSignal(this.globalTemplates.templatesUpdated);
7845
7848
  this.template = computed(() => {
7846
7849
  const prefix = this.globalTemplatePrefix();
7847
- const key = `${prefix}-col-${this.id}`;
7850
+ const key = `${prefix}-col-${this.id()}`;
7848
7851
  const keys = this.templateKeys();
7849
7852
  return !keys?.includes(key) ? null : this.globalTemplates.get(key);
7850
7853
  });
7851
- this.value = computed(() => {
7852
- return this.item()?.[this.id()];
7853
- });
7854
7854
  this.context = computed(() => {
7855
7855
  const item = this.item();
7856
7856
  const id = this.id();
7857
- const value = item?.[id] ?? "-";
7857
+ const value = ObjectUtils.getValue(item, id, "-");
7858
7858
  return {
7859
7859
  item, id, value,
7860
7860
  column: this.column(),
@@ -7971,11 +7971,11 @@ class DynamicTableComponent {
7971
7971
  }, {});
7972
7972
  });
7973
7973
  this.onClick = output();
7974
- this.loadData = (page, itemsPerPage) => {
7974
+ this.loadData = async (page, itemsPerPage) => {
7975
7975
  const orderBy = this.columnDefs[this.orderBy]?.sort;
7976
- return this.dataLoader(page, itemsPerPage, orderBy, this.orderDescending, this.filter, this.query);
7976
+ const dataLoader = this.dataLoader || this.loadLocalData;
7977
+ return dataLoader.call(this, page, itemsPerPage, orderBy, this.orderDescending, this.filter, this.query);
7977
7978
  };
7978
- this.dataLoader = this.loadLocalData;
7979
7979
  this.placeholder = "";
7980
7980
  this.tableId = UniqueUtils.uuid();
7981
7981
  this.orderBy = "";