yamchart 0.4.17 → 0.4.19

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 (42) hide show
  1. package/dist/{chunk-XXQU2TZ2.js → chunk-3RYZTXPH.js} +2 -2
  2. package/dist/{chunk-QMGKVN2X.js → chunk-45SP26I2.js} +2 -2
  3. package/dist/{chunk-3I5PUINM.js → chunk-UDRJFEJU.js} +2 -1
  4. package/dist/chunk-UDRJFEJU.js.map +1 -0
  5. package/dist/{connection-utils-T7DZL6MI.js → connection-utils-26ZE4KUZ.js} +3 -3
  6. package/dist/{describe-G3YXRE7X.js → describe-SYP5GZ3H.js} +3 -3
  7. package/dist/{dev-BUMIVTPN.js → dev-OHAXDNXA.js} +3 -3
  8. package/dist/index.js +11 -11
  9. package/dist/public/assets/LoginPage-BrI0Po1-.js +1 -0
  10. package/dist/public/assets/PublicViewer-DNmvz77v.js +1 -0
  11. package/dist/public/assets/SetupWizard-DR7B3Vpm.js +1 -0
  12. package/dist/public/assets/ShareManagement-DyIWeXEC.js +1 -0
  13. package/dist/public/assets/UserManagement-D8OUccL0.js +1 -0
  14. package/dist/public/assets/{index-Csxcdlds.css → index-CKcEMrlp.css} +1 -1
  15. package/dist/public/assets/index-uxK7mlHt.js +165 -0
  16. package/dist/public/assets/{index.es-hreeCzNo.js → index.es-5wjag3AI.js} +1 -1
  17. package/dist/public/assets/{jspdf.es.min-C6Vul2EZ.js → jspdf.es.min-fNEhp1P4.js} +3 -3
  18. package/dist/public/index.html +2 -2
  19. package/dist/{query-OEEQA6RQ.js → query-LRPR6YRE.js} +3 -3
  20. package/dist/{sample-UV4GM2D4.js → sample-D4HDOJWP.js} +3 -3
  21. package/dist/{search-AV6NW2KG.js → search-CXBNM2KK.js} +3 -3
  22. package/dist/{tables-MPSCAUHL.js → tables-ZY3NRC6E.js} +3 -3
  23. package/dist/templates/default/docs/yamchart-reference.md +29 -0
  24. package/dist/{test-HE5MDTTX.js → test-NKYO32Y5.js} +3 -3
  25. package/package.json +2 -2
  26. package/dist/chunk-3I5PUINM.js.map +0 -1
  27. package/dist/public/assets/LoginPage-OByqHc4n.js +0 -1
  28. package/dist/public/assets/PublicViewer-DUhQW5m5.js +0 -1
  29. package/dist/public/assets/SetupWizard-DG46QOHB.js +0 -1
  30. package/dist/public/assets/ShareManagement-DAsSD-YD.js +0 -1
  31. package/dist/public/assets/UserManagement-DZfM0Ovz.js +0 -1
  32. package/dist/public/assets/index-DDmMI9nF.js +0 -164
  33. /package/dist/{chunk-XXQU2TZ2.js.map → chunk-3RYZTXPH.js.map} +0 -0
  34. /package/dist/{chunk-QMGKVN2X.js.map → chunk-45SP26I2.js.map} +0 -0
  35. /package/dist/{connection-utils-T7DZL6MI.js.map → connection-utils-26ZE4KUZ.js.map} +0 -0
  36. /package/dist/{describe-G3YXRE7X.js.map → describe-SYP5GZ3H.js.map} +0 -0
  37. /package/dist/{dev-BUMIVTPN.js.map → dev-OHAXDNXA.js.map} +0 -0
  38. /package/dist/{query-OEEQA6RQ.js.map → query-LRPR6YRE.js.map} +0 -0
  39. /package/dist/{sample-UV4GM2D4.js.map → sample-D4HDOJWP.js.map} +0 -0
  40. /package/dist/{search-AV6NW2KG.js.map → search-CXBNM2KK.js.map} +0 -0
  41. /package/dist/{tables-MPSCAUHL.js.map → tables-ZY3NRC6E.js.map} +0 -0
  42. /package/dist/{test-HE5MDTTX.js.map → test-NKYO32Y5.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  DashboardSchema,
5
5
  ProjectSchema,
6
6
  ScheduleSchema
7
- } from "./chunk-3I5PUINM.js";
7
+ } from "./chunk-UDRJFEJU.js";
8
8
  import {
9
9
  parseModelMetadata
10
10
  } from "./chunk-23E6YT4S.js";
@@ -365,4 +365,4 @@ export {
365
365
  findProjectRoot,
366
366
  loadEnvFile
367
367
  };
368
- //# sourceMappingURL=chunk-XXQU2TZ2.js.map
368
+ //# sourceMappingURL=chunk-3RYZTXPH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConnectionSchema
3
- } from "./chunk-3I5PUINM.js";
3
+ } from "./chunk-UDRJFEJU.js";
4
4
  import {
5
5
  DuckDBConnector,
6
6
  MySQLConnector,
@@ -166,4 +166,4 @@ export {
166
166
  formatTable,
167
167
  formatJSON
168
168
  };
169
- //# sourceMappingURL=chunk-QMGKVN2X.js.map
169
+ //# sourceMappingURL=chunk-45SP26I2.js.map
@@ -502,6 +502,7 @@ var LogoSchema = z3.union([
502
502
  })
503
503
  ]);
