dishui 0.0.66 → 0.0.68
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/calendar.js +5 -0
- package/dist/components/Accordion/index.d.ts +39 -0
- package/dist/components/Accordion/index.js +70 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +48 -0
- package/dist/components/Avatar/index.js +71 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Card/index.d.ts +66 -0
- package/dist/components/Card/index.js +193 -3
- package/dist/components/Card/index.js.map +1 -1
- package/dist/components/Demo/index.js +76 -80
- package/dist/components/Demo/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts +3 -1
- package/dist/components/Icon/index.js +9 -8
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Page/index.d.ts +1 -1
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/pro/Calendar/Calendar.js +576 -0
- package/dist/components/pro/Calendar/Calendar.js.map +1 -0
- package/dist/components/pro/Calendar/hooks/useCalendarDrag.js +104 -0
- package/dist/components/pro/Calendar/hooks/useCalendarDrag.js.map +1 -0
- package/dist/components/pro/Calendar/hooks/useCalendarState.js +187 -0
- package/dist/components/pro/Calendar/hooks/useCalendarState.js.map +1 -0
- package/dist/components/pro/Calendar/utils.js +193 -0
- package/dist/components/pro/Calendar/utils.js.map +1 -0
- package/dist/components/pro/Gantt/Gantt.js +868 -0
- package/dist/components/pro/Gantt/Gantt.js.map +1 -0
- package/dist/components/pro/Gantt/hooks/useGanttDrag.js +99 -0
- package/dist/components/pro/Gantt/hooks/useGanttDrag.js.map +1 -0
- package/dist/components/pro/Gantt/hooks/useGanttState.js +95 -0
- package/dist/components/pro/Gantt/hooks/useGanttState.js.map +1 -0
- package/dist/components/pro/Gantt/utils.js +236 -0
- package/dist/components/pro/Gantt/utils.js.map +1 -0
- package/dist/dishui.css +1 -1
- package/dist/gantt.js +5 -0
- package/dist/hooks/useCopyToClipboard.d.ts +2 -1
- package/dist/hooks/useCopyToClipboard.js +17 -9
- package/dist/hooks/useCopyToClipboard.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +103 -94
- package/dist/utils/i18n.js +58 -8
- package/dist/utils/i18n.js.map +1 -1
- package/package.json +12 -1
- package/dist/components/StatCard/index.d.ts +0 -52
- package/dist/components/StatCard/index.js +0 -193
- package/dist/components/StatCard/index.js.map +0 -1
- package/dist/pages/components/Gantt/index.d.ts +0 -3
- package/dist/pages/components/Gantt/index.en.d.ts +0 -3
- package/dist/pages/components/Gantt/index.zh.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../src/components/pro/Gantt/utils.ts"],"sourcesContent":["/**\n * DishUI Gantt Chart - Utility Functions\n *\n * Core utilities for date math, working day calculations,\n * and coordinate conversions in the Gantt timeline.\n */\n\nimport type {\n GanttNode,\n HolidayCalendar,\n TimeWindow,\n GanttScaleLevel,\n GanttScaleConfig,\n GanttCategoryConfig,\n FlatGanttNode,\n GanttNodeId,\n} from \"./types\";\n\n// ─── Default Scale Configurations ─────────────────────────────────\n\nexport const DEFAULT_SCALE_CONFIGS: Record<GanttScaleLevel, GanttScaleConfig> =\n {\n year: { label: \"Year\", cellWidth: 4, slotsPerDay: 1 },\n quarter: { label: \"Quarter\", cellWidth: 8, slotsPerDay: 1 },\n month: { label: \"Month\", cellWidth: 16, slotsPerDay: 1 },\n week: { label: \"Week\", cellWidth: 24, slotsPerDay: 1 },\n day: { label: \"Day\", cellWidth: 40, slotsPerDay: 1 },\n halfday: { label: \"Half Day\", cellWidth: 40, slotsPerDay: 2 },\n hour: { label: \"Hour\", cellWidth: 30, slotsPerDay: 24 },\n };\n\nexport const DEFAULT_CATEGORY_CONFIG: GanttCategoryConfig = {\n color: \"#3b82f6\",\n backgroundColor: \"#3b82f6\",\n barHeight: 0.6,\n borderRadius: 4,\n showProgress: false,\n skipNonWorkingDays: false,\n draggable: undefined, // inherit from global\n resizable: undefined,\n renderStyle: \"bar\",\n};\n\nexport const DEFAULT_TIME_WINDOW: TimeWindow = {\n startHour: 0,\n endHour: 24,\n};\n\n// ─── Date Utilities ───────────────────────────────────────────────\n\n/**\n * Parse a date value (string or Date) into a Date object.\n * Handles ISO 8601 strings, YYYY-MM-DD strings, and Date objects.\n */\nexport function parseDate(\n value: string | Date | undefined | null,\n): Date | null {\n if (!value) return null;\n if (value instanceof Date) return isNaN(value.getTime()) ? null : value;\n\n const str = String(value);\n\n // ISO format with time/timezone\n if (str.includes(\"T\") || str.includes(\"+\") || str.includes(\"Z\")) {\n const d = new Date(str);\n return isNaN(d.getTime()) ? null : d;\n }\n\n // YYYY-MM-DD format → create in local timezone\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(str)) {\n const [y, m, d] = str.split(\"-\").map(Number);\n return new Date(y, m - 1, d);\n }\n\n const d = new Date(str);\n return isNaN(d.getTime()) ? null : d;\n}\n\n/**\n * Format a Date to YYYY-MM-DD string in local timezone\n */\nexport function formatDate(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n}\n\n/**\n * Format a Date to a display string based on scale level\n */\nexport function formatDateForScale(date: Date, scale: GanttScaleLevel): string {\n switch (scale) {\n case \"year\":\n return `${date.getFullYear()}`;\n case \"quarter\":\n return `Q${Math.floor(date.getMonth() / 3) + 1} ${date.getFullYear()}`;\n case \"month\":\n return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, \"0\")}`;\n case \"week\":\n case \"day\":\n return formatDate(date);\n case \"halfday\":\n case \"hour\":\n return `${formatDate(date)} ${String(date.getHours()).padStart(2, \"0\")}:00`;\n }\n}\n\n/**\n * Check if a given date is a weekend (Saturday or Sunday)\n */\nexport function isWeekend(date: Date): boolean {\n const day = date.getDay();\n return day === 0 || day === 6;\n}\n\n/**\n * Check if a date is a non-working day based on the holiday calendar.\n * Priority: custom function > entries > weekends\n */\nexport function isNonWorkingDay(\n date: Date,\n calendar?: HolidayCalendar,\n): boolean {\n if (!calendar) return isWeekend(date);\n\n // Custom function takes priority\n if (calendar.isNonWorkingDay) {\n return calendar.isNonWorkingDay(date);\n }\n\n const dateStr = formatDate(date);\n\n // Check entries\n if (calendar.entries && calendar.entries.length > 0) {\n const entry = calendar.entries.find((e) => e.date === dateStr);\n if (entry) {\n // If it's a compensatory workday, it's a working day\n return !entry.isWorkday;\n }\n }\n\n // Fall back to weekend check\n if (calendar.weekendsOff !== false) {\n return isWeekend(date);\n }\n\n return false;\n}\n\n/**\n * Calculate the number of working days between two dates (inclusive of both start and end).\n */\nexport function calculateWorkingDays(\n startDate: Date,\n endDate: Date,\n calendar?: HolidayCalendar,\n): number {\n let count = 0;\n const current = new Date(startDate);\n current.setHours(0, 0, 0, 0);\n const end = new Date(endDate);\n end.setHours(0, 0, 0, 0);\n\n while (current <= end) {\n if (!isNonWorkingDay(current, calendar)) {\n count++;\n }\n current.setDate(current.getDate() + 1);\n }\n\n return count;\n}\n\n/**\n * Compute the end date from a start date and N working days.\n * The returned date is the day AFTER the last working day (open interval end).\n */\nexport function addWorkingDays(\n startDate: Date,\n workingDays: number,\n calendar?: HolidayCalendar,\n): Date {\n if (workingDays <= 0) return new Date(startDate);\n const current = new Date(startDate);\n current.setHours(0, 0, 0, 0);\n let remaining = workingDays;\n\n while (remaining > 0) {\n const isNonWorking = isNonWorkingDay(current, calendar);\n current.setDate(current.getDate() + 1);\n if (!isNonWorking) {\n remaining--;\n }\n }\n\n return current;\n}\n\n/**\n * Get the number of calendar days between two dates\n */\nexport function daysBetween(start: Date, end: Date): number {\n const s = new Date(start);\n s.setHours(0, 0, 0, 0);\n const e = new Date(end);\n e.setHours(0, 0, 0, 0);\n return Math.round((e.getTime() - s.getTime()) / (24 * 60 * 60 * 1000));\n}\n\n/**\n * Add calendar days to a date\n */\nexport function addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n/**\n * Get the start of a day (midnight)\n */\nexport function startOfDay(date: Date): Date {\n const d = new Date(date);\n d.setHours(0, 0, 0, 0);\n return d;\n}\n\n/**\n * Get the start of a month\n */\nexport function startOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), 1);\n}\n\n/**\n * Get the start of a year\n */\nexport function startOfYear(date: Date): Date {\n return new Date(date.getFullYear(), 0, 1);\n}\n\n/**\n * Get the start of a quarter\n */\nexport function startOfQuarter(date: Date): Date {\n const q = Math.floor(date.getMonth() / 3);\n return new Date(date.getFullYear(), q * 3, 1);\n}\n\n/**\n * Get the start of a week (Monday)\n */\nexport function startOfWeek(date: Date): Date {\n const d = new Date(date);\n const day = d.getDay();\n const diff = (day === 0 ? -6 : 1) - day; // Monday = 1\n d.setDate(d.getDate() + diff);\n d.setHours(0, 0, 0, 0);\n return d;\n}\n\n/**\n * Check if two dates are the same calendar day\n */\nexport function isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\n/**\n * Get the ISO 8601 week number. The week containing January 4 is week 1.\n * Weeks start on Monday.\n */\nexport function getISOWeekNumber(date: Date): number {\n const d = new Date(\n Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()),\n );\n // Set to nearest Thursday: current date + 4 - current day number (Monday = 1, Sunday = 7)\n const dayNum = d.getUTCDay() || 7;\n d.setUTCDate(d.getUTCDate() + 4 - dayNum);\n // Get first day of year\n const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));\n // Calculate full weeks to nearest Thursday\n const weekNo = Math.ceil(\n ((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7,\n );\n return weekNo;\n}\n\n/**\n * Get the ISO week-numbering year. This may differ from the calendar year\n * for dates near the start/end of a year.\n */\nexport function getISOWeekYear(date: Date): number {\n const d = new Date(\n Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()),\n );\n const dayNum = d.getUTCDay() || 7;\n d.setUTCDate(d.getUTCDate() + 4 - dayNum);\n return d.getUTCFullYear();\n}\n\n// ─── Timeline Computation ─────────────────────────────────────────\n\n/**\n * Compute the date range needed to display all data in the Gantt chart,\n * with some padding.\n */\nexport function computeDateRange(\n data: GanttNode[],\n calendar?: HolidayCalendar,\n paddingDays: number = 14,\n): { start: Date; end: Date } {\n let minDate: Date | null = null;\n let maxDate: Date | null = null;\n\n function traverse(nodes: GanttNode[]) {\n for (const node of nodes) {\n const s = parseDate(node.startDate);\n const e = parseDate(node.endDate);\n\n if (s) {\n if (!minDate || s < minDate) minDate = new Date(s);\n if (!maxDate || s > maxDate) maxDate = new Date(s);\n }\n if (e) {\n if (!minDate || e < minDate) minDate = new Date(e);\n if (!maxDate || e > maxDate) maxDate = new Date(e);\n }\n\n // If we have startDate + workingDays but no endDate, compute end\n if (s && node.workingDays && !e) {\n const computed = addWorkingDays(s, node.workingDays, calendar);\n if (!maxDate || computed > maxDate) maxDate = new Date(computed);\n }\n\n if (node.children) traverse(node.children);\n }\n }\n\n traverse(data);\n\n // Default to ±30 days from today if no dates found\n const today = startOfDay(new Date());\n if (!minDate) minDate = addDays(today, -30);\n if (!maxDate) maxDate = addDays(today, 30);\n\n // Extend range to include today if data exists but today is outside\n if (minDate && today < minDate) minDate = new Date(today);\n if (maxDate && today > maxDate) maxDate = new Date(today);\n\n return {\n start: addDays(minDate, -paddingDays),\n end: addDays(maxDate, paddingDays),\n };\n}\n\n/**\n * Generate an array of dates between start and end (inclusive)\n */\nexport function generateDateRange(start: Date, end: Date): Date[] {\n const dates: Date[] = [];\n const current = startOfDay(new Date(start));\n const endDay = startOfDay(new Date(end));\n\n while (current <= endDay) {\n dates.push(new Date(current));\n current.setDate(current.getDate() + 1);\n }\n\n return dates;\n}\n\n/**\n * Generate header groups for the timeline (top row: months/years, bottom row: days/hours)\n */\nexport interface TimelineHeaderGroup {\n label: string;\n span: number; // number of cells this group spans\n date: Date;\n}\n\nexport function generateHeaderGroups(\n dates: Date[],\n scale: GanttScaleLevel,\n): TimelineHeaderGroup[] {\n const groups: TimelineHeaderGroup[] = [];\n if (dates.length === 0) return groups;\n\n let currentLabel = \"\";\n let currentSpan = 0;\n let currentDate = dates[0];\n\n for (const date of dates) {\n let label: string;\n\n switch (scale) {\n case \"year\":\n label = `${date.getFullYear()}`;\n break;\n case \"quarter\":\n label = `Q${Math.floor(date.getMonth() / 3) + 1} ${date.getFullYear()}`;\n break;\n case \"week\": {\n const wk = getISOWeekNumber(date);\n const wy = getISOWeekYear(date);\n const mon = date.getMonth() + 1;\n label = `${wy}-W${String(wk).padStart(2, \"0\")} (${mon}月)`;\n break;\n }\n case \"month\":\n case \"day\":\n label = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, \"0\")}`;\n break;\n case \"halfday\":\n case \"hour\":\n label = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, \"0\")}-${String(date.getDate()).padStart(2, \"0\")}`;\n break;\n default:\n label = \"\";\n }\n\n if (label === currentLabel) {\n currentSpan++;\n } else {\n if (currentLabel) {\n groups.push({\n label: currentLabel,\n span: currentSpan,\n date: currentDate,\n });\n }\n currentLabel = label;\n currentSpan = 1;\n currentDate = date;\n }\n }\n\n if (currentLabel) {\n groups.push({ label: currentLabel, span: currentSpan, date: currentDate });\n }\n\n return groups;\n}\n\n// ─── Tree Flattening ──────────────────────────────────────────────\n\n/**\n * Flatten the hierarchical GanttNode tree into a list of FlatGanttNode,\n * respecting expanded/collapsed state.\n */\nexport function flattenTree(\n data: GanttNode[],\n expandedIds: Set<GanttNodeId>,\n defaultExpandAll: boolean,\n dateRange: { start: Date; end: Date },\n scaleConfig: GanttScaleConfig,\n categoryConfigs: Record<string, GanttCategoryConfig>,\n calendar?: HolidayCalendar,\n globalTimeWindow?: TimeWindow,\n): FlatGanttNode[] {\n const result: FlatGanttNode[] = [];\n const timelineStart = startOfDay(dateRange.start);\n let visibleIndex = 0;\n\n function traverse(nodes: GanttNode[], depth: number) {\n for (const node of nodes) {\n const hasChildren = !!(node.children && node.children.length > 0);\n const expanded = defaultExpandAll\n ? !expandedIds.has(node.id) // In defaultExpandAll mode, expandedIds is the set of COLLAPSED nodes\n : expandedIds.has(node.id);\n\n // Resolve category config\n const catConfig = {\n ...DEFAULT_CATEGORY_CONFIG,\n ...categoryConfigs[\"default\"],\n ...(node.category && categoryConfigs[node.category]\n ? categoryConfigs[node.category]\n : {}),\n };\n\n // Resolve dates\n const startDate = parseDate(node.startDate);\n let endDate = parseDate(node.endDate);\n\n // If workingDays is set and no endDate, compute endDate\n if (startDate && node.workingDays && !endDate) {\n if (catConfig.skipNonWorkingDays) {\n endDate = addWorkingDays(startDate, node.workingDays, calendar);\n } else {\n endDate = addDays(startDate, node.workingDays);\n }\n }\n\n // Calculate bar position\n let barLeft = 0;\n let barWidth = 0;\n const isRenderable = node.renderable !== false && !!startDate;\n\n if (isRenderable && startDate) {\n const end = endDate || addDays(startDate, 1);\n const daysFromStart = daysBetween(timelineStart, startDate);\n const durationDays = Math.max(daysBetween(startDate, end), 1);\n\n barLeft =\n daysFromStart * scaleConfig.cellWidth * scaleConfig.slotsPerDay;\n barWidth =\n durationDays * scaleConfig.cellWidth * scaleConfig.slotsPerDay;\n }\n\n const flatNode: FlatGanttNode = {\n node,\n depth,\n expanded,\n hasChildren,\n barLeft,\n barWidth,\n resolvedStartDate: startDate,\n resolvedEndDate: endDate,\n isRenderable,\n categoryConfig: catConfig,\n visibleIndex: visibleIndex++,\n };\n\n result.push(flatNode);\n\n // Recurse into expanded children\n if (hasChildren && expanded) {\n traverse(node.children!, depth + 1);\n }\n }\n }\n\n traverse(data, 0);\n return result;\n}\n\n// ─── Coordinate Helpers ───────────────────────────────────────────\n\n/**\n * Convert a pixel x-position on the timeline to a Date\n */\nexport function xToDate(\n x: number,\n timelineStart: Date,\n scaleConfig: GanttScaleConfig,\n): Date {\n const days = x / (scaleConfig.cellWidth * scaleConfig.slotsPerDay);\n return addDays(timelineStart, Math.floor(days));\n}\n\n/**\n * Convert a Date to a pixel x-position on the timeline\n */\nexport function dateToX(\n date: Date,\n timelineStart: Date,\n scaleConfig: GanttScaleConfig,\n): number {\n const days = daysBetween(timelineStart, date);\n return days * scaleConfig.cellWidth * scaleConfig.slotsPerDay;\n}\n\n/**\n * Clamp a number between min and max\n */\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n"],"mappings":";AAoBA,IAAa,IACX;CACE,MAAM;EAAE,OAAO;EAAQ,WAAW;EAAG,aAAa;CAAE;CACpD,SAAS;EAAE,OAAO;EAAW,WAAW;EAAG,aAAa;CAAE;CAC1D,OAAO;EAAE,OAAO;EAAS,WAAW;EAAI,aAAa;CAAE;CACvD,MAAM;EAAE,OAAO;EAAQ,WAAW;EAAI,aAAa;CAAE;CACrD,KAAK;EAAE,OAAO;EAAO,WAAW;EAAI,aAAa;CAAE;CACnD,SAAS;EAAE,OAAO;EAAY,WAAW;EAAI,aAAa;CAAE;CAC5D,MAAM;EAAE,OAAO;EAAQ,WAAW;EAAI,aAAa;CAAG;AACxD,GAEW,IAA+C;CAC1D,OAAO;CACP,iBAAiB;CACjB,WAAW;CACX,cAAc;CACd,cAAc;CACd,oBAAoB;CACpB,WAAW,KAAA;CACX,WAAW,KAAA;CACX,aAAa;AACf,GAEa,IAAkC;CAC7C,WAAW;CACX,SAAS;AACX;AAQA,SAAgB,EACd,GACa;CACb,IAAI,CAAC,GAAO,OAAO;CACnB,IAAI,aAAiB,MAAM,OAAO,MAAM,EAAM,QAAQ,CAAC,IAAI,OAAO;CAElE,IAAM,IAAM,OAAO,CAAK;CAGxB,IAAI,EAAI,SAAS,GAAG,KAAK,EAAI,SAAS,GAAG,KAAK,EAAI,SAAS,GAAG,GAAG;EAC/D,IAAM,IAAI,IAAI,KAAK,CAAG;EACtB,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAI,OAAO;CACrC;CAGA,IAAI,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