@skyux/layout 5.6.2 → 5.7.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.
@@ -392,7 +392,7 @@
392
392
  /**
393
393
  * NOTICE: DO NOT MODIFY THIS FILE!
394
394
  * The contents of this file were automatically generated by
395
- * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-layout' schematic.
395
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-layout' schematic.
396
396
  * To update this file, simply rerun the command.
397
397
  */
398
398
  var RESOURCES = {
@@ -488,13 +488,17 @@
488
488
  * @internal
489
489
  */
490
490
  var SkyBackToTopDomAdapterService = /** @class */ (function () {
491
- function SkyBackToTopDomAdapterService(windowRef) {
491
+ function SkyBackToTopDomAdapterService(windowRef, scrollableHostService) {
492
492
  this.windowRef = windowRef;
493
+ this.scrollableHostService = scrollableHostService;
493
494
  this.ngUnsubscribe = new rxjs.Subject();
495
+ this.scrollableHostScrollEventUnsubscribe = new rxjs.Subject();
494
496
  }
495
497
  SkyBackToTopDomAdapterService.prototype.ngOnDestroy = function () {
496
498
  this.ngUnsubscribe.next();
497
499
  this.ngUnsubscribe.complete();
500
+ this.scrollableHostScrollEventUnsubscribe.next();
501
+ this.scrollableHostScrollEventUnsubscribe.complete();
498
502
  };
499
503
  /**
500
504
  * This event returns a boolean on scroll indicating whether the provided element is in view.
@@ -502,11 +506,16 @@
502
506
  */
503
507
  SkyBackToTopDomAdapterService.prototype.elementInViewOnScroll = function (elementRef) {
504
508
  var _this = this;
505
- var parent = this.findScrollableParent(elementRef.nativeElement);
506
- return rxjs.fromEvent(parent, 'scroll').pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function () {
507
- var isInView = _this.isElementScrolledInView(elementRef.nativeElement, parent);
508
- return isInView;
509
- }));
509
+ var scrollableHostObservable = this.scrollableHostService.watchScrollableHostScrollEvents(elementRef);
510
+ var isInitiallyInView = this.isElementScrolledInView(elementRef);
511
+ var returnedObservable = new rxjs.BehaviorSubject(isInitiallyInView);
512
+ scrollableHostObservable
513
+ .pipe(operators.takeUntil(this.scrollableHostScrollEventUnsubscribe))
514
+ .subscribe(function () {
515
+ var isInView = _this.isElementScrolledInView(elementRef);
516
+ returnedObservable.next(isInView);
517
+ });
518
+ return returnedObservable;
510
519
  };
511
520
  /**
512
521
  * Scrolls the window or scrollable parent to the provided element.
@@ -518,9 +527,8 @@
518
527
  if (!elementRef || !elementRef.nativeElement) {
519
528
  return;
520
529
  }
521
- var windowObj = this.windowRef.nativeWindow;
522
- var parent = this.findScrollableParent(elementRef.nativeElement);
523
- if (parent === windowObj) {
530
+ var scrollableHost = this.scrollableHostService.getScrollableHost(elementRef);
531
+ if (scrollableHost instanceof Window) {
524
532
  // Scroll to top of window, but account for the body margin that allows for the omnibar if it exists.
525
533
  var bodyMarginOffset = parseInt(getComputedStyle(document.body).marginTop, 10);
526
534
  var newOffsetTop = elementRef.nativeElement.offsetTop - bodyMarginOffset;
@@ -528,46 +536,33 @@
528
536
  }
529
537
  else {
530
538
  // Scroll to top of parent element.
531
- parent.scrollTop = parent.offsetTop - elementRef.nativeElement.offsetTop;
532
- }
533
- };
534
- SkyBackToTopDomAdapterService.prototype.findScrollableParent = function (element) {
535
- var regex = /(auto|scroll)/;
536
- var windowObj = this.windowRef.nativeWindow;
537
- var bodyObj = windowObj.document.body;
538
- var style = windowObj.getComputedStyle(element);
539
- var parent = element;
540
- do {
541
- parent = parent.parentNode;
542
- style = windowObj.getComputedStyle(parent);
543
- } while (!regex.test(style.overflow) &&
544
- !regex.test(style.overflowY) &&
545
- parent !== bodyObj);
546
- if (parent === bodyObj) {
547
- return windowObj;
548
- }
549
- return parent;
550
- };
551
- SkyBackToTopDomAdapterService.prototype.isElementScrolledInView = function (element, parentElement) {
539
+ scrollableHost.scrollTop =
540
+ scrollableHost.offsetTop - elementRef.nativeElement.offsetTop;
541
+ }
542
+ };
543
+ SkyBackToTopDomAdapterService.prototype.isElementScrolledInView = function (element) {
544
+ var parentElement = this.scrollableHostService.getScrollableHost(element.nativeElement);
545
+ if (!element.nativeElement.offsetParent) {
546
+ return true;
547
+ }
552
548
  var buffer = 25;
553
- var windowObj = this.windowRef.nativeWindow;
554
- var elementRect = element.getBoundingClientRect();
549
+ var elementRect = element.nativeElement.getBoundingClientRect();
555
550
  /* istanbul ignore else */
556
- if (parentElement === windowObj) {
557
- return elementRect.top > -buffer;
558
- }
559
- else {
551
+ if (parentElement instanceof HTMLElement) {
560
552
  var parentRect = parentElement.getBoundingClientRect();
561
553
  return elementRect.top > parentRect.top - buffer;
562
554
  }
555
+ else {
556
+ return elementRect.top > -buffer;
557
+ }
563
558
  };
564
559
  return SkyBackToTopDomAdapterService;
565
560
  }());
566
- SkyBackToTopDomAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyBackToTopDomAdapterService, deps: [{ token: i1__namespace.SkyAppWindowRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
561
+ SkyBackToTopDomAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyBackToTopDomAdapterService, deps: [{ token: i1__namespace.SkyAppWindowRef }, { token: i1__namespace.SkyScrollableHostService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
567
562
  SkyBackToTopDomAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyBackToTopDomAdapterService });
568
563
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyBackToTopDomAdapterService, decorators: [{
569
564
  type: i0.Injectable
570
- }], ctorParameters: function () { return [{ type: i1__namespace.SkyAppWindowRef }]; } });
565
+ }], ctorParameters: function () { return [{ type: i1__namespace.SkyAppWindowRef }, { type: i1__namespace.SkyScrollableHostService }]; } });
571
566
 
