@theseam/ui-common 0.3.8 → 0.3.10

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.
@@ -261,6 +261,21 @@
261
261
  _contentFooterTpl: [{ type: i0.ContentChild, args: [BaseLayoutContentFooterDirective, { static: true, read: i0.TemplateRef },] }]
262
262
  };
263
263
 
264
+ var BaseLayoutSideBarFooterDirective = /** @class */ (function () {
265
+ function BaseLayoutSideBarFooterDirective(_elementRef) {
266
+ this._elementRef = _elementRef;
267
+ }
268
+ return BaseLayoutSideBarFooterDirective;
269
+ }());
270
+ BaseLayoutSideBarFooterDirective.decorators = [
271
+ { type: i0.Directive, args: [{
272
+ selector: '[seamBaseLayoutSideBarFooter]'
273
+ },] }
274
+ ];
275
+ BaseLayoutSideBarFooterDirective.ctorParameters = function () { return [
276
+ { type: i0.ElementRef }
277
+ ]; };
278
+
264
279
  var TheSeamBaseLayoutModule = /** @class */ (function () {
265
280
  function TheSeamBaseLayoutModule() {
266
281
  }
@@ -272,6 +287,7 @@
272
287
  TheSeamBaseLayoutComponent,
273
288
  BaseLayoutContentDirective,
274
289
  BaseLayoutSideBarDirective,
290
+ BaseLayoutSideBarFooterDirective,
275
291
  BaseLayoutTopBarDirective,
276
292
  BaseLayoutNavToggleDirective,
277
293
  BaseLayoutContentHeaderDirective,
@@ -288,6 +304,7 @@
288
304
  TheSeamBaseLayoutComponent,
289
305
  BaseLayoutContentDirective,
290
306
  BaseLayoutSideBarDirective,
307
+ BaseLayoutSideBarFooterDirective,
291
308
  BaseLayoutTopBarDirective,
292
309
  BaseLayoutNavToggleDirective,
293
310
  BaseLayoutContentHeaderDirective,
@@ -1750,8 +1767,9 @@
1750
1767
  (EXPANDED_STATES.indexOf(toState) !== -1 && COLLAPSED_STATES.indexOf(fromState) !== -1)));
1751
1768
  }
