@algorisys/zen-ui-vanilla 13.10.1 → 13.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/AGENTS.md +2 -2
  2. package/dist/_core/index.d.ts +1 -0
  3. package/dist/_core/messages-all.d.ts +5 -0
  4. package/dist/_core/messages.d.ts +5 -0
  5. package/dist/_core/planning-gesture.d.ts +31 -0
  6. package/dist/_core/planning.d.ts +71 -9
  7. package/dist/components/data-table/data-table.d.ts.map +1 -1
  8. package/dist/components/event-calendar/event-calendar-item.d.ts.map +1 -1
  9. package/dist/components/event-calendar/event-calendar-model.d.ts +6 -0
  10. package/dist/components/event-calendar/event-calendar-model.d.ts.map +1 -1
  11. package/dist/components/planning-calendar/planning-calendar.d.ts +65 -3
  12. package/dist/components/planning-calendar/planning-calendar.d.ts.map +1 -1
  13. package/dist/components/rich-text/rich-text.d.ts +5 -7
  14. package/dist/components/rich-text/rich-text.d.ts.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index108.js +12 -4
  18. package/dist/index108.js.map +1 -1
  19. package/dist/index112.js +244 -144
  20. package/dist/index112.js.map +1 -1
  21. package/dist/index113.js +6 -6
  22. package/dist/index114.js +1 -1
  23. package/dist/index115.js +1 -1
  24. package/dist/index116.js +1 -1
  25. package/dist/index118.js +2 -2
  26. package/dist/index120.js +2 -2
  27. package/dist/index168.js +1 -1
  28. package/dist/index175.js +1 -1
  29. package/dist/index187.js +1 -1
  30. package/dist/index191.js +1 -1
  31. package/dist/index194.js +2 -2
  32. package/dist/index199.js +1 -1
  33. package/dist/index211.js +5 -0
  34. package/dist/index211.js.map +1 -1
  35. package/dist/index230.js +107 -75
  36. package/dist/index230.js.map +1 -1
  37. package/dist/index231.js +95 -7
  38. package/dist/index231.js.map +1 -1
  39. package/dist/index232.js +7 -48
  40. package/dist/index232.js.map +1 -1
  41. package/dist/index233.js +45 -37
  42. package/dist/index233.js.map +1 -1
  43. package/dist/index234.js +38 -149
  44. package/dist/index234.js.map +1 -1
  45. package/dist/index235.js +138 -177
  46. package/dist/index235.js.map +1 -1
  47. package/dist/index236.js +190 -90
  48. package/dist/index236.js.map +1 -1
  49. package/dist/index237.js +90 -444
  50. package/dist/index237.js.map +1 -1
  51. package/dist/index238.js +436 -98
  52. package/dist/index238.js.map +1 -1
  53. package/dist/index239.js +106 -2
  54. package/dist/index239.js.map +1 -1
  55. package/dist/index240.js +2 -18804
  56. package/dist/index240.js.map +1 -1
  57. package/dist/index241.js +18798 -117
  58. package/dist/index241.js.map +1 -1
  59. package/dist/index242.js +122 -13
  60. package/dist/index242.js.map +1 -1
  61. package/dist/index243.js +13 -3012
  62. package/dist/index243.js.map +1 -1
  63. package/dist/index244.js +3006 -123
  64. package/dist/index244.js.map +1 -1
  65. package/dist/index245.js +125 -140
  66. package/dist/index245.js.map +1 -1
  67. package/dist/index246.js +138 -93
  68. package/dist/index246.js.map +1 -1
  69. package/dist/index247.js +91 -104
  70. package/dist/index247.js.map +1 -1
  71. package/dist/index248.js +95 -111
  72. package/dist/index248.js.map +1 -1
  73. package/dist/index249.js +127 -4
  74. package/dist/index249.js.map +1 -1
  75. package/dist/index250.js +5 -34
  76. package/dist/index250.js.map +1 -1
  77. package/dist/index251.js +34 -9
  78. package/dist/index251.js.map +1 -1
  79. package/dist/index252.js +10 -7
  80. package/dist/index252.js.map +1 -1
  81. package/dist/index253.js +6 -15
  82. package/dist/index253.js.map +1 -1
  83. package/dist/index254.js +15 -11
  84. package/dist/index254.js.map +1 -1
  85. package/dist/index255.js +11 -3
  86. package/dist/index255.js.map +1 -1
  87. package/dist/index256.js +7 -0
  88. package/dist/index256.js.map +1 -0
  89. package/dist/index99.js.map +1 -1
  90. package/dist/previews/analytic-chart.jpg +0 -0
  91. package/dist/previews/chunk-uploader.jpg +0 -0
  92. package/dist/previews/code-editor.jpg +0 -0
  93. package/dist/previews/countdown.jpg +0 -0
  94. package/dist/previews/loading.jpg +0 -0
  95. package/dist/previews/map.jpg +0 -0
  96. package/dist/previews/tile.jpg +0 -0
  97. package/dist/style.css +1 -1
  98. package/package.json +1 -1
  99. package/skills/zen-ui/SKILL.md +1 -1
  100. package/skills/zen-ui/references/api/event-calendar-event-calendar.md +1 -0
  101. package/skills/zen-ui/references/api/index.md +1 -1
  102. package/skills/zen-ui/references/api/locale.md +5 -0
  103. package/skills/zen-ui/references/api/planning-calendar.md +30 -1
  104. package/skills/zen-ui/references/api/rich-text.md +1 -1
  105. package/skills/zen-ui/references/api/scan-input.md +1 -1
  106. package/skills/zen-ui/references/catalogue.md +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index112.js","sources":["../src/components/planning-calendar/planning-calendar.ts"],"sourcesContent":["import type { IconName } from \"@algorisys/zen-ui-core/icons\";\nimport {\n formatTimeRange,\n layoutLanes,\n nowPct,\n placeAppointment,\n planningColumns,\n planningRange,\n planningRangeLabel,\n shiftPlanningAnchor,\n type PlanningView,\n} from \"@algorisys/zen-ui-core\";\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"../button/button\";\nimport { Icon } from \"../icon/icon\";\nimport {\n applyProps,\n Disposer,\n toNodes,\n type AnyZenComponent,\n type BaseProps,\n type Child,\n type ZenComponent,\n} from \"../../lib/component\";\nimport { useLocale, type MessageKey } from \"../locale/locale\";\n\n/**\n * PlanningCalendar — who is busy, and when.\n *\n * PlanningCalendar({ rows: people, defaultView: \"week\" }).el\n *\n * A resource-by-time grid: one row per person, room or machine, one axis of\n * time, appointments as blocks on it. The question it answers is a comparison\n * ACROSS rows, which is why a month is one long axis of 31 columns rather than a\n * 6×7 page — wrapping it into weeks would give each resource six separate rows.\n *\n * Vanilla port; see the React binding for the reasoning. Same API, same output.\n * All the arithmetic is imported from @algorisys/zen-ui-core/planning and pinned\n * by scripts/check-planning.ts, so four renderers cannot drift on where 09:30\n * is.\n *\n * It does NOT edit: no drag-to-move, no drag-to-create, no resize handles.\n * `onAppointmentClick` hands you the appointment and its row.\n */\n\nexport type PlanningAppointmentState = \"default\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\nconst BLOCK_CLASS: Record<PlanningAppointmentState, string> = {\n default: \"zen-bg-zen-muted zen-text-zen-foreground zen-border-zen-border\",\n info: \"zen-bg-zen-info-soft zen-text-zen-info zen-border-zen-info\",\n success: \"zen-bg-zen-success-soft zen-text-zen-success zen-border-zen-success\",\n warning: \"zen-bg-zen-warning-soft zen-text-zen-warning zen-border-zen-warning\",\n error: \"zen-bg-zen-error-soft zen-text-zen-error zen-border-zen-error\",\n};\n\nexport interface PlanningAppointment {\n id: string;\n start: Date;\n end: Date;\n title: string;\n /** Second line, when the block is wide enough to show it. */\n subtitle?: string;\n state?: PlanningAppointmentState;\n icon?: IconName;\n}\n\nexport interface PlanningRow {\n id: string;\n /** The resource: a person, a room, a machine. */\n title: string;\n subtitle?: string;\n appointments: PlanningAppointment[];\n}\n\nexport interface PlanningCalendarProps extends BaseProps {\n rows: PlanningRow[];\n /** Starting view. The factory owns it after that; call update() to control it. */\n defaultView?: PlanningView;\n view?: PlanningView;\n onViewChange?: (view: PlanningView) => void;\n /** Which views the switcher offers. Default all three. */\n views?: PlanningView[];\n /** Any date inside the range to open on. Default today. */\n defaultDate?: Date;\n date?: Date;\n onDateChange?: (date: Date) => void;\n onAppointmentClick?: (appointment: PlanningAppointment, row: PlanningRow) => void;\n /** Reference \"now\" for the marker and today highlight. Injectable for tests. */\n now?: Date;\n hideToolbar?: boolean;\n emptyMessage?: Child;\n /** Height of one lane in px (appointments stack in lanes inside a row). Default 30. */\n laneHeight?: number;\n /**\n * How much room a lane takes: \"compact\", \"comfortable\" (the default, and the\n * size it always was) or \"touch\" (48px targets, for shop-floor tablets).\n * Opt-in: it does not follow data-density, so setting that on a page moves\n * nothing here. An explicit size prop wins over it.\n */\n density?: Density;\n}\n\nconst VIEW_LABEL: Record<PlanningView, MessageKey> = {\n day: \"planningCalendar.views.day\",\n week: \"planningCalendar.views.week\",\n month: \"planningCalendar.views.month\",\n};\nconst ALL_VIEWS: PlanningView[] = [\"day\", \"week\", \"month\"];\n\n/** Row height per lane. A block is 24px tall; lanes stack inside the row. */\nimport { calendarLanePx, type Density } from \"@algorisys/zen-ui-core/density\";\n\n/**\n * Below this width, a block renders no text at all.\n *\n * A 90-minute meeting is 0.9% of a week. At that size a label is not \"clipped\",\n * it is an empty bordered pill — which reads as a component that failed to\n * render rather than as a busy hour. Under the threshold the block is what it\n * actually is at that zoom: an occupancy mark, with its name and time still in\n * the accessible name and the tooltip.\n */\nconst TEXT_MIN_WIDTH_PCT = 3;\n\nconst el = <K extends keyof HTMLElementTagNameMap>(\n tag: K,\n className?: string,\n text?: string,\n): HTMLElementTagNameMap[K] => {\n const node = document.createElement(tag);\n if (className) node.className = className;\n if (text !== undefined) node.textContent = text;\n return node;\n};\n\nexport function PlanningCalendar(\n props: PlanningCalendarProps,\n): ZenComponent<PlanningCalendarProps> {\n let current: PlanningCalendarProps = { ...props };\n // Never so short that a block (lane − 6px) has no height.\n const lanePx = (): number => Math.max(14, calendarLanePx(current.density, current.laneHeight));\n const loc = useLocale();\n const disposer = new Disposer();\n let removeProps: (() => void) | undefined;\n\n /* The factory owns the uncontrolled view and date, because there is no state\n hook here — `update({ view })` is how a caller takes control, and passing\n `view` explicitly wins over what the toolbar last set. */\n let innerView: PlanningView = props.defaultView ?? \"week\";\n let innerDate: Date = props.defaultDate ?? new Date();\n\n const root = el(\"div\");\n\n /* Handles built by the CURRENT render, destroyed before the next one: a\n Button holds a real listener on a node this component created, and there is\n no unmount here to take it away. Without this every re-render — and the\n toolbar re-renders on every click — leaks a listener per control. */\n let owned: AnyZenComponent[] = [];\n const keep = <T extends AnyZenComponent>(comp: T): T => {\n owned.push(comp);\n return comp;\n };\n\n /* Block click listeners sit on plain <button>s this file builds, so no handle\n releases them. Kept in a per-render list rather than pushed onto the\n Disposer: the Disposer only runs at destroy(), so pushing there would grow\n an array by one entry per block on EVERY render — a slow leak that survives\n the nodes it refers to. */\n let blockCleanups: Array<() => void> = [];\n\n const viewOf = () => current.view ?? innerView;\n const dateOf = () => current.date ?? innerDate;\n\n const setView = (next: PlanningView) => {\n if (current.view === undefined) innerView = next;\n current.onViewChange?.(next);\n render();\n };\n const setDate = (next: Date) => {\n if (current.date === undefined) innerDate = next;\n current.onDateChange?.(next);\n render();\n };\n\n function toolbar(view: PlanningView, anchor: Date, now: Date): HTMLElement {\n const bar = el(\"div\", \"zen-flex zen-flex-wrap zen-items-center zen-gap-2\");\n\n const prev = keep(\n Button({\n variant: \"outline\",\n size: \"sm\",\n \"aria-label\": loc.t(\"planningCalendar.previous\"),\n // Logical, not physical: under RTL the axis runs the other way, so a\n // left-pointing chevron would send you forward.\n children: keep(Icon({ name: \"chevron-left\", size: 14, class: \"rtl:zen-rotate-180\" })),\n onClick: () => setDate(shiftPlanningAnchor(view, anchor, -1)),\n }),\n );\n const today = keep(\n Button({ variant: \"outline\", size: \"sm\", children: loc.t(\"planningCalendar.today\"), onClick: () => setDate(now) }),\n );\n const next = keep(\n Button({\n variant: \"outline\",\n size: \"sm\",\n \"aria-label\": loc.t(\"planningCalendar.next\"),\n children: keep(Icon({ name: \"chevron-right\", size: 14, class: \"rtl:zen-rotate-180\" })),\n onClick: () => setDate(shiftPlanningAnchor(view, anchor, 1)),\n }),\n );\n\n const label = el(\n \"span\",\n \"zen-mx-1 zen-text-sm zen-font-medium zen-text-zen-foreground\",\n planningRangeLabel(view, anchor),\n );\n\n const switcher = el(\"div\", \"zen-ms-auto zen-flex zen-gap-1\");\n switcher.setAttribute(\"role\", \"group\");\n switcher.setAttribute(\"aria-label\", loc.t(\"planningCalendar.view\"));\n for (const v of current.views ?? ALL_VIEWS) {\n switcher.append(\n keep(\n Button({\n variant: view === v ? \"solid\" : \"outline\",\n size: \"sm\",\n \"aria-pressed\": String(view === v),\n children: loc.t(VIEW_LABEL[v]),\n onClick: () => setView(v),\n }),\n ).el,\n );\n }\n\n bar.append(prev.el, today.el, next.el, label, switcher);\n return bar;\n }\n\n function render(): void {\n for (const comp of owned) comp.destroy();\n owned = [];\n for (const off of blockCleanups) off();\n blockCleanups = [];\n root.replaceChildren();\n\n const {\n rows,\n emptyMessage,\n class: className,\n children: _children,\n defaultView: _dv,\n defaultDate: _dd,\n view: _v,\n date: _d,\n views: _vs,\n now: _n,\n hideToolbar: _ht,\n onViewChange: _ovc,\n onDateChange: _odc,\n onAppointmentClick: _oac,\n ...rest\n } = current;\n\n // w-full, because the grid is a chart: shrink-wrapped to its content it\n // reports a 490px week whose columns are too narrow to read.\n root.className = cn(\"zen-flex zen-w-full zen-flex-col zen-gap-3\", className);\n\n const view = viewOf();\n const anchor = dateOf();\n const now = current.now ?? new Date();\n const range = planningRange(view, anchor);\n const columns = planningColumns(view, anchor, { now });\n const marker = nowPct(range, now);\n\n const laidOut = (rows ?? []).map((row) => {\n const visible = row.appointments\n .map((appointment) => ({ appointment, placement: placeAppointment(appointment, range) }))\n .filter(\n (entry): entry is { appointment: PlanningAppointment; placement: NonNullable<typeof entry.placement> } =>\n entry.placement !== null,\n );\n const { lanes, laneCount } = layoutLanes(visible.map((v) => v.appointment));\n return {\n row,\n blocks: visible.map((v, i) => ({ ...v, lane: lanes[i] })),\n laneCount: Math.max(laneCount, 1),\n };\n });\n\n /* The toolbar is gated on there being rows, not only on `hideToolbar`. With\n no resources, Previous / Today / Next and the view switcher cannot change\n anything the user can see. */\n if (!current.hideToolbar && laidOut.length > 0) {\n root.append(toolbar(view, anchor, now));\n }\n\n if (laidOut.length === 0) {\n const p = el(\"p\", \"zen-m-0 zen-py-6 zen-text-center zen-text-sm zen-text-zen-muted-fg\");\n p.append(...toNodes(emptyMessage ?? loc.t(\"planningCalendar.noResources\")));\n root.append(p);\n } else {\n // One horizontal scroller holding the header and every row, so the axis\n // and the blocks under it cannot scroll out of alignment.\n const scroller = el(\n \"div\",\n \"zen-overflow-x-auto zen-rounded-zen-md zen-border zen-border-zen-border\",\n );\n const inner = el(\"div\", \"zen-min-w-[45rem]\");\n\n const head = el(\"div\", \"zen-flex zen-border-b zen-border-zen-border zen-bg-zen-muted\");\n head.append(\n el(\n \"div\",\n \"zen-w-40 zen-shrink-0 zen-border-e zen-border-zen-border zen-px-3 zen-py-2 zen-text-xs zen-font-semibold zen-text-zen-muted-fg\",\n loc.t(\"planningCalendar.resource\"),\n ),\n );\n const headCols = el(\"div\", \"zen-flex zen-flex-1\");\n for (const column of columns) {\n const cell = el(\n \"div\",\n cn(\n \"zen-flex-1 zen-border-e zen-border-zen-border zen-px-1 zen-py-2 zen-text-center last:zen-border-e-0\",\n column.nonWorking && \"zen-bg-zen-muted\",\n column.today && \"zen-bg-zen-primary-soft\",\n ),\n );\n cell.append(el(\"div\", \"zen-text-xs zen-font-medium zen-text-zen-foreground\", column.label));\n if (column.sublabel) {\n cell.append(el(\"div\", \"zen-[font-size:var(--zen-schedule-label-font-size)] zen-text-zen-muted-fg\", column.sublabel));\n }\n headCols.append(cell);\n }\n head.append(headCols);\n inner.append(head);\n\n for (const entry of laidOut) {\n const rowEl = el(\"div\", \"zen-flex zen-border-b zen-border-zen-border last:zen-border-b-0\");\n\n const label = el(\n \"div\",\n \"zen-w-40 zen-shrink-0 zen-border-e zen-border-zen-border zen-px-3 zen-py-2\",\n );\n label.append(\n el(\"div\", \"zen-truncate zen-text-sm zen-font-medium zen-text-zen-foreground\", entry.row.title),\n );\n if (entry.row.subtitle) {\n label.append(el(\"div\", \"zen-truncate zen-text-xs zen-text-zen-muted-fg\", entry.row.subtitle));\n }\n rowEl.append(label);\n\n const track = el(\"div\", \"zen-relative zen-flex-1\");\n track.style.minHeight = `${entry.laneCount * lanePx() + 8}px`;\n\n // The column rules as a background layer rather than as parents of the\n // blocks: a block spanning four hours cannot live inside one column.\n const rules = el(\"div\", \"zen-absolute zen-inset-0 zen-flex\");\n rules.setAttribute(\"aria-hidden\", \"true\");\n for (const column of columns) {\n rules.append(\n el(\n \"div\",\n cn(\n \"zen-flex-1 zen-border-e zen-border-zen-border last:zen-border-e-0\",\n column.nonWorking && \"zen-bg-zen-muted\",\n column.today && \"zen-bg-zen-primary-soft\",\n ),\n ),\n );\n }\n track.append(rules);\n\n if (marker !== null) {\n const line = el(\"div\", \"zen-absolute zen-top-0 zen-bottom-0 zen-w-px zen-bg-zen-error\");\n line.setAttribute(\"aria-hidden\", \"true\");\n line.style.setProperty(\"inset-inline-start\", `${marker}%`);\n track.append(line);\n }\n\n for (const block of entry.blocks) {\n /* A real <button> whether or not a handler was passed: these are the\n only things in the grid worth reaching by keyboard, and a div with\n no tabindex takes the whole calendar out of the tab order. */\n const button = document.createElement(\"button\");\n button.type = \"button\";\n button.className = cn(\n \"zen-absolute zen-flex zen-items-center zen-gap-1 zen-overflow-hidden zen-rounded-zen-sm zen-border zen-px-1.5 zen-text-start zen-text-xs\",\n \"focus-visible:zen-outline-none focus-visible:zen-ring-2 focus-visible:zen-ring-zen-ring\",\n BLOCK_CLASS[block.appointment.state ?? \"default\"],\n // Square off the cut edge so a block continuing past the view does\n // not look like it ends there.\n block.placement.clippedStart && \"zen-rounded-s-none zen-border-s-0\",\n block.placement.clippedEnd && \"zen-rounded-e-none zen-border-e-0\",\n current.onAppointmentClick && \"hover:zen-brightness-95\",\n );\n button.style.setProperty(\"inset-inline-start\", `${block.placement.startPct}%`);\n button.style.width = `${block.placement.widthPct}%`;\n button.style.top = `${block.lane * lanePx() + 4}px`;\n button.style.height = `${lanePx() - 6}px`;\n const time = formatTimeRange(block.appointment.start, block.appointment.end);\n button.title = `${block.appointment.title} · ${time}`;\n\n // The time is in the accessible name, not only the title attribute: a\n // block narrow enough to drop its own label is exactly when someone\n // needs it, and title is not reliably announced.\n button.append(el(\"span\", \"zen-sr-only\", time));\n\n if (block.placement.widthPct >= TEXT_MIN_WIDTH_PCT) {\n if (block.appointment.icon) {\n button.append(keep(Icon({ name: block.appointment.icon, size: 12, class: \"zen-shrink-0\" })).el);\n }\n button.append(el(\"span\", \"zen-truncate zen-font-medium\", block.appointment.title));\n if (block.appointment.subtitle) {\n button.append(el(\"span\", \"zen-truncate zen-opacity-70\", block.appointment.subtitle));\n }\n }\n\n const handler = current.onAppointmentClick;\n if (handler) {\n const onClick = () => handler(block.appointment, entry.row);\n button.addEventListener(\"click\", onClick);\n /* Its own cleanup: this listener is on a node the factory built,\n not on a Button handle, so nothing else would release it. */\n const node = button;\n blockCleanups.push(() => node.removeEventListener(\"click\", onClick));\n }\n\n track.append(button);\n }\n\n rowEl.append(track);\n inner.append(rowEl);\n }\n\n scroller.append(inner);\n root.append(scroller);\n }\n\n removeProps?.();\n removeProps = applyProps(root, rest as Record<string, unknown>);\n }\n\n render();\n disposer.add(() => removeProps?.());\n disposer.add(() => {\n for (const comp of owned) comp.destroy();\n owned = [];\n for (const off of blockCleanups) off();\n blockCleanups = [];\n });\n\n return {\n el: root,\n update(next) {\n current = { ...current, ...next };\n render();\n },\n destroy() {\n disposer.dispose();\n root.remove();\n },\n };\n}\n"],"names":["BLOCK_CLASS","VIEW_LABEL","ALL_VIEWS","TEXT_MIN_WIDTH_PCT","el","tag","className","text","node","PlanningCalendar","props","current","lanePx","calendarLanePx","loc","useLocale","disposer","Disposer","removeProps","innerView","innerDate","root","owned","keep","comp","blockCleanups","viewOf","dateOf","setView","next","render","setDate","toolbar","view","anchor","now","bar","prev","Button","Icon","shiftPlanningAnchor","today","label","planningRangeLabel","switcher","off","rows","emptyMessage","_children","_dv","_dd","_v","_d","_vs","_n","_ht","_ovc","_odc","_oac","rest","cn","range","planningRange","columns","planningColumns","marker","nowPct","laidOut","row","visible","appointment","placeAppointment","entry","lanes","laneCount","layoutLanes","v","i","p","toNodes","scroller","inner","head","headCols","column","cell","rowEl","track","rules","line","block","button","time","formatTimeRange","handler","onClick","applyProps"],"mappings":";;;;;;;;;;;AA+CA,MAAMA,KAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT,GAiDMC,KAA+C;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AI,MAAM;AACjB,eAAWQ,KAAQF,EAAO,CAAAE,EAAK,QAAA;AAC/B,IAAAF,IAAQ,CAAA;AACR,eAAWuB,KAAOpB,EAAe,CAAAoB,EAAA;AACjC,IAAApB,IAAgB,CAAA;AAAA,EAClB,CAAC,GAEM;AAAA,IACL,IAAIJ;AAAA,IACJ,OAAOQ,GAAM;AACX,MAAAlB,IAAU,EAAE,GAAGA,GAAS,GAAGkB,EAAA,GAC3BC,EAAA;AAAA,IACF;AAAA,IACA,UAAU;AACR,MAAAd,EAAS,QAAA,GACTK,EAAK,OAAA;AAAA,IACP;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"index112.js","sources":["../src/components/planning-calendar/planning-calendar.ts"],"sourcesContent":["import type { IconName } from \"@algorisys/zen-ui-core/icons\";\nimport {\n formatTimeRange,\n layoutLanes,\n nowPct,\n placeAppointment,\n planningAxis,\n planningColumns,\n planningKeyboardMove,\n planningRange,\n planningRangeLabel,\n shiftPlanningAnchor,\n startPlanningGesture,\n type PlanningPlacement,\n type PlanningProposedMove,\n type PlanningRange,\n type PlanningView,\n type Weekday,\n} from \"@algorisys/zen-ui-core\";\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"../button/button\";\nimport { Icon } from \"../icon/icon\";\nimport {\n applyProps,\n Disposer,\n toNodes,\n type AnyZenComponent,\n type BaseProps,\n type Child,\n type ZenComponent,\n} from \"../../lib/component\";\nimport { useLocale, type MessageKey } from \"../locale/locale\";\n\n/**\n * PlanningCalendar — who is busy, and when.\n *\n * PlanningCalendar({ rows: people, defaultView: \"week\" }).el\n *\n * A resource-by-time grid: one row per person, room or machine, one axis of\n * time, appointments as blocks on it. The question it answers is a comparison\n * ACROSS rows, which is why a month is one long axis of 31 columns rather than a\n * 6×7 page — wrapping it into weeks would give each resource six separate rows.\n *\n * Vanilla port; see the React binding for the reasoning. Same API, same output.\n * All the arithmetic is imported from @algorisys/zen-ui-core/planning and pinned\n * by scripts/check-planning.ts, so four renderers cannot drift on where 09:30\n * is.\n *\n * It PROPOSES moves and never applies them. Pass `onAppointmentChange` and an\n * appointment can be dragged along its row (long press on touch) or moved with\n * Alt+Left / Alt+Right; `allowRowChange` adds other rows (Alt+Up / Alt+Down).\n * You get `{ appointment, row, toRow, start, end, source }` and apply it with\n * `update({ rows })`, or don't. Without `onAppointmentChange` nothing moves.\n * Same API as Solid and React.\n */\n\nexport type PlanningAppointmentState = \"default\" | \"info\" | \"success\" | \"warning\" | \"error\";\n\nconst BLOCK_CLASS: Record<PlanningAppointmentState, string> = {\n default: \"zen-bg-zen-muted zen-text-zen-foreground zen-border-zen-border\",\n info: \"zen-bg-zen-info-soft zen-text-zen-info zen-border-zen-info\",\n success: \"zen-bg-zen-success-soft zen-text-zen-success zen-border-zen-success\",\n warning: \"zen-bg-zen-warning-soft zen-text-zen-warning zen-border-zen-warning\",\n error: \"zen-bg-zen-error-soft zen-text-zen-error zen-border-zen-error\",\n};\n\nexport interface PlanningAppointment {\n id: string;\n start: Date;\n end: Date;\n title: string;\n /** Second line, when the block is wide enough to show it. */\n subtitle?: string;\n state?: PlanningAppointmentState;\n icon?: IconName;\n /**\n * A save is in flight (an optimistic move, say). The block is dimmed,\n * announced as busy, and cannot be moved again until it clears.\n */\n busy?: boolean;\n}\n\n/** A move the calendar proposes. Nothing has changed until you apply it. */\nexport interface PlanningAppointmentChange {\n appointment: PlanningAppointment;\n /** The row it is in now. */\n row: PlanningRow;\n /** The row it would move to: `row` unless `allowRowChange` let it cross. */\n toRow: PlanningRow;\n start: Date;\n end: Date;\n /** How it was proposed. A keyboard move fires once per key press. */\n source: \"pointer\" | \"keyboard\";\n}\n\nexport interface PlanningAppointmentRenderContext {\n row: PlanningRow;\n /** Too narrow for text (under ~3% of the axis): render a mark, not a label. */\n compact: boolean;\n /** \"09:00 – 10:30\", the same text the block's accessible name carries. */\n timeLabel: string;\n}\n\nexport interface PlanningRow {\n id: string;\n /** The resource: a person, a room, a machine. */\n title: string;\n subtitle?: string;\n appointments: PlanningAppointment[];\n}\n\nexport interface PlanningCalendarProps extends BaseProps {\n rows: PlanningRow[];\n /** Starting view. The factory owns it after that; call update() to control it. */\n defaultView?: PlanningView;\n view?: PlanningView;\n onViewChange?: (view: PlanningView) => void;\n /** Which views the switcher offers. Default all three. */\n views?: PlanningView[];\n /** Any date inside the range to open on. Default today. */\n defaultDate?: Date;\n date?: Date;\n onDateChange?: (date: Date) => void;\n onAppointmentClick?: (appointment: PlanningAppointment, row: PlanningRow) => void;\n /** Reference \"now\" for the marker and today highlight. Injectable for tests. */\n now?: Date;\n hideToolbar?: boolean;\n emptyMessage?: Child;\n /**\n * Your own controls, at the end of the toolbar: a group-by switch, a count.\n * With them, the toolbar stays when there are no rows, so a control that\n * emptied the calendar can also bring the rows back.\n */\n toolbarActions?: Child;\n /**\n * Propose a move. With it, appointments can be dragged (touch: long press)\n * and moved with Alt+arrow keys; without it, nothing moves. You apply it:\n * `update({ rows })`, or don't.\n */\n onAppointmentChange?: (change: PlanningAppointmentChange) => void;\n /** Per-appointment gate. A blocked one is not draggable at all, rather than refused on drop. Default: all. */\n canEditAppointment?: (appointment: PlanningAppointment, row: PlanningRow) => boolean;\n /** Let a move land in another row (re-assign, re-status). Default false: moves stay in their row. */\n allowRowChange?: boolean;\n /** Minutes a move snaps to in the day view. Default 15. Week and month move by whole days. */\n snapMinutes?: number;\n /** Replace a block's content. The calendar keeps the box, its placement, colour and controls. */\n renderAppointment?: (appointment: PlanningAppointment, context: PlanningAppointmentRenderContext) => Child;\n /** Extra classes on a block, e.g. a status colour of your own. */\n appointmentClass?: (appointment: PlanningAppointment, row: PlanningRow) => string | undefined;\n /** First column of a week view (0 = Sunday). Default 1, Monday. */\n weekStartsOn?: Weekday;\n /** First hour the day view draws. Default 0. */\n dayStartHour?: number;\n /** Hour the day view stops at (exclusive). Default 24. */\n dayEndHour?: number;\n /** Hours per column in the day view. Default 1. */\n hourStep?: number;\n /** [from, to) hours drawn unshaded in the day view. Default [9, 18]. */\n workingHours?: [number, number];\n /** Days shaded as non-working (0 = Sunday). Default [0, 6]. */\n nonWorkingDays?: number[];\n /** Height of one lane in px (appointments stack in lanes inside a row). Default 30. */\n laneHeight?: number;\n /**\n * How much room a lane takes: \"compact\", \"comfortable\" (the default, and the\n * size it always was) or \"touch\" (48px targets, for shop-floor tablets).\n * Opt-in: it does not follow data-density, so setting that on a page moves\n * nothing here. An explicit size prop wins over it.\n */\n density?: Density;\n}\n\nconst VIEW_LABEL: Record<PlanningView, MessageKey> = {\n day: \"planningCalendar.views.day\",\n week: \"planningCalendar.views.week\",\n month: \"planningCalendar.views.month\",\n};\nconst ALL_VIEWS: PlanningView[] = [\"day\", \"week\", \"month\"];\n\n/** Row height per lane. A block is 24px tall; lanes stack inside the row. */\nimport { calendarLanePx, type Density } from \"@algorisys/zen-ui-core/density\";\n\n/**\n * Below this width, a block renders no text at all.\n *\n * A 90-minute meeting is 0.9% of a week. At that size a label is not \"clipped\",\n * it is an empty bordered pill — which reads as a component that failed to\n * render rather than as a busy hour. Under the threshold the block is what it\n * actually is at that zoom: an occupancy mark, with its name and time still in\n * the accessible name and the tooltip.\n */\nconst TEXT_MIN_WIDTH_PCT = 3;\n\nconst el = <K extends keyof HTMLElementTagNameMap>(\n tag: K,\n className?: string,\n text?: string,\n): HTMLElementTagNameMap[K] => {\n const node = document.createElement(tag);\n if (className) node.className = className;\n if (text !== undefined) node.textContent = text;\n return node;\n};\n\nlet uid = 0;\n\nexport function PlanningCalendar(\n props: PlanningCalendarProps,\n): ZenComponent<PlanningCalendarProps> {\n let current: PlanningCalendarProps = { ...props };\n // Never so short that a block (lane − 6px) has no height.\n const lanePx = (): number => Math.max(14, calendarLanePx(current.density, current.laneHeight));\n const loc = useLocale();\n const disposer = new Disposer();\n let removeProps: (() => void) | undefined;\n\n /* The factory owns the uncontrolled view and date, because there is no state\n hook here — `update({ view })` is how a caller takes control, and passing\n `view` explicitly wins over what the toolbar last set. */\n let innerView: PlanningView = props.defaultView ?? \"week\";\n let innerDate: Date = props.defaultDate ?? new Date();\n\n const hintId = `zen-planning-calendar-${++uid}`;\n const root = el(\"div\");\n /* What render() rebuilds lives in `body`, laid out as if its children were\n the root's own (display: contents). The hint and the live region sit\n outside it and survive every rebuild, so an announcement is not dropped\n with the DOM it described. */\n const body = el(\"div\", \"zen-contents\");\n const hint = el(\"span\", \"zen-sr-only\");\n hint.id = hintId;\n const live = el(\"div\", \"zen-sr-only\");\n live.setAttribute(\"aria-live\", \"polite\");\n live.setAttribute(\"aria-atomic\", \"true\");\n root.append(body, hint, live);\n\n /* Handles built by the CURRENT render, destroyed before the next one: a\n Button holds a real listener on a node this component created, and there is\n no unmount here to take it away. Without this every re-render — and the\n toolbar re-renders on every click — leaks a listener per control. */\n let owned: AnyZenComponent[] = [];\n const keep = <T extends AnyZenComponent>(comp: T): T => {\n owned.push(comp);\n return comp;\n };\n\n /* Listeners on plain nodes this file builds (blocks), released before the\n next render: the Disposer only runs at destroy(), so pushing there would\n grow by one entry per block on EVERY render. */\n let blockCleanups: Array<() => void> = [];\n const on = <K extends keyof HTMLElementEventMap>(\n node: HTMLElement,\n type: K,\n listener: (e: HTMLElementEventMap[K]) => void,\n ) => {\n node.addEventListener(type, listener);\n blockCleanups.push(() => node.removeEventListener(type, listener));\n };\n\n /* State of the last render the gesture and keyboard need: the axis, and each\n row's lane element (where a ghost is drawn). Not re-rendered during a drag —\n a rebuild per pointermove would cost a full DOM per frame. */\n let axis: PlanningRange = { start: new Date(), end: new Date() };\n let laneById = new Map<string, HTMLElement>();\n let ghost: HTMLElement | null = null;\n let dimmed: HTMLElement | null = null;\n\n const viewOf = () => current.view ?? innerView;\n const dateOf = () => current.date ?? innerDate;\n const weekStart = (): Weekday => current.weekStartsOn ?? 1;\n const snap = () => Math.max(1, current.snapMinutes ?? 15);\n\n const setView = (next: PlanningView) => {\n if (current.view === undefined) innerView = next;\n current.onViewChange?.(next);\n render();\n };\n const setDate = (next: Date) => {\n if (current.date === undefined) innerDate = next;\n current.onDateChange?.(next);\n render();\n };\n\n const editable = (appointment: PlanningAppointment, row: PlanningRow) =>\n !!current.onAppointmentChange && !appointment.busy && (current.canEditAppointment?.(appointment, row) ?? true);\n\n const blockFor = (id: string) => body.querySelector<HTMLElement>(`[data-plan-appointment=\"${CSS.escape(id)}\"]`);\n\n /* A rebuild replaces every block, so focus would fall to <body> on ANY update\n — including a caller applying someone else's save. Remember which block\n had it and put it back on the same appointment. */\n const focusedId = (): string | null => {\n const active = root.ownerDocument.activeElement as HTMLElement | null;\n return active && body.contains(active) ? active.getAttribute(\"data-plan-appointment\") : null;\n };\n /** Set by a keyboard move: refocus this id after the caller's update, which may come a little later. */\n let pendingFocus: { id: string; until: number } | null = null;\n\n const clearGhost = () => {\n ghost?.remove();\n ghost = null;\n dimmed?.classList.remove(\"zen-opacity-40\");\n dimmed = null;\n };\n\n const showGhost = (button: HTMLElement, move: PlanningProposedMove | null) => {\n ghost?.remove();\n ghost = null;\n if (!move) {\n clearGhost();\n return;\n }\n if (dimmed !== button) {\n dimmed?.classList.remove(\"zen-opacity-40\");\n dimmed = button;\n button.classList.add(\"zen-opacity-40\");\n }\n const lane = laneById.get(move.rowId);\n const placement = placeAppointment(move, axis);\n if (!lane || !placement) return;\n /* pointer-events: none, or it becomes the element under the pointer and the\n gesture's hit-test finds no lane. */\n const g = el(\n \"div\",\n \"zen-pointer-events-none zen-absolute zen-z-10 zen-flex zen-items-center zen-overflow-hidden zen-rounded-zen-sm zen-border-2 zen-border-dashed zen-border-zen-primary zen-bg-zen-primary-soft zen-px-1.5 zen-text-xs zen-font-medium zen-text-zen-foreground\",\n );\n g.setAttribute(\"aria-hidden\", \"true\");\n g.setAttribute(\"data-plan-ghost\", \"\");\n g.style.setProperty(\"inset-inline-start\", `${placement.startPct}%`);\n g.style.width = `${placement.widthPct}%`;\n g.style.top = \"4px\";\n g.style.height = `${lanePx() - 6}px`;\n g.append(el(\"span\", \"zen-truncate\", formatTimeRange(move.start, move.end)));\n lane.append(g);\n ghost = g;\n };\n\n const propose = (\n appointment: PlanningAppointment,\n row: PlanningRow,\n move: PlanningProposedMove,\n source: \"pointer\" | \"keyboard\",\n ) => {\n const toRow = (current.rows ?? []).find((r) => r.id === move.rowId) ?? row;\n if (source === \"keyboard\") pendingFocus = { id: appointment.id, until: Date.now() + 2000 };\n current.onAppointmentChange?.({ appointment, row, toRow, start: move.start, end: move.end, source });\n const time = formatTimeRange(move.start, move.end);\n live.textContent = \"\";\n live.textContent =\n toRow.id === row.id\n ? loc.t(\"planningCalendar.proposed\", { title: appointment.title, time })\n : loc.t(\"planningCalendar.proposedRow\", { title: appointment.title, row: toRow.title, time });\n if (source === \"keyboard\" && (move.start < axis.start || move.start >= axis.end)) {\n /* A keyboard move past the edge of the view follows the appointment, as a\n drag would have had to: otherwise it vanishes, and focus with it. */\n setDate(move.start);\n }\n };\n\n function toolbar(view: PlanningView, anchor: Date, now: Date): HTMLElement {\n const bar = el(\"div\", \"zen-flex zen-flex-wrap zen-items-center zen-gap-2\");\n\n const prev = keep(\n Button({\n variant: \"outline\",\n size: \"sm\",\n \"aria-label\": loc.t(\"planningCalendar.previous\"),\n // Logical, not physical: under RTL the axis runs the other way, so a\n // left-pointing chevron would send you forward.\n children: keep(Icon({ name: \"chevron-left\", size: 14, class: \"rtl:zen-rotate-180\" })),\n onClick: () => setDate(shiftPlanningAnchor(view, anchor, -1, weekStart())),\n }),\n );\n const today = keep(\n Button({ variant: \"outline\", size: \"sm\", children: loc.t(\"planningCalendar.today\"), onClick: () => setDate(now) }),\n );\n const next = keep(\n Button({\n variant: \"outline\",\n size: \"sm\",\n \"aria-label\": loc.t(\"planningCalendar.next\"),\n children: keep(Icon({ name: \"chevron-right\", size: 14, class: \"rtl:zen-rotate-180\" })),\n onClick: () => setDate(shiftPlanningAnchor(view, anchor, 1, weekStart())),\n }),\n );\n\n const label = el(\n \"span\",\n \"zen-mx-1 zen-text-sm zen-font-medium zen-text-zen-foreground\",\n planningRangeLabel(view, anchor, weekStart()),\n );\n\n const switcher = el(\"div\", \"zen-ms-auto zen-flex zen-gap-1\");\n switcher.setAttribute(\"role\", \"group\");\n switcher.setAttribute(\"aria-label\", loc.t(\"planningCalendar.view\"));\n for (const v of current.views ?? ALL_VIEWS) {\n switcher.append(\n keep(\n Button({\n variant: view === v ? \"solid\" : \"outline\",\n size: \"sm\",\n \"aria-pressed\": String(view === v),\n children: loc.t(VIEW_LABEL[v]),\n onClick: () => setView(v),\n }),\n ).el,\n );\n }\n\n bar.append(prev.el, today.el, next.el, label, switcher);\n if (current.toolbarActions != null) {\n const actions = el(\"div\", \"zen-flex zen-flex-wrap zen-items-center zen-gap-2\");\n actions.append(...toNodes(current.toolbarActions));\n bar.append(actions);\n }\n return bar;\n }\n\n function render(): void {\n const hadFocus = focusedId();\n clearGhost();\n for (const comp of owned) comp.destroy();\n owned = [];\n for (const off of blockCleanups) off();\n blockCleanups = [];\n body.replaceChildren();\n laneById = new Map();\n\n const {\n rows,\n emptyMessage,\n class: className,\n children: _children,\n defaultView: _dv,\n defaultDate: _dd,\n view: _v,\n date: _d,\n views: _vs,\n now: _n,\n hideToolbar: _ht,\n onViewChange: _ovc,\n onDateChange: _odc,\n onAppointmentClick: _oac,\n toolbarActions: _ta,\n onAppointmentChange: _oach,\n canEditAppointment: _cea,\n allowRowChange: _arc,\n snapMinutes: _sm,\n renderAppointment: _ra,\n appointmentClass: _ac,\n weekStartsOn: _ws,\n dayStartHour: _dsh,\n dayEndHour: _deh,\n hourStep: _hs,\n workingHours: _wh,\n nonWorkingDays: _nwd,\n laneHeight: _lh,\n density: _den,\n ...rest\n } = current;\n\n // w-full, because the grid is a chart: shrink-wrapped to its content it\n // reports a 490px week whose columns are too narrow to read.\n root.className = cn(\"zen-flex zen-w-full zen-flex-col zen-gap-3\", className);\n hint.textContent = loc.t(current.allowRowChange ? \"planningCalendar.editHintRows\" : \"planningCalendar.editHint\");\n\n const view = viewOf();\n const anchor = dateOf();\n const now = current.now ?? new Date();\n const columns = planningColumns(view, anchor, {\n now,\n weekStartsOn: weekStart(),\n dayStartHour: current.dayStartHour,\n dayEndHour: current.dayEndHour,\n hourStep: current.hourStep,\n workingHours: current.workingHours,\n nonWorkingDays: current.nonWorkingDays,\n });\n /* What the lanes DRAW, which is not the view's range once the day view is\n trimmed to working hours: placing against the whole day would put 09:00 a\n third of the way across a grid whose left edge says 08:00. */\n axis = planningAxis(columns, planningRange(view, anchor, weekStart()));\n const marker = nowPct(axis, now);\n\n const laidOut = (rows ?? []).map((row) => {\n const visible = row.appointments\n .map((appointment) => ({ appointment, placement: placeAppointment(appointment, axis) }))\n .filter((entry): entry is { appointment: PlanningAppointment; placement: PlanningPlacement } =>\n entry.placement !== null,\n );\n const { lanes, laneCount } = layoutLanes(visible.map((v) => v.appointment));\n return {\n row,\n blocks: visible.map((v, i) => ({ ...v, lane: lanes[i] })),\n laneCount: Math.max(laneCount, 1),\n };\n });\n\n /* The toolbar is gated on there being rows, not only on `hideToolbar`. With\n no resources and nothing of the caller's in it, Previous / Today / Next\n and the view switcher cannot change anything the user can see. With\n `toolbarActions` it stays: those controls usually decide the rows, and\n hiding them with the rows left the user stuck on an empty calendar.\n Same as Solid and React. */\n if (!current.hideToolbar && (laidOut.length > 0 || current.toolbarActions != null)) {\n body.append(toolbar(view, anchor, now));\n }\n\n if (laidOut.length === 0) {\n const p = el(\"p\", \"zen-m-0 zen-py-6 zen-text-center zen-text-sm zen-text-zen-muted-fg\");\n p.append(...toNodes(emptyMessage ?? loc.t(\"planningCalendar.noResources\")));\n body.append(p);\n } else {\n // One horizontal scroller holding the header and every row, so the axis\n // and the blocks under it cannot scroll out of alignment.\n const scroller = el(\n \"div\",\n \"zen-overflow-x-auto zen-rounded-zen-md zen-border zen-border-zen-border\",\n );\n const inner = el(\"div\", \"zen-min-w-[45rem]\");\n\n const head = el(\"div\", \"zen-flex zen-border-b zen-border-zen-border zen-bg-zen-muted\");\n head.append(\n el(\n \"div\",\n \"zen-w-40 zen-shrink-0 zen-border-e zen-border-zen-border zen-px-3 zen-py-2 zen-text-xs zen-font-semibold zen-text-zen-muted-fg\",\n loc.t(\"planningCalendar.resource\"),\n ),\n );\n const headCols = el(\"div\", \"zen-flex zen-flex-1\");\n for (const column of columns) {\n const cell = el(\n \"div\",\n cn(\n \"zen-flex-1 zen-border-e zen-border-zen-border zen-px-1 zen-py-2 zen-text-center last:zen-border-e-0\",\n column.nonWorking && \"zen-bg-zen-muted\",\n column.today && \"zen-bg-zen-primary-soft\",\n ),\n );\n cell.append(el(\"div\", \"zen-text-xs zen-font-medium zen-text-zen-foreground\", column.label));\n if (column.sublabel) {\n cell.append(el(\"div\", \"zen-[font-size:var(--zen-schedule-label-font-size)] zen-text-zen-muted-fg\", column.sublabel));\n }\n headCols.append(cell);\n }\n head.append(headCols);\n inner.append(head);\n\n for (const entry of laidOut) {\n const rowEl = el(\"div\", \"zen-flex zen-border-b zen-border-zen-border last:zen-border-b-0\");\n\n const label = el(\n \"div\",\n \"zen-w-40 zen-shrink-0 zen-border-e zen-border-zen-border zen-px-3 zen-py-2\",\n );\n label.append(\n el(\"div\", \"zen-truncate zen-text-sm zen-font-medium zen-text-zen-foreground\", entry.row.title),\n );\n if (entry.row.subtitle) {\n label.append(el(\"div\", \"zen-truncate zen-text-xs zen-text-zen-muted-fg\", entry.row.subtitle));\n }\n rowEl.append(label);\n\n /* The lane is the drop target: the gesture hit-tests `data-plan-lane`\n under the pointer, so a block dropped anywhere along its row (or\n another row) lands. */\n const track = el(\"div\", \"zen-relative zen-flex-1\");\n track.setAttribute(\"data-plan-lane\", entry.row.id);\n track.style.minHeight = `${entry.laneCount * lanePx() + 8}px`;\n laneById.set(entry.row.id, track);\n\n // The column rules as a background layer rather than as parents of the\n // blocks: a block spanning four hours cannot live inside one column.\n const rules = el(\"div\", \"zen-absolute zen-inset-0 zen-flex\");\n rules.setAttribute(\"aria-hidden\", \"true\");\n for (const column of columns) {\n rules.append(\n el(\n \"div\",\n cn(\n \"zen-flex-1 zen-border-e zen-border-zen-border last:zen-border-e-0\",\n column.nonWorking && \"zen-bg-zen-muted\",\n column.today && \"zen-bg-zen-primary-soft\",\n ),\n ),\n );\n }\n track.append(rules);\n\n if (marker !== null) {\n const line = el(\"div\", \"zen-absolute zen-top-0 zen-bottom-0 zen-w-px zen-bg-zen-error\");\n line.setAttribute(\"aria-hidden\", \"true\");\n line.style.setProperty(\"inset-inline-start\", `${marker}%`);\n track.append(line);\n }\n\n for (const block of entry.blocks) {\n const { appointment } = block;\n const row = entry.row;\n const canEdit = editable(appointment, row);\n const compact = block.placement.widthPct < TEXT_MIN_WIDTH_PCT;\n /* A real <button> whether or not a handler was passed: these are the\n only things in the grid worth reaching by keyboard, and a div with\n no tabindex takes the whole calendar out of the tab order. */\n const button = document.createElement(\"button\");\n button.type = \"button\";\n button.setAttribute(\"data-plan-appointment\", appointment.id);\n button.className = cn(\n \"zen-absolute zen-flex zen-items-center zen-gap-1 zen-overflow-hidden zen-rounded-zen-sm zen-border zen-px-1.5 zen-text-start zen-text-xs\",\n \"focus-visible:zen-outline-none focus-visible:zen-ring-2 focus-visible:zen-ring-zen-ring\",\n BLOCK_CLASS[appointment.state ?? \"default\"],\n // Square off the cut edge so a block continuing past the view does\n // not look like it ends there.\n block.placement.clippedStart && \"zen-rounded-s-none zen-border-s-0\",\n block.placement.clippedEnd && \"zen-rounded-e-none zen-border-e-0\",\n current.onAppointmentClick && \"hover:zen-brightness-95\",\n canEdit && \"zen-cursor-grab\",\n appointment.busy && \"zen-cursor-wait zen-opacity-60\",\n current.appointmentClass?.(appointment, row),\n );\n button.style.setProperty(\"inset-inline-start\", `${block.placement.startPct}%`);\n button.style.width = `${block.placement.widthPct}%`;\n button.style.top = `${block.lane * lanePx() + 4}px`;\n button.style.height = `${lanePx() - 6}px`;\n if (canEdit) {\n // A long press starts a touch drag, so it must not select text or\n // open the iOS callout.\n button.style.userSelect = \"none\";\n button.style.setProperty(\"-webkit-touch-callout\", \"none\");\n button.setAttribute(\"aria-describedby\", hintId);\n button.setAttribute(\n \"aria-keyshortcuts\",\n current.allowRowChange\n ? \"Alt+ArrowLeft Alt+ArrowRight Alt+ArrowUp Alt+ArrowDown\"\n : \"Alt+ArrowLeft Alt+ArrowRight\",\n );\n }\n if (appointment.busy) button.setAttribute(\"aria-busy\", \"true\");\n const time = formatTimeRange(appointment.start, appointment.end);\n button.title = `${appointment.title} · ${time}`;\n\n // The time is in the accessible name, not only the title attribute: a\n // block narrow enough to drop its own label is exactly when someone\n // needs it, and title is not reliably announced.\n button.append(el(\"span\", \"zen-sr-only\", time));\n if (appointment.busy) button.append(el(\"span\", \"zen-sr-only\", loc.t(\"planningCalendar.busy\")));\n\n if (current.renderAppointment) {\n button.append(...toNodes(current.renderAppointment(appointment, { row, compact, timeLabel: time })));\n } else if (!compact) {\n if (appointment.icon) {\n button.append(keep(Icon({ name: appointment.icon, size: 12, class: \"zen-shrink-0\" })).el);\n }\n button.append(el(\"span\", \"zen-truncate zen-font-medium\", appointment.title));\n if (appointment.subtitle) {\n button.append(el(\"span\", \"zen-truncate zen-opacity-70\", appointment.subtitle));\n }\n }\n\n const handler = current.onAppointmentClick;\n if (handler) on(button, \"click\", () => handler(appointment, row));\n\n if (canEdit) {\n on(button, \"pointerdown\", (e) => {\n startPlanningGesture({\n event: e,\n target: button,\n root,\n axis,\n view,\n snapMinutes: snap(),\n appointment,\n rowId: row.id,\n allowRowChange: !!current.allowRowChange,\n scroller,\n onPreview: (move) => showGhost(button, move),\n onCommit: (move) => propose(appointment, row, move, \"pointer\"),\n });\n });\n on(button, \"keydown\", (e) => {\n if (!e.altKey || e.ctrlKey || e.metaKey) return;\n let move: PlanningProposedMove | null = null;\n if (e.key === \"ArrowUp\" || e.key === \"ArrowDown\") {\n if (!current.allowRowChange) return;\n const list = current.rows ?? [];\n const next = list[list.findIndex((r) => r.id === row.id) + (e.key === \"ArrowDown\" ? 1 : -1)];\n if (!next) return;\n move = { start: appointment.start, end: appointment.end, rowId: next.id };\n } else {\n const rtl = getComputedStyle(button).direction === \"rtl\";\n const at = planningKeyboardMove(appointment, e.key, { view, rtl, snapMinutes: snap() });\n if (!at) return;\n move = { ...at, rowId: row.id };\n }\n e.preventDefault();\n e.stopPropagation();\n propose(appointment, row, move, \"keyboard\");\n });\n }\n\n track.append(button);\n }\n\n rowEl.append(track);\n inner.append(rowEl);\n }\n\n scroller.append(inner);\n body.append(scroller);\n }\n\n removeProps?.();\n removeProps = applyProps(root, rest as Record<string, unknown>);\n\n // Focus back where it was: the block that had it, or the one a keyboard move just proposed.\n const want = pendingFocus && pendingFocus.until > Date.now() ? pendingFocus.id : hadFocus;\n if (want) {\n const target = blockFor(want);\n if (target) {\n target.focus();\n if (pendingFocus?.id === want) pendingFocus = null;\n }\n }\n }\n\n render();\n disposer.add(() => removeProps?.());\n disposer.add(() => {\n clearGhost();\n for (const comp of owned) comp.destroy();\n owned = [];\n for (const off of blockCleanups) off();\n blockCleanups = [];\n });\n\n return {\n el: root,\n update(next) {\n current = { ...current, ...next };\n render();\n },\n destroy() {\n disposer.dispose();\n root.remove();\n },\n };\n}\n"],"names":["BLOCK_CLASS","VIEW_LABEL","ALL_VIEWS","TEXT_MIN_WIDTH_PCT","el","tag","className","text","node","uid","PlanningCalendar","props","current","lanePx","calendarLanePx","loc","useLocale","disposer","Disposer","removeProps","innerView","innerDate","hintId","root","body","hint","live","owned","keep","comp","blockCleanups","on","type","listener","axis","laneById","ghost","dimmed","viewOf","dateOf","weekStart","snap","setView","next","render","setDate","editable","appointment","row","blockFor","id","focusedId","active","pendingFocus","clearGhost","showGhost","button","move","lane","placement","placeAppointment","g","formatTimeRange","propose","source","toRow","r","time","toolbar","view","anchor","now","bar","prev","Button","Icon","shiftPlanningAnchor","today","label","planningRangeLabel","switcher","v","actions","toNodes","hadFocus","off","rows","emptyMessage","_children","_dv","_dd","_v","_d","_vs","_n","_ht","_ovc","_odc","_oac","_ta","_oach","_cea","_arc","_sm","_ra","_ac","_ws","_dsh","_deh","_hs","_wh","_nwd","_lh","_den","rest","cn","columns","planningColumns","planningAxis","planningRange","marker","nowPct","laidOut","visible","entry","lanes","laneCount","layoutLanes","i","p","scroller","inner","head","headCols","column","cell","rowEl","track","rules","line","block","canEdit","compact","handler","e","startPlanningGesture","list","rtl","at","planningKeyboardMove","applyProps","want","target"],"mappings":";;;;;;;;;;;;AA0DA,MAAMA,KAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT,GA6GMC,KAA+C;AAAA,EACnD,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AACT,GACMC,KAA4B,CAAC,OAAO,QAAQ,OAAO,GAcnDC,KAAqB,GAErBC,IAAK,CACTC,GACAC,GACAC,MAC6B;AAC7B,QAAMC,IAAO,SAAS,cAAcH,CAAG;AACvC,SAAIC,QAAgB,YAAYA,IAC5BC,MAAS,WAAWC,EAAK,cAAcD,IACpCC;AACT;AAEA,IAAIC,KAAM;AAEH,SAASC,GACdC,GACqC;AACrC,MAAIC,IAAiC,EAAE,GAAGD,EAAA;AAE1C,QAAME,IAAS,MAAc,KAAK,IAAI,IAAIC,GAAeF,EAAQ,SAASA,EAAQ,UAAU,CAAC,GACvFG,IAAMC,GAAA,GACNC,IAAW,IAAIC,GAAA;AACrB,MAAIC,GAKAC,KAA0BT,EAAM,eAAe,QAC/CU,KAAkBV,EAAM,eAAe,oBAAI,KAAA;AAE/C,QAAMW,KAAS,yBAAyB,EAAEb,EAAG,IACvCc,IAAOnB,EAAG,KAAK,GAKfoB,IAAOpB,EAAG,OAAO,cAAc,GAC/BqB,IAAOrB,EAAG,QAAQ,aAAa;AACrC,EAAAqB,EAAK,KAAKH;AACV,QAAMI,IAAOtB,EAAG,OAAO,aAAa;AACpC,EAAAsB,EAAK,aAAa,aAAa,QAAQ,GACvCA,EAAK,aAAa,eAAe,MAAM,GACvCH,EAAK,OAAOC,GAAMC,GAAMC,CAAI;AAM5B,MAAIC,IAA2B,CAAA;AAC/B,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jB,IAAAqC,EAAA;AACA,eAAWzB,KAAQF,EAAO,CAAAE,EAAK,QAAA;AAC/B,IAAAF,IAAQ,CAAA;AACR,eAAW0D,KAAOvD,EAAe,CAAAuD,EAAA;AACjC,IAAAvD,IAAgB,CAAA;AAAA,EAClB,CAAC,GAEM;AAAA,IACL,IAAIP;AAAA,IACJ,OAAOoB,GAAM;AACX,MAAA/B,IAAU,EAAE,GAAGA,GAAS,GAAG+B,EAAA,GAC3BC,EAAA;AAAA,IACF;AAAA,IACA,UAAU;AACR,MAAA3B,EAAS,QAAA,GACTM,EAAK,OAAA;AAAA,IACP;AAAA,EAAA;AAEJ;"}
