@progress/kendo-angular-layout 17.0.0-develop.9 → 17.0.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 (242) hide show
  1. package/avatar/avatar.component.d.ts +1 -1
  2. package/avatar/l10n/messages.d.ts +1 -1
  3. package/avatar/models/fill.d.ts +1 -1
  4. package/avatar/models/rounded.d.ts +1 -1
  5. package/avatar/models/shape.d.ts +2 -2
  6. package/avatar/models/size.d.ts +1 -1
  7. package/avatar/models/theme-color.d.ts +1 -1
  8. package/card/card-actions.component.d.ts +1 -1
  9. package/card/card.component.d.ts +1 -1
  10. package/card/directives/card-separator.directive.d.ts +1 -1
  11. package/card/models/actions-layout.d.ts +1 -1
  12. package/common/direction.d.ts +1 -1
  13. package/common/orientation.d.ts +1 -1
  14. package/drawer/drawer.component.d.ts +1 -1
  15. package/drawer/item.component.d.ts +1 -1
  16. package/drawer/list.component.d.ts +1 -1
  17. package/drawer/models/drawer-item-expand.interface.d.ts +1 -1
  18. package/drawer/models/mode.d.ts +1 -1
  19. package/drawer/models/position.d.ts +1 -1
  20. package/{esm2020 → esm2022}/avatar/avatar.component.mjs +61 -25
  21. package/{esm2020 → esm2022}/avatar/l10n/custom-messages.component.mjs +9 -8
  22. package/{esm2020 → esm2022}/avatar/l10n/localized-messages.directive.mjs +9 -8
  23. package/{esm2020 → esm2022}/avatar/l10n/messages.mjs +7 -3
  24. package/{esm2020 → esm2022}/avatar.module.mjs +4 -4
  25. package/{esm2020 → esm2022}/card/card-actions.component.mjs +37 -31
  26. package/{esm2020 → esm2022}/card/card-body.component.mjs +5 -7
  27. package/{esm2020 → esm2022}/card/card-footer.component.mjs +5 -7
  28. package/{esm2020 → esm2022}/card/card-header.component.mjs +5 -7
  29. package/{esm2020 → esm2022}/card/card.component.mjs +40 -34
  30. package/{esm2020 → esm2022}/card/directives/card-media.directive.mjs +4 -6
  31. package/{esm2020 → esm2022}/card/directives/card-separator.directive.mjs +16 -14
  32. package/{esm2020 → esm2022}/card/directives/card-subtitle.directive.mjs +4 -6
  33. package/{esm2020 → esm2022}/card/directives/card-title.directive.mjs +4 -6
  34. package/{esm2020 → esm2022}/card/models/card-action.mjs +12 -0
  35. package/{esm2020 → esm2022}/card.module.mjs +4 -4
  36. package/{esm2020 → esm2022}/common/preventable-event.mjs +7 -7
  37. package/{esm2020 → esm2022}/drawer/drawer-container.component.mjs +28 -18
  38. package/{esm2020 → esm2022}/drawer/drawer-content.component.mjs +6 -7
  39. package/{esm2020 → esm2022}/drawer/drawer.component.mjs +132 -106
  40. package/{esm2020 → esm2022}/drawer/drawer.service.mjs +10 -10
  41. package/{esm2020 → esm2022}/drawer/events/drawer-list-select.event.mjs +12 -0
  42. package/{esm2020 → esm2022}/drawer/events/select-event.mjs +16 -0
  43. package/{esm2020 → esm2022}/drawer/item.component.mjs +22 -11
  44. package/{esm2020 → esm2022}/drawer/list.component.mjs +14 -6
  45. package/{esm2020 → esm2022}/drawer/template-directives/drawer-template.directive.mjs +4 -3
  46. package/{esm2020 → esm2022}/drawer/template-directives/footer-template.directive.mjs +4 -3
  47. package/{esm2020 → esm2022}/drawer/template-directives/header-template.directive.mjs +4 -3
  48. package/{esm2020 → esm2022}/drawer/template-directives/item-template.directive.mjs +4 -3
  49. package/{esm2020 → esm2022}/drawer.module.mjs +4 -4
  50. package/{esm2020 → esm2022}/expansionpanel/events/action-event.mjs +4 -0
  51. package/{esm2020 → esm2022}/expansionpanel/expansionpanel-title.directive.mjs +4 -3
  52. package/{esm2020 → esm2022}/expansionpanel/expansionpanel.component.mjs +103 -81
  53. package/{esm2020 → esm2022}/expansionpanel.module.mjs +4 -4
  54. package/{esm2020 → esm2022}/gridlayout.module.mjs +4 -4
  55. package/{esm2020 → esm2022}/layout.module.mjs +4 -4
  56. package/{esm2020 → esm2022}/layouts/grid-layout.component.mjs +57 -26
  57. package/{esm2020 → esm2022}/layouts/gridlayout-item.component.mjs +26 -4
  58. package/{esm2020 → esm2022}/layouts/stack-layout.component.mjs +40 -35
  59. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  60. package/{esm2020 → esm2022}/panelbar/events/collapse-event.mjs +4 -0
  61. package/{esm2020 → esm2022}/panelbar/events/expand-event.mjs +4 -0
  62. package/{esm2020 → esm2022}/panelbar/events/item-click-event.mjs +8 -0
  63. package/{esm2020 → esm2022}/panelbar/events/select-event.mjs +4 -0
  64. package/{esm2020 → esm2022}/panelbar/events/state-change-event.mjs +4 -0
  65. package/{esm2020 → esm2022}/panelbar/panelbar-content.directive.mjs +4 -3
  66. package/{esm2020 → esm2022}/panelbar/panelbar-item-template.directive.mjs +4 -3
  67. package/{esm2020 → esm2022}/panelbar/panelbar-item-title.directive.mjs +4 -3
  68. package/{esm2020 → esm2022}/panelbar/panelbar-item.component.mjs +101 -66
  69. package/{esm2020 → esm2022}/panelbar/panelbar.component.mjs +109 -98
  70. package/{esm2020 → esm2022}/panelbar/panelbar.service.mjs +23 -13
  71. package/{esm2020 → esm2022}/panelbar.module.mjs +4 -4
  72. package/{esm2020 → esm2022}/splitter/splitter-bar.component.mjs +68 -28
  73. package/esm2022/splitter/splitter-pane.component.mjs +267 -0
  74. package/{esm2020 → esm2022}/splitter/splitter.component.mjs +98 -40
  75. package/{esm2020 → esm2022}/splitter/splitter.service.mjs +69 -28
  76. package/{esm2020 → esm2022}/splitter.module.mjs +4 -4
  77. package/{esm2020 → esm2022}/stacklayout.module.mjs +4 -4
  78. package/{esm2020 → esm2022}/stepper/events/activate-event.mjs +16 -0
  79. package/{esm2020 → esm2022}/stepper/list.component.mjs +23 -5
  80. package/{esm2020 → esm2022}/stepper/localization/custom-messages.component.mjs +9 -8
  81. package/{esm2020 → esm2022}/stepper/localization/localized-messages.directive.mjs +9 -8
  82. package/{esm2020 → esm2022}/stepper/localization/messages.mjs +7 -3
  83. package/{esm2020 → esm2022}/stepper/step.component.mjs +25 -8
  84. package/{esm2020 → esm2022}/stepper/stepper.component.mjs +111 -70
  85. package/{esm2020 → esm2022}/stepper/stepper.service.mjs +30 -9
  86. package/{esm2020 → esm2022}/stepper/template-directives/indicator-template.directive.mjs +4 -3
  87. package/{esm2020 → esm2022}/stepper/template-directives/label-template.directive.mjs +4 -3
  88. package/{esm2020 → esm2022}/stepper/template-directives/step-template.directive.mjs +4 -3
  89. package/{esm2020 → esm2022}/stepper.module.mjs +4 -4
  90. package/{esm2020 → esm2022}/tabstrip/directives/tab-content.directive.mjs +4 -3
  91. package/{esm2020 → esm2022}/tabstrip/directives/tab-title.directive.mjs +4 -3
  92. package/{esm2020 → esm2022}/tabstrip/directives/tab.directive.mjs +4 -3
  93. package/{esm2020 → esm2022}/tabstrip/events/select-event.mjs +2 -0
  94. package/{esm2020 → esm2022}/tabstrip/events/tabclose-event.mjs +2 -0
  95. package/{esm2020 → esm2022}/tabstrip/events/tabscroll-event.mjs +4 -0
  96. package/{esm2020 → esm2022}/tabstrip/localization/custom-messages.component.mjs +9 -8
  97. package/{esm2020 → esm2022}/tabstrip/localization/localized-messages.directive.mjs +9 -8
  98. package/{esm2020 → esm2022}/tabstrip/localization/messages.mjs +15 -3
  99. package/esm2022/tabstrip/models/tabstrip-tab.component.mjs +117 -0
  100. package/{esm2020 → esm2022}/tabstrip/rendering/tab.component.mjs +16 -9
  101. package/{esm2020 → esm2022}/tabstrip/scrollable-button.component.mjs +33 -27
  102. package/{esm2020 → esm2022}/tabstrip/tabstrip-scroll.service.mjs +11 -9
  103. package/{esm2020 → esm2022}/tabstrip/tabstrip.component.mjs +145 -111
  104. package/{esm2020 → esm2022}/tabstrip/tabstrip.service.mjs +6 -3
  105. package/{esm2020 → esm2022}/tabstrip.module.mjs +4 -4
  106. package/{esm2020 → esm2022}/tilelayout/dragging-service.mjs +39 -24
  107. package/{esm2020 → esm2022}/tilelayout/keyboard-navigation.service.mjs +9 -4
  108. package/{esm2020 → esm2022}/tilelayout/reorder-event.mjs +8 -0
  109. package/{esm2020 → esm2022}/tilelayout/resize-event.mjs +6 -0
  110. package/{esm2020 → esm2022}/tilelayout/tilelayout-item-body.component.mjs +6 -8
  111. package/esm2022/tilelayout/tilelayout-item-header.component.mjs +33 -0
  112. package/{esm2020 → esm2022}/tilelayout/tilelayout-item.component.mjs +85 -58
  113. package/{esm2020 → esm2022}/tilelayout/tilelayout-resize-handle.directive.mjs +7 -3
  114. package/{esm2020 → esm2022}/tilelayout/tilelayout.component.mjs +103 -93
  115. package/{esm2020 → esm2022}/tilelayout.module.mjs +4 -4
  116. package/{esm2020 → esm2022}/timeline/localization/custom-messages.component.mjs +9 -8
  117. package/{esm2020 → esm2022}/timeline/localization/localized-messages.directive.mjs +9 -8
  118. package/{esm2020 → esm2022}/timeline/localization/messages.mjs +11 -3
  119. package/{esm2020 → esm2022}/timeline/templates/timeline-card-actions.directive.mjs +4 -3
  120. package/{esm2020 → esm2022}/timeline/templates/timeline-card-body.directive.mjs +4 -3
  121. package/{esm2020 → esm2022}/timeline/templates/timeline-card-header.directive.mjs +4 -3
  122. package/{esm2020 → esm2022}/timeline/timeline-card.component.mjs +48 -33
  123. package/{esm2020 → esm2022}/timeline/timeline-horizontal.component.mjs +85 -55
  124. package/{esm2020 → esm2022}/timeline/timeline-vertical.component.mjs +20 -6
  125. package/{esm2020 → esm2022}/timeline/timeline.component.mjs +108 -68
  126. package/{esm2020 → esm2022}/timeline/timeline.service.mjs +4 -3
  127. package/{esm2020 → esm2022}/timeline.module.mjs +4 -4
  128. package/expansionpanel/events/action-event.d.ts +1 -1
  129. package/expansionpanel/expansionpanel.component.d.ts +1 -1
  130. package/{fesm2020 → fesm2022}/progress-kendo-angular-layout.mjs +2672 -1777
  131. package/layouts/grid-layout.component.d.ts +1 -1
  132. package/layouts/gridlayout-item.component.d.ts +1 -1
  133. package/layouts/models/layout-horizontal-align.d.ts +1 -1
  134. package/layouts/models/layout-vertical-align.d.ts +1 -1
  135. package/layouts/stack-layout.component.d.ts +1 -1
  136. package/package.json +16 -22
  137. package/panelbar/panelbar-item.component.d.ts +1 -1
  138. package/panelbar/panelbar.component.d.ts +1 -1
  139. package/schematics/ngAdd/index.js +1 -1
  140. package/splitter/splitter-bar.component.d.ts +13 -1
  141. package/splitter/splitter-pane.component.d.ts +26 -6
  142. package/splitter/splitter.component.d.ts +12 -4
  143. package/splitter/splitter.service.d.ts +7 -2
  144. package/stepper/list.component.d.ts +1 -1
  145. package/stepper/localization/messages.d.ts +1 -1
  146. package/stepper/models/orientation.d.ts +1 -1
  147. package/stepper/models/step-predicate.d.ts +1 -1
  148. package/stepper/models/step-type.d.ts +1 -1
  149. package/stepper/step.component.d.ts +1 -1
  150. package/stepper/stepper.component.d.ts +1 -1
  151. package/tabstrip/localization/messages.d.ts +1 -1
  152. package/tabstrip/models/button-state-change.d.ts +1 -1
  153. package/tabstrip/models/scroll-button-type.d.ts +1 -1
  154. package/tabstrip/models/scroll-buttons-visibility.d.ts +1 -1
  155. package/tabstrip/models/tab-alignment.d.ts +1 -1
  156. package/tabstrip/models/tab-position.d.ts +1 -1
  157. package/tabstrip/models/tabstrip-tab.component.d.ts +1 -1
  158. package/tabstrip/rendering/tab.component.d.ts +1 -1
  159. package/tabstrip/scrollable-button.component.d.ts +1 -1
  160. package/tabstrip/tabstrip.component.d.ts +1 -1
  161. package/tilelayout/models/flowmode.type.d.ts +1 -1
  162. package/tilelayout/tilelayout-item-header.component.d.ts +1 -9
  163. package/tilelayout/tilelayout-item.component.d.ts +1 -1
  164. package/tilelayout/tilelayout-resize-handle.directive.d.ts +1 -1
  165. package/tilelayout/tilelayout.component.d.ts +1 -1
  166. package/timeline/events/navigation-direction.d.ts +1 -1
  167. package/timeline/localization/messages.d.ts +1 -1
  168. package/timeline/models/anchor-target.d.ts +1 -1
  169. package/timeline/timeline-card.component.d.ts +1 -1
  170. package/timeline/timeline-horizontal.component.d.ts +2 -2
  171. package/timeline/timeline-vertical.component.d.ts +1 -1
  172. package/timeline/timeline.component.d.ts +1 -1
  173. package/esm2020/splitter/splitter-pane.component.mjs +0 -222
  174. package/esm2020/tabstrip/models/tabstrip-tab.component.mjs +0 -78
  175. package/esm2020/tilelayout/tilelayout-item-header.component.mjs +0 -53
  176. package/fesm2015/progress-kendo-angular-layout.mjs +0 -12385
  177. /package/{esm2020 → esm2022}/avatar/models/fill.mjs +0 -0
  178. /package/{esm2020 → esm2022}/avatar/models/models.mjs +0 -0
  179. /package/{esm2020 → esm2022}/avatar/models/rounded.mjs +0 -0
  180. /package/{esm2020 → esm2022}/avatar/models/shape.mjs +0 -0
  181. /package/{esm2020 → esm2022}/avatar/models/size.mjs +0 -0
  182. /package/{esm2020 → esm2022}/avatar/models/theme-color.mjs +0 -0
  183. /package/{esm2020 → esm2022}/card/models/actions-layout.mjs +0 -0
  184. /package/{esm2020 → esm2022}/common/direction.mjs +0 -0
  185. /package/{esm2020 → esm2022}/common/dom-queries.mjs +0 -0
  186. /package/{esm2020 → esm2022}/common/orientation.mjs +0 -0
  187. /package/{esm2020 → esm2022}/common/styling-classes.mjs +0 -0
  188. /package/{esm2020 → esm2022}/common/util.mjs +0 -0
  189. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  190. /package/{esm2020 → esm2022}/drawer/animations.mjs +0 -0
  191. /package/{esm2020 → esm2022}/drawer/models/constants.mjs +0 -0
  192. /package/{esm2020 → esm2022}/drawer/models/drawer-animation.interface.mjs +0 -0
  193. /package/{esm2020 → esm2022}/drawer/models/drawer-item-expand.interface.mjs +0 -0
  194. /package/{esm2020 → esm2022}/drawer/models/drawer-item.interface.mjs +0 -0
  195. /package/{esm2020 → esm2022}/drawer/models/drawer-view-item.interface.mjs +0 -0
  196. /package/{esm2020 → esm2022}/drawer/models/mode.mjs +0 -0
  197. /package/{esm2020 → esm2022}/drawer/models/position.mjs +0 -0
  198. /package/{esm2020 → esm2022}/drawer/template-directives.mjs +0 -0
  199. /package/{esm2020 → esm2022}/drawer/types.mjs +0 -0
  200. /package/{esm2020 → esm2022}/drawer/util.mjs +0 -0
  201. /package/{esm2020 → esm2022}/expansionpanel/animations.mjs +0 -0
  202. /package/{esm2020 → esm2022}/index.mjs +0 -0
  203. /package/{esm2020 → esm2022}/layouts/models/gridlayout-gap-settings.mjs +0 -0
  204. /package/{esm2020 → esm2022}/layouts/models/gridlayout-row-col-size.mjs +0 -0
  205. /package/{esm2020 → esm2022}/layouts/models/layout-align-settings.mjs +0 -0
  206. /package/{esm2020 → esm2022}/layouts/models/layout-horizontal-align.mjs +0 -0
  207. /package/{esm2020 → esm2022}/layouts/models/layout-vertical-align.mjs +0 -0
  208. /package/{esm2020 → esm2022}/layouts/models.mjs +0 -0
  209. /package/{esm2020 → esm2022}/layouts/util.mjs +0 -0
  210. /package/{esm2020 → esm2022}/panelbar/events.mjs +0 -0
  211. /package/{esm2020 → esm2022}/panelbar/panelbar-expand-mode.mjs +0 -0
  212. /package/{esm2020 → esm2022}/panelbar/panelbar-item-model.mjs +0 -0
  213. /package/{esm2020 → esm2022}/progress-kendo-angular-layout.mjs +0 -0
  214. /package/{esm2020 → esm2022}/splitter/util.mjs +0 -0
  215. /package/{esm2020 → esm2022}/stepper/models/constants.mjs +0 -0
  216. /package/{esm2020 → esm2022}/stepper/models/orientation.mjs +0 -0
  217. /package/{esm2020 → esm2022}/stepper/models/step-predicate.mjs +0 -0
  218. /package/{esm2020 → esm2022}/stepper/models/step-type.mjs +0 -0
  219. /package/{esm2020 → esm2022}/stepper/models/stepper-step.interface.mjs +0 -0
  220. /package/{esm2020 → esm2022}/stepper/template-directives.mjs +0 -0
  221. /package/{esm2020 → esm2022}/stepper/types.mjs +0 -0
  222. /package/{esm2020 → esm2022}/tabstrip/constants.mjs +0 -0
  223. /package/{esm2020 → esm2022}/tabstrip/events.mjs +0 -0
  224. /package/{esm2020 → esm2022}/tabstrip/models/button-state-change.mjs +0 -0
  225. /package/{esm2020 → esm2022}/tabstrip/models/scroll-button-type.mjs +0 -0
  226. /package/{esm2020 → esm2022}/tabstrip/models/scroll-buttons-visibility.mjs +0 -0
  227. /package/{esm2020 → esm2022}/tabstrip/models/scrollable-settings.mjs +0 -0
  228. /package/{esm2020 → esm2022}/tabstrip/models/tab-alignment.mjs +0 -0
  229. /package/{esm2020 → esm2022}/tabstrip/models/tab-position.mjs +0 -0
  230. /package/{esm2020 → esm2022}/tabstrip/util.mjs +0 -0
  231. /package/{esm2020 → esm2022}/tilelayout/constants.mjs +0 -0
  232. /package/{esm2020 → esm2022}/tilelayout/models/dragging-config.interface.mjs +0 -0
  233. /package/{esm2020 → esm2022}/tilelayout/models/flowmode.type.mjs +0 -0
  234. /package/{esm2020 → esm2022}/tilelayout/models/gap.interface.mjs +0 -0
  235. /package/{esm2020 → esm2022}/tilelayout/models/navigation.interface.mjs +0 -0
  236. /package/{esm2020 → esm2022}/tilelayout/util.mjs +0 -0
  237. /package/{esm2020 → esm2022}/timeline/events/navigation-direction.mjs +0 -0
  238. /package/{esm2020 → esm2022}/timeline/models/anchor-target.mjs +0 -0
  239. /package/{esm2020 → esm2022}/timeline/models/default-model-fields.mjs +0 -0
  240. /package/{esm2020 → esm2022}/timeline/models/model-fields.mjs +0 -0
  241. /package/{esm2020 → esm2022}/timeline/models/timeline-event.mjs +0 -0
  242. /package/{esm2020 → esm2022}/timeline/util.mjs +0 -0
