@wavemaker/app-ng-runtime 11.5.0-next.24744 → 11.5.0-next.24746

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ViewContainerRef, Directive, Optional, HostBinding, HostListener, Input, Component, Attribute, ContentChild, ContentChildren, ViewChild, ViewChildren, NgModule } from '@angular/core';
2
+ import { ViewContainerRef, inject, Directive, HostBinding, HostListener, Input, Component, Attribute, ContentChild, ContentChildren, ViewChild, ViewChildren, NgModule } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1 from '@wm/components/base';
@@ -7,7 +7,7 @@ import { register, PROP_BOOLEAN, PROP_STRING, PROP_ANY, PROP_NUMBER, StylableCom
7
7
  import * as i2$1 from '@wm/components/data/pagination';
8
8
  import { PaginationComponent, PaginationModule } from '@wm/components/data/pagination';
9
9
  import * as i2 from '@wm/core';
10
- import { isMobileApp, $watch, getClonedObject, isDefined, $appDigest, noop, generateGUId, $invokeWatchers, DataSource, isDataSourceEqual, isObject, isMobile, switchClass, setListClass, isNumber } from '@wm/core';
10
+ import { isMobileApp, App, findParent, $watch, getClonedObject, isDefined, $appDigest, noop, generateGUId, $invokeWatchers, DataSource, isDataSourceEqual, isObject, isMobile, switchClass, setListClass, isNumber } from '@wm/core';
11
11
  import { ButtonComponent } from '@wm/components/input';
12
12
  import { Subject } from 'rxjs';
13
13
  import { SwipeAnimation } from '@swipey';
@@ -86,10 +86,9 @@ class ListItemDirective {
86
86
  set wmListItem(val) {
87
87
  this.item = val;
88
88
  }
89
- constructor(inj, elRef, app, _viewParent) {
89
+ constructor(inj, elRef, app) {
90
90
  this.inj = inj;
91
91
  this.app = app;
92
- this._viewParent = _viewParent;
93
92
  this.destroy = new Subject();
94
93
  this.destroy$ = this.destroy.asObservable();
95
94
  this.itemClass = '';
@@ -98,6 +97,9 @@ class ListItemDirective {
98
97
  this.disableItem = false;
99
98
  this.viewContainerRef = inj.get(ViewContainerRef);
100
99
  this.nativeElement = elRef.nativeElement;
100
+ let viewParentApp = this.inj ? this.inj.get(App) : inject(App);
101
+ let _viewParent = findParent(this.inj._lView, viewParentApp);
102
+ // @ts-ignore
101
103
  this.listComponent = _viewParent;
102
104
  // this.context = (<NgForOfContext<ListItemDirective>>(<any>inj).view.context);
103
105
  this.context = this.inj._lView[8];
@@ -162,7 +164,7 @@ class ListItemDirective {
162
164
  this.setUpCUDHandlers();
163
165
  }
164
166
  }
165
- ListItemDirective.ɵfac = function ListItemDirective_Factory(t) { return new (t || ListItemDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.App), i0.ɵɵdirectiveInject(ListComponent, 8)); };
167
+ ListItemDirective.ɵfac = function ListItemDirective_Factory(t) { return new (t || ListItemDirective)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.App)); };
166
168
  ListItemDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ListItemDirective, selectors: [["", "wmListItem", ""]], hostVars: 4, hostBindings: function ListItemDirective_HostBindings(rf, ctx) { if (rf & 1) {
167
169
  i0.ɵɵlistener("focus", function ListItemDirective_focus_HostBindingHandler() { return ctx.onFocus(); });
168
170
  } if (rf & 2) {
@@ -174,9 +176,7 @@ ListItemDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ListItemD
174
176
  selector: '[wmListItem]',
175
177
  exportAs: 'listItemRef'
176
178
  }]
177
- }], function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i2.App }, { type: ListComponent, decorators: [{
178
- type: Optional
179
- }] }]; }, { isActive: [{
179
+ }], function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i2.App }]; }, { isActive: [{
180
180
  type: HostBinding,
181
181
  args: ['class.active']
182
182
  }], disableItem: [{