1752
1769
  var SideNavComponent = /** @class */ (function () {
1753
- function SideNavComponent(_layout, _sideNav, _baseLayoutRef) {
1770
+ function SideNavComponent(_viewContainerRef, _layout, _sideNav, _baseLayoutRef) {
1754
1771
  var _this = this;
1772
+ this._viewContainerRef = _viewContainerRef;
1755
1773
  this._layout = _layout;
1756
1774
  this._sideNav = _sideNav;
1757
1775
  this._baseLayoutRef = _baseLayoutRef;
@@ -1766,9 +1784,10 @@
1766
1784
  this.expanded$ = this._expanded.asObservable();
1767
1785
  this._overlay = new rxjs.BehaviorSubject(false);
1768
1786
  this.overlay$ = this._overlay.asObservable();
1787
+ this.toggleExpand = new i0.EventEmitter();
1769
1788
  this._backdropHidden = new rxjs.BehaviorSubject(true);
1770
1789
  this.items$ = this._items.asObservable().pipe(operators.switchMap(function (items) { return _this._sideNav.createItemsObservable(items); }), operators.shareReplay({ bufferSize: 1, refCount: true }));
1771
- this.isMobile$ = this._layout.isMobile$.pipe(operators.tap(function (isMobile) { return isMobile && _this.collapse(); }));
1790
+ this.isMobile$ = this._layout.isMobile$.pipe(operators.tap(function (isMobile) { return isMobile ? _this.collapse() : _this.expand(); }));
1772
1791
  this.sideNavExpandedState$ = rxjs.combineLatest([this.expanded$, this.overlay$]).pipe(operators.map(function (_a) {
1773
1792
  var _b = __read(_a, 2), expanded = _b[0], overlay = _b[1];
1774
1793
  return expanded
@@ -1784,7 +1803,14 @@
1784
1803
  });
1785
1804
  Object.defineProperty(SideNavComponent.prototype, "expanded", {
1786
1805
  get: function () { return this._expanded.value; },
1787
- set: function (value) { this._expanded.next(coercion.coerceBooleanProperty(value)); },
1806
+ set: function (value) {
1807
+ var expanded = coercion.coerceBooleanProperty(value);
1808
+ var emit = expanded !== this.expanded;
1809
+ this._expanded.next(expanded);
1810
+ if (emit) {
1811
+ this.toggleExpand.emit(coercion.coerceBooleanProperty(value));
1812
+ }
1813
+ },
1788
1814
  enumerable: false,
1789
1815
  configurable: true
1790
1816
  });
@@ -1805,6 +1831,9 @@
1805
1831
  this.sideNavExpandedState$
1806
1832
  .pipe(operators.takeUntil(this._ngUnsubscribe))
1807
1833
  .subscribe(function (v) { return _this._sideNavExpand = v; });
1834
+ if (this._sideBarFooterTpl) {
1835
+ this._sideBarFooterPortal = new portal.TemplatePortal(this._sideBarFooterTpl, this._viewContainerRef);
1836
+ }
1808
1837
  };
1809
1838
  SideNavComponent.prototype.ngOnDestroy = function () {
1810
1839
  this._ngUnsubscribe.next();
@@ -1837,7 +1866,7 @@
1837
1866
  SideNavComponent.decorators = [
1838
1867
  { type: i0.Component, args: [{
1839
1868
  selector: 'seam-side-nav',
1840
- template: "<div class=\"side-nav-backdrop\" *ngIf=\"isMobile$ | async\"\n [@sideNavBackdrop]=\"_sideNavExpand\"\n [class.side-nav-backdrop-hidden]=\"_backdropHidden | async\"></div>\n\n<div class=\"side-nav-inner-wrapper\" [@sideNavExpand]=\"_sideNavExpand\"\n (@sideNavExpand.start)=\"animateStart()\"\n (@sideNavExpand.done)=\"animateEnd()\">\n <nav class=\"nav side-nav-content\">\n <seam-side-nav-toggle *ngIf=\"hasHeaderToggle\"\n [expanded]=\"expanded$ | async\"\n (toggleExpand)=\"toggle()\">\n </seam-side-nav-toggle>\n <div class=\"side-nav-items-container\" seamOverlayScrollbar>\n <seam-side-nav-item *ngFor=\"let item of items$ | async\"\n [compact]=\"!(expanded$ | async)\"\n [itemType]=\"$any(item)?.itemType\"\n [icon]=\"$any(item)?.icon\"\n [label]=\"$any(item)?.label\"\n [link]=\"$any(item)?.link\"\n [badgeText]=\"$any(item)?.badge?.text\"\n [badgeTheme]=\"$any(item)?.badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(item)?.badge?.srContent\"\n [badgeTooltip]=\"$any(item)?.badge?.tooltip\"\n [queryParams]=\"$any(item)?.queryParams\"\n [children]=\"$any(item)?.children\"\n [active]=\"$any(item).__state.active\"\n [expanded]=\"$any(item).__state.expanded\">\n </seam-side-nav-item>\n </div>\n </nav>\n</div>\n",
1869
+ template: "<div class=\"side-nav-backdrop\" *ngIf=\"isMobile$ | async\"\n [@sideNavBackdrop]=\"_sideNavExpand\"\n [class.side-nav-backdrop-hidden]=\"_backdropHidden | async\"></div>\n\n<div class=\"side-nav-inner-wrapper\" [@sideNavExpand]=\"_sideNavExpand\"\n (@sideNavExpand.start)=\"animateStart()\"\n (@sideNavExpand.done)=\"animateEnd()\">\n <nav class=\"nav side-nav-content\">\n <seam-side-nav-toggle *ngIf=\"hasHeaderToggle\"\n [expanded]=\"expanded$ | async\"\n (toggleExpand)=\"toggle()\">\n </seam-side-nav-toggle>\n <div class=\"side-nav-items-container\" seamOverlayScrollbar>\n <seam-side-nav-item *ngFor=\"let item of items$ | async\"\n [compact]=\"!(expanded$ | async)\"\n [itemType]=\"$any(item)?.itemType\"\n [icon]=\"$any(item)?.icon\"\n [label]=\"$any(item)?.label\"\n [link]=\"$any(item)?.link\"\n [badgeText]=\"$any(item)?.badge?.text\"\n [badgeTheme]=\"$any(item)?.badge?.theme || 'danger'\"\n [badgeSrContent]=\"$any(item)?.badge?.srContent\"\n [badgeTooltip]=\"$any(item)?.badge?.tooltip\"\n [queryParams]=\"$any(item)?.queryParams\"\n [children]=\"$any(item)?.children\"\n [active]=\"$any(item).__state.active\"\n [expanded]=\"$any(item).__state.expanded\">\n </seam-side-nav-item>\n </div>\n <ng-template [cdkPortalOutlet]=\"_sideBarFooterPortal\"></ng-template>\n </nav>\n</div>\n",
1841
1870
  providers: [
1842
1871
  TheSeamSideNavService
1843
1872
  ],
@@ -1910,6 +1939,7 @@
1910
1939
  },] }
1911
1940
  ];
1912
1941
  SideNavComponent.ctorParameters = function () { return [
1942
+ { type: i0.ViewContainerRef },
1913
1943
  { type: layout.TheSeamLayoutService },
1914
1944
  { type: TheSeamSideNavService },
1915
1945
  { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [THESEAM_BASE_LAYOUT_REF,] }] }
@@ -1919,7 +1949,9 @@
1919
1949
  hasHeaderToggle: [{ type: i0.Input }],
1920
1950
  items: [{ type: i0.Input }],
1921
1951
  expanded: [{ type: i0.Input }],
1922
- overlay: [{ type: i0.Input }]
1952
+ overlay: [{ type: i0.Input }],
1953
+ toggleExpand: [{ type: i0.Output }],
1954
+ _sideBarFooterTpl: [{ type: i0.ContentChild, args: [BaseLayoutSideBarFooterDirective, { static: true, read: i0.TemplateRef },] }]
1923
1955
  };
1924
1956
  __decorate([
1925
1957
  core.InputBoolean()
@@ -2148,7 +2180,8 @@
2148
2180
  a11y.A11yModule,
2149
2181
  scrollbar.TheSeamScrollbarModule,
2150
2182
  layout.TheSeamLayoutModule,
2151
- ngBootstrap.NgbTooltipModule
2183
+ ngBootstrap.NgbTooltipModule,
2184
+ portal.PortalModule
2152
2185
  ],
2153
2186
  exports: [
2154
2187
  SideNavItemComponent,
@@ -3330,14 +3363,15 @@
3330
3363
  exports.slider = slider;
3331
3364
  exports.stepper = stepper;
3332
3365
  exports.transformer = transformer;
3333
- exports["ɵa"] = TheSeamSideNavService;
3334
- exports["ɵb"] = TheSeamSchemaFormControlsModule;
3335
- exports["ɵc"] = TheSeamSchemaFormCheckboxComponent;
3336
- exports["ɵd"] = TheSeamSchemaFormSubmitComponent;
3337
- exports["ɵe"] = TheSeamSchemaFormSelectComponent;
3338
- exports["ɵf"] = TheSeamSchemaFormInputComponent;
3339
- exports["ɵg"] = TheSeamSchemaFormNumberComponent;
3340
- exports["ɵh"] = TheSeamSchemaFormSubmitSplitComponent;
3366
+ exports["ɵa"] = BaseLayoutSideBarFooterDirective;
3367
+ exports["ɵb"] = TheSeamSideNavService;
3368
+ exports["ɵc"] = TheSeamSchemaFormControlsModule;
3369
+ exports["ɵd"] = TheSeamSchemaFormCheckboxComponent;
3370
+ exports["ɵe"] = TheSeamSchemaFormSubmitComponent;
3371
+ exports["ɵf"] = TheSeamSchemaFormSelectComponent;
3372
+ exports["ɵg"] = TheSeamSchemaFormInputComponent;
3373
+ exports["ɵh"] = TheSeamSchemaFormNumberComponent;
3374
+ exports["ɵi"] = TheSeamSchemaFormSubmitSplitComponent;
3341
3375
 
3342
3376
  Object.defineProperty(exports, '__esModule', { value: true });
3343
3377