@@ -0,0 +1,267 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Renderer2, Input, Output } from '@angular/core';
6
+ import { NgIf } from '@angular/common';
7
+ import { SplitterService } from './splitter.service';
8
+ import { anyChanged } from '@progress/kendo-angular-common';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "./splitter.service";
11
+ /**
12
+ * Represents the pane component of the Splitter.
13
+ */
14
+ export class SplitterPaneComponent {
15
+ element;
16
+ renderer;
17
+ cdr;
18
+ splitterService;
19
+ /**
20
+ * @hidden
21
+ */
22
+ set order(paneOrder) {
23
+ this._order = paneOrder;
24
+ this.setOrderStyles();
25
+ }
26
+ get order() {
27
+ return this._order;
28
+ }
29
+ /**
30
+ * Sets the initial size of the pane.
31
+ * Accepts units in pixel and percentage values.
32
+ * Has to be between the `min` and `max` properties.
33
+ */
34
+ set size(newSize) {
35
+ this._size = newSize;
36
+ this.renderer.setStyle(this.nativeElement, '-ms-flex-preferred-size', newSize);
37
+ this.renderer.setStyle(this.nativeElement, 'flex-basis', newSize);
38
+ this.setStaticPaneClass();
39
+ }
40
+ get size() {
41
+ return this._size;
42
+ }
43
+ /**
44
+ * Sets the HTML attributes of the splitter bar.
45
+ * The property accepts string key-value based pairs.
46
+ * Attributes which are essential for certain functionalities cannot be changed.
47
+ */
48
+ set splitterBarAttributes(attributes) {
49
+ this._splitterBarAttributes = attributes;
50
+ const splitterBar = this.splitterService.getPaneSplitterBar(this);
51
+ if (splitterBar) {
52
+ splitterBar.htmlAttributes = attributes;
53
+ }
54
+ }
55
+ get splitterBarAttributes() {
56
+ return this._splitterBarAttributes;
57
+ }
58
+ /**
59
+ * The CSS classes that will be rendered on the splitter bar.
60
+ * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
61
+ */
62
+ splitterBarClass;
63
+ /**
64
+ * Sets the minimum possible size of the pane.
65
+ * Accepts units in pixel and percentage values.
66
+ */
67
+ min;
68
+ /**
69
+ * Sets the maximum possible size of the pane.
70
+ * Accepts units in pixel and percentage values.
71
+ */
72
+ max;
73
+ /**
74
+ * Specifies if the user is allowed to resize the pane and provide space for other panes.
75
+ */
76
+ resizable = true;
77
+ /**
78
+ * Specifies if the user is allowed to hide the pane and provide space for other panes.
79
+ */
80
+ collapsible = false;
81
+ /**
82
+ * Specifies if overflowing content is scrollable or hidden.
83
+ */
84
+ scrollable = true;
85
+ /**
86
+ * Specifies if the pane is initially collapsed.
87
+ */
88
+ collapsed = false;
89
+ /**
90
+ * @hidden
91
+ */
92
+ orientation = 'horizontal';
93
+ /**
94
+ * @hidden
95
+ */
96
+ set containsSplitter(value) {
97
+ if (value) {
98
+ this.renderer.addClass(this.nativeElement, 'k-pane-flex');
99
+ }
100
+ else {
101
+ this.renderer.removeClass(this.nativeElement, 'k-pane-flex');
102
+ }
103
+ }
104
+ /**
105
+ * @hidden
106
+ */
107
+ overlayContent = false;
108
+ /**
109
+ * Fires each time the user resizes the Splitter pane.
110
+ * The event data contains the new pane size.
111
+ * Allows a two-way binding of the pane `size` property.
112
+ */
113
+ sizeChange = new EventEmitter();
114
+ /**
115
+ * Fires each time the `collapsed` property changes.
116
+ * The event data contains the new property state.
117
+ * Allows a two-way binding of the `collapsed` pane property.
118
+ */
119
+ collapsedChange = new EventEmitter();
120
+ get isHidden() {
121
+ return this.collapsed;
122
+ }
123
+ ariaRole = 'group';
124
+ hostClass = true;
125
+ get scrollablePaneClass() {
126
+ return this.scrollable;
127
+ }
128
+ get fixedSize() {
129
+ return this.size && this.size.length > 0;
130
+ }
131
+ /**
132
+ * @hidden
133
+ */
134
+ forceExpand = false;
135
+ /**
136
+ * @hidden
137
+ */
138
+ isResized = false;
139
+ _size;
140
+ _order;
141
+ _splitterBarAttributes;
142
+ constructor(element, renderer, cdr, splitterService) {
143
+ this.element = element;
144
+ this.renderer = renderer;
145
+ this.cdr = cdr;
146
+ this.splitterService = splitterService;
147
+ }
148
+ ngAfterViewChecked() {
149
+ if (this.isHidden) {
150
+ this.renderer.addClass(this.nativeElement, 'k-hidden');
151
+ this.renderer.addClass(this.nativeElement, 'hidden');
152
+ }
153
+ else {
154
+ this.renderer.removeClass(this.nativeElement, 'k-hidden');
155
+ this.renderer.removeClass(this.nativeElement, 'hidden');
156
+ }
157
+ this.setStaticPaneClass();
158
+ }
159
+ ngOnChanges(changes) {
160
+ if (anyChanged(['resizable', 'collapsible'], changes)) {
161
+ this.setStaticPaneClass();
162
+ }
163
+ }
164
+ /**
165
+ * @hidden
166
+ */
167
+ get computedSize() {
168
+ if (this.orientation === 'vertical') {
169
+ return this.nativeElement.offsetHeight;
170
+ }
171
+ else {
172
+ return this.nativeElement.offsetWidth;
173
+ }
174
+ }
175
+ /**
176
+ * @hidden
177
+ */
178
+ get nativeElement() {
179
+ return this.element.nativeElement;
180
+ }
181
+ /**
182
+ * @hidden
183
+ */
184
+ toggleOverlay(show) {
185
+ this.overlayContent = show;
186
+ this.cdr.detectChanges();
187
+ }
188
+ /**
189
+ * @hidden
190
+ */
191
+ detectChanges() {
192
+ this.cdr.detectChanges();
193
+ }
194
+ setOrderStyles() {
195
+ this.renderer.setStyle(this.nativeElement, '-ms-flex-order', this.order);
196
+ this.renderer.setStyle(this.nativeElement, 'order', this.order);
197
+ }
198
+ setStaticPaneClass() {
199
+ if (this.forceExpand) {
200
+ this.renderer.removeClass(this.nativeElement, 'k-pane-static');
201
+ return;
202
+ }
203
+ if (!this.resizable && !this.collapsible || this.fixedSize) {
204
+ this.renderer.addClass(this.nativeElement, 'k-pane-static');
205
+ }
206
+ else {
207
+ this.renderer.removeClass(this.nativeElement, 'k-pane-static');
208
+ }
209
+ }
210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterPaneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.SplitterService }], target: i0.ɵɵFactoryTarget.Component });
211
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SplitterPaneComponent, isStandalone: true, selector: "kendo-splitter-pane", inputs: { order: "order", size: "size", splitterBarAttributes: "splitterBarAttributes", splitterBarClass: "splitterBarClass", min: "min", max: "max", resizable: "resizable", collapsible: "collapsible", scrollable: "scrollable", collapsed: "collapsed", orientation: "orientation", containsSplitter: "containsSplitter", overlayContent: "overlayContent" }, outputs: { sizeChange: "sizeChange", collapsedChange: "collapsedChange" }, host: { properties: { "attr.role": "this.ariaRole", "class.k-pane": "this.hostClass", "class.k-scrollable": "this.scrollablePaneClass" } }, exportAs: ["kendoSplitterPane"], usesOnChanges: true, ngImport: i0, template: `
212
+ <ng-container *ngIf="!collapsed"><ng-content></ng-content></ng-container>
213
+ <div *ngIf="overlayContent" class="k-splitter-overlay k-overlay"></div>
214
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
215
+ }
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterPaneComponent, decorators: [{
217
+ type: Component,
218
+ args: [{
219
+ exportAs: 'kendoSplitterPane',
220
+ selector: 'kendo-splitter-pane',
221
+ template: `
222
+ <ng-container *ngIf="!collapsed"><ng-content></ng-content></ng-container>
223
+ <div *ngIf="overlayContent" class="k-splitter-overlay k-overlay"></div>
224
+ `,
225
+ standalone: true,
226
+ imports: [NgIf]
227
+ }]
228
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.SplitterService }]; }, propDecorators: { order: [{
229
+ type: Input
230
+ }], size: [{
231
+ type: Input
232
+ }], splitterBarAttributes: [{
233
+ type: Input
234
+ }], splitterBarClass: [{
235
+ type: Input
236
+ }], min: [{
237
+ type: Input
238
+ }], max: [{
239
+ type: Input
240
+ }], resizable: [{
241
+ type: Input
242
+ }], collapsible: [{
243
+ type: Input
244
+ }], scrollable: [{
245
+ type: Input
246
+ }], collapsed: [{
247
+ type: Input
248
+ }], orientation: [{
249
+ type: Input
250
+ }], containsSplitter: [{
251
+ type: Input
252
+ }], overlayContent: [{
253
+ type: Input
254
+ }], sizeChange: [{
255
+ type: Output
256
+ }], collapsedChange: [{
257
+ type: Output
258
+ }], ariaRole: [{
259
+ type: HostBinding,
260
+ args: ['attr.role']
261
+ }], hostClass: [{
262
+ type: HostBinding,
263
+ args: ['class.k-pane']
264
+ }], scrollablePaneClass: [{
265
+ type: HostBinding,
266
+ args: ['class.k-scrollable']
267
+ }] } });
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, ElementRef, EventEmitter, ContentChildren, Host, HostBinding, Inject, Input, Optional, Output, QueryList, ViewChildren, Renderer2 } from '@angular/core';
5
+ import { Component, ElementRef, EventEmitter, ContentChildren, Host, HostBinding, Inject, Input, Optional, Output, QueryList, ViewChildren, Renderer2, NgZone, isDevMode } from '@angular/core';
6
6
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
7
7
  import { validatePackage } from '@progress/kendo-licensing';
8
8
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
@@ -12,11 +12,12 @@ import { SplitterBarComponent } from './splitter-bar.component';
12
12
  import { SplitterService } from './splitter.service';
13
13
  import { isPresent } from '../common/util';
14
14
  import { DraggableDirective } from '@progress/kendo-angular-common';
15
- import { NgFor, NgIf, NgStyle } from '@angular/common';
15
+ import { NgClass, NgFor, NgIf, NgStyle } from '@angular/common';
16
16
  import * as i0 from "@angular/core";
17
17
  import * as i1 from "./splitter.service";
18
18
  import * as i2 from "@progress/kendo-angular-l10n";
19
19
  import * as i3 from "./splitter-pane.component";
20
+ const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
20
21
  /**
21
22
  * Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
22
23
  *
@@ -53,27 +54,22 @@ import * as i3 from "./splitter-pane.component";
53
54
  * ```