572
567
  /**
573
568
  * Specifies the type of message to send to the back to top component.
@@ -622,8 +617,7 @@
622
617
  configurable: true
623
618
  });
624
619
  SkyBackToTopDirective.prototype.ngAfterViewInit = function () {
625
- var scrollableParent = this.domAdapter.findScrollableParent(this.element.nativeElement);
626
- this.elementInView = this.domAdapter.isElementScrolledInView(this.element.nativeElement, scrollableParent);
620
+ this.elementInView = this.domAdapter.isElementScrolledInView(this.element);
627
621
  this.handleBackToTopButton(this.elementInView);
628
622
  this.setBackToTopListeners();
629
623
  };
@@ -1882,6 +1876,9 @@
1882
1876
  SkyFluidGridGutterSize[SkyFluidGridGutterSize["Large"] = 2] = "Large";
1883
1877
  })(exports.SkyFluidGridGutterSize || (exports.SkyFluidGridGutterSize = {}));
1884
1878
 
1879
+ /**
1880
+ * Displays a column within a row of the fluid grid.
1881
+ */
1885
1882
  var SkyColumnComponent = /** @class */ (function () {
1886
1883
  function SkyColumnComponent() {
1887
1884
  }
@@ -190,7 +190,7 @@
190
190
  ],
191
191
  "sources": [
192
192
  {
193
- "fileName": "projects/layout/src/modules/back-to-top/back-top-top.module.ts",
193
+ "fileName": "projects/layout/src/modules/back-to-top/back-to-top.module.ts",
194
194
  "line": 22,
195
195
  "character": 13
196
196
  }
@@ -3347,6 +3347,9 @@
3347
3347
  "kind": 128,
3348
3348
  "kindString": "Class",
3349
3349
  "flags": {},
3350
+ "comment": {
3351
+ "shortText": "Displays a column within a row of the fluid grid."
3352
+ },
3350
3353
  "decorators": [
3351
3354
  {
3352
3355
  "name": "Component",
@@ -3387,7 +3390,7 @@
3387
3390
  "sources": [
3388
3391
  {
3389
3392
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3390
- "line": 52,
3393
+ "line": 55,
3391
3394
  "character": 9
3392
3395
  }
3393
3396
  ],
@@ -3422,7 +3425,7 @@
3422
3425
  "sources": [
3423
3426
  {
3424
3427
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3425
- "line": 49,
3428
+ "line": 52,
3426
3429
  "character": 9
3427
3430
  }
3428
3431
  ],
@@ -3457,7 +3460,7 @@
3457
3460
  "sources": [
3458
3461
  {
3459
3462
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3460
- "line": 41,
3463
+ "line": 44,
3461
3464
  "character": 9
3462
3465
  }
3463
3466
  ],
@@ -3492,7 +3495,7 @@
3492
3495
  "sources": [
3493
3496
  {
3494
3497
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3495
- "line": 33,
3498
+ "line": 36,
3496
3499
  "character": 9
3497
3500
  }
3498
3501
  ],
@@ -3533,7 +3536,7 @@
3533
3536
  "sources": [
3534
3537
  {
3535
3538
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3536
- "line": 25,
3539
+ "line": 28,
3537
3540
  "character": 9
3538
3541
  }
3539
3542
  ],
@@ -3553,7 +3556,7 @@
3553
3556
  "sources": [
3554
3557
  {
3555
3558
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3556
- "line": 66,
3559
+ "line": 69,
3557
3560
  "character": 9
3558
3561
  }
3559
3562
  ],
@@ -3582,7 +3585,7 @@
3582
3585
  "sources": [
3583
3586
  {
3584
3587
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3585
- "line": 54,
3588
+ "line": 57,
3586
3589
  "character": 9
3587
3590
  }
3588
3591
  ],
@@ -3634,7 +3637,7 @@
3634
3637
  "sources": [
3635
3638
  {
3636
3639
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3637
- "line": 88,
3640
+ "line": 91,
3638
3641
  "character": 9
3639
3642
  }
3640
3643
  ],
@@ -3693,7 +3696,7 @@
3693
3696
  "sources": [
3694
3697
  {
3695
3698
  "fileName": "projects/layout/src/modules/fluid-grid/column.component.ts",
3696
- "line": 17,
3699
+ "line": 20,
3697
3700
  "character": 13
3698
3701
  }
3699
3702
  ],
@@ -6943,7 +6946,7 @@
6943
6946
  "sources": [
6944
6947
  {
6945
6948
  "fileName": "projects/layout/src/modules/back-to-top/back-to-top.directive.ts",
6946
- "line": 81,
6949
+ "line": 75,
6947
6950
  "character": 9
6948
6951
  }
6949
6952
  ],
package/esm2015/index.js CHANGED
@@ -2,7 +2,7 @@ export * from './lib/modules/action-button/action-button-permalink';
2
2
  export * from './lib/modules/action-button/action-button.module';
3
3
  export * from './lib/modules/action-button/types/action-button-container-align-items';
4
4
  export * from './lib/modules/action-button/types/action-button-container-align-items-type';
5
- export * from './lib/modules/back-to-top/back-top-top.module';
5
+ export * from './lib/modules/back-to-top/back-to-top.module';
6
6
  export * from './lib/modules/back-to-top/models/back-to-top-message';
7
7
  export * from './lib/modules/back-to-top/models/back-to-top-message-type';
8
8
  export * from './lib/modules/back-to-top/models/back-to-top-options';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/layout/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AACjE,cAAc,uEAAuE,CAAC;AACtF,cAAc,4EAA4E,CAAC;AAE3F,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sDAAsD,CAAC;AACrE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AAErE,cAAc,8BAA8B,CAAC;AAE7C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,sDAAsD,CAAC;AAErE,cAAc,wDAAwD,CAAC;AACvE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,iEAAiE,CAAC;AAEhF,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4DAA4D,CAAC;AAE3E,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AAEjE,cAAc,gCAAgC,CAAC;AAE/C,cAAc,gDAAgD,CAAC;AAE/D,cAAc,8CAA8C,CAAC;AAE7D,cAAc,+EAA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EAAE,mBAAmB,IAAI,GAAG,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,0BAA0B,IAAI,GAAG,EAAE,MAAM,iDAAiD,CAAC;AACpG,OAAO,EAAE,uBAAuB,IAAI,GAAG,EAAE,MAAM,8CAA8C,CAAC;AAC9F,OAAO,EAAE,8BAA8B,IAAI,GAAG,EAAE,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAE,eAAe,IAAI,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,qBAAqB,IAAI,GAAG,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,sBAAsB,IAAI,GAAG,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,uBAAuB,IAAI,GAAG,EAAE,MAAM,0CAA0C,CAAC","sourcesContent":["export * from './lib/modules/action-button/action-button-permalink';\nexport * from './lib/modules/action-button/action-button.module';\nexport * from './lib/modules/action-button/types/action-button-container-align-items';\nexport * from './lib/modules/action-button/types/action-button-container-align-items-type';\n\nexport * from './lib/modules/back-to-top/back-top-top.module';\nexport * from './lib/modules/back-to-top/models/back-to-top-message';\nexport * from './lib/modules/back-to-top/models/back-to-top-message-type';\nexport * from './lib/modules/back-to-top/models/back-to-top-options';\n\nexport * from './lib/modules/box/box.module';\n\nexport * from './lib/modules/card/card.module';\n\nexport * from './lib/modules/definition-list/definition-list.module';\n\nexport * from './lib/modules/description-list/description-list.module';\nexport * from './lib/modules/description-list/types/description-list-mode';\nexport * from './lib/modules/description-list/types/description-list-mode-type';\n\nexport * from './lib/modules/fluid-grid/fluid-grid-gutter-size';\nexport * from './lib/modules/fluid-grid/fluid-grid.module';\nexport * from './lib/modules/fluid-grid/types/fluid-grid-gutter-size-type';\n\nexport * from './lib/modules/format/format-item';\nexport * from './lib/modules/format/format.module';\n\nexport * from './lib/modules/inline-delete/inline-delete-type';\nexport * from './lib/modules/inline-delete/inline-delete.module';\n\nexport * from './lib/modules/page/page.module';\n\nexport * from './lib/modules/page-summary/page-summary.module';\n\nexport * from './lib/modules/text-expand/text-expand.module';\n\nexport * from './lib/modules/text-expand-repeater/types/text-expand-repeater-list-style-type';\nexport * from './lib/modules/text-expand-repeater/text-expand-repeater.module';\n\nexport * from './lib/modules/toolbar/toolbar.module';\n\n// Components and directives must be exported to support Angular's \"partial\" Ivy compiler.\n// Obscure names are used to indicate types are not part of public API.\nexport { SkyActionButtonComponent as λ1 } from './lib/modules/action-button/action-button.component';\nexport { SkyActionButtonContainerComponent as λ2 } from './lib/modules/action-button/action-button-container.component';\nexport { SkyActionButtonDetailsComponent as λ3 } from './lib/modules/action-button/action-button-details.component';\nexport { SkyActionButtonHeaderComponent as λ4 } from './lib/modules/action-button/action-button-header.component';\nexport { SkyActionButtonIconComponent as λ5 } from './lib/modules/action-button/action-button-icon.component';\nexport { SkyBackToTopComponent as λ6 } from './lib/modules/back-to-top/back-to-top.component';\nexport { SkyBackToTopDirective as λ7 } from './lib/modules/back-to-top/back-to-top.directive';\nexport { SkyInlineDeleteComponent as λ8 } from './lib/modules/inline-delete/inline-delete.component';\nexport { SkyCardComponent as λ9 } from './lib/modules/card/card.component';\nexport { SkyCardActionsComponent as λ10 } from './lib/modules/card/card-actions.component';\nexport { SkyCardContentComponent as λ11 } from './lib/modules/card/card-content.component';\nexport { SkyCardTitleComponent as λ12 } from './lib/modules/card/card-title.component';\nexport { SkyDefinitionListComponent as λ13 } from './lib/modules/definition-list/definition-list.component';\nexport { SkyDefinitionListContentComponent as λ14 } from './lib/modules/definition-list/definition-list-content.component';\nexport { SkyDefinitionListHeadingComponent as λ15 } from './lib/modules/definition-list/definition-list-heading.component';\nexport { SkyDefinitionListLabelComponent as λ16 } from './lib/modules/definition-list/definition-list-label.component';\nexport { SkyDefinitionListValueComponent as λ17 } from './lib/modules/definition-list/definition-list-value.component';\nexport { SkyDescriptionListComponent as λ18 } from './lib/modules/description-list/description-list.component';\nexport { SkyDescriptionListTermComponent as λ19 } from './lib/modules/description-list/description-list-term.component';\nexport { SkyDescriptionListDescriptionComponent as λ20 } from './lib/modules/description-list/description-list-description.component';\nexport { SkyDescriptionListContentComponent as λ21 } from './lib/modules/description-list/description-list-content.component';\nexport { SkyFluidGridComponent as λ22 } from './lib/modules/fluid-grid/fluid-grid.component';\nexport { SkyRowComponent as λ23 } from './lib/modules/fluid-grid//row.component';\nexport { SkyColumnComponent as λ24 } from './lib/modules/fluid-grid/column.component';\nexport { SkyFormatComponent as λ25 } from './lib/modules/format/format.component';\nexport { SkyPageComponent as λ26 } from './lib/modules/page/page.component';\nexport { SkyPageSummaryComponent as λ27 } from './lib/modules/page-summary/page-summary.component';\nexport { SkyPageSummaryAlertComponent as λ28 } from './lib/modules/page-summary/page-summary-alert.component';\nexport { SkyPageSummaryContentComponent as λ29 } from './lib/modules/page-summary/page-summary-content.component';\nexport { SkyPageSummaryImageComponent as λ30 } from './lib/modules/page-summary/page-summary-image.component';\nexport { SkyPageSummaryKeyInfoComponent as λ31 } from './lib/modules/page-summary/page-summary-key-info.component';\nexport { SkyPageSummaryStatusComponent as λ32 } from './lib/modules/page-summary/page-summary-status.component';\nexport { SkyPageSummarySubtitleComponent as λ33 } from './lib/modules/page-summary/page-summary-subtitle.component';\nexport { SkyPageSummaryTitleComponent as λ34 } from './lib/modules/page-summary/page-summary-title.component';\nexport { SkyTextExpandComponent as λ35 } from './lib/modules/text-expand/text-expand.component';\nexport { SkyTextExpandRepeaterComponent as λ36 } from './lib/modules/text-expand-repeater/text-expand-repeater.component';\nexport { SkyToolbarComponent as λ37 } from './lib/modules/toolbar/toolbar.component';\nexport { SkyToolbarSectionComponent as λ38 } from './lib/modules/toolbar/toolbar-section.component';\nexport { SkyToolbarItemComponent as λ39 } from './lib/modules/toolbar/toolbar-item.component';\nexport { SkyToolbarViewActionsComponent as λ40 } from './lib/modules/toolbar/toolbar-view-actions.component';\nexport { SkyBoxComponent as λ41 } from './lib/modules/box/box.component';\nexport { SkyBoxHeaderComponent as λ42 } from './lib/modules/box/box-header.component';\nexport { SkyBoxContentComponent as λ43 } from './lib/modules/box/box-content.component';\nexport { SkyBoxControlsComponent as λ44 } from './lib/modules/box/box-controls.component';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/layout/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AACjE,cAAc,uEAAuE,CAAC;AACtF,cAAc,4EAA4E,CAAC;AAE3F,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sDAAsD,CAAC;AACrE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,sDAAsD,CAAC;AAErE,cAAc,8BAA8B,CAAC;AAE7C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,sDAAsD,CAAC;AAErE,cAAc,wDAAwD,CAAC;AACvE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,iEAAiE,CAAC;AAEhF,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4DAA4D,CAAC;AAE3E,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AAEnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AAEjE,cAAc,gCAAgC,CAAC;AAE/C,cAAc,gDAAgD,CAAC;AAE/D,cAAc,8CAA8C,CAAC;AAE7D,cAAc,+EAA+E,CAAC;AAC9F,cAAc,gEAAgE,CAAC;AAE/E,cAAc,sCAAsC,CAAC;AAErD,0FAA0F;AAC1F,uEAAuE;AACvE,OAAO,EAAE,wBAAwB,IAAI,EAAE,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,iCAAiC,IAAI,EAAE,EAAE,MAAM,+DAA+D,CAAC;AACxH,OAAO,EAAE,+BAA+B,IAAI,EAAE,EAAE,MAAM,6DAA6D,CAAC;AACpH,OAAO,EAAE,8BAA8B,IAAI,EAAE,EAAE,MAAM,4DAA4D,CAAC;AAClH,OAAO,EAAE,4BA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;AACtF,OAAO,EAAE,sBAAsB,IAAI,GAAG,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,uBAAuB,IAAI,GAAG,EAAE,MAAM,0CAA0C,CAAC","sourcesContent":["export * from './lib/modules/action-button/action-button-permalink';\nexport * from './lib/modules/action-button/action-button.module';\nexport * from './lib/modules/action-button/types/action-button-container-align-items';\nexport * from './lib/modules/action-button/types/action-button-container-align-items-type';\n\nexport * from './lib/modules/back-to-top/back-to-top.module';\nexport * from './lib/modules/back-to-top/models/back-to-top-message';\nexport * from './lib/modules/back-to-top/models/back-to-top-message-type';\nexport * from './lib/modules/back-to-top/models/back-to-top-options';\n\nexport * from './lib/modules/box/box.module';\n\nexport * from './lib/modules/card/card.module';\n\nexport * from './lib/modules/definition-list/definition-list.module';\n\nexport * from './lib/modules/description-list/description-list.module';\nexport * from './lib/modules/description-list/types/description-list-mode';\nexport * from './lib/modules/description-list/types/description-list-mode-type';\n\nexport * from './lib/modules/fluid-grid/fluid-grid-gutter-size';\nexport * from './lib/modules/fluid-grid/fluid-grid.module';\nexport * from './lib/modules/fluid-grid/types/fluid-grid-gutter-size-type';\n\nexport * from './lib/modules/format/format-item';\nexport * from './lib/modules/format/format.module';\n\nexport * from './lib/modules/inline-delete/inline-delete-type';\nexport * from './lib/modules/inline-delete/inline-delete.module';\n\nexport * from './lib/modules/page/page.module';\n\nexport * from './lib/modules/page-summary/page-summary.module';\n\nexport * from './lib/modules/text-expand/text-expand.module';\n\nexport * from './lib/modules/text-expand-repeater/types/text-expand-repeater-list-style-type';\nexport * from './lib/modules/text-expand-repeater/text-expand-repeater.module';\n\nexport * from './lib/modules/toolbar/toolbar.module';\n\n// Components and directives must be exported to support Angular's \"partial\" Ivy compiler.\n// Obscure names are used to indicate types are not part of public API.\nexport { SkyActionButtonComponent as λ1 } from './lib/modules/action-button/action-button.component';\nexport { SkyActionButtonContainerComponent as λ2 } from './lib/modules/action-button/action-button-container.component';\nexport { SkyActionButtonDetailsComponent as λ3 } from './lib/modules/action-button/action-button-details.component';\nexport { SkyActionButtonHeaderComponent as λ4 } from './lib/modules/action-button/action-button-header.component';\nexport { SkyActionButtonIconComponent as λ5 } from './lib/modules/action-button/action-button-icon.component';\nexport { SkyBackToTopComponent as λ6 } from './lib/modules/back-to-top/back-to-top.component';\nexport { SkyBackToTopDirective as λ7 } from './lib/modules/back-to-top/back-to-top.directive';\nexport { SkyInlineDeleteComponent as λ8 } from './lib/modules/inline-delete/inline-delete.component';\nexport { SkyCardComponent as λ9 } from './lib/modules/card/card.component';\nexport { SkyCardActionsComponent as λ10 } from './lib/modules/card/card-actions.component';\nexport { SkyCardContentComponent as λ11 } from './lib/modules/card/card-content.component';\nexport { SkyCardTitleComponent as λ12 } from './lib/modules/card/card-title.component';\nexport { SkyDefinitionListComponent as λ13 } from './lib/modules/definition-list/definition-list.component';\nexport { SkyDefinitionListContentComponent as λ14 } from './lib/modules/definition-list/definition-list-content.component';\nexport { SkyDefinitionListHeadingComponent as λ15 } from './lib/modules/definition-list/definition-list-heading.component';\nexport { SkyDefinitionListLabelComponent as λ16 } from './lib/modules/definition-list/definition-list-label.component';\nexport { SkyDefinitionListValueComponent as λ17 } from './lib/modules/definition-list/definition-list-value.component';\nexport { SkyDescriptionListComponent as λ18 } from './lib/modules/description-list/description-list.component';\nexport { SkyDescriptionListTermComponent as λ19 } from './lib/modules/description-list/description-list-term.component';\nexport { SkyDescriptionListDescriptionComponent as λ20 } from './lib/modules/description-list/description-list-description.component';\nexport { SkyDescriptionListContentComponent as λ21 } from './lib/modules/description-list/description-list-content.component';\nexport { SkyFluidGridComponent as λ22 } from './lib/modules/fluid-grid/fluid-grid.component';\nexport { SkyRowComponent as λ23 } from './lib/modules/fluid-grid//row.component';\nexport { SkyColumnComponent as λ24 } from './lib/modules/fluid-grid/column.component';\nexport { SkyFormatComponent as λ25 } from './lib/modules/format/format.component';\nexport { SkyPageComponent as λ26 } from './lib/modules/page/page.component';\nexport { SkyPageSummaryComponent as λ27 } from './lib/modules/page-summary/page-summary.component';\nexport { SkyPageSummaryAlertComponent as λ28 } from './lib/modules/page-summary/page-summary-alert.component';\nexport { SkyPageSummaryContentComponent as λ29 } from './lib/modules/page-summary/page-summary-content.component';\nexport { SkyPageSummaryImageComponent as λ30 } from './lib/modules/page-summary/page-summary-image.component';\nexport { SkyPageSummaryKeyInfoComponent as λ31 } from './lib/modules/page-summary/page-summary-key-info.component';\nexport { SkyPageSummaryStatusComponent as λ32 } from './lib/modules/page-summary/page-summary-status.component';\nexport { SkyPageSummarySubtitleComponent as λ33 } from './lib/modules/page-summary/page-summary-subtitle.component';\nexport { SkyPageSummaryTitleComponent as λ34 } from './lib/modules/page-summary/page-summary-title.component';\nexport { SkyTextExpandComponent as λ35 } from './lib/modules/text-expand/text-expand.component';\nexport { SkyTextExpandRepeaterComponent as λ36 } from './lib/modules/text-expand-repeater/text-expand-repeater.component';\nexport { SkyToolbarComponent as λ37 } from './lib/modules/toolbar/toolbar.component';\nexport { SkyToolbarSectionComponent as λ38 } from './lib/modules/toolbar/toolbar-section.component';\nexport { SkyToolbarItemComponent as λ39 } from './lib/modules/toolbar/toolbar-item.component';\nexport { SkyToolbarViewActionsComponent as λ40 } from './lib/modules/toolbar/toolbar-view-actions.component';\nexport { SkyBoxComponent as λ41 } from './lib/modules/box/box.component';\nexport { SkyBoxHeaderComponent as λ42 } from './lib/modules/box/box-header.component';\nexport { SkyBoxContentComponent as λ43 } from './lib/modules/box/box-content.component';\nexport { SkyBoxControlsComponent as λ44 } from './lib/modules/box/box-controls.component';\n"]}
@@ -1,31 +1,40 @@
1
1
  import { Injectable } from '@angular/core';
2
- import { SkyAppWindowRef } from '@skyux/core';
3
- import { Subject, fromEvent } from 'rxjs';
4
- import { map, takeUntil } from 'rxjs/operators';
2
+ import { SkyAppWindowRef, SkyScrollableHostService } from '@skyux/core';
3
+ import { BehaviorSubject, Subject } from 'rxjs';
4
+ import { takeUntil } from 'rxjs/operators';
5
5
  import * as i0 from "@angular/core";
6
6
  import * as i1 from "@skyux/core";
7
7
  /**
8
8
  * @internal
9
9
  */
10
10
  export class SkyBackToTopDomAdapterService {
11
- constructor(windowRef) {
11
+ constructor(windowRef, scrollableHostService) {
12
12
  this.windowRef = windowRef;
13
+ this.scrollableHostService = scrollableHostService;
13
14
  this.ngUnsubscribe = new Subject();
15
+ this.scrollableHostScrollEventUnsubscribe = new Subject();
14
16
  }
15
17
  ngOnDestroy() {
16
18
  this.ngUnsubscribe.next();
17
19
  this.ngUnsubscribe.complete();
20
+ this.scrollableHostScrollEventUnsubscribe.next();
21
+ this.scrollableHostScrollEventUnsubscribe.complete();
18
22
  }
19
23
  /**
20
24
  * This event returns a boolean on scroll indicating whether the provided element is in view.
21
25
  * @param elementRef The target element reference.
22
26
  */
23
27
  elementInViewOnScroll(elementRef) {
24
- const parent = this.findScrollableParent(elementRef.nativeElement);
25
- return fromEvent(parent, 'scroll').pipe(takeUntil(this.ngUnsubscribe), map(() => {
26
- const isInView = this.isElementScrolledInView(elementRef.nativeElement, parent);
27
- return isInView;
28
- }));
28
+ const scrollableHostObservable = this.scrollableHostService.watchScrollableHostScrollEvents(elementRef);
29
+ const isInitiallyInView = this.isElementScrolledInView(elementRef);
30
+ const returnedObservable = new BehaviorSubject(isInitiallyInView);
31
+ scrollableHostObservable
32
+ .pipe(takeUntil(this.scrollableHostScrollEventUnsubscribe))
33
+ .subscribe(() => {
34
+ const isInView = this.isElementScrolledInView(elementRef);
35
+ returnedObservable.next(isInView);
36
+ });
37
+ return returnedObservable;
29
38
  }
30
39
  /**
31
40
  * Scrolls the window or scrollable parent to the provided element.
@@ -37,9 +46,8 @@ export class SkyBackToTopDomAdapterService {
37
46
  if (!elementRef || !elementRef.nativeElement) {
38
47
  return;
39
48
  }
40
- const windowObj = this.windowRef.nativeWindow;
41
- const parent = this.findScrollableParent(elementRef.nativeElement);
42
- if (parent === windowObj) {
49
+ const scrollableHost = this.scrollableHostService.getScrollableHost(elementRef);
50
+ if (scrollableHost instanceof Window) {
43
51
  // Scroll to top of window, but account for the body margin that allows for the omnibar if it exists.
44
52
  const bodyMarginOffset = parseInt(getComputedStyle(document.body).marginTop, 10);
45
53
  const newOffsetTop = elementRef.nativeElement.offsetTop - bodyMarginOffset;
@@ -47,43 +55,30 @@ export class SkyBackToTopDomAdapterService {
47
55
  }
48
56
  else {
49
57
  // Scroll to top of parent element.
50
- parent.scrollTop = parent.offsetTop - elementRef.nativeElement.offsetTop;
58
+ scrollableHost.scrollTop =
59
+ scrollableHost.offsetTop - elementRef.nativeElement.offsetTop;
51
60
  }
52
61
  }
53
- findScrollableParent(element) {
54
- const regex = /(auto|scroll)/;
55
- const windowObj = this.windowRef.nativeWindow;
56
- const bodyObj = windowObj.document.body;
57
- let style = windowObj.getComputedStyle(element);
58
- let parent = element;
59
- do {
60
- parent = parent.parentNode;
61
- style = windowObj.getComputedStyle(parent);
62
- } while (!regex.test(style.overflow) &&
63
- !regex.test(style.overflowY) &&
64
- parent !== bodyObj);
65
- if (parent === bodyObj) {
66
- return windowObj;
62
+ isElementScrolledInView(element) {
63
+ const parentElement = this.scrollableHostService.getScrollableHost(element.nativeElement);
64
+ if (!element.nativeElement.offsetParent) {
65
+ return true;
67
66
  }
68
- return parent;
69
- }
70
- isElementScrolledInView(element, parentElement) {
71
67
  const buffer = 25;
72
- const windowObj = this.windowRef.nativeWindow;
73
- const elementRect = element.getBoundingClientRect();
68
+ const elementRect = element.nativeElement.getBoundingClientRect();
74
69
  /* istanbul ignore else */
75
- if (parentElement === windowObj) {
76
- return elementRect.top > -buffer;
77
- }
78
- else {
70
+ if (parentElement instanceof HTMLElement) {
79
71
  const parentRect = parentElement.getBoundingClientRect();
80
72
  return elementRect.top > parentRect.top - buffer;
81
73
  }
74
+ else {
75
+ return elementRect.top > -buffer;
76
+ }
82
77
  }
83
78
  }
84
- SkyBackToTopDomAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyBackToTopDomAdapterService, deps: [{ token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
79
+ SkyBackToTopDomAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyBackToTopDomAdapterService, deps: [{ token: i1.SkyAppWindowRef }, { token: i1.SkyScrollableHostService }], target: i0.ɵɵFactoryTarget.Injectable });
85
80
  SkyBackToTopDomAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyBackToTopDomAdapterService });
86
81
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyBackToTopDomAdapterService, decorators: [{
87
82
  type: Injectable
88
- }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }]; } });
83
+ }], ctorParameters: function () { return [{ type: i1.SkyAppWindowRef }, { type: i1.SkyScrollableHostService }]; } });
89
84
  //# sourceMappingURL=back-to-top-adapter.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"back-to-top-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/back-to-top/back-to-top-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAa,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAc,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;AAEhD;;GAEG;AAEH,MAAM,OAAO,6BAA6B;IAGxC,YAAoB,SAA0B;QAA1B,cAAS,GAAT,SAAS,CAAiB;QAFtC,kBAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;IAEK,CAAC;IAE3C,WAAW;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,QA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ef } from '@skyux/core';\n\nimport { Observable, Subject, fromEvent } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyBackToTopDomAdapterService implements OnDestroy {\n private ngUnsubscribe = new Subject<void>();\n\n constructor(private windowRef: SkyAppWindowRef) {}\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n /**\n * This event returns a boolean on scroll indicating whether the provided element is in view.\n * @param elementRef The target element reference.\n */\n public elementInViewOnScroll(elementRef: ElementRef): Observable<boolean> {\n const parent = this.findScrollableParent(elementRef.nativeElement);\n\n return fromEvent(parent, 'scroll').pipe(\n takeUntil(this.ngUnsubscribe),\n map(() => {\n const isInView = this.isElementScrolledInView(\n elementRef.nativeElement,\n parent\n );\n return isInView;\n })\n );\n }\n\n /**\n * Scrolls the window or scrollable parent to the provided element.\n * @param elementRef The target element reference.\n */\n public scrollToElement(elementRef: ElementRef): void {\n /* sanity check */\n /* istanbul ignore if */\n if (!elementRef || !elementRef.nativeElement) {\n return;\n }\n\n const windowObj = this.windowRef.nativeWindow;\n const parent = this.findScrollableParent(elementRef.nativeElement);\n\n if (parent === windowObj) {\n // Scroll to top of window, but account for the body margin that allows for the omnibar if it exists.\n const bodyMarginOffset = parseInt(\n getComputedStyle(document.body).marginTop,\n 10\n );\n const newOffsetTop =\n elementRef.nativeElement.offsetTop - bodyMarginOffset;\n this.windowRef.nativeWindow.scrollTo(\n elementRef.nativeElement.offsetLeft,\n newOffsetTop\n );\n } else {\n // Scroll to top of parent element.\n parent.scrollTop = parent.offsetTop - elementRef.nativeElement.offsetTop;\n }\n }\n\n public findScrollableParent(element: any): any {\n const regex = /(auto|scroll)/;\n const windowObj = this.windowRef.nativeWindow;\n const bodyObj = windowObj.document.body;\n\n let style = windowObj.getComputedStyle(element);\n let parent = element;\n\n do {\n parent = parent.parentNode;\n style = windowObj.getComputedStyle(parent);\n } while (\n !regex.test(style.overflow) &&\n !regex.test(style.overflowY) &&\n parent !== bodyObj\n );\n\n if (parent === bodyObj) {\n return windowObj;\n }\n\n return parent;\n }\n\n public isElementScrolledInView(element: any, parentElement: any): boolean {\n const buffer = 25;\n const windowObj = this.windowRef.nativeWindow;\n const elementRect = element.getBoundingClientRect();\n\n /* istanbul ignore else */\n if (parentElement === windowObj) {\n return elementRect.top > -buffer;\n } else {\n const parentRect = parentElement.getBoundingClientRect();\n return elementRect.top > parentRect.top - buffer;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"back-to-top-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/back-to-top/back-to-top-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAa,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,eAAe,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;AAE3C;;GAEG;AAEH,MAAM,OAAO,6BAA6B;IAIxC,YACU,SAA0B,EAC1B,qBAA+C;QAD/C,cAAS,GAAT,SAAS,CAAiB;QAC1B,0BAAqB,GAArB,qBAAqB,CAA0B;QALjD,kBAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;QACpC,yCAAoC,GAAG,IAAI,OAAO,EAAQ,CAAC;IAKhE,CAAC;IAEG,WAAW;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC,oCAAoC,CAAC,IAAI,EAAE,CAAC;QACjD,IAAI,CAAC,oCAAoC,CAAC,QAAQ,EAAE,CAAC;IACvD,CAAC;IAED;;;OAGG;IACI,qBAAqB,CAAC,UAAsB;QACjD,MAAM,wBAAwB,GAC5B,IAAI,CAAC,qBAAqB,CAAC,+BAA+B,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AqB,CAAC,iBAAiB,CAChE,OAAO,CAAC,aAAa,CACtB,CAAC;QACF,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,EAAE;YACvC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;QAElE,0BAA0B;QAC1B,IAAI,aAAa,YAAY,WAAW,EAAE;YACxC,MAAM,UAAU,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC;YACzD,OAAO,WAAW,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,MAAM,CAAC;SAClD;aAAM;YACL,OAAO,WAAW,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;SAClC;IACH,CAAC;;2HAvFU,6BAA6B;+HAA7B,6BAA6B;4FAA7B,6BAA6B;kBADzC,UAAU","sourcesContent":["import { ElementRef, Injectable, OnDestroy } from '@angular/core';\nimport { SkyAppWindowRef, SkyScrollableHostService } from '@skyux/core';\n\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyBackToTopDomAdapterService implements OnDestroy {\n private ngUnsubscribe = new Subject<void>();\n private scrollableHostScrollEventUnsubscribe = new Subject<void>();\n\n constructor(\n private windowRef: SkyAppWindowRef,\n private scrollableHostService: SkyScrollableHostService\n ) {}\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n this.scrollableHostScrollEventUnsubscribe.next();\n this.scrollableHostScrollEventUnsubscribe.complete();\n }\n\n /**\n * This event returns a boolean on scroll indicating whether the provided element is in view.\n * @param elementRef The target element reference.\n */\n public elementInViewOnScroll(elementRef: ElementRef): Observable<boolean> {\n const scrollableHostObservable =\n this.scrollableHostService.watchScrollableHostScrollEvents(elementRef);\n\n const isInitiallyInView = this.isElementScrolledInView(elementRef);\n const returnedObservable = new BehaviorSubject<boolean>(isInitiallyInView);\n\n scrollableHostObservable\n .pipe(takeUntil(this.scrollableHostScrollEventUnsubscribe))\n .subscribe(() => {\n const isInView = this.isElementScrolledInView(elementRef);\n returnedObservable.next(isInView);\n });\n\n return returnedObservable;\n }\n\n /**\n * Scrolls the window or scrollable parent to the provided element.\n * @param elementRef The target element reference.\n */\n public scrollToElement(elementRef: ElementRef): void {\n /* sanity check */\n /* istanbul ignore if */\n if (!elementRef || !elementRef.nativeElement) {\n return;\n }\n\n const scrollableHost =\n this.scrollableHostService.getScrollableHost(elementRef);\n\n if (scrollableHost instanceof Window) {\n // Scroll to top of window, but account for the body margin that allows for the omnibar if it exists.\n const bodyMarginOffset = parseInt(\n getComputedStyle(document.body).marginTop,\n 10\n );\n const newOffsetTop =\n elementRef.nativeElement.offsetTop - bodyMarginOffset;\n this.windowRef.nativeWindow.scrollTo(\n elementRef.nativeElement.offsetLeft,\n newOffsetTop\n );\n } else {\n // Scroll to top of parent element.\n scrollableHost.scrollTop =\n scrollableHost.offsetTop - elementRef.nativeElement.offsetTop;\n }\n }\n\n public isElementScrolledInView(element: ElementRef): boolean {\n const parentElement = this.scrollableHostService.getScrollableHost(\n element.nativeElement\n );\n if (!element.nativeElement.offsetParent) {\n return true;\n }\n const buffer = 25;\n const elementRect = element.nativeElement.getBoundingClientRect();\n\n /* istanbul ignore else */\n if (parentElement instanceof HTMLElement) {\n const parentRect = parentElement.getBoundingClientRect();\n return elementRect.top > parentRect.top - buffer;\n } else {\n return elementRect.top > -buffer;\n }\n }\n}\n"]}
