@deephaven/iris-grid 1.8.1-beta.9 → 1.9.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.
- package/dist/IrisGrid.d.ts +19 -0
- package/dist/IrisGrid.d.ts.map +1 -1
- package/dist/IrisGrid.js +17 -9
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridMetricCalculator.d.ts +34 -1
- package/dist/IrisGridMetricCalculator.d.ts.map +1 -1
- package/dist/IrisGridMetricCalculator.js +136 -1
- package/dist/IrisGridMetricCalculator.js.map +1 -1
- package/dist/LazyIrisGrid.d.ts +1 -0
- package/dist/LazyIrisGrid.d.ts.map +1 -1
- package/dist/TreeRebalanceUtil.d.ts +50 -0
- package/dist/TreeRebalanceUtil.d.ts.map +1 -0
- package/dist/TreeRebalanceUtil.js +105 -0
- package/dist/TreeRebalanceUtil.js.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/SearchItem.d.ts +12 -0
- package/dist/sidebar/visibility-ordering-builder/SearchItem.d.ts.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/SearchItem.js +55 -0
- package/dist/sidebar/visibility-ordering-builder/SearchItem.js.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/SearchWithModal.css +408 -0
- package/dist/sidebar/visibility-ordering-builder/SearchWithModal.css.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/SearchWithModal.d.ts +14 -0
- package/dist/sidebar/visibility-ordering-builder/SearchWithModal.d.ts.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/SearchWithModal.js +235 -0
- package/dist/sidebar/visibility-ordering-builder/SearchWithModal.js.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.d.ts +43 -43
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.js +427 -466
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingItem.d.ts +7 -2
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingItem.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingItem.js +7 -4
- package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingItem.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.d.ts +7 -15
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.js +53 -137
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeDndContext.d.ts +14 -0
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeDndContext.d.ts.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeDndContext.js +245 -0
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeDndContext.js.map +1 -0
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.d.ts +4 -3
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.js +2 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.css +45 -22
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.css.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.d.ts +13 -14
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.js +9 -7
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.d.ts +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.js +8 -7
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.js.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.d.ts +4 -4
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.d.ts.map +1 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.js +5 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.js.map +1 -1
- package/package.json +20 -19
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.d.ts +0 -21
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.d.ts.map +0 -1
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.js +0 -149
- package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SortableTreeDndContext.js","names":["React","useCallback","useEffect","useMemo","useRef","useState","createPortal","DndContext","closestCenter","KeyboardSensor","useSensor","useSensors","MeasuringStrategy","DragOverlay","defaultDropAnimation","SortableContext","verticalListSortingStrategy","CSS","flattenTree","getChildCount","getProjection","sortableTreeKeyboardCoordinates","PointerSensorWithInteraction","TreeItem","jsx","_jsx","jsxs","_jsxs","MEASURING","droppable","strategy","Always","CONSTRAINT","activationConstraint","distance","DRAG_OVERLAY_STYLE","pointerEvents","dropAnimationConfig","keyframes","_ref","transform","opacity","Transform","toString","initial","final","easing","sideEffects","_ref2","active","node","animate","duration","adjustToCursor","args","_adjustToCursor$offse","offsetY","activeNodeRect","activatorEvent","PointerEvent","Math","floor","clientY","top","height","_objectSpread","y","SortableTreeDndContext","_ref3","items","indentationWidth","onDragStart","onDragEnd","children","renderItem","activeId","setActiveId","overId","setOverId","offsetLeft","setOffsetLeft","flattenedItems","flattenedTree","filter","_ref4","id","selected","activeItem","find","_ref5","projected","sensorContext","offset","keyboardOptions","coordinateGetter","keyboardCodes","start","cancel","end","sensors","sortedIds","map","_ref6","current","handleDragStart","event","newActiveId","document","body","style","setProperty","handleDragMove","_ref7","delta","x","handleDragOver","_ref8","_ref9","over","resetState","handleDragEnd","_ref0","depth","parentId","clonedItems","JSON","parse","stringify","overIndex","findIndex","_ref1","activeIndex","_ref10","activeTreeItem","handleDragCancel","collisionDetection","measuring","onDragMove","onDragOver","onDragCancel","dropAnimation","modifiers","className","clone","childCount","value","item"],"sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeDndContext.tsx"],"sourcesContent":["import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport {\n DndContext,\n closestCenter,\n KeyboardSensor,\n type KeyboardSensorOptions,\n useSensor,\n useSensors,\n type DragStartEvent,\n type DragMoveEvent,\n type DragEndEvent,\n type DragOverEvent,\n MeasuringStrategy,\n DragOverlay,\n type DropAnimation,\n defaultDropAnimation,\n type Modifier,\n} from '@dnd-kit/core';\nimport {\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { flattenTree, getChildCount, getProjection } from './utilities';\nimport type {\n FlattenedItem,\n SensorContext,\n TreeItem as TreeItemType,\n} from './types';\nimport { sortableTreeKeyboardCoordinates } from './keyboardCoordinates';\nimport PointerSensorWithInteraction from './PointerSensorWithInteraction';\nimport { TreeItem, type TreeItemRenderFn } from './TreeItem';\n\nconst MEASURING = {\n droppable: {\n strategy: MeasuringStrategy.Always,\n },\n};\n\nconst CONSTRAINT = {\n activationConstraint: {\n distance: 5,\n },\n};\n\n// Disabling pointer events allows us to use scroll wheel while dragging\nconst DRAG_OVERLAY_STYLE = { pointerEvents: 'none' } as const;\n\nconst dropAnimationConfig: DropAnimation = {\n keyframes({ transform }) {\n return [\n { opacity: 1, transform: CSS.Transform.toString(transform.initial) },\n { opacity: 0, transform: CSS.Transform.toString(transform.final) },\n ];\n },\n easing: 'ease-out',\n sideEffects({ active }) {\n active.node.animate([{ opacity: 0 }, { opacity: 1 }], {\n duration: defaultDropAnimation.duration,\n easing: defaultDropAnimation.easing,\n });\n },\n};\n\n/**\n * This adjusts the transform to move to the cursor if it gets shifted due to multi-select.\n * With multi-select, the selected items (except dragged) are removed on drag.\n * This can cause the overlay item to disconnect from the cursor in some cases.\n * E.g. select first 3 items, start dragging from 3rd item.\n * Without this modifier, the drag overlay will be shifted 60px up from the cursor after the items are removed.\n *\n * This assumes all items are the same height as the dragged item\n * @param args Modifier args from dnd-kit\n * @returns Transform so that the dragged item stays on the cursor\n */\nfunction adjustToCursor(args: Parameters<Modifier>[0]): {\n y: number;\n x: number;\n scaleX: number;\n scaleY: number;\n} {\n if (\n adjustToCursor.offsetY == null &&\n args.activeNodeRect &&\n args.activatorEvent instanceof PointerEvent\n ) {\n adjustToCursor.offsetY =\n Math.floor(\n (args.activatorEvent.clientY - args.activeNodeRect.top) /\n args.activeNodeRect.height\n ) * args.activeNodeRect.height;\n }\n\n if (!args.activeNodeRect) {\n adjustToCursor.offsetY = null;\n }\n\n return {\n ...args.transform,\n y: args.transform.y + (adjustToCursor.offsetY ?? 0),\n };\n}\n\n// Used to track the offset for adjustToCursor\n// Once drag starts, set this. Once it ends, null this\n// Kind of hacky to store it as a property on the function,\n// but avoids a singleton state or needing hooks to maintain this.\n// The logic came from the dnd-kit example.\nadjustToCursor.offsetY = null as number | null;\n\ntype Props<T> = React.PropsWithChildren<{\n items: TreeItemType<T>[];\n indentationWidth?: number;\n onDragStart?: (id: string, event: DragStartEvent) => void;\n onDragEnd?: (from: FlattenedItem<T>, to: FlattenedItem<T>) => void;\n renderItem: TreeItemRenderFn<T>;\n}>;\n\nexport default function SortableTreeDndContext<T>({\n items,\n indentationWidth = 30,\n onDragStart,\n onDragEnd,\n children,\n renderItem,\n}: Props<T>): JSX.Element {\n const [activeId, setActiveId] = useState<string | null>(null);\n const [overId, setOverId] = useState<string | null>(null);\n const [offsetLeft, setOffsetLeft] = useState(0);\n\n const flattenedItems = useMemo(() => {\n const flattenedTree = flattenTree(items);\n\n if (activeId != null) {\n return flattenedTree.filter(\n ({ id, selected }) => id === activeId || !selected\n );\n }\n\n return flattenedTree;\n }, [activeId, items]);\n\n const activeItem =\n activeId != null ? flattenedItems.find(({ id }) => id === activeId) : null;\n\n const projected =\n activeId != null && overId != null\n ? getProjection(\n flattenedItems,\n activeId,\n overId,\n offsetLeft,\n indentationWidth\n )\n : null;\n const sensorContext: SensorContext = useRef({\n items: flattenedItems,\n offset: offsetLeft,\n });\n const keyboardOptions = useMemo(\n () =>\n ({\n coordinateGetter: sortableTreeKeyboardCoordinates(\n sensorContext,\n indentationWidth\n ),\n keyboardCodes: {\n // Default is space and enter for start/end,\n // but enter is used to select items from the search list\n start: ['Space'],\n cancel: ['Escape'],\n end: ['Space'],\n },\n }) satisfies KeyboardSensorOptions,\n [indentationWidth]\n );\n\n const sensors = useSensors(\n useSensor(PointerSensorWithInteraction, CONSTRAINT),\n useSensor(KeyboardSensor, keyboardOptions)\n );\n\n const sortedIds = useMemo(\n () => flattenedItems.map(({ id }) => id),\n [flattenedItems]\n );\n\n useEffect(() => {\n sensorContext.current = {\n items: flattenedItems,\n offset: offsetLeft,\n };\n }, [flattenedItems, offsetLeft]);\n\n const handleDragStart = useCallback(\n (event: DragStartEvent) => {\n const {\n active: { id: newActiveId },\n } = event;\n setActiveId(newActiveId as string);\n setOverId(newActiveId as string);\n onDragStart?.(newActiveId as string, event);\n\n document.body.style.setProperty('cursor', 'grabbing');\n },\n [onDragStart]\n );\n\n const handleDragMove = useCallback(({ delta }: DragMoveEvent) => {\n setOffsetLeft(delta.x);\n }, []);\n\n const handleDragOver = useCallback(({ over }: DragOverEvent) => {\n setOverId((over?.id as string) ?? null);\n }, []);\n\n const resetState = useCallback(() => {\n setOverId(null);\n setActiveId(null);\n setOffsetLeft(0);\n\n document.body.style.setProperty('cursor', '');\n }, []);\n\n const handleDragEnd = useCallback(\n ({ active, over }: DragEndEvent) => {\n if (projected && over) {\n const { depth, parentId } = projected;\n\n const clonedItems: FlattenedItem<T>[] = JSON.parse(\n JSON.stringify(flattenTree(items))\n );\n const overIndex = clonedItems.findIndex(({ id }) => id === over.id);\n const activeIndex = clonedItems.findIndex(({ id }) => id === active.id);\n const activeTreeItem = clonedItems[activeIndex];\n\n clonedItems[activeIndex] = { ...activeTreeItem, depth, parentId };\n\n onDragEnd?.(activeTreeItem, {\n ...clonedItems[overIndex],\n parentId: projected.parentId,\n });\n }\n resetState();\n },\n [items, onDragEnd, projected, resetState]\n );\n\n const handleDragCancel = useCallback(() => {\n resetState();\n }, [resetState]);\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n measuring={MEASURING}\n onDragStart={handleDragStart}\n onDragMove={handleDragMove}\n onDragOver={handleDragOver}\n onDragEnd={handleDragEnd}\n onDragCancel={handleDragCancel}\n >\n <SortableContext items={sortedIds} strategy={verticalListSortingStrategy}>\n {children}\n {createPortal(\n <DragOverlay\n dropAnimation={dropAnimationConfig}\n modifiers={[adjustToCursor]}\n className=\"visibility-ordering-list\"\n style={DRAG_OVERLAY_STYLE}\n >\n {activeId != null && activeItem ? (\n <TreeItem\n depth={activeItem.depth}\n clone\n childCount={getChildCount(items, activeId) + 1}\n value={activeId.toString()}\n renderItem={renderItem}\n item={activeItem}\n />\n ) : null}\n </DragOverlay>,\n document.body\n )}\n </SortableContext>\n </DndContext>\n );\n}\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,YAAY,QAAQ,WAAW;AACxC,SACEC,UAAU,EACVC,aAAa,EACbC,cAAc,EAEdC,SAAS,EACTC,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I,EAAE3D;QAAW,CAClB,CAAC,GACA;MAAI,CACG,CAAC,EACdoB,QAAQ,CAACC,IACX,CAAC;IAAA,CACc;EAAC,CACR,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type TreeItemProps } from './TreeItem';
|
|
2
|
+
interface SortableTreeItemProps<T> extends Omit<TreeItemProps<T>, 'style'> {
|
|
3
3
|
id: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function SortableTreeItem<T>({ id, depth, ...props }:
|
|
5
|
+
export declare function SortableTreeItem<T>({ id, depth, ...props }: SortableTreeItemProps<T>): JSX.Element;
|
|
6
|
+
export {};
|
|
6
7
|
//# sourceMappingURL=SortableTreeItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableTreeItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,
|
|
1
|
+
{"version":3,"file":"SortableTreeItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D,UAAU,qBAAqB,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;IACxE,EAAE,EAAE,MAAM,CAAC;CACZ;AAOD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,EAClC,EAAE,EACF,KAAK,EACL,GAAG,KAAK,EACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA+CxC"}
|
|
@@ -52,7 +52,8 @@ export function SortableTreeItem(_ref2) {
|
|
|
52
52
|
depth: depth,
|
|
53
53
|
ghost: isDragging,
|
|
54
54
|
disableInteraction: isSorting,
|
|
55
|
-
handleProps: handleProps
|
|
55
|
+
handleProps: handleProps,
|
|
56
|
+
style: style
|
|
56
57
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
57
58
|
}, props));
|
|
58
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableTreeItem.js","names":["React","useMemo","useSortable","CSS","TreeItem","jsx","_jsx","animateLayoutChanges","_ref","isSorting","wasDragging","SortableTreeItem","_ref2","id","depth","props","_objectWithoutProperties","_excluded","attributes","isDragging","listeners","setDraggableNodeRef","setDroppableNodeRef","transform","transition","transformString","Translate","toString","style","handleProps","_objectSpread","dragRef","wrapperRef","ghost","disableInteraction"],"sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\nimport React, { type CSSProperties, useMemo } from 'react';\nimport { type AnimateLayoutChanges, useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { TreeItem, type
|
|
1
|
+
{"version":3,"file":"SortableTreeItem.js","names":["React","useMemo","useSortable","CSS","TreeItem","jsx","_jsx","animateLayoutChanges","_ref","isSorting","wasDragging","SortableTreeItem","_ref2","id","depth","props","_objectWithoutProperties","_excluded","attributes","isDragging","listeners","setDraggableNodeRef","setDroppableNodeRef","transform","transition","transformString","Translate","toString","style","handleProps","_objectSpread","dragRef","wrapperRef","ghost","disableInteraction"],"sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.tsx"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\nimport React, { type CSSProperties, useMemo } from 'react';\nimport { type AnimateLayoutChanges, useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { TreeItem, type TreeItemProps } from './TreeItem';\n\ninterface SortableTreeItemProps<T> extends Omit<TreeItemProps<T>, 'style'> {\n id: string;\n}\n\nconst animateLayoutChanges: AnimateLayoutChanges = ({\n isSorting,\n wasDragging,\n}) => !(isSorting || wasDragging);\n\nexport function SortableTreeItem<T>({\n id,\n depth,\n ...props\n}: SortableTreeItemProps<T>): JSX.Element {\n const {\n attributes,\n isDragging,\n isSorting,\n listeners,\n setDraggableNodeRef,\n setDroppableNodeRef,\n transform,\n transition,\n } = useSortable({\n id,\n animateLayoutChanges,\n });\n\n const transformString = CSS.Translate.toString(transform);\n\n const style: CSSProperties = useMemo(\n () => ({\n transform: transformString,\n transition,\n }),\n [transformString, transition]\n );\n\n const handleProps = useMemo(\n () => ({\n ...attributes,\n ...listeners,\n style,\n }),\n [attributes, listeners, style]\n );\n\n return (\n <TreeItem\n dragRef={setDraggableNodeRef}\n wrapperRef={setDroppableNodeRef}\n depth={depth}\n ghost={isDragging}\n disableInteraction={isSorting}\n handleProps={handleProps}\n style={style}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;AAAA;AACA,OAAOA,KAAK,IAAwBC,OAAO,QAAQ,OAAO;AAC1D,SAAoCC,WAAW,QAAQ,mBAAmB;AAC1E,SAASC,GAAG,QAAQ,oBAAoB;AAAC,SAChCC,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMjB,IAAMC,oBAA0C,GAAGC,IAAA;EAAA,IAAC;IAClDC,SAAS;IACTC;EACF,CAAC,GAAAF,IAAA;EAAA,OAAK,EAAEC,SAAS,IAAIC,WAAW,CAAC;AAAA;AAEjC,OAAO,SAASC,gBAAgBA,CAAAC,KAAA,EAIU;EAAA,IAJN;MAClCC,EAAE;MACFC;IAEwB,CAAC,GAAAF,KAAA;IADtBG,KAAK,GAAAC,wBAAA,CAAAJ,KAAA,EAAAK,SAAA;EAER,IAAM;IACJC,UAAU;IACVC,UAAU;IACVV,SAAS;IACTW,SAAS;IACTC,mBAAmB;IACnBC,mBAAmB;IACnBC,SAAS;IACTC;EACF,CAAC,GAAGtB,WAAW,CAAC;IACdW,EAAE;IACFN;EACF,CAAC,CAAC;EAEF,IAAMkB,eAAe,GAAGtB,GAAG,CAACuB,SAAS,CAACC,QAAQ,CAACJ,SAAS,CAAC;EAEzD,IAAMK,KAAoB,GAAG3B,OAAO,CAClC,OAAO;IACLsB,SAAS,EAAEE,eAAe;IAC1BD;EACF,CAAC,CAAC,EACF,CAACC,eAAe,EAAED,UAAU,CAC9B,CAAC;EAED,IAAMK,WAAW,GAAG5B,OAAO,CACzB,MAAA6B,aAAA,CAAAA,aAAA,CAAAA,aAAA,KACKZ,UAAU,GACVE,SAAS;IACZQ;EAAK,EACL,EACF,CAACV,UAAU,EAAEE,SAAS,EAAEQ,KAAK,CAC/B,CAAC;EAED,oBACEtB,IAAA,CAACF,QAAQ,EAAA0B,aAAA;IACPC,OAAO,EAAEV,mBAAoB;IAC7BW,UAAU,EAAEV,mBAAoB;IAChCR,KAAK,EAAEA,KAAM;IACbmB,KAAK,EAAEd,UAAW;IAClBe,kBAAkB,EAAEzB,SAAU;IAC9BoB,WAAW,EAAEA,WAAY;IACzBD,KAAK,EAAEA;IACP;EAAA,GACIb,KAAK,CACV,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* stylelint-disable scss/at-import-no-partial-leading-underscore */
|
|
2
2
|
/* stylelint-disable-next-line number-max-precision */
|
|
3
|
-
.visibility-ordering-list .tree-item
|
|
3
|
+
.visibility-ordering-list .tree-item,
|
|
4
|
+
.visibility-search-list .tree-item {
|
|
4
5
|
position: relative;
|
|
5
6
|
display: flex;
|
|
6
7
|
gap: 0.25rem;
|
|
@@ -15,40 +16,49 @@
|
|
|
15
16
|
border-radius: 4px;
|
|
16
17
|
padding: 0 0.25rem;
|
|
17
18
|
}
|
|
18
|
-
.visibility-ordering-list .tree-item svg:not(.color-swatch)
|
|
19
|
+
.visibility-ordering-list .tree-item svg:not(.color-swatch),
|
|
20
|
+
.visibility-search-list .tree-item svg:not(.color-swatch) {
|
|
19
21
|
color: var(--dh-color-gray-600);
|
|
20
22
|
}
|
|
21
|
-
.visibility-ordering-list .tree-item:hover
|
|
23
|
+
.visibility-ordering-list .tree-item:hover,
|
|
24
|
+
.visibility-search-list .tree-item:hover {
|
|
22
25
|
background: var(--dh-color-item-list-hover-bg);
|
|
23
26
|
cursor: grab;
|
|
24
27
|
}
|
|
25
|
-
.visibility-ordering-list .tree-item.isSelected
|
|
28
|
+
.visibility-ordering-list .tree-item.isSelected,
|
|
29
|
+
.visibility-search-list .tree-item.isSelected {
|
|
26
30
|
background-color: var(--dh-color-item-list-selected-bg);
|
|
27
31
|
}
|
|
28
|
-
.visibility-ordering-list .tree-item.isSelected:hover
|
|
32
|
+
.visibility-ordering-list .tree-item.isSelected:hover,
|
|
33
|
+
.visibility-search-list .tree-item.isSelected:hover {
|
|
29
34
|
background-color: var(--dh-color-item-list-selected-hover-bg);
|
|
30
35
|
}
|
|
31
|
-
.visibility-ordering-list .tree-item.isSelected:hover svg:not(.color-swatch)
|
|
36
|
+
.visibility-ordering-list .tree-item.isSelected:hover svg:not(.color-swatch),
|
|
37
|
+
.visibility-search-list .tree-item.isSelected:hover svg:not(.color-swatch) {
|
|
32
38
|
color: var(--dh-color-fg, #f0f0ee);
|
|
33
39
|
}
|
|
34
|
-
.visibility-ordering-list .tree-item:focus
|
|
40
|
+
.visibility-ordering-list .tree-item:focus,
|
|
41
|
+
.visibility-search-list .tree-item:focus {
|
|
35
42
|
outline: 0;
|
|
36
43
|
border: 1px solid var(--dh-color-input-focus-border);
|
|
37
44
|
box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--dh-color-accent) 35%, transparent);
|
|
38
45
|
}
|
|
39
|
-
.visibility-ordering-list .tree-item .column-name
|
|
46
|
+
.visibility-ordering-list .tree-item .column-name,
|
|
47
|
+
.visibility-search-list .tree-item .column-name {
|
|
40
48
|
flex-grow: 1;
|
|
41
49
|
flex-shrink: 1;
|
|
42
50
|
overflow-x: hidden;
|
|
43
51
|
text-overflow: ellipsis;
|
|
44
52
|
}
|
|
45
|
-
.visibility-ordering-list .tree-item .item-count
|
|
53
|
+
.visibility-ordering-list .tree-item .item-count,
|
|
54
|
+
.visibility-search-list .tree-item .item-count {
|
|
46
55
|
padding: 0 0.5rem;
|
|
47
56
|
border-radius: 1rem;
|
|
48
57
|
background-color: color-mix(in srgb, var(--dh-color-fg) 25%, transparent);
|
|
49
58
|
margin-right: 0.25rem;
|
|
50
59
|
}
|
|
51
|
-
.visibility-ordering-list .marching-ants
|
|
60
|
+
.visibility-ordering-list .marching-ants,
|
|
61
|
+
.visibility-search-list .marching-ants {
|
|
52
62
|
background-image: linear-gradient(to right, var(--dh-color-bg, #1a171a) 50%, var(--dh-color-fg, #f0f0ee) 50%), linear-gradient(to right, var(--dh-color-bg, #1a171a) 50%, var(--dh-color-fg, #f0f0ee) 50%), linear-gradient(to bottom, var(--dh-color-bg, #1a171a) 50%, var(--dh-color-fg, #f0f0ee) 50%), linear-gradient(to bottom, var(--dh-color-bg, #1a171a) 50%, var(--dh-color-fg, #f0f0ee) 50%);
|
|
53
63
|
background-size: 8px 1px, 8px 1px, 1px 8px, 1px 8px;
|
|
54
64
|
background-position: 0 top, 0 bottom, left 0, right 0;
|
|
@@ -57,7 +67,8 @@
|
|
|
57
67
|
animation-timing-function: linear;
|
|
58
68
|
animation-iteration-count: infinite;
|
|
59
69
|
}
|
|
60
|
-
.visibility-ordering-list .item-wrapper
|
|
70
|
+
.visibility-ordering-list .item-wrapper,
|
|
71
|
+
.visibility-search-list .item-wrapper {
|
|
61
72
|
list-style: none;
|
|
62
73
|
box-sizing: border-box;
|
|
63
74
|
margin-bottom: 1px;
|
|
@@ -66,20 +77,25 @@
|
|
|
66
77
|
flex-direction: row;
|
|
67
78
|
flex-wrap: nowrap;
|
|
68
79
|
}
|
|
69
|
-
.visibility-ordering-list .item-wrapper.clone
|
|
80
|
+
.visibility-ordering-list .item-wrapper.clone,
|
|
81
|
+
.visibility-search-list .item-wrapper.clone {
|
|
70
82
|
pointer-events: none;
|
|
71
83
|
padding: 0;
|
|
72
84
|
}
|
|
73
|
-
.visibility-ordering-list .item-wrapper.clone .tree-item
|
|
85
|
+
.visibility-ordering-list .item-wrapper.clone .tree-item,
|
|
86
|
+
.visibility-search-list .item-wrapper.clone .tree-item {
|
|
74
87
|
opacity: 1;
|
|
75
88
|
background-color: var(--dh-color-accent-bg);
|
|
76
89
|
color: var(--dh-color-accent-contrast);
|
|
77
90
|
box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);
|
|
91
|
+
padding: 0.25rem;
|
|
78
92
|
}
|
|
79
|
-
.visibility-ordering-list .item-wrapper.clone .tree-item svg:not(.color-swatch)
|
|
93
|
+
.visibility-ordering-list .item-wrapper.clone .tree-item svg:not(.color-swatch),
|
|
94
|
+
.visibility-search-list .item-wrapper.clone .tree-item svg:not(.color-swatch) {
|
|
80
95
|
color: var(--dh-color-accent-contrast);
|
|
81
96
|
}
|
|
82
|
-
.visibility-ordering-list .item-wrapper.clone .tree-item.two-dragged::before
|
|
97
|
+
.visibility-ordering-list .item-wrapper.clone .tree-item.two-dragged::before,
|
|
98
|
+
.visibility-search-list .item-wrapper.clone .tree-item.two-dragged::before {
|
|
83
99
|
content: " ";
|
|
84
100
|
background: var(--dh-color-accent-bg);
|
|
85
101
|
box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);
|
|
@@ -92,7 +108,8 @@
|
|
|
92
108
|
opacity: 0.8;
|
|
93
109
|
z-index: -1;
|
|
94
110
|
}
|
|
95
|
-
.visibility-ordering-list .item-wrapper.clone .tree-item.multiple-dragged::before
|
|
111
|
+
.visibility-ordering-list .item-wrapper.clone .tree-item.multiple-dragged::before,
|
|
112
|
+
.visibility-search-list .item-wrapper.clone .tree-item.multiple-dragged::before {
|
|
96
113
|
content: " ";
|
|
97
114
|
background: var(--dh-color-accent-bg);
|
|
98
115
|
box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);
|
|
@@ -105,7 +122,8 @@
|
|
|
105
122
|
opacity: 0.8;
|
|
106
123
|
z-index: -1;
|
|
107
124
|
}
|
|
108
|
-
.visibility-ordering-list .item-wrapper.clone .tree-item.multiple-dragged::after
|
|
125
|
+
.visibility-ordering-list .item-wrapper.clone .tree-item.multiple-dragged::after,
|
|
126
|
+
.visibility-search-list .item-wrapper.clone .tree-item.multiple-dragged::after {
|
|
109
127
|
content: " ";
|
|
110
128
|
background: var(--dh-color-accent-bg);
|
|
111
129
|
box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);
|
|
@@ -118,20 +136,25 @@
|
|
|
118
136
|
opacity: 0.6;
|
|
119
137
|
z-index: -2;
|
|
120
138
|
}
|
|
121
|
-
.visibility-ordering-list .item-wrapper.ghost
|
|
139
|
+
.visibility-ordering-list .item-wrapper.ghost,
|
|
140
|
+
.visibility-search-list .item-wrapper.ghost {
|
|
122
141
|
opacity: 0.5;
|
|
123
142
|
}
|
|
124
|
-
.visibility-ordering-list .item-wrapper.ghost .tree-item >
|
|
143
|
+
.visibility-ordering-list .item-wrapper.ghost .tree-item > *,
|
|
144
|
+
.visibility-search-list .item-wrapper.ghost .tree-item > * {
|
|
125
145
|
box-shadow: none;
|
|
126
146
|
background-color: transparent;
|
|
127
147
|
}
|
|
128
|
-
.visibility-ordering-list .item-wrapper.disableInteraction
|
|
148
|
+
.visibility-ordering-list .item-wrapper.disableInteraction,
|
|
149
|
+
.visibility-search-list .item-wrapper.disableInteraction {
|
|
129
150
|
pointer-events: none;
|
|
130
151
|
}
|
|
131
|
-
.visibility-ordering-list .item-wrapper.disableInteraction:not(.ghost) .tree-item.isSelected
|
|
152
|
+
.visibility-ordering-list .item-wrapper.disableInteraction:not(.ghost) .tree-item.isSelected,
|
|
153
|
+
.visibility-search-list .item-wrapper.disableInteraction:not(.ghost) .tree-item.isSelected {
|
|
132
154
|
opacity: 0.3;
|
|
133
155
|
}
|
|
134
|
-
.visibility-ordering-list .item-wrapper .depth-line
|
|
156
|
+
.visibility-ordering-list .item-wrapper .depth-line,
|
|
157
|
+
.visibility-search-list .item-wrapper .depth-line {
|
|
135
158
|
margin-left: calc(0.5rem + 8px + 0.5px);
|
|
136
159
|
margin-right: 0.25rem;
|
|
137
160
|
margin-top: -1px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../../node_modules/@deephaven/components/scss/custom.scss","../../../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../../src/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.scss","../../../../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;AC6LA;ACrLE;EACE;EACA;EACA,KCPO;EDQP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eDuIY;ECtIZ;;AAEA;EACE,ODNK;;ACSP;EACE;EACA;;AAGF;EACE;;AAEA;EACE;;AAEA;EACE,ODFG;;ACOT;EACE;EACA;EACA,YDyIuB;;ACtIzB;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA,cCzDK;;AD6DT;EC7CA;EAIA,iBACE;EAIF,qBACE;EAIF;EACA;EACA;EACA;;ADgCA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA,kBDWE;ECVF;EACA,YDsEK;;ACpEL;EACE;;AChDR;EACE;EACA,YFoDM;EEnDN,YFgHS;EE/GT,eF8GY;EE7GZ;EACA;EACA;ED8CQ;EACA;EACA;EACA;;ACxDV;EACE;EACA,YFoDM;EEnDN,YFgHS;EE/GT,eF8GY;EE7GZ;EACA;EACA;EDuDQ;EACA;EACA;EACA;;ACjEV;EACE;EACA,YFoDM;EEnDN,YFgHS;EE/GT,eF8GY;EE7GZ;EACA;EACA;ED6DQ;EACA;EACA;EACA;;AAMR;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;;AAEA;EACE;;AAIJ;EACE,aArIS;EAsIT,cCrIK;EDsIL;EACA","file":"TreeItem.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-text-disabled);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n","@import '@deephaven/components/scss/custom.scss';\n\n$depth-line-color: $gray-600;\n$depth-margin: calc(\n 0.5rem + 8px + 0.5px\n); // Tree item 0.25rem padding, Icon button 0.25rem, half of icon size, and half pixel to offset 1px border\n\n.visibility-ordering-list {\n .tree-item {\n position: relative;\n display: flex;\n gap: $spacer-1;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n flex-grow: 1;\n min-width: 0; // Needed so column names don't grow past the edge\n border: $input-border-width solid transparent;\n user-select: none;\n border-radius: $border-radius;\n padding: 0 $spacer-1; // space for focus border\n\n svg:not(.color-swatch) {\n color: $text-muted;\n }\n\n &:hover {\n background: var(--dh-color-item-list-hover-bg);\n cursor: grab;\n }\n\n &.isSelected {\n background-color: var(--dh-color-item-list-selected-bg);\n\n &:hover {\n background-color: var(--dh-color-item-list-selected-hover-bg);\n\n svg:not(.color-swatch) {\n color: $foreground;\n }\n }\n }\n\n &:focus {\n outline: 0;\n border: $input-border-width solid $input-focus-border-color;\n box-shadow: $input-focus-box-shadow;\n }\n\n .column-name {\n flex-grow: 1;\n flex-shrink: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n\n .item-count {\n padding: 0 $spacer-2;\n border-radius: 1rem;\n background-color: fg-opacity(25);\n margin-right: $spacer-1;\n }\n }\n\n .marching-ants {\n @include ants-base($foreground, $background);\n }\n\n .item-wrapper {\n list-style: none;\n box-sizing: border-box;\n margin-bottom: 1px;\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n\n &.clone {\n pointer-events: none;\n padding: 0;\n\n .tree-item {\n opacity: 1;\n background-color: $primary;\n color: var(--dh-color-accent-contrast);\n box-shadow: $box-shadow;\n\n svg:not(.color-swatch) {\n color: var(--dh-color-accent-contrast);\n }\n\n &.two-dragged {\n @include drag-stack(before) {\n top: 4px;\n left: 2px;\n opacity: 0.8;\n z-index: -1;\n }\n }\n\n &.multiple-dragged {\n @include drag-stack(before) {\n top: 4px;\n left: 2px;\n opacity: 0.8;\n z-index: -1;\n }\n @include drag-stack(after) {\n top: 8px;\n left: 4px;\n opacity: 0.6;\n z-index: -2;\n }\n }\n }\n }\n\n &.ghost {\n opacity: 0.5;\n\n .tree-item > * {\n box-shadow: none;\n background-color: transparent;\n }\n }\n\n &.disableInteraction {\n pointer-events: none;\n\n &:not(.ghost) .tree-item.isSelected {\n opacity: 0.3;\n }\n }\n\n .depth-line {\n margin-left: $depth-margin;\n margin-right: $spacer-1; // Gives breathing room to the item boxes\n margin-top: -1px; // removes gaps between depth lines caused by item's margin-bottom\n border-left: 1px solid $depth-line-color;\n }\n }\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n$focus-bg-transparency: 12%;\n$hover-bg-transparency: 14%;\n$active-bg-transparency: 28%;\n$exception-transparency: 28%;\n"]}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../../../node_modules/@deephaven/components/scss/custom.scss","../../../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../../src/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.scss","../../../../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;AC6LA;ACpLE;AAAA;EACE;EACA;EACA,KCRO;EDSP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eDsIY;ECrIZ;;AAEA;AAAA;EACE,ODPK;;ACUP;AAAA;EACE;EACA;;AAGF;AAAA;EACE;;AAEA;AAAA;EACE;;AAEA;AAAA;EACE,ODHG;;ACQT;AAAA;EACE;EACA;EACA,YDwIuB;;ACrIzB;AAAA;EACE;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA,cC1DK;;AD8DT;AAAA;EC9CA;EAIA,iBACE;EAIF,qBACE;EAIF;EACA;EACA;EACA;;ADiCA;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;;AAEA;AAAA;EACE;EACA,kBDUE;ECTF;EACA,YDqEK;ECpEL,SCpFG;;ADsFH;AAAA;EACE;;AClDR;AAAA;EACE;EACA,YFoDM;EEnDN,YFgHS;EE/GT,eF8GY;EE7GZ;EACA;EACA;EDgDQ;EACA;EACA;EACA;;AC1DV;AAAA;EACE;EACA,YFoDM;EEnDN,YFgHS;EE/GT,eF8GY;EE7GZ;EACA;EACA;EDyDQ;EACA;EACA;EACA;;ACnEV;AAAA;EACE;EACA,YFoDM;EEnDN,YFgHS;EE/GT,eF8GY;EE7GZ;EACA;EACA;ED+DQ;EACA;EACA;EACA;;AAMR;AAAA;EACE;;AAEA;AAAA;EACE;EACA;;AAIJ;AAAA;EACE;;AAEA;AAAA;EACE;;AAIJ;AAAA;EACE,aAvIS;EAwIT,cCvIK;EDwIL;EACA","file":"TreeItem.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-text-disabled);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n","@import '@deephaven/components/scss/custom.scss';\n\n$depth-line-color: $gray-600;\n$depth-margin: calc(\n 0.5rem + 8px + 0.5px\n); // Tree item 0.25rem padding, Icon button 0.25rem, half of icon size, and half pixel to offset 1px border\n\n.visibility-ordering-list,\n.visibility-search-list {\n .tree-item {\n position: relative;\n display: flex;\n gap: $spacer-1;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n flex-grow: 1;\n min-width: 0; // Needed so column names don't grow past the edge\n border: $input-border-width solid transparent;\n user-select: none;\n border-radius: $border-radius;\n padding: 0 $spacer-1; // space for focus border\n\n svg:not(.color-swatch) {\n color: $text-muted;\n }\n\n &:hover {\n background: var(--dh-color-item-list-hover-bg);\n cursor: grab;\n }\n\n &.isSelected {\n background-color: var(--dh-color-item-list-selected-bg);\n\n &:hover {\n background-color: var(--dh-color-item-list-selected-hover-bg);\n\n svg:not(.color-swatch) {\n color: $foreground;\n }\n }\n }\n\n &:focus {\n outline: 0;\n border: $input-border-width solid $input-focus-border-color;\n box-shadow: $input-focus-box-shadow;\n }\n\n .column-name {\n flex-grow: 1;\n flex-shrink: 1;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n\n .item-count {\n padding: 0 $spacer-2;\n border-radius: 1rem;\n background-color: fg-opacity(25);\n margin-right: $spacer-1;\n }\n }\n\n .marching-ants {\n @include ants-base($foreground, $background);\n }\n\n .item-wrapper {\n list-style: none;\n box-sizing: border-box;\n margin-bottom: 1px;\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n\n &.clone {\n pointer-events: none;\n padding: 0;\n\n .tree-item {\n opacity: 1;\n background-color: $primary;\n color: var(--dh-color-accent-contrast);\n box-shadow: $box-shadow;\n padding: $spacer-1;\n\n svg:not(.color-swatch) {\n color: var(--dh-color-accent-contrast);\n }\n\n &.two-dragged {\n @include drag-stack(before) {\n top: 4px;\n left: 2px;\n opacity: 0.8;\n z-index: -1;\n }\n }\n\n &.multiple-dragged {\n @include drag-stack(before) {\n top: 4px;\n left: 2px;\n opacity: 0.8;\n z-index: -1;\n }\n @include drag-stack(after) {\n top: 8px;\n left: 4px;\n opacity: 0.6;\n z-index: -2;\n }\n }\n }\n }\n\n &.ghost {\n opacity: 0.5;\n\n .tree-item > * {\n box-shadow: none;\n background-color: transparent;\n }\n }\n\n &.disableInteraction {\n pointer-events: none;\n\n &:not(.ghost) .tree-item.isSelected {\n opacity: 0.3;\n }\n }\n\n .depth-line {\n margin-left: $depth-margin;\n margin-right: $spacer-1; // Gives breathing room to the item boxes\n margin-top: -1px; // removes gaps between depth lines caused by item's margin-bottom\n border-left: 1px solid $depth-line-color;\n }\n }\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n$focus-bg-transparency: 12%;\n$hover-bg-transparency: 14%;\n$active-bg-transparency: 28%;\n$exception-transparency: 28%;\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FlattenedItem
|
|
2
|
+
import type { FlattenedItem } from './types';
|
|
3
3
|
import './TreeItem.scss';
|
|
4
|
-
export interface
|
|
4
|
+
export interface TreeItemProps<T> {
|
|
5
5
|
childCount?: number;
|
|
6
6
|
clone?: boolean;
|
|
7
7
|
depth: number;
|
|
8
|
+
withDepthMarkers?: boolean;
|
|
8
9
|
disableInteraction?: boolean;
|
|
9
10
|
ghost?: boolean;
|
|
10
11
|
handleProps?: Record<string, unknown>;
|
|
@@ -12,24 +13,22 @@ export interface Props<T> {
|
|
|
12
13
|
item: FlattenedItem<T>;
|
|
13
14
|
dragRef?: React.Ref<HTMLDivElement> | null;
|
|
14
15
|
wrapperRef?: React.Ref<HTMLLIElement> | null;
|
|
15
|
-
renderItem:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
item: FlattenedItem<T>;
|
|
21
|
-
handleProps?: Record<string, unknown>;
|
|
22
|
-
}) => JSX.Element;
|
|
16
|
+
renderItem: TreeItemRenderFn<T>;
|
|
17
|
+
/**
|
|
18
|
+
* Styles from dnd-kit to transform the depth lines
|
|
19
|
+
*/
|
|
20
|
+
style?: React.CSSProperties;
|
|
23
21
|
}
|
|
24
|
-
export type
|
|
22
|
+
export type TreeItemRenderFnProps<T> = {
|
|
25
23
|
ref: React.Ref<HTMLDivElement> | null;
|
|
26
24
|
clone: boolean;
|
|
27
25
|
childCount?: number;
|
|
28
26
|
value: string;
|
|
29
|
-
item:
|
|
27
|
+
item: FlattenedItem<T>;
|
|
30
28
|
handleProps?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export
|
|
29
|
+
};
|
|
30
|
+
export type TreeItemRenderFn<T> = (props: TreeItemRenderFnProps<T>) => JSX.Element;
|
|
31
|
+
export declare function TreeItem<T>(props: TreeItemProps<T>): JSX.Element;
|
|
33
32
|
export declare namespace TreeItem {
|
|
34
33
|
var displayName: string;
|
|
35
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"TreeItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,iBAAiB,CAAC;AAEzB,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAC7C,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAChC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACrC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAChC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAC5B,GAAG,CAAC,OAAO,CAAC;AAEjB,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA6DhE;yBA7De,QAAQ"}
|
|
@@ -7,6 +7,7 @@ export function TreeItem(props) {
|
|
|
7
7
|
var {
|
|
8
8
|
clone = false,
|
|
9
9
|
depth,
|
|
10
|
+
withDepthMarkers = true,
|
|
10
11
|
disableInteraction = false,
|
|
11
12
|
ghost = false,
|
|
12
13
|
handleProps,
|
|
@@ -15,13 +16,13 @@ export function TreeItem(props) {
|
|
|
15
16
|
wrapperRef = null,
|
|
16
17
|
renderItem,
|
|
17
18
|
item,
|
|
18
|
-
childCount
|
|
19
|
+
childCount,
|
|
20
|
+
style
|
|
19
21
|
} = props;
|
|
20
|
-
var depthMarkers = useMemo(() => Array(depth).fill(0)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, "depth-line-".concat(i))), [depth]);
|
|
22
|
+
var depthMarkers = useMemo(() => withDepthMarkers ? Array(depth).fill(0).map((_, i) => /*#__PURE__*/_jsx("span", {
|
|
23
|
+
className: "depth-line",
|
|
24
|
+
style: style
|
|
25
|
+
}, "depth-line-".concat(i))) : null, [depth, style, withDepthMarkers]);
|
|
25
26
|
var renderItemProps = useMemo(() => ({
|
|
26
27
|
ref: dragRef,
|
|
27
28
|
clone,
|
|
@@ -36,8 +37,9 @@ export function TreeItem(props) {
|
|
|
36
37
|
ghost,
|
|
37
38
|
disableInteraction
|
|
38
39
|
}),
|
|
40
|
+
"data-id": item.id,
|
|
39
41
|
ref: wrapperRef,
|
|
40
|
-
children: [!clone && depthMarkers, renderItem(renderItemProps)]
|
|
42
|
+
children: [!clone && withDepthMarkers && depthMarkers, renderItem(renderItemProps)]
|
|
41
43
|
}, value);
|
|
42
44
|
}
|
|
43
45
|
TreeItem.displayName = 'TreeItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeItem.js","names":["React","useMemo","classNames","jsx","_jsx","jsxs","_jsxs","TreeItem","props","clone","depth","disableInteraction","ghost","handleProps","value","dragRef","wrapperRef","renderItem","item","childCount","depthMarkers","Array","fill","map","_","i","className","concat","renderItemProps","ref","children","displayName"],"sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport React, { useMemo } from 'react';\nimport classNames from 'classnames';\nimport type { FlattenedItem
|
|
1
|
+
{"version":3,"file":"TreeItem.js","names":["React","useMemo","classNames","jsx","_jsx","jsxs","_jsxs","TreeItem","props","clone","depth","withDepthMarkers","disableInteraction","ghost","handleProps","value","dragRef","wrapperRef","renderItem","item","childCount","style","depthMarkers","Array","fill","map","_","i","className","concat","renderItemProps","ref","id","children","displayName"],"sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport React, { useMemo } from 'react';\nimport classNames from 'classnames';\nimport type { FlattenedItem } from './types';\nimport './TreeItem.scss';\n\nexport interface TreeItemProps<T> {\n childCount?: number;\n clone?: boolean;\n depth: number;\n withDepthMarkers?: boolean;\n disableInteraction?: boolean;\n ghost?: boolean;\n handleProps?: Record<string, unknown>;\n value: string;\n item: FlattenedItem<T>;\n dragRef?: React.Ref<HTMLDivElement> | null;\n wrapperRef?: React.Ref<HTMLLIElement> | null;\n renderItem: TreeItemRenderFn<T>;\n /**\n * Styles from dnd-kit to transform the depth lines\n */\n style?: React.CSSProperties;\n}\n\nexport type TreeItemRenderFnProps<T> = {\n ref: React.Ref<HTMLDivElement> | null;\n clone: boolean;\n childCount?: number;\n value: string;\n item: FlattenedItem<T>;\n handleProps?: Record<string, unknown>;\n};\n\nexport type TreeItemRenderFn<T> = (\n props: TreeItemRenderFnProps<T>\n) => JSX.Element;\n\nexport function TreeItem<T>(props: TreeItemProps<T>): JSX.Element {\n const {\n clone = false,\n depth,\n withDepthMarkers = true,\n disableInteraction = false,\n ghost = false,\n handleProps,\n value,\n dragRef = null,\n wrapperRef = null,\n renderItem,\n item,\n childCount,\n style,\n } = props;\n\n const depthMarkers = useMemo(\n () =>\n withDepthMarkers\n ? Array(depth)\n .fill(0)\n .map((_, i) => (\n <span\n // eslint-disable-next-line react/no-array-index-key\n key={`depth-line-${i}`}\n className=\"depth-line\"\n style={style}\n />\n ))\n : null,\n [depth, style, withDepthMarkers]\n );\n\n const renderItemProps = useMemo(\n () => ({\n ref: dragRef,\n clone,\n value,\n item,\n childCount,\n handleProps,\n }),\n [dragRef, clone, value, item, childCount, handleProps]\n );\n\n return (\n <li\n key={value}\n className={classNames('item-wrapper', {\n clone,\n ghost,\n disableInteraction,\n })}\n data-id={item.id}\n ref={wrapperRef}\n >\n {!clone && withDepthMarkers && depthMarkers}\n {renderItem(renderItemProps)}\n </li>\n );\n}\n\nTreeItem.displayName = 'TreeItem';\n"],"mappings":"AAAA;AACA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,UAAU,MAAM,YAAY;AAAC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoCpC,OAAO,SAASC,QAAQA,CAAIC,KAAuB,EAAe;EAChE,IAAM;IACJC,KAAK,GAAG,KAAK;IACbC,KAAK;IACLC,gBAAgB,GAAG,IAAI;IACvBC,kBAAkB,GAAG,KAAK;IAC1BC,KAAK,GAAG,KAAK;IACbC,WAAW;IACXC,KAAK;IACLC,OAAO,GAAG,IAAI;IACdC,UAAU,GAAG,IAAI;IACjBC,UAAU;IACVC,IAAI;IACJC,UAAU;IACVC;EACF,CAAC,GAAGb,KAAK;EAET,IAAMc,YAAY,GAAGrB,OAAO,CAC1B,MACEU,gBAAgB,GACZY,KAAK,CAACb,KAAK,CAAC,CACTc,IAAI,CAAC,CAAC,CAAC,CACPC,GAAG,CAAC,CAACC,CAAC,EAAEC,CAAC,kBACRvB,IAAA;IAGEwB,SAAS,EAAC,YAAY;IACtBP,KAAK,EAAEA;EAAM,iBAAAQ,MAAA,CAFMF,CAAC,CAGrB,CACF,CAAC,GACJ,IAAI,EACV,CAACjB,KAAK,EAAEW,KAAK,EAAEV,gBAAgB,CACjC,CAAC;EAED,IAAMmB,eAAe,GAAG7B,OAAO,CAC7B,OAAO;IACL8B,GAAG,EAAEf,OAAO;IACZP,KAAK;IACLM,KAAK;IACLI,IAAI;IACJC,UAAU;IACVN;EACF,CAAC,CAAC,EACF,CAACE,OAAO,EAAEP,KAAK,EAAEM,KAAK,EAAEI,IAAI,EAAEC,UAAU,EAAEN,WAAW,CACvD,CAAC;EAED,oBACER,KAAA;IAEEsB,SAAS,EAAE1B,UAAU,CAAC,cAAc,EAAE;MACpCO,KAAK;MACLI,KAAK;MACLD;IACF,CAAC,CAAE;IACH,WAASO,IAAI,CAACa,EAAG;IACjBD,GAAG,EAAEd,UAAW;IAAAgB,QAAA,GAEf,CAACxB,KAAK,IAAIE,gBAAgB,IAAIW,YAAY,EAC1CJ,UAAU,CAACY,eAAe,CAAC;EAAA,GAVvBf,KAWH,CAAC;AAET;AAEAR,QAAQ,CAAC2B,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type KeyboardCoordinateGetter } from '@dnd-kit/core';
|
|
2
2
|
import type { SensorContext } from './types';
|
|
3
|
-
export declare function sortableTreeKeyboardCoordinates(context: SensorContext,
|
|
3
|
+
export declare function sortableTreeKeyboardCoordinates(context: SensorContext, indentationWidth: number): KeyboardCoordinateGetter;
|
|
4
4
|
//# sourceMappingURL=keyboardCoordinates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboardCoordinates.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,wBAAwB,EAE9B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAY7C,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,aAAa,EACtB,
|
|
1
|
+
{"version":3,"file":"keyboardCoordinates.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,wBAAwB,EAE9B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAY7C,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,aAAa,EACtB,gBAAgB,EAAE,MAAM,GACvB,wBAAwB,CAkJ1B"}
|
|
@@ -8,7 +8,7 @@ import { closestCorners, getFirstCollision, KeyboardCode } from '@dnd-kit/core';
|
|
|
8
8
|
import { getProjection } from "./utilities.js";
|
|
9
9
|
var DIRECTIONS = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
|
|
10
10
|
var HORIZONTAL = [KeyboardCode.Left, KeyboardCode.Right];
|
|
11
|
-
export function sortableTreeKeyboardCoordinates(context,
|
|
11
|
+
export function sortableTreeKeyboardCoordinates(context, indentationWidth) {
|
|
12
12
|
return (event, _ref) => {
|
|
13
13
|
var {
|
|
14
14
|
currentCoordinates,
|
|
@@ -31,12 +31,13 @@ export function sortableTreeKeyboardCoordinates(context, indicator, indentationW
|
|
|
31
31
|
offset
|
|
32
32
|
}
|
|
33
33
|
} = context;
|
|
34
|
-
|
|
34
|
+
var projection = (over === null || over === void 0 ? void 0 : over.id) != null ? getProjection(items, active.id, over.id, offset, indentationWidth) : null;
|
|
35
|
+
if (HORIZONTAL.includes(event.code) && (over === null || over === void 0 ? void 0 : over.id) != null && projection != null) {
|
|
35
36
|
var {
|
|
36
37
|
depth,
|
|
37
38
|
maxDepth,
|
|
38
39
|
minDepth
|
|
39
|
-
} =
|
|
40
|
+
} = projection;
|
|
40
41
|
switch (event.code) {
|
|
41
42
|
case KeyboardCode.Left:
|
|
42
43
|
if (depth > minDepth) {
|
|
@@ -107,16 +108,16 @@ export function sortableTreeKeyboardCoordinates(context, indicator, indentationW
|
|
|
107
108
|
return id === active.id;
|
|
108
109
|
});
|
|
109
110
|
var activeItem = items[activeIndex];
|
|
110
|
-
|
|
111
|
+
var closestProjection = getProjection(items, active.id, closestId, (newItem.depth - activeItem.depth) * indentationWidth, indentationWidth);
|
|
112
|
+
if (newItem != null && activeItem != null && closestProjection != null) {
|
|
111
113
|
var {
|
|
112
114
|
depth: _depth
|
|
113
|
-
} =
|
|
115
|
+
} = closestProjection;
|
|
114
116
|
var isBelow = newIndex > activeIndex;
|
|
115
117
|
var modifier = isBelow ? 1 : -1;
|
|
116
|
-
var nextOffset = indicator ? (collisionRect.height - activeRect.height) / 2 : 0;
|
|
117
118
|
var newCoordinates = {
|
|
118
119
|
x: newRect.left + _depth * indentationWidth,
|
|
119
|
-
y: newRect.top + modifier
|
|
120
|
+
y: newRect.top + modifier
|
|
120
121
|
};
|
|
121
122
|
return newCoordinates;
|
|
122
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboardCoordinates.js","names":["closestCorners","getFirstCollision","KeyboardCode","getProjection","DIRECTIONS","Down","Right","Up","Left","HORIZONTAL","sortableTreeKeyboardCoordinates","context","
|
|
1
|
+
{"version":3,"file":"keyboardCoordinates.js","names":["closestCorners","getFirstCollision","KeyboardCode","getProjection","DIRECTIONS","Down","Right","Up","Left","HORIZONTAL","sortableTreeKeyboardCoordinates","context","indentationWidth","event","_ref","currentCoordinates","active","over","collisionRect","droppableRects","droppableContainers","includes","code","preventDefault","current","items","offset","projection","id","depth","maxDepth","minDepth","_objectSpread","x","undefined","containers","forEach","container","disabled","rect","get","top","push","collisions","pointerCoordinates","closestId","length","activeRect","newRect","newDroppable","newIndex","findIndex","_ref2","newItem","activeIndex","_ref3","activeItem","closestProjection","isBelow","modifier","newCoordinates","left","y"],"sources":["../../../../src/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\nimport {\n closestCorners,\n getFirstCollision,\n KeyboardCode,\n type KeyboardCoordinateGetter,\n type DroppableContainer,\n} from '@dnd-kit/core';\nimport type { SensorContext } from './types';\nimport { getProjection } from './utilities';\n\nconst DIRECTIONS: string[] = [\n KeyboardCode.Down,\n KeyboardCode.Right,\n KeyboardCode.Up,\n KeyboardCode.Left,\n];\n\nconst HORIZONTAL: string[] = [KeyboardCode.Left, KeyboardCode.Right];\n\nexport function sortableTreeKeyboardCoordinates(\n context: SensorContext,\n indentationWidth: number\n): KeyboardCoordinateGetter {\n return (\n event,\n {\n currentCoordinates,\n context: {\n active,\n over,\n collisionRect,\n droppableRects,\n droppableContainers,\n },\n }\n ) => {\n if (DIRECTIONS.includes(event.code)) {\n if (!active || !collisionRect) {\n return;\n }\n\n event.preventDefault();\n\n const {\n current: { items, offset },\n } = context;\n\n const projection =\n over?.id != null\n ? getProjection(\n items,\n active.id as string,\n over.id as string,\n offset,\n indentationWidth\n )\n : null;\n\n if (\n HORIZONTAL.includes(event.code) &&\n over?.id != null &&\n projection != null\n ) {\n const { depth, maxDepth, minDepth } = projection;\n\n switch (event.code) {\n case KeyboardCode.Left:\n if (depth > minDepth) {\n return {\n ...currentCoordinates,\n x: currentCoordinates.x - indentationWidth,\n };\n }\n break;\n case KeyboardCode.Right:\n if (depth < maxDepth) {\n return {\n ...currentCoordinates,\n x: currentCoordinates.x + indentationWidth,\n };\n }\n break;\n }\n\n return undefined;\n }\n\n const containers: DroppableContainer[] = [];\n\n droppableContainers.forEach(container => {\n if (container?.disabled || container.id === over?.id) {\n return;\n }\n\n const rect = droppableRects.get(container.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n containers.push(container);\n }\n break;\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n containers.push(container);\n }\n break;\n }\n });\n\n const collisions = closestCorners({\n active,\n collisionRect,\n pointerCoordinates: null,\n droppableRects,\n droppableContainers: containers,\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === over?.id && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null && over?.id != null) {\n const activeRect = droppableRects.get(active.id);\n const newRect = droppableRects.get(closestId);\n const newDroppable = droppableContainers.get(closestId);\n\n if (activeRect && newRect && newDroppable) {\n const newIndex = items.findIndex(({ id }) => id === closestId);\n const newItem = items[newIndex];\n const activeIndex = items.findIndex(({ id }) => id === active.id);\n const activeItem = items[activeIndex];\n\n const closestProjection = getProjection(\n items,\n active.id as string,\n closestId as string,\n (newItem.depth - activeItem.depth) * indentationWidth,\n indentationWidth\n );\n\n if (\n newItem != null &&\n activeItem != null &&\n closestProjection != null\n ) {\n const { depth } = closestProjection;\n const isBelow = newIndex > activeIndex;\n const modifier = isBelow ? 1 : -1;\n\n const newCoordinates = {\n x: newRect.left + depth * indentationWidth,\n y: newRect.top + modifier,\n };\n\n return newCoordinates;\n }\n }\n }\n }\n\n return undefined;\n };\n}\n"],"mappings":";;;;;AAAA;AACA,SACEA,cAAc,EACdC,iBAAiB,EACjBC,YAAY,QAGP,eAAe;AAAC,SAEdC,aAAa;AAEtB,IAAMC,UAAoB,GAAG,CAC3BF,YAAY,CAACG,IAAI,EACjBH,YAAY,CAACI,KAAK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