@coolon/angular-ui-powerups 3.7.0 → 3.7.1

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.
@@ -12,13 +12,11 @@ export class AbstractPopupMenuComponent extends PopupAwareComponent {
12
12
  super(element, parent);
13
13
  this._unorderedChildren = new MutableListModel();
14
14
  this.faceModelDelegate = new DelegatingValueModel();
15
- this.faceAdapterModel = new DelegatingValueModel();
16
15
  this.xPosition = 'after';
17
16
  this.yPosition = 'below';
18
17
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
19
- // TODO: get faceAdapter seems to get called during the super constuctor so we have to use a delegate
20
- // to avoid null pointers.
21
- this.faceAdapterModel.setDelegate(chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f)));
18
+ // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
19
+ this.faceAdapterModel = chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f));
22
20
  this.children = chain(this._unorderedChildren).sortBy('componentIndex');
23
21
  }
24
22
  ngAfterContentChecked() {
@@ -26,7 +24,11 @@ export class AbstractPopupMenuComponent extends PopupAwareComponent {
26
24
  this._unorderedChildren.value = [...this._unorderedChildren.value];
27
25
  }
28
26
  get faceAdapter() {
29
- return this.faceAdapterModel.value;
27
+ var _a;
28
+ if (!this.faceAdapterModel) {
29
+ console.error("Somehow faceAdapterModel is nil -- set a break point here and let me know what's going on");
30
+ }
31
+ return (_a = this.faceAdapterModel) === null || _a === void 0 ? void 0 : _a.value;
30
32
  }
31
33
  isRoot() {
32
34
  return !this.parent;
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-popup-menu.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/popup-menu/abstract-popup-menu.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,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AG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;IACpE,CAAC;IAGD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACrC,CAAC;IAED,MAAM;QACJ,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;IACtB,CAAC;IAED,WAAW;IACX,QAAQ,CAAC,SAA8B;QACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxC,OAAO,UAAU,CAAC,kBAAkB,CAAC,GAAG,EAAE;YACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAC9B,IAAI,OAAO,CAAC,QAAQ,EAAE;gBACpB,OAAO,CAAC,SAAS,EAAE,CAAC;aACrB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;;;YAlEF,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,QAAQ,EAAE,EAAE;aAEb;;;YAvBwC,UAAU;4CA0Cf,MAAM,SAAC,eAAe;;;wBAXvD,KAAK;wBAGL,KAAK;uBAGL,YAAY,SAAC,cAAc","sourcesContent":["import { AfterContentChecked, Component, ElementRef, Inject, Input, QueryList, ViewChildren } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport {\n DelegatingValueModel,\n Disposable,\n Dsl,\n ListModelChain,\n MutableListModel,\n Trace,\n ValueModelChain\n} from '@coolon/pectin';\nimport { CommandFace } from '../../command-face';\nimport { PopupAwareComponent } from '../popup-aware.component';\nimport { POPUP_CONTAINER, PopupContainer } from '../popup-container';\n\n/**\n *\n */\n@Component({\n selector: 'aup-abstract-popup-menu',\n template: '',\n styleUrls: []\n})\nexport class AbstractPopupMenuComponent extends PopupAwareComponent implements PopupContainer, AfterContentChecked {\n\n private _unorderedChildren = new MutableListModel<PopupAwareComponent>();\n\n protected readonly faceModelDelegate = new DelegatingValueModel<CommandFace>();\n private faceAdapterModel = new DelegatingValueModel<CommandFace.Adapter>();\n\n @Input()\n xPosition: 'before' | 'after' = 'after';\n\n @Input()\n yPosition: 'above' | 'below' = 'below';\n\n @ViewChildren(MatMenuTrigger)\n triggers: QueryList<MatMenuTrigger>;\n\n readonly children: ListModelChain<PopupAwareComponent>;\n\n constructor(element: ElementRef, @Inject(POPUP_CONTAINER) parent?: PopupContainer) {\n super(element, parent);\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n\n // TODO: get faceAdapter seems to get called during the super constuctor so we have to use a delegate\n // to avoid null pointers.\n this.faceAdapterModel.setDelegate(chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f)));\n\n this.children = chain(this._unorderedChildren).sortBy('componentIndex');\n }\n\n ngAfterContentChecked(): void {\n // force the list to re-order as the child indicies may have changed.\n this._unorderedChildren.value = [...this._unorderedChildren.value]\n }\n\n\n get faceAdapter(): CommandFace.Adapter {\n return this.faceAdapterModel.value;\n }\n\n isRoot() {\n return !this.parent;\n }\n\n // @Trace()\n register(component: PopupAwareComponent) {\n this._unorderedChildren.push(component);\n return Disposable.disposableThatRuns(() => {\n this._unorderedChildren.remove(component);\n });\n }\n\n onCommandFired() {\n this.triggers.forEach(trigger => {\n if (trigger.menuOpen) {\n trigger.closeMenu();\n }\n });\n }\n\n getFace(): CommandFace | undefined {\n return this.faceAdapter.face;\n }\n\n\n}\n"]}
1
+ {"version":3,"file":"abstract-popup-menu.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/group/popup-menu/abstract-popup-menu.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,S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pE,CAAC;IAGD,IAAI,WAAW;;QACb,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC1B,OAAO,CAAC,KAAK,CAAC,2FAA2F,CAAC,CAAA;SAC3G;QACD,aAAO,IAAI,CAAC,gBAAgB,0CAAE,KAAK,CAAC;IACtC,CAAC;IAED,MAAM;QACJ,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;IACtB,CAAC;IAED,WAAW;IACX,QAAQ,CAAC,SAA8B;QACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxC,OAAO,UAAU,CAAC,kBAAkB,CAAC,GAAG,EAAE;YACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAC9B,IAAI,OAAO,CAAC,QAAQ,EAAE;gBACpB,OAAO,CAAC,SAAS,EAAE,CAAC;aACrB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;;;YArEF,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,QAAQ,EAAE,EAAE;aAEb;;;YAvBwC,UAAU;4CA2Cf,MAAM,SAAC,eAAe;;;wBAZvD,KAAK;wBAGL,KAAK;uBAGL,YAAY,SAAC,cAAc","sourcesContent":["import { AfterContentChecked, Component, ElementRef, Inject, Input, QueryList, ViewChildren } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport {\n DelegatingValueModel,\n Disposable,\n Dsl,\n ListModelChain,\n MutableListModel,\n Trace,\n ValueModelChain\n} from '@coolon/pectin';\nimport { CommandFace } from '../../command-face';\nimport { PopupAwareComponent } from '../popup-aware.component';\nimport { POPUP_CONTAINER, PopupContainer } from '../popup-container';\n\n/**\n *\n */\n@Component({\n selector: 'aup-abstract-popup-menu',\n template: '',\n styleUrls: []\n})\nexport class AbstractPopupMenuComponent extends PopupAwareComponent implements PopupContainer, AfterContentChecked {\n\n private _unorderedChildren = new MutableListModel<PopupAwareComponent>();\n\n protected readonly faceModelDelegate = new DelegatingValueModel<CommandFace>();\n private faceAdapterModel: ValueModelChain<CommandFace.Adapter>;\n\n @Input()\n xPosition: 'before' | 'after' = 'after';\n\n @Input()\n yPosition: 'above' | 'below' = 'below';\n\n @ViewChildren(MatMenuTrigger)\n triggers: QueryList<MatMenuTrigger>;\n\n\n readonly children: ListModelChain<PopupAwareComponent>;\n\n constructor(element: ElementRef, @Inject(POPUP_CONTAINER) parent?: PopupContainer) {\n super(element, parent);\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);\n\n this.faceAdapterModel = chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f));\n\n this.children = chain(this._unorderedChildren).sortBy('componentIndex');\n }\n\n ngAfterContentChecked(): void {\n // force the list to re-order as the child indicies may have changed.\n this._unorderedChildren.value = [...this._unorderedChildren.value]\n }\n\n\n get faceAdapter(): CommandFace.Adapter {\n if (!this.faceAdapterModel) {\n console.error(\"Somehow faceAdapterModel is nil -- set a break point here and let me know what's going on\")\n }\n return this.faceAdapterModel?.value;\n }\n\n isRoot() {\n return !this.parent;\n }\n\n // @Trace()\n register(component: PopupAwareComponent) {\n this._unorderedChildren.push(component);\n return Disposable.disposableThatRuns(() => {\n this._unorderedChildren.remove(component);\n });\n }\n\n onCommandFired() {\n this.triggers.forEach(trigger => {\n if (trigger.menuOpen) {\n trigger.closeMenu();\n }\n });\n }\n\n getFace(): CommandFace | undefined {\n return this.faceAdapter.face;\n }\n\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"AbstractPopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../popup-aware.component","name":"PopupAwareComponent","line":24,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"selector":"aup-abstract-popup-menu","template":"","styleUrls":[]}]}],"members":{"xPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"yPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"triggers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":37,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":37,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":42,"character":36},"arguments":[{"__symbolic":"reference","module":"../popup-container","name":"POPUP_CONTAINER","line":42,"character":43}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":42,"character":23},{"__symbolic":"reference","module":"../popup-container","name":"PopupContainer","line":42,"character":69}]}],"ngAfterContentChecked":[{"__symbolic":"method"}],"isRoot":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"onCommandFired":[{"__symbolic":"method"}],"getFace":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"AbstractPopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../popup-aware.component","name":"PopupAwareComponent","line":24,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":19,"character":1},"arguments":[{"selector":"aup-abstract-popup-menu","template":"","styleUrls":[]}]}],"members":{"xPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"yPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"triggers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":37,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":37,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":43,"character":36},"arguments":[{"__symbolic":"reference","module":"../popup-container","name":"POPUP_CONTAINER","line":43,"character":43}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":43,"character":23},{"__symbolic":"reference","module":"../popup-container","name":"PopupContainer","line":43,"character":69}]}],"ngAfterContentChecked":[{"__symbolic":"method"}],"isRoot":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"onCommandFired":[{"__symbolic":"method"}],"getFace":[{"__symbolic":"method"}]}}}}]
@@ -702,13 +702,11 @@ class AbstractPopupMenuComponent extends PopupAwareComponent {
702
702
  super(element, parent);
703
703
  this._unorderedChildren = new MutableListModel();
704
704
  this.faceModelDelegate = new DelegatingValueModel();
705
- this.faceAdapterModel = new DelegatingValueModel();
706
705
  this.xPosition = 'after';
707
706
  this.yPosition = 'below';
708
707
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
709
- // TODO: get faceAdapter seems to get called during the super constuctor so we have to use a delegate
710
- // to avoid null pointers.
711
- this.faceAdapterModel.setDelegate(chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f)));
708
+ // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
709
+ this.faceAdapterModel = chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f));
712
710
  this.children = chain(this._unorderedChildren).sortBy('componentIndex');
713
711
  }
714
712
  ngAfterContentChecked() {
@@ -716,7 +714,11 @@ class AbstractPopupMenuComponent extends PopupAwareComponent {
716
714
  this._unorderedChildren.value = [...this._unorderedChildren.value];
717
715
  }
718
716
  get faceAdapter() {
719
- return this.faceAdapterModel.value;
717
+ var _a;
718
+ if (!this.faceAdapterModel) {
719
+ console.error("Somehow faceAdapterModel is nil -- set a break point here and let me know what's going on");
720
+ }
721
+ return (_a = this.faceAdapterModel) === null || _a === void 0 ? void 0 : _a.value;
720
722
  }
721
723
  isRoot() {
722
724
  return !this.parent;