@@ -41,8 +41,7 @@ export class SkyBackToTopDirective {
41
41
  .subscribe((message) => this.handleIncomingMessages(message));
42
42
  }
43
43
  ngAfterViewInit() {
44
- const scrollableParent = this.domAdapter.findScrollableParent(this.element.nativeElement);
45
- this.elementInView = this.domAdapter.isElementScrolledInView(this.element.nativeElement, scrollableParent);
44
+ this.elementInView = this.domAdapter.isElementScrolledInView(this.element);
46
45
  this.handleBackToTopButton(this.elementInView);
47
46
  this.setBackToTopListeners();
48
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"back-to-top.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/back-to-top/back-to-top.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,UAAU,EACV,KAAK,GAEN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;;;;AAG5E;;;GAGG;AAKH,MAAM,OAAO,qBAAqB;IAmChC,YACU,WAA2B,EAC3B,UAAyC,EACzC,OAAmB;QAFnB,gBAAW,GAAX,WAAW,CAAgB;QAC3B,eAAU,GAAV,UAAU,CAA+B;QACzC,YAAO,GAAP,OAAO,CAAY;QAVrB,iBAAY,GAAG,KAAK,CAAC;QAIrB,kBAAa,GAAG,IAAI,OAAO,EAAQ,CAAC;IAOzC,CAAC;IAtCJ;;OAEG;IACH,IACW,YAAY,CAAC,KAA0B;QAChD,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,CAAA,CAAC;QAE1C,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACH,IACW,yBAAyB,CAAC,KAAmC;QACtE,IAAI,IAAI,CAAC,0BAA0B,EAAE;YACnC,IAAI,CAAC,0BAA0B,CAAC,WAAW,EAAE,CAAC;SAC/C;QACD,IAAI,CAAC,0BAA0B,GAAG,KAA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ACnC,SAAS,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,sBAAsB,CAAC,OAA4B;QACzD,0BAA0B;QAC1B,IAAI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,SAAS,EAAE;YACtD,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC/C;IACH,CAAC;IAEO,qBAAqB;QAC3B,0BAA0B;QAC1B,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,UAAU;iBACZ,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC;iBACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;iBACnC,SAAS,CAAC,CAAC,aAAsB,EAAE,EAAE;gBACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;gBAEnC,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC;SACN;IACH,CAAC;IAEO,gBAAgB;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;SAC3B;IACH,CAAC;;mHAlHU,qBAAqB;uGAArB,qBAAqB,2IAFrB,CAAC,6BAA6B,CAAC;4FAE/B,qBAAqB;kBAJjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,6BAA6B,CAAC;iBAC3C;0KAMY,YAAY;sBADtB,KAAK;gBAYK,yBAAyB;sBADnC,KAAK","sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n} from '@angular/core';\nimport { SkyDockItem, SkyDockService } from '@skyux/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyBackToTopDomAdapterService } from './back-to-top-adapter.service';\nimport { SkyBackToTopComponent } from './back-to-top.component';\nimport { SkyBackToTopMessage } from './models/back-to-top-message';\nimport { SkyBackToTopMessageType } from './models/back-to-top-message-type';\nimport { SkyBackToTopOptions } from './models/back-to-top-options';\n\n/**\n * Associates a button with an element on the page and displays that button\n * to return to the element after users scroll away.\n */\n@Directive({\n selector: '[skyBackToTop]',\n providers: [SkyBackToTopDomAdapterService],\n})\nexport class SkyBackToTopDirective implements AfterViewInit, OnDestroy {\n /**\n * Specifies configuration options for the back to top component.\n */\n @Input()\n public set skyBackToTop(value: SkyBackToTopOptions) {\n this.buttonHidden = !!value?.buttonHidden;\n\n this.handleBackToTopButton(this.elementInView);\n }\n\n /**\n * Provides an observable to send commands to the back to top component.\n * The commands respect the `SkyBackToTopMessage` type.\n */\n @Input()\n public set skyBackToTopMessageStream(value: Subject<SkyBackToTopMessage>) {\n if (this._skyBackToTopMessageStream) {\n this._skyBackToTopMessageStream.unsubscribe();\n }\n this._skyBackToTopMessageStream = value;\n this._skyBackToTopMessageStream\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((message: SkyBackToTopMessage) =>\n this.handleIncomingMessages(message)\n );\n }\n\n private buttonHidden = false;\n private dockItem: SkyDockItem<SkyBackToTopComponent>;\n private elementInView: boolean;\n\n private ngUnsubscribe = new Subject<void>();\n private _skyBackToTopMessageStream: Subject<SkyBackToTopMessage>;\n\n constructor(\n private dockService: SkyDockService,\n private domAdapter: SkyBackToTopDomAdapterService,\n private element: ElementRef\n ) {}\n\n public ngAfterViewInit(): void {\n const scrollableParent = this.domAdapter.findScrollableParent(\n this.element.nativeElement\n );\n this.elementInView = this.domAdapter.isElementScrolledInView(\n this.element.nativeElement,\n scrollableParent\n );\n\n this.handleBackToTopButton(this.elementInView);\n this.setBackToTopListeners();\n }\n\n public ngOnDestroy(): void {\n if (this.dockItem) {\n this.dockItem.destroy();\n }\n }\n\n private handleBackToTopButton(elementInView: boolean): void {\n // Add back to top button if user scrolls down and button is not hidden.\n if (\n !this.dockItem &&\n elementInView !== undefined &&\n !elementInView &&\n !this.buttonHidden\n ) {\n this.addBackToTop();\n }\n // Remove back to top button if user scrolls back up.\n if (elementInView || this.buttonHidden) {\n this.destroyBackToTop();\n }\n }\n\n private addBackToTop(): void {\n this.dockItem = this.dockService.insertComponent(SkyBackToTopComponent);\n\n // Listen for clicks on the \"back to top\" button so we know when to scroll up.\n this.dockItem.componentInstance.scrollToTopClick\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(() => {\n this.domAdapter.scrollToElement(this.element);\n });\n }\n\n private handleIncomingMessages(message: SkyBackToTopMessage): void {\n /* istanbul ignore else */\n if (message.type === SkyBackToTopMessageType.BackToTop) {\n this.domAdapter.scrollToElement(this.element);\n }\n }\n\n private setBackToTopListeners(): void {\n /* istanbul ignore else */\n if (this.element) {\n this.domAdapter\n .elementInViewOnScroll(this.element)\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((elementInView: boolean) => {\n this.elementInView = elementInView;\n\n this.handleBackToTopButton(elementInView);\n });\n }\n }\n\n private destroyBackToTop(): void {\n /* istanbul ignore else */\n if (this.dockItem) {\n this.dockItem.destroy();\n this.dockItem = undefined;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"back-to-top.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/back-to-top/back-to-top.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,UAAU,EACV,KAAK,GAEN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAA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C,aAAa,GAAG,aAAa,CAAC;gBAEnC,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC;SACN;IACH,CAAC;IAEO,gBAAgB;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;SAC3B;IACH,CAAC;;mHA5GU,qBAAqB;uGAArB,qBAAqB,2IAFrB,CAAC,6BAA6B,CAAC;4FAE/B,qBAAqB;kBAJjC,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,6BAA6B,CAAC;iBAC3C;0KAMY,YAAY;sBADtB,KAAK;gBAYK,yBAAyB;sBADnC,KAAK","sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n} from '@angular/core';\nimport { SkyDockItem, SkyDockService } from '@skyux/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyBackToTopDomAdapterService } from './back-to-top-adapter.service';\nimport { SkyBackToTopComponent } from './back-to-top.component';\nimport { SkyBackToTopMessage } from './models/back-to-top-message';\nimport { SkyBackToTopMessageType } from './models/back-to-top-message-type';\nimport { SkyBackToTopOptions } from './models/back-to-top-options';\n\n/**\n * Associates a button with an element on the page and displays that button\n * to return to the element after users scroll away.\n */\n@Directive({\n selector: '[skyBackToTop]',\n providers: [SkyBackToTopDomAdapterService],\n})\nexport class SkyBackToTopDirective implements AfterViewInit, OnDestroy {\n /**\n * Specifies configuration options for the back to top component.\n */\n @Input()\n public set skyBackToTop(value: SkyBackToTopOptions) {\n this.buttonHidden = !!value?.buttonHidden;\n\n this.handleBackToTopButton(this.elementInView);\n }\n\n /**\n * Provides an observable to send commands to the back to top component.\n * The commands respect the `SkyBackToTopMessage` type.\n */\n @Input()\n public set skyBackToTopMessageStream(value: Subject<SkyBackToTopMessage>) {\n if (this._skyBackToTopMessageStream) {\n this._skyBackToTopMessageStream.unsubscribe();\n }\n this._skyBackToTopMessageStream = value;\n this._skyBackToTopMessageStream\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((message: SkyBackToTopMessage) =>\n this.handleIncomingMessages(message)\n );\n }\n\n private buttonHidden = false;\n private dockItem: SkyDockItem<SkyBackToTopComponent>;\n private elementInView: boolean;\n\n private ngUnsubscribe = new Subject<void>();\n private _skyBackToTopMessageStream: Subject<SkyBackToTopMessage>;\n\n constructor(\n private dockService: SkyDockService,\n private domAdapter: SkyBackToTopDomAdapterService,\n private element: ElementRef\n ) {}\n\n public ngAfterViewInit(): void {\n this.elementInView = this.domAdapter.isElementScrolledInView(this.element);\n\n this.handleBackToTopButton(this.elementInView);\n this.setBackToTopListeners();\n }\n\n public ngOnDestroy(): void {\n if (this.dockItem) {\n this.dockItem.destroy();\n }\n }\n\n private handleBackToTopButton(elementInView: boolean): void {\n // Add back to top button if user scrolls down and button is not hidden.\n if (\n !this.dockItem &&\n elementInView !== undefined &&\n !elementInView &&\n !this.buttonHidden\n ) {\n this.addBackToTop();\n }\n // Remove back to top button if user scrolls back up.\n if (elementInView || this.buttonHidden) {\n this.destroyBackToTop();\n }\n }\n\n private addBackToTop(): void {\n this.dockItem = this.dockService.insertComponent(SkyBackToTopComponent);\n\n // Listen for clicks on the \"back to top\" button so we know when to scroll up.\n this.dockItem.componentInstance.scrollToTopClick\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe(() => {\n this.domAdapter.scrollToElement(this.element);\n });\n }\n\n private handleIncomingMessages(message: SkyBackToTopMessage): void {\n /* istanbul ignore else */\n if (message.type === SkyBackToTopMessageType.BackToTop) {\n this.domAdapter.scrollToElement(this.element);\n }\n }\n\n private setBackToTopListeners(): void {\n /* istanbul ignore else */\n if (this.element) {\n this.domAdapter\n .elementInViewOnScroll(this.element)\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((elementInView: boolean) => {\n this.elementInView = elementInView;\n\n this.handleBackToTopButton(elementInView);\n });\n }\n }\n\n private destroyBackToTop(): void {\n /* istanbul ignore else */\n if (this.dockItem) {\n this.dockItem.destroy();\n this.dockItem = undefined;\n }\n }\n}\n"]}
@@ -33,4 +33,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
33
33
  entryComponents: [SkyBackToTopComponent],
