@angular/cdk 19.0.0-next.0 → 19.0.0-next.2

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 (313) hide show
  1. package/a11y/index.d.ts +5 -1
  2. package/drag-drop/index.d.ts +1 -4
  3. package/fesm2022/a11y.mjs +21 -11
  4. package/fesm2022/a11y.mjs.map +1 -1
  5. package/fesm2022/cdk.mjs +1 -1
  6. package/fesm2022/cdk.mjs.map +1 -1
  7. package/fesm2022/drag-drop.mjs +17 -26
  8. package/fesm2022/drag-drop.mjs.map +1 -1
  9. package/fesm2022/overlay.mjs +20 -1
  10. package/fesm2022/overlay.mjs.map +1 -1
  11. package/fesm2022/platform.mjs +5 -8
  12. package/fesm2022/platform.mjs.map +1 -1
  13. package/fesm2022/private.mjs +52 -0
  14. package/fesm2022/private.mjs.map +1 -0
  15. package/fesm2022/testing/testbed.mjs +3 -2
  16. package/fesm2022/testing/testbed.mjs.map +1 -1
  17. package/fesm2022/text-field.mjs +17 -2
  18. package/fesm2022/text-field.mjs.map +1 -1
  19. package/fesm2022/tree.mjs +13 -7
  20. package/fesm2022/tree.mjs.map +1 -1
  21. package/overlay/_index.scss +15 -13
  22. package/overlay/index.d.ts +5 -0
  23. package/overlay-prebuilt.css +1 -1
  24. package/package.json +5 -55
  25. package/platform/index.d.ts +2 -1
  26. package/private/index.d.ts +21 -0
  27. package/schematics/ng-add/index.js +1 -1
  28. package/schematics/ng-add/index.mjs +1 -1
  29. package/text-field/index.d.ts +1 -0
  30. package/tree/index.d.ts +3 -1
  31. package/esm2022/a11y/a11y-module.mjs +0 -31
  32. package/esm2022/a11y/a11y_public_index.mjs +0 -5
  33. package/esm2022/a11y/aria-describer/aria-describer.mjs +0 -232
  34. package/esm2022/a11y/aria-describer/aria-reference.mjs +0 -47
  35. package/esm2022/a11y/fake-event-detection.mjs +0 -29
  36. package/esm2022/a11y/focus-monitor/focus-monitor.mjs +0 -468
  37. package/esm2022/a11y/focus-trap/configurable-focus-trap-config.mjs +0 -9
  38. package/esm2022/a11y/focus-trap/configurable-focus-trap-factory.mjs +0 -54
  39. package/esm2022/a11y/focus-trap/configurable-focus-trap.mjs +0 -51
  40. package/esm2022/a11y/focus-trap/event-listener-inert-strategy.mjs +0 -61
  41. package/esm2022/a11y/focus-trap/focus-trap-inert-strategy.mjs +0 -11
  42. package/esm2022/a11y/focus-trap/focus-trap-manager.mjs +0 -53
  43. package/esm2022/a11y/focus-trap/focus-trap.mjs +0 -396
  44. package/esm2022/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +0 -116
  45. package/esm2022/a11y/index.mjs +0 -9
  46. package/esm2022/a11y/input-modality/input-modality-detector.mjs +0 -176
  47. package/esm2022/a11y/interactivity-checker/interactivity-checker.mjs +0 -238
  48. package/esm2022/a11y/key-manager/activedescendant-key-manager.mjs +0 -20
  49. package/esm2022/a11y/key-manager/focus-key-manager.mjs +0 -29
  50. package/esm2022/a11y/key-manager/list-key-manager.mjs +0 -357
  51. package/esm2022/a11y/key-manager/noop-tree-key-manager.mjs +0 -94
  52. package/esm2022/a11y/key-manager/tree-key-manager-strategy.mjs +0 -9
  53. package/esm2022/a11y/key-manager/tree-key-manager.mjs +0 -345
  54. package/esm2022/a11y/key-manager/typeahead.mjs +0 -91
  55. package/esm2022/a11y/live-announcer/live-announcer-tokens.mjs +0 -19
  56. package/esm2022/a11y/live-announcer/live-announcer.mjs +0 -210
  57. package/esm2022/a11y/public-api.mjs +0 -30
  58. package/esm2022/accordion/accordion-item.mjs +0 -162
  59. package/esm2022/accordion/accordion-module.mjs +0 -24
  60. package/esm2022/accordion/accordion.mjs +0 -65
  61. package/esm2022/accordion/accordion_public_index.mjs +0 -5
  62. package/esm2022/accordion/index.mjs +0 -9
  63. package/esm2022/accordion/public-api.mjs +0 -11
  64. package/esm2022/bidi/bidi-module.mjs +0 -23
  65. package/esm2022/bidi/bidi_public_index.mjs +0 -5
  66. package/esm2022/bidi/dir-document-token.mjs +0 -33
  67. package/esm2022/bidi/dir.mjs +0 -70
  68. package/esm2022/bidi/directionality.mjs +0 -52
  69. package/esm2022/bidi/index.mjs +0 -9
  70. package/esm2022/bidi/public-api.mjs +0 -12
  71. package/esm2022/clipboard/clipboard-module.mjs +0 -23
  72. package/esm2022/clipboard/clipboard.mjs +0 -53
  73. package/esm2022/clipboard/clipboard_public_index.mjs +0 -5
  74. package/esm2022/clipboard/copy-to-clipboard.mjs +0 -100
  75. package/esm2022/clipboard/index.mjs +0 -9
  76. package/esm2022/clipboard/pending-copy.mjs +0 -71
  77. package/esm2022/clipboard/public-api.mjs +0 -12
  78. package/esm2022/coercion/array.mjs +0 -11
  79. package/esm2022/coercion/boolean-property.mjs +0 -12
  80. package/esm2022/coercion/css-pixel-value.mjs +0 -15
  81. package/esm2022/coercion/element.mjs +0 -16
  82. package/esm2022/coercion/index.mjs +0 -9
  83. package/esm2022/coercion/number-property.mjs +0 -24
  84. package/esm2022/coercion/private/index.mjs +0 -9
  85. package/esm2022/coercion/private/observable.mjs +0 -19
  86. package/esm2022/coercion/private/private_public_index.mjs +0 -5
  87. package/esm2022/coercion/public-api.mjs +0 -14
  88. package/esm2022/coercion/string-array.mjs +0 -38
  89. package/esm2022/collections/array-data-source.mjs +0 -21
  90. package/esm2022/collections/collection-viewer.mjs +0 -9
  91. package/esm2022/collections/collections_public_index.mjs +0 -5
  92. package/esm2022/collections/data-source.mjs +0 -19
  93. package/esm2022/collections/dispose-view-repeater-strategy.mjs +0 -48
  94. package/esm2022/collections/index.mjs +0 -9
  95. package/esm2022/collections/public-api.mjs +0 -17
  96. package/esm2022/collections/recycle-view-repeater-strategy.mjs +0 -129
  97. package/esm2022/collections/selection-model.mjs +0 -225
  98. package/esm2022/collections/tree-adapter.mjs +0 -9
  99. package/esm2022/collections/unique-selection-dispatcher.mjs +0 -55
  100. package/esm2022/collections/view-repeater.mjs +0 -26
  101. package/esm2022/dialog/dialog-config.mjs +0 -70
  102. package/esm2022/dialog/dialog-container.mjs +0 -308
  103. package/esm2022/dialog/dialog-injectors.mjs +0 -40
  104. package/esm2022/dialog/dialog-module.mjs +0 -40
  105. package/esm2022/dialog/dialog-ref.mjs +0 -85
  106. package/esm2022/dialog/dialog.mjs +0 -303
  107. package/esm2022/dialog/dialog_public_index.mjs +0 -5
  108. package/esm2022/dialog/index.mjs +0 -9
  109. package/esm2022/dialog/public-api.mjs +0 -14
  110. package/esm2022/drag-drop/directives/assertions.mjs +0 -18
  111. package/esm2022/drag-drop/directives/config.mjs +0 -14
  112. package/esm2022/drag-drop/directives/drag-handle.mjs +0 -68
  113. package/esm2022/drag-drop/directives/drag-placeholder.mjs +0 -43
  114. package/esm2022/drag-drop/directives/drag-preview.mjs +0 -48
  115. package/esm2022/drag-drop/directives/drag.mjs +0 -520
  116. package/esm2022/drag-drop/directives/drop-list-group.mjs +0 -47
  117. package/esm2022/drag-drop/directives/drop-list.mjs +0 -352
  118. package/esm2022/drag-drop/dom/clone-node.mjs +0 -65
  119. package/esm2022/drag-drop/dom/dom-rect.mjs +0 -64
  120. package/esm2022/drag-drop/dom/parent-position-tracker.mjs +0 -76
  121. package/esm2022/drag-drop/dom/root-node.mjs +0 -21
  122. package/esm2022/drag-drop/dom/styling.mjs +0 -89
  123. package/esm2022/drag-drop/dom/transition-duration.mjs +0 -36
  124. package/esm2022/drag-drop/drag-drop-module.mjs +0 -49
  125. package/esm2022/drag-drop/drag-drop-registry.mjs +0 -266
  126. package/esm2022/drag-drop/drag-drop.mjs +0 -57
  127. package/esm2022/drag-drop/drag-drop_public_index.mjs +0 -5
  128. package/esm2022/drag-drop/drag-events.mjs +0 -9
  129. package/esm2022/drag-drop/drag-parent.mjs +0 -16
  130. package/esm2022/drag-drop/drag-ref.mjs +0 -1097
  131. package/esm2022/drag-drop/drag-utils.mjs +0 -60
  132. package/esm2022/drag-drop/drop-list-ref.mjs +0 -672
  133. package/esm2022/drag-drop/index.mjs +0 -9
  134. package/esm2022/drag-drop/preview-ref.mjs +0 -117
  135. package/esm2022/drag-drop/public-api.mjs +0 -23
  136. package/esm2022/drag-drop/sorting/drop-list-sort-strategy.mjs +0 -9
  137. package/esm2022/drag-drop/sorting/mixed-sort-strategy.mjs +0 -246
  138. package/esm2022/drag-drop/sorting/single-axis-sort-strategy.mjs +0 -343
  139. package/esm2022/index.mjs +0 -9
  140. package/esm2022/keycodes/index.mjs +0 -9
  141. package/esm2022/keycodes/keycodes.mjs +0 -127
  142. package/esm2022/keycodes/keycodes_public_index.mjs +0 -5
  143. package/esm2022/keycodes/modifiers.mjs +0 -18
  144. package/esm2022/keycodes/public-api.mjs +0 -10
  145. package/esm2022/layout/breakpoints-observer.mjs +0 -105
  146. package/esm2022/layout/breakpoints.mjs +0 -29
  147. package/esm2022/layout/index.mjs +0 -9
  148. package/esm2022/layout/layout-module.mjs +0 -19
  149. package/esm2022/layout/layout_public_index.mjs +0 -5
  150. package/esm2022/layout/media-matcher.mjs +0 -94
  151. package/esm2022/layout/public-api.mjs +0 -12
  152. package/esm2022/listbox/index.mjs +0 -9
  153. package/esm2022/listbox/listbox-module.mjs +0 -24
  154. package/esm2022/listbox/listbox.mjs +0 -888
  155. package/esm2022/listbox/listbox_public_index.mjs +0 -5
  156. package/esm2022/listbox/public-api.mjs +0 -10
  157. package/esm2022/menu/context-menu-trigger.mjs +0 -221
  158. package/esm2022/menu/event-detection.mjs +0 -28
  159. package/esm2022/menu/index.mjs +0 -9
  160. package/esm2022/menu/menu-aim.mjs +0 -204
  161. package/esm2022/menu/menu-bar.mjs +0 -134
  162. package/esm2022/menu/menu-base.mjs +0 -192
  163. package/esm2022/menu/menu-errors.mjs +0 -22
  164. package/esm2022/menu/menu-group.mjs +0 -31
  165. package/esm2022/menu/menu-interface.mjs +0 -11
  166. package/esm2022/menu/menu-item-checkbox.mjs +0 -50
  167. package/esm2022/menu/menu-item-radio.mjs +0 -72
  168. package/esm2022/menu/menu-item-selectable.mjs +0 -36
  169. package/esm2022/menu/menu-item.mjs +0 -270
  170. package/esm2022/menu/menu-module.mjs +0 -60
  171. package/esm2022/menu/menu-stack.mjs +0 -163
  172. package/esm2022/menu/menu-trigger-base.mjs +0 -119
  173. package/esm2022/menu/menu-trigger.mjs +0 -313
  174. package/esm2022/menu/menu.mjs +0 -135
  175. package/esm2022/menu/menu_public_index.mjs +0 -5
  176. package/esm2022/menu/pointer-focus-tracker.mjs +0 -51
  177. package/esm2022/menu/public-api.mjs +0 -24
  178. package/esm2022/observers/index.mjs +0 -9
  179. package/esm2022/observers/observe-content.mjs +0 -216
  180. package/esm2022/observers/observers_public_index.mjs +0 -5
  181. package/esm2022/observers/private/index.mjs +0 -9
  182. package/esm2022/observers/private/private_public_index.mjs +0 -5
  183. package/esm2022/observers/private/shared-resize-observer.mjs +0 -125
  184. package/esm2022/observers/public-api.mjs +0 -9
  185. package/esm2022/overlay/dispatchers/base-overlay-dispatcher.mjs +0 -52
  186. package/esm2022/overlay/dispatchers/index.mjs +0 -10
  187. package/esm2022/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +0 -81
  188. package/esm2022/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +0 -151
  189. package/esm2022/overlay/fullscreen-overlay-container.mjs +0 -94
  190. package/esm2022/overlay/index.mjs +0 -9
  191. package/esm2022/overlay/overlay-config.mjs +0 -45
  192. package/esm2022/overlay/overlay-container.mjs +0 -81
  193. package/esm2022/overlay/overlay-directives.mjs +0 -432
  194. package/esm2022/overlay/overlay-module.mjs +0 -28
  195. package/esm2022/overlay/overlay-ref.mjs +0 -437
  196. package/esm2022/overlay/overlay.mjs +0 -126
  197. package/esm2022/overlay/overlay_public_index.mjs +0 -5
  198. package/esm2022/overlay/position/connected-position.mjs +0 -88
  199. package/esm2022/overlay/position/flexible-connected-position-strategy.mjs +0 -1002
  200. package/esm2022/overlay/position/global-position-strategy.mjs +0 -237
  201. package/esm2022/overlay/position/overlay-position-builder.mjs +0 -50
  202. package/esm2022/overlay/position/position-strategy.mjs +0 -9
  203. package/esm2022/overlay/position/scroll-clip.mjs +0 -40
  204. package/esm2022/overlay/public-api.mjs +0 -22
  205. package/esm2022/overlay/scroll/block-scroll-strategy.mjs +0 -80
  206. package/esm2022/overlay/scroll/close-scroll-strategy.mjs +0 -65
  207. package/esm2022/overlay/scroll/index.mjs +0 -14
  208. package/esm2022/overlay/scroll/noop-scroll-strategy.mjs +0 -17
  209. package/esm2022/overlay/scroll/reposition-scroll-strategy.mjs +0 -61
  210. package/esm2022/overlay/scroll/scroll-strategy-options.mjs +0 -55
  211. package/esm2022/overlay/scroll/scroll-strategy.mjs +0 -14
  212. package/esm2022/platform/features/input-types.mjs +0 -59
  213. package/esm2022/platform/features/passive-listeners.mjs +0 -36
  214. package/esm2022/platform/features/scrolling.mjs +0 -104
  215. package/esm2022/platform/features/shadow-dom.mjs +0 -54
  216. package/esm2022/platform/features/test-environment.mjs +0 -24
  217. package/esm2022/platform/index.mjs +0 -9
  218. package/esm2022/platform/platform-module.mjs +0 -19
  219. package/esm2022/platform/platform.mjs +0 -85
  220. package/esm2022/platform/platform_public_index.mjs +0 -5
  221. package/esm2022/platform/public-api.mjs +0 -15
  222. package/esm2022/portal/dom-portal-outlet.mjs +0 -158
  223. package/esm2022/portal/index.mjs +0 -9
  224. package/esm2022/portal/portal-directives.mjs +0 -251
  225. package/esm2022/portal/portal-errors.mjs +0 -51
  226. package/esm2022/portal/portal-injector.mjs +0 -28
  227. package/esm2022/portal/portal.mjs +0 -189
  228. package/esm2022/portal/portal_public_index.mjs +0 -5
  229. package/esm2022/portal/public-api.mjs +0 -12
  230. package/esm2022/public-api.mjs +0 -9
  231. package/esm2022/scrolling/fixed-size-virtual-scroll.mjs +0 -218
  232. package/esm2022/scrolling/index.mjs +0 -9
  233. package/esm2022/scrolling/public-api.mjs +0 -20
  234. package/esm2022/scrolling/scroll-dispatcher.mjs +0 -163
  235. package/esm2022/scrolling/scrollable.mjs +0 -177
  236. package/esm2022/scrolling/scrolling-module.mjs +0 -69
  237. package/esm2022/scrolling/scrolling_public_index.mjs +0 -5
  238. package/esm2022/scrolling/viewport-ruler.mjs +0 -146
  239. package/esm2022/scrolling/virtual-for-of.mjs +0 -299
  240. package/esm2022/scrolling/virtual-scroll-repeater.mjs +0 -9
  241. package/esm2022/scrolling/virtual-scroll-strategy.mjs +0 -11
  242. package/esm2022/scrolling/virtual-scroll-viewport.mjs +0 -445
  243. package/esm2022/scrolling/virtual-scrollable-element.mjs +0 -42
  244. package/esm2022/scrolling/virtual-scrollable-window.mjs +0 -41
  245. package/esm2022/scrolling/virtual-scrollable.mjs +0 -40
  246. package/esm2022/stepper/index.mjs +0 -9
  247. package/esm2022/stepper/public-api.mjs +0 -13
  248. package/esm2022/stepper/step-header.mjs +0 -31
  249. package/esm2022/stepper/step-label.mjs +0 -24
  250. package/esm2022/stepper/stepper-button.mjs +0 -58
  251. package/esm2022/stepper/stepper-module.mjs +0 -41
  252. package/esm2022/stepper/stepper.mjs +0 -452
  253. package/esm2022/stepper/stepper_public_index.mjs +0 -5
  254. package/esm2022/table/can-stick.mjs +0 -46
  255. package/esm2022/table/cell.mjs +0 -245
  256. package/esm2022/table/coalesced-style-scheduler.mjs +0 -79
  257. package/esm2022/table/index.mjs +0 -9
  258. package/esm2022/table/public-api.mjs +0 -20
  259. package/esm2022/table/row.mjs +0 -317
  260. package/esm2022/table/sticky-position-listener.mjs +0 -11
  261. package/esm2022/table/sticky-styler.mjs +0 -347
  262. package/esm2022/table/table-errors.mjs +0 -67
  263. package/esm2022/table/table-module.mjs +0 -93
  264. package/esm2022/table/table.mjs +0 -1148
  265. package/esm2022/table/table_public_index.mjs +0 -5
  266. package/esm2022/table/text-column.mjs +0 -154
  267. package/esm2022/table/tokens.mjs +0 -16
  268. package/esm2022/testing/change-detection.mjs +0 -102
  269. package/esm2022/testing/component-harness.mjs +0 -328
  270. package/esm2022/testing/element-dimensions.mjs +0 -9
  271. package/esm2022/testing/harness-environment.mjs +0 -220
  272. package/esm2022/testing/index.mjs +0 -9
  273. package/esm2022/testing/public-api.mjs +0 -15
  274. package/esm2022/testing/selenium-webdriver/index.mjs +0 -9
  275. package/esm2022/testing/selenium-webdriver/public-api.mjs +0 -10
  276. package/esm2022/testing/selenium-webdriver/selenium-web-driver-element.mjs +0 -216
  277. package/esm2022/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +0 -88
  278. package/esm2022/testing/selenium-webdriver/selenium-webdriver-keys.mjs +0 -64
  279. package/esm2022/testing/test-element-errors.mjs +0 -15
  280. package/esm2022/testing/test-element.mjs +0 -49
  281. package/esm2022/testing/testbed/fake-events/dispatch-events.mjs +0 -53
  282. package/esm2022/testing/testbed/fake-events/element-focus.mjs +0 -39
  283. package/esm2022/testing/testbed/fake-events/event-objects.mjs +0 -127
  284. package/esm2022/testing/testbed/fake-events/index.mjs +0 -14
  285. package/esm2022/testing/testbed/fake-events/type-in-element.mjs +0 -97
  286. package/esm2022/testing/testbed/index.mjs +0 -9
  287. package/esm2022/testing/testbed/public-api.mjs +0 -10
  288. package/esm2022/testing/testbed/task-state-zone-interceptor.mjs +0 -82
  289. package/esm2022/testing/testbed/testbed-harness-environment.mjs +0 -165
  290. package/esm2022/testing/testbed/unit-test-element.mjs +0 -258
  291. package/esm2022/testing/text-filtering.mjs +0 -21
  292. package/esm2022/text-field/autofill.mjs +0 -114
  293. package/esm2022/text-field/autosize.mjs +0 -309
  294. package/esm2022/text-field/index.mjs +0 -9
  295. package/esm2022/text-field/public-api.mjs +0 -11
  296. package/esm2022/text-field/text-field-module.mjs +0 -24
  297. package/esm2022/text-field/text-field_public_index.mjs +0 -5
  298. package/esm2022/tree/control/base-tree-control.mjs +0 -62
  299. package/esm2022/tree/control/flat-tree-control.mjs +0 -57
  300. package/esm2022/tree/control/nested-tree-control.mjs +0 -67
  301. package/esm2022/tree/control/tree-control.mjs +0 -2
  302. package/esm2022/tree/index.mjs +0 -9
  303. package/esm2022/tree/nested-node.mjs +0 -103
  304. package/esm2022/tree/node.mjs +0 -36
  305. package/esm2022/tree/outlet.mjs +0 -40
  306. package/esm2022/tree/padding.mjs +0 -129
  307. package/esm2022/tree/public-api.mjs +0 -20
  308. package/esm2022/tree/toggle.mjs +0 -51
  309. package/esm2022/tree/tree-errors.mjs +0 -44
  310. package/esm2022/tree/tree-module.mjs +0 -49
  311. package/esm2022/tree/tree.mjs +0 -1123
  312. package/esm2022/tree/tree_public_index.mjs +0 -5
  313. package/esm2022/version.mjs +0 -11
