@skyux/flyout 5.1.0 → 5.5.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/README.md +6 -4
- package/documentation.json +47 -12
- package/esm2015/index.js +14 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout-adapter.service.js +64 -0
- package/esm2015/lib/modules/flyout/flyout-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout-instance.js +109 -0
- package/esm2015/lib/modules/flyout/flyout-instance.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout-iterator.component.js +59 -0
- package/esm2015/lib/modules/flyout/flyout-iterator.component.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout-media-query.service.js +72 -0
- package/esm2015/lib/modules/flyout/flyout-media-query.service.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout.component.js +505 -0
- package/esm2015/lib/modules/flyout/flyout.component.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout.module.js +56 -0
- package/esm2015/lib/modules/flyout/flyout.module.js.map +1 -0
- package/esm2015/lib/modules/flyout/flyout.service.js +167 -0
- package/esm2015/lib/modules/flyout/flyout.service.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-action.js +2 -0
- package/esm2015/lib/modules/flyout/types/flyout-action.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-before-close-handler.js +9 -0
- package/esm2015/lib/modules/flyout/types/flyout-before-close-handler.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-close-args.js +2 -0
- package/esm2015/lib/modules/flyout/types/flyout-close-args.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-config.js +2 -0
- package/esm2015/lib/modules/flyout/types/flyout-config.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-message-type.js +13 -0
- package/esm2015/lib/modules/flyout/types/flyout-message-type.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-message.js +2 -0
- package/esm2015/lib/modules/flyout/types/flyout-message.js.map +1 -0
- package/esm2015/lib/modules/flyout/types/flyout-permalink.js +2 -0
- package/esm2015/lib/modules/flyout/types/flyout-permalink.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-flyout-resources.module.js +54 -0
- package/esm2015/lib/modules/shared/sky-flyout-resources.module.js.map +1 -0
- package/esm2015/skyux-flyout.js +2 -2
- package/esm2015/skyux-flyout.js.map +1 -0
- package/fesm2015/skyux-flyout.js.map +1 -1
- package/index.d.ts +11 -0
- package/{modules → lib/modules}/flyout/flyout-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/flyout/flyout-instance.d.ts +0 -0
- package/{modules → lib/modules}/flyout/flyout-iterator.component.d.ts +0 -0
- package/{modules → lib/modules}/flyout/flyout-media-query.service.d.ts +0 -0
- package/{modules → lib/modules}/flyout/flyout.component.d.ts +0 -0
- package/{modules → lib/modules}/flyout/flyout.module.d.ts +0 -0
- package/{modules → lib/modules}/flyout/flyout.service.d.ts +0 -0
- package/{modules → lib/modules}/flyout/types/flyout-action.d.ts +0 -0
- package/{modules → lib/modules}/flyout/types/flyout-before-close-handler.d.ts +0 -0
- package/{modules → lib/modules}/flyout/types/flyout-close-args.d.ts +0 -0
- package/{modules → lib/modules}/flyout/types/flyout-config.d.ts +1 -1
- package/{modules → lib/modules}/flyout/types/flyout-message-type.d.ts +0 -0
- package/{modules → lib/modules}/flyout/types/flyout-message.d.ts +0 -0
- package/{modules → lib/modules}/flyout/types/flyout-permalink.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-flyout-resources.module.d.ts +0 -0
- package/package.json +20 -6
- package/skyux-flyout.d.ts +1 -1
- package/LICENSE +0 -21
- package/esm2015/modules/flyout/flyout-adapter.service.js +0 -64
- package/esm2015/modules/flyout/flyout-instance.js +0 -109
- package/esm2015/modules/flyout/flyout-iterator.component.js +0 -59
- package/esm2015/modules/flyout/flyout-media-query.service.js +0 -72
- package/esm2015/modules/flyout/flyout.component.js +0 -504
- package/esm2015/modules/flyout/flyout.module.js +0 -56
- package/esm2015/modules/flyout/flyout.service.js +0 -166
- package/esm2015/modules/flyout/types/flyout-action.js +0 -2
- package/esm2015/modules/flyout/types/flyout-before-close-handler.js +0 -9
- package/esm2015/modules/flyout/types/flyout-close-args.js +0 -2
- package/esm2015/modules/flyout/types/flyout-config.js +0 -2
- package/esm2015/modules/flyout/types/flyout-message-type.js +0 -13
- package/esm2015/modules/flyout/types/flyout-message.js +0 -2
- package/esm2015/modules/flyout/types/flyout-permalink.js +0 -2
- package/esm2015/modules/shared/sky-flyout-resources.module.js +0 -54
- package/esm2015/public-api.js +0 -14
- package/public-api.d.ts +0 -11
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# flyout
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test flyout` to execute the unit tests.
|
package/documentation.json
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"flags": {},
|
|
57
57
|
"type": {
|
|
58
58
|
"type": "reference",
|
|
59
|
+
"qualifiedName": "Function",
|
|
60
|
+
"package": "typescript",
|
|
59
61
|
"name": "Function"
|
|
60
62
|
}
|
|
61
63
|
}
|
|
@@ -89,6 +91,8 @@
|
|
|
89
91
|
],
|
|
90
92
|
"type": {
|
|
91
93
|
"type": "reference",
|
|
94
|
+
"qualifiedName": "Function",
|
|
95
|
+
"package": "typescript",
|
|
92
96
|
"name": "Function"
|
|
93
97
|
}
|
|
94
98
|
}
|
|
@@ -197,6 +201,8 @@
|
|
|
197
201
|
"name": "void"
|
|
198
202
|
}
|
|
199
203
|
],
|
|
204
|
+
"qualifiedName": "EventEmitter",
|
|
205
|
+
"package": "@angular/core",
|
|
200
206
|
"name": "EventEmitter"
|
|
201
207
|
},
|
|
202
208
|
"defaultValue": "..."
|
|
@@ -289,6 +295,8 @@
|
|
|
289
295
|
"name": "SkyFlyoutBeforeCloseHandler"
|
|
290
296
|
}
|
|
291
297
|
],
|
|
298
|
+
"qualifiedName": "Observable",
|
|
299
|
+
"package": "rxjs",
|
|
292
300
|
"name": "Observable"
|
|
293
301
|
}
|
|
294
302
|
}
|
|
@@ -327,6 +335,8 @@
|
|
|
327
335
|
"name": "void"
|
|
328
336
|
}
|
|
329
337
|
],
|
|
338
|
+
"qualifiedName": "EventEmitter",
|
|
339
|
+
"package": "@angular/core",
|
|
330
340
|
"name": "EventEmitter"
|
|
331
341
|
}
|
|
332
342
|
}
|
|
@@ -355,7 +365,13 @@
|
|
|
355
365
|
"kindString": "Get signature",
|
|
356
366
|
"flags": {},
|
|
357
367
|
"comment": {
|
|
358
|
-
"shortText": "Disables the next iterator button."
|
|
368
|
+
"shortText": "Disables the next iterator button.",
|
|
369
|
+
"tags": [
|
|
370
|
+
{
|
|
371
|
+
"tag": "default",
|
|
372
|
+
"text": "false\n"
|
|
373
|
+
}
|
|
374
|
+
]
|
|
359
375
|
},
|
|
360
376
|
"type": {
|
|
361
377
|
"type": "intrinsic",
|
|
@@ -432,6 +448,8 @@
|
|
|
432
448
|
"name": "void"
|
|
433
449
|
}
|
|
434
450
|
],
|
|
451
|
+
"qualifiedName": "EventEmitter",
|
|
452
|
+
"package": "@angular/core",
|
|
435
453
|
"name": "EventEmitter"
|
|
436
454
|
}
|
|
437
455
|
}
|
|
@@ -460,7 +478,13 @@
|
|
|
460
478
|
"kindString": "Get signature",
|
|
461
479
|
"flags": {},
|
|
462
480
|
"comment": {
|
|
463
|
-
"shortText": "Disables the previous iterator button."
|
|
481
|
+
"shortText": "Disables the previous iterator button.",
|
|
482
|
+
"tags": [
|
|
483
|
+
{
|
|
484
|
+
"tag": "default",
|
|
485
|
+
"text": "false\n"
|
|
486
|
+
}
|
|
487
|
+
]
|
|
464
488
|
},
|
|
465
489
|
"type": {
|
|
466
490
|
"type": "intrinsic",
|
|
@@ -620,6 +644,8 @@
|
|
|
620
644
|
"name": "NgModule",
|
|
621
645
|
"type": {
|
|
622
646
|
"type": "reference",
|
|
647
|
+
"qualifiedName": "NgModuleDecorator",
|
|
648
|
+
"package": "@angular/core",
|
|
623
649
|
"name": "NgModule"
|
|
624
650
|
},
|
|
625
651
|
"arguments": {
|
|
@@ -681,6 +707,8 @@
|
|
|
681
707
|
"name": "Injectable",
|
|
682
708
|
"type": {
|
|
683
709
|
"type": "reference",
|
|
710
|
+
"qualifiedName": "InjectableDecorator",
|
|
711
|
+
"package": "@angular/core",
|
|
684
712
|
"name": "Injectable"
|
|
685
713
|
},
|
|
686
714
|
"arguments": {
|
|
@@ -751,6 +779,8 @@
|
|
|
751
779
|
"flags": {},
|
|
752
780
|
"type": {
|
|
753
781
|
"type": "reference",
|
|
782
|
+
"qualifiedName": "Router",
|
|
783
|
+
"package": "@angular/router",
|
|
754
784
|
"name": "Router"
|
|
755
785
|
}
|
|
756
786
|
},
|
|
@@ -762,6 +792,8 @@
|
|
|
762
792
|
"flags": {},
|
|
763
793
|
"type": {
|
|
764
794
|
"type": "reference",
|
|
795
|
+
"qualifiedName": "NgZone",
|
|
796
|
+
"package": "@angular/core",
|
|
765
797
|
"name": "NgZone"
|
|
766
798
|
}
|
|
767
799
|
},
|
|
@@ -773,6 +805,8 @@
|
|
|
773
805
|
"flags": {},
|
|
774
806
|
"type": {
|
|
775
807
|
"type": "reference",
|
|
808
|
+
"qualifiedName": "ApplicationRef",
|
|
809
|
+
"package": "@angular/core",
|
|
776
810
|
"name": "ApplicationRef"
|
|
777
811
|
}
|
|
778
812
|
}
|
|
@@ -926,6 +960,8 @@
|
|
|
926
960
|
"name": "T"
|
|
927
961
|
}
|
|
928
962
|
],
|
|
963
|
+
"qualifiedName": "Type",
|
|
964
|
+
"package": "@angular/core",
|
|
929
965
|
"name": "Type"
|
|
930
966
|
}
|
|
931
967
|
},
|
|
@@ -991,6 +1027,8 @@
|
|
|
991
1027
|
"implementedTypes": [
|
|
992
1028
|
{
|
|
993
1029
|
"type": "reference",
|
|
1030
|
+
"qualifiedName": "OnDestroy",
|
|
1031
|
+
"package": "@angular/core",
|
|
994
1032
|
"name": "OnDestroy"
|
|
995
1033
|
}
|
|
996
1034
|
]
|
|
@@ -1491,7 +1529,7 @@
|
|
|
1491
1529
|
"isOptional": true
|
|
1492
1530
|
},
|
|
1493
1531
|
"comment": {
|
|
1494
|
-
"shortText": "Specifies a unique key for the UI Config Service to retrieve stored settings from a database.\nThe UI Config Service saves configuration settings for users to preserve the width of\nthe flyout. For more information about the UI Config Service,\nsee [the sticky settings documentation](https://developer.blackbaud.com/skyux/learn/get-started/
|
|
1532
|
+
"shortText": "Specifies a unique key for the UI Config Service to retrieve stored settings from a database.\nThe UI Config Service saves configuration settings for users to preserve the width of\nthe flyout. For more information about the UI Config Service,\nsee [the sticky settings documentation](https://developer.blackbaud.com/skyux/learn/get-started/sticky-settings)."
|
|
1495
1533
|
},
|
|
1496
1534
|
"sources": [
|
|
1497
1535
|
{
|
|
@@ -1630,7 +1668,7 @@
|
|
|
1630
1668
|
"flags": {},
|
|
1631
1669
|
"sources": [
|
|
1632
1670
|
{
|
|
1633
|
-
"fileName": "
|
|
1671
|
+
"fileName": "lib/modules/flyout/types/flyout-permalink.ts",
|
|
1634
1672
|
"line": 16,
|
|
1635
1673
|
"character": 4
|
|
1636
1674
|
}
|
|
@@ -1653,13 +1691,15 @@
|
|
|
1653
1691
|
},
|
|
1654
1692
|
"sources": [
|
|
1655
1693
|
{
|
|
1656
|
-
"fileName": "
|
|
1694
|
+
"fileName": "lib/modules/flyout/types/flyout-permalink.ts",
|
|
1657
1695
|
"line": 17,
|
|
1658
1696
|
"character": 4
|
|
1659
1697
|
}
|
|
1660
1698
|
],
|
|
1661
1699
|
"type": {
|
|
1662
1700
|
"type": "reference",
|
|
1701
|
+
"qualifiedName": "NavigationExtras",
|
|
1702
|
+
"package": "@angular/router",
|
|
1663
1703
|
"name": "NavigationExtras"
|
|
1664
1704
|
}
|
|
1665
1705
|
}
|
|
@@ -1745,18 +1785,13 @@
|
|
|
1745
1785
|
],
|
|
1746
1786
|
"sources": [
|
|
1747
1787
|
{
|
|
1748
|
-
"fileName": "
|
|
1788
|
+
"fileName": "index.ts",
|
|
1749
1789
|
"line": 1,
|
|
1750
1790
|
"character": 0
|
|
1751
1791
|
}
|
|
1752
1792
|
]
|
|
1753
1793
|
},
|
|
1754
1794
|
"codeExamples": [
|
|
1755
|
-
{
|
|
1756
|
-
"fileName": ".eslintrc.json",
|
|
1757
|
-
"filePath": "/projects/flyout/documentation/code-examples/.eslintrc.json",
|
|
1758
|
-
"rawContents": "{\n \"extends\": [\"../../.eslintrc.json\"],\n \"overrides\": [\n {\n \"files\": [\"*.ts\"],\n \"rules\": {\n \"@angular-eslint/directive-selector\": [\n \"error\",\n {\n \"type\": \"attribute\",\n \"prefix\": \"app\",\n \"style\": \"camelCase\"\n }\n ],\n \"@angular-eslint/component-selector\": [\n \"error\",\n {\n \"type\": \"element\",\n \"prefix\": \"app\",\n \"style\": \"kebab-case\"\n }\n ]\n }\n }\n ]\n}\n"
|
|
1759
|
-
},
|
|
1760
1795
|
{
|
|
1761
1796
|
"fileName": "flyout-demo-flyout.component.ts",
|
|
1762
1797
|
"filePath": "/projects/flyout/documentation/code-examples/flyout/basic/flyout-demo-flyout.component.ts",
|
|
@@ -1828,4 +1863,4 @@
|
|
|
1828
1863
|
"rawContents": "import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { SkyAvatarModule } from '@skyux/avatar';\n\nimport { SkyFlyoutModule } from '@skyux/flyout';\n\nimport { SkyKeyInfoModule, SkyLabelModule } from '@skyux/indicators';\n\nimport { SkyPageSummaryModule } from '@skyux/layout';\n\nimport { SkyListModule } from '@skyux/list-builder';\n\nimport { SkyListViewGridModule } from '@skyux/list-builder-view-grids';\n\nimport { FlyoutDemoComponent } from './flyout-demo.component';\n\nimport { FlyoutDemoFlyoutComponent } from './flyout-demo-flyout.component';\n\n@NgModule({\n imports: [\n CommonModule,\n SkyAvatarModule,\n SkyFlyoutModule,\n SkyListModule,\n SkyKeyInfoModule,\n SkyLabelModule,\n SkyListViewGridModule,\n SkyPageSummaryModule,\n ],\n declarations: [FlyoutDemoComponent, FlyoutDemoFlyoutComponent],\n entryComponents: [FlyoutDemoFlyoutComponent],\n exports: [FlyoutDemoComponent],\n})\nexport class AutocompleteDemoModule {}\n"
|
|
1829
1864
|
}
|
|
1830
1865
|
]
|
|
1831
|
-
}
|
|
1866
|
+
}
|
package/esm2015/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;AAEvB,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,GAAT,SAAS,CAAiB;QAElC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAEM,mBAAmB,CAAC,MAAkB;QAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QAC9C,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;QAExE,IAAI,UAAU,EAAE;YACd,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,C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O,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';\n\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"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flyout-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/flyout/src/lib/modules/flyout/flyout-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAO3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAsG5B;QA5FA;;WAEG;QACI,WAAM,GAAG,IAAI,YAAY,EAAQ,CAAC;QAezC;;;WAGG;QACI,WAAM,GAAG,IAAI,CAAC;QA0Db,iBAAY,GAAG,IAAI,OAAO,EAA+B,CAAC;QAE1D,6BAAwB,GAAG,IAAI,YAAY,EAAQ,CAAC;QAEpD,iCAA4B,GAAG,IAAI,YAAY,EAAQ,CAAC;QAExD,gCAA2B,GAAG,KAAK,CAAC;QAEpC,oCAA+B,GAAG,KAAK,CAAC;QAExC,oBAAe,GAAG,IAAI,OAAO,EAAoB,CAAC;QAGxD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE;YACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAA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K,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';\n\nimport { SkyFlyoutMessage } from './types/flyout-message';\n\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"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,EAET,YAAY,EACZ,KAAK,EACL,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 OnDestroy,\n EventEmitter,\n Input,\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"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;AAE3C,OAAO,EAAE,mBAAmB,EAAyB,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAgB,MAAM,MAAM,CAAC;;AAErD;;GAEG;AAEH,MAAM,OAAO,0BAA0B;IAWrC;QANQ,mBAAc,GA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,GAAG,CAAC;QAClC,MAAM,qBAAqB,GAAG,GAAG,CAAC;QAClC,MAAM,qBAAqB,GAAG,IAAI,CAAC;QACnC,MAAM,qBAAqB,GAAG,IAAI,CAAC;QAEnC,QAAQ,UAAU,EAAE;YAClB,KAAK,mBAAmB,CAAC,EAAE,CAAC,CAAC;gBAC3B,OAAO,KAAK,IAAI,qBAAqB,CAAC;aACvC;YACD,KAAK,mBAAmB,CAAC,EAAE,CAAC,CAAC;gBAC3B,OAAO,KAAK,IAAI,qBAAqB,IAAI,KAAK,IAAI,qBAAqB,CAAC;aACzE;YACD,KAAK,mBAAmB,CAAC,EAAE,CAAC,CAAC;gBAC3B,OAAO,KAAK,IAAI,qBAAqB,IAAI,KAAK,IAAI,qBAAqB,CAAC;aACzE;YACD,OAAO,CAAC,CAAC;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';\n\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"]}
|