54
55
  */
55
56
  export class SplitterComponent {
56
- constructor(element, splitterService, localization, renderer, enclosingPane) {
57
- this.element = element;
58
- this.splitterService = splitterService;
59
- this.localization = localization;
60
- this.renderer = renderer;
61
- this.enclosingPane = enclosingPane;
62
- /**
63
- * Specifies the orientation of the panes within the Splitter.
64
- * Panes in a horizontal Splitter are placed horizontally.
65
- * Panes in a vertical Splitter are placed vertically.
66
- */
67
- this.orientation = 'horizontal';
68
- validatePackage(packageMetadata);
69
- if (enclosingPane) {
70
- enclosingPane.containsSplitter = true;
71
- }
72
- // the handler only runs in NgZone if there are bound handlers
73
- // this line merges both streams
74
- this.layoutChange = this.splitterService.layoutChange;
75
- this.configure = this.configure.bind(this);
76
- }
57
+ element;
58
+ splitterService;
59
+ localization;
60
+ renderer;
61
+ ngZone;
62
+ enclosingPane;
63
+ /**
64
+ * Specifies the orientation of the panes within the Splitter.
65
+ * Panes in a horizontal Splitter are placed horizontally.
66
+ * Panes in a vertical Splitter are placed vertically.
67
+ */
68
+ orientation = 'horizontal';
69
+ /**
70
+ * Sets the width or height (depending on the orientation) of the Splitter splitbars in pixels.
71
+ */
72
+ splitbarWidth;
77
73
  /**
78
74
  * The distance in pixels that the separator is moved with during keyboard navigation.
79
75
  * @default 10
@@ -84,6 +80,17 @@ export class SplitterComponent {
84
80
  get resizeStep() {
85
81
  return this.splitterService.resizeStep;
86
82
  }
83
+ /**
84
+ * The CSS classes that will be rendered on the splitter bars.
85
+ * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
86
+ */
87
+ splitterBarClass;
88
+ /**
89
+ * Fires after a Splitter pane is resized or collapsed.
90
+ * Useful for triggering layout calculations on components
91
+ * which are positioned inside the panes.
92
+ */
93
+ layoutChange;
87
94
  get hostClasses() {
88
95
  return true;
89
96
  }
@@ -97,6 +104,7 @@ export class SplitterComponent {
97
104
  return this.direction;
98
105
  }
99
106
  set splitbars(splitbars) {
107
+ this.splitterService.splitterBars = splitbars ? splitbars.toArray() : [];
100
108
  if (!isPresent(splitbars) || !isPresent(this.panes)) {
101
109
  return;
102
110
  }
@@ -109,15 +117,54 @@ export class SplitterComponent {
109
117
  .sort((a, b) => a.order - b.order);
110
118
  const elements = components.map(component => component.element.nativeElement);
111
119
  panesArray.forEach((pane, i) => {
112
- if (splitBarsArray[i] && pane.separatorLabel) {
113
- const splitbar = splitBarsArray[i].element.nativeElement;
114
- this.renderer.setAttribute(splitbar, 'aria-label', pane.separatorLabel);
120
+ const splitbar = splitBarsArray[i];
121
+ if (splitbar && pane.splitterBarAttributes) {
122
+ splitbar.htmlAttributes = pane.splitterBarAttributes;
115
123
  }
116
124
  });
117
125
  elements.forEach(element => this.renderer.appendChild(this.element.nativeElement, element));
118
126
  }
127
+ /**
128
+ * @hidden
129
+ */
130
+ panes;
131
+ paneChangesSubscription;
132
+ _styleObserver;
133
+ constructor(element, splitterService, localization, renderer, ngZone, enclosingPane) {
134
+ this.element = element;
135
+ this.splitterService = splitterService;
136
+ this.localization = localization;
137
+ this.renderer = renderer;
138
+ this.ngZone = ngZone;
139
+ this.enclosingPane = enclosingPane;
140
+ validatePackage(packageMetadata);
141
+ if (enclosingPane) {
142
+ enclosingPane.containsSplitter = true;
143
+ }
144
+ // the handler only runs in NgZone if there are bound handlers
145
+ // this line merges both streams
146
+ this.layoutChange = this.splitterService.layoutChange;
147
+ this.configure = this.configure.bind(this);
148
+ }
119
149
  ngAfterContentInit() {
150
+ if (!isDocumentAvailable()) {
151
+ return;
152
+ }
120
153
  this.reconfigure();
154
+ this.setFixedHeight();
155
+ const allHaveFixedSize = this.panes.length && Array.from(this.panes).every(p => p.fixedSize);
156
+ if (allHaveFixedSize && isDevMode()) {
157
+ throw new Error(`
158
+ The Splitter should have at least one pane without a set size.
159
+ See ${SIZING_DOC_LINK} for more information.
160
+ `);
161
+ }
162
+ this._styleObserver = new MutationObserver(() => {
163
+ this.ngZone.runOutsideAngular(() => {
164
+ this.setFixedHeight();
165
+ });
166
+ });
167
+ this._styleObserver.observe(this.element.nativeElement, { attributeFilter: ['style'] });
121
168
  }
122
169
  ngOnChanges(changes) {
123
170
  if (changes.orientation && !changes.orientation.isFirstChange()) {
@@ -128,6 +175,10 @@ export class SplitterComponent {
128
175
  if (this.enclosingPane) {
129
176
  this.enclosingPane.containsSplitter = false;
130
177
  }
178
+ if (this._styleObserver) {
179
+ this._styleObserver.disconnect();
180
+ this._styleObserver = null;
181
+ }
131
182
  this.unsubscribeChanges();
132
183
  }
133
184
  reconfigure() {
@@ -159,16 +210,18 @@ export class SplitterComponent {
159
210
  get direction() {
160
211
  return this.localization.rtl ? 'rtl' : 'ltr';
161
212
  }
162
- }
163
- SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: i1.SplitterService }, { token: i2.LocalizationService }, { token: i0.Renderer2 }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
164
- SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
165
- SplitterService,
166
- LocalizationService,
167
- {
168
- provide: L10N_PREFIX,
169
- useValue: 'kendo.spliter'
170
- }
171
- ], queries: [{ propertyName: "panes", predicate: SplitterPaneComponent }], viewQueries: [{ propertyName: "splitbars", predicate: SplitterBarComponent, descendants: true }], exportAs: ["kendoSplitter"], usesOnChanges: true, ngImport: i0, template: `
213
+ setFixedHeight() {
214
+ this.splitterService.fixedHeight = getComputedStyle(this.element.nativeElement).getPropertyValue('height') !== 'auto';
215
+ }
216
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: i1.SplitterService }, { token: i2.LocalizationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
217
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep", splitterBarClass: "splitterBarClass" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
218
+ SplitterService,
219
+ LocalizationService,
220
+ {
221
+ provide: L10N_PREFIX,
222
+ useValue: 'kendo.spliter'
223
+ }
224
+ ], queries: [{ propertyName: "panes", predicate: SplitterPaneComponent }], viewQueries: [{ propertyName: "splitbars", predicate: SplitterBarComponent, descendants: true }], exportAs: ["kendoSplitter"], usesOnChanges: true, ngImport: i0, template: `
172
225
  <ng-content select="kendo-splitter-pane"></ng-content>
173
226
  <ng-container *ngFor="
174
227
  let pane of panes;
@@ -180,14 +233,16 @@ SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
180
233
  *ngIf="!last"
181
234
  [index]="index"
182
235
  [orientation]="orientation"
236
+ [ngClass]="pane.splitterBarClass || splitterBarClass"
183
237
  [ngStyle]="{
184
238
  width: orientation === 'horizontal' ? splitbarWidth + 'px' : undefined,
185
239
  height: orientation === 'vertical' ? splitbarWidth + 'px' : undefined
186
240
  }">
187
241
  </kendo-splitter-bar>
188
242
  </ng-container>
189
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SplitterBarComponent, selector: "kendo-splitter-bar", inputs: ["orientation", "index"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, decorators: [{
243
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SplitterBarComponent, selector: "kendo-splitter-bar", inputs: ["orientation", "index", "htmlAttributes"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
244
+ }
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterComponent, decorators: [{
191
246
  type: Component,
192
247
  args: [{
193
248
  exportAs: 'kendoSplitter',
@@ -212,6 +267,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
212
267
  *ngIf="!last"
213
268
  [index]="index"
214
269
  [orientation]="orientation"
270
+ [ngClass]="pane.splitterBarClass || splitterBarClass"
215
271
  [ngStyle]="{
216
272
  width: orientation === 'horizontal' ? splitbarWidth + 'px' : undefined,
217
273
  height: orientation === 'vertical' ? splitbarWidth + 'px' : undefined
@@ -220,9 +276,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
220
276
  </ng-container>
221
277
  `,
222
278
  standalone: true,
223
- imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle]
279
+ imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle, NgClass]
224
280
  }]
225
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.SplitterService }, { type: i2.LocalizationService }, { type: i0.Renderer2 }, { type: i3.SplitterPaneComponent, decorators: [{
281
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.SplitterService }, { type: i2.LocalizationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i3.SplitterPaneComponent, decorators: [{
226
282
  type: Optional
227
283
  }, {
228
284
  type: Host
@@ -235,6 +291,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
235
291
  type: Input
236
292
  }], resizeStep: [{
237
293
  type: Input
294
+ }], splitterBarClass: [{
295
+ type: Input
238
296
  }], layoutChange: [{
239
297
  type: Output
240
298
  }], hostClasses: [{
@@ -2,20 +2,23 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { isDevMode, EventEmitter, NgZone, Injectable } from '@angular/core';
6
- import { Keys } from '@progress/kendo-angular-common';
5
+ import { EventEmitter, NgZone, Injectable } from '@angular/core';
6
+ import { isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
7
7
  import { shouldTogglePrev, shouldToggleNext } from './util';
8
8
  import * as i0 from "@angular/core";
9
- const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
9
+ const MAX_PANE_HEIGHT = 33554400;
10
10
  /**
11
11
  * @hidden
12
12
  */
13
13
  export class SplitterService {
14
+ zone;
15
+ panes;
16
+ splitterBars;
17
+ layoutChange = new EventEmitter();
18
+ resizeStep = 10;
19
+ fixedHeight;
14
20
  constructor(zone) {
15
21
  this.zone = zone;
16
- this.layoutChange = new EventEmitter();
17
- this.resizeStep = 10;
18
- this.containerSize = () => { };
19
22
  }
20
23
  tryToggle(paneIndex) {
21
24
  const pane = this.pane(paneIndex);
@@ -79,10 +82,10 @@ export class SplitterService {
79
82
  }
80
83
  setSize(state, delta) {
81
84
  const clamp = (min, max, v) => Math.min(max, Math.max(min, v));
82
- const resize = (paneState, change) => {
85
+ const resize = (paneState, change, modifyMax = false) => {
83
86
  const pane = this.pane(paneState.index);
84
87
  const splitterSize = this.containerSize();
85
- const newSize = clamp(paneState.min, paneState.max, paneState.initialSize + change);
88
+ const newSize = clamp(paneState.min, modifyMax ? MAX_PANE_HEIGHT : paneState.max, paneState.initialSize + change);
86
89
  let size = "";
87
90
  if (this.isPercent(pane.size)) {
88
91
  size = (100 * newSize / splitterSize) + "%";
@@ -94,26 +97,56 @@ export class SplitterService {
94
97
  pane.isResized = true;
95
98
  this.emit(pane.sizeChange, size);
96
99
  };
97
- // resizing both panes
98
- resize(state.prev, delta);
99
- resize(state.next, -delta);
100
+ const prevPane = this.pane(state.prev.index);
101
+ const nextPane = this.pane(state.next.index);
102
+ const canResizeBothPanes = this.panes.length > 2;
103
+ const modifyPrevMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !prevPane.max;
104
+ const modifyNextMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !nextPane.max;
105
+ if (prevPane.fixedSize && nextPane.fixedSize || canResizeBothPanes) {
106
+ const bothVertical = prevPane.orientation === 'vertical' && nextPane.orientation === 'vertical';
107
+ if (bothVertical) {
108
+ if (modifyNextMax) {
109
+ resize(state.prev, delta, modifyPrevMax);
110
+ }
111
+ else if (modifyPrevMax) {
112
+ resize(state.next, -delta, modifyNextMax);
113
+ }
114
+ else {
115
+ resize(state.prev, delta, modifyNextMax);
116
+ resize(state.next, -delta, modifyPrevMax);
117
+ }
118
+ }
119
+ else {
120
+ resize(state.prev, delta);
121
+ resize(state.next, -delta);
122
+ }
123
+ }
124
+ else if (nextPane.fixedSize || nextPane.collapsible) {
125
+ resize(state.next, -delta, modifyNextMax);
126
+ }
127
+ else {
128
+ resize(state.prev, delta, modifyPrevMax);
129
+ }
100
130
  this.emit(this.layoutChange, {});
101
131
  }
102
132
  isDraggable(splitBarIndex) {
103
133
  const prev = this.pane(splitBarIndex);
104
134
  const next = this.pane(splitBarIndex + 1);
105
- const betweenResizablePanes = prev.resizable && next.resizable;
106
- const nearCollapsedPane = prev.collapsed || next.collapsed;
135
+ const betweenResizablePanes = prev?.resizable && next?.resizable;
136
+ const nearCollapsedPane = prev?.collapsed || next?.collapsed;
107
137
  return betweenResizablePanes && !nearCollapsedPane;
108
138
  }
109
139
  isStatic(splitBarIndex) {
110
140
  const prev = this.pane(splitBarIndex);
111
141
  const next = this.pane(splitBarIndex + 1);
112
- const betweenResizablePanes = prev.resizable && next.resizable;
113
- const nearCollapsiblePane = prev.collapsible || next.collapsible;
142
+ const betweenResizablePanes = prev?.resizable && next?.resizable;
143
+ const nearCollapsiblePane = prev?.collapsible || next?.collapsible;
114
144
  return !betweenResizablePanes && !nearCollapsiblePane;
115
145
  }
116
146
  pane(index) {
147
+ if (!isDocumentAvailable()) {
148
+ return;
149
+ }
117
150
  if (!this.panes) {
118
151
  throw new Error("Panes not initialized");
119
152
  }
@@ -122,25 +155,33 @@ export class SplitterService {
122
155
  }
123
156
  return this.panes[index];
124
157
  }
158
+ paneByIndex(pane) {
159
+ if (!this.panes) {
160
+ return -1;
161
+ }
162
+ return this.panes.findIndex(splitterPane => splitterPane === pane);
163
+ }
164
+ getPaneSplitterBar(pane) {
165
+ if (!this.splitterBars) {
166
+ return;
167
+ }
168
+ const paneIndex = this.paneByIndex(pane);
169
+ if (paneIndex < 0 || paneIndex >= this.splitterBars.length) {
170
+ return null;
171
+ }
172
+ return this.splitterBars[paneIndex];
173
+ }
125
174
  configure({ panes, orientation, containerSize, direction }) {
126
175
  this.panes = panes;
127
176
  this.panes.forEach((pane, index) => {
128
177
  pane.order = index * 2;
129
178
  pane.orientation = orientation;
130
179
  });
131
- if (isDevMode()) {
132
- const allPanesWithSize = panes.length && !panes.some(pane => !pane.fixedSize);
133
- const hasResizedPane = panes.length && panes.some(pane => pane.isResized);
134
- if (allPanesWithSize && !hasResizedPane) {
135
- throw new Error(`
136
- The Splitter should have at least one pane without a set size.
137
- See ${SIZING_DOC_LINK} for more information.
138
- `);
139
- }
140
- }
141
180
  this.containerSize = containerSize;
142
181
  this.rtl = direction === 'rtl';
143
182
  }
183
+ containerSize = () => { };
184
+ rtl;
144
185
  isPercent(size) {
145
186
  return /%$/.test(size);
146
187
  }
@@ -156,9 +197,9 @@ export class SplitterService {
156
197
  this.zone.run(() => emitter.emit(args));
157
198
  }
158
199
  }
200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
201
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterService });
159
202
  }
160
- SplitterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
161
- SplitterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService });
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService, decorators: [{
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SplitterService, decorators: [{
163
204
  type: Injectable
164
205
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });