@ks89/angular-modal-gallery 10.0.1 → 11.0.0-rc.1

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 (123) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/CONTRIBUTING.md +3 -3
  3. package/LICENSE +1 -1
  4. package/README.md +11 -14
  5. package/esm2022/lib/components/accessible.component.mjs +131 -0
  6. package/esm2022/lib/components/carousel/carousel-previews/carousel-previews.component.mjs +457 -0
  7. package/esm2022/lib/components/carousel/carousel.component.mjs +739 -0
  8. package/{esm2020 → esm2022}/lib/components/components.mjs +2 -2
  9. package/esm2022/lib/components/current-image/current-image.component.mjs +608 -0
  10. package/esm2022/lib/components/current-image/loading-spinner/loading-spinner.component.mjs +81 -0
  11. package/esm2022/lib/components/dots/dots.component.mjs +125 -0
  12. package/{esm2020 → esm2022}/lib/components/modal-gallery/modal-gallery-ref.mjs +2 -2
  13. package/esm2022/lib/components/modal-gallery/modal-gallery.component.mjs +500 -0
  14. package/esm2022/lib/components/modal-gallery/modal-gallery.service.mjs +188 -0
  15. package/{esm2020 → esm2022}/lib/components/modal-gallery/modal-gallery.tokens.mjs +2 -2
  16. package/esm2022/lib/components/plain-gallery/plain-gallery.component.mjs +250 -0
  17. package/esm2022/lib/components/previews/previews.component.mjs +264 -0
  18. package/esm2022/lib/components/upper-buttons/upper-buttons.component.mjs +244 -0
  19. package/esm2022/lib/directives/a-tag-bg-image.directive.mjs +79 -0
  20. package/esm2022/lib/directives/click-outside.directive.mjs +92 -0
  21. package/esm2022/lib/directives/description.directive.mjs +99 -0
  22. package/esm2022/lib/directives/direction.directive.mjs +74 -0
  23. package/esm2022/lib/directives/directives.mjs +51 -0
  24. package/esm2022/lib/directives/fallback-image.directive.mjs +60 -0
  25. package/esm2022/lib/directives/keyboard-navigation.directive.mjs +59 -0
  26. package/esm2022/lib/directives/margin.directive.mjs +85 -0
  27. package/esm2022/lib/directives/max-size.directive.mjs +76 -0
  28. package/esm2022/lib/directives/size.directive.mjs +77 -0
  29. package/esm2022/lib/directives/swipe.directive.mjs +115 -0
  30. package/esm2022/lib/directives/wrap.directive.mjs +75 -0
  31. package/esm2022/lib/modal-gallery.module.mjs +69 -0
  32. package/{esm2020 → esm2022}/lib/model/accessibility.interface.mjs +2 -2
  33. package/{esm2020 → esm2022}/lib/model/action.enum.mjs +2 -2
  34. package/{esm2020 → esm2022}/lib/model/buttons-config.interface.mjs +2 -2
  35. package/{esm2020 → esm2022}/lib/model/carousel-config.interface.mjs +2 -2
  36. package/{esm2020 → esm2022}/lib/model/carousel-image-config.interface.mjs +2 -2
  37. package/{esm2020 → esm2022}/lib/model/carousel-preview-config.interface.mjs +2 -2
  38. package/{esm2020 → esm2022}/lib/model/current-image-config.interface.mjs +2 -2
  39. package/{esm2020 → esm2022}/lib/model/description.interface.mjs +2 -2
  40. package/{esm2020 → esm2022}/lib/model/dots-config.interface.mjs +2 -2
  41. package/{esm2020 → esm2022}/lib/model/image-internal.class.mjs +2 -2
  42. package/{esm2020 → esm2022}/lib/model/image.class.mjs +2 -2
  43. package/{esm2020 → esm2022}/lib/model/keyboard-config.interface.mjs +2 -2
  44. package/{esm2020 → esm2022}/lib/model/keyboard.enum.mjs +2 -2
  45. package/{esm2020 → esm2022}/lib/model/lib-config.interface.mjs +2 -2
  46. package/{esm2020 → esm2022}/lib/model/loading-config.interface.mjs +2 -2
  47. package/{esm2020 → esm2022}/lib/model/max-size.interface.mjs +2 -2
  48. package/{esm2020 → esm2022}/lib/model/modal-gallery-config.interface.mjs +2 -2
  49. package/{esm2020 → esm2022}/lib/model/plain-gallery-config.interface.mjs +2 -2
  50. package/{esm2020 → esm2022}/lib/model/play-config.interface.mjs +2 -2
  51. package/{esm2020 → esm2022}/lib/model/preview-config.interface.mjs +2 -2
  52. package/{esm2020 → esm2022}/lib/model/size.interface.mjs +2 -2
  53. package/{esm2020 → esm2022}/lib/model/slide-config.interface.mjs +2 -2
  54. package/esm2022/lib/services/config.service.mjs +389 -0
  55. package/esm2022/lib/services/id-validator.service.mjs +72 -0
  56. package/{esm2020 → esm2022}/lib/utils/image.util.mjs +4 -4
  57. package/{esm2020 → esm2022}/lib/utils/user-input.util.mjs +2 -2
  58. package/{esm2020 → esm2022}/public-api.mjs +2 -2
  59. package/{fesm2020 → fesm2022}/ks89-angular-modal-gallery.mjs +382 -471
  60. package/fesm2022/ks89-angular-modal-gallery.mjs.map +1 -0
  61. package/lib/components/carousel/carousel-previews/carousel-previews.component.d.ts +4 -4
  62. package/lib/components/carousel/carousel.component.d.ts +5 -8
  63. package/lib/components/current-image/current-image.component.d.ts +6 -10
  64. package/lib/components/current-image/loading-spinner/loading-spinner.component.d.ts +3 -3
  65. package/lib/components/dots/dots.component.d.ts +5 -5
  66. package/lib/components/modal-gallery/modal-gallery.component.d.ts +11 -17
  67. package/lib/components/plain-gallery/plain-gallery.component.d.ts +3 -3
  68. package/lib/components/previews/previews.component.d.ts +6 -6
  69. package/lib/components/upper-buttons/upper-buttons.component.d.ts +4 -4
  70. package/lib/directives/a-tag-bg-image.directive.d.ts +3 -3
  71. package/lib/directives/click-outside.directive.d.ts +2 -2
  72. package/lib/directives/description.directive.d.ts +3 -3
  73. package/lib/directives/direction.directive.d.ts +3 -3
  74. package/lib/directives/directives.d.ts +2 -1
  75. package/lib/directives/fallback-image.directive.d.ts +1 -1
  76. package/lib/directives/keyboard-navigation.directive.d.ts +1 -1
  77. package/lib/directives/margin.directive.d.ts +3 -3
  78. package/lib/directives/max-size.directive.d.ts +3 -3
  79. package/lib/directives/size.directive.d.ts +1 -1
  80. package/lib/directives/swipe.directive.d.ts +33 -0
  81. package/lib/directives/wrap.directive.d.ts +3 -3
  82. package/lib/modal-gallery.module.d.ts +4 -10
  83. package/lib/model/keyboard.enum.d.ts +1 -1
  84. package/lib/model/lib-config.interface.d.ts +2 -6
  85. package/lib/services/config.service.d.ts +0 -2
  86. package/lib/utils/image.util.d.ts +2 -2
  87. package/package.json +10 -18
  88. package/esm2020/lib/components/accessible.component.mjs +0 -130
  89. package/esm2020/lib/components/carousel/carousel-previews/carousel-previews.component.mjs +0 -462
  90. package/esm2020/lib/components/carousel/carousel.component.mjs +0 -747
  91. package/esm2020/lib/components/current-image/current-image.component.mjs +0 -616
  92. package/esm2020/lib/components/current-image/loading-spinner/loading-spinner.component.mjs +0 -80
  93. package/esm2020/lib/components/dots/dots.component.mjs +0 -127
  94. package/esm2020/lib/components/modal-gallery/modal-gallery.component.mjs +0 -524
  95. package/esm2020/lib/components/modal-gallery/modal-gallery.service.mjs +0 -187
  96. package/esm2020/lib/components/plain-gallery/plain-gallery.component.mjs +0 -249
  97. package/esm2020/lib/components/previews/previews.component.mjs +0 -272
  98. package/esm2020/lib/components/upper-buttons/upper-buttons.component.mjs +0 -249
  99. package/esm2020/lib/directives/a-tag-bg-image.directive.mjs +0 -78
  100. package/esm2020/lib/directives/click-outside.directive.mjs +0 -91
  101. package/esm2020/lib/directives/description.directive.mjs +0 -98
  102. package/esm2020/lib/directives/direction.directive.mjs +0 -73
  103. package/esm2020/lib/directives/directives.mjs +0 -49
  104. package/esm2020/lib/directives/fallback-image.directive.mjs +0 -59
  105. package/esm2020/lib/directives/keyboard-navigation.directive.mjs +0 -58
  106. package/esm2020/lib/directives/margin.directive.mjs +0 -84
  107. package/esm2020/lib/directives/max-size.directive.mjs +0 -75
  108. package/esm2020/lib/directives/size.directive.mjs +0 -76
  109. package/esm2020/lib/directives/wrap.directive.mjs +0 -74
  110. package/esm2020/lib/modal-gallery.module.mjs +0 -94
  111. package/esm2020/lib/model/keyboard-service-config.interface.mjs +0 -25
  112. package/esm2020/lib/services/config.service.mjs +0 -396
  113. package/esm2020/lib/services/id-validator.service.mjs +0 -71
  114. package/esm2020/lib/services/keyboard.service.mjs +0 -111
  115. package/fesm2015/ks89-angular-modal-gallery.mjs +0 -5728
  116. package/fesm2015/ks89-angular-modal-gallery.mjs.map +0 -1
  117. package/fesm2020/ks89-angular-modal-gallery.mjs.map +0 -1
  118. package/lib/model/keyboard-service-config.interface.d.ts +0 -8
  119. package/lib/services/keyboard.service.d.ts +0 -26
  120. /package/{esm2020 → esm2022}/ks89-angular-modal-gallery.mjs +0 -0
  121. /package/{esm2020 → esm2022}/lib/components/accessibility-default.mjs +0 -0
  122. /package/{esm2020 → esm2022}/lib/components/upper-buttons/upper-buttons-default.mjs +0 -0
  123. /package/{esm2020 → esm2022}/lib/model/interaction-event.interface.mjs +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 11.0.0-rc.1