34
34
  }]
35
35
  }] });
36
- //# sourceMappingURL=back-top-top.module.js.map
36
+ //# sourceMappingURL=back-to-top.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"back-to-top.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/back-to-top/back-to-top.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;;AAahE,MAAM,OAAO,kBAAkB;;gHAAlB,kBAAkB;iHAAlB,kBAAkB,iBAVd,qBAAqB,EAAE,qBAAqB,aAEzD,YAAY;QACZ,aAAa;QACb,aAAa;QACb,wBAAwB,aAEhB,qBAAqB,EAAE,qBAAqB;iHAG3C,kBAAkB,YATpB;YACP,YAAY;YACZ,aAAa;YACb,aAAa;YACb,wBAAwB;SACzB;4FAIU,kBAAkB;kBAX9B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;oBAC5D,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,wBAAwB;qBACzB;oBACD,OAAO,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;oBACvD,eAAe,EAAE,CAAC,qBAAqB,CAAC;iBACzC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyDockModule } from '@skyux/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyLayoutResourcesModule } from '../shared/sky-layout-resources.module';\n\nimport { SkyBackToTopComponent } from './back-to-top.component';\nimport { SkyBackToTopDirective } from './back-to-top.directive';\n\n@NgModule({\n declarations: [SkyBackToTopComponent, SkyBackToTopDirective],\n imports: [\n CommonModule,\n SkyDockModule,\n SkyI18nModule,\n SkyLayoutResourcesModule,\n ],\n exports: [SkyBackToTopComponent, SkyBackToTopDirective],\n entryComponents: [SkyBackToTopComponent],\n})\nexport class SkyBackToTopModule {}\n"]}
@@ -1,5 +1,8 @@
1
1
  import { Component, HostBinding, Input, ViewEncapsulation, } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * Displays a column within a row of the fluid grid.
