@smartsoft001/crud-shell-angular 2.93.0 → 2.94.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.
@@ -1434,8 +1434,8 @@ class GroupComponent extends BaseComponent$1 {
1434
1434
  styleService = inject(StyleService);
1435
1435
  elementRef = inject(ElementRef);
1436
1436
  groupService = inject((CrudListGroupService));
1437
- groups = input(...(ngDevMode ? [undefined, { debugName: "groups" }] : []));
1438
- listOptions = input(...(ngDevMode ? [undefined, { debugName: "listOptions" }] : []));
1437
+ groups = input(null, ...(ngDevMode ? [{ debugName: "groups" }] : []));
1438
+ listOptions = input(null, ...(ngDevMode ? [{ debugName: "listOptions" }] : []));
1439
1439
  change(val, item, force = false) {
1440
1440
  const groups = this.groups();
1441
1441
  if (groups) {
@@ -2704,7 +2704,7 @@ class ListStandardComponent extends CrudListPageBaseComponent {
2704
2704
  @if (groups && !isSearch()) {
2705
2705
  <smart-crud-group
2706
2706
  [groups]="groups"
2707
- [listOptions]="listOptions()"
2707
+ [listOptions]="listOptions() || null"
2708
2708
  ></smart-crud-group>
2709
2709
  }
2710
2710
  `, isInline: true, dependencies: [{ kind: "component", type: FiltersConfigComponent, selector: "smart-crud-filters-config" }, { kind: "component", type: ListComponent$1, selector: "smart-list", inputs: ["options"] }, { kind: "component", type: GroupComponent, selector: "smart-crud-group", inputs: ["groups", "listOptions"] }] });
@@ -2725,7 +2725,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
2725
2725
  @if (groups && !isSearch()) {
2726
2726
  <smart-crud-group
2727
2727
  [groups]="groups"
2728
- [listOptions]="listOptions()"
2728
+ [listOptions]="listOptions() || null"
2729
2729
  ></smart-crud-group>
2730
2730
  }
2731
2731
  `,
@@ -2783,17 +2783,13 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
2783
2783
  config = inject((CrudFullConfig));
2784
2784
  searchService = inject(CrudSearchService);
2785
2785
  _cleanMultiSelected$ = new Subject();
2786
- pageOptions;
2787
- listOptions;
2788
- links;
2786
+ pageOptions = signal(null, ...(ngDevMode ? [{ debugName: "pageOptions" }] : []));
2787
+ listOptions = signal(null, ...(ngDevMode ? [{ debugName: "listOptions" }] : []));
2788
+ links = this.facade.links;
2789
2789
  filter = this.facade.filter;
2790
2790
  topTpl = viewChild('topTpl', ...(ngDevMode ? [{ debugName: "topTpl" }] : []));
2791
2791
  contentTpl = viewChild('contentTpl', ...(ngDevMode ? [{ debugName: "contentTpl" }] : []));
2792
2792
  dynamicContents = viewChildren(DynamicContentDirective, ...(ngDevMode ? [{ debugName: "dynamicContents" }] : []));
2793
- constructor() {
2794
- super();
2795
- this.links = this.facade.links();
2796
- }
2797
2793
  refreshProperties() {
2798
2794
  this.baseComponentRef.setInput('listOptions', this.listOptions());
2799
2795
  }
@@ -2851,7 +2847,7 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
2851
2847
  }
2852
2848
  this.facade.read(newFilter);
2853
2849
  const endButtons = this.getEndButtons();
2854
- this.pageOptions = computed(() => ({
2850
+ this.pageOptions.set({
2855
2851
  title: this.config.title || '',
2856
2852
  search: this.config.search
2857
2853
  ? {
@@ -2867,7 +2863,7 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
2867
2863
  }
2868
2864
  : undefined,
2869
2865
  endButtons: endButtons,
2870
- }), ...(ngDevMode ? [{ debugName: "pageOptions" }] : []));
2866
+ });
2871
2867
  const compiledComponents = await this.dynamicComponentLoader.getComponentsWithFactories({
2872
2868
  components: [
2873
2869
  ...(this.config.details &&
@@ -2975,7 +2971,7 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
2975
2971
  getFilter: () => {
2976
2972
  return this.filter() || {};
2977
2973
  },
2978
- getLinks: () => this.links,
2974
+ getLinks: () => this.links(),
2979
2975
  },
2980
2976
  }),
2981
2977
  sort: this.config.sort,
@@ -3020,7 +3016,7 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
3020
3016
  setTimeout(async () => {
3021
3017
  this.listOptions.update((val) => ({
3022
3018
  ...val,
3023
- select: val.select === 'multi' ? undefined : 'multi',
3019
+ select: val?.select === 'multi' ? undefined : 'multi',
3024
3020
  }));
3025
3021
  if (this.menuService.openedEnd)
3026
3022
  await this.menuService.closeEnd();
@@ -3083,13 +3079,13 @@ class ListComponent extends CreateDynamicComponent('crud-list-page') {
3083
3079
  }
3084
3080
  });
3085
3081
  }
3086
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3082
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3087
3083
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.0", type: ListComponent, isStandalone: true, selector: "smart-crud-list-page", viewQueries: [{ propertyName: "topTpl", first: true, predicate: ["topTpl"], descendants: true, isSignal: true }, { propertyName: "contentTpl", first: true, predicate: ["contentTpl"], descendants: true, isSignal: true }, { propertyName: "dynamicContents", predicate: DynamicContentDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
3088
- @if (filter()) {
3084
+ @if (filter() && pageOptions()) {
3089
3085
  <smart-page [options]="pageOptions()">
3090
3086
  <div #topTpl></div>
3091
3087
 
3092
- @if (template() === 'default') {
3088
+ @if (template() === 'default' && listOptions()) {
3093
3089
  <smart-crud-list-standard-page [listOptions]="listOptions()">
3094
3090
  <ng-container [ngTemplateOutlet]="contentTpl"></ng-container>
3095
3091
  </smart-crud-list-standard-page>
@@ -3108,11 +3104,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
3108
3104
  selector: 'smart-crud-list-page',
3109
3105
  imports: [PageComponent, ListStandardComponent, NgTemplateOutlet],
3110
3106
  template: `
3111
- @if (filter()) {
3107
+ @if (filter() && pageOptions()) {
3112
3108
  <smart-page [options]="pageOptions()">
3113
3109
  <div #topTpl></div>
3114
3110
 
3115
- @if (template() === 'default') {
3111
+ @if (template() === 'default' && listOptions()) {
3116
3112
  <smart-crud-list-standard-page [listOptions]="listOptions()">
3117
3113
  <ng-container [ngTemplateOutlet]="contentTpl"></ng-container>
3118
3114
  </smart-crud-list-standard-page>
@@ -3125,7 +3121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImpor
3125
3121
  }
3126
3122
  `,
3127
3123
  }]
3128
- }], ctorParameters: () => [] });
3124
+ }] });
3129
3125
 
3130
3126
  const PAGES = [
3131
3127
  ItemComponent,