jvs-ppt-ui 0.0.34 → 0.0.36
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/lib/jvs-ppt-ui.es.js +22847 -22658
- package/dist/lib/jvs-ppt-ui.umd.js +117 -117
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CanvasArea.vue +34 -15
- package/src/components/PresentationGroupChild.vue +11 -1
- package/src/components/PresentationMode.vue +10 -1
- package/src/components/SidebarLeft.vue +3354 -3212
- package/src/components/SidebarRight.vue +39 -1
- package/src/components/canvas/elements/CanvasTextElement.vue +4 -0
- package/src/components/sidebar/panels/LayoutThumbSvg.vue +130 -57
- package/src/components/sidebar/panels/SidebarChartFormatPanel.vue +676 -3
- package/src/components/sidebar/panels/SidebarDesignPanel.vue +7 -14
- package/src/composables/canvas/useCanvasContextMenu.ts +1 -1
- package/src/composables/sidebar/useSidebarChart.ts +88 -39
- package/src/composables/sidebar/useSidebarDesign.ts +2 -1
- package/src/composables/sidebar/useSidebarElementTransform.ts +1 -1
- package/src/composables/useSlides.ts +320 -72
- package/src/configs/slideTemplates.ts +7 -3
- package/src/style.css +3 -3
- package/src/utils/canvas/elementStyles.ts +11 -1
|
@@ -77,6 +77,12 @@ const props = defineProps<{
|
|
|
77
77
|
reflectionSize?: number
|
|
78
78
|
reflectionOpacity?: number
|
|
79
79
|
reflectionBlur?: number
|
|
80
|
+
// Data tab props
|
|
81
|
+
chartActiveTab?: 'chart' | 'data'
|
|
82
|
+
labels?: string[]
|
|
83
|
+
datasets?: Array<{ label: string; data: number[] }>
|
|
84
|
+
csvText?: string
|
|
85
|
+
editMode?: 'table' | 'csv'
|
|
80
86
|
}>()
|
|
81
87
|
|
|
82
88
|
const emit = defineEmits<{
|
|
@@ -101,6 +107,18 @@ const emit = defineEmits<{
|
|
|
101
107
|
(e: 'update:chartGridColor', val: string): void
|
|
102
108
|
(e: 'update:chartTextColor', val: string): void
|
|
103
109
|
(e: 'selectChartPalette', palette: any): void
|
|
110
|
+
// Data tab emits
|
|
111
|
+
(e: 'update:labels', val: string[]): void
|
|
112
|
+
(e: 'update:datasets', val: Array<{ label: string; data: number[] }>): void
|
|
113
|
+
(e: 'update:csvText', val: string): void
|
|
114
|
+
(e: 'update:editMode', val: 'table' | 'csv'): void
|
|
115
|
+
(e: 'add-row'): void
|
|
116
|
+
(e: 'remove-row', index: number): void
|
|
117
|
+
(e: 'add-series'): void
|
|
118
|
+
(e: 'remove-series', index: number): void
|
|
119
|
+
(e: 'transpose'): void
|
|
120
|
+
(e: 'sync-from-table'): void
|
|
121
|
+
(e: 'sync-from-csv', text: string): void
|
|
104
122
|
// Fill
|
|
105
123
|
(e: 'update:isFillEnabled', val: boolean): void
|
|
106
124
|
(e: 'update:isFillExpanded', val: boolean): void
|
|
@@ -580,16 +598,110 @@ function onSelectFillColor(color: string) {
|
|
|
580
598
|
emit('update:fillOpacity', 100)
|
|
581
599
|
}
|
|
582
600
|
}
|
|
601
|
+
|
|
602
|
+
// --- 编辑数据 Tab 专属逻辑 ---
|
|
603
|
+
const effectiveLabels = computed(() => props.labels || [])
|
|
604
|
+
const effectiveDatasets = computed(() => props.datasets || [])
|
|
605
|
+
const effectiveEditMode = computed(() => props.editMode || 'table')
|
|
606
|
+
const effectiveCsvText = computed(() => props.csvText || '')
|
|
607
|
+
|
|
608
|
+
const primarySeriesTotal = computed(() => {
|
|
609
|
+
const primaryData = effectiveDatasets.value[0]?.data || []
|
|
610
|
+
return primaryData.reduce((acc, v) => {
|
|
611
|
+
const n = Number(v)
|
|
612
|
+
return acc + (isNaN(n) ? 0 : Math.max(0, n))
|
|
613
|
+
}, 0)
|
|
614
|
+
})
|
|
615
|
+
|
|
616
|
+
function getRowPercentage(rIdx: number): string {
|
|
617
|
+
const total = primarySeriesTotal.value
|
|
618
|
+
if (total <= 0) return '0%'
|
|
619
|
+
const val = Math.max(0, Number(effectiveDatasets.value[0]?.data?.[rIdx]) || 0)
|
|
620
|
+
return `${Math.round((val / total) * 100)}%`
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
const summaryStats = computed(() => {
|
|
624
|
+
const primaryData = effectiveDatasets.value[0]?.data || []
|
|
625
|
+
const nums = primaryData.map(v => {
|
|
626
|
+
const n = Number(v)
|
|
627
|
+
return isNaN(n) ? 0 : Math.max(0, n)
|
|
628
|
+
})
|
|
629
|
+
const total = nums.reduce((acc, v) => acc + v, 0)
|
|
630
|
+
const count = nums.length || 1
|
|
631
|
+
const avg = total / count
|
|
632
|
+
const maxVal = nums.length ? Math.max(...nums) : 0
|
|
633
|
+
const maxPct = total > 0 ? Math.round((maxVal / total) * 100) : 0
|
|
634
|
+
|
|
635
|
+
return {
|
|
636
|
+
total: Number.isInteger(total) ? total.toString() : total.toFixed(1),
|
|
637
|
+
avg: avg.toFixed(1),
|
|
638
|
+
maxPct: `${maxPct}%`
|
|
639
|
+
}
|
|
640
|
+
})
|
|
641
|
+
|
|
642
|
+
function getSeriesColor(idx: number): string {
|
|
643
|
+
const palette = props.currentChartColors?.length
|
|
644
|
+
? props.currentChartColors
|
|
645
|
+
: ['#4f46e5', '#06b6d4', '#f59e0b', '#10b981', '#ec4899', '#8b5cf6', '#ef4444', '#14b8a6']
|
|
646
|
+
return palette[idx % palette.length]
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
function handleLabelInput(idx: number, val: string) {
|
|
650
|
+
const next = [...effectiveLabels.value]
|
|
651
|
+
next[idx] = val
|
|
652
|
+
emit('update:labels', next)
|
|
653
|
+
emit('sync-from-table')
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
function handleSeriesNameInput(sIdx: number, val: string) {
|
|
657
|
+
const next = effectiveDatasets.value.map((ds, i) => (i === sIdx ? { ...ds, label: val } : ds))
|
|
658
|
+
emit('update:datasets', next)
|
|
659
|
+
emit('sync-from-table')
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
function handleCellInput(sIdx: number, rIdx: number, rawVal: string) {
|
|
663
|
+
const parsed = parseFloat(rawVal)
|
|
664
|
+
const numVal = isNaN(parsed) ? 0 : parsed
|
|
665
|
+
const next = effectiveDatasets.value.map((ds, i) => {
|
|
666
|
+
if (i !== sIdx) return ds
|
|
667
|
+
const nextData = [...ds.data]
|
|
668
|
+
nextData[rIdx] = numVal
|
|
669
|
+
return { ...ds, data: nextData }
|
|
670
|
+
})
|
|
671
|
+
emit('update:datasets', next)
|
|
672
|
+
emit('sync-from-table')
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
function handleCsvInput(val: string) {
|
|
676
|
+
emit('update:csvText', val)
|
|
677
|
+
emit('sync-from-csv', val)
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
function setPrimarySeries(sIdx: number) {
|
|
681
|
+
if (sIdx <= 0 || sIdx >= effectiveDatasets.value.length) return
|
|
682
|
+
const next = [...effectiveDatasets.value]
|
|
683
|
+
const [picked] = next.splice(sIdx, 1)
|
|
684
|
+
next.unshift(picked)
|
|
685
|
+
emit('update:datasets', next)
|
|
686
|
+
emit('sync-from-table')
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
function keepOnlyPrimarySeries() {
|
|
690
|
+
if (effectiveDatasets.value.length <= 1) return
|
|
691
|
+
emit('update:datasets', [effectiveDatasets.value[0]])
|
|
692
|
+
emit('sync-from-table')
|
|
693
|
+
}
|
|
583
694
|
</script>
|
|
584
695
|
|
|
585
696
|
<template>
|
|
586
697
|
<div class="sidebar-chart-format-panel flex-column" style="display: flex; flex-direction: column;">
|
|
698
|
+
<template v-if="chartActiveTab !== 'data'">
|
|
587
699
|
<!-- Alignment Row -->
|
|
588
700
|
<SidebarAlignGroup @align-left="emit('alignLeft')" @align-center="emit('alignCenter')"
|
|
589
701
|
@align-right="emit('alignRight')" @align-top="emit('alignTop')" @align-middle="emit('alignMiddle')"
|
|
590
702
|
@align-bottom="emit('alignBottom')" />
|
|
591
703
|
|
|
592
|
-
<!-- Position & Dimensions without rotate and flips
|
|
704
|
+
<!-- Position & Dimensions without rotate and flips -->
|
|
593
705
|
<SidebarPositionGroup :element-x="elementX" :element-y="elementY" :element-w="elementW" :element-h="elementH"
|
|
594
706
|
:element-rotate="elementRotate" :is-fixed-ratio="isFixedRatio" :is-flip-h="isFlipH" :is-flip-v="isFlipV"
|
|
595
707
|
:show-rotate="false" :show-flips="false" @update:element-x="emit('update:elementX', $event)"
|
|
@@ -597,8 +709,8 @@ function onSelectFillColor(color: string) {
|
|
|
597
709
|
@update:element-h="emit('update:elementH', $event)" @update:element-rotate="emit('update:elementRotate', $event)"
|
|
598
710
|
@update:is-fixed-ratio="emit('update:isFixedRatio', $event)" @toggle-flip-h="emit('toggleFlipH')"
|
|
599
711
|
@toggle-flip-v="emit('toggleFlipV')" @adjust-z-index="emit('adjustZIndex', $event)">
|
|
600
|
-
<!-- Edit Chart Data Button
|
|
601
|
-
<el-button type="primary" class="edit-chart-data-btn" @click="emit('openChartDataDialog')">
|
|
712
|
+
<!-- Edit Chart Data Button (已抽离为顶部「编辑数据」独立 Tab,此处按钮隐藏保留) -->
|
|
713
|
+
<el-button v-if="false" type="primary" class="edit-chart-data-btn" @click="emit('openChartDataDialog')">
|
|
602
714
|
编辑数据
|
|
603
715
|
</el-button>
|
|
604
716
|
</SidebarPositionGroup>
|
|
@@ -1080,6 +1192,202 @@ function onSelectFillColor(color: string) {
|
|
|
1080
1192
|
@update:reflection-opacity="emit('update:reflectionOpacity', $event)"
|
|
1081
1193
|
@update:reflection-blur="emit('update:reflectionBlur', $event)"
|
|
1082
1194
|
/>
|
|
1195
|
+
</template>
|
|
1196
|
+
|
|
1197
|
+
<!-- 编辑数据独立 Tab 页面 -->
|
|
1198
|
+
<div v-else class="chart-data-tab-panel">
|
|
1199
|
+
<!-- 顶部视图切换与快捷操作栏 -->
|
|
1200
|
+
<div class="cdt-top-bar">
|
|
1201
|
+
<div class="cdt-mode-segmented">
|
|
1202
|
+
<button
|
|
1203
|
+
type="button"
|
|
1204
|
+
class="cdt-seg-btn"
|
|
1205
|
+
:class="{ active: effectiveEditMode === 'table' }"
|
|
1206
|
+
@click="emit('update:editMode', 'table')"
|
|
1207
|
+
>
|
|
1208
|
+
表格编辑
|
|
1209
|
+
</button>
|
|
1210
|
+
<button
|
|
1211
|
+
type="button"
|
|
1212
|
+
class="cdt-seg-btn"
|
|
1213
|
+
:class="{ active: effectiveEditMode === 'csv' }"
|
|
1214
|
+
@click="emit('update:editMode', 'csv')"
|
|
1215
|
+
>
|
|
1216
|
+
CSV 粘贴
|
|
1217
|
+
</button>
|
|
1218
|
+
</div>
|
|
1219
|
+
|
|
1220
|
+
<div v-if="effectiveEditMode === 'table'" class="cdt-action-row">
|
|
1221
|
+
<button type="button" class="cdt-action-btn" @click="emit('add-row')">
|
|
1222
|
+
+ 新增分类
|
|
1223
|
+
</button>
|
|
1224
|
+
<el-tooltip
|
|
1225
|
+
:disabled="!isPieOrDonut"
|
|
1226
|
+
content="饼图 / 环图 / 玫瑰图仅展示单系列占比,切换为柱状图或折线图后可添加多系列"
|
|
1227
|
+
placement="top"
|
|
1228
|
+
>
|
|
1229
|
+
<span style="flex: 1; display: flex;">
|
|
1230
|
+
<button
|
|
1231
|
+
type="button"
|
|
1232
|
+
class="cdt-action-btn"
|
|
1233
|
+
:class="{ 'is-disabled': isPieOrDonut }"
|
|
1234
|
+
:disabled="isPieOrDonut"
|
|
1235
|
+
style="width: 100%;"
|
|
1236
|
+
@click="!isPieOrDonut && emit('add-series')"
|
|
1237
|
+
>
|
|
1238
|
+
+ 新增系列
|
|
1239
|
+
</button>
|
|
1240
|
+
</span>
|
|
1241
|
+
</el-tooltip>
|
|
1242
|
+
<button
|
|
1243
|
+
v-if="!isPieOrDonut"
|
|
1244
|
+
type="button"
|
|
1245
|
+
class="cdt-action-btn cdt-transpose-btn"
|
|
1246
|
+
title="一键行列转置"
|
|
1247
|
+
@click="emit('transpose')"
|
|
1248
|
+
>
|
|
1249
|
+
⇄ 转置
|
|
1250
|
+
</button>
|
|
1251
|
+
</div>
|
|
1252
|
+
</div>
|
|
1253
|
+
|
|
1254
|
+
<!-- 单系列图表多系列提示横幅 -->
|
|
1255
|
+
<div v-if="isPieOrDonut && effectiveDatasets.length > 1" class="cdt-single-alert">
|
|
1256
|
+
<span class="cdt-alert-text">
|
|
1257
|
+
当前图表仅渲染第 1 列({{ effectiveDatasets[0]?.label || '系列1' }})占比
|
|
1258
|
+
</span>
|
|
1259
|
+
<button type="button" class="cdt-alert-clean-btn" @click="keepOnlyPrimarySeries">
|
|
1260
|
+
仅留单列
|
|
1261
|
+
</button>
|
|
1262
|
+
</div>
|
|
1263
|
+
|
|
1264
|
+
<!-- 表格编辑视图 -->
|
|
1265
|
+
<div v-if="effectiveEditMode === 'table'" class="cdt-table-container">
|
|
1266
|
+
<table class="cdt-table">
|
|
1267
|
+
<thead>
|
|
1268
|
+
<tr>
|
|
1269
|
+
<th class="cdt-col-idx">#</th>
|
|
1270
|
+
<th class="cdt-col-label">分类标签</th>
|
|
1271
|
+
<th
|
|
1272
|
+
v-for="(ds, sIdx) in effectiveDatasets"
|
|
1273
|
+
:key="sIdx"
|
|
1274
|
+
class="cdt-col-series"
|
|
1275
|
+
:class="{ 'is-ignored': isPieOrDonut && sIdx > 0 }"
|
|
1276
|
+
>
|
|
1277
|
+
<div class="cdt-series-th">
|
|
1278
|
+
<span
|
|
1279
|
+
class="cdt-series-dot"
|
|
1280
|
+
:style="{ background: isPieOrDonut ? (sIdx === 0 ? getSeriesColor(0) : '#cbd5e1') : getSeriesColor(sIdx) }"
|
|
1281
|
+
></span>
|
|
1282
|
+
<input
|
|
1283
|
+
type="text"
|
|
1284
|
+
:value="ds.label"
|
|
1285
|
+
class="cdt-series-input"
|
|
1286
|
+
placeholder="系列名"
|
|
1287
|
+
@input="handleSeriesNameInput(sIdx, ($event.target as HTMLInputElement).value)"
|
|
1288
|
+
/>
|
|
1289
|
+
<button
|
|
1290
|
+
v-if="isPieOrDonut && sIdx > 0"
|
|
1291
|
+
type="button"
|
|
1292
|
+
class="cdt-promote-btn"
|
|
1293
|
+
title="设为当前展示系列"
|
|
1294
|
+
@click="setPrimarySeries(sIdx)"
|
|
1295
|
+
>展示</button>
|
|
1296
|
+
<button
|
|
1297
|
+
v-if="effectiveDatasets.length > 1"
|
|
1298
|
+
type="button"
|
|
1299
|
+
class="cdt-del-btn"
|
|
1300
|
+
title="删除该系列"
|
|
1301
|
+
@click="emit('remove-series', sIdx)"
|
|
1302
|
+
>×</button>
|
|
1303
|
+
</div>
|
|
1304
|
+
</th>
|
|
1305
|
+
<th v-if="isPieOrDonut" class="cdt-col-pct">占比</th>
|
|
1306
|
+
<th class="cdt-col-op"></th>
|
|
1307
|
+
</tr>
|
|
1308
|
+
</thead>
|
|
1309
|
+
<tbody>
|
|
1310
|
+
<tr v-for="(lbl, rIdx) in effectiveLabels" :key="rIdx">
|
|
1311
|
+
<td class="cdt-col-idx">{{ rIdx + 1 }}</td>
|
|
1312
|
+
<td class="cdt-col-label">
|
|
1313
|
+
<div class="cdt-cell-box">
|
|
1314
|
+
<span
|
|
1315
|
+
v-if="isPieOrDonut"
|
|
1316
|
+
class="cdt-row-color-dot"
|
|
1317
|
+
:style="{ background: getSeriesColor(rIdx) }"
|
|
1318
|
+
></span>
|
|
1319
|
+
<input
|
|
1320
|
+
type="text"
|
|
1321
|
+
:value="lbl"
|
|
1322
|
+
class="cdt-cell-input"
|
|
1323
|
+
placeholder="分类名"
|
|
1324
|
+
@input="handleLabelInput(rIdx, ($event.target as HTMLInputElement).value)"
|
|
1325
|
+
/>
|
|
1326
|
+
</div>
|
|
1327
|
+
</td>
|
|
1328
|
+
<td
|
|
1329
|
+
v-for="(ds, sIdx) in effectiveDatasets"
|
|
1330
|
+
:key="sIdx"
|
|
1331
|
+
class="cdt-col-series"
|
|
1332
|
+
:class="{ 'is-ignored': isPieOrDonut && sIdx > 0 }"
|
|
1333
|
+
>
|
|
1334
|
+
<div class="cdt-cell-box">
|
|
1335
|
+
<input
|
|
1336
|
+
type="number"
|
|
1337
|
+
step="any"
|
|
1338
|
+
:value="ds.data[rIdx] ?? 0"
|
|
1339
|
+
class="cdt-cell-input is-num"
|
|
1340
|
+
@input="handleCellInput(sIdx, rIdx, ($event.target as HTMLInputElement).value)"
|
|
1341
|
+
/>
|
|
1342
|
+
</div>
|
|
1343
|
+
</td>
|
|
1344
|
+
<td v-if="isPieOrDonut" class="cdt-col-pct">
|
|
1345
|
+
<span class="cdt-pct-tag">{{ getRowPercentage(rIdx) }}</span>
|
|
1346
|
+
</td>
|
|
1347
|
+
<td class="cdt-col-op">
|
|
1348
|
+
<button
|
|
1349
|
+
type="button"
|
|
1350
|
+
class="cdt-del-btn"
|
|
1351
|
+
:disabled="effectiveLabels.length <= 1"
|
|
1352
|
+
title="删除该行"
|
|
1353
|
+
@click="emit('remove-row', rIdx)"
|
|
1354
|
+
>×</button>
|
|
1355
|
+
</td>
|
|
1356
|
+
</tr>
|
|
1357
|
+
</tbody>
|
|
1358
|
+
</table>
|
|
1359
|
+
</div>
|
|
1360
|
+
|
|
1361
|
+
<!-- CSV 批量粘贴视图 -->
|
|
1362
|
+
<div v-else class="cdt-csv-container">
|
|
1363
|
+
<div class="cdt-csv-tip">
|
|
1364
|
+
格式:分类标签, 系列1数值, 系列2数值...(支持逗号或 Tab 分隔,修改后实时同步画布)
|
|
1365
|
+
</div>
|
|
1366
|
+
<textarea
|
|
1367
|
+
:value="effectiveCsvText"
|
|
1368
|
+
class="cdt-csv-textarea"
|
|
1369
|
+
rows="10"
|
|
1370
|
+
placeholder="分类A, 35 分类B, 25 分类C, 20"
|
|
1371
|
+
@input="handleCsvInput(($event.target as HTMLTextAreaElement).value)"
|
|
1372
|
+
></textarea>
|
|
1373
|
+
</div>
|
|
1374
|
+
|
|
1375
|
+
<!-- 底部实时汇总统计卡片 -->
|
|
1376
|
+
<div class="cdt-stats-row">
|
|
1377
|
+
<div class="cdt-stat-item">
|
|
1378
|
+
<span class="cdt-stat-label">{{ isPieOrDonut ? '数值总计' : '首系列总计' }}</span>
|
|
1379
|
+
<span class="cdt-stat-val">{{ summaryStats.total }}</span>
|
|
1380
|
+
</div>
|
|
1381
|
+
<div class="cdt-stat-item">
|
|
1382
|
+
<span class="cdt-stat-label">平均值</span>
|
|
1383
|
+
<span class="cdt-stat-val">{{ summaryStats.avg }}</span>
|
|
1384
|
+
</div>
|
|
1385
|
+
<div class="cdt-stat-item">
|
|
1386
|
+
<span class="cdt-stat-label">最高项占比</span>
|
|
1387
|
+
<span class="cdt-stat-val is-primary">{{ summaryStats.maxPct }}</span>
|
|
1388
|
+
</div>
|
|
1389
|
+
</div>
|
|
1390
|
+
</div>
|
|
1083
1391
|
</div>
|
|
1084
1392
|
</template>
|
|
1085
1393
|
|
|
@@ -1476,4 +1784,369 @@ function onSelectFillColor(color: string) {
|
|
|
1476
1784
|
align-items: center !important;
|
|
1477
1785
|
height: 100% !important;
|
|
1478
1786
|
}
|
|
1787
|
+
|
|
1788
|
+
/* 编辑数据独立 Tab 面板样式 */
|
|
1789
|
+
.chart-data-tab-panel {
|
|
1790
|
+
display: flex;
|
|
1791
|
+
flex-direction: column;
|
|
1792
|
+
gap: 10px;
|
|
1793
|
+
padding: 12px 14px 20px;
|
|
1794
|
+
box-sizing: border-box;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.cdt-top-bar {
|
|
1798
|
+
display: flex;
|
|
1799
|
+
flex-direction: column;
|
|
1800
|
+
gap: 8px;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.cdt-mode-segmented {
|
|
1804
|
+
display: grid;
|
|
1805
|
+
grid-template-columns: 1fr 1fr;
|
|
1806
|
+
gap: 4px;
|
|
1807
|
+
padding: 3px;
|
|
1808
|
+
background: #f1f5f9;
|
|
1809
|
+
border-radius: 8px;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
.cdt-seg-btn {
|
|
1813
|
+
height: 28px;
|
|
1814
|
+
border: none;
|
|
1815
|
+
border-radius: 6px;
|
|
1816
|
+
background: transparent;
|
|
1817
|
+
font-size: 12px;
|
|
1818
|
+
font-weight: 500;
|
|
1819
|
+
color: #64748b;
|
|
1820
|
+
cursor: pointer;
|
|
1821
|
+
transition: all 0.15s ease;
|
|
1822
|
+
|
|
1823
|
+
&:hover:not(.active) {
|
|
1824
|
+
color: #334155;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
&.active {
|
|
1828
|
+
background: #ffffff;
|
|
1829
|
+
color: #2563eb;
|
|
1830
|
+
font-weight: 600;
|
|
1831
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.cdt-action-row {
|
|
1836
|
+
display: flex;
|
|
1837
|
+
align-items: center;
|
|
1838
|
+
gap: 6px;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
.cdt-action-btn {
|
|
1842
|
+
flex: 1;
|
|
1843
|
+
height: 28px;
|
|
1844
|
+
padding: 0 8px;
|
|
1845
|
+
border-radius: 6px;
|
|
1846
|
+
border: 1px solid #e2e8f0;
|
|
1847
|
+
background: #ffffff;
|
|
1848
|
+
color: #334155;
|
|
1849
|
+
font-size: 12px;
|
|
1850
|
+
font-weight: 500;
|
|
1851
|
+
cursor: pointer;
|
|
1852
|
+
transition: all 0.15s ease;
|
|
1853
|
+
white-space: nowrap;
|
|
1854
|
+
|
|
1855
|
+
&:hover:not(.is-disabled) {
|
|
1856
|
+
border-color: #2563eb;
|
|
1857
|
+
color: #2563eb;
|
|
1858
|
+
background: #eff6ff;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
&.is-disabled {
|
|
1862
|
+
opacity: 0.45;
|
|
1863
|
+
cursor: not-allowed;
|
|
1864
|
+
background: #f8fafc;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
&.cdt-transpose-btn {
|
|
1868
|
+
flex: 0 0 auto;
|
|
1869
|
+
padding: 0 10px;
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
.cdt-single-alert {
|
|
1874
|
+
display: flex;
|
|
1875
|
+
align-items: center;
|
|
1876
|
+
justify-content: space-between;
|
|
1877
|
+
gap: 6px;
|
|
1878
|
+
padding: 6px 8px;
|
|
1879
|
+
border-radius: 6px;
|
|
1880
|
+
background: #eff6ff;
|
|
1881
|
+
border: 1px solid #bfdbfe;
|
|
1882
|
+
font-size: 11px;
|
|
1883
|
+
color: #1e40af;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
.cdt-alert-text {
|
|
1887
|
+
line-height: 1.35;
|
|
1888
|
+
flex: 1;
|
|
1889
|
+
min-width: 0;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
.cdt-alert-clean-btn {
|
|
1893
|
+
flex-shrink: 0;
|
|
1894
|
+
padding: 3px 6px;
|
|
1895
|
+
border-radius: 4px;
|
|
1896
|
+
border: 1px solid #93c5fd;
|
|
1897
|
+
background: #ffffff;
|
|
1898
|
+
color: #2563eb;
|
|
1899
|
+
font-size: 11px;
|
|
1900
|
+
font-weight: 500;
|
|
1901
|
+
cursor: pointer;
|
|
1902
|
+
|
|
1903
|
+
&:hover {
|
|
1904
|
+
background: #dbeafe;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
.cdt-table-container {
|
|
1909
|
+
width: 100%;
|
|
1910
|
+
overflow-x: auto;
|
|
1911
|
+
border: 1px solid #e2e8f0;
|
|
1912
|
+
border-radius: 8px;
|
|
1913
|
+
background: #ffffff;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.cdt-table {
|
|
1917
|
+
width: 100%;
|
|
1918
|
+
border-collapse: collapse;
|
|
1919
|
+
font-size: 12px;
|
|
1920
|
+
|
|
1921
|
+
th,
|
|
1922
|
+
td {
|
|
1923
|
+
padding: 5px 4px;
|
|
1924
|
+
border-bottom: 1px solid #f1f5f9;
|
|
1925
|
+
text-align: left;
|
|
1926
|
+
vertical-align: middle;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
th {
|
|
1930
|
+
background: #f8fafc;
|
|
1931
|
+
color: #475569;
|
|
1932
|
+
font-weight: 600;
|
|
1933
|
+
font-size: 11px;
|
|
1934
|
+
white-space: nowrap;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
tbody tr:last-child td {
|
|
1938
|
+
border-bottom: none;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
.cdt-col-idx {
|
|
1943
|
+
width: 20px;
|
|
1944
|
+
text-align: center !important;
|
|
1945
|
+
color: #94a3b8;
|
|
1946
|
+
font-size: 11px;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
.cdt-col-label {
|
|
1950
|
+
min-width: 78px;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
.cdt-col-series {
|
|
1954
|
+
min-width: 68px;
|
|
1955
|
+
|
|
1956
|
+
&.is-ignored {
|
|
1957
|
+
opacity: 0.48;
|
|
1958
|
+
background: #f8fafc;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
.cdt-col-pct {
|
|
1963
|
+
width: 38px;
|
|
1964
|
+
text-align: center !important;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
.cdt-col-op {
|
|
1968
|
+
width: 20px;
|
|
1969
|
+
text-align: center !important;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
.cdt-series-th {
|
|
1973
|
+
display: flex;
|
|
1974
|
+
align-items: center;
|
|
1975
|
+
gap: 3px;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
.cdt-series-dot,
|
|
1979
|
+
.cdt-row-color-dot {
|
|
1980
|
+
width: 7px;
|
|
1981
|
+
height: 7px;
|
|
1982
|
+
border-radius: 2px;
|
|
1983
|
+
flex-shrink: 0;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.cdt-series-input {
|
|
1987
|
+
width: 100%;
|
|
1988
|
+
min-width: 38px;
|
|
1989
|
+
border: 1px solid transparent;
|
|
1990
|
+
border-radius: 4px;
|
|
1991
|
+
background: transparent;
|
|
1992
|
+
font-size: 11px;
|
|
1993
|
+
font-weight: 600;
|
|
1994
|
+
color: #1e293b;
|
|
1995
|
+
padding: 2px 3px;
|
|
1996
|
+
outline: none;
|
|
1997
|
+
|
|
1998
|
+
&:hover,
|
|
1999
|
+
&:focus {
|
|
2000
|
+
background: #ffffff;
|
|
2001
|
+
border-color: #cbd5e1;
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
.cdt-promote-btn {
|
|
2006
|
+
padding: 1px 4px;
|
|
2007
|
+
border-radius: 3px;
|
|
2008
|
+
border: 1px solid #cbd5e1;
|
|
2009
|
+
background: #ffffff;
|
|
2010
|
+
color: #2563eb;
|
|
2011
|
+
font-size: 10px;
|
|
2012
|
+
cursor: pointer;
|
|
2013
|
+
flex-shrink: 0;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
.cdt-cell-box {
|
|
2017
|
+
display: flex;
|
|
2018
|
+
align-items: center;
|
|
2019
|
+
gap: 4px;
|
|
2020
|
+
background: #f8fafc;
|
|
2021
|
+
border: 1px solid #e2e8f0;
|
|
2022
|
+
border-radius: 5px;
|
|
2023
|
+
padding: 0 5px;
|
|
2024
|
+
height: 26px;
|
|
2025
|
+
box-sizing: border-box;
|
|
2026
|
+
transition: border-color 0.15s ease;
|
|
2027
|
+
|
|
2028
|
+
&:focus-within {
|
|
2029
|
+
border-color: #2563eb;
|
|
2030
|
+
background: #ffffff;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
.cdt-cell-input {
|
|
2035
|
+
width: 100%;
|
|
2036
|
+
min-width: 36px;
|
|
2037
|
+
border: none;
|
|
2038
|
+
background: transparent;
|
|
2039
|
+
font-size: 12px;
|
|
2040
|
+
color: #1e293b;
|
|
2041
|
+
outline: none;
|
|
2042
|
+
padding: 0;
|
|
2043
|
+
|
|
2044
|
+
&.is-num {
|
|
2045
|
+
font-variant-numeric: tabular-nums;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
.cdt-pct-tag {
|
|
2050
|
+
display: inline-block;
|
|
2051
|
+
padding: 1px 5px;
|
|
2052
|
+
border-radius: 999px;
|
|
2053
|
+
background: #eff6ff;
|
|
2054
|
+
color: #2563eb;
|
|
2055
|
+
font-size: 10px;
|
|
2056
|
+
font-weight: 600;
|
|
2057
|
+
font-variant-numeric: tabular-nums;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.cdt-del-btn {
|
|
2061
|
+
width: 18px;
|
|
2062
|
+
height: 18px;
|
|
2063
|
+
border: none;
|
|
2064
|
+
border-radius: 4px;
|
|
2065
|
+
background: transparent;
|
|
2066
|
+
color: #94a3b8;
|
|
2067
|
+
font-size: 13px;
|
|
2068
|
+
line-height: 1;
|
|
2069
|
+
cursor: pointer;
|
|
2070
|
+
display: inline-flex;
|
|
2071
|
+
align-items: center;
|
|
2072
|
+
justify-content: center;
|
|
2073
|
+
padding: 0;
|
|
2074
|
+
|
|
2075
|
+
&:hover:not(:disabled) {
|
|
2076
|
+
color: #ef4444;
|
|
2077
|
+
background: #fef2f2;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
&:disabled {
|
|
2081
|
+
opacity: 0.3;
|
|
2082
|
+
cursor: not-allowed;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
.cdt-csv-container {
|
|
2087
|
+
display: flex;
|
|
2088
|
+
flex-direction: column;
|
|
2089
|
+
gap: 6px;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
.cdt-csv-tip {
|
|
2093
|
+
font-size: 11px;
|
|
2094
|
+
color: #64748b;
|
|
2095
|
+
line-height: 1.4;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
.cdt-csv-textarea {
|
|
2099
|
+
width: 100%;
|
|
2100
|
+
box-sizing: border-box;
|
|
2101
|
+
border: 1px solid #e2e8f0;
|
|
2102
|
+
border-radius: 8px;
|
|
2103
|
+
padding: 8px 10px;
|
|
2104
|
+
font-size: 12px;
|
|
2105
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
2106
|
+
color: #1e293b;
|
|
2107
|
+
background: #f8fafc;
|
|
2108
|
+
resize: vertical;
|
|
2109
|
+
outline: none;
|
|
2110
|
+
line-height: 1.5;
|
|
2111
|
+
|
|
2112
|
+
&:focus {
|
|
2113
|
+
border-color: #2563eb;
|
|
2114
|
+
background: #ffffff;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
.cdt-stats-row {
|
|
2119
|
+
display: grid;
|
|
2120
|
+
grid-template-columns: repeat(3, 1fr);
|
|
2121
|
+
gap: 6px;
|
|
2122
|
+
margin-top: 2px;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
.cdt-stat-item {
|
|
2126
|
+
display: flex;
|
|
2127
|
+
flex-direction: column;
|
|
2128
|
+
align-items: center;
|
|
2129
|
+
justify-content: center;
|
|
2130
|
+
gap: 2px;
|
|
2131
|
+
padding: 6px 4px;
|
|
2132
|
+
border-radius: 6px;
|
|
2133
|
+
background: #f8fafc;
|
|
2134
|
+
border: 1px solid #edf0f3;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
.cdt-stat-label {
|
|
2138
|
+
font-size: 10px;
|
|
2139
|
+
color: #64748b;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
.cdt-stat-val {
|
|
2143
|
+
font-size: 13px;
|
|
2144
|
+
font-weight: 700;
|
|
2145
|
+
color: #0f172a;
|
|
2146
|
+
font-variant-numeric: tabular-nums;
|
|
2147
|
+
|
|
2148
|
+
&.is-primary {
|
|
2149
|
+
color: #2563eb;
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
1479
2152
|
</style>
|