@squadbase/vantage 0.7.0-dev1.3b0e616 → 0.7.0-dev1.6e23119
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/{chunk-NYQJ5UY4.js → chunk-DULE4EDK.js} +2008 -273
- package/dist/chunk-DULE4EDK.js.map +1 -0
- package/dist/{chunk-TRMHNMMZ.js → chunk-LYUGDHSF.js} +3 -3
- package/dist/{chunk-TRMHNMMZ.js.map → chunk-LYUGDHSF.js.map} +1 -1
- package/dist/{chunk-QNOX7WLZ.js → chunk-MQUIAP66.js} +69 -4
- package/dist/chunk-MQUIAP66.js.map +1 -0
- package/dist/{chunk-2IAPIOPS.js → chunk-P2KIHF65.js} +2 -2
- package/dist/chunk-P2KIHF65.js.map +1 -0
- package/dist/{chunk-3RJEOP3J.js → chunk-XRKSIC5Z.js} +5 -3
- package/dist/chunk-XRKSIC5Z.js.map +1 -0
- package/dist/components/index.d.ts +276 -6
- package/dist/components/index.js +4 -4
- package/dist/{delta-text-CbrOaW83.d.ts → delta-text-tav2Lh5d.d.ts} +1 -1
- package/dist/doc/index.d.ts +2 -2
- package/dist/doc/index.js +4 -4
- package/dist/{format-DihQkL1N.d.ts → format-D34piCei.d.ts} +2 -1
- package/dist/slide/index.d.ts +2 -2
- package/dist/slide/index.js +3 -3
- package/dist/table/index.js +4 -5
- package/dist/table/index.js.map +1 -1
- package/dist/ui/index.js +2 -3
- package/dist/ui/index.js.map +1 -1
- package/docs/en/parts/draft-chart.md +42 -0
- package/docs/en/parts/page-shell.md +1 -1
- package/docs/index.json +68 -48
- package/docs/ja/parts/draft-chart.md +40 -0
- package/docs/ja/parts/page-shell.md +1 -1
- package/package.json +2 -2
- package/registry/parts.json +5214 -0
- package/registry/ui/chart-frame.tsx +8 -0
- package/registry/ui/combo-chart.tsx +2 -1
- package/registry/ui/dashboard-card.tsx +3 -1
- package/registry/ui/data-table.tsx +3 -1
- package/registry/ui/delta.tsx +3 -1
- package/registry/ui/filter-bar.tsx +3 -1
- package/registry/ui/forecast-chart.tsx +4726 -0
- package/registry/ui/funnel-steps.tsx +1 -1
- package/registry/ui/kpi-card.tsx +3 -1
- package/registry/ui/metric-value.tsx +2 -2
- package/registry/ui/page-shell.tsx +25 -4
- package/registry/ui/paired-chart.tsx +1 -1
- package/registry/ui/pivot-table.tsx +2 -1
- package/registry/ui/progress-circle.tsx +2 -2
- package/registry/ui/sparkline.tsx +1 -1
- package/registry/ui/treemap.tsx +2 -1
- package/dist/chunk-2IAPIOPS.js.map +0 -1
- package/dist/chunk-3RJEOP3J.js.map +0 -1
- package/dist/chunk-NYQJ5UY4.js.map +0 -1
- package/dist/chunk-NZ5QIIG4.js +0 -74
- package/dist/chunk-NZ5QIIG4.js.map +0 -1
- package/dist/chunk-QNOX7WLZ.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../squadkit/registry/lib/format.ts"],"names":[],"mappings":";;;;;AAqDA,IAAM,eAAe,CAAC,QAAA,EAAU,WAAW,UAAA,EAAY,SAAA,EAAW,YAAY,UAAU,CAAA;AAuCjF,IAAM,cAAA,GAAiB;AAGvB,IAAM,WAAA,GAAc;AAGpB,IAAM,UAAA,GAAa;AAGnB,IAAM,cAAA,GAAiB,CAAA;AAE9B,IAAM,eAAA,GAAkB,MAAA;AAExB,IAAM,aAAA,GAAgB,IAAA;AAYtB,SAAS,UAAU,MAAA,EAAmD;AACpE,EAAA,IAAI,MAAA,KAAW,MAAA,EAAW,OAAO,EAAE,MAAM,SAAA,EAAU;AACnD,EAAA,MAAM,IAAI,OAAO,MAAA,KAAW,WAAW,EAAE,IAAA,EAAM,QAAO,GAAI,MAAA;AAE1D,EAAA,OAAQ,YAAA,CAAoC,QAAA,CAAS,CAAA,EAAG,IAAI,CAAA,GAAI,IAAI,EAAE,GAAG,CAAA,EAAG,IAAA,EAAM,SAAA,EAAU;AAC9F;AAeO,SAAS,WAAW,MAAA,EAA6C;AACtE,EA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AAA;AAAA,IAAwE,CAAC,KAAA,EAAO,EAAA,EAAI,EAAA,EAAI,GAAA,KAC1G,WAAW,KAAA,EAAO,GAAA,GAAM,MAAA,GAAS,YAAA,EAAc,QAAQ;AAAA,GACzD;AACF","file":"chunk-XRKSIC5Z.js","sourcesContent":["import { defaultCurrency, FALLBACK_LOCALE, resolveLocale, uiLanguage } from \"./locale\"\n\n/**\n * Locale-aware number formatting shared by KPI cards, tables and charts. All\n * shortening is delegated to `Intl.NumberFormat` (`notation: \"compact\"`); this\n * module never hard-codes unit thresholds or unit strings.\n *\n * Outputs below are for ja-JP (`<html lang=\"ja\">`); en-US reads `48.2M`, `$48.2M`, `3 h 20 min`, `10/20/2026`.\n *\n * | `format` | input | ja-JP output |\n * |--------------------------------------------|--------------|----------------|\n * | `\"compact\"` (default) | `48_200_000` | `4,820万` |\n * | `\"number\"` | `1234.567` | `1,234.57` |\n * | `\"currency\"` (JPY, compact) | `48_200_000` | `¥4,820万` |\n * | `{ type: \"currency\", notation: \"standard\" }` | `48_200_000` | `¥48,200,000` |\n * | `{ type: \"currency\", currency: \"USD\" }` | `1234.5` | `$1,234.5` |\n * | `\"percent\"` — pass a **ratio** | `0.124` | `12.4%` |\n * | `{ type: \"percent\", digits: 0 }` | `0.124` | `12%` |\n * | `\"multiple\"` | `1.5` | `1.5×` |\n * | `{ type: \"number\", unit: \"件\" }` | `48_210` | `48,210件` |\n * | `{ type: \"compact\", unit: \"人\" }` | `12_345` | `1.2万人` |\n * | `\"duration\"` — pass **seconds** | `12_000` | `3時間20分` |\n * | `{ type: \"duration\", durationUnit: \"minute\" }` | `2160` | `1.5日` |\n *\n * - `percent` takes a ratio (0.124 → 12.4%). Passing 12.4 renders 1,240%. The fraction\n * digits are **fixed**, never trimmed (`PERCENT_DIGITS` = 1: 0.14 → \"14.0%\", never \"14%\"\n * beside \"11.9%\"). Pass `digits` in the format to share another count across cards.\n * - A minus sign is always U+2212 (`MINUS_SIGN`, \"−1,234\" / \"−5.0%\"), never the hyphen-minus.\n * - `currency` defaults to JPY in ja (USD otherwise) and to compact notation (万・億 in ja, K・M・B in en); pass\n * `notation: \"standard\"` for every digit (tables, invoices). In ja-JP the yen\n * sign is the half-width `¥`.\n * - `unit` is a counter appended right after the number, with no space\n * (\"48,210件\", \"1.2万人\"), for `number` / `compact` / `currency`. It is\n * ignored for `percent` and `duration`, and for `multiple` it replaces the\n * default `×` (\"2.7倍\"). Do not write it into a `valueFormatter` by hand.\n * - Charts take the same `format` a KpiCard takes (`format=\"currency\"`).\n * `toValueFormatter(format)` turns it into a function for places that need\n * one (a `valueFormatter`, table cells).\n * - Missing values (null / undefined / NaN) render as `—` (`EMPTY_VALUE`).\n * - Without a `locale`, every function here uses the page's (`<html lang>`, else `\"en-US\"`).\n * - Dates go through `formatDate` (`Intl.DateTimeFormat`): `\"date\"` → `2026/10/20`,\n * `\"datetime\"` → `2026/10/20 14:30`, `\"year-month\"` → `2026年10月`, `\"month\"` → `10月`,\n * `\"year\"` → `2026年`.\n * - A period goes through `formatDateRange`: `2026/9/23〜10/20` (same year drops the end year),\n * `2025/12/20〜2026/1/18` across years; month and day are not zero-padded.\n */\n\n/**\n * The kind of number a value is. Pick by what the number means, not by how\n * long it is: `currency` for money, `percent` for a ratio, `multiple` for a\n * factor (\"1.5×\"), `duration` for a length of time (\"3時間20分\"), `number` for\n * exact counts in tables, `compact` (default) for large headline counts (万・億).\n */\nconst FORMAT_KINDS = [\"number\", \"compact\", \"currency\", \"percent\", \"multiple\", \"duration\"] as const\nexport type FormatKind = (typeof FORMAT_KINDS)[number]\n\n/** The unit a `duration` value is measured in. */\nexport type DurationUnit = \"second\" | \"minute\" | \"hour\" | \"day\"\n\n/**\n * How to display a number: a `FormatKind` alone, or an object for digits,\n * currency, notation and a counter. The same value is accepted by KpiCard,\n * Delta, the charts (`format`) and `formatValue`.\n *\n * @example\n * \"currency\" // ¥4,820万\n * { type: \"currency\", notation: \"standard\" } // ¥48,200,000\n * { type: \"percent\", digits: 1 } // 2.0%\n * { type: \"number\", unit: \"件\" } // 48,210件\n */\nexport type ValueFormat =\n | FormatKind\n | {\n type: FormatKind\n /** Fixed number of fraction digits. */\n digits?: number\n /** ISO 4217 code for `currency`. Default `\"JPY\"` when the locale is ja, else `\"USD\"`. */\n currency?: string\n /** `currency` only: `\"compact\"` (default, 万・億) or `\"standard\"` (every digit). */\n notation?: \"compact\" | \"standard\"\n /** Counter appended after the number, e.g. `\"件\"`, `\"人\"`. Ignored for `percent` and `duration`. For `multiple` it replaces the default `×` (`\"倍\"` → `2.7倍`). */\n unit?: string\n /** 値をこの数で割ってから整形する。例: `divisor: 100`(セント → ドル)。0 と非有限は無視。 */\n divisor?: number\n /** `duration` only: the unit the value is in. Default `\"second\"`. Reads as \"45秒\" / \"12分\" / \"3時間20分\" / \"1.5日\" (`digits` sets the fraction digits of days). */\n durationUnit?: DurationUnit\n }\n\n/**\n * The fallback locale (`\"en-US\"`). A function given no `locale` uses the page's (`<html lang>`) and falls back to\n * this one when there is none (SSR, no `lang`). Every function here takes a `locale` to override it.\n */\nexport const DEFAULT_LOCALE = FALLBACK_LOCALE\n\n/** Shown in place of a missing value (null / undefined / NaN). */\nexport const EMPTY_VALUE = \"—\"\n\n/** The minus sign every formatter writes (U+2212), so a negative never mixes with a hyphen-minus. */\nexport const MINUS_SIGN = \"\\u2212\"\n\n/** Fraction digits of a `percent` value (and of the points in `formatPoints`) when `digits` is not given. Fixed, never trimmed. */\nexport const PERCENT_DIGITS = 1\n\nconst MULTIPLE_SUFFIX = \"×\"\n/** Suffix for a difference between two rates, in percentage points. */\nconst POINTS_SUFFIX = \"pt\"\n\n/** Extra options for `formatValue`. */\nexport interface FormatValueOptions {\n /** `\"auto\"` (default) signs negatives only; `\"exceptZero\"` also writes `+` on positives (for differences). */\n signDisplay?: \"auto\" | \"exceptZero\"\n /** Round to this many significant digits (e.g. 3 for an estimate: 79,653,985 → 7,970万). */\n significantDigits?: number\n}\n\ntype NormalizedFormat = Exclude<ValueFormat, FormatKind>\n\nfunction normalize(format: ValueFormat | undefined): NormalizedFormat {\n if (format === undefined) return { type: \"compact\" }\n const f = typeof format === \"string\" ? { type: format } : format\n // a mistyped kind must not throw while a draft is still being filled in\n return (FORMAT_KINDS as readonly unknown[]).includes(f?.type) ? f : { ...f, type: \"compact\" }\n}\n\n/**\n * The kind of a format, whether it was given as a string or an object. Use it\n * to branch on the meaning of a metric (e.g. a `percent` metric compares in\n * points) without unpacking `ValueFormat` yourself.\n *\n * @param format - The format as a KpiCard / chart takes it. `undefined` means the default.\n * @returns The `FormatKind`; `\"compact\"` when `format` is omitted.\n *\n * @example\n * formatKind(\"percent\") // \"percent\"\n * formatKind({ type: \"currency\", notation: \"standard\" }) // \"currency\"\n * formatKind(undefined) // \"compact\"\n */\nexport function formatKind(format: ValueFormat | undefined): FormatKind {\n return normalize(format).type\n}\n\nfunction digitOptions(\n digits: number | undefined,\n defaultMax: number | undefined,\n significantDigits: number | undefined,\n): Intl.NumberFormatOptions {\n if (significantDigits !== undefined) return { maximumSignificantDigits: significantDigits }\n if (digits !== undefined) return { minimumFractionDigits: digits, maximumFractionDigits: digits }\n return defaultMax === undefined ? {} : { maximumFractionDigits: defaultMax }\n}\n\n/**\n * Format through Intl, letting Intl decide whether the number is large enough to\n * shorten. Shortened numbers keep digit grouping (\"7,965万\"), and the full-width\n * currency sign some locales emit (\"¥\") is folded to its half-width form (\"¥\").\n */\nfunction formatParts(locale: string, options: Intl.NumberFormatOptions, value: number): string {\n if (options.notation === \"compact\") {\n const compact = new Intl.NumberFormat(locale, {\n ...options,\n useGrouping: \"always\" as unknown as boolean,\n }).formatToParts(value)\n if (!compact.some((p) => p.type === \"compact\")) return formatParts(locale, { ...options, notation: \"standard\" }, value)\n return joinParts(compact)\n }\n return joinParts(new Intl.NumberFormat(locale, options).formatToParts(value))\n}\n\nconst joinParts = (parts: Intl.NumberFormatPart[]): string =>\n parts\n .map((p) => (p.type === \"currency\" ? p.value.normalize(\"NFKC\") : p.type === \"minusSign\" ? MINUS_SIGN : p.value))\n .join(\"\")\n\n/**\n * Format a number for display — KPI values, table cells, chart labels and\n * sentences built from data (titles, summaries). See the table at the top of\n * this module.\n *\n * @param value - The number. `null` / `undefined` / `NaN` render as `—`.\n * For `percent`, a ratio (0.124 means 12.4%).\n * @param format - How to display it. Default `\"compact\"`.\n * @param locale - BCP 47 locale. Default: the page's (`<html lang>`, else `\"en-US\"`).\n * @param options - `signDisplay` and `significantDigits` (rounding for estimates).\n * @returns The display string. In ja-JP the yen sign is the half-width `¥`.\n *\n * @example\n * formatValue(48_200_000, \"currency\") // \"¥4,820万\"\n * formatValue(48_200_000, { type: \"currency\", notation: \"standard\" }) // \"¥48,200,000\"\n * formatValue(0.021, \"percent\") // \"2.1%\"\n * formatValue(0.124, \"percent\", \"ja-JP\", { signDisplay: \"exceptZero\" }) // \"+12.4%\"\n * formatValue(79_653_985, \"currency\", \"ja-JP\", { significantDigits: 3 }) // \"¥7,970万\"\n * formatValue(48_210, { type: \"number\", unit: \"件\" }) // \"48,210件\"\n * formatValue(1.5, \"multiple\") // \"1.5×\"\n * formatValue(null) // \"—\"\n */\nexport function formatValue(\n value: number | null | undefined,\n format?: ValueFormat,\n locale?: string,\n options?: FormatValueOptions,\n): string {\n if (value === null || value === undefined || Number.isNaN(value)) return EMPTY_VALUE\n locale = resolveLocale(locale)\n const { type, digits, currency, notation, unit, divisor, durationUnit } = normalize(format)\n if (divisor !== undefined && Number.isFinite(divisor) && divisor !== 0) value = value / divisor\n const signDisplay = options?.signDisplay ?? \"auto\"\n const sig = options?.significantDigits\n const withUnit = (s: string) => (unit ? `${s}${unit}` : s)\n\n switch (type) {\n case \"number\":\n return withUnit(formatParts(locale, { ...digitOptions(digits, 2, sig), signDisplay }, value))\n case \"percent\":\n return formatParts(locale, { style: \"percent\", ...digitOptions(digits ?? PERCENT_DIGITS, undefined, sig), signDisplay }, value)\n case \"currency\":\n return withUnit(\n formatParts(\n locale,\n {\n style: \"currency\",\n currency: currency ?? defaultCurrency(locale),\n notation: notation ?? \"compact\",\n ...digitOptions(digits, notation === \"standard\" ? undefined : 1, sig),\n // Compact amounts drop the currency's own minimum fraction digits outside ja (\"$50M\", not \"$50.0M\").\n ...(notation !== \"standard\" && digits === undefined && sig === undefined && uiLanguage(locale) !== \"ja\"\n ? { minimumFractionDigits: 0 }\n : {}),\n signDisplay,\n },\n value,\n ),\n )\n case \"multiple\":\n return `${formatParts(locale, { ...digitOptions(digits, 2, sig), signDisplay }, value)}${unit || MULTIPLE_SUFFIX}`\n case \"compact\":\n return withUnit(formatParts(locale, { ...digitOptions(digits, 1, sig), signDisplay, notation: \"compact\" }, value))\n case \"duration\":\n return formatDuration(value, durationUnit ?? \"second\", locale, digits, signDisplay)\n }\n}\n\nconst SECONDS_PER: Record<DurationUnit, number> = { second: 1, minute: 60, hour: 3600, day: 86_400 }\n\n/**\n * Unit words and spacing: Japanese reads \"3時間20分\" (no space, like \"48,210件\"),\n * other locales \"3 h 20 min\".\n */\nconst DURATION_WORDS = {\n ja: { day: \"日\", hour: \"時間\", minute: \"分\", second: \"秒\", sep: \"\" },\n en: { day: \"d\", hour: \"h\", minute: \"min\", second: \"s\", sep: \" \" },\n}\n\nfunction durationWords(locale: string) {\n return DURATION_WORDS[uiLanguage(locale)]\n}\n\n/**\n * A length of time in the largest sensible unit: under a minute in seconds, under\n * an hour in minutes (+ seconds), under a day in hours + minutes, from a day on\n * in days with a decimal (\"1.5日\"). Rounded before splitting, so 59.6 minutes\n * never reads \"59分60秒\".\n */\nfunction formatDuration(\n value: number,\n unit: DurationUnit,\n locale: string,\n digits: number | undefined,\n signDisplay: \"auto\" | \"exceptZero\",\n): string {\n const w = durationWords(locale)\n const abs = Math.round(Math.abs(value) * SECONDS_PER[unit])\n const join = (...parts: Array<[number, string]>) =>\n parts\n .filter(([n]) => n !== 0)\n .map(([n, u]) => `${n}${w.sep}${u}`)\n .join(w.sep) || `0${w.sep}${parts.at(-1)?.[1] ?? w.second}`\n let body: string\n let zero = false\n if (abs >= 86_400) {\n const days = new Intl.NumberFormat(locale, { maximumFractionDigits: digits ?? 1, minimumFractionDigits: digits ?? 0 })\n body = `${days.format(abs / 86_400)}${w.sep}${w.day}`\n } else if (abs >= 3600) {\n const minutes = Math.round(abs / 60)\n body = join([Math.floor(minutes / 60), w.hour], [minutes % 60, w.minute])\n } else if (abs >= 60) {\n body = join([Math.floor(abs / 60), w.minute], [abs % 60, w.second])\n } else {\n zero = abs === 0\n body = `${abs}${w.sep}${w.second}`\n }\n const sign = zero ? \"\" : value < 0 ? MINUS_SIGN : signDisplay === \"exceptZero\" ? \"+\" : \"\"\n return `${sign}${body}`\n}\n\n/**\n * Like `formatValue`, but always signed (except zero) — for a difference\n * between two values (\"+¥530万\", \"−120件\"). Use `formatPoints` instead for a\n * difference between two rates.\n *\n * @param value - The difference (current − previous). Missing values render as `—`.\n * @param format - Format of the metric itself. Default `\"compact\"`.\n * @param locale - BCP 47 locale. Default: the page's (`<html lang>`, else `\"en-US\"`).\n * @returns The signed display string; zero has no sign.\n *\n * @example\n * formatDelta(5_300_000, \"currency\") // \"+¥530万\"\n * formatDelta(-120, { type: \"number\", unit: \"件\" }) // \"−120件\"\n * formatDelta(0.031, \"percent\") // \"+3.1%\"\n * formatDelta(0, \"currency\") // \"¥0\"\n */\nexport function formatDelta(value: number | null | undefined, format?: ValueFormat, locale?: string): string {\n return formatValue(value, format, locale, { signDisplay: \"exceptZero\" })\n}\n\n/**\n * A difference between two rates in percentage points, always signed:\n * `formatPoints(0.021 - 0.026)` → `\"−0.5pt\"`. Use it instead of a relative\n * change for rate metrics (churn, conversion), where \"−19.2%\" reads as a drop\n * of nineteen points. `signDisplay: \"never\"` drops the sign (\"あと 0.5pt\").\n *\n * @param difference - The difference of two **ratios** (0.021 − 0.026). Missing values render as `—`.\n * @param locale - BCP 47 locale. Default: the page's (`<html lang>`, else `\"en-US\"`).\n * @param options - `digits`: fixed fraction digits (default `PERCENT_DIGITS` = 1, so \"0.0pt\" / \"+0.5pt\"); `signDisplay`:\n * `\"exceptZero\"` (default) or `\"never\"` when the sentence already says the direction.\n * @returns The difference in points with the `pt` suffix.\n *\n * @example\n * formatPoints(0.021 - 0.026) // \"−0.5pt\"\n * formatPoints(0.031 - 0.026) // \"+0.5pt\"\n * formatPoints(0.02 - 0.015, \"ja-JP\", { signDisplay: \"never\" }) // \"0.5pt\"(「目標まであと 0.5pt」)\n */\nexport function formatPoints(\n difference: number | null | undefined,\n locale?: string,\n options?: { digits?: number; signDisplay?: \"exceptZero\" | \"never\" },\n): string {\n if (difference === null || difference === undefined || Number.isNaN(difference)) return EMPTY_VALUE\n const digits = options?.digits ?? PERCENT_DIGITS\n const number = formatParts(\n resolveLocale(locale),\n { minimumFractionDigits: digits, maximumFractionDigits: digits, signDisplay: options?.signDisplay ?? \"exceptZero\" },\n difference * 100,\n )\n return `${number}${POINTS_SUFFIX}`\n}\n\n/**\n * Binds a format and locale into a single-argument formatter, for a chart\n * `valueFormatter` or a table cell: `valueFormatter={toValueFormatter(\"currency\")}`.\n * Prefer passing `format` to the chart directly; this is for APIs that only\n * take a function.\n *\n * @param format - How to display each value. Default `\"compact\"`.\n * @param locale - BCP 47 locale. Default: the page's (`<html lang>`, else `\"en-US\"`), read when the formatter is made.\n * @returns `(value) => string`, rendering missing values as `—`.\n *\n * @example\n * const yen = toValueFormatter(\"currency\")\n * yen(48_200_000) // \"¥4,820万\"\n * yen(null) // \"—\"\n * const count = toValueFormatter({ type: \"number\", unit: \"件\" })\n * count(48_210) // \"48,210件\"(表のセル)\n */\nexport function toValueFormatter(\n format?: ValueFormat,\n locale?: string,\n): (value: number | null | undefined) => string {\n const resolved = resolveLocale(locale)\n return (value) => formatValue(value, format, resolved)\n}\n\n/**\n * 日付の書式。何を表す日付かで選ぶ: 日単位は `\"date\"`、時刻まで要るなら `\"datetime\"`、\n * 月次の集計は `\"year-month\"`(年をまたぐ軸)か `\"month\"`(同じ年の中の軸)、年次は `\"year\"`。\n */\nexport type DateStyle = \"date\" | \"datetime\" | \"month\" | \"year-month\" | \"year\"\n\n/** `formatDate` の追加オプション。 */\nexport interface FormatDateOptions {\n /**\n * IANA のタイムゾーン名(例: `\"Asia/Tokyo\"`)。既定は実行環境のタイムゾーン。\n * サーバーとブラウザで描画が食い違う(SSR)なら固定する。日付だけの文字列(`\"2026-10-20\"`)には効かず、常にその暦日のまま出す。\n */\n timeZone?: string\n}\n\nconst DATE_STYLE_OPTIONS: Record<DateStyle, Intl.DateTimeFormatOptions> = {\n date: { year: \"numeric\", month: \"2-digit\", day: \"2-digit\" },\n datetime: { year: \"numeric\", month: \"2-digit\", day: \"2-digit\", hour: \"2-digit\", minute: \"2-digit\", hourCycle: \"h23\" },\n month: { month: \"short\" },\n \"year-month\": { year: \"numeric\", month: \"long\" },\n year: { year: \"numeric\" },\n}\n\n/** `\"2026-10-20\"` / `\"2026-10\"` はタイムゾーンを持たない暦日。UTC で解釈して UTC で出し、ずれを防ぐ。 */\nconst CALENDAR_DATE = /^\\d{4}-\\d{2}(-\\d{2})?$/\n\n/**\n * 日付を表示用の文字列にする。表のセル・タイトル・文に埋める日付に使い、`toLocaleString` や手組みの\n * `getMonth() + 1` は使わない。\n *\n * @param value - `Date`、エポックミリ秒、または日付文字列(`\"2026-10-20\"`、ISO 8601)。`null` / `undefined` / 解釈できない値は `—`。\n * @param style - 何を表す日付か。既定 `\"date\"`。\n * @param locale - BCP 47 ロケール。既定はページのロケール(`<html lang>`、無ければ `\"en-US\"`)。\n * @param options - `timeZone`。\n * @returns 表示文字列。\n *\n * @example\n * formatDate(\"2026-10-20\") // \"2026/10/20\"\n * formatDate(new Date(\"2026-10-20T05:30:00Z\"), \"datetime\", \"ja-JP\", { timeZone: \"Asia/Tokyo\" }) // \"2026/10/20 14:30\"\n * formatDate(\"2026-10-01\", \"year-month\") // \"2026年10月\"\n * formatDate(\"2026-10-01\", \"month\") // \"10月\"\n * formatDate(null) // \"—\"\n */\nexport function formatDate(\n value: Date | string | number | null | undefined,\n style: DateStyle = \"date\",\n locale?: string,\n options?: FormatDateOptions,\n): string {\n if (value === null || value === undefined || value === \"\") return EMPTY_VALUE\n const calendar = typeof value === \"string\" && CALENDAR_DATE.test(value)\n const date = value instanceof Date ? value : new Date(value)\n if (!Number.isFinite(date.getTime())) return EMPTY_VALUE\n return new Intl.DateTimeFormat(resolveLocale(locale), {\n ...DATE_STYLE_OPTIONS[style],\n timeZone: calendar ? \"UTC\" : options?.timeZone,\n }).format(date)\n}\n\nconst RANGE_SEPARATOR = { ja: \"〜\", en: \" – \" }\n\n/** `formatDateRange` のオプション。 */\nexport interface FormatDateRangeOptions extends FormatDateOptions {\n /** BCP 47 ロケール。既定はページのロケール(`<html lang>`、無ければ `\"en-US\"`)。 */\n locale?: string\n}\n\n/**\n * 期間を「2026/9/23〜10/20」の形にする。同じ年なら終了側の年を省き、年をまたぐときは両方に付ける。\n * 月日はゼロ詰めしない。区切りは日本語で「〜」、それ以外のロケールでは「 – 」。始まりと終わりが同じ日なら 1 日だけ出す。\n *\n * @param start - 期間の最初の日(`Date`、エポックミリ秒、日付文字列)。`\"2026-09-23\"` のような日付だけの文字列はその暦日のまま出す。\n * @param end - 期間の最後の日。\n * @param options - `locale` と `timeZone`。\n * @returns 表示文字列。どちらかが解釈できなければ `—`。\n *\n * @example\n * formatDateRange(\"2026-09-23\", \"2026-10-20\") // \"2026/9/23〜10/20\"\n * formatDateRange(\"2025-12-20\", \"2026-01-18\") // \"2025/12/20〜2026/1/18\"\n */\nexport function formatDateRange(\n start: Date | string | number | null | undefined,\n end: Date | string | number | null | undefined,\n options?: FormatDateRangeOptions,\n): string {\n const locale = resolveLocale(options?.locale)\n const parse = (value: Date | string | number | null | undefined) => {\n if (value === null || value === undefined || value === \"\") return null\n const calendar = typeof value === \"string\" && CALENDAR_DATE.test(value)\n const date = value instanceof Date ? value : new Date(value)\n if (!Number.isFinite(date.getTime())) return null\n return { date, timeZone: calendar ? \"UTC\" : options?.timeZone }\n }\n const a = parse(start)\n const b = parse(end)\n if (!a || !b) return EMPTY_VALUE\n const full = (x: NonNullable<typeof a>, withYear: boolean) =>\n new Intl.DateTimeFormat(locale, {\n ...(withYear ? { year: \"numeric\" } : {}),\n month: \"numeric\",\n day: \"numeric\",\n timeZone: x.timeZone,\n } as Intl.DateTimeFormatOptions).format(x.date)\n const year = (x: NonNullable<typeof a>) =>\n new Intl.DateTimeFormat(\"en-US\", { year: \"numeric\", timeZone: x.timeZone }).format(x.date)\n const startText = full(a, true)\n const sameYear = year(a) === year(b)\n const endFull = full(b, true)\n if (startText === endFull) return startText\n const separator = RANGE_SEPARATOR[uiLanguage(locale)]\n return `${startText}${separator}${sameYear ? full(b, false) : endFull}`\n}\n\n/**\n * 文中の ISO の年月・日付(`2023-04`、`2026-10-20`)を `formatDate` の書式に置き換える。期間や出典の注記のように、\n * 利用者が文字列で渡す文に日付が混ざるときの表示用(`\"2023-04 以降\"` → `\"2023年4月 以降\"`)。日付でない数字は触らない。\n *\n * @param text - 日付を含みうる文。\n * @param locale - BCP 47 ロケール。既定はページのロケール(`<html lang>`、無ければ `\"en-US\"`)。\n * @returns ISO の年月は `\"year-month\"`、年月日は `\"date\"` で整形した文。\n */\nexport function formatDatesInText(text: string, locale?: string): string {\n const resolved = resolveLocale(locale)\n return text.replace(/(?<![\\d-])(\\d{4})-(0[1-9]|1[0-2])(-(0[1-9]|[12]\\d|3[01]))?(?![\\d-])/g, (match, _y, _m, day) =>\n formatDate(match, day ? \"date\" : \"year-month\", resolved),\n )\n}\n"]}
|
|
@@ -4,8 +4,8 @@ import { HTMLAttributes, ReactNode, ComponentType, ElementType, Ref, ReactElemen
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import { EChartsOption } from 'echarts';
|
|
6
6
|
export { EChartsOption } from 'echarts';
|
|
7
|
-
import { V as ValueFormat, a as DateStyle } from '../format-
|
|
8
|
-
export { D as DEFAULT_LOCALE, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatKind, c as FormatValueOptions, M as MINUS_SIGN, f as formatDate, d as formatDateRange, e as formatDatesInText, g as formatDelta, h as formatKind, i as formatPoints, j as formatValue, t as toValueFormatter } from '../format-
|
|
7
|
+
import { V as ValueFormat, a as DateStyle } from '../format-D34piCei.js';
|
|
8
|
+
export { D as DEFAULT_LOCALE, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatKind, c as FormatValueOptions, M as MINUS_SIGN, f as formatDate, d as formatDateRange, e as formatDatesInText, g as formatDelta, h as formatKind, i as formatPoints, j as formatValue, t as toValueFormatter } from '../format-D34piCei.js';
|
|
9
9
|
import { RowData, ColumnDef, SortingState, OnChangeFn, ColumnFiltersState, PaginationState, RowSelectionState, VisibilityState, TableMeta, Table } from '@tanstack/react-table';
|
|
10
10
|
export { ColumnDef, ColumnFiltersState, PaginationState, RowSelectionState, SortingState, VisibilityState } from '@tanstack/react-table';
|
|
11
11
|
export { DateRange as RdpDateRange } from 'react-day-picker';
|
|
@@ -25,7 +25,11 @@ interface UpdatedAtProps {
|
|
|
25
25
|
}
|
|
26
26
|
declare const UpdatedAt: React.ForwardRefExoticComponent<UpdatedAtProps & React.RefAttributes<HTMLTimeElement>>;
|
|
27
27
|
|
|
28
|
-
interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
interface PageShellProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
29
|
+
/** The page heading. When given, the header (title and `description`) and the content area are drawn for you; `children` go in the content area. */
|
|
30
|
+
title?: string;
|
|
31
|
+
/** One line under the title. Used only with `title`. */
|
|
32
|
+
description?: string;
|
|
29
33
|
}
|
|
30
34
|
declare const PageShell: React.ForwardRefExoticComponent<PageShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
35
|
interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -1373,6 +1377,8 @@ interface ChartFrameProps extends Omit<HTMLAttributes<HTMLElement>, "title" | "c
|
|
|
1373
1377
|
plotRole?: "img" | "group";
|
|
1374
1378
|
/** 値の表。画面には出さず(`sr-only`)、スクリーンリーダー向けに図の中に置く。`chartDataTable` で作る。 */
|
|
1375
1379
|
dataTable?: ChartDataTable;
|
|
1380
|
+
/** プロットの下に常に出す小さな注記(近似値である旨など)。読み込み中・空のときも出す。 */
|
|
1381
|
+
footnote?: string;
|
|
1376
1382
|
/** プロット(チャート本体)。読み込み中・空のときは描かない。 */
|
|
1377
1383
|
children?: ReactNode;
|
|
1378
1384
|
}
|
|
@@ -1533,7 +1539,166 @@ declare const Heatmap: (<T extends Record<string, unknown>>(props: HeatmapProps<
|
|
|
1533
1539
|
};
|
|
1534
1540
|
|
|
1535
1541
|
/**
|
|
1536
|
-
*
|
|
1542
|
+
* PairedChart — 量(棒)と率・単価(線)を、同じ期間軸の上下 2 段で見せる型付きグラフ(`DashboardCardPreset` の中に置く)。
|
|
1543
|
+
* 二重 Y 軸は持たない: 上段が棒の値軸、下段が線の値軸で、横軸(期間)とツールチップの位置は
|
|
1544
|
+
* 1 つの ECharts の中で揃っている(ホバーすると同じ期間の棒と線の値が 1 枚のツールチップに出る)。
|
|
1545
|
+
* 段ごとに `format`(件数・金額・%)を持ち、率を分子・分母から計算することはしない(呼び元が値を渡す)。
|
|
1546
|
+
* 棒は 0 起点。色は `--chart-1..5` を固定順(棒 → 線の順に続く)で使い、ライト/ダークに追従する。
|
|
1547
|
+
* `ChartFrame` の中に描く(見出し・要約・読み込み中・空表示)。
|
|
1548
|
+
*/
|
|
1549
|
+
|
|
1550
|
+
/** 1 段ぶんの設定。 */
|
|
1551
|
+
interface PairedPanel<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
1552
|
+
/** この段に描く系列の列。 */
|
|
1553
|
+
categories: NumericKeys<T>[];
|
|
1554
|
+
/** 系列の色。省略時は `--chart-1..5` を固定順(上段の続きから下段)。 */
|
|
1555
|
+
colors?: ChartColors<T>;
|
|
1556
|
+
/** 値の書式(件数 `number`・金額 `currency`・率 `percent` など)。`percent` は比率(0.124 → 12.4%)を渡す。 */
|
|
1557
|
+
format?: ValueFormat;
|
|
1558
|
+
/** `format` で足りないときの自前の書式。 */
|
|
1559
|
+
valueFormatter?: ValueFormatter;
|
|
1560
|
+
/** 値軸の見出し(「売上」「客単価」など)。 */
|
|
1561
|
+
yAxisLabel?: string;
|
|
1562
|
+
/** 値軸の上限。データが超えるときは軸を広げる。 */
|
|
1563
|
+
maxValue?: number;
|
|
1564
|
+
}
|
|
1565
|
+
interface PairedChartProps<T extends Record<string, unknown> = Record<string, unknown>> extends Pick<ChartCommonProps<T>, "data" | "index" | "labels" | "title" | "summary" | "isLoading" | "emptyState" | "chartOptions" | "actions" | "fileName" | "className" | "ariaLabel"> {
|
|
1566
|
+
/** 上段。量を棒で。`type` は BarChart と同じ(`stacked` で積み上げ)。 */
|
|
1567
|
+
bars: PairedPanel<T> & {
|
|
1568
|
+
type?: CartesianStackType;
|
|
1569
|
+
};
|
|
1570
|
+
/** 下段。率・単価を線で。`fitToData` で値軸をデータに合わせる(率が狭い幅で動くとき)。 */
|
|
1571
|
+
line: PairedPanel<T> & {
|
|
1572
|
+
fitToData?: boolean;
|
|
1573
|
+
minValue?: number;
|
|
1574
|
+
};
|
|
1575
|
+
/** 全体の高さ(px)。既定 400。 */
|
|
1576
|
+
height?: number;
|
|
1577
|
+
/** 上段:下段の高さの比。既定 `[3, 2]`。 */
|
|
1578
|
+
heightRatio?: [number, number];
|
|
1579
|
+
/** 値軸ラベルの幅(px)。2 段の左端を揃える。既定 64。 */
|
|
1580
|
+
yAxisWidth?: number;
|
|
1581
|
+
showLegend?: boolean;
|
|
1582
|
+
showTooltip?: boolean;
|
|
1583
|
+
}
|
|
1584
|
+
/** Generic over the row type, so `index` / `categories` / `colors` keys are checked against `data`. */
|
|
1585
|
+
declare const PairedChart: (<T extends Record<string, unknown>>(props: PairedChartProps<T> & {
|
|
1586
|
+
ref?: Ref<HTMLDivElement>;
|
|
1587
|
+
}) => ReactElement) & {
|
|
1588
|
+
displayName?: string;
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
interface HistogramThreshold {
|
|
1592
|
+
/** 線を引く値(例 SLA の 3 日)。 */
|
|
1593
|
+
value: number;
|
|
1594
|
+
/** 線の名前(例「SLA」)。ツールチップ・要約・データ表の注記に出る。 */
|
|
1595
|
+
label?: string;
|
|
1596
|
+
}
|
|
1597
|
+
interface HistogramChartProps extends Omit<ChartCommonProps, "data" | "index" | "categories" | "colors" | "labels" | "summary"> {
|
|
1598
|
+
/** 生の値の配列。number か数値文字列。null・数にならない値は数えない。 */
|
|
1599
|
+
values: unknown[];
|
|
1600
|
+
/** 階級の幅。省略すると値の範囲から区切りのよい幅(1・2・2.5・5 × 10^n)を選ぶ。 */
|
|
1601
|
+
binWidth?: number;
|
|
1602
|
+
/** 階級の始まり。省略は幅の倍数に切り下げた最小値。 */
|
|
1603
|
+
start?: number;
|
|
1604
|
+
/** 上限。この値以上は 1 つの「<上限>以上」階級にまとめる。省略するとまとめない。 */
|
|
1605
|
+
max?: number;
|
|
1606
|
+
/** しきい値の線(任意)。階級の途中にも引ける。 */
|
|
1607
|
+
threshold?: HistogramThreshold;
|
|
1608
|
+
/** 件数の単位。既定は日本語のページで「件」、それ以外は単位なし。 */
|
|
1609
|
+
countUnit?: string;
|
|
1610
|
+
/** 横軸の値の名前(データ表の先頭列)。既定「値」。例「解決日数」 */
|
|
1611
|
+
valueLabel?: string;
|
|
1612
|
+
/** 1 文要約(自由文)。`"auto"` なら件数・最頻の階級・しきい値超えの割合を組む。省略時は要約なし。 */
|
|
1613
|
+
summary?: string | "auto";
|
|
1614
|
+
/** ホバー時のツールチップを出す。既定 `true`。 */
|
|
1615
|
+
showTooltip?: boolean;
|
|
1616
|
+
}
|
|
1617
|
+
declare const HistogramChart: React.ForwardRefExoticComponent<HistogramChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
1618
|
+
|
|
1619
|
+
interface BoxPlotGroup {
|
|
1620
|
+
/** 箱の名前(横軸)。 */
|
|
1621
|
+
name: string;
|
|
1622
|
+
/** 生の値の配列。number か数値文字列。null・数にならない値は数えない。 */
|
|
1623
|
+
values: unknown[];
|
|
1624
|
+
}
|
|
1625
|
+
interface BoxPlotChartProps extends Omit<ChartCommonProps, "data" | "index" | "categories" | "colors" | "labels" | "summary"> {
|
|
1626
|
+
/** 群ごとの値。並びがそのまま左から右の順。 */
|
|
1627
|
+
groups: BoxPlotGroup[];
|
|
1628
|
+
/** ひげの長さ(四分位範囲の何倍までを外れ値にしないか)。既定 1.5。 */
|
|
1629
|
+
whisker?: number;
|
|
1630
|
+
/** 値(縦軸)の名前。ツールチップとデータ表に出る。既定「値」。例「残業時間」 */
|
|
1631
|
+
valueLabel?: string;
|
|
1632
|
+
/** 1 文要約(自由文)。`"auto"` なら中央値が最大・最小の群と外れ値の数を組む。省略時は要約なし。 */
|
|
1633
|
+
summary?: string | "auto";
|
|
1634
|
+
/** ホバー時のツールチップを出す。既定 `true`。 */
|
|
1635
|
+
showTooltip?: boolean;
|
|
1636
|
+
}
|
|
1637
|
+
declare const BoxPlotChart: React.ForwardRefExoticComponent<BoxPlotChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
1638
|
+
|
|
1639
|
+
type AttentionKind = "overdue" | "risk" | "dueSoon" | "stale";
|
|
1640
|
+
type DateInput = Date | string | null | undefined;
|
|
1641
|
+
interface AttentionJudgement {
|
|
1642
|
+
kind: AttentionKind;
|
|
1643
|
+
/**
|
|
1644
|
+
* overdue: 期日を過ぎた日数(1 以上)/ dueSoon: 期日までの日数(0 = 当日)/
|
|
1645
|
+
* stale: 最終の動きからの日数/ risk: 0。
|
|
1646
|
+
*/
|
|
1647
|
+
days: number;
|
|
1648
|
+
}
|
|
1649
|
+
interface AttentionListProps<T> {
|
|
1650
|
+
rows: T[];
|
|
1651
|
+
/** 基準日(`"2026-10-23"` か Date)。 */
|
|
1652
|
+
asOf: Date | string;
|
|
1653
|
+
/** 期日の何日前から「期限間近」にするか。既定 7。 */
|
|
1654
|
+
dueSoonDays?: number;
|
|
1655
|
+
/** この日数動きがなければ「滞留」。未指定なら滞留は判定しない。 */
|
|
1656
|
+
staleDays?: number;
|
|
1657
|
+
/** 区分名の差し替え(例: `{ overdue: "入金遅れ" }`)。 */
|
|
1658
|
+
labels?: Partial<Record<AttentionKind, string>>;
|
|
1659
|
+
/** 行の ID。省略時は `idKey` の列、それも無ければ行の順番。 */
|
|
1660
|
+
getRowId?: (row: T) => string;
|
|
1661
|
+
/** 行の見出し(顧客名・案件名など)。省略時は `titleKey` の列、それも無ければ空。 */
|
|
1662
|
+
getTitle?: (row: T) => ReactNode;
|
|
1663
|
+
getDueDate?: (row: T) => DateInput;
|
|
1664
|
+
getLastActivityAt?: (row: T) => DateInput;
|
|
1665
|
+
/** リスクと判定する行。期日・滞留より先に出す。 */
|
|
1666
|
+
isRisk?: (row: T) => boolean;
|
|
1667
|
+
/** 行の ID の列名(JSON で書ける `getRowId`)。 */
|
|
1668
|
+
idKey?: string;
|
|
1669
|
+
/** 見出しの列名(JSON で書ける `getTitle`)。 */
|
|
1670
|
+
titleKey?: string;
|
|
1671
|
+
/** 期日の列名(JSON で書ける `getDueDate`)。値は `"2026-10-23"` 形式の日付か Date。 */
|
|
1672
|
+
dueDateKey?: string;
|
|
1673
|
+
/** 最後に動きがあった日の列名(JSON で書ける `getLastActivityAt`)。 */
|
|
1674
|
+
lastActivityAtKey?: string;
|
|
1675
|
+
/** リスクの列名(JSON で書ける `isRisk`)。値が真の行をリストにする。 */
|
|
1676
|
+
riskKey?: string;
|
|
1677
|
+
/** 次の一手の列名(JSON で書ける `getNextAction`)。値が空の行には添えない。 */
|
|
1678
|
+
nextActionKey?: string;
|
|
1679
|
+
/** 理由の文。省略すると区分と日数から作る。 */
|
|
1680
|
+
getReason?: (row: T, judgement: AttentionJudgement) => ReactNode;
|
|
1681
|
+
/** 次の一手。判定に当たる行に添える。 */
|
|
1682
|
+
getNextAction?: (row: T, judgement: AttentionJudgement) => ReactNode;
|
|
1683
|
+
/** 見出しの右に出す補足(金額・担当者など)。 */
|
|
1684
|
+
getMeta?: (row: T) => ReactNode;
|
|
1685
|
+
/** 行を押したとき。渡すと行が button になる。 */
|
|
1686
|
+
onRowClick?: (row: T) => void;
|
|
1687
|
+
/** 判定に当たらない行も末尾に出す。既定 false。 */
|
|
1688
|
+
includeUnflagged?: boolean;
|
|
1689
|
+
/** 該当なしのときの見出し・説明。 */
|
|
1690
|
+
emptyTitle?: string;
|
|
1691
|
+
emptyDescription?: string;
|
|
1692
|
+
className?: string;
|
|
1693
|
+
}
|
|
1694
|
+
declare function AttentionList<T>({ rows, asOf, dueSoonDays, staleDays, labels, getRowId, getTitle, getDueDate, getLastActivityAt, isRisk, idKey, titleKey, dueDateKey, lastActivityAtKey, riskKey, nextActionKey, getReason, getNextAction, getMeta, onRowClick, includeUnflagged, emptyTitle, emptyDescription, className, ...rest }: AttentionListProps<T> & Omit<HTMLAttributes<HTMLUListElement>, keyof AttentionListProps<T>>): React.JSX.Element;
|
|
1695
|
+
declare namespace AttentionList {
|
|
1696
|
+
var displayName: string;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* ComboChart — bars, lines and areas on one category / time axis, with up to two value axes (left and right); use it only to migrate a Tableau dual-axis sheet, and use `PairedChart` for a new dashboard.
|
|
1701
|
+
*
|
|
1537
1702
|
* It exists to reproduce a Tableau dual-axis sheet faithfully (a Pareto: sales as bars, the cumulative share as a
|
|
1538
1703
|
* line on the right). For a new dashboard prefer PairedChart, which stacks the two measures in panels over a
|
|
1539
1704
|
* shared axis instead of reading two scales off one plot.
|
|
@@ -1620,6 +1785,94 @@ declare const ComboChart: (<T extends Record<string, unknown>>(props: ComboChart
|
|
|
1620
1785
|
displayName?: string;
|
|
1621
1786
|
};
|
|
1622
1787
|
|
|
1788
|
+
/**
|
|
1789
|
+
* 等間隔の 1 系列に対する指数平滑法(ETS、誤差は加法)の予測。依存なしの純関数で、同じ入力には同じ出力を返す(乱数を使わない)。
|
|
1790
|
+
*
|
|
1791
|
+
* - モデルは トレンド(なし / 加法)× 季節(なし / 加法 / 乗法)。乗法トレンドは扱わず、加法トレンドとして当てはめる
|
|
1792
|
+
* (`model.trend` には実際に当てはめた `"additive"` が入る)。乗法トレンドの予測区間は閉じた式が無く、決定的に出せないため。
|
|
1793
|
+
* - 平滑化係数(α・β・γ)と初期の水準・傾きは、1 期先予測の残差平方和の最小化(誤差が加法なので最尤と同じ)を
|
|
1794
|
+
* Nelder–Mead で解く。範囲は 0 < α < 1、0 < β < α、0 < γ < 1 − α。初期の季節成分は古典的分解(最初の数季節の移動平均)で決める。
|
|
1795
|
+
* - `"auto"` は当てはめられる組み合わせをすべて当て、AICc が最小のものを選ぶ(Tableau も最大 8 モデルから AIC で選ぶ)。
|
|
1796
|
+
* - 予測区間は ETS(A,·,·) の分散の式(Hyndman ほか 2008 / fpp の表)で、点予測 ± z·σ·√(分散の倍率)。σ は残差から。
|
|
1797
|
+
* 乗法の季節は閉じた式が無いので、2 期先以降の項に季節指数の 2 乗を掛ける近似にしている。
|
|
1798
|
+
* - Tableau はパラメータの推定方法を公開していないため、同じモデルを選んでも値は一致しない(近似値として扱う)。
|
|
1799
|
+
*/
|
|
1800
|
+
/** トレンド・季節の指定。`"auto"` は当てはめられる候補から AICc で選ぶ。 */
|
|
1801
|
+
type ForecastComponent = "none" | "additive" | "multiplicative" | "auto";
|
|
1802
|
+
interface ForecastOptions {
|
|
1803
|
+
/** トレンド。既定 `"auto"`。`"multiplicative"` は加法トレンドとして当てはめる。 */
|
|
1804
|
+
trend?: ForecastComponent;
|
|
1805
|
+
/** 季節。既定 `"auto"`。`seasonLength` が 1 以下か、点が 2 季節分に満たないときは季節なしに落とす。 */
|
|
1806
|
+
season?: ForecastComponent;
|
|
1807
|
+
/** 1 季節の期数(月次 12・四半期 4・曜日 7)。省略か 1 で季節なし。 */
|
|
1808
|
+
seasonLength?: number;
|
|
1809
|
+
/**
|
|
1810
|
+
* 予測する期数。既定は季節ありなら 1 季節分(`seasonLength`)、なければ当てはめた点の 4 分の 1(1〜12 期)。
|
|
1811
|
+
* 末尾の除外期(`ignoreLast` と末尾の欠損)はこれとは別に予測する。
|
|
1812
|
+
*/
|
|
1813
|
+
horizon?: number;
|
|
1814
|
+
/** 予測区間の信頼水準(0〜1)。既定 0.95。 */
|
|
1815
|
+
confidence?: number;
|
|
1816
|
+
/** 末尾から除外する期数(締まっていない期)。当てはめに使わず、予測する側に回す。既定 0。 */
|
|
1817
|
+
ignoreLast?: number;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
/**
|
|
1821
|
+
* ForecastChart — a time-series line chart that continues each series with an exponential-smoothing forecast (dashed line and shaded prediction interval) computed from `data` at render time; place it inside `DashboardCardPreset`, and use it to migrate a Tableau forecast sheet.
|
|
1822
|
+
*
|
|
1823
|
+
* Pass the rows, the date column (`x`), the value column (`y`) and optionally a column that splits the rows into
|
|
1824
|
+
* series (`series`, e.g. a segment). Rows that fall in the same period and series are summed. The forecast is
|
|
1825
|
+
* recomputed on every change of the inputs (never stored or fetched) with the model family in `forecast`
|
|
1826
|
+
* (trend / season, `"auto"` picks the lowest AICc), so it is an approximation: the always-visible `forecastNote`
|
|
1827
|
+
* says so under the plot. A series with too few points draws its actuals only.
|
|
1828
|
+
*/
|
|
1829
|
+
|
|
1830
|
+
/** 予測の 1 期の長さ。未来の日付を進める単位。 */
|
|
1831
|
+
type ForecastPeriod = "day" | "week" | "month" | "quarter" | "year";
|
|
1832
|
+
interface ForecastChartProps<T extends Record<string, unknown> = Record<string, unknown>> extends Omit<ChartCommonProps<T>, "index" | "categories" | "colors"> {
|
|
1833
|
+
/** 日付の列名。ISO の日付・年月(`"2026-01"`)・年・`Date` を受ける。 */
|
|
1834
|
+
x: keyof T & string;
|
|
1835
|
+
/** 値の列名。number か数値文字列。 */
|
|
1836
|
+
y: keyof T & string;
|
|
1837
|
+
/** 系列に分ける列名(セグメントなど)。省略時は 1 系列。6 つ以上は合計の大きい 5 つ +「その他」にまとめる。 */
|
|
1838
|
+
series?: keyof T & string;
|
|
1839
|
+
/** 1 期の長さ。省略時は日付の間隔から推定する。同じ期に入る行は合計する。 */
|
|
1840
|
+
period?: ForecastPeriod;
|
|
1841
|
+
/**
|
|
1842
|
+
* 予測の設定(トレンド・季節・季節の長さ・期数・信頼水準・末尾の除外期)。`seasonLength` を省略すると `period` から
|
|
1843
|
+
* 決める(月 12・四半期 4・週 52・日 7・年は季節なし)。例: `forecast={{ trend: "additive", season: "additive", horizon: 12 }}`
|
|
1844
|
+
*/
|
|
1845
|
+
forecast?: ForecastOptions;
|
|
1846
|
+
/** 凡例・ツールチップ・境目の縦線に出す予測の呼び名。既定は表示言語の「予測」/ "Forecast"。 */
|
|
1847
|
+
forecastLabel?: string;
|
|
1848
|
+
/** プロットの下に常に出す注記。既定は表示言語の「近似値で、元のツールの値とは一致しない」旨の文。 */
|
|
1849
|
+
forecastNote?: string;
|
|
1850
|
+
/** 系列色。配列は系列の順、record は系列名ごと。省略時はトークン順。 */
|
|
1851
|
+
colors?: ChartColors;
|
|
1852
|
+
/** 凡例・ツールチップを出す。既定 `true`。 */
|
|
1853
|
+
showLegend?: boolean;
|
|
1854
|
+
showTooltip?: boolean;
|
|
1855
|
+
/** 値軸の目盛り線を出す。既定 `true`。 */
|
|
1856
|
+
showGridLines?: boolean;
|
|
1857
|
+
showXAxis?: boolean;
|
|
1858
|
+
showYAxis?: boolean;
|
|
1859
|
+
/** y 軸ラベルの幅(px)。 */
|
|
1860
|
+
yAxisWidth?: number;
|
|
1861
|
+
/** 値軸の下限・上限(データ・予測区間がはみ出すときは軸を広げる)。 */
|
|
1862
|
+
minValue?: number;
|
|
1863
|
+
maxValue?: number;
|
|
1864
|
+
/** 値軸を 0 からではなくデータに合わせる。既定 `false`。 */
|
|
1865
|
+
fitToData?: boolean;
|
|
1866
|
+
xAxisLabel?: string;
|
|
1867
|
+
yAxisLabel?: string;
|
|
1868
|
+
}
|
|
1869
|
+
/** Generic over the row type, so `x` / `y` / `series` are checked against `data`. */
|
|
1870
|
+
declare const ForecastChart: (<T extends Record<string, unknown>>(props: ForecastChartProps<T> & {
|
|
1871
|
+
ref?: Ref<HTMLDivElement>;
|
|
1872
|
+
}) => ReactElement) & {
|
|
1873
|
+
displayName?: string;
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1623
1876
|
/** The maps the parts draw. */
|
|
1624
1877
|
type GeoMapName = "japan" | "us" | "world";
|
|
1625
1878
|
|
|
@@ -1775,7 +2028,8 @@ declare const SymbolMap: (<T extends Record<string, unknown>>(props: SymbolMapPr
|
|
|
1775
2028
|
};
|
|
1776
2029
|
|
|
1777
2030
|
/**
|
|
1778
|
-
* Treemap — parts of a whole as nested rectangles whose areas are the values
|
|
2031
|
+
* Treemap — parts of a whole as nested rectangles whose areas are the values.
|
|
2032
|
+
* Pass rows, the leaf column (`index`),
|
|
1779
2033
|
* optionally a parent column (`group`, for two levels) and the number (`value`) instead of an ECharts option.
|
|
1780
2034
|
*
|
|
1781
2035
|
* Colour is categorical by `group` (or by `index` without one): `--chart-1..5` for the largest five, the rest the
|
|
@@ -2661,4 +2915,20 @@ interface SampleDataProps {
|
|
|
2661
2915
|
}
|
|
2662
2916
|
declare function SampleData({ label, children }: SampleDataProps): React.JSX.Element;
|
|
2663
2917
|
|
|
2664
|
-
|
|
2918
|
+
interface DraftChartProps {
|
|
2919
|
+
/** The proposed chart: one card (e.g. `DashboardCardPreset`), as it would sit in the page. */
|
|
2920
|
+
children: ReactElement;
|
|
2921
|
+
}
|
|
2922
|
+
/**
|
|
2923
|
+
* A chart proposed to the page that nobody has accepted yet. Accepting it removes the
|
|
2924
|
+
* `<DraftChart>` tags and keeps the child; removing it deletes the whole element. Both are
|
|
2925
|
+
* source edits made outside the framework — this component only decides what each build shows.
|
|
2926
|
+
*
|
|
2927
|
+
* - `vantage build` (published dashboards): renders nothing, so viewers never see a proposal.
|
|
2928
|
+
* - `vantage dev` (the editor preview): renders the child faded under the page background, and
|
|
2929
|
+
* marks the child's root element with `data-sq-draft` so the editor can find it and draw its
|
|
2930
|
+
* own controls over it. The component itself draws no buttons or text.
|
|
2931
|
+
*/
|
|
2932
|
+
declare function DraftChart({ children }: DraftChartProps): React.JSX.Element | null;
|
|
2933
|
+
|
|
2934
|
+
export { AppShell, type AppShellHeaderProps, type AppShellProps, type AppShellSidebarProps, AreaChart, type AreaChartProps, type AttentionKind, AttentionList, type AttentionListProps, BarChart, type BarChartProps, BarList, type BarListItem, type BarListOptions, type BarListProps, type BarListSortOrder, BoxPlotChart, type BoxPlotChartProps, type BoxPlotGroup, COMPARISON_LABELS, CategoryBar, type CategoryBarMarker, type CategoryBarProps, type ChangeDisplay, type ChartActionsOptions, type ChartAnnotation, type ChartColor, type ChartColorToken, type ChartColors, type ChartCommonProps, type ChartComparison, type ChartEmptyState, type ChartEventPayload, type ChartForecast, type ChartForecastRow, ChartFrame, type ChartFrameProps, type ChartHighlight, type ChartRootAttributes, type ChartSeriesColor, type ChartSkeletonVariant, type ChartThreshold, type ChartTone, type ComboAxis, ComboChart, type ComboChartProps, type ComboReferenceLine, type ComboSeries, type ComboSeriesType, type Comparison, type ComparisonKind, type ComparisonOptions, type ComparisonResult, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, type DashboardCardActionProps, DashboardCardContent, type DashboardCardContentProps, DashboardCardDescription, type DashboardCardDescriptionProps, DashboardCardFooter, type DashboardCardFooterProps, DashboardCardHeader, type DashboardCardHeaderProps, DashboardCardPreset, type DashboardCardPresetProps, type DashboardCardProps, DashboardCardSkeleton, type DashboardCardSkeletonProps, DashboardCardTitle, type DashboardCardTitleProps, DataTable, DataTableColumnVisibility, type DataTableColumnVisibilityProps, DataTableContent, type DataTableContentProps, DataTableExport, type DataTableExportProps, DataTablePagination, type DataTablePaginationProps, DataTablePreset, type DataTablePresetProps, type DataTableProps, DataTableToolbar, type DataTableToolbarProps, type DateRange, DateRangePicker, type DateRangePickerProps, DateStyle, Delta, type DeltaDirection, type DeltaProps, type DeltaSentiment, DonutChart, type DonutChartOptions, type DonutChartProps, type DonutVariant, DraftChart, type DraftChartProps, EChart, type EChartProps, FilledMap, type FilledMapName, type FilledMapProps, FilterBar, FilterBarActiveChips, type FilterBarActiveChipsProps, FilterBarClearButton, type FilterBarClearButtonProps, FilterBarMultiSelect, type FilterBarMultiSelectProps, FilterBarPreset, type FilterBarPresetProps, type FilterBarProps, FilterBarSelect, type FilterBarSelectProps, type FilterConfig, type FilterOption, type FilterType, type FilterValues, ForecastChart, type ForecastChartProps, type ForecastComponent, type ForecastOptions, type ForecastPeriod, type FunnelStep, FunnelSteps, type FunnelStepsProps, Heatmap, type HeatmapProps, HistogramChart, type HistogramChartProps, type HistogramThreshold, type HistoryGrain, KpiCard, type KpiCardProps, type KpiCardSource, type KpiPeriod, Legend, type LegendProps, LineChart, type LineChartProps, type MetricItem, MetricUnit, type MetricUnitProps, MetricValue, type MetricValueProps, type MetricVariant, MultiSelect, type MultiSelectProps, type NavGroup, type NavItem, type NumericKeys, PageShell, PageShellActions, type PageShellActionsProps, PageShellContent, type PageShellContentProps, PageShellDescription, type PageShellDescriptionProps, PageShellHeader, PageShellHeaderEnd, type PageShellHeaderEndProps, type PageShellHeaderProps, PageShellHeading, type PageShellHeadingProps, PageShellMeta, type PageShellMetaProps, type PageShellProps, PageShellSummary, PageShellSummaryCard, type PageShellSummaryCardProps, type PageShellSummaryProps, PageShellTitle, type PageShellTitleProps, PairedChart, type PairedChartProps, type PairedPanel, type PeriodGrain, PivotTable, type PivotTableProps, Placeholder, type PlaceholderProps, type Polarity, type PresetItem, ProgressCircle, type ProgressCircleProps, RECORD_MIN_POINTS, type RecordInsight, SampleBadge, type SampleBadgeProps, SampleClaim, SampleData, type SampleDataProps, ScatterChart, type ScatterChartProps, type ScatterReferenceLine, SearchableSelect, type SearchableSelectProps, SectionHeader, type SectionHeaderProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SelectOption, type SelectOptionGroup, type SelectOptions, Sparkline, type SparklineDataPoint, type SparklineProps, type SparklineVariant, StatusBadge, type StatusBadgeProps, SymbolMap, type SymbolMapBasemap, type SymbolMapProps, type TargetProgress, Tracker, type TrackerBlock, type TrackerProps, Treemap, type TreemapProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, UpdatedAt, type UpdatedAtProps, ValueFormat, type ValueFormatter, WaterfallChart, type WaterfallChartProps, type WaterfallMode, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useResolvedChartColors, useSampleMark };
|
package/dist/components/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AppShell, AreaChart, BarChart, BarList, COMPARISON_LABELS, CategoryBar, ChartFrame, ComboChart, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTableExport, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, Delta, DonutChart, FilledMap, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, FunnelSteps, Heatmap, KpiCard, Legend, LineChart, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, PivotTable, Placeholder, ProgressCircle, RECORD_MIN_POINTS, SampleBadge, SampleClaim, SampleData, ScatterChart, SearchableSelect, SectionHeader, SegmentedControl, StatusBadge, SymbolMap, Tracker, Treemap, TrendIndicator, UpdatedAt, WaterfallChart, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useSampleMark } from '../chunk-
|
|
1
|
+
export { AppShell, AreaChart, AttentionList, BarChart, BarList, BoxPlotChart, COMPARISON_LABELS, CategoryBar, ChartFrame, ComboChart, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTableExport, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, Delta, DonutChart, DraftChart, FilledMap, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, ForecastChart, FunnelSteps, Heatmap, HistogramChart, KpiCard, Legend, LineChart, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, PairedChart, PivotTable, Placeholder, ProgressCircle, RECORD_MIN_POINTS, SampleBadge, SampleClaim, SampleData, ScatterChart, SearchableSelect, SectionHeader, SegmentedControl, StatusBadge, SymbolMap, Tracker, Treemap, TrendIndicator, UpdatedAt, WaterfallChart, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useSampleMark } from '../chunk-DULE4EDK.js';
|
|
2
2
|
export { EChart, useResolvedChartColors } from '../chunk-EG4PX726.js';
|
|
3
|
-
export { Sparkline } from '../chunk-
|
|
4
|
-
export { DEFAULT_LOCALE, EMPTY_VALUE, MINUS_SIGN, formatDate, formatDateRange, formatDatesInText, formatDelta, formatKind, formatPoints, formatValue, toValueFormatter } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
export { Sparkline } from '../chunk-P2KIHF65.js';
|
|
4
|
+
export { DEFAULT_LOCALE, EMPTY_VALUE, MINUS_SIGN, formatDate, formatDateRange, formatDatesInText, formatDelta, formatKind, formatPoints, formatValue, toValueFormatter } from '../chunk-XRKSIC5Z.js';
|
|
5
|
+
import '../chunk-MQUIAP66.js';
|
|
6
6
|
import '../chunk-ROHNXP7J.js';
|
|
7
7
|
import '../chunk-U736PVHY.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/dist/doc/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import { V as ValueFormat } from '../format-
|
|
4
|
-
export { D as DeltaText, a as DeltaTextProps } from '../delta-text-
|
|
3
|
+
import { V as ValueFormat } from '../format-D34piCei.js';
|
|
4
|
+
export { D as DeltaText, a as DeltaTextProps } from '../delta-text-tav2Lh5d.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Per-document token overrides. Anything left out falls through to `--doc-*`
|
package/dist/doc/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DeltaText } from '../chunk-
|
|
2
|
-
export { DeltaText } from '../chunk-
|
|
3
|
-
import { Sparkline } from '../chunk-
|
|
4
|
-
import { formatValue } from '../chunk-
|
|
1
|
+
import { DeltaText } from '../chunk-LYUGDHSF.js';
|
|
2
|
+
export { DeltaText } from '../chunk-LYUGDHSF.js';
|
|
3
|
+
import { Sparkline } from '../chunk-P2KIHF65.js';
|
|
4
|
+
import { formatValue } from '../chunk-XRKSIC5Z.js';
|
|
5
5
|
import { Button, uiLanguage, useLocale } from '../chunk-ROHNXP7J.js';
|
|
6
6
|
import '../chunk-U736PVHY.js';
|
|
7
7
|
import { forwardRef, useEffect, useId } from 'react';
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
* factor ("1.5×"), `duration` for a length of time ("3時間20分"), `number` for
|
|
49
49
|
* exact counts in tables, `compact` (default) for large headline counts (万・億).
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
declare const FORMAT_KINDS: readonly ["number", "compact", "currency", "percent", "multiple", "duration"];
|
|
52
|
+
type FormatKind = (typeof FORMAT_KINDS)[number];
|
|
52
53
|
/** The unit a `duration` value is measured in. */
|
|
53
54
|
type DurationUnit = "second" | "minute" | "hour" | "day";
|
|
54
55
|
/**
|
package/dist/slide/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode, PropsWithChildren, CSSProperties, ReactElement } from 'react';
|
|
3
|
-
import { V as ValueFormat } from '../format-
|
|
4
|
-
export { D as DeltaText, a as DeltaTextProps } from '../delta-text-
|
|
3
|
+
import { V as ValueFormat } from '../format-D34piCei.js';
|
|
4
|
+
export { D as DeltaText, a as DeltaTextProps } from '../delta-text-tav2Lh5d.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Ported from open-slide (MIT) — https://github.com/1weiho/open-slide
|
package/dist/slide/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DeltaText } from '../chunk-
|
|
2
|
-
export { DeltaText } from '../chunk-
|
|
1
|
+
import { DeltaText } from '../chunk-LYUGDHSF.js';
|
|
2
|
+
export { DeltaText } from '../chunk-LYUGDHSF.js';
|
|
3
3
|
import { useSearchState } from '../chunk-ZO62C6T4.js';
|
|
4
4
|
import '../chunk-6S4BAIGV.js';
|
|
5
5
|
import { EChart } from '../chunk-EG4PX726.js';
|
|
6
|
-
import { formatValue, EMPTY_VALUE } from '../chunk-
|
|
6
|
+
import { formatValue, EMPTY_VALUE } from '../chunk-XRKSIC5Z.js';
|
|
7
7
|
import { uiLanguage, useLocale } from '../chunk-ROHNXP7J.js';
|
|
8
8
|
import '../chunk-U736PVHY.js';
|
|
9
9
|
import { createContext, useRef, useState, useLayoutEffect, useContext, createElement, Children, isValidElement, useCallback, cloneElement, useMemo, useEffect } from 'react';
|
package/dist/table/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { FILE_PAGE_MAX_ROWS, FILE_PAGE_MAX_BYTES } from '../chunk-C2CX6GLX.js';
|
|
2
2
|
import { useQuery } from '../chunk-ANZLVSEP.js';
|
|
3
3
|
import '../chunk-CKWPK4RO.js';
|
|
4
|
-
import {
|
|
5
|
-
import { PageShell, PageShellHeader, PageShellHeading, PageShellTitle, PageShellMeta, PageShellActions, PageShellContent } from '../chunk-NYQJ5UY4.js';
|
|
4
|
+
import { PageShell, PageShellHeader, PageShellHeading, PageShellTitle, PageShellMeta, PageShellActions, PageShellContent } from '../chunk-DULE4EDK.js';
|
|
6
5
|
import '../chunk-EG4PX726.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-P2KIHF65.js';
|
|
7
|
+
import '../chunk-XRKSIC5Z.js';
|
|
8
|
+
import { Loading, ErrorState } from '../chunk-MQUIAP66.js';
|
|
10
9
|
import { Button } from '../chunk-ROHNXP7J.js';
|
|
11
10
|
import { cn } from '../chunk-U736PVHY.js';
|
|
12
11
|
import { useRef, useState, useMemo, useLayoutEffect, useEffect, useCallback } from 'react';
|