2
+
3
+ **Migrate from 10.0.0 to 11.0.0 - Check the official guide [HERE](https://ks89.github.io/angular-modal-gallery-2023-v11.github.io/)**
4
+
5
+ ### Features
6
+
7
+ - remove `hammerjs` dependency (because deprecated) to mange swipe events preferring a custom directive #218 **(BREAKING CHANGE)**
8
+ - remove `mousetrap` dependency to manage ctrl+s/meta+s event to save the current image in modal-gallery component.
9
+ This in a very important change, because from now you won't be able to customize ctrl+s/meta+s shortcuts #237 **(BREAKING CHANGE)**
10
+
11
+
1
12
  # 10.0.1
2
13
 
3
14
  ### Bugfixes
package/CONTRIBUTING.md CHANGED
@@ -10,7 +10,7 @@ Every time you'll run `npm install` inside an example's folder, you must rebuild
10
10
  2. remove all `node_modules` and temp folders with compiled files (if necessary)
11
11
  3. `npm install` (from the root of this project)
12
12
  4. `npm run clean:all`
13
- 5. `cd examples/angular-cli-15`
13
+ 5. `cd examples/angular-cli-16`
14
14
  6. `npm install`
15
15
  7. `cd ../..`
16
16
  8. `cd examples/universal`
@@ -31,8 +31,8 @@ Every time you'll run `npm install` inside an example's folder, you must rebuild
31
31
  6. `cd dist/angular-modal-gallery && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
32
32
  7. `cd ../..`
33
33
 
34
- # C. Run angular-cli-15 example
35
- 1. `cd examples/angular-cli-15`
34
+ # C. Run angular-cli-16 example
35
+ 1. `cd examples/angular-cli-16`
36
36
  2. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
37
37
  3. `npm run build:dev`
38
38
  4. `cd dist/angular-cli && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017-2022 Stefano Cappa (Ks89)
3
+ Copyright (c) 2017-2023 Stefano Cappa (Ks89)
4
4
  Copyright (c) 2016 vimalavinisha
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/README.md CHANGED
@@ -120,7 +120,6 @@ Despite its name, this library is more than for modal galleries, because I'm int
120
120
  - **Server Side Rendering** support with angular-universal
121
121
  - Web Accessibility features, like ARIA support and [toptal.com](https://www.toptal.com/designers/colorfilter) criteria (tested with `Sim Daltonism` for macOS)
122
122
  - image **download** with buttons or keyboard shortcuts
123
- - advanced **keyboard shortcuts** with `mousetrap` (both local and global)
124
123
  - fully configurable default buttons to either close, download, navigate to an external url or delete images and so on
125
124
  - support custom buttons with both pre and after hooks
126
125
  - **click outside feature** to close the modal gallery clicking on the background
@@ -129,18 +128,18 @@ Despite its name, this library is more than for modal galleries, because I'm int
129
128
  - configurable side-previews (visible only on bigger screen)
130
129
  - configurable dots navigation (visible only on bigger screen)
131
130
  - configurable previews (visible only on bigger screen)
132
- - and many more... (check the official documentation [HERE](https://ks89.github.io/angular-modal-gallery-2022-v10.github.io/))
131
+ - and many more... (check the official documentation [HERE](https://ks89.github.io/angular-modal-gallery-2023-v11.github.io/))
133
132
 
134
133
  <br>
135
134
 
136
135
  ## :package: Installation :package:
137
136
 
138
137
  - `npm install --save @ks89/angular-modal-gallery`
139
- - `npm install --save hammerjs mousetrap @angular/cdk`
140
- - `npm install --save-dev @types/mousetrap @types/hammerjs`
138
+ - `npm install --save @angular/cdk`
141
139
 
142
140
  From version @ks89/angular-modal-gallery >= 5.0.0, **font-awesome isn't a mandatory dependency**.
143
- You can use all default features without font-awesome. For more info, check official [documentation website](https://ks89.github.io/angular-modal-gallery-2022-v10.github.io/).
141
+ You can use all default features without font-awesome. For more info, check official [documentation website](https://ks89.github.io/angular-modal-gallery-2023-v11.github.io/).
142
+ From version @ks89/angular-modal-gallery >= 11.0.0, **mousetrap and hammerjs have been removed as dependencies**.
144
143
 
145
144
  <br>
146
145
 
@@ -148,7 +147,7 @@ You can use all default features without font-awesome. For more info, check offi
148
147
 
149
148
  *Image loading could be slow, because this website is hosted on Github pages*
150
149
 
151
- [OFFICIAL DOCUMENTATION WEBSITE](https://ks89.github.io/angular-modal-gallery-2022-v10.github.io/)
150
+ [OFFICIAL DOCUMENTATION WEBSITE](https://ks89.github.io/angular-modal-gallery-2023-v11.github.io/)
152
151
 
153
152
  <br>
154
153
 
@@ -170,10 +169,12 @@ You can use all default features without font-awesome. For more info, check offi
170
169
  | Angular 13 | &gt;= 9.0.0 | optional |
171
170
  | Angular 14 | &gt;= 9.0.0 | optional |
172
171
  | Angular 15 | &gt;= 10.0.0 | optional |
172
+ | Angular 16 | &gt;= 11.0.0 | optional |
173
173
 
174
174
  *Version 8.0.0 requires at least Angular 12.*
175
175
  *Version 9.0.0 requires at least Angular 13.*
176
176
  *Version 10.0.0 requires at least Angular 15.*
177
+ *Version 11.0.0 requires at least Angular 16.*
177
178
 
178
179
  <br>
179
180
 
@@ -181,6 +182,7 @@ You can use all default features without font-awesome. For more info, check offi
181
182
 
182
183
  **More than 100 releases in two years**, and more to come... :)
183
184
 
185
+ - 06/01/2023 - 11.0.0-rc.1 - @ks89/angular-modal-gallery - [HERE](https://github.com/Ks89/angular-modal-gallery/releases)
184
186
  - 11/18/2022 - 10.0.1 - @ks89/angular-modal-gallery - [HERE](https://github.com/Ks89/angular-modal-gallery/releases)
185
187
  - 11/17/2022 - 10.0.0 - @ks89/angular-modal-gallery - [HERE](https://github.com/Ks89/angular-modal-gallery/releases)
186
188
  - 08/03/2022 - 10.0.0-rc.1 - @ks89/angular-modal-gallery - [HERE](https://github.com/Ks89/angular-modal-gallery/releases)
@@ -216,15 +218,10 @@ You can use all default features without font-awesome. For more info, check offi
216
218
 
217
219
  ## :question: FAQS :question:
218
220
 
219
- 1. Question: **I have this error: `Cannot find name 'MousetrapInstance'`. What can I do?**<br>
220
- **Answer**: Simply run `npm i --save-dev @types/mousetrap`
221
- 2. Question: **I have this error: `Error: No provider for KeyboardService`. What can I do?**<br>
222
- **Answer**: You forgot to add .forRoot(), so KeyboardService will be never available as a service. Please read section "Installation" [HERE](https://ks89.github.io/angular-modal-gallery-2022-v10.github.io/gettingStarted).
223
- This is a common design pattern for Angular libraries. For more info check also [this issue](https://github.com/Ks89/angular-modal-gallery/issues/94).
224
- 3. Question: **How can I remove images using DELETE button without issues?**<br>
221
+ 1. Question: **How can I remove images using DELETE button without issues?**<br>
225
222
  **Answer**: **You cannot change the input image array. Instead, you should reassign it with a newer array** without the deleted element.
226
223
  In other words, **you must think in a functional way**, without changing the input array of images.
227
- For more information check this official demo [HERE](https://ks89.github.io/angular-modal-gallery-2022-v10.github.io/demo/buttons-strategies).
224
+ For more information check this official demo [HERE](https://ks89.github.io/angular-modal-gallery-2023-v11.github.io/demo/buttons-strategies).
228
225
 
229
226
  <br>
230
227
 
@@ -262,7 +259,7 @@ In this way, [prettier](https://prettier.io/) will run using my configuration, a
262
259
 
263
260
  The MIT License (MIT)
264
261
 
265
- Copyright (c) 2017-2022 Stefano Cappa (Ks89)
262
+ Copyright (c) 2017-2023 Stefano Cappa (Ks89)
266
263
 
267
264
  Permission is hereby granted, free of charge, to any person obtaining a copy
268
265
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,131 @@
1
+ /*
2
+ The MIT License (MIT)
3
+
4
+ Copyright (C) 2017-2023 Stefano Cappa (Ks89)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ */
24
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
25
+ import { DIRECTION_RIGHT, MOUSE_MAIN_BUTTON_CLICK, NEXT, NOTHING, PREV, ENTER_CODE, SPACE_CODE } from '../utils/user-input.util';
26
+ import * as i0 from "@angular/core";
27
+ /**
28
+ * Provides some useful methods to add accessibility features to subclasses.
29
+ * In particular, it exposes a method to handle navigation event with both Keyboard and Mouse
30
+ * and another with also the direction (right or left).
31
+ */
32
+ class AccessibleComponent {
33
+ constructor() { }
34
+ /**
35
+ * Method to handle navigation events with both Keyboard and Mouse.
36
+ * @param string direction of the navigation that can be either 'next' or 'prev'
37
+ * @param KeyboardEvent | MouseEvent event payload
38
+ * @returns number -1 for PREV, 1 for NEXT and 0 for NOTHING
39
+ */
40
+ handleNavigationEvent(direction, event) {
41
+ if (!event) {
42
+ return NOTHING;
43
+ }
44
+ if (event instanceof KeyboardEvent) {
45
+ return this.handleKeyboardNavigationEvent(direction, event);
46
+ }
47
+ else if (event instanceof MouseEvent) {
48
+ return this.handleMouseNavigationEvent(direction, event);
49
+ }
50
+ return NOTHING;
51
+ }
52
+ /**
53
+ * Method to handle events over an image, for instance a keypress with the Keyboard or a Mouse click.
54
+ * @param event KeyboardEvent | MouseEvent payload
55
+ * @returns number 1 for NEXT and 0 for NOTHING
56
+ */
57
+ handleImageEvent(event) {
58
+ if (!event) {
59
+ return NOTHING;
60
+ }
61
+ if (event instanceof KeyboardEvent) {
62
+ return this.handleImageKeyboardEvent(event);
63
+ }
64
+ else if (event instanceof MouseEvent) {
65
+ return this.handleImageMouseEvent(event);
66
+ }
67
+ return NOTHING;
68
+ }
69
+ /**
70
+ * Private method to handle keyboard events over an image.
71
+ * @param event KeyboardEvent payload
72
+ * @returns number 1 for NEXT and 0 for NOTHING
73
+ */
74
+ handleImageKeyboardEvent(event) {
75
+ const key = event.code;
76
+ if (key === SPACE_CODE || key === ENTER_CODE) {
77
+ return NEXT;
78
+ }
79
+ return NOTHING;
80
+ }
81
+ /**
82
+ * Private method to handle mouse events over an image.
83
+ * @param MouseEvent event payload
84
+ * @returns number 1 for NEXT and 0 for NOTHING
85
+ */
86
+ handleImageMouseEvent(event) {
87
+ const mouseBtn = event.button;
88
+ if (mouseBtn === MOUSE_MAIN_BUTTON_CLICK) {
89
+ return NEXT;
90
+ }
91
+ return NOTHING;
92
+ }
93
+ /**
94
+ * Method to handle events over an image, for instance a keypress with the Keyboard or a Mouse click.
95
+ * @param string direction of the navigation that can be either 'next' or 'prev'
96
+ * @param KeyboardEvent event payload
97
+ * @returns number -1 for PREV, 1 for NEXT and 0 for NOTHING
98
+ */
99
+ handleKeyboardNavigationEvent(direction, event) {
100
+ const key = event.code;
101
+ if (key === SPACE_CODE || key === ENTER_CODE) {
102
+ return direction === DIRECTION_RIGHT ? NEXT : PREV;
103
+ }
104
+ return NOTHING;
105
+ }
106
+ /**
107
+ * Method to handle events over an image, for instance a keypress with the Keyboard or a Mouse click.
108
+ * @param string direction of the navigation that can be either 'next' or 'prev'
109
+ * @param MouseEvent event payload
110
+ * @returns number -1 for PREV, 1 for NEXT and 0 for NOTHING
111
+ */
112
+ handleMouseNavigationEvent(direction, event) {
113
+ const mouseBtn = event.button;
114
+ if (mouseBtn === MOUSE_MAIN_BUTTON_CLICK) {
115
+ return direction === DIRECTION_RIGHT ? NEXT : PREV;
116
+ }
117
+ return NOTHING;
118
+ }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AccessibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
120
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: AccessibleComponent, selector: "ks-accessible", ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
121
+ }
122
+ export { AccessibleComponent };
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AccessibleComponent, decorators: [{
124
+ type: Component,
125
+ args: [{
126
+ selector: 'ks-accessible',
127
+ template: ``,
128
+ changeDetection: ChangeDetectionStrategy.OnPush
129
+ }]
130
+ }], ctorParameters: function () { return []; } });
131
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzaWJsZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rczg5L2FuZ3VsYXItbW9kYWwtZ2FsbGVyeS9zcmMvbGliL2NvbXBvbmVudHMvYWNjZXNzaWJsZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FzQkc7QUFFSCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRW5FLE9BQU8sRUFBRSxlQUFlLEVBQUUsdUJBQXVCLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxNQUFNLDBCQUEwQix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