@skyux/action-bars 5.6.2 → 6.0.0-beta.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.
- package/documentation.json +91 -91
- package/esm2020/index.mjs +11 -0
- package/esm2020/lib/modules/shared/sky-action-bars-resources.module.mjs +50 -0
- package/esm2020/lib/modules/summary-action-bar/actions/summary-action-bar-actions.component.mjs +14 -0
- package/esm2020/lib/modules/summary-action-bar/actions/summary-action-bar-cancel.component.mjs +31 -0
- package/esm2020/lib/modules/summary-action-bar/actions/summary-action-bar-primary-action.component.mjs +32 -0
- package/esm2020/lib/modules/summary-action-bar/actions/summary-action-bar-secondary-action.component.mjs +43 -0
- package/esm2020/lib/modules/summary-action-bar/actions/summary-action-bar-secondary-actions.component.mjs +69 -0
- package/esm2020/lib/modules/summary-action-bar/summary/summary-action-bar-summary.component.mjs +14 -0
- package/esm2020/lib/modules/summary-action-bar/summary-action-bar-adapter.service.mjs +81 -0
- package/esm2020/lib/modules/summary-action-bar/summary-action-bar.component.mjs +179 -0
- package/esm2020/lib/modules/summary-action-bar/summary-action-bar.module.mjs +79 -0
- package/esm2020/lib/modules/summary-action-bar/types/summary-action-bar-type.mjs +12 -0
- package/esm2020/skyux-action-bars.mjs +5 -0
- package/esm2020/testing/public-api.mjs +4 -0
- package/esm2020/testing/skyux-action-bars-testing.mjs +5 -0
- package/esm2020/testing/summary-action-bar/summary-action-bar-fixture-action.mjs +2 -0
- package/esm2020/testing/summary-action-bar/summary-action-bar-fixture.mjs +135 -0
- package/esm2020/testing/summary-action-bar/summary-action-bar.module.mjs +27 -0
- package/fesm2015/{skyux-action-bars-testing.js → skyux-action-bars-testing.mjs} +5 -5
- package/fesm2015/skyux-action-bars-testing.mjs.map +1 -0
- package/fesm2015/{skyux-action-bars.js → skyux-action-bars.mjs} +49 -77
- package/fesm2015/skyux-action-bars.mjs.map +1 -0
- package/{esm2015/testing/summary-action-bar/summary-action-bar-fixture.js → fesm2020/skyux-action-bars-testing.mjs} +63 -40
- package/fesm2020/skyux-action-bars-testing.mjs.map +1 -0
- package/fesm2020/skyux-action-bars.mjs +566 -0
- package/fesm2020/skyux-action-bars.mjs.map +1 -0
- package/lib/modules/shared/sky-action-bars-resources.module.d.ts +1 -1
- package/lib/modules/summary-action-bar/summary-action-bar.component.d.ts +4 -2
- package/package.json +37 -16
- package/testing/package.json +5 -5
- package/bundles/skyux-action-bars-testing.umd.js +0 -563
- package/bundles/skyux-action-bars.umd.js +0 -653
- package/esm2015/index.js +0 -11
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-action-bars-resources.module.js +0 -50
- package/esm2015/lib/modules/shared/sky-action-bars-resources.module.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-actions.component.js +0 -19
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-actions.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-cancel.component.js +0 -36
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-cancel.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-primary-action.component.js +0 -37
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-primary-action.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-secondary-action.component.js +0 -48
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-secondary-action.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-secondary-actions.component.js +0 -73
- package/esm2015/lib/modules/summary-action-bar/actions/summary-action-bar-secondary-actions.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/summary/summary-action-bar-summary.component.js +0 -18
- package/esm2015/lib/modules/summary-action-bar/summary/summary-action-bar-summary.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/summary-action-bar-adapter.service.js +0 -81
- package/esm2015/lib/modules/summary-action-bar/summary-action-bar-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/summary-action-bar.component.js +0 -179
- package/esm2015/lib/modules/summary-action-bar/summary-action-bar.component.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/summary-action-bar.module.js +0 -79
- package/esm2015/lib/modules/summary-action-bar/summary-action-bar.module.js.map +0 -1
- package/esm2015/lib/modules/summary-action-bar/types/summary-action-bar-type.js +0 -12
- package/esm2015/lib/modules/summary-action-bar/types/summary-action-bar-type.js.map +0 -1
- package/esm2015/skyux-action-bars.js +0 -5
- package/esm2015/skyux-action-bars.js.map +0 -1
- package/esm2015/testing/public-api.js +0 -4
- package/esm2015/testing/public-api.js.map +0 -1
- package/esm2015/testing/skyux-action-bars-testing.js +0 -5
- package/esm2015/testing/skyux-action-bars-testing.js.map +0 -1
- package/esm2015/testing/summary-action-bar/summary-action-bar-fixture-action.js +0 -2
- package/esm2015/testing/summary-action-bar/summary-action-bar-fixture-action.js.map +0 -1
- package/esm2015/testing/summary-action-bar/summary-action-bar-fixture.js.map +0 -1
- package/esm2015/testing/summary-action-bar/summary-action-bar.module.js +0 -27
- package/esm2015/testing/summary-action-bar/summary-action-bar.module.js.map +0 -1
- package/fesm2015/skyux-action-bars-testing.js.map +0 -1
- package/fesm2015/skyux-action-bars.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyux-action-bars-testing.mjs","sources":["../../../../../libs/components/action-bars/testing/src/summary-action-bar/summary-action-bar-fixture.ts","../../../../../libs/components/action-bars/testing/src/summary-action-bar/summary-action-bar.module.ts","../../../../../libs/components/action-bars/testing/src/skyux-action-bars-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nimport { SkySummaryActionBarFixtureAction } from './summary-action-bar-fixture-action';\n\n/**\n * Allows interaction with a SKY UX summary action bar component.\n */\nexport class SkySummaryActionBarFixture {\n /**\n * The cancel action model.\n */\n public get cancelAction(): SkySummaryActionBarFixtureAction {\n const cancelBtn = this.getCancelButton();\n return this.buildActionModel(cancelBtn);\n }\n\n /**\n * The primary action model.\n */\n public get primaryAction(): SkySummaryActionBarFixtureAction {\n const primaryBtn = this.getPrimaryActionButton();\n return this.buildActionModel(primaryBtn);\n }\n\n /**\n * The collection of secondary action models.\n */\n public get secondaryActions(): SkySummaryActionBarFixtureAction[] {\n const secondaryBtns = this.getSecondaryActionButtons();\n return secondaryBtns.map((btn: HTMLButtonElement) =>\n this.buildActionModel(btn)\n );\n }\n\n /**\n * A flag indicating whether or not the summary content is visible.\n */\n public get summaryBodyIsVisible(): boolean {\n const summaryEl = this.getSummaryElement();\n return summaryEl.clientHeight > 0;\n }\n\n private debugEl: DebugElement;\n\n private get isResponsiveMode(): boolean {\n const toggleButton =\n this.getSummaryCollapseButton() ?? this.getSummaryExpandButton();\n return toggleButton !== undefined;\n }\n\n constructor(private fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-summary-action-bar'\n );\n }\n\n /**\n * Toggles the secondary action dropdown open or closed, if in responsive mode.\n */\n public async toggleSecondaryActionDropdown(): Promise<void> {\n const toggleButton = this.getSecondaryActionsDropdownButton();\n\n if (toggleButton !== undefined) {\n toggleButton.click();\n\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n }\n\n /**\n * Toggles the summary content area open or closed, if in responsive mode.\n */\n public async toggleSummaryContentVisibility(): Promise<void> {\n const toggleButton =\n this.getSummaryCollapseButton() ?? this.getSummaryExpandButton();\n\n if (toggleButton !== undefined) {\n toggleButton.click();\n\n this.fixture.detectChanges();\n await this.fixture.whenStable();\n\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n }\n }\n\n /**\n * Returns the first element that is a descendant of the node that matches the selector query\n * within the summary body element.\n * @param query The selector query to use.\n */\n public querySummaryBody(query: string): HTMLElement {\n return this.querySummaryBodyElement(query);\n }\n\n /**\n * Returns the all elements that are descendants of the node that matches the selector query\n * within the summary body element.\n * @param query The selector query to use.\n */\n public queryAllSummaryBody(query: string): NodeList {\n return this.queryAllSummaryBodyElement(query);\n }\n\n //#region helpers\n\n private buildActionModel(buttonEl: HTMLButtonElement) {\n return {\n buttonText: SkyAppTestUtility.getText(buttonEl),\n isDisabled: buttonEl.disabled,\n\n click: () => {\n buttonEl.click();\n this.fixture.detectChanges();\n return this.fixture.whenStable();\n },\n };\n }\n\n private getCancelButton(): HTMLButtonElement {\n return this.debugEl.query(By.css('sky-summary-action-bar-cancel .sky-btn'))\n ?.nativeElement;\n }\n\n private getPrimaryActionButton(): HTMLButtonElement {\n return this.debugEl.query(\n By.css('sky-summary-action-bar-primary-action .sky-btn')\n )?.nativeElement;\n }\n\n private getSecondaryActionButtons(): HTMLButtonElement[] {\n // get the secondary action buttons from the dropdown overlay in responsive mode\n if (this.isResponsiveMode) {\n const resultNodes = document.querySelectorAll(\n 'sky-overlay sky-summary-action-bar-secondary-action .sky-btn'\n );\n return Array.prototype.slice.call(resultNodes);\n }\n\n // otherwise grab them from the component's debug element\n return this.debugEl\n .queryAll(By.css('sky-summary-action-bar-secondary-action .sky-btn'))\n .map((debugEl: DebugElement) => debugEl.nativeElement);\n }\n\n private getSecondaryActionsDropdownButton(): HTMLButtonElement {\n return this.debugEl.query(\n By.css('sky-summary-action-bar-secondary-actions .sky-dropdown-button')\n )?.nativeElement;\n }\n\n private getSummaryElement(): HTMLButtonElement {\n return this.debugEl.query(By.css('.sky-summary-action-bar-summary'))\n ?.nativeElement;\n }\n\n private getSummaryCollapseButton(): HTMLButtonElement {\n return this.debugEl.query(\n By.css('.sky-summary-action-bar-details-collapse button')\n )?.nativeElement;\n }\n\n private getSummaryExpandButton(): HTMLButtonElement {\n return this.debugEl.query(\n By.css('.sky-summary-action-bar-details-expand button')\n )?.nativeElement;\n }\n\n private querySummaryBodyElement(query: string): HTMLElement {\n return this.debugEl.nativeElement.querySelector(\n `sky-summary-action-bar-summary ${query}`\n );\n }\n\n private queryAllSummaryBodyElement(query: string): NodeList {\n return this.debugEl.nativeElement.querySelectorAll(\n `sky-summary-action-bar-summary ${query}`\n );\n }\n\n //#endregion helpers\n}\n","import { NgModule } from '@angular/core';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { SkySummaryActionBarModule } from '@skyux/action-bars';\n\n@NgModule({\n exports: [\n SkySummaryActionBarModule,\n\n // The noop animations module needs to be loaded last to avoid\n // subsequent modules adding animations and overriding this.\n NoopAnimationsModule,\n ],\n})\nexport class SkySummaryActionBarTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAOA;;AAEG;MACU,0BAA0B,CAAA;IA2CrC,WAAoB,CAAA,OAA8B,EAAE,SAAiB,EAAA;QAAjD,IAAO,CAAA,OAAA,GAAP,OAAO,CAAuB;AAChD,QAAA,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,wBAAwB,CACzB,CAAC;KACH;AAhDD;;AAEG;AACH,IAAA,IAAW,YAAY,GAAA;AACrB,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;AACzC,QAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;KACzC;AAED;;AAEG;AACH,IAAA,IAAW,aAAa,GAAA;AACtB,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;AACjD,QAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;KAC1C;AAED;;AAEG;AACH,IAAA,IAAW,gBAAgB,GAAA;AACzB,QAAA,MAAM,aAAa,GAAG,IAAI,CAAC,yBAAyB,EAAE,CAAC;AACvD,QAAA,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,GAAsB,KAC9C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAC3B,CAAC;KACH;AAED;;AAEG;AACH,IAAA,IAAW,oBAAoB,GAAA;AAC7B,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC3C,QAAA,OAAO,SAAS,CAAC,YAAY,GAAG,CAAC,CAAC;KACnC;AAID,IAAA,IAAY,gBAAgB,GAAA;QAC1B,MAAM,YAAY,GAChB,IAAI,CAAC,wBAAwB,EAAE,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACnE,OAAO,YAAY,KAAK,SAAS,CAAC;KACnC;AAUD;;AAEG;AACI,IAAA,MAAM,6BAA6B,GAAA;AACxC,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,iCAAiC,EAAE,CAAC;QAE9D,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,YAAY,CAAC,KAAK,EAAE,CAAC;AAErB,YAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;AAC7B,YAAA,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;AAEhC,YAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;AAC7B,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;AAClC,SAAA;KACF;AAED;;AAEG;AACI,IAAA,MAAM,8BAA8B,GAAA;QACzC,MAAM,YAAY,GAChB,IAAI,CAAC,wBAAwB,EAAE,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAEnE,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,YAAY,CAAC,KAAK,EAAE,CAAC;AAErB,YAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;AAC7B,YAAA,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;AAEhC,YAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;AAC7B,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;AAClC,SAAA;KACF;AAED;;;;AAIG;AACI,IAAA,gBAAgB,CAAC,KAAa,EAAA;AACnC,QAAA,OAAO,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KAC5C;AAED;;;;AAIG;AACI,IAAA,mBAAmB,CAAC,KAAa,EAAA;AACtC,QAAA,OAAO,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;KAC/C;;AAIO,IAAA,gBAAgB,CAAC,QAA2B,EAAA;QAClD,OAAO;AACL,YAAA,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC;YAC/C,UAAU,EAAE,QAAQ,CAAC,QAAQ;YAE7B,KAAK,EAAE,MAAK;gBACV,QAAQ,CAAC,KAAK,EAAE,CAAC;AACjB,gBAAA,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;AAC7B,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;aAClC;SACF,CAAC;KACH;IAEO,eAAe,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;AACzE,cAAE,aAAa,CAAC;KACnB;IAEO,sBAAsB,GAAA;AAC5B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CACvB,EAAE,CAAC,GAAG,CAAC,gDAAgD,CAAC,CACzD,EAAE,aAAa,CAAC;KAClB;IAEO,yBAAyB,GAAA;;QAE/B,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,MAAM,WAAW,GAAG,QAAQ,CAAC,gBAAgB,CAC3C,8DAA8D,CAC/D,CAAC;YACF,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAChD,SAAA;;QAGD,OAAO,IAAI,CAAC,OAAO;AAChB,aAAA,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;aACpE,GAAG,CAAC,CAAC,OAAqB,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;KAC1D;IAEO,iCAAiC,GAAA;AACvC,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CACvB,EAAE,CAAC,GAAG,CAAC,+DAA+D,CAAC,CACxE,EAAE,aAAa,CAAC;KAClB;IAEO,iBAAiB,GAAA;AACvB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AAClE,cAAE,aAAa,CAAC;KACnB;IAEO,wBAAwB,GAAA;AAC9B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CACvB,EAAE,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAC1D,EAAE,aAAa,CAAC;KAClB;IAEO,sBAAsB,GAAA;AAC5B,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CACvB,EAAE,CAAC,GAAG,CAAC,+CAA+C,CAAC,CACxD,EAAE,aAAa,CAAC;KAClB;AAEO,IAAA,uBAAuB,CAAC,KAAa,EAAA;AAC3C,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAC7C,CAAkC,+BAAA,EAAA,KAAK,CAAE,CAAA,CAC1C,CAAC;KACH;AAEO,IAAA,0BAA0B,CAAC,KAAa,EAAA;AAC9C,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAChD,CAAkC,+BAAA,EAAA,KAAK,CAAE,CAAA,CAC1C,CAAC;KACH;AAGF;;MClLY,gCAAgC,CAAA;;6HAAhC,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhC,gCAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAPzC,yBAAyB;;;QAIzB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGX,gCAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAPzC,yBAAyB;;;QAIzB,oBAAoB,CAAA,EAAA,CAAA,CAAA;2FAGX,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAT5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,yBAAyB;;;wBAIzB,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import * as i4 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { NgModule, Component, ChangeDetectionStrategy, EventEmitter, Input, Output, ContentChildren, Injectable, ElementRef, ContentChild } from '@angular/core';
|
|
5
|
+
import * as i4$1 from '@skyux/i18n';
|
|
6
|
+
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
7
|
+
import * as i3$1 from '@skyux/indicators';
|
|
8
|
+
import { SkyChevronModule, SkyIconModule } from '@skyux/indicators';
|
|
9
|
+
import * as i2 from '@skyux/popovers';
|
|
10
|
+
import { SkyDropdownMessageType, SkyDropdownModule } from '@skyux/popovers';
|
|
11
|
+
import * as i3 from '@skyux/theme';
|
|
12
|
+
import { SkyThemeModule } from '@skyux/theme';
|
|
13
|
+
import * as i2$1 from '@skyux/core';
|
|
14
|
+
import { SkyMediaBreakpoints } from '@skyux/core';
|
|
15
|
+
import { Subject, fromEvent } from 'rxjs';
|
|
16
|
+
import { skyAnimationSlide } from '@skyux/animations';
|
|
17
|
+
import { takeUntil } from 'rxjs/operators';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
21
|
+
* The contents of this file were automatically generated by
|
|
22
|
+
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-action-bars' schematic.
|
|
23
|
+
* To update this file, simply rerun the command.
|
|
24
|
+
*/
|
|
25
|
+
const RESOURCES = {
|
|
26
|
+
'EN-US': {
|
|
27
|
+
skyux_summary_action_bar_open_secondary: {
|
|
28
|
+
message: 'Show secondary actions',
|
|
29
|
+
},
|
|
30
|
+
skyux_summary_action_bar_expand: { message: 'Expand or collapse summary' },
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
class SkyActionBarsResourcesProvider {
|
|
34
|
+
getString(localeInfo, name) {
|
|
35
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Import into any component library module that needs to use resource strings.
|
|
40
|
+
*/
|
|
41
|
+
class SkyActionBarsResourcesModule {
|
|
42
|
+
}
|
|
43
|
+
SkyActionBarsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyActionBarsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
44
|
+
SkyActionBarsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyActionBarsResourcesModule, exports: [SkyI18nModule] });
|
|
45
|
+
SkyActionBarsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyActionBarsResourcesModule, providers: [
|
|
46
|
+
{
|
|
47
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
48
|
+
useClass: SkyActionBarsResourcesProvider,
|
|
49
|
+
multi: true,
|
|
50
|
+
},
|
|
51
|
+
], imports: [SkyI18nModule] });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkyActionBarsResourcesModule, decorators: [{
|
|
53
|
+
type: NgModule,
|
|
54
|
+
args: [{
|
|
55
|
+
exports: [SkyI18nModule],
|
|
56
|
+
providers: [
|
|
57
|
+
{
|
|
58
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
59
|
+
useClass: SkyActionBarsResourcesProvider,
|
|
60
|
+
multi: true,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
}]
|
|
64
|
+
}] });
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Contains actions for the `sky-summary-action-bar` component.
|
|
68
|
+
*/
|
|
69
|
+
class SkySummaryActionBarActionsComponent {
|
|
70
|
+
}
|
|
71
|
+
SkySummaryActionBarActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
+
SkySummaryActionBarActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarActionsComponent, selector: "sky-summary-action-bar-actions", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:inline-flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarActionsComponent, decorators: [{
|
|
74
|
+
type: Component,
|
|
75
|
+
args: [{ selector: 'sky-summary-action-bar-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n", styles: [":host{display:inline-flex}\n"] }]
|
|
76
|
+
}] });
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Displays a cancel action.
|
|
80
|
+
*/
|
|
81
|
+
class SkySummaryActionBarCancelComponent {
|
|
82
|
+
constructor() {
|
|
83
|
+
/**
|
|
84
|
+
* Indicates whether to disable the cancel action.
|
|
85
|
+
*/
|
|
86
|
+
this.disabled = false;
|
|
87
|
+
/**
|
|
88
|
+
* Fires when users select the cancel action.
|
|
89
|
+
*/
|
|
90
|
+
this.actionClick = new EventEmitter();
|
|
91
|
+
}
|
|
92
|
+
onCancelClicked() {
|
|
93
|
+
this.actionClick.emit();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
SkySummaryActionBarCancelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarCancelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
97
|
+
SkySummaryActionBarCancelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarCancelComponent, selector: "sky-summary-action-bar-cancel", inputs: { disabled: "disabled" }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-summary-action-bar-cancel\"\n [disabled]=\"disabled\"\n (click)=\"onCancelClicked()\"\n>\n <ng-content></ng-content>\n</button>\n", styles: ["::ng-deep .sky-modal .sky-modal-footer-container button.sky-btn-link:first-child{margin-left:initial}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarCancelComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{ selector: 'sky-summary-action-bar-cancel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-summary-action-bar-cancel\"\n [disabled]=\"disabled\"\n (click)=\"onCancelClicked()\"\n>\n <ng-content></ng-content>\n</button>\n", styles: ["::ng-deep .sky-modal .sky-modal-footer-container button.sky-btn-link:first-child{margin-left:initial}\n"] }]
|
|
101
|
+
}], propDecorators: { disabled: [{
|
|
102
|
+
type: Input
|
|
103
|
+
}], actionClick: [{
|
|
104
|
+
type: Output
|
|
105
|
+
}] } });
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Displays a primary button.
|
|
109
|
+
*/
|
|
110
|
+
class SkySummaryActionBarPrimaryActionComponent {
|
|
111
|
+
constructor() {
|
|
112
|
+
/**
|
|
113
|
+
* Indicates whether to disable the primary action.
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
this.disabled = false;
|
|
117
|
+
/**
|
|
118
|
+
* Fires when users select the primary action.
|
|
119
|
+
*/
|
|
120
|
+
this.actionClick = new EventEmitter();
|
|
121
|
+
}
|
|
122
|
+
onButtonClicked() {
|
|
123
|
+
this.actionClick.emit();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
SkySummaryActionBarPrimaryActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarPrimaryActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
127
|
+
SkySummaryActionBarPrimaryActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarPrimaryActionComponent, selector: "sky-summary-action-bar-primary-action", inputs: { disabled: "disabled" }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"disabled\"\n (click)=\"onButtonClicked()\"\n>\n <ng-content></ng-content>\n</button>\n", styles: [".sky-btn{margin-right:10px}:host-context(.sky-theme-modern) .sky-btn{margin-right:10px}.sky-theme-modern .sky-btn{margin-right:10px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarPrimaryActionComponent, decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{ selector: 'sky-summary-action-bar-primary-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"sky-btn sky-btn-primary\"\n [disabled]=\"disabled\"\n (click)=\"onButtonClicked()\"\n>\n <ng-content></ng-content>\n</button>\n", styles: [".sky-btn{margin-right:10px}:host-context(.sky-theme-modern) .sky-btn{margin-right:10px}.sky-theme-modern .sky-btn{margin-right:10px}\n"] }]
|
|
131
|
+
}], propDecorators: { disabled: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], actionClick: [{
|
|
134
|
+
type: Output
|
|
135
|
+
}] } });
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Specifies secondary actions.
|
|
139
|
+
*/
|
|
140
|
+
class SkySummaryActionBarSecondaryActionComponent {
|
|
141
|
+
constructor(changeDetector) {
|
|
142
|
+
this.changeDetector = changeDetector;
|
|
143
|
+
/**
|
|
144
|
+
* Indicates whether to disable a secondary action.
|
|
145
|
+
* @default false
|
|
146
|
+
*/
|
|
147
|
+
this.disabled = false;
|
|
148
|
+
/**
|
|
149
|
+
* Fires when users select a secondary action.
|
|
150
|
+
*/
|
|
151
|
+
this.actionClick = new EventEmitter();
|
|
152
|
+
}
|
|
153
|
+
set isDropdown(value) {
|
|
154
|
+
this._isDropdown = value;
|
|
155
|
+
this.changeDetector.detectChanges();
|
|
156
|
+
}
|
|
157
|
+
get isDropdown() {
|
|
158
|
+
return this._isDropdown;
|
|
159
|
+
}
|
|
160
|
+
onButtonClicked() {
|
|
161
|
+
this.actionClick.emit();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
SkySummaryActionBarSecondaryActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarSecondaryActionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
165
|
+
SkySummaryActionBarSecondaryActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarSecondaryActionComponent, selector: "sky-summary-action-bar-secondary-action", inputs: { disabled: "disabled" }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: "<ng-container *ngIf=\"!isDropdown\">\n <button\n type=\"button\"\n class=\"sky-btn\"\n role=\"menuitem\"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-secondary': 'default',\n 'sky-btn-default': 'modern'\n }\"\n (click)=\"onButtonClicked()\"\n >\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryAction\"\n ></ng-container>\n </button>\n</ng-container>\n<sky-dropdown-item *ngIf=\"isDropdown\">\n <button type=\"button\" [disabled]=\"disabled\" (click)=\"onButtonClicked()\">\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryAction\"\n ></ng-container>\n </button>\n</sky-dropdown-item>\n\n<ng-template #summaryActionBarSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n", styles: [".sky-btn{margin-right:10px}:host-context(.sky-theme-modern) .sky-btn{margin-right:10px}.sky-theme-modern .sky-btn{margin-right:10px}\n"], components: [{ type: i2.λ1, selector: "sky-dropdown-item", inputs: ["ariaRole"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarSecondaryActionComponent, decorators: [{
|
|
167
|
+
type: Component,
|
|
168
|
+
args: [{ selector: 'sky-summary-action-bar-secondary-action', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!isDropdown\">\n <button\n type=\"button\"\n class=\"sky-btn\"\n role=\"menuitem\"\n [disabled]=\"disabled\"\n [skyThemeClass]=\"{\n 'sky-btn-secondary': 'default',\n 'sky-btn-default': 'modern'\n }\"\n (click)=\"onButtonClicked()\"\n >\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryAction\"\n ></ng-container>\n </button>\n</ng-container>\n<sky-dropdown-item *ngIf=\"isDropdown\">\n <button type=\"button\" [disabled]=\"disabled\" (click)=\"onButtonClicked()\">\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryAction\"\n ></ng-container>\n </button>\n</sky-dropdown-item>\n\n<ng-template #summaryActionBarSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n", styles: [".sky-btn{margin-right:10px}:host-context(.sky-theme-modern) .sky-btn{margin-right:10px}.sky-theme-modern .sky-btn{margin-right:10px}\n"] }]
|
|
169
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}], actionClick: [{
|
|
172
|
+
type: Output
|
|
173
|
+
}] } });
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Contains secondary actions specified with `sky-summary-action-bar-secondary-action`
|
|
177
|
+
* components.
|
|
178
|
+
*/
|
|
179
|
+
class SkySummaryActionBarSecondaryActionsComponent {
|
|
180
|
+
constructor(changeDetector, mediaQueryService) {
|
|
181
|
+
this.changeDetector = changeDetector;
|
|
182
|
+
this.mediaQueryService = mediaQueryService;
|
|
183
|
+
this.isMobile = false;
|
|
184
|
+
this.dropdownMessageStream = new Subject();
|
|
185
|
+
this.actionClicks = [];
|
|
186
|
+
}
|
|
187
|
+
ngAfterContentInit() {
|
|
188
|
+
this.mediaQuerySubscription = this.mediaQueryService.subscribe((args) => {
|
|
189
|
+
this.isMobile = args === SkyMediaBreakpoints.xs;
|
|
190
|
+
this.checkAndUpdateChildrenType();
|
|
191
|
+
});
|
|
192
|
+
this.actionChanges = this.secondaryActionComponents.changes.subscribe(() => {
|
|
193
|
+
this.checkAndUpdateChildrenType();
|
|
194
|
+
});
|
|
195
|
+
if (this.mediaQueryService.current === SkyMediaBreakpoints.xs) {
|
|
196
|
+
this.isMobile = true;
|
|
197
|
+
}
|
|
198
|
+
this.checkAndUpdateChildrenType();
|
|
199
|
+
}
|
|
200
|
+
ngOnDestroy() {
|
|
201
|
+
this.mediaQuerySubscription.unsubscribe();
|
|
202
|
+
this.actionChanges.unsubscribe();
|
|
203
|
+
this.actionClicks.forEach((actionClick) => actionClick.unsubscribe());
|
|
204
|
+
}
|
|
205
|
+
checkAndUpdateChildrenType() {
|
|
206
|
+
/* istanbul ignore else */
|
|
207
|
+
if (this.secondaryActionComponents) {
|
|
208
|
+
let isDropdown = false;
|
|
209
|
+
if (this.secondaryActionComponents.length >= 5 || this.isMobile) {
|
|
210
|
+
isDropdown = true;
|
|
211
|
+
}
|
|
212
|
+
this.secondaryActionComponents.forEach((action) => {
|
|
213
|
+
action.isDropdown = isDropdown;
|
|
214
|
+
this.actionClicks.push(action.actionClick.subscribe(() => {
|
|
215
|
+
this.dropdownMessageStream.next({
|
|
216
|
+
type: SkyDropdownMessageType.Close,
|
|
217
|
+
});
|
|
218
|
+
}));
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
this.changeDetector.detectChanges();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
SkySummaryActionBarSecondaryActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarSecondaryActionsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.SkyMediaQueryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
SkySummaryActionBarSecondaryActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarSecondaryActionsComponent, selector: "sky-summary-action-bar-secondary-actions", queries: [{ propertyName: "secondaryActionComponents", predicate: SkySummaryActionBarSecondaryActionComponent }], ngImport: i0, template: "<div\n *ngIf=\"!isMobile && secondaryActionComponents.length < 5\"\n class=\"sky-summary-action-bar-secondary-buttons\"\n role=\"menubar\"\n>\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryActions\"\n ></ng-container>\n</div>\n<div *ngIf=\"isMobile || secondaryActionComponents.length > 4\">\n <sky-dropdown\n buttonType=\"ellipsis-h\"\n [attr.title]=\"'skyux_summary_action_bar_open_secondary' | skyLibResources\"\n [messageStream]=\"dropdownMessageStream\"\n >\n <sky-dropdown-menu>\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryActions\"\n ></ng-container>\n </sky-dropdown-menu>\n </sky-dropdown>\n</div>\n<ng-template #summaryActionBarSecondaryActions>\n <ng-content select=\"sky-summary-action-bar-secondary-action\"></ng-content>\n</ng-template>\n", components: [{ type: i2.λ3, selector: "sky-dropdown", inputs: ["buttonStyle", "buttonType", "disabled", "dismissOnBlur", "label", "horizontalAlignment", "messageStream", "title", "trigger"] }, { type: i2.λ4, selector: "sky-dropdown-menu", inputs: ["ariaLabelledBy", "ariaRole", "useNativeFocus"], outputs: ["menuChanges"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarSecondaryActionsComponent, decorators: [{
|
|
227
|
+
type: Component,
|
|
228
|
+
args: [{ selector: 'sky-summary-action-bar-secondary-actions', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"!isMobile && secondaryActionComponents.length < 5\"\n class=\"sky-summary-action-bar-secondary-buttons\"\n role=\"menubar\"\n>\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryActions\"\n ></ng-container>\n</div>\n<div *ngIf=\"isMobile || secondaryActionComponents.length > 4\">\n <sky-dropdown\n buttonType=\"ellipsis-h\"\n [attr.title]=\"'skyux_summary_action_bar_open_secondary' | skyLibResources\"\n [messageStream]=\"dropdownMessageStream\"\n >\n <sky-dropdown-menu>\n <ng-container\n *ngTemplateOutlet=\"summaryActionBarSecondaryActions\"\n ></ng-container>\n </sky-dropdown-menu>\n </sky-dropdown>\n</div>\n<ng-template #summaryActionBarSecondaryActions>\n <ng-content select=\"sky-summary-action-bar-secondary-action\"></ng-content>\n</ng-template>\n" }]
|
|
229
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.SkyMediaQueryService }]; }, propDecorators: { secondaryActionComponents: [{
|
|
230
|
+
type: ContentChildren,
|
|
231
|
+
args: [SkySummaryActionBarSecondaryActionComponent]
|
|
232
|
+
}] } });
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @internal
|
|
236
|
+
*/
|
|
237
|
+
var SkySummaryActionBarType;
|
|
238
|
+
(function (SkySummaryActionBarType) {
|
|
239
|
+
SkySummaryActionBarType[SkySummaryActionBarType["Page"] = 0] = "Page";
|
|
240
|
+
SkySummaryActionBarType[SkySummaryActionBarType["StandardModal"] = 1] = "StandardModal";
|
|
241
|
+
SkySummaryActionBarType[SkySummaryActionBarType["FullPageModal"] = 2] = "FullPageModal";
|
|
242
|
+
SkySummaryActionBarType[SkySummaryActionBarType["Tab"] = 3] = "Tab";
|
|
243
|
+
SkySummaryActionBarType[SkySummaryActionBarType["SplitView"] = 4] = "SplitView";
|
|
244
|
+
})(SkySummaryActionBarType || (SkySummaryActionBarType = {}));
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
class SkySummaryActionBarAdapterService {
|
|
250
|
+
constructor(rendererFactory, windowRef) {
|
|
251
|
+
this.rendererFactory = rendererFactory;
|
|
252
|
+
this.windowRef = windowRef;
|
|
253
|
+
this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
|
|
254
|
+
}
|
|
255
|
+
styleBodyElementForActionBar(summaryActionBarRef) {
|
|
256
|
+
const window = this.windowRef.nativeWindow;
|
|
257
|
+
const body = window.document.body;
|
|
258
|
+
const actionBarEl = summaryActionBarRef.nativeElement.querySelector('.sky-summary-action-bar');
|
|
259
|
+
/* istanbul ignore else */
|
|
260
|
+
if (actionBarEl.style.visibility !== 'hidden') {
|
|
261
|
+
this.renderer.setStyle(body, 'margin-bottom', actionBarEl.offsetHeight + 'px');
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
styleSplitViewElementForActionBar(summaryActionBarRef) {
|
|
265
|
+
const splitViewWorkspaceContent = document.querySelector('.sky-split-view-workspace-content');
|
|
266
|
+
const splitViewWorkspaceFooter = document.querySelector('.sky-split-view-workspace-footer');
|
|
267
|
+
const actionBarEl = summaryActionBarRef.nativeElement.querySelector('.sky-summary-action-bar');
|
|
268
|
+
/* istanbul ignore else */
|
|
269
|
+
if (actionBarEl.style.visibility !== 'hidden') {
|
|
270
|
+
this.renderer.setStyle(splitViewWorkspaceContent, 'padding-bottom', '20px');
|
|
271
|
+
this.renderer.setStyle(splitViewWorkspaceFooter, 'padding', 0);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
revertBodyElementStyles() {
|
|
275
|
+
const window = this.windowRef.nativeWindow;
|
|
276
|
+
const body = window.document.body;
|
|
277
|
+
this.renderer.removeStyle(body, 'margin-bottom');
|
|
278
|
+
}
|
|
279
|
+
revertSplitViewElementStyles() {
|
|
280
|
+
const splitViewWorkspaceContent = document.querySelector('.sky-split-view-workspace-content');
|
|
281
|
+
const splitViewWorkspaceFooter = document.querySelector('.sky-split-view-workspace-footer');
|
|
282
|
+
this.renderer.setStyle(splitViewWorkspaceContent, 'padding-bottom', 'none');
|
|
283
|
+
this.renderer.setStyle(splitViewWorkspaceFooter, 'padding', '10px');
|
|
284
|
+
}
|
|
285
|
+
styleModalFooter(summaryActionBarRef) {
|
|
286
|
+
const modalFooterEls = document.getElementsByClassName('sky-modal-footer-container');
|
|
287
|
+
for (let i = 0; i < modalFooterEls.length; i++) {
|
|
288
|
+
if (modalFooterEls.item(i).contains(summaryActionBarRef.nativeElement)) {
|
|
289
|
+
this.renderer.setStyle(modalFooterEls.item(i), 'padding', 0);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
getSummaryActionBarType(el) {
|
|
294
|
+
do {
|
|
295
|
+
if (el.tagName.toLowerCase() === 'sky-modal-footer') {
|
|
296
|
+
while (el.tagName.toLowerCase() !== 'sky-modal') {
|
|
297
|
+
if (el.classList.contains('sky-modal-full-page')) {
|
|
298
|
+
return SkySummaryActionBarType.FullPageModal;
|
|
299
|
+
}
|
|
300
|
+
el = el.parentElement;
|
|
301
|
+
}
|
|
302
|
+
return SkySummaryActionBarType.StandardModal;
|
|
303
|
+
}
|
|
304
|
+
else if (el.classList.contains('sky-tab')) {
|
|
305
|
+
return SkySummaryActionBarType.Tab;
|
|
306
|
+
}
|
|
307
|
+
else if (el.tagName.toLowerCase() === 'sky-split-view-workspace') {
|
|
308
|
+
return SkySummaryActionBarType.SplitView;
|
|
309
|
+
}
|
|
310
|
+
el = el.parentElement;
|
|
311
|
+
// tslint:disable-next-line:no-null-keyword
|
|
312
|
+
} while (el !== null && el.nodeType === 1);
|
|
313
|
+
return SkySummaryActionBarType.Page;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
SkySummaryActionBarAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarAdapterService, deps: [{ token: i0.RendererFactory2 }, { token: i2$1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
317
|
+
SkySummaryActionBarAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarAdapterService });
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarAdapterService, decorators: [{
|
|
319
|
+
type: Injectable
|
|
320
|
+
}], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: i2$1.SkyAppWindowRef }]; } });
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Specifies the summary information to display.
|
|
324
|
+
*/
|
|
325
|
+
class SkySummaryActionBarSummaryComponent {
|
|
326
|
+
}
|
|
327
|
+
SkySummaryActionBarSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
328
|
+
SkySummaryActionBarSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarSummaryComponent, selector: "sky-summary-action-bar-summary", ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarSummaryComponent, decorators: [{
|
|
330
|
+
type: Component,
|
|
331
|
+
args: [{ selector: 'sky-summary-action-bar-summary', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
332
|
+
}] });
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Auto-incrementing integer used to generate unique ids for summary action bar components.
|
|
336
|
+
*/
|
|
337
|
+
let nextId = 0;
|
|
338
|
+
/**
|
|
339
|
+
* Contains the `sky-summary-action-bar-actions` and
|
|
340
|
+
* `sky-summary-action-bar-summary` components.
|
|
341
|
+
*/
|
|
342
|
+
class SkySummaryActionBarComponent {
|
|
343
|
+
constructor(adapterService, changeDetector, elementRef, mediaQueryService, observerService, windowRef) {
|
|
344
|
+
this.adapterService = adapterService;
|
|
345
|
+
this.changeDetector = changeDetector;
|
|
346
|
+
this.elementRef = elementRef;
|
|
347
|
+
this.mediaQueryService = mediaQueryService;
|
|
348
|
+
this.observerService = observerService;
|
|
349
|
+
this.windowRef = windowRef;
|
|
350
|
+
this.isSummaryCollapsed = false;
|
|
351
|
+
this.slideDirection = 'down';
|
|
352
|
+
this.summaryId = `sky-summary-action-bar-summary-${++nextId}`;
|
|
353
|
+
this.idled = new Subject();
|
|
354
|
+
}
|
|
355
|
+
get isSummaryCollapsible() {
|
|
356
|
+
return (this.type === SkySummaryActionBarType.StandardModal ||
|
|
357
|
+
this.mediaQueryService.current === SkyMediaBreakpoints.xs);
|
|
358
|
+
}
|
|
359
|
+
set summaryELement(element) {
|
|
360
|
+
this._summaryElement = element;
|
|
361
|
+
this.changeDetector.markForCheck();
|
|
362
|
+
}
|
|
363
|
+
get summaryElement() {
|
|
364
|
+
return this._summaryElement;
|
|
365
|
+
}
|
|
366
|
+
ngAfterViewInit() {
|
|
367
|
+
this.type = this.adapterService.getSummaryActionBarType(this.elementRef.nativeElement);
|
|
368
|
+
if (!(this.type === SkySummaryActionBarType.FullPageModal ||
|
|
369
|
+
this.type === SkySummaryActionBarType.StandardModal)) {
|
|
370
|
+
this.setupReactiveState();
|
|
371
|
+
if (this.type === SkySummaryActionBarType.SplitView) {
|
|
372
|
+
this.adapterService.styleSplitViewElementForActionBar(this.elementRef);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this.adapterService.styleBodyElementForActionBar(this.elementRef);
|
|
376
|
+
}
|
|
377
|
+
this.setupResizeListener();
|
|
378
|
+
if (this.type === SkySummaryActionBarType.Tab) {
|
|
379
|
+
this.setupTabListener();
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
this.adapterService.styleModalFooter(this.elementRef);
|
|
384
|
+
if (this.type === SkySummaryActionBarType.FullPageModal) {
|
|
385
|
+
this.setupReactiveState();
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
this.changeDetector.detectChanges();
|
|
389
|
+
}
|
|
390
|
+
ngOnDestroy() {
|
|
391
|
+
if (this.type === SkySummaryActionBarType.SplitView) {
|
|
392
|
+
this.adapterService.revertSplitViewElementStyles();
|
|
393
|
+
}
|
|
394
|
+
else if (this.type === SkySummaryActionBarType.Page ||
|
|
395
|
+
this.type === SkySummaryActionBarType.Tab) {
|
|
396
|
+
this.adapterService.revertBodyElementStyles();
|
|
397
|
+
}
|
|
398
|
+
this.removeResizeListener();
|
|
399
|
+
this.removeTabListener();
|
|
400
|
+
if (this.mediaQuerySubscription) {
|
|
401
|
+
this.mediaQuerySubscription.unsubscribe();
|
|
402
|
+
}
|
|
403
|
+
this.idled.complete();
|
|
404
|
+
}
|
|
405
|
+
onDirectionChange(direction) {
|
|
406
|
+
this.slideDirection = direction;
|
|
407
|
+
}
|
|
408
|
+
summaryContentExists() {
|
|
409
|
+
return (this.summaryElement &&
|
|
410
|
+
this.summaryElement.nativeElement.children.length > 0);
|
|
411
|
+
}
|
|
412
|
+
// NOTE: This function is needed so that the button is not removed until post-animation
|
|
413
|
+
summaryTransitionEnd() {
|
|
414
|
+
if (this.slideDirection === 'up') {
|
|
415
|
+
this.isSummaryCollapsed = true;
|
|
416
|
+
}
|
|
417
|
+
if (this.type === SkySummaryActionBarType.Page ||
|
|
418
|
+
this.type === SkySummaryActionBarType.Tab) {
|
|
419
|
+
this.adapterService.styleBodyElementForActionBar(this.elementRef);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
// NOTE: This function is needed so that the button is added before animation
|
|
423
|
+
summaryTransitionStart() {
|
|
424
|
+
if (this.slideDirection === 'down') {
|
|
425
|
+
this.isSummaryCollapsed = false;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
setupReactiveState() {
|
|
429
|
+
this.mediaQuerySubscription = this.mediaQueryService.subscribe((args) => {
|
|
430
|
+
if (args !== SkyMediaBreakpoints.xs) {
|
|
431
|
+
this.isSummaryCollapsed = false;
|
|
432
|
+
this.slideDirection = 'down';
|
|
433
|
+
}
|
|
434
|
+
this.changeDetector.detectChanges();
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
setupTabListener() {
|
|
438
|
+
/* istanbul ignore else */
|
|
439
|
+
if (!this.observer) {
|
|
440
|
+
this.observer = this.observerService.create((mutations) => {
|
|
441
|
+
if (mutations[0].target.attributes.getNamedItem('hidden')) {
|
|
442
|
+
this.adapterService.revertBodyElementStyles();
|
|
443
|
+
this.removeResizeListener();
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
setTimeout(() => {
|
|
447
|
+
this.adapterService.styleBodyElementForActionBar(this.elementRef);
|
|
448
|
+
this.setupResizeListener();
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
const config = {
|
|
454
|
+
attributes: true,
|
|
455
|
+
attributeFilter: ['hidden'],
|
|
456
|
+
childList: false,
|
|
457
|
+
characterDate: false,
|
|
458
|
+
};
|
|
459
|
+
let el = this.elementRef.nativeElement;
|
|
460
|
+
do {
|
|
461
|
+
if (el.classList.contains('sky-tab')) {
|
|
462
|
+
this.observer.observe(el, config);
|
|
463
|
+
}
|
|
464
|
+
el = el.parentElement;
|
|
465
|
+
// tslint:disable-next-line:no-null-keyword
|
|
466
|
+
} while (el !== null && el.nodeType === 1);
|
|
467
|
+
}
|
|
468
|
+
removeTabListener() {
|
|
469
|
+
if (this.observer) {
|
|
470
|
+
this.observer.disconnect();
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
setupResizeListener() {
|
|
474
|
+
if (this.type !== SkySummaryActionBarType.SplitView) {
|
|
475
|
+
const windowObj = this.windowRef.nativeWindow;
|
|
476
|
+
fromEvent(windowObj, 'resize')
|
|
477
|
+
.pipe(takeUntil(this.idled))
|
|
478
|
+
.subscribe(() => {
|
|
479
|
+
this.adapterService.styleBodyElementForActionBar(this.elementRef);
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
removeResizeListener() {
|
|
484
|
+
this.idled.next(true);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
SkySummaryActionBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarComponent, deps: [{ token: SkySummaryActionBarAdapterService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i2$1.SkyMediaQueryService }, { token: i2$1.MutationObserverService }, { token: i2$1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
488
|
+
SkySummaryActionBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SkySummaryActionBarComponent, selector: "sky-summary-action-bar", providers: [SkySummaryActionBarAdapterService], queries: [{ propertyName: "summaryELement", first: true, predicate: SkySummaryActionBarSummaryComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"sky-summary-action-bar\"\n [ngClass]=\"{\n 'sky-summary-action-bar-summary-collapsible': isSummaryCollapsible,\n 'sky-summary-action-bar-modal': type === 1 || type === 2,\n 'sky-summary-action-bar-split-view': type === 4\n }\"\n>\n <div class=\"sky-summary-action-bar-actions\">\n <ng-content select=\"sky-summary-action-bar-actions\"></ng-content>\n </div>\n <ng-container *ngIf=\"summaryContentExists()\">\n <div\n class=\"sky-summary-action-bar-summary\"\n [id]=\"summaryId\"\n [@skyAnimationSlide]=\"slideDirection\"\n (@skyAnimationSlide.start)=\"summaryTransitionStart()\"\n (@skyAnimationSlide.done)=\"summaryTransitionEnd()\"\n >\n <div class=\"sky-summary-action-bar-summary-body\">\n <div class=\"sky-summary-action-bar-summary-items\">\n <ng-content select=\"sky-summary-action-bar-summary\"></ng-content>\n </div>\n <div\n *ngIf=\"isSummaryCollapsible && !isSummaryCollapsed\"\n class=\"sky-summary-action-bar-details-collapse\"\n >\n <ng-container *ngTemplateOutlet=\"chevron\"></ng-container>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"isSummaryCollapsible && isSummaryCollapsed\"\n class=\"sky-summary-action-bar-details-expand\"\n >\n <ng-container *ngTemplateOutlet=\"chevron\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #chevron>\n <sky-chevron\n [attr.aria-controls]=\"summaryId\"\n [ariaLabel]=\"'skyux_summary_action_bar_expand' | skyLibResources\"\n [direction]=\"isSummaryCollapsed ? 'up' : 'down'\"\n [skyThemeClass]=\"{\n 'sky-margin-inline-default': 'modern'\n }\"\n (directionChange)=\"onDirectionChange($event)\"\n >\n </sky-chevron>\n</ng-template>\n", styles: [".sky-summary-action-bar{display:flex;align-items:center;width:100%;margin-top:20px;position:fixed;bottom:0;left:0;z-index:999;background-color:#fff;box-shadow:0 -3px 3px #cdcfd2}.sky-summary-action-bar-modal,.sky-summary-action-bar-split-view{position:relative;margin-top:0}.sky-summary-action-bar-split-view{box-shadow:none}.sky-summary-action-bar-actions{padding:10px 20px 10px 10px;flex-shrink:0;background-color:#fff;z-index:999}.sky-summary-action-bar-summary{margin:10px 0;border-left:1px solid #e2e3e4}.sky-summary-action-bar-summary-body{padding-left:20px;display:flex}.sky-summary-action-bar-summary-items{display:flex;flex-wrap:wrap;flex-grow:1;margin-right:10px}.sky-summary-action-bar-details-expand{margin-left:auto;margin-right:10px}.sky-summary-action-bar-details-expand,.sky-summary-action-bar-details-collapse{display:none}.sky-summary-action-bar-summary-collapsible.sky-summary-action-bar{flex-wrap:wrap}.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary{order:-1;width:100%;border-bottom:1px solid #e2e3e4;margin:0;border-left:none;z-index:998}.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary-body{padding:10px}.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-details-expand,.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-details-collapse{display:block}:host-context(.sky-theme-modern) .sky-summary-action-bar-actions{padding:20px 30px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary{border:none}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-body{padding-left:30px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-actions{padding:20px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary-body{padding:20px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-items{margin-bottom:-10px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-items ::ng-deep sky-key-info{margin:0 30px 10px 0;display:inline-block}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-items ::ng-deep sky-key-info:last-child{margin:0 0 10px}.sky-theme-modern .sky-summary-action-bar-actions{padding:20px 30px}.sky-theme-modern .sky-summary-action-bar-summary{border:none}.sky-theme-modern .sky-summary-action-bar-summary-body{padding-left:30px}.sky-theme-modern .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-actions,.sky-theme-modern .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary-body{padding:20px}.sky-theme-modern .sky-summary-action-bar-summary-items{margin-bottom:-10px}.sky-theme-modern .sky-summary-action-bar-summary-items ::ng-deep sky-key-info{margin:0 30px 10px 0;display:inline-block}.sky-theme-modern .sky-summary-action-bar-summary-items ::ng-deep sky-key-info:last-child{margin:0 0 10px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-summary-action-bar{background-color:#000;box-shadow:none}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-summary-action-bar-actions{background-color:#000}.sky-theme-modern.sky-theme-mode-dark .sky-summary-action-bar{background-color:#000;box-shadow:none}.sky-theme-modern.sky-theme-mode-dark .sky-summary-action-bar-actions{background-color:#000}\n"], components: [{ type: i3$1.λ2, selector: "sky-chevron", inputs: ["ariaControls", "ariaLabel", "direction", "disabled"], outputs: ["directionChange"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], pipes: { "skyLibResources": i4$1.SkyLibResourcesPipe }, animations: [skyAnimationSlide], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarComponent, decorators: [{
|
|
490
|
+
type: Component,
|
|
491
|
+
args: [{ selector: 'sky-summary-action-bar', animations: [skyAnimationSlide], providers: [SkySummaryActionBarAdapterService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"sky-summary-action-bar\"\n [ngClass]=\"{\n 'sky-summary-action-bar-summary-collapsible': isSummaryCollapsible,\n 'sky-summary-action-bar-modal': type === 1 || type === 2,\n 'sky-summary-action-bar-split-view': type === 4\n }\"\n>\n <div class=\"sky-summary-action-bar-actions\">\n <ng-content select=\"sky-summary-action-bar-actions\"></ng-content>\n </div>\n <ng-container *ngIf=\"summaryContentExists()\">\n <div\n class=\"sky-summary-action-bar-summary\"\n [id]=\"summaryId\"\n [@skyAnimationSlide]=\"slideDirection\"\n (@skyAnimationSlide.start)=\"summaryTransitionStart()\"\n (@skyAnimationSlide.done)=\"summaryTransitionEnd()\"\n >\n <div class=\"sky-summary-action-bar-summary-body\">\n <div class=\"sky-summary-action-bar-summary-items\">\n <ng-content select=\"sky-summary-action-bar-summary\"></ng-content>\n </div>\n <div\n *ngIf=\"isSummaryCollapsible && !isSummaryCollapsed\"\n class=\"sky-summary-action-bar-details-collapse\"\n >\n <ng-container *ngTemplateOutlet=\"chevron\"></ng-container>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"isSummaryCollapsible && isSummaryCollapsed\"\n class=\"sky-summary-action-bar-details-expand\"\n >\n <ng-container *ngTemplateOutlet=\"chevron\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #chevron>\n <sky-chevron\n [attr.aria-controls]=\"summaryId\"\n [ariaLabel]=\"'skyux_summary_action_bar_expand' | skyLibResources\"\n [direction]=\"isSummaryCollapsed ? 'up' : 'down'\"\n [skyThemeClass]=\"{\n 'sky-margin-inline-default': 'modern'\n }\"\n (directionChange)=\"onDirectionChange($event)\"\n >\n </sky-chevron>\n</ng-template>\n", styles: [".sky-summary-action-bar{display:flex;align-items:center;width:100%;margin-top:20px;position:fixed;bottom:0;left:0;z-index:999;background-color:#fff;box-shadow:0 -3px 3px #cdcfd2}.sky-summary-action-bar-modal,.sky-summary-action-bar-split-view{position:relative;margin-top:0}.sky-summary-action-bar-split-view{box-shadow:none}.sky-summary-action-bar-actions{padding:10px 20px 10px 10px;flex-shrink:0;background-color:#fff;z-index:999}.sky-summary-action-bar-summary{margin:10px 0;border-left:1px solid #e2e3e4}.sky-summary-action-bar-summary-body{padding-left:20px;display:flex}.sky-summary-action-bar-summary-items{display:flex;flex-wrap:wrap;flex-grow:1;margin-right:10px}.sky-summary-action-bar-details-expand{margin-left:auto;margin-right:10px}.sky-summary-action-bar-details-expand,.sky-summary-action-bar-details-collapse{display:none}.sky-summary-action-bar-summary-collapsible.sky-summary-action-bar{flex-wrap:wrap}.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary{order:-1;width:100%;border-bottom:1px solid #e2e3e4;margin:0;border-left:none;z-index:998}.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary-body{padding:10px}.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-details-expand,.sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-details-collapse{display:block}:host-context(.sky-theme-modern) .sky-summary-action-bar-actions{padding:20px 30px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary{border:none}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-body{padding-left:30px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-actions{padding:20px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary-body{padding:20px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-items{margin-bottom:-10px}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-items ::ng-deep sky-key-info{margin:0 30px 10px 0;display:inline-block}:host-context(.sky-theme-modern) .sky-summary-action-bar-summary-items ::ng-deep sky-key-info:last-child{margin:0 0 10px}.sky-theme-modern .sky-summary-action-bar-actions{padding:20px 30px}.sky-theme-modern .sky-summary-action-bar-summary{border:none}.sky-theme-modern .sky-summary-action-bar-summary-body{padding-left:30px}.sky-theme-modern .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-actions,.sky-theme-modern .sky-summary-action-bar-summary-collapsible .sky-summary-action-bar-summary-body{padding:20px}.sky-theme-modern .sky-summary-action-bar-summary-items{margin-bottom:-10px}.sky-theme-modern .sky-summary-action-bar-summary-items ::ng-deep sky-key-info{margin:0 30px 10px 0;display:inline-block}.sky-theme-modern .sky-summary-action-bar-summary-items ::ng-deep sky-key-info:last-child{margin:0 0 10px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-summary-action-bar{background-color:#000;box-shadow:none}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-summary-action-bar-actions{background-color:#000}.sky-theme-modern.sky-theme-mode-dark .sky-summary-action-bar{background-color:#000;box-shadow:none}.sky-theme-modern.sky-theme-mode-dark .sky-summary-action-bar-actions{background-color:#000}\n"] }]
|
|
492
|
+
}], ctorParameters: function () { return [{ type: SkySummaryActionBarAdapterService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i2$1.SkyMediaQueryService }, { type: i2$1.MutationObserverService }, { type: i2$1.SkyAppWindowRef }]; }, propDecorators: { summaryELement: [{
|
|
493
|
+
type: ContentChild,
|
|
494
|
+
args: [SkySummaryActionBarSummaryComponent, { read: ElementRef }]
|
|
495
|
+
}] } });
|
|
496
|
+
|
|
497
|
+
class SkySummaryActionBarModule {
|
|
498
|
+
}
|
|
499
|
+
SkySummaryActionBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
500
|
+
SkySummaryActionBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarModule, declarations: [SkySummaryActionBarActionsComponent,
|
|
501
|
+
SkySummaryActionBarCancelComponent,
|
|
502
|
+
SkySummaryActionBarComponent,
|
|
503
|
+
SkySummaryActionBarPrimaryActionComponent,
|
|
504
|
+
SkySummaryActionBarSecondaryActionComponent,
|
|
505
|
+
SkySummaryActionBarSecondaryActionsComponent,
|
|
506
|
+
SkySummaryActionBarSummaryComponent], imports: [CommonModule,
|
|
507
|
+
SkyChevronModule,
|
|
508
|
+
SkyDropdownModule,
|
|
509
|
+
SkyI18nModule,
|
|
510
|
+
SkyIconModule,
|
|
511
|
+
SkyActionBarsResourcesModule,
|
|
512
|
+
SkyThemeModule], exports: [SkySummaryActionBarComponent,
|
|
513
|
+
SkySummaryActionBarActionsComponent,
|
|
514
|
+
SkySummaryActionBarCancelComponent,
|
|
515
|
+
SkySummaryActionBarPrimaryActionComponent,
|
|
516
|
+
SkySummaryActionBarSecondaryActionComponent,
|
|
517
|
+
SkySummaryActionBarSecondaryActionsComponent,
|
|
518
|
+
SkySummaryActionBarSummaryComponent] });
|
|
519
|
+
SkySummaryActionBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarModule, imports: [[
|
|
520
|
+
CommonModule,
|
|
521
|
+
SkyChevronModule,
|
|
522
|
+
SkyDropdownModule,
|
|
523
|
+
SkyI18nModule,
|
|
524
|
+
SkyIconModule,
|
|
525
|
+
SkyActionBarsResourcesModule,
|
|
526
|
+
SkyThemeModule,
|
|
527
|
+
]] });
|
|
528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SkySummaryActionBarModule, decorators: [{
|
|
529
|
+
type: NgModule,
|
|
530
|
+
args: [{
|
|
531
|
+
declarations: [
|
|
532
|
+
SkySummaryActionBarActionsComponent,
|
|
533
|
+
SkySummaryActionBarCancelComponent,
|
|
534
|
+
SkySummaryActionBarComponent,
|
|
535
|
+
SkySummaryActionBarPrimaryActionComponent,
|
|
536
|
+
SkySummaryActionBarSecondaryActionComponent,
|
|
537
|
+
SkySummaryActionBarSecondaryActionsComponent,
|
|
538
|
+
SkySummaryActionBarSummaryComponent,
|
|
539
|
+
],
|
|
540
|
+
imports: [
|
|
541
|
+
CommonModule,
|
|
542
|
+
SkyChevronModule,
|
|
543
|
+
SkyDropdownModule,
|
|
544
|
+
SkyI18nModule,
|
|
545
|
+
SkyIconModule,
|
|
546
|
+
SkyActionBarsResourcesModule,
|
|
547
|
+
SkyThemeModule,
|
|
548
|
+
],
|
|
549
|
+
exports: [
|
|
550
|
+
SkySummaryActionBarComponent,
|
|
551
|
+
SkySummaryActionBarActionsComponent,
|
|
552
|
+
SkySummaryActionBarCancelComponent,
|
|
553
|
+
SkySummaryActionBarPrimaryActionComponent,
|
|
554
|
+
SkySummaryActionBarSecondaryActionComponent,
|
|
555
|
+
SkySummaryActionBarSecondaryActionsComponent,
|
|
556
|
+
SkySummaryActionBarSummaryComponent,
|
|
557
|
+
],
|
|
558
|
+
}]
|
|
559
|
+
}] });
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Generated bundle index. Do not edit.
|
|
563
|
+
*/
|
|
564
|
+
|
|
565
|
+
export { SkySummaryActionBarModule, SkySummaryActionBarSummaryComponent as λ1, SkySummaryActionBarComponent as λ2, SkySummaryActionBarActionsComponent as λ3, SkySummaryActionBarCancelComponent as λ4, SkySummaryActionBarPrimaryActionComponent as λ5, SkySummaryActionBarSecondaryActionComponent as λ6, SkySummaryActionBarSecondaryActionsComponent as λ7 };
|
|
566
|
+
//# sourceMappingURL=skyux-action-bars.mjs.map
|