504
504
  var ThemeSchema = z3.object({
505
+ mode: z3.enum(["light", "dark", "auto"]).optional(),
505
506
  base: z3.enum(["modern", "executive", "minimal"]).optional(),
506
507
  logo: LogoSchema.optional(),
507
508
  favicon: z3.string().optional(),
@@ -673,4 +674,4 @@ export {
673
674
  DashboardSchema,
674
675
  ScheduleSchema
675
676
  };
676
- //# sourceMappingURL=chunk-3I5PUINM.js.map
677
+ //# sourceMappingURL=chunk-UDRJFEJU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/schema/src/connection.ts","../../../packages/schema/src/chart.ts","../../../packages/schema/src/project.ts","../../../packages/schema/src/model.ts","../../../packages/schema/src/dashboard.ts","../../../packages/schema/src/schedule.ts"],"sourcesContent":["import { z } from 'zod';\n\n// Auth configuration for connections\nconst EnvAuthSchema = z.object({\n type: z.literal('env'),\n user_var: z.string(),\n password_var: z.string(),\n});\n\nconst KeyPairAuthSchema = z.object({\n type: z.literal('key_pair'),\n user_var: z.string(),\n private_key_path: z.string(),\n});\n\nconst SecretManagerAuthSchema = z.object({\n type: z.literal('secret_manager'),\n provider: z.enum(['aws_secrets_manager', 'gcp_secret_manager', 'vault']),\n secret_id: z.string(),\n});\n\nconst ExternalBrowserAuthSchema = z.object({\n type: z.literal('externalbrowser'),\n user_var: z.string(),\n cache_token: z.boolean().optional(),\n});\n\nconst AuthSchema = z.discriminatedUnion('type', [\n EnvAuthSchema,\n KeyPairAuthSchema,\n SecretManagerAuthSchema,\n ExternalBrowserAuthSchema,\n]);\n\n// Connection pool configuration\nconst PoolConfigSchema = z.object({\n min_connections: z.number().int().positive().optional(),\n max_connections: z.number().int().positive().optional(),\n idle_timeout: z.number().int().positive().optional(),\n});\n\n// Query settings\nconst QueryConfigSchema = z.object({\n timeout: z.number().int().positive().optional(),\n max_rows: z.number().int().positive().optional(),\n});\n\n// DuckDB-specific config\nconst DuckDBConfigSchema = z.object({\n path: z.string(), // file path or :memory:\n});\n\n// Postgres-specific config\nconst PostgresConfigSchema = z.object({\n host: z.string(),\n port: z.number().int().positive().default(5432),\n database: z.string(),\n schema: z.string().optional(),\n ssl: z.boolean().optional(),\n});\n\n// Snowflake-specific config\nconst SnowflakeConfigSchema = z.object({\n account: z.string(),\n warehouse: z.string(),\n database: z.string(),\n schema: z.string().optional(),\n role: z.string().optional(),\n});\n\n// MySQL-specific config\nconst MySQLConfigSchema = z.object({\n host: z.string(),\n port: z.number().int().positive().default(3306),\n database: z.string(),\n ssl: z.boolean().optional(),\n});\n\n// SQLite-specific config\nconst SQLiteConfigSchema = z.object({\n path: z.string(), // file path or :memory:\n});\n\n// Base connection schema\nconst BaseConnectionSchema = z.object({\n name: z.string().min(1),\n description: z.string().optional(),\n pool: PoolConfigSchema.optional(),\n query: QueryConfigSchema.optional(),\n});\n\n// Type-specific connection schemas\nconst DuckDBConnectionSchema = BaseConnectionSchema.extend({\n type: z.literal('duckdb'),\n config: DuckDBConfigSchema,\n auth: z.undefined().optional(),\n});\n\nconst PostgresConnectionSchema = BaseConnectionSchema.extend({\n type: z.literal('postgres'),\n config: PostgresConfigSchema,\n auth: AuthSchema.optional(),\n});\n\nconst SnowflakeConnectionSchema = BaseConnectionSchema.extend({\n type: z.literal('snowflake'),\n config: SnowflakeConfigSchema,\n auth: AuthSchema,\n});\n\nconst MySQLConnectionSchema = BaseConnectionSchema.extend({\n type: z.literal('mysql'),\n config: MySQLConfigSchema,\n auth: AuthSchema.optional(),\n});\n\nconst SQLiteConnectionSchema = BaseConnectionSchema.extend({\n type: z.literal('sqlite'),\n config: SQLiteConfigSchema,\n auth: z.undefined().optional(),\n});\n\n// Union of all connection types\nexport const ConnectionSchema = z.discriminatedUnion('type', [\n DuckDBConnectionSchema,\n PostgresConnectionSchema,\n SnowflakeConnectionSchema,\n MySQLConnectionSchema,\n SQLiteConnectionSchema,\n]);\n\nexport type Connection = z.infer<typeof ConnectionSchema>;\nexport type DuckDBConnection = z.infer<typeof DuckDBConnectionSchema>;\nexport type PostgresConnection = z.infer<typeof PostgresConnectionSchema>;\nexport type SnowflakeConnection = z.infer<typeof SnowflakeConnectionSchema>;\nexport type MySQLConnection = z.infer<typeof MySQLConnectionSchema>;\nexport type SQLiteConnection = z.infer<typeof SQLiteConnectionSchema>;\n","import { z } from 'zod';\n\n// Axis types\nconst AxisTypeSchema = z.enum(['temporal', 'quantitative', 'ordinal', 'nominal']);\n\n// Axis configuration\nconst AxisSchema = z.object({\n field: z.string().min(1),\n type: AxisTypeSchema,\n format: z.string().optional(),\n label: z.string().optional(),\n scale: z.enum(['linear', 'log']).optional(),\n});\n\n// Chart types supported (scatter has its own dedicated schema)\nconst ChartTypeSchema = z.enum([\n 'line',\n 'bar',\n 'area',\n 'pie',\n 'donut',\n 'table',\n 'metric',\n 'map',\n 'heatmap',\n 'funnel',\n 'sankey',\n 'treemap',\n 'waterfall',\n 'gauge',\n]);\n\n// Gradient configuration - boolean shorthand or explicit from/to\nconst GradientSchema = z.union([\n z.boolean(),\n z.object({\n from: z.string(),\n to: z.string(),\n }),\n]);\n\n// Long format series: group by a field in the data (one row per series value)\nconst LongFormatSeriesSchema = z.object({\n field: z.string().min(1),\n colors: z.record(z.string(), z.string()).optional(),\n});\n\n// Wide format column: each column becomes a separate series\nconst WideFormatColumnSchema = z.object({\n field: z.string().min(1),\n name: z.string().optional(),\n type: z.enum(['line', 'bar', 'area']).optional(),\n axis: z.enum(['left', 'right']).optional(),\n color: z.string().optional(),\n style: z.enum(['solid', 'dashed', 'dotted']).optional(),\n opacity: z.number().min(0).max(1).optional(),\n gradient: GradientSchema.optional(),\n});\n\n// Wide format series: explicit list of columns\nconst WideFormatSeriesSchema = z.object({\n columns: z.array(WideFormatColumnSchema).min(1),\n});\n\n// Series config is either long format (group by field) or wide format (explicit columns)\nconst SeriesConfigSchema = z.union([\n LongFormatSeriesSchema,\n WideFormatSeriesSchema,\n]);\n\n// Color condition for conditional coloring\nconst ColorConditionSchema = z.object({\n when: z.string(),\n color: z.string(),\n});\n\n// Conditional color configuration\nconst ConditionalColorSchema = z.object({\n conditions: z.array(ColorConditionSchema).min(1),\n default: z.string().optional(),\n});\n\n// Color - either a simple string or conditional config\nconst ColorSchema = z.union([\n z.string(),\n ConditionalColorSchema,\n]);\n\n// Legend configuration\nconst LegendSchema = z.object({\n show: z.boolean().optional(),\n position: z.enum(['top', 'bottom', 'left', 'right']).optional(),\n});\n\n// Annotation configuration\nconst LineAnnotationSchema = z.object({\n type: z.literal('line'),\n value: z.number(),\n label: z.string().optional(),\n color: z.string().optional(),\n style: z.enum(['solid', 'dashed', 'dotted']).optional(),\n});\n\nconst BandAnnotationSchema = z.object({\n type: z.literal('band'),\n from: z.number(),\n to: z.number(),\n label: z.string().optional(),\n color: z.string().optional(),\n});\n\nconst AnnotationSchema = z.discriminatedUnion('type', [\n LineAnnotationSchema,\n BandAnnotationSchema,\n]);\n\n// Interactivity options\nconst InteractionsSchema = z.object({\n tooltip: z.boolean().default(true),\n zoom: z.boolean().default(false),\n brush: z.boolean().default(false),\n});\n\n// KPI format types\nconst KpiFormatSchema = z.object({\n type: z.enum(['number', 'currency', 'percent']),\n currency: z.string().optional(), // e.g., 'USD', 'EUR'\n decimals: z.number().optional(),\n});\n\n// KPI comparison configuration\nconst KpiComparisonSchema = z.object({\n enabled: z.boolean(),\n field: z.string().min(1).optional(),\n period: z.enum(['previous']).optional(),\n label: z.string().optional(),\n type: z.enum(['percent_change', 'absolute']),\n}).refine(\n (data) => !(data.field && data.period),\n { message: 'Cannot set both field and period — use one or the other' }\n).refine(\n (data) => data.field || data.period,\n { message: 'Must set either field or period for comparison' }\n);\n\n// KPI value configuration\nconst KpiValueSchema = z.object({\n field: z.string().min(1),\n});\n\n// KPI-specific config\nconst KpiConfigSchema = z.object({\n type: z.literal('kpi'),\n value: KpiValueSchema,\n format: KpiFormatSchema,\n comparison: KpiComparisonSchema.optional(),\n unit: z.string().optional(), // e.g., 'min', 'sessions', 'users'\n});\n\n// Center value for donut charts\nconst CenterValueSchema = z.object({\n field: z.string().optional(), // 'total' for sum, or specific field\n label: z.string().optional(),\n format: z.string().optional(),\n});\n\n// Standard chart config (existing)\nconst StandardChartConfigSchema = z.object({\n type: ChartTypeSchema,\n x: AxisSchema,\n y: AxisSchema.optional(),\n series: SeriesConfigSchema.optional(),\n stacking: z.enum(['stacked', 'percent']).optional(),\n orientation: z.enum(['vertical', 'horizontal']).optional(),\n color: ColorSchema.optional(),\n gradient: GradientSchema.optional(),\n legend: LegendSchema.optional(),\n annotations: z.array(AnnotationSchema).optional(),\n interactions: InteractionsSchema.optional(),\n centerValue: CenterValueSchema.optional(), // For donut charts\n});\n\n// Dual axes for combo charts\nconst DualAxesSchema = z.object({\n left: AxisSchema.optional(),\n right: AxisSchema.optional(),\n});\n\n// Combo chart config - requires dual axes\nconst ComboChartConfigSchema = z.object({\n type: z.literal('combo'),\n x: AxisSchema,\n series: WideFormatSeriesSchema,\n axes: DualAxesSchema,\n legend: LegendSchema.optional(),\n interactions: InteractionsSchema.optional(),\n gradient: GradientSchema.optional(),\n});\n\n// Scatter chart size encoding\nconst ScatterSizeSchema = z.object({\n field: z.string().min(1),\n min: z.number().optional(),\n max: z.number().optional(),\n label: z.string().optional(),\n});\n\n// Scatter chart grouping\nconst ScatterGroupSchema = z.object({\n field: z.string().min(1),\n});\n\n// Regression line configuration\nconst RegressionSchema = z.object({\n type: z.literal('linear'),\n show_equation: z.boolean().optional(),\n show_r_squared: z.boolean().optional(),\n});\n\n// Scatter/bubble chart config\nconst ScatterChartConfigSchema = z.object({\n type: z.literal('scatter'),\n x: AxisSchema,\n y: AxisSchema,\n size: ScatterSizeSchema.optional(),\n group: ScatterGroupSchema.optional(),\n regression: RegressionSchema.optional(),\n color: ColorSchema.optional(),\n legend: LegendSchema.optional(),\n interactions: InteractionsSchema.optional(),\n});\n\n// Heatmap chart config\nconst HeatmapChartConfigSchema = z.object({\n type: z.literal('heatmap'),\n x: AxisSchema,\n y: AxisSchema,\n value: z.object({\n field: z.string().min(1),\n label: z.string().optional(),\n }),\n color_range: z.object({\n min: z.string().optional(),\n max: z.string().optional(),\n }).optional(),\n show_values: z.boolean().optional(),\n});\n\n// Funnel chart config\nconst FunnelChartConfigSchema = z.object({\n type: z.literal('funnel'),\n stage: z.object({ field: z.string().min(1) }),\n value: z.object({ field: z.string().min(1) }),\n show_conversion: z.boolean().optional(),\n color: ColorSchema.optional(),\n});\n\n// Waterfall chart config\nconst WaterfallChartConfigSchema = z.object({\n type: z.literal('waterfall'),\n category: z.object({ field: z.string().min(1) }),\n value: z.object({ field: z.string().min(1) }),\n total_field: z.string().optional(),\n colors: z.object({\n increase: z.string().optional(),\n decrease: z.string().optional(),\n total: z.string().optional(),\n }).optional(),\n});\n\n// Gauge chart config\nconst GaugeThresholdSchema = z.object({\n value: z.number(),\n color: z.string(),\n});\n\nconst GaugeChartConfigSchema = z.object({\n type: z.literal('gauge'),\n value: z.object({ field: z.string().min(1) }),\n min: z.number().optional(),\n max: z.number().optional(),\n thresholds: z.array(GaugeThresholdSchema).optional(),\n format: z.string().optional(),\n});\n\nconst TableColumnSummarySchema = z.enum(['sum', 'avg', 'min', 'max', 'count']);\n\nconst TableChartConfigSchema = z.object({\n type: z.literal('table'),\n columns: z.array(z.object({\n field: z.string().min(1),\n label: z.string().optional(),\n format: z.string().optional(),\n sticky: z.boolean().optional(),\n summary: TableColumnSummarySchema.optional(),\n })).optional(),\n summary: z.object({\n label: z.string().optional(),\n }).optional(),\n sort: z.object({\n field: z.string().min(1),\n direction: z.enum(['asc', 'desc']).optional(),\n }).optional(),\n});\n\n// Chart visualization config - standard, KPI, combo, scatter, heatmap, funnel, waterfall, gauge, or table\nconst ChartConfigSchema = z.union([\n ScatterChartConfigSchema,\n ComboChartConfigSchema,\n HeatmapChartConfigSchema,\n FunnelChartConfigSchema,\n WaterfallChartConfigSchema,\n GaugeChartConfigSchema,\n TableChartConfigSchema,\n StandardChartConfigSchema,\n KpiConfigSchema,\n]);\n\n// Parameter types\nconst ParameterTypeSchema = z.enum([\n 'date_range',\n 'select',\n 'multi_select',\n 'dynamic_select',\n 'text',\n 'number',\n 'boolean',\n]);\n\n// Parameter option\nconst ParameterOptionSchema = z.union([\n z.string(),\n z.object({\n value: z.string(),\n label: z.string(),\n }),\n]);\n\n// Parameter source (for dynamic options)\nconst ParameterSourceSchema = z.object({\n model: z.string(),\n value_field: z.string(),\n label_field: z.string(),\n});\n\n// Parameter definition\nconst ParameterSchema = z.object({\n name: z.string().min(1),\n type: ParameterTypeSchema,\n label: z.string().optional(),\n default: z.union([z.string(), z.number(), z.array(z.string())]).optional(),\n options: z.array(ParameterOptionSchema).optional(),\n source: ParameterSourceSchema.optional(),\n});\n\n// Data source - either model reference or inline SQL\nconst SourceSchema = z.object({\n model: z.string().optional(),\n sql: z.string().optional(),\n}).refine(\n (data) => data.model !== undefined || data.sql !== undefined,\n { message: 'Source must specify either model or sql' }\n).refine(\n (data) => !(data.model !== undefined && data.sql !== undefined),\n { message: 'Source cannot specify both model and sql' }\n);\n\n// Refresh/cache configuration\nconst RefreshSchema = z.object({\n schedule: z.string().optional(), // cron expression\n timezone: z.string().optional(),\n cache_ttl: z.string().optional(), // e.g., \"1h\", \"30m\"\n});\n\n// Drill-down column config for data table display\nconst DrillDownColumnSchema = z.object({\n field: z.string().min(1),\n label: z.string().optional(),\n format: z.string().optional(),\n});\n\n// Drill-down configuration\nconst DrillDownConfigSchema = z.object({\n chart: z.string().optional(), // target chart name (source side)\n field: z.string().optional(), // field to pass as filter, defaults to x-axis field\n columns: z.array(DrillDownColumnSchema).optional(), // data table columns (target side)\n});\n\n// Main chart schema\nexport const ChartSchema = z.object({\n // Identity\n name: z.string().min(1),\n title: z.string().min(1),\n description: z.string().optional(),\n\n // Metadata\n owner: z.string().optional(),\n tags: z.array(z.string()).optional(),\n created: z.string().optional(),\n updated: z.string().optional(),\n\n // Data\n source: SourceSchema,\n parameters: z.array(ParameterSchema).optional(),\n\n // Visualization\n chart: ChartConfigSchema,\n\n // Caching\n refresh: RefreshSchema.optional(),\n\n // Drill-down navigation\n drillDown: DrillDownConfigSchema.optional(),\n});\n\nexport type Chart = z.infer<typeof ChartSchema>;\nexport type ChartConfig = z.infer<typeof ChartConfigSchema>;\nexport type ChartType = z.infer<typeof ChartTypeSchema>;\nexport type Parameter = z.infer<typeof ParameterSchema>;\nexport type Axis = z.infer<typeof AxisSchema>;\nexport type SeriesConfig = z.infer<typeof SeriesConfigSchema>;\nexport type LongFormatSeries = z.infer<typeof LongFormatSeriesSchema>;\nexport type WideFormatSeries = z.infer<typeof WideFormatSeriesSchema>;\nexport type WideFormatColumn = z.infer<typeof WideFormatColumnSchema>;\nexport type ColorConfig = z.infer<typeof ColorSchema>;\nexport type ConditionalColor = z.infer<typeof ConditionalColorSchema>;\nexport type ColorCondition = z.infer<typeof ColorConditionSchema>;\nexport type GradientConfig = z.infer<typeof GradientSchema>;\nexport type LegendConfig = z.infer<typeof LegendSchema>;\nexport type ComboChartConfig = z.infer<typeof ComboChartConfigSchema>;\nexport type DualAxes = z.infer<typeof DualAxesSchema>;\nexport type ScatterChartConfig = z.infer<typeof ScatterChartConfigSchema>;\nexport type ScatterSize = z.infer<typeof ScatterSizeSchema>;\nexport type ScatterGroup = z.infer<typeof ScatterGroupSchema>;\nexport type RegressionConfig = z.infer<typeof RegressionSchema>;\nexport type DrillDownConfig = z.infer<typeof DrillDownConfigSchema>;\nexport type DrillDownColumn = z.infer<typeof DrillDownColumnSchema>;\nexport type HeatmapChartConfig = z.infer<typeof HeatmapChartConfigSchema>;\nexport type FunnelChartConfig = z.infer<typeof FunnelChartConfigSchema>;\nexport type WaterfallChartConfig = z.infer<typeof WaterfallChartConfigSchema>;\nexport type GaugeChartConfig = z.infer<typeof GaugeChartConfigSchema>;\nexport type TableChartConfig = z.infer<typeof TableChartConfigSchema>;\n\nexport { ParameterSchema };\n","import { z } from 'zod';\n\n// Default settings\nconst DefaultsSchema = z.object({\n connection: z.string().optional(),\n theme: z.string().optional(),\n timezone: z.string().optional(),\n cache_ttl: z.string().optional(),\n base_url: z.string().url().optional(),\n week_start: z.enum(['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']).optional(),\n});\n\n// Environment-specific settings\nconst EnvironmentSchema = z.object({\n connection: z.string().optional(),\n base_url: z.string().url().optional(),\n});\n\n// Git integration settings\nconst GitSchema = z.object({\n provider: z.enum(['github', 'gitlab', 'bitbucket']).optional(),\n repo: z.string().optional(),\n branch: z.string().optional(),\n preview_branches: z.boolean().optional(),\n});\n\n// SSO provider configuration\nconst SSOProviderSchema = z.object({\n client_id: z.string(),\n client_secret: z.string(),\n tenant: z.string().optional(),\n issuer: z.string().optional(),\n display_name: z.string().optional(),\n});\n\n// Authentication settings (built-in local auth)\nconst AuthSchema = z.object({\n enabled: z.boolean(),\n db_path: z.string().optional(),\n session_ttl: z.string().optional(),\n providers: z.object({\n google: SSOProviderSchema.optional(),\n microsoft: SSOProviderSchema.optional(),\n oidc: SSOProviderSchema.optional(),\n }).optional(),\n});\n\n// Feature flags\nconst FeaturesSchema = z.object({\n enable_sql_editor: z.boolean().optional(),\n enable_csv_export: z.boolean().optional(),\n enable_scheduling: z.boolean().optional(),\n});\n\n// Sidebar link for external navigation\nconst SidebarLinkSchema = z.object({\n label: z.string(),\n url: z.string(),\n icon: z.string().optional(),\n});\n\n// Sidebar configuration\nconst SidebarConfigSchema = z.object({\n show: z.boolean().optional(),\n collapsed: z.boolean().optional(),\n links: z.array(SidebarLinkSchema).optional(),\n sections: z.object({\n dashboards: z.boolean().optional(),\n charts: z.boolean().optional(),\n }).optional(),\n});\n\n// Color configuration\nconst ColorsSchema = z.object({\n primary: z.string().optional(),\n background: z.string().optional(),\n surface: z.string().optional(),\n sidebar: z.string().optional(),\n text: z.string().optional(),\n});\n\n// Font configuration\nconst FontsSchema = z.object({\n heading: z.string().optional(),\n body: z.string().optional(),\n mono: z.string().optional(),\n size: z.enum(['compact', 'default', 'comfortable']).optional(),\n});\n\n// Logo can be a string path or light/dark object\nconst LogoSchema = z.union([\n z.string(),\n z.object({\n light: z.string(),\n dark: z.string(),\n }),\n]);\n\n// Theme configuration\nconst ThemeSchema = z.object({\n mode: z.enum(['light', 'dark', 'auto']).optional(),\n base: z.enum(['modern', 'executive', 'minimal']).optional(),\n logo: LogoSchema.optional(),\n favicon: z.string().optional(),\n title: z.string().optional(),\n colors: ColorsSchema.optional(),\n palette: z.array(z.string()).optional(),\n gradient: z.boolean().default(false),\n opacity: z.number().min(0).max(1).default(1.0),\n fonts: FontsSchema.optional(),\n sidebar: SidebarConfigSchema.optional(),\n customCss: z.string().optional(),\n});\n\n// Main project schema\nexport const ProjectSchema = z.object({\n version: z.string().min(1),\n name: z.string().min(1),\n description: z.string().optional(),\n\n defaults: DefaultsSchema.optional(),\n\n environments: z.record(z.string(), EnvironmentSchema).optional(),\n\n git: GitSchema.optional(),\n auth: AuthSchema.optional(),\n features: FeaturesSchema.optional(),\n theme: ThemeSchema.optional(),\n});\n\nexport type Project = z.infer<typeof ProjectSchema>;\nexport type Auth = z.infer<typeof AuthSchema>;\nexport type Defaults = z.infer<typeof DefaultsSchema>;\nexport type Environment = z.infer<typeof EnvironmentSchema>;\nexport type Theme = z.infer<typeof ThemeSchema>;\nexport type SidebarConfig = z.infer<typeof SidebarConfigSchema>;\nexport type FontsConfig = z.infer<typeof FontsSchema>;\nexport type ColorsConfig = z.infer<typeof ColorsSchema>;\n","import { z } from 'zod';\n\n// Parameter type\nconst ParamTypeSchema = z.enum(['string', 'number', 'date', 'boolean', 'string[]', 'number[]']);\n\n// Model parameter\nconst ModelParamSchema = z.object({\n name: z.string().min(1),\n type: ParamTypeSchema,\n default: z.string().optional(),\n options: z.array(z.string()).optional(), // For enum-like params\n description: z.string().optional(),\n});\n\n// Return column definition\nconst ReturnColumnSchema = z.object({\n name: z.string().min(1),\n type: z.string(),\n description: z.string().optional(),\n});\n\n// Model metadata (extracted from SQL comments)\nexport const ModelMetadataSchema = z.object({\n name: z.string().min(1),\n description: z.string().optional(),\n owner: z.string().optional(),\n tags: z.array(z.string()).optional(),\n\n params: z.array(ModelParamSchema).optional(),\n returns: z.array(ReturnColumnSchema).optional(),\n tests: z.array(z.string()).optional(), // SQL assertions\n});\n\n// Full model (metadata + SQL)\nexport const ModelSchema = z.object({\n metadata: ModelMetadataSchema,\n sql: z.string().min(1),\n filePath: z.string().optional(),\n});\n\nexport type ModelMetadata = z.infer<typeof ModelMetadataSchema>;\nexport type ModelParam = z.infer<typeof ModelParamSchema>;\nexport type ReturnColumn = z.infer<typeof ReturnColumnSchema>;\nexport type Model = z.infer<typeof ModelSchema>;\n","import { z } from 'zod';\nimport { ParameterSchema } from './chart.js';\n\n// Widget types\nconst ChartWidgetSchema = z.object({\n type: z.literal('chart'),\n ref: z.string().min(1),\n cols: z.number().min(1).max(12),\n height: z.number().min(38).optional(),\n x: z.number().min(0).max(11).optional(),\n y: z.number().min(0).optional(),\n});\n\nconst TextWidgetSchema = z.object({\n type: z.literal('text'),\n content: z.string(),\n cols: z.number().min(1).max(12),\n height: z.number().min(38).optional(),\n x: z.number().min(0).max(11).optional(),\n y: z.number().min(0).optional(),\n});\n\nconst WidgetSchema = z.discriminatedUnion('type', [\n ChartWidgetSchema,\n TextWidgetSchema,\n]);\n\n// Row configuration\nconst RowSchema = z.object({\n height: z.number().min(38),\n widgets: z.array(WidgetSchema).min(1),\n});\n\n// Layout configuration\nconst LayoutSchema = z.object({\n gap: z.number().min(0).default(16),\n rows: z.array(RowSchema).min(1),\n});\n\n// Tab configuration\nconst TabSchema = z.object({\n name: z.string().min(1),\n label: z.string().min(1),\n filters: z.array(ParameterSchema).optional(),\n layout: LayoutSchema,\n});\n\n// Main dashboard schema\nexport const DashboardSchema = z.object({\n // Identity\n name: z.string().min(1),\n title: z.string().min(1),\n description: z.string().optional(),\n\n // Filters inherited by all widgets (shared across tabs)\n filters: z.array(ParameterSchema).optional(),\n\n // Layout definition (mutually exclusive with tabs)\n layout: LayoutSchema.optional(),\n\n // Tabbed layout\n tabs: z.array(TabSchema).min(1).optional(),\n}).superRefine((data, ctx) => {\n if (data.layout && data.tabs) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Dashboard must have either \"layout\" or \"tabs\", not both',\n path: ['tabs'],\n });\n }\n if (!data.layout && !data.tabs) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Dashboard must have either \"layout\" or \"tabs\"',\n path: [],\n });\n }\n});\n\nexport type Dashboard = z.infer<typeof DashboardSchema>;\nexport type DashboardTab = z.infer<typeof TabSchema>;\nexport type DashboardLayout = z.infer<typeof LayoutSchema>;\nexport type DashboardRow = z.infer<typeof RowSchema>;\nexport type DashboardWidget = z.infer<typeof WidgetSchema>;\nexport type ChartWidget = z.infer<typeof ChartWidgetSchema>;\nexport type TextWidget = z.infer<typeof TextWidgetSchema>;\n","import { z } from 'zod';\n\nconst SlackChannelSchema = z.object({\n webhook_url: z.string().min(1),\n channel: z.string().optional(),\n});\n\nconst ChannelSchema = z.object({\n slack: SlackChannelSchema,\n});\n\nconst ConditionOperatorSchema = z.enum(['lt', 'gt', 'lte', 'gte', 'eq']);\n\nconst ConditionSchema = z.object({\n field: z.string().min(1),\n operator: ConditionOperatorSchema,\n value: z.number(),\n});\n\nconst ReportScheduleSchema = z.object({\n name: z.string().min(1),\n type: z.literal('report'),\n schedule: z.string().min(1),\n timezone: z.string().optional(),\n channel: ChannelSchema,\n charts: z.array(z.string().min(1)).min(1),\n params: z.record(z.unknown()).optional(),\n message: z.string().optional(),\n notify_on_error: z.boolean().optional(),\n});\n\nconst AlertScheduleSchema = z.object({\n name: z.string().min(1),\n type: z.literal('alert'),\n schedule: z.string().min(1),\n timezone: z.string().optional(),\n channel: ChannelSchema,\n chart: z.string().min(1),\n params: z.record(z.unknown()).optional(),\n condition: ConditionSchema,\n cooldown: z.string().optional(),\n message: z.string().optional(),\n notify_on_error: z.boolean().optional(),\n});\n\nexport const ScheduleSchema = z.discriminatedUnion('type', [\n ReportScheduleSchema,\n AlertScheduleSchema,\n]);\n\nexport type Schedule = z.infer<typeof ScheduleSchema>;\nexport type ReportSchedule = z.infer<typeof ReportScheduleSchema>;\nexport type AlertSchedule = z.infer<typeof AlertScheduleSchema>;\nexport type Condition = z.infer<typeof ConditionSchema>;\nexport type ConditionOperator = z.infer<typeof ConditionOperatorSchema>;\n"],"mappings":";AAAA,SAAS,SAAS;AAGlB,IAAM,gBAAgB,EAAE,OAAO;EAC7B,MAAM,EAAE,QAAQ,KAAK;EACrB,UAAU,EAAE,OAAM;EAClB,cAAc,EAAE,OAAM;CACvB;AAED,IAAM,oBAAoB,EAAE,OAAO;EACjC,MAAM,EAAE,QAAQ,UAAU;EAC1B,UAAU,EAAE,OAAM;EAClB,kBAAkB,EAAE,OAAM;CAC3B;AAED,IAAM,0BAA0B,EAAE,OAAO;EACvC,MAAM,EAAE,QAAQ,gBAAgB;EAChC,UAAU,EAAE,KAAK,CAAC,uBAAuB,sBAAsB,OAAO,CAAC;EACvE,WAAW,EAAE,OAAM;CACpB;AAED,IAAM,4BAA4B,EAAE,OAAO;EACzC,MAAM,EAAE,QAAQ,iBAAiB;EACjC,UAAU,EAAE,OAAM;EAClB,aAAa,EAAE,QAAO,EAAG,SAAQ;CAClC;AAED,IAAM,aAAa,EAAE,mBAAmB,QAAQ;EAC9C;EACA;EACA;EACA;CACD;AAGD,IAAM,mBAAmB,EAAE,OAAO;EAChC,iBAAiB,EAAE,OAAM,EAAG,IAAG,EAAG,SAAQ,EAAG,SAAQ;EACrD,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js";
8
- import "./chunk-3I5PUINM.js";
7
+ } from "./chunk-45SP26I2.js";
8
+ import "./chunk-UDRJFEJU.js";
9
9
  import "./chunk-23E6YT4S.js";
10
10
  import "./chunk-DGUM43GV.js";
11
11
  export {
@@ -15,4 +15,4 @@ export {
15
15
  loadProjectConfig,
16
16
  resolveConnection
17
17
  };
18
- //# sourceMappingURL=connection-utils-T7DZL6MI.js.map
18
+ //# sourceMappingURL=connection-utils-26ZE4KUZ.js.map
@@ -7,8 +7,8 @@ import {
7
7
  import {
8
8
  createConnector,
9
9
  resolveConnection
10
- } from "./chunk-QMGKVN2X.js";
11
- import "./chunk-3I5PUINM.js";
10
+ } from "./chunk-45SP26I2.js";
11
+ import "./chunk-UDRJFEJU.js";
12
12
  import "./chunk-23E6YT4S.js";
13
13
  import "./chunk-DGUM43GV.js";
14
14
 
@@ -40,4 +40,4 @@ async function describeTable(projectDir, table, options) {
40
40
  export {
41
41
  describeTable
42
42
  };
43
- //# sourceMappingURL=describe-G3YXRE7X.js.map
43
+ //# sourceMappingURL=describe-SYP5GZ3H.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  loadEnvFile,
3
3
  validateProject
4
- } from "./chunk-XXQU2TZ2.js";
4
+ } from "./chunk-3RYZTXPH.js";
5
5
  import {
6
6
  box,
7
7
  detail,
@@ -25,7 +25,7 @@ import {
25
25
  DashboardSchema,
26
26
  ProjectSchema,
27
27
  ScheduleSchema
28
- } from "./chunk-3I5PUINM.js";
28
+ } from "./chunk-UDRJFEJU.js";
29
29
  import {
30
30
  DuckDBConnector,
31
31
  MySQLConnector,
@@ -13863,4 +13863,4 @@ async function runDevServer(projectDir, options) {
13863
13863
  export {
13864
13864
  runDevServer
13865
13865
  };
13866
- //# sourceMappingURL=dev-BUMIVTPN.js.map
13866
+ //# sourceMappingURL=dev-OHAXDNXA.js.map
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  findProjectRoot,
7
7
  loadEnvFile,
8
8
  validateProject
9
- } from "./chunk-XXQU2TZ2.js";
9
+ } from "./chunk-3RYZTXPH.js";
10
10
  import {
11
11
  detail,
12
12
  error,
@@ -17,7 +17,7 @@ import {
17
17
  success,
18
18
  warning
19
19
  } from "./chunk-HJVVHYVN.js";
20
- import "./chunk-3I5PUINM.js";
20
+ import "./chunk-UDRJFEJU.js";
21
21
  import "./chunk-23E6YT4S.js";
22
22
  import "./chunk-DGUM43GV.js";
23
23
 
@@ -96,7 +96,7 @@ program.command("dev").description("Start development server with hot reload").a
96
96
  detail("Run this command from a yamchart project directory");
97
97
  process.exit(2);
98
98
  }
99
- const { runDevServer } = await import("./dev-BUMIVTPN.js");
99
+ const { runDevServer } = await import("./dev-OHAXDNXA.js");
100
100
  await runDevServer(projectDir, {
101
101
  port: parseInt(options.port, 10),
102
102
  apiOnly: options.apiOnly ?? false,
@@ -195,7 +195,7 @@ program.command("test").description("Run model tests (@returns schema checks and
195
195
  }
196
196
  loadEnvFile(projectDir);
197
197
  try {
198
- const { testProject, formatTestOutput } = await import("./test-HE5MDTTX.js");
198
+ const { testProject, formatTestOutput } = await import("./test-NKYO32Y5.js");
199
199
  const result = await testProject(projectDir, model, {
200
200
  connection: options.connection,
201
201
  json: options.json
@@ -243,7 +243,7 @@ program.command("tables").description("List tables and views in the connected da
243
243
  }
244
244
  loadEnvFile(projectDir);
245
245
  try {
246
- const { listTables } = await import("./tables-MPSCAUHL.js");
246
+ const { listTables } = await import("./tables-ZY3NRC6E.js");
247
247
  const result = await listTables(projectDir, options);
248
248
  if (options.json) {
249
249
  console.log(JSON.stringify(result.tables, null, 2));
@@ -276,7 +276,7 @@ program.command("describe").description("Show columns and types for a table").ar
276
276
  }
277
277
  loadEnvFile(projectDir);
278
278
  try {
279
- const { describeTable } = await import("./describe-G3YXRE7X.js");
279
+ const { describeTable } = await import("./describe-SYP5GZ3H.js");
280
280
  const result = await describeTable(projectDir, table, options);
281
281
  if (options.json) {
282
282
  console.log(JSON.stringify(result.columns, null, 2));
@@ -311,8 +311,8 @@ program.command("query").description("Execute SQL against a connection").argumen
311
311
  }
312
312
  loadEnvFile(projectDir);
313
313
  try {
314
- const { executeQuery } = await import("./query-OEEQA6RQ.js");
315
- const { formatTable, formatJSON } = await import("./connection-utils-T7DZL6MI.js");
314
+ const { executeQuery } = await import("./query-LRPR6YRE.js");
315
+ const { formatTable, formatJSON } = await import("./connection-utils-26ZE4KUZ.js");
316
316
  const limit = options.limit ? parseInt(options.limit, 10) : void 0;
317
317
  const result = await executeQuery(projectDir, sql, {
318
318
  connection: options.connection,
@@ -339,8 +339,8 @@ program.command("sample").description("Show sample rows from a table or dbt mode
339
339
  }
340
340
  loadEnvFile(projectDir);
341
341
  try {
342
- const { sampleTable } = await import("./sample-UV4GM2D4.js");
343
- const { formatTable, formatJSON } = await import("./connection-utils-T7DZL6MI.js");
342
+ const { sampleTable } = await import("./sample-D4HDOJWP.js");
343
+ const { formatTable, formatJSON } = await import("./connection-utils-26ZE4KUZ.js");
344
344
  const limit = options.limit ? parseInt(options.limit, 10) : void 0;
345
345
  const result = await sampleTable(projectDir, table, {
346
346
  connection: options.connection,
@@ -370,7 +370,7 @@ program.command("search").description("Search for tables and columns by keyword"
370
370
  }
371
371
  loadEnvFile(projectDir);
372
372
  try {
373
- const { searchDatabase } = await import("./search-AV6NW2KG.js");
373
+ const { searchDatabase } = await import("./search-CXBNM2KK.js");
374
374
  const result = await searchDatabase(projectDir, keyword, options);
375
375
  if (options.json) {
376
376
  console.log(JSON.stringify(result.results, null, 2));
@@ -0,0 +1 @@
1
+ import{u,j as e,A as p}from"./index-uxK7mlHt.js";import{a as r}from"./echarts-DtOYsfLX.js";const f="",g={google:"Google",microsoft:"Microsoft",oidc:"SSO"};function j(){const m=u(o=>o.login),l=u(o=>o.providers),[a,x]=r.useState(""),[t,b]=r.useState(""),[c,s]=r.useState(""),[n,d]=r.useState(!1);r.useEffect(()=>{window.location.hash.includes("error=account_conflict")&&(s("An account with this email already exists. Please sign in with your password."),window.location.hash="#/")},[]);const y=async o=>{o.preventDefault(),s(""),d(!0);try{await m(a,t)}catch(i){i instanceof p?s(i.message):s("An unexpected error occurred")}finally{d(!1)}},h=o=>{window.location.href=`${f}/api/auth/sso/${o}`};return e.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"var(--yc-color-background)"},children:e.jsxs("div",{className:"rounded-lg shadow-sm p-8 w-full max-w-md",style:{backgroundColor:"var(--yc-color-surface)",border:"1px solid var(--yc-color-border)"},children:[e.jsx("h1",{className:"text-2xl font-semibold mb-2",style:{color:"var(--yc-color-text)"},children:"Sign in to Yamchart"}),e.jsx("p",{className:"text-sm mb-6",style:{color:"var(--yc-color-text-secondary)"},children:"Enter your credentials to access dashboards."}),c&&e.jsx("div",{className:"text-sm rounded-md px-4 py-3 mb-4",style:{backgroundColor:"color-mix(in srgb, var(--yc-color-danger) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--yc-color-danger) 30%, transparent)",color:"var(--yc-color-danger)"},children:c}),l.length>0&&e.jsxs("div",{className:"space-y-2 mb-6",children:[l.map(o=>e.jsxs("button",{onClick:()=>h(o),className:"w-full py-2 px-4 text-sm font-medium rounded-md hover:bg-black/5",style:{border:"1px solid var(--yc-color-border)",color:"var(--yc-color-text-secondary)"},children:["Sign in with ",g[o]??o]},o)),e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t",style:{borderColor:"var(--yc-color-border)"}})}),e.jsx("div",{className:"relative flex justify-center text-xs",style:{color:"var(--yc-color-text-muted)"},children:e.jsx("span",{className:"px-2",style:{backgroundColor:"var(--yc-color-surface)"},children:"or"})})]})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Email"}),e.jsx("input",{id:"email",type:"email",value:a,onChange:o=>x(o.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},placeholder:"you@example.com"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Password"}),e.jsx("input",{id:"password",type:"password",value:t,onChange:o=>b(o.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},placeholder:"Password"})]}),e.jsx("button",{type:"submit",disabled:n,className:"w-full py-2 px-4 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Signing in...":"Sign in"})]})]})})}export{j as LoginPage};
@@ -0,0 +1 @@
1
+ import{j as r,c as P,b as U,d as I,e as Y,f as q,g as _,F as z,S as G,C as K,D as X,h as Q,T as J,G as Z,W as ee,i as re,H as te,k as se,l as ae,m as ce,P as le,n as oe,B as ne,L as ie,a as de,o as xe}from"./index-uxK7mlHt.js";import{a as y}from"./echarts-DtOYsfLX.js";function he({title:a,description:c,loading:e=!1,error:o=null,cached:s,durationMs:l,hasDrillDown:N,onRefresh:t,children:h}){return r.jsxs("div",{className:"chart-container",children:[r.jsxs("div",{className:"flex items-start justify-between p-4 border-b",style:{borderColor:"var(--yc-color-border)"},children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--yc-color-text)"},children:a}),N&&r.jsxs("svg",{className:"w-4 h-4 flex-shrink-0",style:{color:"var(--yc-color-text-muted)"},viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[r.jsx("title",{children:"Right-click to drill down"}),r.jsx("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"})]})]}),c&&r.jsx("p",{className:"text-sm mt-1",style:{color:"var(--yc-color-text-secondary)"},children:c})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[s!==void 0&&r.jsx("span",{className:"text-xs px-2 py-1 rounded",style:s?{backgroundColor:"color-mix(in srgb, var(--yc-color-success) 15%, transparent)",color:"var(--yc-color-success)"}:{backgroundColor:"color-mix(in srgb, var(--yc-color-primary) 15%, transparent)",color:"var(--yc-color-primary)"},children:s?"Cached":"Fresh"}),l!==void 0&&r.jsxs("span",{className:"text-xs",style:{color:"var(--yc-color-text-muted)"},children:[l,"ms"]}),t&&r.jsx("button",{onClick:t,disabled:e,className:"p-1.5 hover:bg-black/5 rounded transition-colors disabled:opacity-50",style:{color:"var(--yc-color-text-muted)"},title:"Refresh",children:r.jsx("svg",{className:P("w-4 h-4",e&&"animate-spin"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),r.jsx("div",{className:"p-4",children:o?r.jsx("div",{className:"flex items-center justify-center h-64",style:{color:"var(--yc-color-danger)"},children:r.jsxs("div",{className:"text-center",children:[r.jsx("p",{className:"font-medium",children:"Failed to load chart"}),r.jsx("p",{className:"text-sm mt-1",children:o.message})]})}):h})]})}const me={day:{label:"Date",format:"%b %d, %Y"},week:{label:"Week Starting",format:"%b %d"},month:{label:"Month",format:"%b '%y"},quarter:{label:"Quarter",format:"quarter"},year:{label:"Year",format:"%Y"}};function ue({chartName:a}){const[c,e]=y.useState(!1),o=async()=>{const s=`{{${a}}}`;try{await navigator.clipboard.writeText(s),e(!0),setTimeout(()=>e(!1),2e3)}catch(l){console.error("Failed to copy:",l)}};return r.jsx("button",{onClick:o,className:"text-sm flex items-center gap-1.5 px-2 py-1 rounded hover:bg-black/5 transition-colors",style:{color:"var(--yc-color-text-secondary)"},title:`Copy {{${a}}} for use in markdown widgets`,children:c?r.jsxs(r.Fragment,{children:[r.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"var(--yc-color-success)"},children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),r.jsx("span",{style:{color:"var(--yc-color-success)"},children:"Copied!"})]}):r.jsxs(r.Fragment,{children:[r.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})}),r.jsx("span",{children:"Copy Reference"})]})})}function M(a,c){if(!c)return a.toLocaleString();const e=c.decimals??0;switch(c.type){case"currency":return new Intl.NumberFormat("en-US",{style:"currency",currency:c.currency||"USD",minimumFractionDigits:e,maximumFractionDigits:e}).format(a);case"percent":return new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(a/100);default:return a.toLocaleString(void 0,{minimumFractionDigits:e,maximumFractionDigits:e})}}function ye(a,c){const e=a>=0?"+":"";return c==="percent_change"?`${e}${a.toFixed(1)}%`:`${e}${a.toLocaleString()}`}function fe({data:a,config:c,title:e,comparison:o}){var g,b,w;if(!(a!=null&&a[0])||!((g=c.value)!=null&&g.field))return r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-muted)"},children:"No data available"});const s=a[0],l=s[c.value.field],N=M(l,c.format);let t=null,h="percent_change",D,k,f;if(o)t=o.change,h=o.changeType,D=o.currentPeriodLabel,k=o.previousPeriodLabel,f=M(o.previousValue,c.format);else if((b=c.comparison)!=null&&b.enabled&&c.comparison.field){const i=s[c.comparison.field];h=c.comparison.type,i&&i!==0&&(h==="percent_change"?t=(l-i)/i*100:t=l-i,f=M(i,c.format))}return r.jsxs("div",{className:"h-80 flex flex-col items-center justify-center p-8",children:[r.jsxs("div",{className:"text-6xl font-bold tabular-nums",style:{color:"var(--yc-color-text)"},children:[N,c.unit&&r.jsx("span",{className:"text-3xl font-normal ml-2",style:{color:"var(--yc-color-text-muted)"},children:c.unit})]}),D&&r.jsx("div",{className:"text-sm mt-2",style:{color:"var(--yc-color-text-muted)"},children:D}),e&&r.jsx("div",{className:"text-lg mt-3",style:{color:"var(--yc-color-text-secondary)"},children:e}),t!==null&&r.jsxs("div",{className:"mt-4 flex flex-col items-center gap-1",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-lg font-medium px-3 py-1 rounded",style:t>=0?{backgroundColor:"color-mix(in srgb, var(--yc-color-success) 15%, transparent)",color:"var(--yc-color-success)"}:{backgroundColor:"color-mix(in srgb, var(--yc-color-danger) 15%, transparent)",color:"var(--yc-color-danger)"},children:ye(t,h)}),f&&r.jsxs("span",{className:"text-sm",style:{color:"var(--yc-color-text-muted)"},children:["vs ",f]}),!f&&((w=c.comparison)==null?void 0:w.label)&&r.jsx("span",{className:"text-sm",style:{color:"var(--yc-color-text-muted)"},children:c.comparison.label})]}),k&&r.jsx("div",{className:"text-xs",style:{color:"var(--yc-color-text-muted)"},children:k})]})]})}function ve({chartName:a,drillParams:c}){var T,V,$,R;const{data:e,isLoading:o}=U(a),{data:s,isLoading:l,error:N}=I(a),{data:t}=Y(),h=q(),D=_(n=>n.getEffectiveFilters),k=_(n=>n.setChartFilter),f=o||l,g=c==null?void 0:c._from,b=c?Object.fromEntries(Object.entries(c).filter(([n])=>!n.startsWith("_"))):{},w=Object.keys(b).length>0,i=Object.entries(b).map(([n,x])=>`${n}: ${x}`).join(", ");y.useEffect(()=>{if(w)for(const[n,x]of Object.entries(b))k(a,n,x)},[a,w]);const[v,A]=y.useState(null),C=y.useCallback((n,x,m)=>{var u;(u=e==null?void 0:e.drillDown)!=null&&u.chart&&A({x:m.x,y:m.y,field:n,value:x})},[(T=e==null?void 0:e.drillDown)==null?void 0:T.chart]),H=y.useCallback(()=>{var m,u;if(!v||!((m=e==null?void 0:e.drillDown)!=null&&m.chart))return;const n=e.drillDown.field??((u=e.chart.x)==null?void 0:u.field)??v.field,x=new URLSearchParams({[n]:v.value,_from:a});window.location.hash=`/charts/${e.drillDown.chart}?${x.toString()}`,A(null)},[v,e,a]),S=D(a).granularity,d=S?me[S]:void 0,F=d==null?void 0:d.label,L=d==null?void 0:d.format;if(o)return r.jsxs("div",{className:"chart-container animate-pulse",children:[r.jsx("div",{className:"p-4 border-b",style:{borderColor:"var(--yc-color-border)"},children:r.jsx("div",{className:"h-6 rounded w-48",style:{backgroundColor:"var(--yc-color-surface-hover)"}})}),r.jsx("div",{className:"p-4",children:r.jsx("div",{className:"h-80 rounded",style:{backgroundColor:"var(--yc-color-surface-hover)"}})})]});if(!e)return r.jsxs("div",{className:"chart-container p-8 text-center",style:{color:"var(--yc-color-text-secondary)"},children:["Chart not found: ",a]});const O=()=>{var x,m,u,B,E,W;if(!s)return r.jsx("div",{className:"h-80 rounded animate-pulse",style:{backgroundColor:"var(--yc-color-surface-hover)"}});const n=e.chart.type;switch(n){case"line":if(!e.chart.x||!e.chart.y&&!e.chart.series)return r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing axis configuration"});{const j=d?{...e.chart.x,label:F,format:L}:e.chart.x,p=(x=e.drillDown)!=null&&x.chart?C:void 0;return r.jsx(ie,{data:s.rows,columns:s.columns,xAxis:j,yAxis:e.chart.y,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l,onDrillDown:p})}case"bar":if(!e.chart.x||!e.chart.y&&!e.chart.series)return r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing axis configuration"});{const j=d?{...e.chart.x,label:F,format:L}:e.chart.x,p=(m=e.drillDown)!=null&&m.chart?C:void 0;return r.jsx(ne,{data:s.rows,xAxis:j,yAxis:e.chart.y,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l,onDrillDown:p})}case"area":if(!e.chart.x||!e.chart.y&&!e.chart.series)return r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing axis configuration"});{const j=d?{...e.chart.x,label:F,format:L}:e.chart.x,p=(u=e.drillDown)!=null&&u.chart?C:void 0;return r.jsx(oe,{data:s.rows,xAxis:j,yAxis:e.chart.y,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l,onDrillDown:p})}case"pie":return!e.chart.x||!e.chart.y?r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing pie chart configuration"}):r.jsx(le,{data:s.rows,xAxis:e.chart.x,yAxis:e.chart.y,theme:t==null?void 0:t.theme,loading:l,onDrillDown:(B=e.drillDown)!=null&&B.chart?C:void 0});case"donut":return!e.chart.x||!e.chart.y?r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing donut chart configuration"}):r.jsx(ce,{data:s.rows,xAxis:e.chart.x,yAxis:e.chart.y,centerValue:e.chart.centerValue,theme:t==null?void 0:t.theme,loading:l,onDrillDown:(E=e.drillDown)!=null&&E.chart?C:void 0});case"scatter":return!e.chart.x||!e.chart.y?r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing axis configuration"}):r.jsx(ae,{data:s.rows,xAxis:e.chart.x,yAxis:e.chart.y,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l});case"combo":if(!e.chart.x)return r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing axis configuration"});{const j=d?{...e.chart.x,label:F,format:L}:e.chart.x,p=(W=e.drillDown)!=null&&W.chart?C:void 0;return r.jsx(se,{data:s.rows,xAxis:j,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l,onDrillDown:p})}case"kpi":return r.jsx(fe,{data:s.rows,config:e.chart,title:e.title,comparison:s.comparison});case"heatmap":return!e.chart.x||!e.chart.y?r.jsx("div",{className:"h-80 flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Missing axis configuration"}):r.jsx(te,{data:s.rows,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l});case"funnel":return r.jsx(re,{data:s.rows,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l});case"waterfall":return r.jsx(ee,{data:s.rows,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l});case"gauge":return r.jsx(Z,{data:s.rows,chartConfig:e.chart,theme:t==null?void 0:t.theme,loading:l});case"table":return r.jsx(J,{data:s.rows,columns:s.columns,chartConfig:e.chart,height:"100%",loading:l});default:return r.jsxs("div",{className:"h-80 flex items-center justify-center text-gray-500",children:['Chart type "',n,'" not yet implemented']})}};return r.jsxs("div",{className:"space-y-4",children:[g&&r.jsxs("div",{className:"flex items-center gap-2 text-sm",style:{color:"var(--yc-color-text-secondary)"},children:[r.jsx("button",{onClick:()=>{window.location.hash=`/charts/${g}`},className:"transition-colors hover:opacity-80",style:{color:"var(--yc-color-primary)"},children:g}),r.jsx("span",{children:"/"}),r.jsx("span",{className:"font-medium",style:{color:"var(--yc-color-text)"},children:e.title}),i&&r.jsxs("span",{style:{color:"var(--yc-color-text-muted)"},children:["(",i,")"]})]}),r.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[e.parameters.length>0?r.jsx(z,{parameters:e.parameters,chartName:a}):r.jsx("div",{}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ue,{chartName:a}),r.jsx(G,{resourceType:"chart",resourceName:a})]})]}),r.jsx(he,{title:e.title,description:e.description,loading:f,cached:s==null?void 0:s.meta.cached,durationMs:s==null?void 0:s.meta.durationMs,hasDrillDown:!!((V=e.drillDown)!=null&&V.chart),onRefresh:()=>h(a),children:r.jsx(K,{isLoading:l,error:N,data:s==null?void 0:s.rows,onRetry:()=>h(a),children:O()})}),w&&s&&r.jsx(X,{data:s.rows,columns:s.columns,drillDownColumns:($=e.drillDown)==null?void 0:$.columns,filterDisplay:i,chartName:a}),v&&((R=e.drillDown)==null?void 0:R.chart)&&r.jsx(Q,{x:v.x,y:v.y,targetChartTitle:e.drillDown.chart,onDrillDown:H,onClose:()=>A(null)})]})}function be({parsed:a}){const c=a.params.token,[e,o]=y.useState(null),[s,l]=y.useState(!1);return y.useEffect(()=>{if(!c){o("No share token provided");return}de.getPublicConfig(c).then(()=>l(!0)).catch(()=>o("This link has expired or been revoked"))},[c]),e?r.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:r.jsx("div",{className:"text-center",children:r.jsx("div",{className:"text-gray-400 text-lg",children:e})})}):s?r.jsxs("div",{className:"min-h-screen bg-gray-50",children:[r.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:a.type==="public_chart"?r.jsx(ve,{chartName:a.name}):r.jsx(xe,{dashboardId:a.name,initialTab:a.params.tab})}),r.jsx("div",{className:"text-center py-4 text-xs text-gray-400",children:"Shared via yamchart"})]}):r.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:r.jsx("div",{className:"text-gray-500",children:"Loading..."})})}export{be as PublicViewer};
@@ -0,0 +1 @@
1
+ import{u as g,j as e,A as h}from"./index-uxK7mlHt.js";import{a as o}from"./echarts-DtOYsfLX.js";function j(){const m=g(r=>r.setup),[a,b]=o.useState(""),[l,x]=o.useState(""),[t,p]=o.useState(""),[c,y]=o.useState(""),[n,s]=o.useState(""),[d,u]=o.useState(!1),f=async r=>{if(r.preventDefault(),s(""),t!==c){s("Passwords do not match");return}if(t.length<8){s("Password must be at least 8 characters");return}u(!0);try{await m(a,l,t)}catch(i){i instanceof h?s(i.message):s("An unexpected error occurred")}finally{u(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"var(--yc-color-background)"},children:e.jsxs("div",{className:"rounded-lg shadow-sm p-8 w-full max-w-md",style:{backgroundColor:"var(--yc-color-surface)",border:"1px solid var(--yc-color-border)"},children:[e.jsx("h1",{className:"text-2xl font-semibold mb-2",style:{color:"var(--yc-color-text)"},children:"Welcome to Yamchart"}),e.jsx("p",{className:"text-sm mb-6",style:{color:"var(--yc-color-text-secondary)"},children:"Create your admin account to get started."}),n&&e.jsx("div",{className:"text-sm rounded-md px-4 py-3 mb-4",style:{backgroundColor:"color-mix(in srgb, var(--yc-color-danger) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--yc-color-danger) 30%, transparent)",color:"var(--yc-color-danger)"},children:n}),e.jsxs("form",{onSubmit:f,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Name"}),e.jsx("input",{id:"name",type:"text",value:l,onChange:r=>x(r.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},placeholder:"Your Name"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"setup-email",className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Email"}),e.jsx("input",{id:"setup-email",type:"email",value:a,onChange:r=>b(r.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},placeholder:"admin@example.com"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"setup-password",className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Password"}),e.jsx("input",{id:"setup-password",type:"password",value:t,onChange:r=>p(r.target.value),required:!0,minLength:8,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},placeholder:"At least 8 characters"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Confirm Password"}),e.jsx("input",{id:"confirm-password",type:"password",value:c,onChange:r=>y(r.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},placeholder:"Confirm password"})]}),e.jsx("button",{type:"submit",disabled:d,className:"w-full py-2 px-4 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Creating account...":"Create Admin Account"})]})]})})}export{j as SetupWizard};
@@ -0,0 +1 @@
1
+ import{j as e,a as c}from"./index-uxK7mlHt.js";import{a as s}from"./echarts-DtOYsfLX.js";function h(){const[o,a]=s.useState([]),[l,d]=s.useState(!0),n=async()=>{try{const r=await c.listShareLinks();a(r.links)}catch(r){console.error("Failed to load share links:",r)}finally{d(!1)}};s.useEffect(()=>{n()},[]);const i=async r=>{try{await c.revokeShareLink(r),a(t=>t.filter(x=>x.id!==r))}catch(t){console.error("Failed to revoke share link:",t)}};return l?e.jsx("div",{className:"p-6",style:{color:"var(--yc-color-text-secondary)"},children:"Loading..."}):e.jsxs("div",{className:"p-6 max-w-4xl",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",style:{color:"var(--yc-color-text)"},children:"Shared Links"}),o.length===0?e.jsx("p",{className:"text-sm",style:{color:"var(--yc-color-text-secondary)"},children:"No active share links."}):e.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid var(--yc-color-border)"},children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"border-b",style:{backgroundColor:"var(--yc-color-input-bg)",borderColor:"var(--yc-color-border)",color:"var(--yc-color-text-secondary)"},children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Resource"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Type"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Created"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium",children:"Expires"}),e.jsx("th",{className:"px-4 py-2"})]})}),e.jsx("tbody",{children:o.map(r=>e.jsxs("tr",{className:"border-b last:border-0",style:{borderColor:"var(--yc-color-border)"},children:[e.jsx("td",{className:"px-4 py-3 font-medium",style:{color:"var(--yc-color-text)"},children:r.resource_name}),e.jsx("td",{className:"px-4 py-3 capitalize",style:{color:"var(--yc-color-text-secondary)"},children:r.resource_type}),e.jsx("td",{className:"px-4 py-3",style:{color:"var(--yc-color-text-secondary)"},children:new Date(r.created_at).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3",style:{color:"var(--yc-color-text-secondary)"},children:r.expires_at?new Date(r.expires_at).toLocaleDateString():"Never"}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsx("button",{onClick:()=>i(r.id),className:"text-sm hover:opacity-80",style:{color:"var(--yc-color-danger)"},children:"Revoke"})})]},r.id))})]})})]})}export{h as ShareManagement};
@@ -0,0 +1 @@
1
+ import{j as e,a as p,A as j}from"./index-uxK7mlHt.js";import{a as s}from"./echarts-DtOYsfLX.js";function O(){var A;const[i,N]=s.useState([]),[b,C]=s.useState(!0),[v,h]=s.useState(!1),[x,k]=s.useState(""),[l,g]=s.useState(null),[u,c]=s.useState([]),[m,y]=s.useState(!1),d=async()=>{try{const{users:r}=await p.authListUsers();N(r)}catch{k("Failed to load users")}finally{C(!1)}};s.useEffect(()=>{d()},[]);const a=async(r,t)=>{try{await p.authUpdateUser(r,{role:t}),await d()}catch(o){alert(o instanceof j?o.message:"Failed to update role")}},f=async(r,t)=>{if(confirm(`Delete user "${t}"? This cannot be undone.`))try{await p.authDeleteUser(r),await d()}catch(o){alert(o instanceof j?o.message:"Failed to delete user")}},U=r=>{if(l===r.id)g(null),c([]);else{g(r.id);const t=JSON.parse(r.attributes||"{}");c(Object.entries(t).map(([o,n])=>({key:o,value:n})))}},w=(r,t,o)=>{c(n=>n.map((S,M)=>M===r?{...S,[t]:o}:S))},E=()=>{c(r=>[...r,{key:"",value:""}])},L=r=>{c(t=>t.filter((o,n)=>n!==r))},D=async()=>{if(l){y(!0);try{const r={};for(const{key:t,value:o}of u){const n=t.trim();n&&(r[n]=o)}await p.authUpdateUser(l,{attributes:r}),await d(),c(Object.entries(r).map(([t,o])=>({key:t,value:o})))}catch(r){alert(r instanceof j?r.message:"Failed to save attributes")}finally{y(!1)}}};return b?e.jsx("div",{className:"p-6",style:{color:"var(--yc-color-text-secondary)"},children:"Loading users..."}):e.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h1",{className:"text-xl font-semibold",style:{color:"var(--yc-color-text)"},children:"User Management"}),e.jsx("button",{onClick:()=>h(!0),className:"px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700",children:"Add User"})]}),x&&e.jsx("div",{className:"text-sm rounded-md px-4 py-3 mb-4",style:{backgroundColor:"color-mix(in srgb, var(--yc-color-danger) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--yc-color-danger) 30%, transparent)",color:"var(--yc-color-danger)"},children:x}),e.jsx("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:"var(--yc-color-surface)",border:"1px solid var(--yc-color-border)"},children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"border-b",style:{backgroundColor:"var(--yc-color-input-bg)",borderColor:"var(--yc-color-border)",color:"var(--yc-color-text-secondary)"},children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium uppercase",children:"Name"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium uppercase",children:"Email"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium uppercase",children:"Role"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium uppercase",children:"Created"}),e.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium uppercase",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y",style:{borderColor:"var(--yc-color-border)"},children:i.map(r=>e.jsxs("tr",{className:"group",children:[e.jsx("td",{className:"px-4 py-3 text-sm",style:{color:"var(--yc-color-text)"},children:r.name}),e.jsx("td",{className:"px-4 py-3 text-sm",style:{color:"var(--yc-color-text-secondary)"},children:r.email}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("select",{value:r.role,onChange:t=>a(r.id,t.target.value),className:"text-sm border rounded px-2 py-1",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},children:[e.jsx("option",{value:"admin",children:"Admin"}),e.jsx("option",{value:"editor",children:"Editor"}),e.jsx("option",{value:"viewer",children:"Viewer"})]})}),e.jsx("td",{className:"px-4 py-3 text-sm",style:{color:"var(--yc-color-text-secondary)"},children:new Date(r.created_at).toLocaleDateString()}),e.jsxs("td",{className:"px-4 py-3 text-right space-x-3",children:[e.jsx("button",{onClick:()=>U(r),className:"text-sm hover:opacity-80",style:{color:"var(--yc-color-primary)"},children:l===r.id?"Hide Attrs":"Attrs"}),e.jsx("button",{onClick:()=>f(r.id,r.name),className:"text-sm hover:opacity-80",style:{color:"var(--yc-color-danger)"},children:"Delete"})]})]},r.id))})]})}),l&&e.jsxs("div",{className:"mt-4 rounded-lg p-4",style:{backgroundColor:"var(--yc-color-surface)",border:"1px solid var(--yc-color-border)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h3",{className:"text-sm font-medium",style:{color:"var(--yc-color-text-secondary)"},children:["Attributes for ",(A=i.find(r=>r.id===l))==null?void 0:A.name]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:E,className:"px-3 py-1 text-xs font-medium rounded hover:opacity-80",style:{color:"var(--yc-color-primary)",border:"1px solid color-mix(in srgb, var(--yc-color-primary) 50%, transparent)"},children:"Add Attribute"}),e.jsx("button",{onClick:D,disabled:m,className:"px-3 py-1 text-xs font-medium text-white bg-blue-600 rounded hover:bg-blue-700 disabled:opacity-50",children:m?"Saving...":"Save"})]})]}),u.length===0?e.jsx("p",{className:"text-sm",style:{color:"var(--yc-color-text-muted)"},children:'No attributes. Click "Add Attribute" to define key-value pairs for row-level security.'}):e.jsx("div",{className:"space-y-2",children:u.map((r,t)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",placeholder:"Key (e.g. department)",value:r.key,onChange:o=>w(t,"key",o.target.value),className:"flex-1 px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"}}),e.jsx("input",{type:"text",placeholder:"Value (e.g. Sales)",value:r.value,onChange:o=>w(t,"value",o.target.value),className:"flex-1 px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"}}),e.jsx("button",{onClick:()=>L(t),className:"p-1.5 hover:opacity-80",style:{color:"var(--yc-color-text-muted)"},title:"Remove attribute",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},t))})]}),v&&e.jsx(R,{onClose:()=>h(!1),onCreated:d})]})}function R({onClose:i,onCreated:N}){const[b,C]=s.useState(""),[v,h]=s.useState(""),[x,k]=s.useState(""),[l,g]=s.useState("viewer"),[u,c]=s.useState(""),[m,y]=s.useState(!1),d=async a=>{a.preventDefault(),c(""),y(!0);try{await p.authCreateUser({email:b,name:v,password:x,role:l}),N(),i()}catch(f){c(f instanceof j?f.message:"Failed to create user")}finally{y(!1)}};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:i,children:e.jsxs("div",{className:"rounded-lg shadow-lg p-6 w-full max-w-md",style:{backgroundColor:"var(--yc-color-surface)"},onClick:a=>a.stopPropagation(),children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",style:{color:"var(--yc-color-text)"},children:"Add User"}),u&&e.jsx("div",{className:"text-sm rounded-md px-4 py-3 mb-4",style:{backgroundColor:"color-mix(in srgb, var(--yc-color-danger) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--yc-color-danger) 30%, transparent)",color:"var(--yc-color-danger)"},children:u}),e.jsxs("form",{onSubmit:d,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Name"}),e.jsx("input",{type:"text",value:v,onChange:a=>h(a.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"}})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Email"}),e.jsx("input",{type:"email",value:b,onChange:a=>C(a.target.value),required:!0,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"}})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Temporary Password"}),e.jsx("input",{type:"password",value:x,onChange:a=>k(a.target.value),required:!0,minLength:8,className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"}})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",style:{color:"var(--yc-color-text-secondary)"},children:"Role"}),e.jsxs("select",{value:l,onChange:a=>g(a.target.value),className:"w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:"var(--yc-color-input-bg)",color:"var(--yc-color-text)",borderColor:"var(--yc-color-border)"},children:[e.jsx("option",{value:"viewer",children:"Viewer"}),e.jsx("option",{value:"editor",children:"Editor"}),e.jsx("option",{value:"admin",children:"Admin"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:i,className:"px-4 py-2 text-sm hover:bg-black/5 rounded-md",style:{color:"var(--yc-color-text-secondary)"},children:"Cancel"}),e.jsx("button",{type:"submit",disabled:m,className:"px-4 py-2 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:opacity-50",children:m?"Creating...":"Create User"})]})]})]})})}export{O as UserManagement};