package/dist/index113.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { wallMinutes as ae, eventCalendarRange as re, shiftEventCalendarAnchor as G, eventCalendarTitle as se, formatEventTimeRange as ie } from "./index117.js";
2
- import { eventRowPx as le, eventHourPx as ce } from "./index231.js";
2
+ import { eventRowPx as le, eventHourPx as ce } from "./index232.js";
3
3
  import { Disposer as de, applyProps as ve, toNodes as ue } from "./index195.js";
4
4
  import { Button as E } from "./index4.js";
5
5
  import { Icon as B } from "./index6.js";
6
6
  import { useLocale as pe } from "./index31.js";
7
- import { agenda as we } from "./index232.js";
8
- import { el as l, sameDay as me } from "./index233.js";
9
- import { month as fe } from "./index234.js";
10
- import { timeGrid as he } from "./index235.js";
7
+ import { agenda as we } from "./index233.js";
8
+ import { el as l, sameDay as me } from "./index234.js";
9
+ import { month as fe } from "./index235.js";
10
+ import { timeGrid as he } from "./index236.js";
11
11
  import { registerMessages as ge } from "./index212.js";
12
- import { CALENDAR_MESSAGES as ye } from "./index236.js";
12
+ import { CALENDAR_MESSAGES as ye } from "./index237.js";
13
13
  import { cn as Ce } from "./index194.js";
