@angular/cdk 18.1.0-next.0 → 18.1.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.
- package/dialog/index.d.ts +2 -0
- package/drag-drop/index.d.ts +7 -5
- package/esm2022/a11y/a11y-module.mjs +5 -5
- package/esm2022/a11y/aria-describer/aria-describer.mjs +4 -4
- package/esm2022/a11y/focus-monitor/focus-monitor.mjs +7 -7
- package/esm2022/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
- package/esm2022/a11y/focus-trap/focus-trap-manager.mjs +4 -4
- package/esm2022/a11y/focus-trap/focus-trap.mjs +7 -7
- package/esm2022/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +4 -4
- package/esm2022/a11y/input-modality/input-modality-detector.mjs +4 -4
- package/esm2022/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
- package/esm2022/a11y/live-announcer/live-announcer.mjs +7 -7
- package/esm2022/accordion/accordion-item.mjs +4 -4
- package/esm2022/accordion/accordion-module.mjs +5 -5
- package/esm2022/accordion/accordion.mjs +4 -4
- package/esm2022/bidi/bidi-module.mjs +5 -5
- package/esm2022/bidi/dir.mjs +4 -4
- package/esm2022/bidi/directionality.mjs +4 -4
- package/esm2022/clipboard/clipboard-module.mjs +5 -5
- package/esm2022/clipboard/clipboard.mjs +4 -4
- package/esm2022/clipboard/copy-to-clipboard.mjs +4 -4
- package/esm2022/collections/unique-selection-dispatcher.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +38 -33
- package/esm2022/dialog/dialog-module.mjs +5 -5
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/drag-drop/directives/config.mjs +1 -1
- package/esm2022/drag-drop/directives/drag-handle.mjs +4 -4
- package/esm2022/drag-drop/directives/drag-placeholder.mjs +4 -4
- package/esm2022/drag-drop/directives/drag-preview.mjs +4 -4
- package/esm2022/drag-drop/directives/drag.mjs +4 -4
- package/esm2022/drag-drop/directives/drop-list-group.mjs +4 -4
- package/esm2022/drag-drop/directives/drop-list.mjs +4 -4
- package/esm2022/drag-drop/drag-drop-module.mjs +5 -5
- package/esm2022/drag-drop/drag-drop-registry.mjs +7 -7
- package/esm2022/drag-drop/drag-drop.mjs +4 -4
- package/esm2022/drag-drop/drag-ref.mjs +3 -2
- package/esm2022/drag-drop/drop-list-ref.mjs +20 -9
- package/esm2022/drag-drop/sorting/drop-list-sort-strategy.mjs +1 -1
- package/esm2022/drag-drop/sorting/mixed-sort-strategy.mjs +241 -0
- package/esm2022/drag-drop/sorting/single-axis-sort-strategy.mjs +2 -3
- package/esm2022/layout/breakpoints-observer.mjs +4 -4
- package/esm2022/layout/layout-module.mjs +5 -5
- package/esm2022/layout/media-matcher.mjs +4 -4
- package/esm2022/listbox/listbox-module.mjs +5 -5
- package/esm2022/listbox/listbox.mjs +7 -7
- package/esm2022/menu/context-menu-trigger.mjs +7 -7
- package/esm2022/menu/menu-aim.mjs +7 -7
- package/esm2022/menu/menu-bar.mjs +4 -4
- package/esm2022/menu/menu-base.mjs +16 -13
- package/esm2022/menu/menu-group.mjs +4 -4
- package/esm2022/menu/menu-item-checkbox.mjs +4 -4
- package/esm2022/menu/menu-item-radio.mjs +4 -4
- package/esm2022/menu/menu-item-selectable.mjs +4 -4
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu-module.mjs +5 -5
- package/esm2022/menu/menu-stack.mjs +4 -4
- package/esm2022/menu/menu-trigger-base.mjs +4 -4
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/menu/menu.mjs +4 -4
- package/esm2022/observers/observe-content.mjs +14 -14
- package/esm2022/observers/private/shared-resize-observer.mjs +4 -4
- package/esm2022/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
- package/esm2022/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +4 -4
- package/esm2022/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +4 -4
- package/esm2022/overlay/fullscreen-overlay-container.mjs +4 -4
- package/esm2022/overlay/overlay-container.mjs +4 -4
- package/esm2022/overlay/overlay-directives.mjs +7 -7
- package/esm2022/overlay/overlay-module.mjs +5 -5
- package/esm2022/overlay/overlay.mjs +4 -4
- package/esm2022/overlay/position/overlay-position-builder.mjs +4 -4
- package/esm2022/overlay/scroll/scroll-strategy-options.mjs +4 -4
- package/esm2022/platform/platform-module.mjs +5 -5
- package/esm2022/platform/platform.mjs +4 -4
- package/esm2022/portal/portal-directives.mjs +17 -17
- package/esm2022/scrolling/fixed-size-virtual-scroll.mjs +4 -4
- package/esm2022/scrolling/scroll-dispatcher.mjs +4 -4
- package/esm2022/scrolling/scrollable.mjs +4 -4
- package/esm2022/scrolling/scrolling-module.mjs +9 -9
- package/esm2022/scrolling/viewport-ruler.mjs +4 -4
- package/esm2022/scrolling/virtual-for-of.mjs +4 -4
- package/esm2022/scrolling/virtual-scroll-viewport.mjs +4 -4
- package/esm2022/scrolling/virtual-scrollable-element.mjs +4 -4
- package/esm2022/scrolling/virtual-scrollable-window.mjs +4 -4
- package/esm2022/scrolling/virtual-scrollable.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +4 -4
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +7 -7
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/coalesced-style-scheduler.mjs +4 -4
- package/esm2022/table/row.mjs +28 -28
- package/esm2022/table/table-module.mjs +5 -5
- package/esm2022/table/table.mjs +19 -19
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/testing/testbed/testbed-harness-environment.mjs +6 -4
- package/esm2022/text-field/autofill.mjs +7 -7
- package/esm2022/text-field/autosize.mjs +4 -4
- package/esm2022/text-field/text-field-module.mjs +5 -5
- package/esm2022/tree/nested-node.mjs +4 -4
- package/esm2022/tree/node.mjs +4 -4
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +18 -10
- package/esm2022/version.mjs +1 -1
- package/fesm2022/a11y.mjs +40 -40
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +10 -10
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/bidi.mjs +10 -10
- package/fesm2022/bidi.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/clipboard.mjs +10 -10
- package/fesm2022/clipboard.mjs.map +1 -1
- package/fesm2022/collections.mjs +3 -3
- package/fesm2022/collections.mjs.map +1 -1
- package/fesm2022/dialog.mjs +44 -39
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +284 -41
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/layout.mjs +10 -10
- package/fesm2022/layout.mjs.map +1 -1
- package/fesm2022/listbox.mjs +10 -10
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +57 -54
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers/private.mjs +3 -3
- package/fesm2022/observers/private.mjs.map +1 -1
- package/fesm2022/observers.mjs +13 -13
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +34 -34
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/platform.mjs +7 -7
- package/fesm2022/platform.mjs.map +1 -1
- package/fesm2022/portal.mjs +16 -16
- package/fesm2022/portal.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +35 -35
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +22 -22
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +76 -76
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/testing/testbed.mjs +5 -3
- package/fesm2022/testing/testbed.mjs.map +1 -1
- package/fesm2022/text-field.mjs +13 -13
- package/fesm2022/text-field.mjs.map +1 -1
- package/fesm2022/tree.mjs +35 -27
- package/fesm2022/tree.mjs.map +1 -1
- package/layout/index.d.ts +1 -1
- package/menu/index.d.ts +2 -1
- package/overlay/index.d.ts +2 -2
- package/package.json +1 -1
- package/schematics/ng-add/index.js +3 -3
- package/schematics/ng-add/index.mjs +3 -3
- package/schematics/ng-add/package-config.js +3 -4
- package/schematics/ng-add/package-config.mjs +3 -4
- package/schematics/ng-generate/drag-drop/index.js +2 -2
- package/schematics/ng-generate/drag-drop/index.mjs +2 -2
- package/schematics/ng-update/devkit-migration-rule.js +4 -4
- package/schematics/ng-update/devkit-migration-rule.mjs +4 -4
- package/schematics/ng-update/find-stylesheets.js +2 -3
- package/schematics/ng-update/find-stylesheets.mjs +2 -3
- package/schematics/ng-update/html-parsing/angular.js +5 -6
- package/schematics/ng-update/html-parsing/angular.mjs +5 -6
- package/schematics/ng-update/html-parsing/elements.js +5 -6
- package/schematics/ng-update/html-parsing/elements.mjs +5 -6
- package/schematics/ng-update/index.js +2 -3
- package/schematics/ng-update/index.mjs +2 -3
- package/schematics/ng-update/typescript/base-types.js +2 -3
- package/schematics/ng-update/typescript/base-types.mjs +2 -3
- package/schematics/ng-update/typescript/imports.js +6 -7
- package/schematics/ng-update/typescript/imports.mjs +6 -7
- package/schematics/ng-update/typescript/literal.js +3 -4
- package/schematics/ng-update/typescript/literal.mjs +3 -4
- package/schematics/ng-update/typescript/module-specifiers.js +4 -4
- package/schematics/ng-update/typescript/module-specifiers.mjs +4 -4
- package/schematics/ng-update/upgrade-data.js +3 -3
- package/schematics/ng-update/upgrade-data.mjs +3 -3
- package/schematics/update-tool/target-version.js +3 -3
- package/schematics/update-tool/target-version.mjs +3 -3
- package/schematics/update-tool/utils/decorators.js +3 -4
- package/schematics/update-tool/utils/decorators.mjs +3 -4
- package/schematics/update-tool/utils/diagnostics.js +2 -3
- package/schematics/update-tool/utils/diagnostics.mjs +2 -3
- package/schematics/update-tool/utils/functions.js +2 -3
- package/schematics/update-tool/utils/functions.mjs +2 -3
- package/schematics/update-tool/utils/imports.js +2 -3
- package/schematics/update-tool/utils/imports.mjs +2 -3
- package/schematics/update-tool/utils/line-mappings.js +3 -4
- package/schematics/update-tool/utils/line-mappings.mjs +3 -4
- package/schematics/update-tool/utils/parse-tsconfig.js +3 -3
- package/schematics/update-tool/utils/parse-tsconfig.mjs +3 -3
- package/schematics/update-tool/utils/property-name.js +3 -4
- package/schematics/update-tool/utils/property-name.mjs +3 -4
- package/schematics/update-tool/utils/virtual-host.js +4 -4
- package/schematics/update-tool/utils/virtual-host.mjs +4 -4
- package/schematics/update-tool/version-changes.js +3 -4
- package/schematics/update-tool/version-changes.mjs +3 -4
- package/schematics/utils/ast/ng-module-imports.js +2 -3
- package/schematics/utils/ast/ng-module-imports.mjs +2 -3
- package/schematics/utils/ast.js +5 -6
- package/schematics/utils/ast.mjs +5 -6
- package/schematics/utils/build-component.js +2 -3
- package/schematics/utils/build-component.mjs +2 -3
- package/schematics/utils/get-project.js +2 -3
- package/schematics/utils/get-project.mjs +2 -3
- package/schematics/utils/html-manipulation.js +4 -5
- package/schematics/utils/html-manipulation.mjs +4 -5
- package/schematics/utils/parse5-element.js +2 -3
- package/schematics/utils/parse5-element.mjs +2 -3
- package/schematics/utils/project-index-file.js +2 -3
- package/schematics/utils/project-index-file.mjs +2 -3
- package/schematics/utils/project-main-file.js +2 -3
- package/schematics/utils/project-main-file.mjs +2 -3
- package/schematics/utils/project-style-file.js +2 -3
- package/schematics/utils/project-style-file.mjs +2 -3
- package/schematics/utils/project-targets.js +4 -5
- package/schematics/utils/project-targets.mjs +4 -5
- package/schematics/utils/project-tsconfig-paths.js +3 -4
- package/schematics/utils/project-tsconfig-paths.mjs +3 -4
- package/schematics/utils/schematic-options.js +3 -4
- package/schematics/utils/schematic-options.mjs +3 -4
- package/table/index.d.ts +8 -8
- package/testing/testbed/index.d.ts +1 -1
- package/tree/index.d.ts +3 -2
package/fesm2022/drag-drop.mjs
CHANGED
|
@@ -921,7 +921,8 @@ class DragRef {
|
|
|
921
921
|
const element = this._rootElement;
|
|
922
922
|
const parent = element.parentNode;
|
|
923
923
|
const placeholder = (this._placeholder = this._createPlaceholderElement());
|
|
924
|
-
const anchor = (this._anchor =
|
|
924
|
+
const anchor = (this._anchor =
|
|
925
|
+
this._anchor || this._document.createComment(ngDevMode ? 'cdk-drag-anchor' : ''));
|
|
925
926
|
// Insert an anchor node so that we can restore the element's position in the DOM.
|
|
926
927
|
parent.insertBefore(anchor, element);
|
|
927
928
|
// There's no risk of transforms stacking when inside a drop container so
|
|
@@ -1679,7 +1680,7 @@ class SingleAxisSortStrategy {
|
|
|
1679
1680
|
activeDraggables.splice(newIndex, 0, item);
|
|
1680
1681
|
}
|
|
1681
1682
|
else {
|
|
1682
|
-
|
|
1683
|
+
this._element.appendChild(placeholder);
|
|
1683
1684
|
activeDraggables.push(item);
|
|
1684
1685
|
}
|
|
1685
1686
|
// The transform needs to be cleared so it doesn't throw off the measurements.
|
|
@@ -1873,6 +1874,238 @@ class SingleAxisSortStrategy {
|
|
|
1873
1874
|
}
|
|
1874
1875
|
}
|
|
1875
1876
|
|
|
1877
|
+
/**
|
|
1878
|
+
* Strategy that only supports sorting on a list that might wrap.
|
|
1879
|
+
* Items are reordered by moving their DOM nodes around.
|
|
1880
|
+
* @docs-private
|
|
1881
|
+
*/
|
|
1882
|
+
class MixedSortStrategy {
|
|
1883
|
+
constructor(_element, _document, _dragDropRegistry) {
|
|
1884
|
+
this._element = _element;
|
|
1885
|
+
this._document = _document;
|
|
1886
|
+
this._dragDropRegistry = _dragDropRegistry;
|
|
1887
|
+
/**
|
|
1888
|
+
* Keeps track of the item that was last swapped with the dragged item, as well as what direction
|
|
1889
|
+
* the pointer was moving in when the swap occurred and whether the user's pointer continued to
|
|
1890
|
+
* overlap with the swapped item after the swapping occurred.
|
|
1891
|
+
*/
|
|
1892
|
+
this._previousSwap = {
|
|
1893
|
+
drag: null,
|
|
1894
|
+
deltaX: 0,
|
|
1895
|
+
deltaY: 0,
|
|
1896
|
+
overlaps: false,
|
|
1897
|
+
};
|
|
1898
|
+
/**
|
|
1899
|
+
* Keeps track of the relationship between a node and its next sibling. This information
|
|
1900
|
+
* is used to restore the DOM to the order it was in before dragging started.
|
|
1901
|
+
*/
|
|
1902
|
+
this._relatedNodes = [];
|
|
1903
|
+
}
|
|
1904
|
+
/**
|
|
1905
|
+
* To be called when the drag sequence starts.
|
|
1906
|
+
* @param items Items that are currently in the list.
|
|
1907
|
+
*/
|
|
1908
|
+
start(items) {
|
|
1909
|
+
const childNodes = this._element.childNodes;
|
|
1910
|
+
this._relatedNodes = [];
|
|
1911
|
+
for (let i = 0; i < childNodes.length; i++) {
|
|
1912
|
+
const node = childNodes[i];
|
|
1913
|
+
this._relatedNodes.push([node, node.nextSibling]);
|
|
1914
|
+
}
|
|
1915
|
+
this.withItems(items);
|
|
1916
|
+
}
|
|
1917
|
+
/**
|
|
1918
|
+
* To be called when an item is being sorted.
|
|
1919
|
+
* @param item Item to be sorted.
|
|
1920
|
+
* @param pointerX Position of the item along the X axis.
|
|
1921
|
+
* @param pointerY Position of the item along the Y axis.
|
|
1922
|
+
* @param pointerDelta Direction in which the pointer is moving along each axis.
|
|
1923
|
+
*/
|
|
1924
|
+
sort(item, pointerX, pointerY, pointerDelta) {
|
|
1925
|
+
const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);
|
|
1926
|
+
const previousSwap = this._previousSwap;
|
|
1927
|
+
if (newIndex === -1 || this._activeItems[newIndex] === item) {
|
|
1928
|
+
return null;
|
|
1929
|
+
}
|
|
1930
|
+
const toSwapWith = this._activeItems[newIndex];
|
|
1931
|
+
// Prevent too many swaps over the same item.
|
|
1932
|
+
if (previousSwap.drag === toSwapWith &&
|
|
1933
|
+
previousSwap.overlaps &&
|
|
1934
|
+
previousSwap.deltaX === pointerDelta.x &&
|
|
1935
|
+
previousSwap.deltaY === pointerDelta.y) {
|
|
1936
|
+
return null;
|
|
1937
|
+
}
|
|
1938
|
+
const previousIndex = this.getItemIndex(item);
|
|
1939
|
+
const current = item.getPlaceholderElement();
|
|
1940
|
+
const overlapElement = toSwapWith.getRootElement();
|
|
1941
|
+
if (newIndex > previousIndex) {
|
|
1942
|
+
overlapElement.after(current);
|
|
1943
|
+
}
|
|
1944
|
+
else {
|
|
1945
|
+
overlapElement.before(current);
|
|
1946
|
+
}
|
|
1947
|
+
moveItemInArray(this._activeItems, previousIndex, newIndex);
|
|
1948
|
+
const newOverlapElement = this._getRootNode().elementFromPoint(pointerX, pointerY);
|
|
1949
|
+
// Note: it's tempting to save the entire `pointerDelta` object here, however that'll
|
|
1950
|
+
// break this functionality, because the same object is passed for all `sort` calls.
|
|
1951
|
+
previousSwap.deltaX = pointerDelta.x;
|
|
1952
|
+
previousSwap.deltaY = pointerDelta.y;
|
|
1953
|
+
previousSwap.drag = toSwapWith;
|
|
1954
|
+
previousSwap.overlaps =
|
|
1955
|
+
overlapElement === newOverlapElement || overlapElement.contains(newOverlapElement);
|
|
1956
|
+
return {
|
|
1957
|
+
previousIndex,
|
|
1958
|
+
currentIndex: newIndex,
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Called when an item is being moved into the container.
|
|
1963
|
+
* @param item Item that was moved into the container.
|
|
1964
|
+
* @param pointerX Position of the item along the X axis.
|
|
1965
|
+
* @param pointerY Position of the item along the Y axis.
|
|
1966
|
+
* @param index Index at which the item entered. If omitted, the container will try to figure it
|
|
1967
|
+
* out automatically.
|
|
1968
|
+
*/
|
|
1969
|
+
enter(item, pointerX, pointerY, index) {
|
|
1970
|
+
let enterIndex = index == null || index < 0
|
|
1971
|
+
? this._getItemIndexFromPointerPosition(item, pointerX, pointerY)
|
|
1972
|
+
: index;
|
|
1973
|
+
// In some cases (e.g. when the container has padding) we might not be able to figure
|
|
1974
|
+
// out which item to insert the dragged item next to, because the pointer didn't overlap
|
|
1975
|
+
// with anything. In that case we find the item that's closest to the pointer.
|
|
1976
|
+
if (enterIndex === -1) {
|
|
1977
|
+
enterIndex = this._getClosestItemIndexToPointer(item, pointerX, pointerY);
|
|
1978
|
+
}
|
|
1979
|
+
const targetItem = this._activeItems[enterIndex];
|
|
1980
|
+
const currentIndex = this._activeItems.indexOf(item);
|
|
1981
|
+
if (currentIndex > -1) {
|
|
1982
|
+
this._activeItems.splice(currentIndex, 1);
|
|
1983
|
+
}
|
|
1984
|
+
if (targetItem && !this._dragDropRegistry.isDragging(targetItem)) {
|
|
1985
|
+
this._activeItems.splice(enterIndex, 0, item);
|
|
1986
|
+
targetItem.getRootElement().before(item.getPlaceholderElement());
|
|
1987
|
+
}
|
|
1988
|
+
else {
|
|
1989
|
+
this._activeItems.push(item);
|
|
1990
|
+
this._element.appendChild(item.getPlaceholderElement());
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
/** Sets the items that are currently part of the list. */
|
|
1994
|
+
withItems(items) {
|
|
1995
|
+
this._activeItems = items.slice();
|
|
1996
|
+
}
|
|
1997
|
+
/** Assigns a sort predicate to the strategy. */
|
|
1998
|
+
withSortPredicate(predicate) {
|
|
1999
|
+
this._sortPredicate = predicate;
|
|
2000
|
+
}
|
|
2001
|
+
/** Resets the strategy to its initial state before dragging was started. */
|
|
2002
|
+
reset() {
|
|
2003
|
+
const root = this._element;
|
|
2004
|
+
const previousSwap = this._previousSwap;
|
|
2005
|
+
// Moving elements around in the DOM can break things like the `@for` loop, because it
|
|
2006
|
+
// uses comment nodes to know where to insert elements. To avoid such issues, we restore
|
|
2007
|
+
// the DOM nodes in the list to their original order when the list is reset.
|
|
2008
|
+
// Note that this could be simpler if we just saved all the nodes, cleared the root
|
|
2009
|
+
// and then appended them in the original order. We don't do it, because it can break
|
|
2010
|
+
// down depending on when the snapshot was taken. E.g. we may end up snapshotting the
|
|
2011
|
+
// placeholder element which is removed after dragging.
|
|
2012
|
+
for (let i = this._relatedNodes.length - 1; i > -1; i--) {
|
|
2013
|
+
const [node, nextSibling] = this._relatedNodes[i];
|
|
2014
|
+
if (node.parentNode === root && node.nextSibling !== nextSibling) {
|
|
2015
|
+
if (nextSibling === null) {
|
|
2016
|
+
root.appendChild(node);
|
|
2017
|
+
}
|
|
2018
|
+
else if (nextSibling.parentNode === root) {
|
|
2019
|
+
root.insertBefore(node, nextSibling);
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
this._relatedNodes = [];
|
|
2024
|
+
this._activeItems = [];
|
|
2025
|
+
previousSwap.drag = null;
|
|
2026
|
+
previousSwap.deltaX = previousSwap.deltaY = 0;
|
|
2027
|
+
previousSwap.overlaps = false;
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* Gets a snapshot of items currently in the list.
|
|
2031
|
+
* Can include items that we dragged in from another list.
|
|
2032
|
+
*/
|
|
2033
|
+
getActiveItemsSnapshot() {
|
|
2034
|
+
return this._activeItems;
|
|
2035
|
+
}
|
|
2036
|
+
/** Gets the index of a specific item. */
|
|
2037
|
+
getItemIndex(item) {
|
|
2038
|
+
return this._activeItems.indexOf(item);
|
|
2039
|
+
}
|
|
2040
|
+
/** Used to notify the strategy that the scroll position has changed. */
|
|
2041
|
+
updateOnScroll() {
|
|
2042
|
+
this._activeItems.forEach(item => {
|
|
2043
|
+
if (this._dragDropRegistry.isDragging(item)) {
|
|
2044
|
+
// We need to re-sort the item manually, because the pointer move
|
|
2045
|
+
// events won't be dispatched while the user is scrolling.
|
|
2046
|
+
item._sortFromLastPointerPosition();
|
|
2047
|
+
}
|
|
2048
|
+
});
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2051
|
+
* Gets the index of an item in the drop container, based on the position of the user's pointer.
|
|
2052
|
+
* @param item Item that is being sorted.
|
|
2053
|
+
* @param pointerX Position of the user's pointer along the X axis.
|
|
2054
|
+
* @param pointerY Position of the user's pointer along the Y axis.
|
|
2055
|
+
* @param delta Direction in which the user is moving their pointer.
|
|
2056
|
+
*/
|
|
2057
|
+
_getItemIndexFromPointerPosition(item, pointerX, pointerY) {
|
|
2058
|
+
const elementAtPoint = this._getRootNode().elementFromPoint(Math.floor(pointerX), Math.floor(pointerY));
|
|
2059
|
+
const index = elementAtPoint
|
|
2060
|
+
? this._activeItems.findIndex(item => {
|
|
2061
|
+
const root = item.getRootElement();
|
|
2062
|
+
return elementAtPoint === root || root.contains(elementAtPoint);
|
|
2063
|
+
})
|
|
2064
|
+
: -1;
|
|
2065
|
+
return index === -1 || !this._sortPredicate(index, item) ? -1 : index;
|
|
2066
|
+
}
|
|
2067
|
+
/** Lazily resolves the list's root node. */
|
|
2068
|
+
_getRootNode() {
|
|
2069
|
+
// Resolve the root node lazily to ensure that the drop list is in its final place in the DOM.
|
|
2070
|
+
if (!this._rootNode) {
|
|
2071
|
+
this._rootNode = _getShadowRoot(this._element) || this._document;
|
|
2072
|
+
}
|
|
2073
|
+
return this._rootNode;
|
|
2074
|
+
}
|
|
2075
|
+
/**
|
|
2076
|
+
* Finds the index of the item that's closest to the item being dragged.
|
|
2077
|
+
* @param item Item being dragged.
|
|
2078
|
+
* @param pointerX Position of the user's pointer along the X axis.
|
|
2079
|
+
* @param pointerY Position of the user's pointer along the Y axis.
|
|
2080
|
+
*/
|
|
2081
|
+
_getClosestItemIndexToPointer(item, pointerX, pointerY) {
|
|
2082
|
+
if (this._activeItems.length === 0) {
|
|
2083
|
+
return -1;
|
|
2084
|
+
}
|
|
2085
|
+
if (this._activeItems.length === 1) {
|
|
2086
|
+
return 0;
|
|
2087
|
+
}
|
|
2088
|
+
let minDistance = Infinity;
|
|
2089
|
+
let minIndex = -1;
|
|
2090
|
+
// Find the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between each
|
|
2091
|
+
// item and the pointer, and return the smallest one. Note that this is a bit flawed in that DOM
|
|
2092
|
+
// nodes are rectangles, not points, so we use the top/left coordinates. It should be enough
|
|
2093
|
+
// for our purposes.
|
|
2094
|
+
for (let i = 0; i < this._activeItems.length; i++) {
|
|
2095
|
+
const current = this._activeItems[i];
|
|
2096
|
+
if (current !== item) {
|
|
2097
|
+
const { x, y } = current.getRootElement().getBoundingClientRect();
|
|
2098
|
+
const distance = Math.hypot(pointerX - x, pointerY - y);
|
|
2099
|
+
if (distance < minDistance) {
|
|
2100
|
+
minDistance = distance;
|
|
2101
|
+
minIndex = i;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
return minIndex;
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
|
|
1876
2109
|
/**
|
|
1877
2110
|
* Proximity, as a ratio to width/height, at which a
|
|
1878
2111
|
* dragged item will affect the drop container.
|
|
@@ -1960,6 +2193,8 @@ class DropListRef {
|
|
|
1960
2193
|
this._stopScrollTimers = new Subject();
|
|
1961
2194
|
/** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */
|
|
1962
2195
|
this._cachedShadowRoot = null;
|
|
2196
|
+
/** Direction of the list's layout. */
|
|
2197
|
+
this._direction = 'ltr';
|
|
1963
2198
|
/** Starts the interval that'll auto-scroll the element. */
|
|
1964
2199
|
this._startScrollInterval = () => {
|
|
1965
2200
|
this._stopScrolling();
|
|
@@ -1984,11 +2219,9 @@ class DropListRef {
|
|
|
1984
2219
|
};
|
|
1985
2220
|
this.element = coerceElement(element);
|
|
1986
2221
|
this._document = _document;
|
|
1987
|
-
this.withScrollableParents([this.element]);
|
|
2222
|
+
this.withScrollableParents([this.element]).withOrientation('vertical');
|
|
1988
2223
|
_dragDropRegistry.registerDropContainer(this);
|
|
1989
2224
|
this._parentPositions = new ParentPositionTracker(_document);
|
|
1990
|
-
this._sortStrategy = new SingleAxisSortStrategy(this.element, _dragDropRegistry);
|
|
1991
|
-
this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));
|
|
1992
2225
|
}
|
|
1993
2226
|
/** Removes the drop list functionality from the DOM element. */
|
|
1994
2227
|
dispose() {
|
|
@@ -2097,7 +2330,10 @@ class DropListRef {
|
|
|
2097
2330
|
}
|
|
2098
2331
|
/** Sets the layout direction of the drop list. */
|
|
2099
2332
|
withDirection(direction) {
|
|
2100
|
-
this.
|
|
2333
|
+
this._direction = direction;
|
|
2334
|
+
if (this._sortStrategy instanceof SingleAxisSortStrategy) {
|
|
2335
|
+
this._sortStrategy.direction = direction;
|
|
2336
|
+
}
|
|
2101
2337
|
return this;
|
|
2102
2338
|
}
|
|
2103
2339
|
/**
|
|
@@ -2114,9 +2350,16 @@ class DropListRef {
|
|
|
2114
2350
|
* @param orientation New orientation for the container.
|
|
2115
2351
|
*/
|
|
2116
2352
|
withOrientation(orientation) {
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2353
|
+
if (orientation === 'mixed') {
|
|
2354
|
+
this._sortStrategy = new MixedSortStrategy(coerceElement(this.element), this._document, this._dragDropRegistry);
|
|
2355
|
+
}
|
|
2356
|
+
else {
|
|
2357
|
+
const strategy = new SingleAxisSortStrategy(coerceElement(this.element), this._dragDropRegistry);
|
|
2358
|
+
strategy.direction = this._direction;
|
|
2359
|
+
strategy.orientation = orientation;
|
|
2360
|
+
this._sortStrategy = strategy;
|
|
2361
|
+
}
|
|
2362
|
+
this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));
|
|
2120
2363
|
return this;
|
|
2121
2364
|
}
|
|
2122
2365
|
/**
|
|
@@ -2196,7 +2439,7 @@ class DropListRef {
|
|
|
2196
2439
|
return;
|
|
2197
2440
|
}
|
|
2198
2441
|
if (isPointerNearDomRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {
|
|
2199
|
-
[verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, this.
|
|
2442
|
+
[verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, this._direction, pointerX, pointerY);
|
|
2200
2443
|
if (verticalScrollDirection || horizontalScrollDirection) {
|
|
2201
2444
|
scrollNode = element;
|
|
2202
2445
|
}
|
|
@@ -2488,10 +2731,10 @@ const activeApps = new Set();
|
|
|
2488
2731
|
* @docs-private
|
|
2489
2732
|
*/
|
|
2490
2733
|
class _ResetsLoader {
|
|
2491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2492
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.
|
|
2734
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: _ResetsLoader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2735
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0-next.1", type: _ResetsLoader, isStandalone: true, selector: "ng-component", host: { attributes: { "cdk-drag-resets-container": "" } }, ngImport: i0, template: '', isInline: true, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2493
2736
|
}
|
|
2494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: _ResetsLoader, decorators: [{
|
|
2495
2738
|
type: Component,
|
|
2496
2739
|
args: [{ standalone: true, encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'cdk-drag-resets-container': '' }, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}"] }]
|
|
2497
2740
|
}] });
|
|
@@ -2721,10 +2964,10 @@ class DragDropRegistry {
|
|
|
2721
2964
|
});
|
|
2722
2965
|
}
|
|
2723
2966
|
}
|
|
2724
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2725
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.
|
|
2967
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropRegistry, deps: [{ token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2968
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropRegistry, providedIn: 'root' }); }
|
|
2726
2969
|
}
|
|
2727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
2970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropRegistry, decorators: [{
|
|
2728
2971
|
type: Injectable,
|
|
2729
2972
|
args: [{ providedIn: 'root' }]
|
|
2730
2973
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: undefined, decorators: [{
|
|
@@ -2762,10 +3005,10 @@ class DragDrop {
|
|
|
2762
3005
|
createDropList(element) {
|
|
2763
3006
|
return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
|
|
2764
3007
|
}
|
|
2765
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2766
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.
|
|
3008
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDrop, deps: [{ token: DOCUMENT }, { token: i0.NgZone }, { token: i1.ViewportRuler }, { token: DragDropRegistry }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3009
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDrop, providedIn: 'root' }); }
|
|
2767
3010
|
}
|
|
2768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
3011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDrop, decorators: [{
|
|
2769
3012
|
type: Injectable,
|
|
2770
3013
|
args: [{ providedIn: 'root' }]
|
|
2771
3014
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -2823,10 +3066,10 @@ class CdkDragHandle {
|
|
|
2823
3066
|
this._parentDrag?._removeHandle(this);
|
|
2824
3067
|
this._stateChanges.complete();
|
|
2825
3068
|
}
|
|
2826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
2827
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.
|
|
3069
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDragHandle, deps: [{ token: i0.ElementRef }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3070
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.0-next.1", type: CdkDragHandle, isStandalone: true, selector: "[cdkDragHandle]", inputs: { disabled: ["cdkDragHandleDisabled", "disabled", booleanAttribute] }, host: { classAttribute: "cdk-drag-handle" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 }); }
|
|
2828
3071
|
}
|
|
2829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
3072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDragHandle, decorators: [{
|
|
2830
3073
|
type: Directive,
|
|
2831
3074
|
args: [{
|
|
2832
3075
|
selector: '[cdkDragHandle]',
|
|
@@ -3239,10 +3482,10 @@ class CdkDrag {
|
|
|
3239
3482
|
handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);
|
|
3240
3483
|
});
|
|
3241
3484
|
}
|
|
3242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
3243
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.
|
|
3485
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDrag, deps: [{ token: i0.ElementRef }, { token: CDK_DROP_LIST, optional: true, skipSelf: true }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: CDK_DRAG_CONFIG, optional: true }, { token: i1$1.Directionality, optional: true }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: CDK_DRAG_HANDLE, optional: true, self: true }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3486
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.0-next.1", type: CdkDrag, isStandalone: true, selector: "[cdkDrag]", inputs: { data: ["cdkDragData", "data"], lockAxis: ["cdkDragLockAxis", "lockAxis"], rootElementSelector: ["cdkDragRootElement", "rootElementSelector"], boundaryElement: ["cdkDragBoundary", "boundaryElement"], dragStartDelay: ["cdkDragStartDelay", "dragStartDelay"], freeDragPosition: ["cdkDragFreeDragPosition", "freeDragPosition"], disabled: ["cdkDragDisabled", "disabled", booleanAttribute], constrainPosition: ["cdkDragConstrainPosition", "constrainPosition"], previewClass: ["cdkDragPreviewClass", "previewClass"], previewContainer: ["cdkDragPreviewContainer", "previewContainer"] }, outputs: { started: "cdkDragStarted", released: "cdkDragReleased", ended: "cdkDragEnded", entered: "cdkDragEntered", exited: "cdkDragExited", dropped: "cdkDragDropped", moved: "cdkDragMoved" }, host: { properties: { "class.cdk-drag-disabled": "disabled", "class.cdk-drag-dragging": "_dragRef.isDragging()" }, classAttribute: "cdk-drag" }, providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }], exportAs: ["cdkDrag"], usesOnChanges: true, ngImport: i0 }); }
|
|
3244
3487
|
}
|
|
3245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
3488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDrag, decorators: [{
|
|
3246
3489
|
type: Directive,
|
|
3247
3490
|
args: [{
|
|
3248
3491
|
selector: '[cdkDrag]',
|
|
@@ -3361,10 +3604,10 @@ class CdkDropListGroup {
|
|
|
3361
3604
|
ngOnDestroy() {
|
|
3362
3605
|
this._items.clear();
|
|
3363
3606
|
}
|
|
3364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
3365
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.
|
|
3607
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3608
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.0-next.1", type: CdkDropListGroup, isStandalone: true, selector: "[cdkDropListGroup]", inputs: { disabled: ["cdkDropListGroupDisabled", "disabled", booleanAttribute] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: ["cdkDropListGroup"], ngImport: i0 }); }
|
|
3366
3609
|
}
|
|
3367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
3610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDropListGroup, decorators: [{
|
|
3368
3611
|
type: Directive,
|
|
3369
3612
|
args: [{
|
|
3370
3613
|
selector: '[cdkDropListGroup]',
|
|
@@ -3610,14 +3853,14 @@ class CdkDropList {
|
|
|
3610
3853
|
_syncItemsWithRef() {
|
|
3611
3854
|
this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));
|
|
3612
3855
|
}
|
|
3613
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
3614
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.
|
|
3856
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDropList, deps: [{ token: i0.ElementRef }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: i1.ScrollDispatcher }, { token: i1$1.Directionality, optional: true }, { token: CDK_DROP_LIST_GROUP, optional: true, skipSelf: true }, { token: CDK_DRAG_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3857
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.0-next.1", type: CdkDropList, isStandalone: true, selector: "[cdkDropList], cdk-drop-list", inputs: { connectedTo: ["cdkDropListConnectedTo", "connectedTo"], data: ["cdkDropListData", "data"], orientation: ["cdkDropListOrientation", "orientation"], id: "id", lockAxis: ["cdkDropListLockAxis", "lockAxis"], disabled: ["cdkDropListDisabled", "disabled", booleanAttribute], sortingDisabled: ["cdkDropListSortingDisabled", "sortingDisabled", booleanAttribute], enterPredicate: ["cdkDropListEnterPredicate", "enterPredicate"], sortPredicate: ["cdkDropListSortPredicate", "sortPredicate"], autoScrollDisabled: ["cdkDropListAutoScrollDisabled", "autoScrollDisabled", booleanAttribute], autoScrollStep: ["cdkDropListAutoScrollStep", "autoScrollStep"] }, outputs: { dropped: "cdkDropListDropped", entered: "cdkDropListEntered", exited: "cdkDropListExited", sorted: "cdkDropListSorted" }, host: { properties: { "attr.id": "id", "class.cdk-drop-list-disabled": "disabled", "class.cdk-drop-list-dragging": "_dropListRef.isDragging()", "class.cdk-drop-list-receiving": "_dropListRef.isReceiving()" }, classAttribute: "cdk-drop-list" }, providers: [
|
|
3615
3858
|
// Prevent child drop lists from picking up the same group as their parent.
|
|
3616
3859
|
{ provide: CDK_DROP_LIST_GROUP, useValue: undefined },
|
|
3617
3860
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
3618
3861
|
], exportAs: ["cdkDropList"], ngImport: i0 }); }
|
|
3619
3862
|
}
|
|
3620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
3863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDropList, decorators: [{
|
|
3621
3864
|
type: Directive,
|
|
3622
3865
|
args: [{
|
|
3623
3866
|
selector: '[cdkDropList], cdk-drop-list',
|
|
@@ -3717,10 +3960,10 @@ class CdkDragPreview {
|
|
|
3717
3960
|
ngOnDestroy() {
|
|
3718
3961
|
this._drag?._resetPreviewTemplate(this);
|
|
3719
3962
|
}
|
|
3720
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
3721
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.
|
|
3963
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3964
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.0-next.1", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: ["matchSize", "matchSize", booleanAttribute] }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 }); }
|
|
3722
3965
|
}
|
|
3723
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
3966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDragPreview, decorators: [{
|
|
3724
3967
|
type: Directive,
|
|
3725
3968
|
args: [{
|
|
3726
3969
|
selector: 'ng-template[cdkDragPreview]',
|
|
@@ -3753,10 +3996,10 @@ class CdkDragPlaceholder {
|
|
|
3753
3996
|
ngOnDestroy() {
|
|
3754
3997
|
this._drag?._resetPlaceholderTemplate(this);
|
|
3755
3998
|
}
|
|
3756
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
3757
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.
|
|
3999
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4000
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0-next.1", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 }); }
|
|
3758
4001
|
}
|
|
3759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
4002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
|
|
3760
4003
|
type: Directive,
|
|
3761
4004
|
args: [{
|
|
3762
4005
|
selector: 'ng-template[cdkDragPlaceholder]',
|
|
@@ -3776,8 +4019,8 @@ const DRAG_DROP_DIRECTIVES = [
|
|
|
3776
4019
|
CdkDragPlaceholder,
|
|
3777
4020
|
];
|
|
3778
4021
|
class DragDropModule {
|
|
3779
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.
|
|
3780
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.
|
|
4022
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4023
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropModule, imports: [CdkDropList,
|
|
3781
4024
|
CdkDropListGroup,
|
|
3782
4025
|
CdkDrag,
|
|
3783
4026
|
CdkDragHandle,
|
|
@@ -3788,9 +4031,9 @@ class DragDropModule {
|
|
|
3788
4031
|
CdkDragHandle,
|
|
3789
4032
|
CdkDragPreview,
|
|
3790
4033
|
CdkDragPlaceholder] }); }
|
|
3791
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.
|
|
4034
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] }); }
|
|
3792
4035
|
}
|
|
3793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.
|
|
4036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0-next.1", ngImport: i0, type: DragDropModule, decorators: [{
|
|
3794
4037
|
type: NgModule,
|
|
3795
4038
|
args: [{
|
|
3796
4039
|
imports: DRAG_DROP_DIRECTIVES,
|