@skyux/flyout 5.9.4 → 6.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/documentation.json +141 -141
  2. package/esm2020/index.mjs +14 -0
  3. package/esm2020/lib/modules/flyout/flyout-adapter.service.mjs +64 -0
  4. package/esm2020/lib/modules/flyout/flyout-instance.mjs +109 -0
  5. package/esm2020/lib/modules/flyout/flyout-iterator.component.mjs +55 -0
  6. package/esm2020/lib/modules/flyout/flyout-media-query.service.mjs +72 -0
  7. package/esm2020/lib/modules/flyout/flyout.component.mjs +486 -0
  8. package/esm2020/lib/modules/flyout/flyout.module.mjs +55 -0
  9. package/esm2020/lib/modules/flyout/flyout.service.mjs +173 -0
  10. package/esm2020/lib/modules/flyout/types/flyout-action.mjs +2 -0
  11. package/esm2020/lib/modules/flyout/types/flyout-before-close-handler.mjs +9 -0
  12. package/esm2020/lib/modules/flyout/types/flyout-close-args.mjs +2 -0
  13. package/esm2020/lib/modules/flyout/types/flyout-config.mjs +2 -0
  14. package/esm2020/lib/modules/flyout/types/flyout-message-type.mjs +13 -0
  15. package/esm2020/lib/modules/flyout/types/flyout-message.mjs +2 -0
  16. package/esm2020/lib/modules/flyout/types/flyout-permalink.mjs +2 -0
  17. package/esm2020/lib/modules/shared/sky-flyout-resources.module.mjs +54 -0
  18. package/esm2020/skyux-flyout.mjs +5 -0
  19. package/fesm2015/skyux-flyout.mjs +1056 -0
  20. package/fesm2015/skyux-flyout.mjs.map +1 -0
  21. package/{fesm2015/skyux-flyout.js → fesm2020/skyux-flyout.mjs} +36 -59
  22. package/fesm2020/skyux-flyout.mjs.map +1 -0
  23. package/lib/modules/flyout/flyout.component.d.ts +0 -2
  24. package/lib/modules/flyout/flyout.service.d.ts +2 -2
  25. package/package.json +33 -17
  26. package/bundles/skyux-flyout.umd.js +0 -1179
  27. package/esm2015/index.js +0 -14
  28. package/esm2015/index.js.map +0 -1
  29. package/esm2015/lib/modules/flyout/flyout-adapter.service.js +0 -64
  30. package/esm2015/lib/modules/flyout/flyout-adapter.service.js.map +0 -1
  31. package/esm2015/lib/modules/flyout/flyout-instance.js +0 -109
  32. package/esm2015/lib/modules/flyout/flyout-instance.js.map +0 -1
  33. package/esm2015/lib/modules/flyout/flyout-iterator.component.js +0 -59
  34. package/esm2015/lib/modules/flyout/flyout-iterator.component.js.map +0 -1
  35. package/esm2015/lib/modules/flyout/flyout-media-query.service.js +0 -72
  36. package/esm2015/lib/modules/flyout/flyout-media-query.service.js.map +0 -1
  37. package/esm2015/lib/modules/flyout/flyout.component.js +0 -508
  38. package/esm2015/lib/modules/flyout/flyout.component.js.map +0 -1
  39. package/esm2015/lib/modules/flyout/flyout.module.js +0 -56
  40. package/esm2015/lib/modules/flyout/flyout.module.js.map +0 -1
  41. package/esm2015/lib/modules/flyout/flyout.service.js +0 -169
  42. package/esm2015/lib/modules/flyout/flyout.service.js.map +0 -1
  43. package/esm2015/lib/modules/flyout/types/flyout-action.js +0 -2
  44. package/esm2015/lib/modules/flyout/types/flyout-action.js.map +0 -1
  45. package/esm2015/lib/modules/flyout/types/flyout-before-close-handler.js +0 -9
  46. package/esm2015/lib/modules/flyout/types/flyout-before-close-handler.js.map +0 -1
  47. package/esm2015/lib/modules/flyout/types/flyout-close-args.js +0 -2
  48. package/esm2015/lib/modules/flyout/types/flyout-close-args.js.map +0 -1
  49. package/esm2015/lib/modules/flyout/types/flyout-config.js +0 -2
  50. package/esm2015/lib/modules/flyout/types/flyout-config.js.map +0 -1
  51. package/esm2015/lib/modules/flyout/types/flyout-message-type.js +0 -13
  52. package/esm2015/lib/modules/flyout/types/flyout-message-type.js.map +0 -1
  53. package/esm2015/lib/modules/flyout/types/flyout-message.js +0 -2
  54. package/esm2015/lib/modules/flyout/types/flyout-message.js.map +0 -1
  55. package/esm2015/lib/modules/flyout/types/flyout-permalink.js +0 -2
  56. package/esm2015/lib/modules/flyout/types/flyout-permalink.js.map +0 -1
  57. package/esm2015/lib/modules/shared/sky-flyout-resources.module.js +0 -54
  58. package/esm2015/lib/modules/shared/sky-flyout-resources.module.js.map +0 -1
  59. package/esm2015/skyux-flyout.js +0 -5
  60. package/esm2015/skyux-flyout.js.map +0 -1
  61. package/fesm2015/skyux-flyout.js.map +0 -1
