@activecollab/components 2.0.440 → 2.0.442
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/cjs/components/Dialog/Dialog.js +8 -1
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +16 -4
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/Transitions/Fade/Fade.js +3 -2
- package/dist/cjs/components/Transitions/Fade/Fade.js.map +1 -1
- package/dist/cjs/components/Transitions/SlideFromTop/SlideFromTop.js +7 -5
- package/dist/cjs/components/Transitions/SlideFromTop/SlideFromTop.js.map +1 -1
- package/dist/cjs/presentation/shared/UserDetailsDialog.js +125 -0
- package/dist/cjs/presentation/shared/UserDetailsDialog.js.map +1 -0
- package/dist/cjs/presentation/shared/index.js +15 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/bottomDock.js +10 -3
- package/dist/cjs/presentation/whiteboard/bottomDock.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/canvasElements.js +114 -25
- package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/entityCardActions.js +79 -0
- package/dist/cjs/presentation/whiteboard/entityCardActions.js.map +1 -0
- package/dist/cjs/presentation/whiteboard/inspector.js +20 -5
- package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/outline.js +4 -2
- package/dist/cjs/presentation/whiteboard/outline.js.map +1 -1
- package/dist/cjs/presentation/whiteboard/projectElements.js +188 -53
- package/dist/cjs/presentation/whiteboard/projectElements.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +10 -3
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Modal/Modal.d.ts +5 -0
- package/dist/esm/components/Modal/Modal.d.ts.map +1 -1
- package/dist/esm/components/Modal/Modal.js +16 -4
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/Transitions/Fade/Fade.d.ts +1 -0
- package/dist/esm/components/Transitions/Fade/Fade.d.ts.map +1 -1
- package/dist/esm/components/Transitions/Fade/Fade.js +2 -1
- package/dist/esm/components/Transitions/Fade/Fade.js.map +1 -1
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.d.ts +2 -0
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.d.ts.map +1 -1
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.js +6 -4
- package/dist/esm/components/Transitions/SlideFromTop/SlideFromTop.js.map +1 -1
- package/dist/esm/presentation/shared/UserDetailsDialog.d.ts +45 -0
- package/dist/esm/presentation/shared/UserDetailsDialog.d.ts.map +1 -0
- package/dist/esm/presentation/shared/UserDetailsDialog.js +115 -0
- package/dist/esm/presentation/shared/UserDetailsDialog.js.map +1 -0
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts +3 -2
- package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/bottomDock.js +9 -4
- package/dist/esm/presentation/whiteboard/bottomDock.js.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/canvasElements.js +94 -25
- package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -1
- package/dist/esm/presentation/whiteboard/entityCardActions.d.ts +37 -0
- package/dist/esm/presentation/whiteboard/entityCardActions.d.ts.map +1 -0
- package/dist/esm/presentation/whiteboard/entityCardActions.js +69 -0
- package/dist/esm/presentation/whiteboard/entityCardActions.js.map +1 -0
- package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/inspector.js +29 -7
- package/dist/esm/presentation/whiteboard/inspector.js.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.d.ts +1 -1
- package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/outline.js +5 -3
- package/dist/esm/presentation/whiteboard/outline.js.map +1 -1
- package/dist/esm/presentation/whiteboard/projectElements.d.ts +40 -8
- package/dist/esm/presentation/whiteboard/projectElements.d.ts.map +1 -1
- package/dist/esm/presentation/whiteboard/projectElements.js +181 -55
- package/dist/esm/presentation/whiteboard/projectElements.js.map +1 -1
- package/dist/index.js +34 -10
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -62,9 +62,10 @@ var TOOL_HINTS = exports.TOOL_HINTS = {
|
|
|
62
62
|
roundedRectangle: "Click to drop a default rectangle, or draw one to size. Press R for a rectangle.",
|
|
63
63
|
triangle: "Click to drop a default triangle, or draw one to size. Press Y for a triangle.",
|
|
64
64
|
connector: "Drag from one element to another to connect them. Press C to connect.",
|
|
65
|
-
projectElements: "Put a task or a
|
|
65
|
+
projectElements: "Put a task, a project or a person on the board — pick which above, then draw it.",
|
|
66
66
|
project: "Draw a box to place a project card, then pick the project it shows.",
|
|
67
67
|
task: "Draw a box to place a task card, then pick the task it shows.",
|
|
68
|
+
person: "Draw a circle to place a person, then pick who it shows.",
|
|
68
69
|
link: "Draw a box to place a link, or paste a URL anywhere. Press L for link.",
|
|
69
70
|
file: "Draw a box to place a file, or drop one on the board. Press F for file.",
|
|
70
71
|
sticky: "Click anywhere on the canvas to drop a sticky note. Press S for a sticky note.",
|
|
@@ -172,7 +173,7 @@ var BottomDock = exports.BottomDock = function BottomDock(_ref2) {
|
|
|
172
173
|
the pill for free — another dock tool, Esc on the canvas, or the gesture
|
|
173
174
|
finishing and disarming the tool. Two states could disagree; one cannot. */
|
|
174
175
|
var shapesOpen = isShapeTool(activeTool);
|
|
175
|
-
var projectElementsOpen = activeTool === "task" || activeTool === "project";
|
|
176
|
+
var projectElementsOpen = activeTool === "task" || activeTool === "project" || activeTool === "person";
|
|
176
177
|
return /*#__PURE__*/_react.default.createElement(StyledBottomDock, null, shapesOpen ? /*#__PURE__*/_react.default.createElement(StyledToolPill, null, /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
177
178
|
tip: "Circle",
|
|
178
179
|
active: activeTool === "circle",
|
|
@@ -203,7 +204,13 @@ var BottomDock = exports.BottomDock = function BottomDock(_ref2) {
|
|
|
203
204
|
onClick: function onClick() {
|
|
204
205
|
return onToolChange("project");
|
|
205
206
|
}
|
|
206
|
-
}, hoverProps("project")), /*#__PURE__*/_react.default.createElement(_Icons.ProjectIcon, null))
|
|
207
|
+
}, hoverProps("project")), /*#__PURE__*/_react.default.createElement(_Icons.ProjectIcon, null)), /*#__PURE__*/_react.default.createElement(ToolButton, _extends({
|
|
208
|
+
tip: "User",
|
|
209
|
+
active: activeTool === "person",
|
|
210
|
+
onClick: function onClick() {
|
|
211
|
+
return onToolChange("person");
|
|
212
|
+
}
|
|
213
|
+
}, hoverProps("person")), /*#__PURE__*/_react.default.createElement(_Icons.PersonIcon, null))) : null, /*#__PURE__*/_react.default.createElement(ToolSurface, null, /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
207
214
|
title: "Sticky Note"
|
|
208
215
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, _extends({
|
|
209
216
|
variant: "text gray",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottomDock.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_IconButton","_Icons","_Tooltip","_Typography","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","Symbol","iterator","u","next","done","push","value","return","isArray","ToolSurface","exports","styled","div","withConfig","displayName","componentId","verticalDivider","StyledBottomDock","StyledToolPill","StyledHint","Caption1","TOOL_HINTS","circle","roundedRectangle","triangle","connector","projectElements","project","task","link","file","sticky","text","draw","shapes","SHAPE_TOOLS","isShapeTool","tool","includes","DEFAULT_SHAPE_TOOL","DEFAULT_PROJECT_ELEMENT_TOOL","SHAPE_DEFAULT_SIZES","width","height","CARD_PREVIEW_HEIGHT","ToolButton","_ref","tip","active","children","onClick","onMouseEnter","onMouseLeave","createElement","Tooltip","title","IconButton","variant","BottomDock","_ref2","activeTool","onToolChange","_useState","useState","_useState2","hoverHint","setHoverHint","hoverProps","hint","shapesOpen","projectElementsOpen","CircleIcon","RoundedRectangleIcon","TriangleIcon","TaskIcon","ProjectIcon","NoteIcon","TextIcon","DrawIcon","ShapesIcon","ConnectionIcon","ProjectStarIcon","InsertLinkIcon","AttachmentIcon","color","className","undefined"],"sources":["../../../../src/presentation/whiteboard/bottomDock.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n AttachmentIcon,\n CircleIcon,\n ConnectionIcon,\n DrawIcon,\n InsertLinkIcon,\n ProjectIcon,\n ProjectStarIcon,\n RoundedRectangleIcon,\n ShapesIcon,\n NoteIcon,\n TaskIcon,\n TextIcon,\n TriangleIcon,\n} from \"../../components/Icons\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Caption1 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* Floating toolbar surfaces */\n/* ------------------------------------------------------------------ */\n\n/* A floating, rounded toolbar surface (paper + shadow). */\nexport const ToolSurface = styled.div`\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 6px;\n border-radius: 14px;\n background-color: var(--page-paper-main);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);\n border: 1px solid var(--border-primary);\n\n /* A DS button colours its icon by declaring svg { fill: currentColor }, so\n every FILLED glyph follows the button's active and hover states for free.\n Three glyphs here are not filled: RoundedRectangleIcon and TriangleIcon are\n outlines with a stroke of var(--color-theme-600) baked into the path, and\n ProjectIcon draws its ruler as a stroked rect. Nothing about the button\n could ever reach them — an armed rectangle stayed exactly as grey as an\n unarmed one. This extends the same currentColor contract to a declared\n stroke.\n\n Scoped to direct children and to shapes inside a <g>, NOT to every\n descendant: ProjectIcon cuts its ruler with a <mask> whose <line> is\n stroked BLACK on purpose. In a mask only luminance matters, so recolouring\n that line would turn a clean diagonal cut into a half-transparent smear. */\n svg > [stroke],\n svg > g [stroke] {\n stroke: currentColor;\n }\n`;\n\n/* vertical separator used inside the toolbars */\nexport const verticalDivider = `\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--color-theme-400);\n margin: 0 6px;\n flex-shrink: 0;\n }\n`;\n\nexport const StyledBottomDock = styled.div`\n position: absolute;\n left: 50%;\n bottom: 18px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n max-width: calc(100% - 32px);\n`;\n\n/**\n * The floating second toolbar row — a small pill above the dock that holds the\n * members of one tool family (Circle / Rectangle / Triangle, or Task / Project).\n *\n * It is the same surface as the dock itself, so a family reads as an extension\n * of the button that opened it rather than as a different kind of UI. Only one\n * pill is ever up, because only one tool is ever armed.\n */\nexport const StyledToolPill = styled(ToolSurface)``;\n\n/* Reserve two Caption1 lines (2 × 16px) so showing/hiding the hint never\n shifts the dock; visibility keeps the reserved space when hidden. */\nexport const StyledHint = styled(Caption1)`\n text-align: center;\n padding: 0 16px;\n min-height: 32px;\n\n &.hint-hidden {\n visibility: hidden;\n }\n`;\n\n/* Per-tool hint shown under the dock only while that tool is hovered. */\nexport const TOOL_HINTS = {\n circle:\n \"Click to drop a default circle, or draw one to size. Press O for a circle.\",\n roundedRectangle:\n \"Click to drop a default rectangle, or draw one to size. Press R for a rectangle.\",\n triangle:\n \"Click to drop a default triangle, or draw one to size. Press Y for a triangle.\",\n connector:\n \"Drag from one element to another to connect them. Press C to connect.\",\n projectElements:\n \"Put a task or a project on the board — pick which above, then draw its card.\",\n project:\n \"Draw a box to place a project card, then pick the project it shows.\",\n task: \"Draw a box to place a task card, then pick the task it shows.\",\n link: \"Draw a box to place a link, or paste a URL anywhere. Press L for link.\",\n file: \"Draw a box to place a file, or drop one on the board. Press F for file.\",\n sticky:\n \"Click anywhere on the canvas to drop a sticky note. Press S for a sticky note.\",\n text: \"Click anywhere on the canvas to start typing. Press T for text.\",\n draw: \"Click and drag to draw freehand. Press D for the pen.\",\n shapes:\n \"Pick a shape above, then draw it on the board. Press R for a rectangle.\",\n} as const;\n\nexport type ToolHintKey = keyof typeof TOOL_HINTS;\n\nexport type ShapeTool = \"circle\" | \"roundedRectangle\" | \"triangle\";\n\n/**\n * The armed board tool. Link, File, Project, Task and the three shapes are\n * wired — arming one turns the next canvas click into \"drop the default-size\n * element here\" and a drag into \"draw one this big\"; everything else stays a\n * mock, so the board is otherwise always in select mode.\n */\nexport type BoardTool =\n | \"select\"\n | \"link\"\n | \"file\"\n | \"project\"\n | \"task\"\n | ShapeTool;\n\nexport const SHAPE_TOOLS: readonly ShapeTool[] = [\n \"circle\",\n \"roundedRectangle\",\n \"triangle\",\n];\n\nexport const isShapeTool = (tool: BoardTool): tool is ShapeTool =>\n (SHAPE_TOOLS as readonly string[]).includes(tool);\n\n/**\n * What a dock button arms the instant its pill opens.\n *\n * Opening a family and choosing inside it are two separate decisions, and the\n * second one has a right answer often enough that asking for it every time is\n * just a toll: a shape is usually a rectangle, and the thing people put on a\n * board is usually a task. So the pill opens with that member already armed and\n * the gesture can start immediately — picking another member is a correction,\n * not a required step.\n */\nexport const DEFAULT_SHAPE_TOOL: ShapeTool = \"roundedRectangle\";\nexport const DEFAULT_PROJECT_ELEMENT_TOOL: BoardTool = \"task\";\n\n/* What a plain click drops — mirrors DEFAULT_SHAPE_SIZES in\n new-activecollab-front, and is exactly what the hover preview promises. */\nexport const SHAPE_DEFAULT_SIZES: Record<\n ShapeTool,\n { width: number; height: number }\n> = {\n roundedRectangle: { width: 100, height: 60 },\n circle: { width: 80, height: 80 },\n triangle: { width: 80, height: 80 },\n};\n\n/* Cards are auto-height, so their hover preview uses the app's nominal wire\n height (DEFAULT_LINK_CARD_SIZE / DEFAULT_FILE_CARD_SIZE). */\nexport const CARD_PREVIEW_HEIGHT = 240;\n\n/** The kinds of card the draw gesture can place. */\nexport type DrawableTool = Exclude<BoardTool, \"select\">;\n\nexport interface ToolButtonProps {\n tip: string;\n active?: boolean;\n children: ReactNode;\n onClick?: () => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n}\n\nexport const ToolButton = ({\n tip,\n active,\n children,\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: ToolButtonProps): ReactElement => (\n <Tooltip title={tip}>\n <IconButton\n variant=\"text gray\"\n active={active}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {children}\n </IconButton>\n </Tooltip>\n);\n\nexport interface BottomDockProps {\n activeTool: BoardTool;\n onToolChange: (tool: BoardTool) => void;\n}\n\n/* Bottom-centre tool dock: the family pill (when one is open), the main\n toolbar, and the shared hint line. The dock is anchored by its BOTTOM edge,\n so a pill appearing or disappearing grows the stack upwards and never moves\n the toolbar itself. */\nexport const BottomDock = ({\n activeTool,\n onToolChange,\n}: BottomDockProps): ReactElement => {\n const [hoverHint, setHoverHint] = useState<string | null>(null);\n\n const hoverProps = (tool: ToolHintKey): Record<string, () => void> => ({\n onMouseEnter: () => setHoverHint(TOOL_HINTS[tool]),\n onMouseLeave: () => setHoverHint(null),\n });\n\n /* An armed tool keeps its hint up after the pointer leaves the dock — the\n gesture happens on the canvas, so that is exactly when the instruction is\n needed. */\n const hint =\n hoverHint ?? (activeTool === \"select\" ? null : TOOL_HINTS[activeTool]);\n\n /* Which pill is up. Both are DERIVED from the armed tool rather than kept as\n their own open/closed state: opening a pill always arms one of its members,\n so \"a member of this family is armed\" and \"this pill is showing\" are the\n same fact. Deriving it is what makes every way of leaving the family close\n the pill for free — another dock tool, Esc on the canvas, or the gesture\n finishing and disarming the tool. Two states could disagree; one cannot. */\n const shapesOpen = isShapeTool(activeTool);\n const projectElementsOpen = activeTool === \"task\" || activeTool === \"project\";\n\n return (\n <StyledBottomDock>\n {/* Shapes pill — hidden until the Shape dock button opens it. Inside a\n pill a click is a plain choice, never a toggle off: the dock button is\n what closes the family, so clicking the armed shape again must not\n make the row that is being used disappear. */}\n {shapesOpen ? (\n <StyledToolPill>\n <ToolButton\n tip=\"Circle\"\n active={activeTool === \"circle\"}\n onClick={() => onToolChange(\"circle\")}\n {...hoverProps(\"circle\")}\n >\n <CircleIcon />\n </ToolButton>\n <ToolButton\n tip=\"Rectangle\"\n active={activeTool === \"roundedRectangle\"}\n onClick={() => onToolChange(\"roundedRectangle\")}\n {...hoverProps(\"roundedRectangle\")}\n >\n <RoundedRectangleIcon />\n </ToolButton>\n <ToolButton\n tip=\"Triangle\"\n active={activeTool === \"triangle\"}\n onClick={() => onToolChange(\"triangle\")}\n {...hoverProps(\"triangle\")}\n >\n <TriangleIcon />\n </ToolButton>\n </StyledToolPill>\n ) : null}\n\n {/* Project Elements pill — the same surface, the same button size and\n spacing, in the same slot above the dock. Task comes first because it\n is what the button arms by default. */}\n {projectElementsOpen ? (\n <StyledToolPill>\n <ToolButton\n tip=\"Task\"\n active={activeTool === \"task\"}\n onClick={() => onToolChange(\"task\")}\n {...hoverProps(\"task\")}\n >\n <TaskIcon />\n </ToolButton>\n <ToolButton\n tip=\"Project\"\n active={activeTool === \"project\"}\n onClick={() => onToolChange(\"project\")}\n {...hoverProps(\"project\")}\n >\n <ProjectIcon />\n </ToolButton>\n </StyledToolPill>\n ) : null}\n\n <ToolSurface>\n {/* The tools that are still mocks arm nothing — but they do DISARM, so\n reaching for one closes whatever pill is up and ends the gesture the\n board was waiting for. A dead button that also leaves the previous\n tool armed would be the confusing half of \"not implemented yet\". */}\n <Tooltip title=\"Sticky Note\">\n <IconButton\n variant=\"text gray\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"sticky\")}\n >\n <NoteIcon />\n </IconButton>\n </Tooltip>\n <ToolButton\n tip=\"Text\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"text\")}\n >\n <TextIcon />\n </ToolButton>\n <ToolButton\n tip=\"Draw\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"draw\")}\n >\n <DrawIcon />\n </ToolButton>\n {/* Opening the family and arming its default member are one click: the\n pill appears with Rectangle already armed, so the next thing the\n pointer does can be the drawing itself. */}\n <ToolButton\n tip=\"Shape\"\n active={shapesOpen}\n onClick={() =>\n onToolChange(shapesOpen ? \"select\" : DEFAULT_SHAPE_TOOL)\n }\n {...hoverProps(\"shapes\")}\n >\n <ShapesIcon />\n </ToolButton>\n <ToolButton\n tip=\"Connect\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"connector\")}\n >\n <ConnectionIcon />\n </ToolButton>\n <ToolButton\n tip=\"Project Elements\"\n active={projectElementsOpen}\n onClick={() =>\n onToolChange(\n projectElementsOpen ? \"select\" : DEFAULT_PROJECT_ELEMENT_TOOL\n )\n }\n {...hoverProps(\"projectElements\")}\n >\n <ProjectStarIcon />\n </ToolButton>\n <ToolButton\n tip=\"Link\"\n active={activeTool === \"link\"}\n onClick={() =>\n onToolChange(activeTool === \"link\" ? \"select\" : \"link\")\n }\n {...hoverProps(\"link\")}\n >\n <InsertLinkIcon />\n </ToolButton>\n <ToolButton\n tip=\"File\"\n active={activeTool === \"file\"}\n onClick={() =>\n onToolChange(activeTool === \"file\" ? \"select\" : \"file\")\n }\n {...hoverProps(\"file\")}\n >\n <AttachmentIcon />\n </ToolButton>\n </ToolSurface>\n\n <StyledHint color=\"tertiary\" className={hint ? undefined : \"hint-hidden\"}>\n {hint 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B,UAAU,CAAC,iBAAiB,CAAC,gBAEjCtH,MAAA,CAAAW,OAAA,CAAA6F,aAAA,CAAClG,MAAA,CAAA8H,eAAe,MAAE,CACR,CAAC,eACbpI,MAAA,CAAAW,OAAA,CAAA6F,aAAA,CAACR,UAAU,EAAAnE,QAAA;IACTqE,GAAG,EAAC,MAAM;IACVC,MAAM,EAAEY,UAAU,KAAK,MAAO;IAC9BV,OAAO,EAAE,SAATA,OAAOA,CAAA;MAAA,OACLW,YAAY,CAACD,UAAU,KAAK,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAA;EACxD,GACGO,UAAU,CAAC,MAAM,CAAC,gBAEtBtH,MAAA,CAAAW,OAAA,CAAA6F,aAAA,CAAClG,MAAA,CAAA+H,cAAc,MAAE,CACP,CAAC,eACbrI,MAAA,CAAAW,OAAA,CAAA6F,aAAA,CAACR,UAAU,EAAAnE,QAAA;IACTqE,GAAG,EAAC,MAAM;IACVC,MAAM,EAAEY,UAAU,KAAK,MAAO;IAC9BV,OAAO,EAAE,SAATA,OAAOA,CAAA;MAAA,OACLW,YAAY,CAACD,UAAU,KAAK,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAA;EACxD,GACGO,UAAU,CAAC,MAAM,CAAC,gBAEtBtH,MAAA,CAAAW,OAAA,CAAA6F,aAAA,CAAClG,MAAA,CAAAgI,cAAc,MAAE,CACP,CACD,CAAC,eAEdtI,MAAA,CAAAW,OAAA,CAAA6F,aAAA,CAAClC,UAAU;IAACiE,KAAK,EAAC,UAAU;IAACC,SAAS,EAAEjB,IAAI,GAAGkB,SAAS,GAAG;EAAc,GACtElB,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAI,GACC,CACI,CAAC;AAEvB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"bottomDock.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_IconButton","_Icons","_Tooltip","_Typography","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","Symbol","iterator","u","next","done","push","value","return","isArray","ToolSurface","exports","styled","div","withConfig","displayName","componentId","verticalDivider","StyledBottomDock","StyledToolPill","StyledHint","Caption1","TOOL_HINTS","circle","roundedRectangle","triangle","connector","projectElements","project","task","person","link","file","sticky","text","draw","shapes","SHAPE_TOOLS","isShapeTool","tool","includes","DEFAULT_SHAPE_TOOL","DEFAULT_PROJECT_ELEMENT_TOOL","SHAPE_DEFAULT_SIZES","width","height","CARD_PREVIEW_HEIGHT","ToolButton","_ref","tip","active","children","onClick","onMouseEnter","onMouseLeave","createElement","Tooltip","title","IconButton","variant","BottomDock","_ref2","activeTool","onToolChange","_useState","useState","_useState2","hoverHint","setHoverHint","hoverProps","hint","shapesOpen","projectElementsOpen","CircleIcon","RoundedRectangleIcon","TriangleIcon","TaskIcon","ProjectIcon","PersonIcon","NoteIcon","TextIcon","DrawIcon","ShapesIcon","ConnectionIcon","ProjectStarIcon","InsertLinkIcon","AttachmentIcon","color","className","undefined"],"sources":["../../../../src/presentation/whiteboard/bottomDock.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n AttachmentIcon,\n CircleIcon,\n ConnectionIcon,\n DrawIcon,\n InsertLinkIcon,\n PersonIcon,\n ProjectIcon,\n ProjectStarIcon,\n RoundedRectangleIcon,\n ShapesIcon,\n NoteIcon,\n TaskIcon,\n TextIcon,\n TriangleIcon,\n} from \"../../components/Icons\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { Caption1 } from \"../../components/Typography\";\n\n/* ------------------------------------------------------------------ */\n/* Floating toolbar surfaces */\n/* ------------------------------------------------------------------ */\n\n/* A floating, rounded toolbar surface (paper + shadow). */\nexport const ToolSurface = styled.div`\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 6px;\n border-radius: 14px;\n background-color: var(--page-paper-main);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);\n border: 1px solid var(--border-primary);\n\n /* A DS button colours its icon by declaring svg { fill: currentColor }, so\n every FILLED glyph follows the button's active and hover states for free.\n Three glyphs here are not filled: RoundedRectangleIcon and TriangleIcon are\n outlines with a stroke of var(--color-theme-600) baked into the path, and\n ProjectIcon draws its ruler as a stroked rect. Nothing about the button\n could ever reach them — an armed rectangle stayed exactly as grey as an\n unarmed one. This extends the same currentColor contract to a declared\n stroke.\n\n Scoped to direct children and to shapes inside a <g>, NOT to every\n descendant: ProjectIcon cuts its ruler with a <mask> whose <line> is\n stroked BLACK on purpose. In a mask only luminance matters, so recolouring\n that line would turn a clean diagonal cut into a half-transparent smear. */\n svg > [stroke],\n svg > g [stroke] {\n stroke: currentColor;\n }\n`;\n\n/* vertical separator used inside the toolbars */\nexport const verticalDivider = `\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--color-theme-400);\n margin: 0 6px;\n flex-shrink: 0;\n }\n`;\n\nexport const StyledBottomDock = styled.div`\n position: absolute;\n left: 50%;\n bottom: 18px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 10px;\n max-width: calc(100% - 32px);\n`;\n\n/**\n * The floating second toolbar row — a small pill above the dock that holds the\n * members of one tool family (Circle / Rectangle / Triangle, or Task / Project).\n *\n * It is the same surface as the dock itself, so a family reads as an extension\n * of the button that opened it rather than as a different kind of UI. Only one\n * pill is ever up, because only one tool is ever armed.\n */\nexport const StyledToolPill = styled(ToolSurface)``;\n\n/* Reserve two Caption1 lines (2 × 16px) so showing/hiding the hint never\n shifts the dock; visibility keeps the reserved space when hidden. */\nexport const StyledHint = styled(Caption1)`\n text-align: center;\n padding: 0 16px;\n min-height: 32px;\n\n &.hint-hidden {\n visibility: hidden;\n }\n`;\n\n/* Per-tool hint shown under the dock only while that tool is hovered. */\nexport const TOOL_HINTS = {\n circle:\n \"Click to drop a default circle, or draw one to size. Press O for a circle.\",\n roundedRectangle:\n \"Click to drop a default rectangle, or draw one to size. Press R for a rectangle.\",\n triangle:\n \"Click to drop a default triangle, or draw one to size. Press Y for a triangle.\",\n connector:\n \"Drag from one element to another to connect them. Press C to connect.\",\n projectElements:\n \"Put a task, a project or a person on the board — pick which above, then draw it.\",\n project:\n \"Draw a box to place a project card, then pick the project it shows.\",\n task: \"Draw a box to place a task card, then pick the task it shows.\",\n person: \"Draw a circle to place a person, then pick who it shows.\",\n link: \"Draw a box to place a link, or paste a URL anywhere. Press L for link.\",\n file: \"Draw a box to place a file, or drop one on the board. Press F for file.\",\n sticky:\n \"Click anywhere on the canvas to drop a sticky note. Press S for a sticky note.\",\n text: \"Click anywhere on the canvas to start typing. Press T for text.\",\n draw: \"Click and drag to draw freehand. Press D for the pen.\",\n shapes:\n \"Pick a shape above, then draw it on the board. Press R for a rectangle.\",\n} as const;\n\nexport type ToolHintKey = keyof typeof TOOL_HINTS;\n\nexport type ShapeTool = \"circle\" | \"roundedRectangle\" | \"triangle\";\n\n/**\n * The armed board tool. Link, File, Project, Task and the three shapes are\n * wired — arming one turns the next canvas click into \"drop the default-size\n * element here\" and a drag into \"draw one this big\"; everything else stays a\n * mock, so the board is otherwise always in select mode.\n */\nexport type BoardTool =\n | \"select\"\n | \"link\"\n | \"file\"\n | \"project\"\n | \"task\"\n | \"person\"\n | ShapeTool;\n\nexport const SHAPE_TOOLS: readonly ShapeTool[] = [\n \"circle\",\n \"roundedRectangle\",\n \"triangle\",\n];\n\nexport const isShapeTool = (tool: BoardTool): tool is ShapeTool =>\n (SHAPE_TOOLS as readonly string[]).includes(tool);\n\n/**\n * What a dock button arms the instant its pill opens.\n *\n * Opening a family and choosing inside it are two separate decisions, and the\n * second one has a right answer often enough that asking for it every time is\n * just a toll: a shape is usually a rectangle, and the thing people put on a\n * board is usually a task. So the pill opens with that member already armed and\n * the gesture can start immediately — picking another member is a correction,\n * not a required step.\n */\nexport const DEFAULT_SHAPE_TOOL: ShapeTool = \"roundedRectangle\";\nexport const DEFAULT_PROJECT_ELEMENT_TOOL: BoardTool = \"task\";\n\n/* What a plain click drops — mirrors DEFAULT_SHAPE_SIZES in\n new-activecollab-front, and is exactly what the hover preview promises. */\nexport const SHAPE_DEFAULT_SIZES: Record<\n ShapeTool,\n { width: number; height: number }\n> = {\n roundedRectangle: { width: 100, height: 60 },\n circle: { width: 80, height: 80 },\n triangle: { width: 80, height: 80 },\n};\n\n/* Cards are auto-height, so their hover preview uses the app's nominal wire\n height (DEFAULT_LINK_CARD_SIZE / DEFAULT_FILE_CARD_SIZE). */\nexport const CARD_PREVIEW_HEIGHT = 240;\n\n/** The kinds of card the draw gesture can place. */\nexport type DrawableTool = Exclude<BoardTool, \"select\">;\n\nexport interface ToolButtonProps {\n tip: string;\n active?: boolean;\n children: ReactNode;\n onClick?: () => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n}\n\nexport const ToolButton = ({\n tip,\n active,\n children,\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: ToolButtonProps): ReactElement => (\n <Tooltip title={tip}>\n <IconButton\n variant=\"text gray\"\n active={active}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {children}\n </IconButton>\n </Tooltip>\n);\n\nexport interface BottomDockProps {\n activeTool: BoardTool;\n onToolChange: (tool: BoardTool) => void;\n}\n\n/* Bottom-centre tool dock: the family pill (when one is open), the main\n toolbar, and the shared hint line. The dock is anchored by its BOTTOM edge,\n so a pill appearing or disappearing grows the stack upwards and never moves\n the toolbar itself. */\nexport const BottomDock = ({\n activeTool,\n onToolChange,\n}: BottomDockProps): ReactElement => {\n const [hoverHint, setHoverHint] = useState<string | null>(null);\n\n const hoverProps = (tool: ToolHintKey): Record<string, () => void> => ({\n onMouseEnter: () => setHoverHint(TOOL_HINTS[tool]),\n onMouseLeave: () => setHoverHint(null),\n });\n\n /* An armed tool keeps its hint up after the pointer leaves the dock — the\n gesture happens on the canvas, so that is exactly when the instruction is\n needed. */\n const hint =\n hoverHint ?? (activeTool === \"select\" ? null : TOOL_HINTS[activeTool]);\n\n /* Which pill is up. Both are DERIVED from the armed tool rather than kept as\n their own open/closed state: opening a pill always arms one of its members,\n so \"a member of this family is armed\" and \"this pill is showing\" are the\n same fact. Deriving it is what makes every way of leaving the family close\n the pill for free — another dock tool, Esc on the canvas, or the gesture\n finishing and disarming the tool. Two states could disagree; one cannot. */\n const shapesOpen = isShapeTool(activeTool);\n const projectElementsOpen =\n activeTool === \"task\" ||\n activeTool === \"project\" ||\n activeTool === \"person\";\n\n return (\n <StyledBottomDock>\n {/* Shapes pill — hidden until the Shape dock button opens it. Inside a\n pill a click is a plain choice, never a toggle off: the dock button is\n what closes the family, so clicking the armed shape again must not\n make the row that is being used disappear. */}\n {shapesOpen ? (\n <StyledToolPill>\n <ToolButton\n tip=\"Circle\"\n active={activeTool === \"circle\"}\n onClick={() => onToolChange(\"circle\")}\n {...hoverProps(\"circle\")}\n >\n <CircleIcon />\n </ToolButton>\n <ToolButton\n tip=\"Rectangle\"\n active={activeTool === \"roundedRectangle\"}\n onClick={() => onToolChange(\"roundedRectangle\")}\n {...hoverProps(\"roundedRectangle\")}\n >\n <RoundedRectangleIcon />\n </ToolButton>\n <ToolButton\n tip=\"Triangle\"\n active={activeTool === \"triangle\"}\n onClick={() => onToolChange(\"triangle\")}\n {...hoverProps(\"triangle\")}\n >\n <TriangleIcon />\n </ToolButton>\n </StyledToolPill>\n ) : null}\n\n {/* Project Elements pill — the same surface, the same button size and\n spacing, in the same slot above the dock. Task comes first because it\n is what the button arms by default; User is third, beside Task and\n Project, and arms the same draw gesture with a person placeholder. */}\n {projectElementsOpen ? (\n <StyledToolPill>\n <ToolButton\n tip=\"Task\"\n active={activeTool === \"task\"}\n onClick={() => onToolChange(\"task\")}\n {...hoverProps(\"task\")}\n >\n <TaskIcon />\n </ToolButton>\n <ToolButton\n tip=\"Project\"\n active={activeTool === \"project\"}\n onClick={() => onToolChange(\"project\")}\n {...hoverProps(\"project\")}\n >\n <ProjectIcon />\n </ToolButton>\n <ToolButton\n tip=\"User\"\n active={activeTool === \"person\"}\n onClick={() => onToolChange(\"person\")}\n {...hoverProps(\"person\")}\n >\n <PersonIcon />\n </ToolButton>\n </StyledToolPill>\n ) : null}\n\n <ToolSurface>\n {/* The tools that are still mocks arm nothing — but they do DISARM, so\n reaching for one closes whatever pill is up and ends the gesture the\n board was waiting for. A dead button that also leaves the previous\n tool armed would be the confusing half of \"not implemented yet\". */}\n <Tooltip title=\"Sticky Note\">\n <IconButton\n variant=\"text gray\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"sticky\")}\n >\n <NoteIcon />\n </IconButton>\n </Tooltip>\n <ToolButton\n tip=\"Text\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"text\")}\n >\n <TextIcon />\n </ToolButton>\n <ToolButton\n tip=\"Draw\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"draw\")}\n >\n <DrawIcon />\n </ToolButton>\n {/* Opening the family and arming its default member are one click: the\n pill appears with Rectangle already armed, so the next thing the\n pointer does can be the drawing itself. */}\n <ToolButton\n tip=\"Shape\"\n active={shapesOpen}\n onClick={() =>\n onToolChange(shapesOpen ? \"select\" : DEFAULT_SHAPE_TOOL)\n }\n {...hoverProps(\"shapes\")}\n >\n <ShapesIcon />\n </ToolButton>\n <ToolButton\n tip=\"Connect\"\n onClick={() => onToolChange(\"select\")}\n {...hoverProps(\"connector\")}\n >\n <ConnectionIcon />\n </ToolButton>\n <ToolButton\n tip=\"Project Elements\"\n active={projectElementsOpen}\n onClick={() =>\n onToolChange(\n projectElementsOpen ? \"select\" : DEFAULT_PROJECT_ELEMENT_TOOL\n )\n }\n {...hoverProps(\"projectElements\")}\n >\n <ProjectStarIcon />\n </ToolButton>\n <ToolButton\n tip=\"Link\"\n active={activeTool === \"link\"}\n onClick={() =>\n onToolChange(activeTool === \"link\" ? \"select\" : \"link\")\n }\n {...hoverProps(\"link\")}\n >\n <InsertLinkIcon />\n </ToolButton>\n <ToolButton\n tip=\"File\"\n active={activeTool === \"file\"}\n onClick={() =>\n onToolChange(activeTool === \"file\" ? \"select\" : \"file\")\n }\n {...hoverProps(\"file\")}\n >\n <AttachmentIcon />\n </ToolButton>\n </ToolSurface>\n\n <StyledHint color=\"tertiary\" className={hint ? undefined : \"hint-hidden\"}>\n {hint ?? \" \"}\n </StyledHint>\n </StyledBottomDock>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAgBA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAuD,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,wBAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,C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I,MAAA,CAAAW,OAAA,CAAA8F,aAAA,CAACR,UAAU,EAAApE,QAAA;IACTsE,GAAG,EAAC,MAAM;IACVC,MAAM,EAAEY,UAAU,KAAK,MAAO;IAC9BV,OAAO,EAAE,SAATA,OAAOA,CAAA;MAAA,OACLW,YAAY,CAACD,UAAU,KAAK,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAA;EACxD,GACGO,UAAU,CAAC,MAAM,CAAC,gBAEtBvH,MAAA,CAAAW,OAAA,CAAA8F,aAAA,CAACnG,MAAA,CAAAkI,cAAc,MAAE,CACP,CACD,CAAC,eAEdxI,MAAA,CAAAW,OAAA,CAAA8F,aAAA,CAACnC,UAAU;IAACmE,KAAK,EAAC,UAAU;IAACC,SAAS,EAAElB,IAAI,GAAGmB,SAAS,GAAG;EAAc,GACtEnB,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAI,GACC,CACI,CAAC;AAEvB,CAAC","ignoreList":[]}
|
|
@@ -7,10 +7,13 @@ exports.NO_DRAG_SELECTOR = exports.DRAG_THROUGH_SELECTOR = exports.CanvasElement
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _bottomDock = require("./bottomDock");
|
|
9
9
|
var _elements = require("./elements");
|
|
10
|
+
var _entityCardActions = require("./entityCardActions");
|
|
10
11
|
var _fileElement = require("./fileElement");
|
|
11
12
|
var _linkElement = require("./linkElement");
|
|
13
|
+
var _shared = require("../shared");
|
|
12
14
|
var _projectElements = require("./projectElements");
|
|
13
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
17
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
15
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
19
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -53,7 +56,7 @@ var DRAG_THROUGH_SELECTOR = exports.DRAG_THROUGH_SELECTOR = "[data-drag-through]
|
|
|
53
56
|
Link elements are created here too — by drawing a box with the Link tool
|
|
54
57
|
armed, or by pasting a URL onto the canvas. */
|
|
55
58
|
var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
56
|
-
var _projectElements$find;
|
|
59
|
+
var _projectElements$find, _projectElements$find2, _projectElements$find3;
|
|
57
60
|
var gridSize = _ref.gridSize,
|
|
58
61
|
snapToGrid = _ref.snapToGrid,
|
|
59
62
|
activeTool = _ref.activeTool,
|
|
@@ -531,7 +534,8 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
531
534
|
height: size.height,
|
|
532
535
|
status: "placeholder",
|
|
533
536
|
project: null,
|
|
534
|
-
task: null
|
|
537
|
+
task: null,
|
|
538
|
+
person: null
|
|
535
539
|
}];
|
|
536
540
|
});
|
|
537
541
|
setSelectedId(id);
|
|
@@ -541,15 +545,13 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
541
545
|
/* The picker answered. The card keeps the placeholder's top-left and flashes
|
|
542
546
|
a skeleton while the "backend" fills the details in — the same two-phase
|
|
543
547
|
honesty the file card's upload / preparing pair has. */
|
|
544
|
-
var resolveProjectElement = (0, _react.useCallback)(function (id,
|
|
548
|
+
var resolveProjectElement = (0, _react.useCallback)(function (id, fill) {
|
|
545
549
|
setPickerFor(null);
|
|
546
550
|
setProjectElements(function (current) {
|
|
547
551
|
return current.map(function (entry) {
|
|
548
552
|
return entry.id === id ? _objectSpread(_objectSpread({}, entry), {}, {
|
|
549
|
-
status: "resolving"
|
|
550
|
-
|
|
551
|
-
task
|
|
552
|
-
}) : entry;
|
|
553
|
+
status: "resolving"
|
|
554
|
+
}, fill) : entry;
|
|
553
555
|
});
|
|
554
556
|
});
|
|
555
557
|
var timer = window.setTimeout(function () {
|
|
@@ -560,8 +562,10 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
560
562
|
/* The card takes its natural width HERE rather than the
|
|
561
563
|
renderer deriving it, so from this moment on there is a
|
|
562
564
|
single stored width for the canvas, the drag and the
|
|
563
|
-
Inspector's Width field to agree on.
|
|
564
|
-
|
|
565
|
+
Inspector's Width field to agree on. A person keeps the
|
|
566
|
+
square that was drawn: the avatar fills whatever circle
|
|
567
|
+
the gesture made. */
|
|
568
|
+
width: entry.kind === "person" ? entry.width : (0, _projectElements.projectCardWidth)(entry.kind)
|
|
565
569
|
}) : entry;
|
|
566
570
|
});
|
|
567
571
|
});
|
|
@@ -587,6 +591,29 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
587
591
|
return entry.id === pickerFor;
|
|
588
592
|
})) !== null && _projectElements$find !== void 0 ? _projectElements$find : null;
|
|
589
593
|
|
|
594
|
+
/* A selected element's Delete, the same removal the link and file cards' own
|
|
595
|
+
toolbars do: the board element goes, the entity is never touched. */
|
|
596
|
+
var deleteProjectElement = (0, _react.useCallback)(function (id) {
|
|
597
|
+
setProjectElements(function (current) {
|
|
598
|
+
return current.filter(function (entry) {
|
|
599
|
+
return entry.id !== id;
|
|
600
|
+
});
|
|
601
|
+
});
|
|
602
|
+
setSelectedId(function (selected) {
|
|
603
|
+
return selected === id ? null : selected;
|
|
604
|
+
});
|
|
605
|
+
}, [setProjectElements, setSelectedId]);
|
|
606
|
+
|
|
607
|
+
/* Which person's Details dialog is open — keyed off the element id so the
|
|
608
|
+
element stays the single source of the person it shows. */
|
|
609
|
+
var _useState1 = (0, _react.useState)(null),
|
|
610
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
611
|
+
detailsId = _useState10[0],
|
|
612
|
+
setDetailsId = _useState10[1];
|
|
613
|
+
var detailsPerson = (_projectElements$find2 = (_projectElements$find3 = projectElements.find(function (entry) {
|
|
614
|
+
return entry.id === detailsId;
|
|
615
|
+
})) === null || _projectElements$find3 === void 0 ? void 0 : _projectElements$find3.person) !== null && _projectElements$find2 !== void 0 ? _projectElements$find2 : null;
|
|
616
|
+
|
|
590
617
|
/* ---- draw-to-place ------------------------------------------------ */
|
|
591
618
|
|
|
592
619
|
var drawRef = (0, _react.useRef)(null);
|
|
@@ -641,6 +668,14 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
641
668
|
width,
|
|
642
669
|
height
|
|
643
670
|
} : _bottomDock.SHAPE_DEFAULT_SIZES[origin.tool]);
|
|
671
|
+
} else if (origin.tool === "person") {
|
|
672
|
+
/* A person is a square: the drawn WIDTH is its side, clamped to the
|
|
673
|
+
person bounds, and a plain click drops the default size. */
|
|
674
|
+
var side = drawn ? (0, _projectElements.clampPersonSize)(width) : _projectElements.PERSON_DEFAULT_SIZE;
|
|
675
|
+
addProjectElement(at, {
|
|
676
|
+
width: side,
|
|
677
|
+
height: side
|
|
678
|
+
}, "person");
|
|
644
679
|
} else if ((0, _projectElements.isProjectTool)(origin.tool)) {
|
|
645
680
|
/* Both dimensions matter here (a project card is not auto-height the
|
|
646
681
|
way a link is), and a card smaller than the minimum could not hold
|
|
@@ -683,10 +718,10 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
683
718
|
|
|
684
719
|
/* Where the armed tool's hover preview sits — cleared while a draw gesture
|
|
685
720
|
runs (the rubber band takes over) and whenever the tool disarms. */
|
|
686
|
-
var
|
|
687
|
-
|
|
688
|
-
hoverPoint =
|
|
689
|
-
setHoverPoint =
|
|
721
|
+
var _useState11 = (0, _react.useState)(null),
|
|
722
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
723
|
+
hoverPoint = _useState12[0],
|
|
724
|
+
setHoverPoint = _useState12[1];
|
|
690
725
|
(0, _react.useEffect)(function () {
|
|
691
726
|
if (activeTool === "select") {
|
|
692
727
|
setHoverPoint(null);
|
|
@@ -953,23 +988,25 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
953
988
|
}
|
|
954
989
|
}));
|
|
955
990
|
}), projectElements.map(function (entry) {
|
|
956
|
-
var _positions$entry$id$x2, _positions$entry$id3, _positions$entry$id$y2, _positions$entry$id4;
|
|
991
|
+
var _positions$entry$id$x2, _positions$entry$id3, _positions$entry$id$y2, _positions$entry$id4, _locks$entry$id;
|
|
957
992
|
var selected = entry.id === selectedId;
|
|
958
993
|
return /*#__PURE__*/_react.default.createElement(_projectElements.StyledProjectElementBox, {
|
|
959
994
|
key: entry.id,
|
|
960
|
-
className: [selected ? "selected" : "", entry.limited ? "limited" : "",
|
|
995
|
+
className: [selected ? "selected" : "", entry.limited ? "limited" : "", entry.kind === "person" ? "person" : "",
|
|
961
996
|
/* A resolved card is a StackedCard, and the shell draws its own
|
|
962
997
|
ring — so the box stands down, exactly as it does for the link
|
|
963
|
-
and file cards. The placeholder, the resolving flash
|
|
964
|
-
limited card are not StackedCards and keep
|
|
965
|
-
|
|
998
|
+
and file cards. The placeholder, the resolving flash, the
|
|
999
|
+
limited card and the person chip are not StackedCards and keep
|
|
1000
|
+
the box's ring. */
|
|
1001
|
+
entry.status === "resolved" && !entry.limited && entry.kind !== "person" ? "is-card" : ""].filter(Boolean).join(" "),
|
|
966
1002
|
style: {
|
|
967
1003
|
left: (_positions$entry$id$x2 = (_positions$entry$id3 = positions[entry.id]) === null || _positions$entry$id3 === void 0 ? void 0 : _positions$entry$id3.x) !== null && _positions$entry$id$x2 !== void 0 ? _positions$entry$id$x2 : 0,
|
|
968
1004
|
top: (_positions$entry$id$y2 = (_positions$entry$id4 = positions[entry.id]) === null || _positions$entry$id4 === void 0 ? void 0 : _positions$entry$id4.y) !== null && _positions$entry$id$y2 !== void 0 ? _positions$entry$id$y2 : 0,
|
|
969
1005
|
width: entry.width,
|
|
970
1006
|
/* Only the placeholder box is measured in both directions; the
|
|
971
|
-
resolved card is auto-height like every other card here.
|
|
972
|
-
|
|
1007
|
+
resolved card is auto-height like every other card here. A
|
|
1008
|
+
person is a fixed square in every state. */
|
|
1009
|
+
height: entry.status === "resolved" && entry.kind !== "person" ? undefined : entry.height
|
|
973
1010
|
},
|
|
974
1011
|
onMouseDown: function onMouseDown(event) {
|
|
975
1012
|
return entry.limited ? handleLimitedMouseDown(event, entry.id) : handleElementMouseDown(event, entry.id);
|
|
@@ -981,7 +1018,18 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
981
1018
|
}, /*#__PURE__*/_react.default.createElement(_projectElements.ProjectElementNode, {
|
|
982
1019
|
element: entry,
|
|
983
1020
|
selected: selected
|
|
984
|
-
})
|
|
1021
|
+
}), selected && entry.kind === "person" && entry.status === "resolved" && !entry.limited && entry.person ? /*#__PURE__*/_react.default.createElement(_entityCardActions.PersonCardToolbar, {
|
|
1022
|
+
onDetails: function onDetails() {
|
|
1023
|
+
return setDetailsId(entry.id);
|
|
1024
|
+
},
|
|
1025
|
+
locked: (_locks$entry$id = locks[entry.id]) !== null && _locks$entry$id !== void 0 ? _locks$entry$id : false,
|
|
1026
|
+
onToggleLock: function onToggleLock() {
|
|
1027
|
+
return toggleLock(entry.id);
|
|
1028
|
+
},
|
|
1029
|
+
onDelete: function onDelete() {
|
|
1030
|
+
return deleteProjectElement(entry.id);
|
|
1031
|
+
}
|
|
1032
|
+
}) : null);
|
|
985
1033
|
}), draft && !(0, _bottomDock.isShapeTool)(draft.tool) && !(0, _projectElements.isProjectTool)(draft.tool) ? /*#__PURE__*/_react.default.createElement(_linkElement.StyledLinkDraft, {
|
|
986
1034
|
style: {
|
|
987
1035
|
left: draft.x,
|
|
@@ -991,7 +1039,17 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
991
1039
|
}
|
|
992
1040
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
993
1041
|
className: "draft-width"
|
|
994
|
-
}, "W", " ", draft.width >= _linkElement.CARD_DRAW_THRESHOLD ? (0, _linkElement.clampCardWidth)(draft.width) : draft.tool === "file" ? _fileElement.FILE_DEFAULT_WIDTH : _linkElement.LINK_DEFAULT_WIDTH, " ", "\xB7 height follows content")) : null, draft &&
|
|
1042
|
+
}, "W", " ", draft.width >= _linkElement.CARD_DRAW_THRESHOLD ? (0, _linkElement.clampCardWidth)(draft.width) : draft.tool === "file" ? _fileElement.FILE_DEFAULT_WIDTH : _linkElement.LINK_DEFAULT_WIDTH, " ", "\xB7 height follows content")) : null, draft && draft.tool === "person" ? function () {
|
|
1043
|
+
var side = draft.width >= _linkElement.CARD_DRAW_THRESHOLD ? (0, _projectElements.clampPersonSize)(draft.width) : _projectElements.PERSON_DEFAULT_SIZE;
|
|
1044
|
+
return /*#__PURE__*/_react.default.createElement(_projectElements.StyledPersonDraft, {
|
|
1045
|
+
style: {
|
|
1046
|
+
left: draft.x,
|
|
1047
|
+
top: draft.y,
|
|
1048
|
+
width: side,
|
|
1049
|
+
height: side
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
}() : null, draft && (0, _projectElements.isProjectTool)(draft.tool) && draft.tool !== "person" ? /*#__PURE__*/_react.default.createElement(_projectElements.StyledProjectDraft, {
|
|
995
1053
|
style: {
|
|
996
1054
|
left: draft.x,
|
|
997
1055
|
top: draft.y,
|
|
@@ -1020,6 +1078,16 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
1020
1078
|
}, size)
|
|
1021
1079
|
}, (0, _linkElement.shapePreviewGlyph)(activeTool, size.width, size.height));
|
|
1022
1080
|
}
|
|
1081
|
+
if (activeTool === "person") {
|
|
1082
|
+
return /*#__PURE__*/_react.default.createElement(_projectElements.StyledPersonDraft, {
|
|
1083
|
+
style: {
|
|
1084
|
+
left: at.x,
|
|
1085
|
+
top: at.y,
|
|
1086
|
+
width: _projectElements.PERSON_DEFAULT_SIZE,
|
|
1087
|
+
height: _projectElements.PERSON_DEFAULT_SIZE
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1023
1091
|
if ((0, _projectElements.isProjectTool)(activeTool)) {
|
|
1024
1092
|
return /*#__PURE__*/_react.default.createElement(_projectElements.StyledProjectDraft, {
|
|
1025
1093
|
style: {
|
|
@@ -1049,13 +1117,34 @@ var CanvasElements = exports.CanvasElements = function CanvasElements(_ref) {
|
|
|
1049
1117
|
rx: 8,
|
|
1050
1118
|
ry: 8
|
|
1051
1119
|
})));
|
|
1052
|
-
}() : null,
|
|
1120
|
+
}() : null, detailsPerson ? /*#__PURE__*/_react.default.createElement(_shared.UserDetailsDialog, _extends({
|
|
1121
|
+
open: true
|
|
1122
|
+
}, (0, _entityCardActions.personDetailsProps)(detailsPerson), {
|
|
1123
|
+
onClose: function onClose() {
|
|
1124
|
+
return setDetailsId(null);
|
|
1125
|
+
}
|
|
1126
|
+
})) : null, pickerElement ? /*#__PURE__*/_react.default.createElement(_projectElements.ProjectElementPicker, {
|
|
1053
1127
|
kind: pickerElement.kind,
|
|
1054
1128
|
onSelectProject: function onSelectProject(project) {
|
|
1055
|
-
return resolveProjectElement(pickerElement.id,
|
|
1129
|
+
return resolveProjectElement(pickerElement.id, {
|
|
1130
|
+
project,
|
|
1131
|
+
task: null,
|
|
1132
|
+
person: null
|
|
1133
|
+
});
|
|
1056
1134
|
},
|
|
1057
1135
|
onSelectTask: function onSelectTask(project, task) {
|
|
1058
|
-
return resolveProjectElement(pickerElement.id,
|
|
1136
|
+
return resolveProjectElement(pickerElement.id, {
|
|
1137
|
+
project,
|
|
1138
|
+
task,
|
|
1139
|
+
person: null
|
|
1140
|
+
});
|
|
1141
|
+
},
|
|
1142
|
+
onSelectPerson: function onSelectPerson(person) {
|
|
1143
|
+
return resolveProjectElement(pickerElement.id, {
|
|
1144
|
+
project: null,
|
|
1145
|
+
task: null,
|
|
1146
|
+
person
|
|
1147
|
+
});
|
|
1059
1148
|
},
|
|
1060
1149
|
onCancel: function onCancel() {
|
|
1061
1150
|
return cancelProjectElement(pickerElement.id);
|