14
14
  ge(ye);
15
15
  const De = {
package/dist/index114.js CHANGED
@@ -6,7 +6,7 @@ import { RadioGroup as H, RadioGroupItem as L } from "./index52.js";
6
6
  import { Select as ie } from "./index17.js";
7
7
  import { useLocale as de } from "./index31.js";
8
8
  import { registerMessages as me } from "./index212.js";
9
- import { CALENDAR_MESSAGES as fe } from "./index236.js";
9
+ import { CALENDAR_MESSAGES as fe } from "./index237.js";
10
10
  import { cn as K } from "./index194.js";
11
11
  me(fe);
12
12
  const W = {
package/dist/index115.js CHANGED
@@ -6,7 +6,7 @@ import { Select as F } from "./index17.js";
6
6
  import { Icon as T } from "./index6.js";
7
7
  import { useLocale as Q } from "./index31.js";
8
8
  import { registerMessages as W } from "./index212.js";
9
- import { CALENDAR_MESSAGES as X } from "./index236.js";
9
+ import { CALENDAR_MESSAGES as X } from "./index237.js";
10
10
  import { cn as Y } from "./index194.js";
11
11
  W(X);
12
12
  const Z = ["minutes", "hours", "days", "weeks"], ee = {
package/dist/index116.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { parseRRule as M, formatRRule as s } from "./index117.js";
2
2
  import { registerMessages as k } from "./index212.js";
3
- import { CALENDAR_MESSAGES as E } from "./index236.js";
3
+ import { CALENDAR_MESSAGES as E } from "./index237.js";
4
4
  k(E);
5
5
  const f = (n) => new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate(), h = (n, t, r) => Math.min(r, Math.max(t, Number.isFinite(n) ? Math.round(n) : t)), Y = 99, b = 999;
6
6
  function R(n) {
package/dist/index118.js CHANGED
@@ -4,7 +4,7 @@ import "./index169.js";
4
4
  import { nowPct as it, placeAppointment as et } from "./index230.js";
5
5
  import "./index116.js";
6
6
  import { flattenGanttTasks as Gt, ganttConnectors as jt, ganttFitRange as Vt, ganttLegendItems as Xt, GANTT_STATUS_COLOR as Ut, formatGanttVariance as Qt, ganttActualLayout as $t, ganttLabelFits as rt, ganttLabelPx as ct, ganttMilestoneLayout as qt } from "./index119.js";
7
- import { ganttBarPx as Yt, scheduleRowPx as Jt } from "./index231.js";
7
+ import { ganttBarPx as Yt, scheduleRowPx as Jt } from "./index232.js";
8
8
  import { AvatarGroup as Kt, Avatar as Zt, AvatarImage as te, AvatarFallback as ee } from "./index24.js";
9
9
  import { Badge as St } from "./index5.js";
10
10
  import { EmptyState as ne, EmptyStateIcon as ae, EmptyStateTitle as se, EmptyStateDescription as oe } from "./index37.js";
@@ -12,7 +12,7 @@ import { Icon as Ct } from "./index6.js";
12
12
  import { Skeleton as dt } from "./index25.js";
13
13
  import { Tooltip as le } from "./index59.js";
14
14
  import { toNodes as ie } from "./index195.js";
15
- import { resolveScheduleAxis as re, INDENT_PX as Tt, ScheduleGrid as ce } from "./index237.js";
15
+ import { resolveScheduleAxis as re, INDENT_PX as Tt, ScheduleGrid as ce } from "./index238.js";
16
16
  import { withLocale as de, useLocale as ue } from "./index31.js";
17
17
  const ut = {
18
18
  name: 180,
package/dist/index120.js CHANGED
@@ -7,7 +7,7 @@ import "./index116.js";
7
7
  import { ganttConnectors as Ce, ganttFitRange as Ae } from "./index119.js";
8
8
  import { flattenProductionResources as Le, productionLoad as ae, productionSequenceConflicts as Pe, productionLateMs as Ee } from "./index121.js";
9
9
  import { durationMessage as Te } from "./index129.js";
10
- import { laneBarPx as ie, scheduleRowPx as $e } from "./index231.js";
10
+ import { laneBarPx as ie, scheduleRowPx as $e } from "./index232.js";
11
11
  import { PRODUCTION_DRAG_TYPE as ce, snapToMinutes as Ie, productionReschedule as ke } from "./index122.js";
12
12
  import { productionCriticalPath as De } from "./index162.js";
13
13
  import { Badge as de } from "./index5.js";
@@ -15,7 +15,7 @@ import { EmptyState as Oe, EmptyStateIcon as Re, EmptyStateTitle as Fe, EmptySta
15
15
  import { Icon as Y } from "./index6.js";
16
16
  import { Skeleton as j } from "./index25.js";
17
17
  import { toNodes as le } from "./index195.js";
18
- import { resolveScheduleAxis as _e, INDENT_PX as ue, ScheduleGrid as We } from "./index237.js";
18
+ import { resolveScheduleAxis as _e, INDENT_PX as ue, ScheduleGrid as We } from "./index238.js";
19
19
  import { withLocale as Be, useLocale as Xe } from "./index31.js";
20
20
  const J = {
21
21
  resource: 180,
package/dist/index168.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fieldLabel as me, isFilterActive as ne, PIVOT_ZONES as fe, defaultAggregationForField as be, availableFields as ge, hasActiveFilters as he, isLayoutRenderable as ve, createEmptyLayout as ze, updateValueAggregation as xe, moveFieldToZone as ye, isValueSelected as we } from "./index170.js";
2
- import { prunePivotFilterWindows as Ce, VIRTUAL_SCROLL_FETCH_DEBOUNCE_MS as pe, pivotFilterMissingWindowStarts as Ee, pickNearestWindowStart as Le, alignWindowStart as ke, PIVOT_FILTER_LEADING_OVERSCAN_SLACK as ue, pivotFilterWindowValueAt as Se, VIRTUAL_SCROLL_WINDOW_PAGE_SIZE as Ae } from "./index238.js";
2
+ import { prunePivotFilterWindows as Ce, VIRTUAL_SCROLL_FETCH_DEBOUNCE_MS as pe, pivotFilterMissingWindowStarts as Ee, pickNearestWindowStart as Le, alignWindowStart as ke, PIVOT_FILTER_LEADING_OVERSCAN_SLACK as ue, pivotFilterWindowValueAt as Se, VIRTUAL_SCROLL_WINDOW_PAGE_SIZE as Ae } from "./index239.js";
3
3
  import { Disposer as K, toNodes as ie } from "./index195.js";
4
4
  import { Alert as Ne, AlertIcon as Ie, AlertContent as Re, AlertTitle as Te, AlertDescription as Fe } from "./index23.js";
5
5
  import { Badge as De } from "./index5.js";
package/dist/index175.js CHANGED
@@ -41,7 +41,7 @@ function R(k) {
41
41
  const x = async () => {
42
42
  let n;
43
43
  try {
44
- const b = await import("./index239.js"), g = b.default ?? b;
44
+ const b = await import("./index240.js"), g = b.default ?? b;
45
45
  e.loaderConfig && g.config(e.loaderConfig), n = await g.init();
46
46
  } catch {
47
47
  m = "missing", h();
package/dist/index187.js CHANGED
@@ -78,7 +78,7 @@ function et(E) {
78
78
  x = "loading", p();
79
79
  let c;
80
80
  try {
81
- c = await import("./index240.js");
81
+ c = await import("./index241.js");
82
82
  } catch {
83
83
  if (o !== f) return;
84
84
  U("This is a PDF, and pdfjs-dist is not installed. Add it to render PDFs.");
package/dist/index191.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ariaKeyshortcut as _, parseChord as P, chordLabel as S, chordParts as j, isTypingTarget as B, matchesChord as T, isReservedChord as I, sameChord as M } from "./index241.js";
1
+ import { ariaKeyshortcut as _, parseChord as P, chordLabel as S, chordParts as j, isTypingTarget as B, matchesChord as T, isReservedChord as I, sameChord as M } from "./index242.js";
2
2
  import { Disposer as K, applyProps as L, setChildren as R } from "./index195.js";
3
3
  import { Dialog as F } from "./index10.js";
4
4
  import { useLocale as G } from "./index31.js";
package/dist/index194.js CHANGED
@@ -1,5 +1,5 @@
1
- import { clsx as r } from "./index242.js";
2
- import { extendTailwindMerge as c } from "./index243.js";
1
+ import { clsx as r } from "./index243.js";
2
+ import { extendTailwindMerge as c } from "./index244.js";
3
3
  import { zenUnoTheme as e, ZEN_PREFIX as i } from "./index210.js";
4
4
  const m = new RegExp(`^(-?)${i}(.*)$`), d = Object.keys(e.borderRadius), b = Object.keys(e.boxShadow), p = /* @__PURE__ */ new Map([["outline", "outline-solid"]]), l = c({
5
5
  // The density keys are spacing, so `zen-h-zen-control` and a caller's
package/dist/index199.js CHANGED
@@ -1,4 +1,4 @@
1
- import { clsx as O } from "./index242.js";
1
+ import { clsx as O } from "./index243.js";
2
2
  const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
3
  var s;
4
4
  if (l?.variants == null) return y(e, n?.class, n?.className);
package/dist/index211.js CHANGED
@@ -404,6 +404,11 @@ const y = {
404
404
  "planningCalendar.next": "Next",
405
405
  "planningCalendar.noResources": "No resources",
406
406
  "planningCalendar.resource": "Resource",
407
+ "planningCalendar.editHint": "Alt+Left and Alt+Right move it",
408
+ "planningCalendar.editHintRows": "Alt+Left and Alt+Right move it in time, Alt+Up and Alt+Down to another row",
409
+ "planningCalendar.proposed": "{title}: {time}",
410
+ "planningCalendar.proposedRow": "{title}: {row}, {time}",
411
+ "planningCalendar.busy": "Saving",
407
412
  "proctor.noVideo": "No video",
408
413
  "proctor.nobodyIsConnected": "Nobody is connected.",
409
414
  "productionSchedule.loadingProductionSchedule": "Loading production schedule",