package/esm2015/index.js DELETED
@@ -1,14 +0,0 @@
1
- export * from './lib/modules/flyout/flyout-instance';
2
- export * from './lib/modules/flyout/flyout.module';
3
- export * from './lib/modules/flyout/flyout.service';
4
- export * from './lib/modules/flyout/types/flyout-action';
5
- export * from './lib/modules/flyout/types/flyout-before-close-handler';
6
- export * from './lib/modules/flyout/types/flyout-close-args';
7
- export * from './lib/modules/flyout/types/flyout-config';
8
- export * from './lib/modules/flyout/types/flyout-message';
9
- export * from './lib/modules/flyout/types/flyout-message-type';
10
- export * from './lib/modules/flyout/types/flyout-permalink';
11
- // Components and directives must be exported to support Angular’s “partial” Ivy compiler.
12
- // Obscure names are used to indicate types are not part of the public API.
13
- export { SkyFlyoutComponent as λ1 } from './lib/modules/flyout/flyout.component';
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/flyout/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wDAAwD,CAAC;AACvE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAE5D,0FAA0F;AAC1F,2EAA2E;AAC3E,OAAO,EAAE,kBAAkB,IAAI,EAAE,EAAE,MAAM,uCAAuC,CAAC","sourcesContent":["export * from './lib/modules/flyout/flyout-instance';\nexport * from './lib/modules/flyout/flyout.module';\nexport * from './lib/modules/flyout/flyout.service';\nexport * from './lib/modules/flyout/types/flyout-action';\nexport * from './lib/modules/flyout/types/flyout-before-close-handler';\nexport * from './lib/modules/flyout/types/flyout-close-args';\nexport * from './lib/modules/flyout/types/flyout-config';\nexport * from './lib/modules/flyout/types/flyout-message';\nexport * from './lib/modules/flyout/types/flyout-message-type';\nexport * from './lib/modules/flyout/types/flyout-permalink';\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 the public API.\nexport { SkyFlyoutComponent as λ1 } from './lib/modules/flyout/flyout.component';\n"]}
@@ -1,64 +0,0 @@
1
- import { Injectable, RendererFactory2, } from '@angular/core';
2
- import { SkyAppWindowRef, SkyMediaBreakpoints } from '@skyux/core';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@skyux/core";
5
- /**
6
- * @internal
7
- */
8
- export class SkyFlyoutAdapterService {
9
- constructor(rendererFactory, windowRef) {
10
- this.rendererFactory = rendererFactory;
11
- this.windowRef = windowRef;
12
- this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
13
- }
14
- adjustHeaderForHelp(header) {
15
- const windowObj = this.windowRef.nativeWindow;
16
- const helpWidget = windowObj.document.getElementById('bb-help-invoker');
17
- if (helpWidget) {
18
- this.renderer.addClass(header.nativeElement, 'sky-flyout-help-shim');
19
- }
20
- }
21
- setResponsiveClass(element, breakpoint) {
22
- const nativeEl = element.nativeElement;
23
- this.renderer.removeClass(nativeEl, 'sky-responsive-container-xs');
24
- this.renderer.removeClass(nativeEl, 'sky-responsive-container-sm');
25
- this.renderer.removeClass(nativeEl, 'sky-responsive-container-md');
26
- this.renderer.removeClass(nativeEl, 'sky-responsive-container-lg');
27
- let newClass;
28
- switch (breakpoint) {
29
- case SkyMediaBreakpoints.xs: {
30
- newClass = 'sky-responsive-container-xs';
31
- break;
32
- }
33
- case SkyMediaBreakpoints.sm: {
34
- newClass = 'sky-responsive-container-sm';
35
- break;
36
- }
37
- case SkyMediaBreakpoints.md: {
38
- newClass = 'sky-responsive-container-md';
39
- break;
40
- }
41
- default: {
42
- newClass = 'sky-responsive-container-lg';
43
- break;
44
- }
45
- }
46
- this.renderer.addClass(nativeEl, newClass);
47
- }
48
- toggleIframePointerEvents(enable) {
49
- // When iframes are present on the page, they may interfere with dragging
50
- // temporarily disable pointer events in iframes when dragging starts.
51
- // When re-enabling we set to the empty string as it will remove the element styling
52
- // and fall back to any css originally given to iframe
53
- const iframes = document.querySelectorAll('iframe');
54
- for (let i = 0; i < iframes.length; i++) {
55
- iframes[i].style.pointerEvents = enable ? '' : 'none';
56
- }
57
- }
58
- }
59
- SkyFlyoutAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutAdapterService, deps: [{ token: i0.RendererFactory2 }, { token: i1.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
60
- SkyFlyoutAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutAdapterService });
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutAdapterService, decorators: [{
62
- type: Injectable
63
- }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: i1.SkyAppWindowRef }]; } });
64
- //# sourceMappingURL=flyout-adapter.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flyout-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/flyout/src/lib/modules/flyout/flyout-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEV,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;;;AAEnE;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IAGlC,YACU,eAAiC,EACjC,SAA0B;QAD1B,oBAAe,GAAf,eAAe,CAAkB;QACjC,cAAS,G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;gBACzC,MAAM;aACP;SACF;QAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAEM,yBAAyB,CAAC,MAAe;QAC9C,yEAAyE;QACzE,sEAAsE;QACtE,oFAAoF;QACpF,sDAAsD;QACtD,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;SACvD;IACH,CAAC;;qHA/DU,uBAAuB;yHAAvB,uBAAuB;4FAAvB,uBAAuB;kBADnC,UAAU","sourcesContent":["import {\n ElementRef,\n Injectable,\n Renderer2,\n RendererFactory2,\n} from '@angular/core';\nimport { SkyAppWindowRef, SkyMediaBreakpoints } from '@skyux/core';\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyFlyoutAdapterService {\n private renderer: Renderer2;\n\n constructor(\n private rendererFactory: RendererFactory2,\n private windowRef: SkyAppWindowRef\n ) {\n this.renderer = this.rendererFactory.createRenderer(undefined, undefined);\n }\n\n public adjustHeaderForHelp(header: ElementRef): void {\n const windowObj = this.windowRef.nativeWindow;\n const helpWidget = windowObj.document.getElementById('bb-help-invoker');\n\n if (helpWidget) {\n this.renderer.addClass(header.nativeElement, 'sky-flyout-help-shim');\n }\n }\n\n public setResponsiveClass(\n element: ElementRef,\n breakpoint: SkyMediaBreakpoints\n ): void {\n const nativeEl: HTMLElement = element.nativeElement;\n\n this.renderer.removeClass(nativeEl, 'sky-responsive-container-xs');\n this.renderer.removeClass(nativeEl, 'sky-responsive-container-sm');\n this.renderer.removeClass(nativeEl, 'sky-responsive-container-md');\n this.renderer.removeClass(nativeEl, 'sky-responsive-container-lg');\n\n let newClass: string;\n\n switch (breakpoint) {\n case SkyMediaBreakpoints.xs: {\n newClass = 'sky-responsive-container-xs';\n break;\n }\n case SkyMediaBreakpoints.sm: {\n newClass = 'sky-responsive-container-sm';\n break;\n }\n case SkyMediaBreakpoints.md: {\n newClass = 'sky-responsive-container-md';\n break;\n }\n default: {\n newClass = 'sky-responsive-container-lg';\n break;\n }\n }\n\n this.renderer.addClass(nativeEl, newClass);\n }\n\n public toggleIframePointerEvents(enable: boolean): void {\n // When iframes are present on the page, they may interfere with dragging\n // temporarily disable pointer events in iframes when dragging starts.\n // When re-enabling we set to the empty string as it will remove the element styling\n // and fall back to any css originally given to iframe\n const iframes = document.querySelectorAll('iframe');\n for (let i = 0; i < iframes.length; i++) {\n iframes[i].style.pointerEvents = enable ? '' : 'none';\n }\n }\n}\n"]}
@@ -1,109 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import { SkyFlyoutMessageType } from './types/flyout-message-type';
4
- /**
5
- * Represents a single displayed flyout.
6
- */
7
- export class SkyFlyoutInstance {
8
- constructor() {
9
- /**
10
- * An event that the flyout instance emits when it closes.
11
- */
12
- this.closed = new EventEmitter();
13
- /**
14
- * A `boolean` value that returns `true` if the flyout is open.
15
- * @default true
16
- */
17
- this.isOpen = true;
18
- this._beforeClose = new Subject();
19
- this._iteratorNextButtonClick = new EventEmitter();
20
- this._iteratorPreviousButtonClick = new EventEmitter();
21
- this._iteratorNextButtonDisabled = false;
22
- this._iteratorPreviousButtonDisabled = false;
23
- this._hostController = new Subject();
24
- this.closed.subscribe(() => {
25
- this.isOpen = false;
26
- });
27
- }
28
- /**
29
- * An event that the modal instance emits when it is about to close.
30
- * If a subscription exists for this event,
31
- * the modal does not close until the subscriber calls the handler's `closeModal` method.
32
- */
33
- get beforeClose() {
34
- return this._beforeClose;
35
- }
36
- /**
37
- * Used to communicate with the host component.
38
- * @internal
39
- */
40
- get hostController() {
41
- return this._hostController;
42
- }
43
- /**
44
- * An event that the flyout instance emits when users click the next iterator button.
45
- */
46
- get iteratorNextButtonClick() {
47
- return this._iteratorNextButtonClick;
48
- }
49
- /**
50
- * An event that the flyout instance emits when users click the previous iterator button.
51
- */
52
- get iteratorPreviousButtonClick() {
53
- return this._iteratorPreviousButtonClick;
54
- }
55
- /**
56
- * Disables the next iterator button.
57
- * @default false
58
- */
59
- set iteratorNextButtonDisabled(newValue) {
60
- this._iteratorNextButtonDisabled = newValue;
61
- if (newValue) {
62
- this.hostController.next({
63
- type: SkyFlyoutMessageType.DisableIteratorNextButton,
64
- });
65
- }
66
- else {
67
- this.hostController.next({
68
- type: SkyFlyoutMessageType.EnableIteratorNextButton,
69
- });
70
- }
71
- }
72
- get iteratorNextButtonDisabled() {
73
- return this._iteratorNextButtonDisabled;
74
- }
75
- /**
76
- * Disables the previous iterator button.
77
- * @default false
78
- */
79
- set iteratorPreviousButtonDisabled(newValue) {
80
- this._iteratorPreviousButtonDisabled = newValue;
81
- if (newValue) {
82
- this.hostController.next({
83
- type: SkyFlyoutMessageType.DisableIteratorPreviousButton,
84
- });
85
- }
86
- else {
87
- this.hostController.next({
88
- type: SkyFlyoutMessageType.EnableIteratorPreviousButton,
89
- });
90
- }
91
- }
92
- get iteratorPreviousButtonDisabled() {
93
- return this._iteratorPreviousButtonDisabled;
94
- }
95
- /**
96
- * Closes the flyout instance and emits its `closed` event.
97
- * @param args Arguments used when closing the flyout.
98
- */
99
- close(args) {
100
- this.hostController.next({
101
- type: SkyFlyoutMessageType.Close,
102
- data: { ignoreBeforeClose: args ? args.ignoreBeforeClose : false },
103
- });
104
- this._iteratorPreviousButtonClick.complete();
105
- this._iteratorNextButtonClick.complete();
106
- this.hostController.complete();
107
- }
108
- }
109
- //# sourceMappingURL=flyout-instance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flyout-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/flyout/src/lib/modules/flyout/flyout-instance.ts"],"names":[],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,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,oBAAoB,CAAC,wBAAwB;aACpD,CAAC,CAAC;SACJ;IACH,CAAC;IAED,IAAW,0BAA0B;QACnC,OAAO,IAAI,CAAC,2BAA2B,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,8BAA8B,CAAC,QAAiB;QACzD,IAAI,CAAC,+BAA+B,GAAG,QAAQ,CAAC;QAChD,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,oBAAoB,CAAC,6BAA6B;aACzD,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,oBAAoB,CAAC,4BAA4B;aACxD,CAAC,CAAC;SACJ;IACH,CAAC;IAED,IAAW,8BAA8B;QACvC,OAAO,IAAI,CAAC,+BAA+B,CAAC;IAC9C,CAAC;IAoBD;;;OAGG;IACI,KAAK,CAAC,IAAyB;QACpC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,oBAAoB,CAAC,KAAK;YAChC,IAAI,EAAE,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,EAAE;SACnE,CAAC,CAAC;QAEH,IAAI,CAAC,4BAA4B,CAAC,QAAQ,EAAE,CAAC;QAC7C,IAAI,CAAC,wBAAwB,CAAC,QAAQ,EAAE,CAAC;QAEzC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;CACF","sourcesContent":["import { EventEmitter } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { SkyFlyoutBeforeCloseHandler } from './types/flyout-before-close-handler';\nimport { SkyFlyoutCloseArgs } from './types/flyout-close-args';\nimport { SkyFlyoutMessage } from './types/flyout-message';\nimport { SkyFlyoutMessageType } from './types/flyout-message-type';\n\n/**\n * Represents a single displayed flyout.\n */\nexport class SkyFlyoutInstance<T> {\n /**\n * An event that the modal instance emits when it is about to close.\n * If a subscription exists for this event,\n * the modal does not close until the subscriber calls the handler's `closeModal` method.\n */\n public get beforeClose(): Observable<SkyFlyoutBeforeCloseHandler> {\n return this._beforeClose;\n }\n\n /**\n * An event that the flyout instance emits when it closes.\n */\n public closed = new EventEmitter<void>();\n\n /**\n * Specifies the instance of the component to display in the flyout.\n */\n public componentInstance: T;\n\n /**\n * Used to communicate with the host component.\n * @internal\n */\n public get hostController(): Subject<SkyFlyoutMessage> {\n return this._hostController;\n }\n\n /**\n * A `boolean` value that returns `true` if the flyout is open.\n * @default true\n */\n public isOpen = true;\n\n /**\n * An event that the flyout instance emits when users click the next iterator button.\n */\n public get iteratorNextButtonClick(): EventEmitter<void> {\n return this._iteratorNextButtonClick;\n }\n\n /**\n * An event that the flyout instance emits when users click the previous iterator button.\n */\n public get iteratorPreviousButtonClick(): EventEmitter<void> {\n return this._iteratorPreviousButtonClick;\n }\n\n /**\n * Disables the next iterator button.\n * @default false\n */\n public set iteratorNextButtonDisabled(newValue: boolean) {\n this._iteratorNextButtonDisabled = newValue;\n if (newValue) {\n this.hostController.next({\n type: SkyFlyoutMessageType.DisableIteratorNextButton,\n });\n } else {\n this.hostController.next({\n type: SkyFlyoutMessageType.EnableIteratorNextButton,\n });\n }\n }\n\n public get iteratorNextButtonDisabled(): boolean {\n return this._iteratorNextButtonDisabled;\n }\n\n /**\n * Disables the previous iterator button.\n * @default false\n */\n public set iteratorPreviousButtonDisabled(newValue: boolean) {\n this._iteratorPreviousButtonDisabled = newValue;\n if (newValue) {\n this.hostController.next({\n type: SkyFlyoutMessageType.DisableIteratorPreviousButton,\n });\n } else {\n this.hostController.next({\n type: SkyFlyoutMessageType.EnableIteratorPreviousButton,\n });\n }\n }\n\n public get iteratorPreviousButtonDisabled(): boolean {\n return this._iteratorPreviousButtonDisabled;\n }\n\n private _beforeClose = new Subject<SkyFlyoutBeforeCloseHandler>();\n\n private _iteratorNextButtonClick = new EventEmitter<void>();\n\n private _iteratorPreviousButtonClick = new EventEmitter<void>();\n\n private _iteratorNextButtonDisabled = false;\n\n private _iteratorPreviousButtonDisabled = false;\n\n private _hostController = new Subject<SkyFlyoutMessage>();\n\n constructor() {\n this.closed.subscribe(() => {\n this.isOpen = false;\n });\n }\n\n /**\n * Closes the flyout instance and emits its `closed` event.\n * @param args Arguments used when closing the flyout.\n */\n public close(args?: SkyFlyoutCloseArgs): void {\n this.hostController.next({\n type: SkyFlyoutMessageType.Close,\n data: { ignoreBeforeClose: args ? args.ignoreBeforeClose : false },\n });\n\n this._iteratorPreviousButtonClick.complete();\n this._iteratorNextButtonClick.complete();\n\n this.hostController.complete();\n }\n}\n"]}
@@ -1,59 +0,0 @@
1
- import { Component, EventEmitter, Input, Output, } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@skyux/indicators";
5
- import * as i2 from "@skyux/theme";
6
- import * as i3 from "@skyux/i18n";
7
- /**
8
- * @internal
9
- */
10
- export class SkyFlyoutIteratorComponent {
11
- constructor() {
12
- this.ngUnsubscribe = new Subject();
13
- this._nextButtonClick = new EventEmitter();
14
- this._previousButtonClick = new EventEmitter();
15
- }
16
- get previousButtonClick() {
17
- return this._previousButtonClick;
18
- }
19
- get nextButtonClick() {
20
- return this._nextButtonClick;
21
- }
22
- ngOnDestroy() {
23
- this.ngUnsubscribe.next();
24
- this.ngUnsubscribe.complete();
25
- this._previousButtonClick.complete();
26
- this._nextButtonClick.complete();
27
- }
28
- onIteratorPreviousClick() {
29
- /* istanbul ignore else */
30
- if (!this.previousButtonDisabled) {
31
- this._previousButtonClick.emit();
32
- }
33
- }
34
- onIteratorNextClick() {
35
- /* istanbul ignore else */
36
- if (!this.nextButtonDisabled) {
37
- this._nextButtonClick.emit();
38
- }
39
- }
40
- }
41
- SkyFlyoutIteratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutIteratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
42
- SkyFlyoutIteratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyFlyoutIteratorComponent, selector: "sky-flyout-iterator", inputs: { nextButtonDisabled: "nextButtonDisabled", previousButtonDisabled: "previousButtonDisabled" }, outputs: { previousButtonClick: "previousButtonClick", nextButtonClick: "nextButtonClick" }, ngImport: i0, template: "<div id=\"iterators\" class=\"sky-flyout-iterators\">\n <button\n class=\"sky-btn\"\n [attr.aria-label]=\"\n 'skyux_flyout_iterator_previous_button' | skyLibResources\n \"\n [disabled]=\"previousButtonDisabled\"\n [skyThemeClass]=\"{\n 'sky-btn-default sky-margin-inline-compact': 'default',\n 'sky-btn-icon-borderless sky-margin-inline-sm': 'modern'\n }\"\n (click)=\"onIteratorPreviousClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-up\"> </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"chevron-up\"\n iconType=\"skyux\"\n size=\"lg\"\n >\n </sky-icon>\n </button>\n <button\n class=\"sky-btn\"\n [attr.aria-label]=\"'skyux_flyout_iterator_next_button' | skyLibResources\"\n [disabled]=\"nextButtonDisabled\"\n [skyThemeClass]=\"{\n 'sky-btn-default sky-margin-inline-compact': 'default',\n 'sky-btn-icon-borderless sky-margin-inline-sm': 'modern'\n }\"\n (click)=\"onIteratorNextClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-down\"> </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"chevron-down\"\n iconType=\"skyux\"\n size=\"lg\"\n >\n </sky-icon>\n </button>\n</div>\n", styles: [":host-context(.sky-theme-modern) .sky-flyout-iterators{display:inline}.sky-theme-modern .sky-flyout-iterators{display:inline}\n"], components: [{ type: i1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i2.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i2.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], pipes: { "skyLibResources": i3.SkyLibResourcesPipe } });
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutIteratorComponent, decorators: [{
44
- type: Component,
45
- args: [{
46
- selector: 'sky-flyout-iterator',
47
- templateUrl: './flyout-iterator.component.html',
48
- styleUrls: ['./flyout-iterator.component.scss'],
49
- }]
50
- }], propDecorators: { nextButtonDisabled: [{
51
- type: Input
52
- }], previousButtonDisabled: [{
53
- type: Input
54
- }], previousButtonClick: [{
55
- type: Output
56
- }], nextButtonClick: [{
57
- type: Output
58
- }] } });
59
- //# sourceMappingURL=flyout-iterator.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flyout-iterator.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/flyout/src/lib/modules/flyout/flyout-iterator.component.ts","../../../../../../../../libs/components/flyout/src/lib/modules/flyout/flyout-iterator.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;;;;AAE/B;;GAEG;AAMH,MAAM,OAAO,0BAA0B;IALvC;QAsBU,kBAAa,GAAG,IAAI,OAAO,EAAE,CAAC;QAE9B,qBAAgB,GAAG,IAAI,YAAY,EAAQ,CAAC;QAE5C,yBAAoB,GAAG,IAAI,YAAY,EAAQ,CAAC;KAsBzD;IApCC,IACW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IAED,IACW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAQM,WAAW;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;QACrC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;IACnC,CAAC;IAEM,uBAAuB;QAC5B,0BAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;SAClC;IACH,CAAC;IAEM,mBAAmB;QACxB,0BAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC5B,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;SAC9B;IACH,CAAC;;wHA1CU,0BAA0B;4GAA1B,0BAA0B,gQClBvC,yvCA0CA;4FDxBa,0BAA0B;kBALtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,qBAAqB;oBAC/B,WAAW,EAAE,kCAAkC;oBAC/C,SAAS,EAAE,CAAC,kCAAkC,CAAC;iBAChD;8BAGQ,kBAAkB;sBADxB,KAAK;gBAIC,sBAAsB;sBAD5B,KAAK;gBAIK,mBAAmB;sBAD7B,MAAM;gBAMI,eAAe;sBADzB,MAAM","sourcesContent":["import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n} from '@angular/core';\n\nimport { Subject } from 'rxjs';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-flyout-iterator',\n templateUrl: './flyout-iterator.component.html',\n styleUrls: ['./flyout-iterator.component.scss'],\n})\nexport class SkyFlyoutIteratorComponent implements OnDestroy {\n @Input()\n public nextButtonDisabled: boolean;\n\n @Input()\n public previousButtonDisabled: boolean;\n\n @Output()\n public get previousButtonClick(): EventEmitter<void> {\n return this._previousButtonClick;\n }\n\n @Output()\n public get nextButtonClick(): EventEmitter<void> {\n return this._nextButtonClick;\n }\n\n private ngUnsubscribe = new Subject();\n\n private _nextButtonClick = new EventEmitter<void>();\n\n private _previousButtonClick = new EventEmitter<void>();\n\n public ngOnDestroy(): void {\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n this._previousButtonClick.complete();\n this._nextButtonClick.complete();\n }\n\n public onIteratorPreviousClick(): void {\n /* istanbul ignore else */\n if (!this.previousButtonDisabled) {\n this._previousButtonClick.emit();\n }\n }\n\n public onIteratorNextClick(): void {\n /* istanbul ignore else */\n if (!this.nextButtonDisabled) {\n this._nextButtonClick.emit();\n }\n }\n}\n","<div id=\"iterators\" class=\"sky-flyout-iterators\">\n <button\n class=\"sky-btn\"\n [attr.aria-label]=\"\n 'skyux_flyout_iterator_previous_button' | skyLibResources\n \"\n [disabled]=\"previousButtonDisabled\"\n [skyThemeClass]=\"{\n 'sky-btn-default sky-margin-inline-compact': 'default',\n 'sky-btn-icon-borderless sky-margin-inline-sm': 'modern'\n }\"\n (click)=\"onIteratorPreviousClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-up\"> </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"chevron-up\"\n iconType=\"skyux\"\n size=\"lg\"\n >\n </sky-icon>\n </button>\n <button\n class=\"sky-btn\"\n [attr.aria-label]=\"'skyux_flyout_iterator_next_button' | skyLibResources\"\n [disabled]=\"nextButtonDisabled\"\n [skyThemeClass]=\"{\n 'sky-btn-default sky-margin-inline-compact': 'default',\n 'sky-btn-icon-borderless sky-margin-inline-sm': 'modern'\n }\"\n (click)=\"onIteratorNextClick()\"\n >\n <sky-icon *skyThemeIf=\"'default'\" icon=\"chevron-down\"> </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"chevron-down\"\n iconType=\"skyux\"\n size=\"lg\"\n >\n </sky-icon>\n </button>\n</div>\n"]}
@@ -1,72 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { SkyMediaBreakpoints } from '@skyux/core';
3
- import { BehaviorSubject } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * @internal
7
- */
8
- export class SkyFlyoutMediaQueryService {
9
- constructor() {
10
- this.currentSubject = new BehaviorSubject(this.current);
11
- this._current = SkyMediaBreakpoints.xs;
12
- this.currentSubject.next(this._current);
13
- }
14
- get current() {
15
- return this._current;
16
- }
17
- subscribe(listener) {
18
- return this.currentSubject.subscribe({
19
- next: (breakpoints) => {
20
- listener(breakpoints);
21
- },
22
- });
23
- }
24
- setBreakpointForWidth(width) {
25
- let breakpoint;
26
- if (this.isWidthWithinBreakpiont(width, SkyMediaBreakpoints.xs)) {
27
- breakpoint = SkyMediaBreakpoints.xs;
28
- }
29
- else if (this.isWidthWithinBreakpiont(width, SkyMediaBreakpoints.sm)) {
30
- breakpoint = SkyMediaBreakpoints.sm;
31
- }
32
- else if (this.isWidthWithinBreakpiont(width, SkyMediaBreakpoints.md)) {
33
- breakpoint = SkyMediaBreakpoints.md;
34
- }
35
- else {
36
- breakpoint = SkyMediaBreakpoints.lg;
37
- }
38
- this._current = breakpoint;
39
- this.currentSubject.next(this._current);
40
- }
41
- isWidthWithinBreakpiont(width, breakpoint) {
42
- const xsBreakpointMaxPixels = 767;
43
- const smBreakpointMinPixels = 768;
44
- const smBreakpointMaxPixels = 991;
45
- const mdBreakpointMinPixels = 992;
46
- const mdBreakpointMaxPixels = 1199;
47
- const lgBreakpointMinPixels = 1200;
48
- switch (breakpoint) {
49
- case SkyMediaBreakpoints.xs: {
50
- return width <= xsBreakpointMaxPixels;
51
- }
52
- case SkyMediaBreakpoints.sm: {
53
- return width >= smBreakpointMinPixels && width <= smBreakpointMaxPixels;
54
- }
55
- case SkyMediaBreakpoints.md: {
56
- return width >= mdBreakpointMinPixels && width <= mdBreakpointMaxPixels;
57
- }
58
- default: {
59
- return width >= lgBreakpointMinPixels;
60
- }
61
- }
62
- }
63
- destroy() {
64
- this.currentSubject.complete();
65
- }
66
- }
67
- SkyFlyoutMediaQueryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutMediaQueryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
68
- SkyFlyoutMediaQueryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutMediaQueryService });
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyFlyoutMediaQueryService, decorators: [{
70
- type: Injectable
71
- }], ctorParameters: function () { return []; } });
72
- //# sourceMappingURL=flyout-media-query.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flyout-media-query.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/flyout/src/lib/modules/flyout/flyout-media-query.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAyB,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAgB,MAAM,MAAM,CAAC;;AAErD;;GAEG;AAEH,MAAM,OAAO,0BAA0B;IAWrC;QANQ,mBAAc,GAAG,IAAI,eAAe,CAC1C,IAAI,CAAC,OAAO,CACb,CAAC;QAEM,aAAQ,GAAG,mBAAmB,CAAC,EAAE,CAAC;QAGxC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAZD,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAYM,SAAS,CAAC,QAA+B;QAC9C,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC;YACnC,IAAI,EAAE,CAAC,WAAgC,EAAE,EAAE;gBACzC,QAAQ,CAAC,WAAW,CAAC,CAAC;YACxB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAEM,qBAAqB,CAAC,KAAa;QACxC,IAAI,UAA+B,CAAC;QA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gBACP,OAAO,KAAK,IAAI,qBAAqB,CAAC;aACvC;SACF;IACH,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;;wHArEU,0BAA0B;4HAA1B,0BAA0B;4FAA1B,0BAA0B;kBADtC,UAAU","sourcesContent":["import { Injectable } from '@angular/core';\nimport { SkyMediaBreakpoints, SkyMediaQueryListener } from '@skyux/core';\n\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyFlyoutMediaQueryService {\n public get current(): SkyMediaBreakpoints {\n return this._current;\n }\n\n private currentSubject = new BehaviorSubject<SkyMediaBreakpoints>(\n this.current\n );\n\n private _current = SkyMediaBreakpoints.xs;\n\n constructor() {\n this.currentSubject.next(this._current);\n }\n\n public subscribe(listener: SkyMediaQueryListener): Subscription {\n return this.currentSubject.subscribe({\n next: (breakpoints: SkyMediaBreakpoints) => {\n listener(breakpoints);\n },\n });\n }\n\n public setBreakpointForWidth(width: number): void {\n let breakpoint: SkyMediaBreakpoints;\n\n if (this.isWidthWithinBreakpiont(width, SkyMediaBreakpoints.xs)) {\n breakpoint = SkyMediaBreakpoints.xs;\n } else if (this.isWidthWithinBreakpiont(width, SkyMediaBreakpoints.sm)) {\n breakpoint = SkyMediaBreakpoints.sm;\n } else if (this.isWidthWithinBreakpiont(width, SkyMediaBreakpoints.md)) {\n breakpoint = SkyMediaBreakpoints.md;\n } else {\n breakpoint = SkyMediaBreakpoints.lg;\n }\n\n this._current = breakpoint;\n this.currentSubject.next(this._current);\n }\n\n public isWidthWithinBreakpiont(\n width: number,\n breakpoint: SkyMediaBreakpoints\n ): boolean {\n const xsBreakpointMaxPixels = 767;\n const smBreakpointMinPixels = 768;\n const smBreakpointMaxPixels = 991;\n const mdBreakpointMinPixels = 992;\n const mdBreakpointMaxPixels = 1199;\n const lgBreakpointMinPixels = 1200;\n\n switch (breakpoint) {\n case SkyMediaBreakpoints.xs: {\n return width <= xsBreakpointMaxPixels;\n }\n case SkyMediaBreakpoints.sm: {\n return width >= smBreakpointMinPixels && width <= smBreakpointMaxPixels;\n }\n case SkyMediaBreakpoints.md: {\n return width >= mdBreakpointMinPixels && width <= mdBreakpointMaxPixels;\n }\n default: {\n return width >= lgBreakpointMinPixels;\n }\n }\n }\n\n public destroy(): void {\n this.currentSubject.complete();\n }\n}\n"]}