package/fesm2022/cdk.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
3
  /** Current version of the Angular Component Development Kit. */
4
- const VERSION = new Version('19.0.0-next.0');
4
+ const VERSION = new Version('19.0.0-next.2');
5
5
 
6
6
  export { VERSION };
7
7
  //# sourceMappingURL=cdk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('19.0.0-next.0');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"cdk.mjs","sources":["../../../../../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('19.0.0-next.2');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, Component, ViewEncapsulation, ChangeDetectionStrategy, inject, ApplicationRef, EnvironmentInjector, createComponent, Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Injector, afterNextRender, numberAttribute, Self, Output, NgModule } from '@angular/core';
2
+ import { signal, Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Injector, afterNextRender, numberAttribute, Self, Output, NgModule } from '@angular/core';
3
3
  import { DOCUMENT } from '@angular/common';
4
4
  import * as i1 from '@angular/cdk/scrolling';
5
5
  import { CdkScrollableModule } from '@angular/cdk/scrolling';
@@ -8,6 +8,7 @@ import { coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/c
8
8
  import { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';
9
9
  import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge, BehaviorSubject } from 'rxjs';
10
10
  import { takeUntil, map, take, tap, switchMap, startWith } from 'rxjs/operators';
11
+ import { _CdkPrivateStyleLoader } from '@angular/cdk/private';
11
12
  import * as i1$1 from '@angular/cdk/bidi';
12
13
 
13
14
  /** Creates a deep clone of an element. */
@@ -342,7 +343,7 @@ class PreviewRef {
342
343
  parent.appendChild(this._preview);
343
344
  // The null check is necessary for browsers that don't support the popover API.
344
345
  // Note that we use a string access for compatibility with Closure.
345
- if ('showPopover' in this._preview) {
346
+ if (supportsPopover(this._preview)) {
346
347
  this._preview['showPopover']();
347
348
  }
348
349
  }
@@ -400,8 +401,12 @@ class PreviewRef {
400
401
  // It's important that we disable the pointer events on the preview, because
401
402
  // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.
402
403
  'pointer-events': 'none',
403
- // We have to reset the margin, because it can throw off positioning relative to the viewport.
404
- 'margin': '0',
404
+ // If the preview has a margin, it can throw off our positioning so we reset it. The reset
405
+ // value for `margin-right` needs to be `auto` when opened as a popover, because our
406
+ // positioning is always top/left based, but native popover seems to position itself
407
+ // to the top/right if `<html>` or `<body>` have `dir="rtl"` (see #29604). Setting it
408
+ // to `auto` pushed it to the top/left corner in RTL and is a noop in LTR.
409
+ 'margin': supportsPopover(preview) ? '0 auto 0 0' : '0',
405
410
  'position': 'fixed',
406
411
  'top': '0',
407
412
  'left': '0',
@@ -422,6 +427,10 @@ class PreviewRef {
422
427
  return preview;
423
428
  }
424
429
  }
430
+ /** Checks whether a specific element supports the popover API. */
431
+ function supportsPopover(element) {
432
+ return 'showPopover' in element;
433
+ }
425
434
 
426
435
  /** Options that can be used to bind a passive event listener. */
427
436
  const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
@@ -930,7 +939,8 @@ class DragRef {
930
939
  const parent = element.parentNode;
931
940
  const placeholder = (this._placeholder = this._createPlaceholderElement());
932
941
  const anchor = (this._anchor =
933
- this._anchor || this._document.createComment(ngDevMode ? 'cdk-drag-anchor' : ''));
942
+ this._anchor ||
943
+ this._document.createComment(typeof ngDevMode === 'undefined' || ngDevMode ? 'cdk-drag-anchor' : ''));
934
944
  // Insert an anchor node so that we can restore the element's position in the DOM.
935
945
  parent.insertBefore(anchor, element);
936
946
  // There's no risk of transforms stacking when inside a drop container so
@@ -2787,8 +2797,6 @@ const activeCapturingEventOptions = normalizePassiveListenerOptions({
2787
2797
  passive: false,
2788
2798
  capture: true,
2789
2799
  });
2790
- /** Keeps track of the apps currently containing drag items. */
2791
- const activeApps = new Set();
2792
2800
  /**
2793
2801
  * Component used to load the drag&drop reset styles.
2794
2802
  * @docs-private
@@ -2810,8 +2818,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0-next.2",
2810
2818
  class DragDropRegistry {
2811
2819
  constructor(_ngZone, _document) {
2812
2820
  this._ngZone = _ngZone;
2813
- this._appRef = inject(ApplicationRef);
2814
- this._environmentInjector = inject(EnvironmentInjector);
2821
+ this._styleLoader = inject(_CdkPrivateStyleLoader);
2815
2822
  /** Registered drop container instances. */
2816
2823
  this._dropInstances = new Set();
2817
2824
  /** Registered drag item instances. */
@@ -2906,7 +2913,7 @@ class DragDropRegistry {
2906
2913
  if (this._activeDragInstances().indexOf(drag) > -1) {
2907
2914
  return;
2908
2915
  }
2909
- this._loadResets();
2916
+ this._styleLoader.load(_ResetsLoader);
2910
2917
  this._activeDragInstances.update(instances => [...instances, drag]);
2911
2918
  if (this._activeDragInstances().length === 1) {
2912
2919
  const isTouchEvent = event.type.startsWith('touch');
@@ -3009,22 +3016,6 @@ class DragDropRegistry {
3009
3016
  });
3010
3017
  this._globalListeners.clear();
3011
3018
  }
3012
- // TODO(crisbeto): abstract this away into something reusable.
3013
- /** Loads the CSS resets needed for the module to work correctly. */
3014
- _loadResets() {
3015
- if (!activeApps.has(this._appRef)) {
3016
- activeApps.add(this._appRef);
3017
- const componentRef = createComponent(_ResetsLoader, {
3018
- environmentInjector: this._environmentInjector,
3019
- });
3020
- this._appRef.onDestroy(() => {
3021
- activeApps.delete(this._appRef);
3022
- if (activeApps.size === 0) {
3023
- componentRef.destroy();
3024
- }
3025
- });
3026
- }
3027
- }
3028
3019
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0-next.2", ngImport: i0, type: DragDropRegistry, deps: [{ token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
3029
3020
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0-next.2", ngImport: i0, type: DragDropRegistry, providedIn: 'root' }); }
3030
3021
  }