@coolon/angular-ui-powerups 12.4.0-alpha.77 → 12.4.0-alpha.78

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.
@@ -5089,19 +5089,24 @@
5089
5089
  }
5090
5090
  MarkdownComponent.prototype.ngOnInit = function () {
5091
5091
  var _this = this;
5092
- var chain = pectin.Dsl.disposeWith(this).chain;
5093
- chain(this.content$).subscribe(function (content) {
5094
- _this.element.nativeElement.innerHTML = ___namespace.isEmpty(content) ? '' :
5095
- _this.inline ? _this.markdownService.renderInline(content) :
5096
- _this.markdownService.render(content);
5097
- }, { initialValue: 'evaluate' });
5092
+ var when = pectin.Dsl.disposeWith(this).when;
5093
+ when(this.content$).changes(function (content) { return _this.renderContent(content); }, { initialValue: 'triggerChangeUnlessNil' });
5094
+ if (___namespace.isNil(this.content) && !___namespace.isEmpty(this.element.nativeElement.innerHTML)) {
5095
+ this.renderContent(this.element.nativeElement.innerHTML);
5096
+ }
5097
+ };
5098
+ MarkdownComponent.prototype.renderContent = function (content) {
5099
+ if (!___namespace.isNil(content)) {
5100
+ this.element.nativeElement.innerHTML = this.inline ? this.markdownService.renderInline(content) :
5101
+ this.markdownService.render(content);
5102
+ }
5098
5103
  };
5099
5104
  return MarkdownComponent;
5100
5105
  }(DisposableComponent));
5101
5106
  MarkdownComponent.decorators = [
5102
5107
  { type: i0.Component, args: [{
5103
5108
  selector: 'aup-markdown',
5104
- template: "<p>markdown works!</p>\n",
5109
+ template: "<ng-content></ng-content>\n",
5105
5110
  styles: [":host{display:inline-block}\n"]
5106
5111
  },] }
5107
5112
  ];