5
+ */
3
6
  export class SkyColumnComponent {
4
7
  ngOnChanges(changes) {
5
8
  /* istanbul ignore else */
@@ -1 +1 @@
1
- {"version":3,"file":"column.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/fluid-grid/column.component.ts","../../../../../../../../libs/components/layout/src/lib/modules/fluid-grid/column.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,KAAK,EAIL,iBAAiB,GAClB,MAAM,eAAe,CAAC;;AAQvB,MAAM,OAAO,kBAAkB;IAqCtB,WAAW,CAAC,OAAsB;QACvC,0BAA0B;QAC1B,IACE,OAAO,CAAC,YAAY;YACpB,OAAO,CAAC,WAAW;YACnB,OAAO,CAAC,YAAY;YACpB,OAAO,CAAC,WAAW,EACnB;YACA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;SACxC;IACH,CAAC;IAEM,aAAa;QAClB,MAAM,UAAU,GAAG,CAAC,YAAY,CAAC,CAAC;QAElC,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,UAAU,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;SACvD;QAED,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,UAAU,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;SACtD;QAED,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,UAAU,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;SACvD;QAED,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,UAAU,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;SACtD;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;;gHAzEU,kBAAkB;oGAAlB,kBAAkB,6PChB/B,6BACA;4FDea,kBAAkB;kBAN9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,YAAY;oBACtB,WAAW,EAAE,yBAAyB;oBACtC,SAAS,EAAE,CAAC,yBAAyB,CAAC;oBACtC,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BASQ,YAAY;sBADlB,KAAK;gBASC,WAAW;sBADjB,KAAK;gBASC,YAAY;sBADlB,KAAK;gBASC,WAAW;sBADjB,KAAK;gBAIC,UAAU;sBADhB,WAAW;uBAAC,OAAO","sourcesContent":["import {\n Component,\n HostBinding,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\n\n@Component({\n selector: 'sky-column',\n templateUrl: './column.component.html',\n styleUrls: ['./column.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class SkyColumnComponent implements OnInit, OnChanges {\n /**\n * Specifies the number of columns (1-12) to use on extra-small screens\n * (less than 768px). If you do not specify a value, the fluid grid displays\n * the column at the full width of the screen.\n * @default 12\n */\n @Input()\n public screenXSmall: number;\n\n /**\n * Specifies the number of columns (1-12) to use on small screens\n * (768-991px). If you do not specify a value, the column inherits\n * the `screenXSmall` value.\n */\n @Input()\n public screenSmall: number;\n\n /**\n * Specifies the number of columns (1-12) to use on medium screens\n * (992-1199px). If you do not specify a value, the column inherits\n * the `screenSmall` value.\n */\n @Input()\n public screenMedium: number;\n\n /**\n * Specifies the number of columns (1-12) to use on large screens\n * (more than 1200px). If you do not specify a value, the column\n * inherits the `screenMedium` value.\n */\n @Input()\n public screenLarge: number;\n\n @HostBinding('class')\n public classnames: string;\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (\n changes.screenXSmall ||\n changes.screenSmall ||\n changes.screenMedium ||\n changes.screenLarge\n ) {\n this.classnames = this.getClassNames();\n }\n }\n\n public getClassNames(): string {\n const classnames = ['sky-column'];\n\n if (this.screenXSmall) {\n classnames.push(`sky-column-xs-${this.screenXSmall}`);\n }\n\n if (this.screenSmall) {\n classnames.push(`sky-column-sm-${this.screenSmall}`);\n }\n\n if (this.screenMedium) {\n classnames.push(`sky-column-md-${this.screenMedium}`);\n }\n\n if (this.screenLarge) {\n classnames.push(`sky-column-lg-${this.screenLarge}`);\n }\n\n return classnames.join(' ');\n }\n\n public ngOnInit(): void {\n this.classnames = this.getClassNames();\n }\n}\n","<ng-content></ng-content>\n"]}
1
+ {"version":3,"file":"column.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/fluid-grid/column.component.ts","../../../../../../../../libs/components/layout/src/lib/modules/fluid-grid/column.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,KAAK,EAIL,iBAAiB,GAClB,MAAM,eAAe,CAAC;;AAEvB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B,KAAK;gBASC,WAAW;sBADjB,KAAK;gBAIC,UAAU;sBADhB,WAAW;uBAAC,OAAO","sourcesContent":["import {\n Component,\n HostBinding,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * Displays a column within a row of the fluid grid.\n */\n@Component({\n selector: 'sky-column',\n templateUrl: './column.component.html',\n styleUrls: ['./column.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class SkyColumnComponent implements OnInit, OnChanges {\n /**\n * Specifies the number of columns (1-12) to use on extra-small screens\n * (less than 768px). If you do not specify a value, the fluid grid displays\n * the column at the full width of the screen.\n * @default 12\n */\n @Input()\n public screenXSmall: number;\n\n /**\n * Specifies the number of columns (1-12) to use on small screens\n * (768-991px). If you do not specify a value, the column inherits\n * the `screenXSmall` value.\n */\n @Input()\n public screenSmall: number;\n\n /**\n * Specifies the number of columns (1-12) to use on medium screens\n * (992-1199px). If you do not specify a value, the column inherits\n * the `screenSmall` value.\n */\n @Input()\n public screenMedium: number;\n\n /**\n * Specifies the number of columns (1-12) to use on large screens\n * (more than 1200px). If you do not specify a value, the column\n * inherits the `screenMedium` value.\n */\n @Input()\n public screenLarge: number;\n\n @HostBinding('class')\n public classnames: string;\n\n public ngOnChanges(changes: SimpleChanges) {\n /* istanbul ignore else */\n if (\n changes.screenXSmall ||\n changes.screenSmall ||\n changes.screenMedium ||\n changes.screenLarge\n ) {\n this.classnames = this.getClassNames();\n }\n }\n\n public getClassNames(): string {\n const classnames = ['sky-column'];\n\n if (this.screenXSmall) {\n classnames.push(`sky-column-xs-${this.screenXSmall}`);\n }\n\n if (this.screenSmall) {\n classnames.push(`sky-column-sm-${this.screenSmall}`);\n }\n\n if (this.screenMedium) {\n classnames.push(`sky-column-md-${this.screenMedium}`);\n }\n\n if (this.screenLarge) {\n classnames.push(`sky-column-lg-${this.screenLarge}`);\n }\n\n return classnames.join(' ');\n }\n\n public ngOnInit(): void {\n this.classnames = this.getClassNames();\n }\n}\n","<ng-content></ng-content>\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * NOTICE: DO NOT MODIFY THIS FILE!
3
3
  * The contents of this file were automatically generated by
4
- * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-layout' schematic.
4
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-layout' schematic.
5
5
  * To update this file, simply rerun the command.
6
6
  */
7
7
  import { NgModule } from '@angular/core';
@@ -1 +1 @@
1
- {"version":3,"file":"sky-layout-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/shared/sky-layout-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,iBAAiB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC7C,yBAAyB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QACrD,gCAAgC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC5D,iCAAiC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC7D,kCAAkC,EAAE;YAClC,OAAO,EAAE,4CAA4C;SACtD;QACD,0BAA0B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACjD,oCAAoC,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;QACrE,0BAA0B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACjD,4BAA4B,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QAClD,6BAA6B,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;QAC3D,0BAA0B,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QACnD,0BAA0B,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;KACpD;CACF,CAAC;AAEF,MAAM,OAAO,0BAA0B;IAC9B,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,wBAAwB;;sHAAxB,wBAAwB;uHAAxB,wBAAwB,YATzB,aAAa;uHASZ,wBAAwB,aARxB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,0BAA0B;YACpC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,wBAAwB;kBAVpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,0BAA0B;4BACpC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-layout' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_back_to_top: { message: 'Back to top' },\n skyux_card_checkbox_label: { message: 'Select card' },\n skyux_definition_list_none_found: { message: 'None found.' },\n skyux_description_list_none_found: { message: 'None found.' },\n skyux_inline_delete_assistive_text: {\n message: 'Are you sure you want to delete this item?',\n },\n skyux_inline_delete_cancel: { message: 'Cancel' },\n skyux_inline_delete_confirm_deletion: { message: 'Confirm deletion' },\n skyux_inline_delete_delete: { message: 'Delete' },\n skyux_text_expand_close_text: { message: 'Close' },\n skyux_text_expand_modal_title: { message: 'Expanded view' },\n skyux_text_expand_see_less: { message: 'See less' },\n skyux_text_expand_see_more: { message: 'See more' },\n },\n};\n\nexport class SkyLayoutResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyLayoutResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyLayoutResourcesModule {}\n"]}
1
+ {"version":3,"file":"sky-layout-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/layout/src/lib/modules/shared/sky-layout-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,iBAAiB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC7C,yBAAyB,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QACrD,gCAAgC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC5D,iCAAiC,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;QAC7D,kCAAkC,EAAE;YAClC,OAAO,EAAE,4CAA4C;SACtD;QACD,0BAA0B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACjD,oCAAoC,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;QACrE,0BAA0B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACjD,4BAA4B,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;QAClD,6BAA6B,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;QAC3D,0BAA0B,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QACnD,0BAA0B,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;KACpD;CACF,CAAC;AAEF,MAAM,OAAO,0BAA0B;IAC9B,SAAS,CACd,UAA4B,EAC5B,IAAY;QAEZ,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,wBAAwB;;sHAAxB,wBAAwB;uHAAxB,wBAAwB,YATzB,aAAa;uHASZ,wBAAwB,aARxB;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,0BAA0B;YACpC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,wBAAwB;kBAVpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,0BAA0B;4BACpC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-layout' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_back_to_top: { message: 'Back to top' },\n skyux_card_checkbox_label: { message: 'Select card' },\n skyux_definition_list_none_found: { message: 'None found.' },\n skyux_description_list_none_found: { message: 'None found.' },\n skyux_inline_delete_assistive_text: {\n message: 'Are you sure you want to delete this item?',\n },\n skyux_inline_delete_cancel: { message: 'Cancel' },\n skyux_inline_delete_confirm_deletion: { message: 'Confirm deletion' },\n skyux_inline_delete_delete: { message: 'Delete' },\n skyux_text_expand_close_text: { message: 'Close' },\n skyux_text_expand_modal_title: { message: 'Expanded view' },\n skyux_text_expand_see_less: { message: 'See less' },\n skyux_text_expand_see_more: { message: 'See more' },\n },\n};\n\nexport class SkyLayoutResourcesProvider implements SkyLibResourcesProvider {\n public getString(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyLayoutResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyLayoutResourcesModule {}\n"]}