@skyux/modals 5.0.5 → 5.5.0-alpha.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.
Files changed (138) hide show
  1. package/README.md +6 -4
  2. package/documentation.json +53 -8
  3. package/esm2015/index.js +26 -0
  4. package/esm2015/index.js.map +1 -0
  5. package/esm2015/lib/modules/confirm/confirm-button-action.js +2 -0
  6. package/esm2015/lib/modules/confirm/confirm-button-action.js.map +1 -0
  7. package/esm2015/lib/modules/confirm/confirm-button-config.js +2 -0
  8. package/esm2015/lib/modules/confirm/confirm-button-config.js.map +1 -0
  9. package/esm2015/lib/modules/confirm/confirm-button.js +2 -0
  10. package/esm2015/lib/modules/confirm/confirm-button.js.map +1 -0
  11. package/esm2015/lib/modules/confirm/confirm-closed-event-args.js +2 -0
  12. package/esm2015/lib/modules/confirm/confirm-closed-event-args.js.map +1 -0
  13. package/esm2015/lib/modules/confirm/confirm-config.js +2 -0
  14. package/esm2015/lib/modules/confirm/confirm-config.js.map +1 -0
  15. package/esm2015/lib/modules/confirm/confirm-instance.js +12 -0
  16. package/esm2015/lib/modules/confirm/confirm-instance.js.map +1 -0
  17. package/esm2015/lib/modules/confirm/confirm-modal-context.js +4 -0
  18. package/esm2015/lib/modules/confirm/confirm-modal-context.js.map +1 -0
  19. package/esm2015/lib/modules/confirm/confirm-type.js +25 -0
  20. package/esm2015/lib/modules/confirm/confirm-type.js.map +1 -0
  21. package/esm2015/lib/modules/confirm/confirm.component.js +127 -0
  22. package/esm2015/lib/modules/confirm/confirm.component.js.map +1 -0
  23. package/esm2015/lib/modules/confirm/confirm.module.js +35 -0
  24. package/esm2015/lib/modules/confirm/confirm.module.js.map +1 -0
  25. package/esm2015/lib/modules/confirm/confirm.service.js +55 -0
  26. package/esm2015/lib/modules/confirm/confirm.service.js.map +1 -0
  27. package/esm2015/lib/modules/modal/modal-adapter.service.js +47 -0
  28. package/esm2015/lib/modules/modal/modal-adapter.service.js.map +1 -0
  29. package/esm2015/lib/modules/modal/modal-before-close-handler.js +7 -0
  30. package/esm2015/lib/modules/modal/modal-before-close-handler.js.map +1 -0
  31. package/esm2015/lib/modules/modal/modal-close-args.js +4 -0
  32. package/esm2015/lib/modules/modal/modal-close-args.js.map +1 -0
  33. package/esm2015/lib/modules/modal/modal-component-adapter.service.js +98 -0
  34. package/esm2015/lib/modules/modal/modal-component-adapter.service.js.map +1 -0
  35. package/esm2015/lib/modules/modal/modal-configuration.js +20 -0
  36. package/esm2015/lib/modules/modal/modal-configuration.js.map +1 -0
  37. package/esm2015/lib/modules/modal/modal-content.component.js +19 -0
  38. package/esm2015/lib/modules/modal/modal-content.component.js.map +1 -0
  39. package/esm2015/{modules → lib/modules}/modal/modal-footer.component.js +1 -1
  40. package/esm2015/lib/modules/modal/modal-footer.component.js.map +1 -0
  41. package/esm2015/{modules → lib/modules}/modal/modal-header.component.js +1 -1
  42. package/esm2015/lib/modules/modal/modal-header.component.js.map +1 -0
  43. package/esm2015/lib/modules/modal/modal-host.component.js +101 -0
  44. package/esm2015/lib/modules/modal/modal-host.component.js.map +1 -0
  45. package/esm2015/lib/modules/modal/modal-host.service.js +55 -0
  46. package/esm2015/lib/modules/modal/modal-host.service.js.map +1 -0
  47. package/esm2015/lib/modules/modal/modal-instance.js +105 -0
  48. package/esm2015/lib/modules/modal/modal-instance.js.map +1 -0
  49. package/esm2015/lib/modules/modal/modal-scroll-shadow-event-args.js +2 -0
  50. package/esm2015/lib/modules/modal/modal-scroll-shadow-event-args.js.map +1 -0
  51. package/esm2015/lib/modules/modal/modal-scroll-shadow.directive.js +122 -0
  52. package/esm2015/lib/modules/modal/modal-scroll-shadow.directive.js.map +1 -0
  53. package/esm2015/lib/modules/modal/modal-state-animation.js +8 -0
  54. package/esm2015/lib/modules/modal/modal-state-animation.js.map +1 -0
  55. package/esm2015/lib/modules/modal/modal.component.js +184 -0
  56. package/esm2015/lib/modules/modal/modal.component.js.map +1 -0
  57. package/esm2015/lib/modules/modal/modal.interface.js +4 -0
  58. package/esm2015/lib/modules/modal/modal.interface.js.map +1 -0
  59. package/esm2015/lib/modules/modal/modal.module.js +64 -0
  60. package/esm2015/lib/modules/modal/modal.module.js.map +1 -0
  61. package/esm2015/lib/modules/modal/modal.service.js +85 -0
  62. package/esm2015/lib/modules/modal/modal.service.js.map +1 -0
  63. package/esm2015/lib/modules/shared/sky-modals-resources.module.js +54 -0
  64. package/esm2015/lib/modules/shared/sky-modals-resources.module.js.map +1 -0
  65. package/esm2015/skyux-modals.js +2 -2
  66. package/esm2015/skyux-modals.js.map +1 -0
  67. package/esm2015/testing/modal-fixture.js +1 -1
  68. package/esm2015/testing/modal-fixture.js.map +1 -0
  69. package/esm2015/testing/public-api.js +1 -1
  70. package/esm2015/testing/public-api.js.map +1 -0
  71. package/esm2015/testing/skyux-modals-testing.js +1 -1
  72. package/esm2015/testing/skyux-modals-testing.js.map +1 -0
  73. package/fesm2015/skyux-modals-testing.js.map +1 -1
  74. package/fesm2015/skyux-modals.js.map +1 -1
  75. package/index.d.ts +23 -0
  76. package/{modules → lib/modules}/confirm/confirm-button-action.d.ts +0 -0
  77. package/{modules → lib/modules}/confirm/confirm-button-config.d.ts +0 -0
  78. package/{modules → lib/modules}/confirm/confirm-button.d.ts +0 -0
  79. package/{modules → lib/modules}/confirm/confirm-closed-event-args.d.ts +0 -0
  80. package/{modules → lib/modules}/confirm/confirm-config.d.ts +0 -0
  81. package/{modules → lib/modules}/confirm/confirm-instance.d.ts +0 -0
  82. package/{modules → lib/modules}/confirm/confirm-modal-context.d.ts +0 -0
  83. package/{modules → lib/modules}/confirm/confirm-type.d.ts +0 -0
  84. package/{modules → lib/modules}/confirm/confirm.component.d.ts +0 -0
  85. package/{modules → lib/modules}/confirm/confirm.module.d.ts +0 -0
  86. package/{modules → lib/modules}/confirm/confirm.service.d.ts +0 -0
  87. package/{modules → lib/modules}/modal/modal-adapter.service.d.ts +0 -0
  88. package/{modules → lib/modules}/modal/modal-before-close-handler.d.ts +0 -0
  89. package/{modules → lib/modules}/modal/modal-close-args.d.ts +0 -0
  90. package/{modules → lib/modules}/modal/modal-component-adapter.service.d.ts +0 -0
  91. package/{modules → lib/modules}/modal/modal-configuration.d.ts +0 -0
  92. package/{modules → lib/modules}/modal/modal-content.component.d.ts +0 -0
  93. package/{modules → lib/modules}/modal/modal-footer.component.d.ts +0 -0
  94. package/{modules → lib/modules}/modal/modal-header.component.d.ts +0 -0
  95. package/{modules → lib/modules}/modal/modal-host.component.d.ts +0 -0
  96. package/{modules → lib/modules}/modal/modal-host.service.d.ts +0 -0
  97. package/{modules → lib/modules}/modal/modal-instance.d.ts +0 -0
  98. package/{modules → lib/modules}/modal/modal-scroll-shadow-event-args.d.ts +0 -0
  99. package/{modules → lib/modules}/modal/modal-scroll-shadow.directive.d.ts +0 -0
  100. package/{modules → lib/modules}/modal/modal-state-animation.d.ts +0 -0
  101. package/{modules → lib/modules}/modal/modal.component.d.ts +0 -0
  102. package/{modules → lib/modules}/modal/modal.interface.d.ts +0 -0
  103. package/{modules → lib/modules}/modal/modal.module.d.ts +0 -0
  104. package/{modules → lib/modules}/modal/modal.service.d.ts +0 -0
  105. package/{modules → lib/modules}/shared/sky-modals-resources.module.d.ts +0 -0
  106. package/package.json +4 -4
  107. package/skyux-modals.d.ts +1 -1
  108. package/LICENSE +0 -21
  109. package/esm2015/modules/confirm/confirm-button-action.js +0 -2
  110. package/esm2015/modules/confirm/confirm-button-config.js +0 -2
  111. package/esm2015/modules/confirm/confirm-button.js +0 -2
  112. package/esm2015/modules/confirm/confirm-closed-event-args.js +0 -2
  113. package/esm2015/modules/confirm/confirm-config.js +0 -2
  114. package/esm2015/modules/confirm/confirm-instance.js +0 -12
  115. package/esm2015/modules/confirm/confirm-modal-context.js +0 -4
  116. package/esm2015/modules/confirm/confirm-type.js +0 -25
  117. package/esm2015/modules/confirm/confirm.component.js +0 -124
  118. package/esm2015/modules/confirm/confirm.module.js +0 -35
  119. package/esm2015/modules/confirm/confirm.service.js +0 -54
  120. package/esm2015/modules/modal/modal-adapter.service.js +0 -46
  121. package/esm2015/modules/modal/modal-before-close-handler.js +0 -7
  122. package/esm2015/modules/modal/modal-close-args.js +0 -4
  123. package/esm2015/modules/modal/modal-component-adapter.service.js +0 -97
  124. package/esm2015/modules/modal/modal-configuration.js +0 -20
  125. package/esm2015/modules/modal/modal-content.component.js +0 -19
  126. package/esm2015/modules/modal/modal-host.component.js +0 -101
  127. package/esm2015/modules/modal/modal-host.service.js +0 -55
  128. package/esm2015/modules/modal/modal-instance.js +0 -105
  129. package/esm2015/modules/modal/modal-scroll-shadow-event-args.js +0 -2
  130. package/esm2015/modules/modal/modal-scroll-shadow.directive.js +0 -121
  131. package/esm2015/modules/modal/modal-state-animation.js +0 -8
  132. package/esm2015/modules/modal/modal.component.js +0 -183
  133. package/esm2015/modules/modal/modal.interface.js +0 -4
  134. package/esm2015/modules/modal/modal.module.js +0 -64
  135. package/esm2015/modules/modal/modal.service.js +0 -84
  136. package/esm2015/modules/shared/sky-modals-resources.module.js +0 -54
  137. package/esm2015/public-api.js +0 -26
  138. package/public-api.d.ts +0 -23
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
- # @skyux/modals
1
+ # modals
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@skyux/modals.svg)](https://www.npmjs.com/package/@skyux/modals)
4
- ![SKY UX CI](https://github.com/blackbaud/skyux-modals/workflows/SKY%20UX%20CI/badge.svg)
5
- [![coverage](https://codecov.io/gh/blackbaud/skyux-modals/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/blackbaud/skyux-modals/branch/master)
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test modals` to execute the unit tests.
@@ -197,6 +197,8 @@
197
197
  "name": "SkyConfirmCloseEventArgs"
198
198
  }
199
199
  ],
200
+ "qualifiedName": "EventEmitter",
201
+ "package": "@angular/core",
200
202
  "name": "EventEmitter"
201
203
  },
202
204
  "defaultValue": "..."
@@ -446,6 +448,8 @@
446
448
  "name": "NgModule",
447
449
  "type": {
448
450
  "type": "reference",
451
+ "qualifiedName": "NgModuleDecorator",
452
+ "package": "@angular/core",
449
453
  "name": "NgModule"
450
454
  },
451
455
  "arguments": {
@@ -507,6 +511,8 @@
507
511
  "name": "Injectable",
508
512
  "type": {
509
513
  "type": "reference",
514
+ "qualifiedName": "InjectableDecorator",
515
+ "package": "@angular/core",
510
516
  "name": "Injectable"
511
517
  },
512
518
  "arguments": {
@@ -665,6 +671,8 @@
665
671
  "flags": {},
666
672
  "type": {
667
673
  "type": "reference",
674
+ "qualifiedName": "Function",
675
+ "package": "typescript",
668
676
  "name": "Function"
669
677
  }
670
678
  },
@@ -715,6 +723,8 @@
715
723
  },
716
724
  "type": {
717
725
  "type": "reference",
726
+ "qualifiedName": "Function",
727
+ "package": "typescript",
718
728
  "name": "Function"
719
729
  }
720
730
  }
@@ -933,6 +943,8 @@
933
943
  "name": "SkyModalBeforeCloseHandler"
934
944
  }
935
945
  ],
946
+ "qualifiedName": "Observable",
947
+ "package": "rxjs",
936
948
  "name": "Observable"
937
949
  }
938
950
  }
@@ -972,6 +984,8 @@
972
984
  "name": "SkyModalCloseArgs"
973
985
  }
974
986
  ],
987
+ "qualifiedName": "Observable",
988
+ "package": "rxjs",
975
989
  "name": "Observable"
976
990
  }
977
991
  }
@@ -1010,6 +1024,8 @@
1010
1024
  "name": "string"
1011
1025
  }
1012
1026
  ],
1027
+ "qualifiedName": "Observable",
1028
+ "package": "rxjs",
1013
1029
  "name": "Observable"
1014
1030
  }
1015
1031
  }
@@ -1302,6 +1318,8 @@
1302
1318
  "name": "NgModule",
1303
1319
  "type": {
1304
1320
  "type": "reference",
1321
+ "qualifiedName": "NgModuleDecorator",
1322
+ "package": "@angular/core",
1305
1323
  "name": "NgModule"
1306
1324
  },
1307
1325
  "arguments": {
@@ -1369,6 +1387,8 @@
1369
1387
  "name": "Injectable",
1370
1388
  "type": {
1371
1389
  "type": "reference",
1390
+ "qualifiedName": "InjectableDecorator",
1391
+ "package": "@angular/core",
1372
1392
  "name": "Injectable"
1373
1393
  },
1374
1394
  "arguments": {
@@ -1534,6 +1554,8 @@
1534
1554
  "name": "Component",
1535
1555
  "type": {
1536
1556
  "type": "reference",
1557
+ "qualifiedName": "ComponentDecorator",
1558
+ "package": "@angular/core",
1537
1559
  "name": "Component"
1538
1560
  },
1539
1561
  "arguments": {
@@ -1598,6 +1620,8 @@
1598
1620
  "name": "Optional",
1599
1621
  "type": {
1600
1622
  "type": "reference",
1623
+ "qualifiedName": "OptionalDecorator",
1624
+ "package": "@angular/core",
1601
1625
  "name": "Optional"
1602
1626
  },
1603
1627
  "arguments": {}
@@ -1820,6 +1844,8 @@
1820
1844
  "implementedTypes": [
1821
1845
  {
1822
1846
  "type": "reference",
1847
+ "qualifiedName": "OnInit",
1848
+ "package": "@angular/core",
1823
1849
  "name": "OnInit"
1824
1850
  }
1825
1851
  ]
@@ -1838,6 +1864,8 @@
1838
1864
  "name": "Component",
1839
1865
  "type": {
1840
1866
  "type": "reference",
1867
+ "qualifiedName": "ComponentDecorator",
1868
+ "package": "@angular/core",
1841
1869
  "name": "Component"
1842
1870
  },
1843
1871
  "arguments": {
@@ -1899,6 +1927,8 @@
1899
1927
  "name": "Component",
1900
1928
  "type": {
1901
1929
  "type": "reference",
1930
+ "qualifiedName": "ComponentDecorator",
1931
+ "package": "@angular/core",
1902
1932
  "name": "Component"
1903
1933
  },
1904
1934
  "arguments": {
@@ -1960,6 +1990,8 @@
1960
1990
  "name": "Component",
1961
1991
  "type": {
1962
1992
  "type": "reference",
1993
+ "qualifiedName": "ComponentDecorator",
1994
+ "package": "@angular/core",
1963
1995
  "name": "Component"
1964
1996
  },
1965
1997
  "arguments": {
@@ -2021,6 +2053,8 @@
2021
2053
  "name": "Component",
2022
2054
  "type": {
2023
2055
  "type": "reference",
2056
+ "qualifiedName": "ComponentDecorator",
2057
+ "package": "@angular/core",
2024
2058
  "name": "Component"
2025
2059
  },
2026
2060
  "arguments": {
@@ -2086,6 +2120,8 @@
2086
2120
  "name": "any"
2087
2121
  }
2088
2122
  ],
2123
+ "qualifiedName": "ElementRef",
2124
+ "package": "@angular/core",
2089
2125
  "name": "ElementRef"
2090
2126
  }
2091
2127
  },
@@ -2133,6 +2169,8 @@
2133
2169
  "name": "Host",
2134
2170
  "type": {
2135
2171
  "type": "reference",
2172
+ "qualifiedName": "HostDecorator",
2173
+ "package": "@angular/core",
2136
2174
  "name": "Host"
2137
2175
  },
2138
2176
  "arguments": {}
@@ -2509,6 +2547,8 @@
2509
2547
  "name": "HostBinding",
2510
2548
  "type": {
2511
2549
  "type": "reference",
2550
+ "qualifiedName": "HostBindingDecorator",
2551
+ "package": "@angular/core",
2512
2552
  "name": "HostBinding"
2513
2553
  },
2514
2554
  "arguments": {
@@ -2645,6 +2685,8 @@
2645
2685
  "name": "HostListener",
2646
2686
  "type": {
2647
2687
  "type": "reference",
2688
+ "qualifiedName": "HostListenerDecorator",
2689
+ "package": "@angular/core",
2648
2690
  "name": "HostListener"
2649
2691
  },
2650
2692
  "arguments": {
@@ -2676,6 +2718,8 @@
2676
2718
  "flags": {},
2677
2719
  "type": {
2678
2720
  "type": "reference",
2721
+ "qualifiedName": "KeyboardEvent",
2722
+ "package": "typescript",
2679
2723
  "name": "KeyboardEvent"
2680
2724
  }
2681
2725
  }
@@ -2700,6 +2744,8 @@
2700
2744
  "name": "HostListener",
2701
2745
  "type": {
2702
2746
  "type": "reference",
2747
+ "qualifiedName": "HostListenerDecorator",
2748
+ "package": "@angular/core",
2703
2749
  "name": "HostListener"
2704
2750
  },
2705
2751
  "arguments": {
@@ -2731,6 +2777,8 @@
2731
2777
  "flags": {},
2732
2778
  "type": {
2733
2779
  "type": "reference",
2780
+ "qualifiedName": "KeyboardEvent",
2781
+ "package": "typescript",
2734
2782
  "name": "KeyboardEvent"
2735
2783
  }
2736
2784
  }
@@ -2872,6 +2920,8 @@
2872
2920
  "implementedTypes": [
2873
2921
  {
2874
2922
  "type": "reference",
2923
+ "qualifiedName": "AfterViewInit",
2924
+ "package": "@angular/core",
2875
2925
  "name": "AfterViewInit"
2876
2926
  }
2877
2927
  ]
@@ -3644,18 +3694,13 @@
3644
3694
  ],
3645
3695
  "sources": [
3646
3696
  {
3647
- "fileName": "projects/modals/src/public-api.ts",
3697
+ "fileName": "index.ts",
3648
3698
  "line": 1,
3649
3699
  "character": 0
3650
3700
  }
3651
3701
  ]
3652
3702
  },
3653
3703
  "codeExamples": [
3654
- {
3655
- "fileName": ".eslintrc.json",
3656
- "filePath": "/projects/modals/documentation/code-examples/.eslintrc.json",
3657
- "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"
3658
- },
3659
3704
  {
3660
3705
  "fileName": "confirm-demo.component.html",
3661
3706
  "filePath": "/projects/modals/documentation/code-examples/confirm/confirm-demo.component.html",
@@ -3689,7 +3734,7 @@
3689
3734
  {
3690
3735
  "fileName": "modal-demo.component.ts",
3691
3736
  "filePath": "/projects/modals/documentation/code-examples/modal/modal-demo.component.ts",
3692
- "rawContents": "import { Component } from '@angular/core';\n\nimport { SkyModalService } from '@skyux/modals';\n\nimport { ModalDemoModalComponent } from './modal-demo-modal.component';\n\n@Component({\n selector: 'app-modal-demo',\n templateUrl: './modal-demo.component.html',\n})\nexport class ModalDemoComponent {\n public helpKey: string = 'help-demo.html';\n\n public modalSize: string = 'medium';\n\n constructor(private modal: SkyModalService) {}\n\n public onOpenModalClick(): void {\n const modalInstanceType: any = ModalDemoModalComponent;\n const options: any = {\n helpKey: this.helpKey,\n size: this.modalSize,\n };\n\n this.modal.open(modalInstanceType, options);\n }\n}\n"
3737
+ "rawContents": "import { Component } from '@angular/core';\n\nimport { SkyModalService } from '@skyux/modals';\n\nimport { ModalDemoModalComponent } from './modal-demo-modal.component';\n\n@Component({\n selector: 'app-modal-demo',\n templateUrl: './modal-demo.component.html',\n})\nexport class ModalDemoComponent {\n public helpKey = 'help-demo.html';\n\n public modalSize = 'medium';\n\n constructor(private modal: SkyModalService) {}\n\n public onOpenModalClick(): void {\n const modalInstanceType: any = ModalDemoModalComponent;\n const options: any = {\n helpKey: this.helpKey,\n size: this.modalSize,\n };\n\n this.modal.open(modalInstanceType, options);\n }\n}\n"
3693
3738
  },
3694
3739
  {
3695
3740
  "fileName": "modal-demo.module.ts",
@@ -3697,4 +3742,4 @@
3697
3742
  "rawContents": "import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { FormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyModalModule } from '@skyux/modals';\n\nimport { ModalDemoComponent } from './modal-demo.component';\n\nimport { ModalDemoModalComponent } from './modal-demo-modal.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyModalModule,\n ],\n declarations: [ModalDemoComponent, ModalDemoModalComponent],\n exports: [ModalDemoComponent],\n entryComponents: [ModalDemoModalComponent],\n})\nexport class ModalDemoModule {}\n"
3698
3743
  }
3699
3744
  ]
3700
- }
3745
+ }
@@ -0,0 +1,26 @@
1
+ export * from './lib/modules/confirm/confirm-button';
2
+ export * from './lib/modules/confirm/confirm-button-action';
3
+ export * from './lib/modules/confirm/confirm-button-config';
4
+ export * from './lib/modules/confirm/confirm-closed-event-args';
5
+ export * from './lib/modules/confirm/confirm-config';
6
+ export * from './lib/modules/confirm/confirm-instance';
7
+ export * from './lib/modules/confirm/confirm-modal-context';
8
+ export * from './lib/modules/confirm/confirm-type';
9
+ export * from './lib/modules/confirm/confirm.module';
10
+ export * from './lib/modules/confirm/confirm.service';
11
+ export * from './lib/modules/modal/modal-before-close-handler';
12
+ export * from './lib/modules/modal/modal-close-args';
13
+ export * from './lib/modules/modal/modal-configuration';
14
+ export * from './lib/modules/modal/modal-host.service';
15
+ export * from './lib/modules/modal/modal-instance';
16
+ export * from './lib/modules/modal/modal.interface';
17
+ export * from './lib/modules/modal/modal.module';
18
+ export * from './lib/modules/modal/modal.service';
19
+ // Components and directives must be exported to support Angular's "partial" Ivy compiler.
20
+ // Obscure names are used to indicate types are not part of the public API.
21
+ export { SkyConfirmComponent as λ1 } from './lib/modules/confirm/confirm.component';
22
+ export { SkyModalContentComponent as λ2 } from './lib/modules/modal/modal-content.component';
23
+ export { SkyModalFooterComponent as λ3 } from './lib/modules/modal/modal-footer.component';
24
+ export { SkyModalHeaderComponent as λ4 } from './lib/modules/modal/modal-header.component';
25
+ export { SkyModalComponent as λ5 } from './lib/modules/modal/modal.component';
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/modals/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAElD,0FAA0F;AAC1F,2EAA2E;AAC3E,OAAO,EAAE,mBAAmB,IAAI,EAAE,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,wBAAwB,IAAI,EAAE,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,IAAI,EAAE,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,uBAAuB,IAAI,EAAE,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,iBAAiB,IAAI,EAAE,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["export * from './lib/modules/confirm/confirm-button';\nexport * from './lib/modules/confirm/confirm-button-action';\nexport * from './lib/modules/confirm/confirm-button-config';\nexport * from './lib/modules/confirm/confirm-closed-event-args';\nexport * from './lib/modules/confirm/confirm-config';\nexport * from './lib/modules/confirm/confirm-instance';\nexport * from './lib/modules/confirm/confirm-modal-context';\nexport * from './lib/modules/confirm/confirm-type';\nexport * from './lib/modules/confirm/confirm.module';\nexport * from './lib/modules/confirm/confirm.service';\n\nexport * from './lib/modules/modal/modal-before-close-handler';\nexport * from './lib/modules/modal/modal-close-args';\nexport * from './lib/modules/modal/modal-configuration';\nexport * from './lib/modules/modal/modal-host.service';\nexport * from './lib/modules/modal/modal-instance';\nexport * from './lib/modules/modal/modal.interface';\nexport * from './lib/modules/modal/modal.module';\nexport * from './lib/modules/modal/modal.service';\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 { SkyConfirmComponent as λ1 } from './lib/modules/confirm/confirm.component';\nexport { SkyModalContentComponent as λ2 } from './lib/modules/modal/modal-content.component';\nexport { SkyModalFooterComponent as λ3 } from './lib/modules/modal/modal-footer.component';\nexport { SkyModalHeaderComponent as λ4 } from './lib/modules/modal/modal-header.component';\nexport { SkyModalComponent as λ5 } from './lib/modules/modal/modal.component';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=confirm-button-action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-button-action.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button-action.ts"],"names":[],"mappings":"","sourcesContent":["export type SkyConfirmButtonAction = 'ok' | 'yes' | 'no' | 'cancel';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=confirm-button-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-button-config.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button-config.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyConfirmButtonConfig {\n /**\n * Specifies an identifier to return when users select the button to close the\n * confirmation dialog. This is useful to determine which button users select.\n */\n action: string;\n /**\n * Specifies the label for the button.\n */\n text: string;\n /**\n * Specifies a\n * [SKY UX button class](https://developer.blackbaud.com/skyux-theme/docs/button;docs-active-tab=design)\n * to apply to the button. The valid options are\n * `primary` to format the primary action on the dialog, `default` to format a secondary\n * action, and `link` to format an action that takes users to another page.\n */\n styleType?: string;\n /**\n * Indicates whether to place focus on this button by default.\n */\n autofocus?: boolean;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=confirm-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-button.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyConfirmButtonAction } from './confirm-button-action';\n\nexport interface SkyConfirmButton {\n action: SkyConfirmButtonAction;\n styleType: string;\n text: string;\n autofocus?: boolean;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=confirm-closed-event-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-closed-event-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-closed-event-args.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyConfirmCloseEventArgs {\n /**\n * The identifier for the button that users selected to close the confirmation dialog.\n */\n action: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=confirm-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-config.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyConfirmType } from './confirm-type';\n\nimport { SkyConfirmButtonConfig } from './confirm-button-config';\n\nexport interface SkyConfirmConfig {\n /**\n * Specifies the message to display in bold at the top of the dialog.\n * @required\n */\n message: string;\n /**\n * Specifies secondary text to display under the primary message.\n */\n body?: string;\n /**\n * Specifies an array of `SkyConfirmButtonConfig` objects that overwrite the default\n * configuration for buttons. The number of items in the array must match the number of\n * buttons that the `type` property specifies.\n */\n buttons?: SkyConfirmButtonConfig[];\n /**\n * Indicates whether to preserve whitespace and new lines inside the confirm component.\n * @default false\n */\n preserveWhiteSpace?: boolean;\n /**\n * Specifies a SkyConfirmType enum that indicates how many buttons to include in the dialog.\n */\n type?: SkyConfirmType;\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ export class SkyConfirmInstance {
3
+ constructor() {
4
+ /**
5
+ * Fires when users select an action to close the confirmation dialog. This event
6
+ * returns a `SkyConfirmCloseEventArgs` object with information about the button that
7
+ * users select.
8
+ */
9
+ this.closed = new EventEmitter();
10
+ }
11
+ }
12
+ //# sourceMappingURL=confirm-instance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,OAAO,kBAAkB;IAA/B;QACE;;;;WAIG;QACI,WAAM,GAAG,IAAI,YAAY,EAA4B,CAAC;IAC/D,CAAC;CAAA","sourcesContent":["import { EventEmitter } from '@angular/core';\n\nimport { SkyConfirmCloseEventArgs } from './confirm-closed-event-args';\n\nexport class SkyConfirmInstance {\n /**\n * Fires when users select an action to close the confirmation dialog. This event\n * returns a `SkyConfirmCloseEventArgs` object with information about the button that\n * users select.\n */\n public closed = new EventEmitter<SkyConfirmCloseEventArgs>();\n}\n"]}
@@ -0,0 +1,4 @@
1
+ /* istanbul ignore next */
2
+ export class SkyConfirmModalContext {
3
+ }
4
+ //# sourceMappingURL=confirm-modal-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-modal-context.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-modal-context.ts"],"names":[],"mappings":"AAMA,0BAA0B;AAC1B,MAAM,OAAO,sBAAsB;CAMlC","sourcesContent":["import { SkyConfirmButtonConfig } from './confirm-button-config';\n\nimport { SkyConfirmConfig } from './confirm-config';\n\nimport { SkyConfirmType } from './confirm-type';\n\n/* istanbul ignore next */\nexport class SkyConfirmModalContext implements SkyConfirmConfig {\n public message: string;\n public body: string;\n public buttons: SkyConfirmButtonConfig[];\n public preserveWhiteSpace: boolean;\n public type: SkyConfirmType;\n}\n"]}
@@ -0,0 +1,25 @@
1
+ export var SkyConfirmType;
2
+ (function (SkyConfirmType) {
3
+ /**
4
+ * Allows you to define your own `buttons` using the buttons property to
5
+ * specify an array of `SkyConfirmButtonConfig` objects.
6
+ */
7
+ SkyConfirmType[SkyConfirmType["Custom"] = 0] = "Custom";
8
+ /**
9
+ * Displays one button with an **OK** label.
10
+ */
11
+ SkyConfirmType[SkyConfirmType["OK"] = 1] = "OK";
12
+ /**
13
+ * Displays two buttons with **Yes** and **Cancel** labels.
14
+ * @deprecated Use the `Custom` type to follow the guidance that labels
15
+ * should clearly indicate the actions that occur when users select buttons.
16
+ */
17
+ SkyConfirmType[SkyConfirmType["YesCancel"] = 2] = "YesCancel";
18
+ /**
19
+ * Displays three buttons with **Yes**, **No**, and **Cancel** labels.
20
+ * @deprecated Use the `Custom` type to follow the guidance that labels
21
+ * should clearly indicate the actions that occur when users select buttons.
22
+ */
23
+ SkyConfirmType[SkyConfirmType["YesNoCancel"] = 3] = "YesNoCancel";
24
+ })(SkyConfirmType || (SkyConfirmType = {}));
25
+ //# sourceMappingURL=confirm-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-type.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAsBX;AAtBD,WAAY,cAAc;IACxB;;;OAGG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,+CAAM,CAAA;IACN;;;;OAIG;IACH,6DAAa,CAAA;IACb;;;;OAIG;IACH,iEAAe,CAAA;AACjB,CAAC,EAtBW,cAAc,KAAd,cAAc,QAsBzB","sourcesContent":["export enum SkyConfirmType {\n /**\n * Allows you to define your own `buttons` using the buttons property to\n * specify an array of `SkyConfirmButtonConfig` objects.\n */\n Custom = 0,\n /**\n * Displays one button with an **OK** label.\n */\n OK = 1,\n /**\n * Displays two buttons with **Yes** and **Cancel** labels.\n * @deprecated Use the `Custom` type to follow the guidance that labels\n * should clearly indicate the actions that occur when users select buttons.\n */\n YesCancel = 2,\n /**\n * Displays three buttons with **Yes**, **No**, and **Cancel** labels.\n * @deprecated Use the `Custom` type to follow the guidance that labels\n * should clearly indicate the actions that occur when users select buttons.\n */\n YesNoCancel = 3,\n}\n"]}
@@ -0,0 +1,127 @@
1
+ import { Component, Optional } from '@angular/core';
2
+ import { SkyLibResourcesService } from '@skyux/i18n';
3
+ import { BehaviorSubject, zip as observableZip } from 'rxjs';
4
+ import { SkyModalInstance } from '../modal/modal-instance';
5
+ import { SkyConfirmType } from './confirm-type';
6
+ import { SkyConfirmModalContext } from './confirm-modal-context';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "./confirm-modal-context";
9
+ import * as i2 from "../modal/modal-instance";
10
+ import * as i3 from "@skyux/i18n";
11
+ import * as i4 from "../modal/modal.component";
12
+ import * as i5 from "../modal/modal-content.component";
13
+ import * as i6 from "@angular/common";
14
+ import * as i7 from "@skyux/theme";
15
+ export class SkyConfirmComponent {
16
+ constructor(config, modal, resourcesService) {
17
+ this.config = config;
18
+ this.modal = modal;
19
+ this.resourcesService = resourcesService;
20
+ this.preserveWhiteSpace = false;
21
+ }
22
+ ngOnInit() {
23
+ if (this.config.type === SkyConfirmType.Custom &&
24
+ this.config.buttons.length > 0) {
25
+ this.buttons = this.getCustomButtons(this.config.buttons);
26
+ }
27
+ else {
28
+ this.getPresetButtons().subscribe((buttons) => {
29
+ this.buttons = buttons;
30
+ });
31
+ }
32
+ this.message = this.config.message;
33
+ this.body = this.config.body;
34
+ this.preserveWhiteSpace = this.config.preserveWhiteSpace || false;
35
+ }
36
+ close(button) {
37
+ const result = {
38
+ action: button.action,
39
+ };
40
+ this.modal.close(result);
41
+ }
42
+ getPresetButtons() {
43
+ const emitter = new BehaviorSubject([]);
44
+ switch (this.config.type) {
45
+ default:
46
+ case SkyConfirmType.OK:
47
+ this.resourcesService
48
+ .getString('skyux_confirm_dialog_default_ok_text')
49
+ .subscribe((value) => {
50
+ emitter.next([
51
+ {
52
+ text: value,
53
+ autofocus: true,
54
+ styleType: 'primary',
55
+ action: 'ok',
56
+ },
57
+ ]);
58
+ });
59
+ break;
60
+ case SkyConfirmType.YesNoCancel:
61
+ observableZip(this.resourcesService.getString('skyux_confirm_dialog_default_yes_text'), this.resourcesService.getString('skyux_confirm_dialog_default_no_text'), this.resourcesService.getString('skyux_confirm_dialog_default_cancel_text')).subscribe((values) => {
62
+ emitter.next([
63
+ {
64
+ text: values[0],
65
+ autofocus: true,
66
+ styleType: 'primary',
67
+ action: 'yes',
68
+ },
69
+ {
70
+ text: values[1],
71
+ styleType: 'default',
72
+ action: 'no',
73
+ },
74
+ {
75
+ text: values[2],
76
+ styleType: 'link',
77
+ action: 'cancel',
78
+ },
79
+ ]);
80
+ });
81
+ break;
82
+ case SkyConfirmType.YesCancel:
83
+ observableZip(this.resourcesService.getString('skyux_confirm_dialog_default_yes_text'), this.resourcesService.getString('skyux_confirm_dialog_default_cancel_text')).subscribe((values) => {
84
+ emitter.next([
85
+ {
86
+ text: values[0],
87
+ autofocus: true,
88
+ styleType: 'primary',
89
+ action: 'yes',
90
+ },
91
+ {
92
+ text: values[1],
93
+ styleType: 'link',
94
+ action: 'cancel',
95
+ },
96
+ ]);
97
+ });
98
+ break;
99
+ }
100
+ return emitter;
101
+ }
102
+ getCustomButtons(buttonConfig) {
103
+ const buttons = [];
104
+ buttonConfig.forEach((config) => {
105
+ buttons.push({
106
+ text: config.text,
107
+ action: config.action,
108
+ styleType: config.styleType || 'default',
109
+ autofocus: config.autofocus || false,
110
+ });
111
+ });
112
+ return buttons;
113
+ }
114
+ }
115
+ SkyConfirmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyConfirmComponent, deps: [{ token: i1.SkyConfirmModalContext }, { token: i2.SkyModalInstance }, { token: i3.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
116
+ SkyConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyConfirmComponent, selector: "sky-confirm", ngImport: i0, template: "<div class=\"sky-confirm\">\n <sky-modal ariaRole=\"alertdialog\">\n <sky-modal-content class=\"sky-confirm-content\">\n <div\n class=\"sky-confirm-message\"\n [ngClass]=\"{\n 'sky-confirm-preserve-white-space': preserveWhiteSpace\n }\"\n [skyThemeClass]=\"{\n 'sky-emphasized': 'default',\n 'sky-font-heading-1 sky-font-display-3': 'modern'\n }\"\n >\n {{ message }}\n </div>\n\n <div\n *ngIf=\"body\"\n class=\"sky-confirm-body\"\n [ngClass]=\"{\n 'sky-confirm-preserve-white-space': preserveWhiteSpace\n }\"\n >\n {{ body }}\n </div>\n\n <div class=\"sky-confirm-buttons\">\n <button\n *ngFor=\"let button of buttons\"\n type=\"button\"\n class=\"sky-btn\"\n [ngClass]=\"['sky-btn-' + button.styleType]\"\n [skyThemeClass]=\"{\n 'sky-margin-inline-sm': 'modern',\n 'sky-margin-inline-compact': 'default'\n }\"\n (click)=\"close(button)\"\n [attr.autofocus]=\"button.autofocus ? 'autofocus' : null\"\n >\n {{ button.text }}\n </button>\n </div>\n </sky-modal-content>\n </sky-modal>\n</div>\n", styles: [".sky-confirm-message{margin-top:5px}.sky-confirm-body{margin-top:10px}.sky-confirm-buttons{margin-top:20px}.sky-confirm-preserve-white-space{white-space:pre-wrap}:host-context(.sky-theme-modern) .sky-confirm-content{padding:20px 30px}:host-context(.sky-theme-modern) .sky-confirm-message{padding-bottom:20px}:host-context(.sky-theme-modern) .sky-confirm-body{margin:0}.sky-theme-modern .sky-confirm-content{padding:20px 30px}.sky-theme-modern .sky-confirm-message{padding-bottom:20px}.sky-theme-modern .sky-confirm-body{margin:0}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-confirm-message{color:#fbfcfe}.sky-theme-modern.sky-theme-mode-dark .sky-confirm-message{color:#fbfcfe}\n"], components: [{ type: i4.SkyModalComponent, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i5.SkyModalContentComponent, selector: "sky-modal-content" }], directives: [{ type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyConfirmComponent, decorators: [{
118
+ type: Component,
119
+ args: [{
120
+ selector: 'sky-confirm',
121
+ templateUrl: './confirm.component.html',
122
+ styleUrls: ['./confirm.component.scss'],
123
+ }]
124
+ }], ctorParameters: function () { return [{ type: i1.SkyConfirmModalContext }, { type: i2.SkyModalInstance }, { type: i3.SkyLibResourcesService, decorators: [{
125
+ type: Optional
126
+ }] }]; } });
127
+ //# sourceMappingURL=confirm.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm.component.ts","../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm.component.html"],"names":[],"mappings":"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","sourcesContent":["import { Component, OnInit, Optional } from '@angular/core';\n\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { BehaviorSubject, Observable, zip as observableZip } from 'rxjs';\n\nimport { SkyModalInstance } from '../modal/modal-instance';\n\nimport { SkyConfirmButton } from './confirm-button';\n\nimport { SkyConfirmButtonConfig } from './confirm-button-config';\n\nimport { SkyConfirmCloseEventArgs } from './confirm-closed-event-args';\n\nimport { SkyConfirmType } from './confirm-type';\n\nimport { SkyConfirmModalContext } from './confirm-modal-context';\n\n@Component({\n selector: 'sky-confirm',\n templateUrl: './confirm.component.html',\n styleUrls: ['./confirm.component.scss'],\n})\nexport class SkyConfirmComponent implements OnInit {\n public buttons: SkyConfirmButton[];\n public message: string;\n public body: string;\n public preserveWhiteSpace = false;\n\n constructor(\n private config: SkyConfirmModalContext,\n private modal: SkyModalInstance,\n @Optional() private resourcesService: SkyLibResourcesService\n ) {}\n\n public ngOnInit() {\n if (\n this.config.type === SkyConfirmType.Custom &&\n this.config.buttons.length > 0\n ) {\n this.buttons = this.getCustomButtons(this.config.buttons);\n } else {\n this.getPresetButtons().subscribe((buttons: SkyConfirmButton[]) => {\n this.buttons = buttons;\n });\n }\n\n this.message = this.config.message;\n this.body = this.config.body;\n this.preserveWhiteSpace = this.config.preserveWhiteSpace || false;\n }\n\n public close(button: SkyConfirmButton) {\n const result: SkyConfirmCloseEventArgs = {\n action: button.action,\n };\n\n this.modal.close(result);\n }\n\n private getPresetButtons(): Observable<SkyConfirmButton[]> {\n const emitter = new BehaviorSubject<SkyConfirmButton[]>([]);\n\n switch (this.config.type) {\n default:\n case SkyConfirmType.OK:\n this.resourcesService\n .getString('skyux_confirm_dialog_default_ok_text')\n .subscribe((value: string) => {\n emitter.next([\n {\n text: value,\n autofocus: true,\n styleType: 'primary',\n action: 'ok',\n },\n ]);\n });\n break;\n\n case SkyConfirmType.YesNoCancel:\n observableZip(\n this.resourcesService.getString(\n 'skyux_confirm_dialog_default_yes_text'\n ),\n this.resourcesService.getString(\n 'skyux_confirm_dialog_default_no_text'\n ),\n this.resourcesService.getString(\n 'skyux_confirm_dialog_default_cancel_text'\n )\n ).subscribe((values: any) => {\n emitter.next([\n {\n text: values[0],\n autofocus: true,\n styleType: 'primary',\n action: 'yes',\n },\n {\n text: values[1],\n styleType: 'default',\n action: 'no',\n },\n {\n text: values[2],\n styleType: 'link',\n action: 'cancel',\n },\n ]);\n });\n break;\n\n case SkyConfirmType.YesCancel:\n observableZip(\n this.resourcesService.getString(\n 'skyux_confirm_dialog_default_yes_text'\n ),\n this.resourcesService.getString(\n 'skyux_confirm_dialog_default_cancel_text'\n )\n ).subscribe((values: any) => {\n emitter.next([\n {\n text: values[0],\n autofocus: true,\n styleType: 'primary',\n action: 'yes',\n },\n {\n text: values[1],\n styleType: 'link',\n action: 'cancel',\n },\n ]);\n });\n break;\n }\n\n return emitter;\n }\n\n private getCustomButtons(\n buttonConfig: SkyConfirmButtonConfig[]\n ): SkyConfirmButton[] {\n const buttons: SkyConfirmButton[] = [];\n\n buttonConfig.forEach((config: SkyConfirmButtonConfig) => {\n buttons.push({\n text: config.text,\n action: config.action,\n styleType: config.styleType || 'default',\n autofocus: config.autofocus || false,\n } as SkyConfirmButton);\n });\n\n return buttons;\n }\n}\n","<div class=\"sky-confirm\">\n <sky-modal ariaRole=\"alertdialog\">\n <sky-modal-content class=\"sky-confirm-content\">\n <div\n class=\"sky-confirm-message\"\n [ngClass]=\"{\n 'sky-confirm-preserve-white-space': preserveWhiteSpace\n }\"\n [skyThemeClass]=\"{\n 'sky-emphasized': 'default',\n 'sky-font-heading-1 sky-font-display-3': 'modern'\n }\"\n >\n {{ message }}\n </div>\n\n <div\n *ngIf=\"body\"\n class=\"sky-confirm-body\"\n [ngClass]=\"{\n 'sky-confirm-preserve-white-space': preserveWhiteSpace\n }\"\n >\n {{ body }}\n </div>\n\n <div class=\"sky-confirm-buttons\">\n <button\n *ngFor=\"let button of buttons\"\n type=\"button\"\n class=\"sky-btn\"\n [ngClass]=\"['sky-btn-' + button.styleType]\"\n [skyThemeClass]=\"{\n 'sky-margin-inline-sm': 'modern',\n 'sky-margin-inline-compact': 'default'\n }\"\n (click)=\"close(button)\"\n [attr.autofocus]=\"button.autofocus ? 'autofocus' : null\"\n >\n {{ button.text }}\n </button>\n </div>\n </sky-modal-content>\n </sky-modal>\n</div>\n"]}
@@ -0,0 +1,35 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { SkyThemeModule } from '@skyux/theme';
4
+ import { SkyModalModule } from '../modal/modal.module';
5
+ import { SkyModalsResourcesModule } from '../shared/sky-modals-resources.module';
6
+ import { SkyConfirmComponent } from './confirm.component';
7
+ import * as i0 from "@angular/core";
8
+ export class SkyConfirmModule {
9
+ }
10
+ SkyConfirmModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyConfirmModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
+ SkyConfirmModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyConfirmModule, declarations: [SkyConfirmComponent], imports: [CommonModule,
12
+ SkyModalModule,
13
+ SkyModalsResourcesModule,
14
+ SkyThemeModule], exports: [SkyConfirmComponent] });
15
+ SkyConfirmModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyConfirmModule, imports: [[
16
+ CommonModule,
17
+ SkyModalModule,
18
+ SkyModalsResourcesModule,
19
+ SkyThemeModule,
20
+ ]] });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyConfirmModule, decorators: [{
22
+ type: NgModule,
23
+ args: [{
24
+ declarations: [SkyConfirmComponent],
25
+ imports: [
26
+ CommonModule,
27
+ SkyModalModule,
28
+ SkyModalsResourcesModule,
29
+ SkyThemeModule,
30
+ ],
31
+ exports: [SkyConfirmComponent],
32
+ entryComponents: [SkyConfirmComponent],
33
+ }]
34
+ }] });
35
+ //# sourceMappingURL=confirm.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;;AAa1D,MAAM,OAAO,gBAAgB;;8GAAhB,gBAAgB;+GAAhB,gBAAgB,iBAVZ,mBAAmB,aAEhC,YAAY;QACZ,cAAc;QACd,wBAAwB;QACxB,cAAc,aAEN,mBAAmB;+GAGlB,gBAAgB,YATlB;YACP,YAAY;YACZ,cAAc;YACd,wBAAwB;YACxB,cAAc;SACf;4FAIU,gBAAgB;kBAX5B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,wBAAwB;wBACxB,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,eAAe,EAAE,CAAC,mBAAmB,CAAC;iBACvC","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyModalModule } from '../modal/modal.module';\n\nimport { SkyModalsResourcesModule } from '../shared/sky-modals-resources.module';\n\nimport { SkyConfirmComponent } from './confirm.component';\n\n@NgModule({\n declarations: [SkyConfirmComponent],\n imports: [\n CommonModule,\n SkyModalModule,\n SkyModalsResourcesModule,\n SkyThemeModule,\n ],\n exports: [SkyConfirmComponent],\n entryComponents: [SkyConfirmComponent],\n})\nexport class SkyConfirmModule {}\n"]}