djm-ui 0.72.0 → 0.73.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +6 -4
- package/dist/djm-ui.cjs +628 -487
- package/dist/djm-ui.cjs.map +3 -3
- package/dist/djm-ui.css +320 -5
- package/dist/djm-ui.esm.js +451 -312
- package/dist/djm-ui.esm.js.map +3 -3
- package/dist/djm-ui.esm.min.js +171 -121
- package/dist/djm-ui.min.cjs +176 -126
- package/dist/djm-ui.min.css +6 -2
- package/dist/djm-ui.umd.js +166 -28
- package/dist/djm-ui.umd.min.js +170 -120
- package/dist/mcp/manifest.json +122 -17
- package/dist/mcp/server.js +5 -0
- package/package.json +1 -1
- package/src/components/drawer/index.js +4 -2
- package/src/components/modal/index.js +4 -2
- package/src/components/progress/index.js +72 -3
- package/src/components/spin/index.js +69 -22
- package/src/index.js +2 -1
- package/src/styles/components/feedback.css +46 -0
- package/src/styles/components/glass.css +90 -0
- package/src/styles/components/layout.css +5 -0
- package/src/styles/components/spin.css +156 -4
- package/src/styles/index.css +1 -0
- package/src/styles/theme-dark.css +7 -0
- package/src/styles/tokens.css +13 -0
- package/src/theme/index.js +22 -0
- package/types/index.d.ts +9 -0
package/dist/djm-ui.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*!
|
|
2
|
+
* DJM UI v0.73.1 · 企业级中后台 Vue 3 组件库
|
|
3
|
+
* Copyright (c) 2026 上海多聚米科技有限公司. All rights reserved.
|
|
4
|
+
* MIT License · https://ui.duojumi.com · Build 2026-10-26
|
|
5
|
+
*/
|
|
2
6
|
"use strict";
|
|
3
7
|
var __defProp = Object.defineProperty;
|
|
4
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1039,6 +1043,7 @@ __export(index_exports, {
|
|
|
1039
1043
|
djmMessage: () => djmMessage,
|
|
1040
1044
|
djmMessages: () => djmMessages,
|
|
1041
1045
|
getLocale: () => getLocale,
|
|
1046
|
+
glass: () => glass,
|
|
1042
1047
|
hasPermission: () => hasPermission,
|
|
1043
1048
|
initTheme: () => initTheme,
|
|
1044
1049
|
install: () => install,
|
|
@@ -1048,6 +1053,7 @@ __export(index_exports, {
|
|
|
1048
1053
|
primaryColor: () => primaryColor,
|
|
1049
1054
|
resetPrimaryColor: () => resetPrimaryColor,
|
|
1050
1055
|
sanitizeHtml: () => sanitizeHtml,
|
|
1056
|
+
setGlass: () => setGlass,
|
|
1051
1057
|
setLocale: () => setLocale,
|
|
1052
1058
|
setPermissions: () => setPermissions,
|
|
1053
1059
|
setPrimaryColor: () => setPrimaryColor,
|
|
@@ -1872,7 +1878,7 @@ function t(key, params) {
|
|
|
1872
1878
|
// src/utils/panel.js
|
|
1873
1879
|
var PANEL_HIDDEN_STYLE = { position: "fixed", left: "0px", top: "0px", visibility: "hidden" };
|
|
1874
1880
|
function bindPanelListeners({ root, panel, onClose, onReposition, esc = true }) {
|
|
1875
|
-
const el = (
|
|
1881
|
+
const el = (ref51) => typeof ref51 === "function" ? ref51() : ref51;
|
|
1876
1882
|
function onDocumentMousedown(event) {
|
|
1877
1883
|
const rootEl = el(root);
|
|
1878
1884
|
const panelEl = el(panel);
|
|
@@ -4245,12 +4251,18 @@ var progress_default = {
|
|
|
4245
4251
|
name: "DjmProgress",
|
|
4246
4252
|
props: {
|
|
4247
4253
|
percent: { type: Number, default: 0 },
|
|
4254
|
+
// line 横向 / circle 环形
|
|
4255
|
+
type: { type: String, default: "line" },
|
|
4248
4256
|
// '' / success / error / warning
|
|
4249
4257
|
status: { type: String, default: "" },
|
|
4250
4258
|
showText: { type: Boolean, default: true },
|
|
4251
4259
|
strokeWidth: { type: Number, default: 6 },
|
|
4252
4260
|
// 自定义进度色,不传由状态决定
|
|
4253
|
-
color: { type: String, default: "" }
|
|
4261
|
+
color: { type: String, default: "" },
|
|
4262
|
+
// 环形直径(px)
|
|
4263
|
+
size: { type: Number, default: 96 },
|
|
4264
|
+
// 无障碍名称,默认「进度」
|
|
4265
|
+
label: { type: String, default: "" }
|
|
4254
4266
|
},
|
|
4255
4267
|
computed: {
|
|
4256
4268
|
safePercent() {
|
|
@@ -4263,10 +4275,72 @@ var progress_default = {
|
|
|
4263
4275
|
},
|
|
4264
4276
|
trackStyle() {
|
|
4265
4277
|
return { height: this.strokeWidth + "px" };
|
|
4278
|
+
},
|
|
4279
|
+
circleSize() {
|
|
4280
|
+
return Math.max(48, Number(this.size) || 96);
|
|
4281
|
+
},
|
|
4282
|
+
circleRadius() {
|
|
4283
|
+
return (this.circleSize - this.strokeWidth) / 2;
|
|
4284
|
+
},
|
|
4285
|
+
circleLength() {
|
|
4286
|
+
return 2 * Math.PI * this.circleRadius;
|
|
4287
|
+
},
|
|
4288
|
+
circleOffset() {
|
|
4289
|
+
return this.circleLength * (1 - this.safePercent / 100);
|
|
4290
|
+
},
|
|
4291
|
+
circleStyle() {
|
|
4292
|
+
return { width: this.circleSize + "px", height: this.circleSize + "px" };
|
|
4293
|
+
},
|
|
4294
|
+
circleLabelStyle() {
|
|
4295
|
+
return { fontSize: Math.max(12, Math.round(this.circleSize / 5)) + "px" };
|
|
4266
4296
|
}
|
|
4267
4297
|
},
|
|
4268
4298
|
template: `
|
|
4269
|
-
<div
|
|
4299
|
+
<div
|
|
4300
|
+
v-if="type === 'circle'"
|
|
4301
|
+
class="djm-progress-circle"
|
|
4302
|
+
:class="status ? 'djm-is-' + status : ''"
|
|
4303
|
+
:style="circleStyle"
|
|
4304
|
+
role="progressbar"
|
|
4305
|
+
:aria-label="label || '\u8FDB\u5EA6'"
|
|
4306
|
+
:aria-valuenow="safePercent"
|
|
4307
|
+
aria-valuemin="0"
|
|
4308
|
+
aria-valuemax="100"
|
|
4309
|
+
>
|
|
4310
|
+
<svg :viewBox="'0 0 ' + circleSize + ' ' + circleSize" aria-hidden="true">
|
|
4311
|
+
<circle
|
|
4312
|
+
class="djm-progress-circle-track"
|
|
4313
|
+
:cx="circleSize / 2"
|
|
4314
|
+
:cy="circleSize / 2"
|
|
4315
|
+
:r="circleRadius"
|
|
4316
|
+
:stroke-width="strokeWidth"
|
|
4317
|
+
fill="none"
|
|
4318
|
+
/>
|
|
4319
|
+
<circle
|
|
4320
|
+
class="djm-progress-circle-bar"
|
|
4321
|
+
:cx="circleSize / 2"
|
|
4322
|
+
:cy="circleSize / 2"
|
|
4323
|
+
:r="circleRadius"
|
|
4324
|
+
:stroke-width="strokeWidth"
|
|
4325
|
+
fill="none"
|
|
4326
|
+
stroke-linecap="round"
|
|
4327
|
+
:stroke-dasharray="circleLength"
|
|
4328
|
+
:stroke-dashoffset="circleOffset"
|
|
4329
|
+
:style="color ? { stroke: color } : null"
|
|
4330
|
+
/>
|
|
4331
|
+
</svg>
|
|
4332
|
+
<span v-if="showText" class="djm-progress-circle-label" :style="circleLabelStyle">{{ safePercent }}%</span>
|
|
4333
|
+
</div>
|
|
4334
|
+
<div
|
|
4335
|
+
v-else
|
|
4336
|
+
class="djm-progress-line"
|
|
4337
|
+
:class="status ? 'djm-is-' + status : ''"
|
|
4338
|
+
role="progressbar"
|
|
4339
|
+
:aria-label="label || '\u8FDB\u5EA6'"
|
|
4340
|
+
:aria-valuenow="safePercent"
|
|
4341
|
+
aria-valuemin="0"
|
|
4342
|
+
aria-valuemax="100"
|
|
4343
|
+
>
|
|
4270
4344
|
<div class="djm-progress" :style="trackStyle">
|
|
4271
4345
|
<div class="djm-progress-bar" :style="barStyle"></div>
|
|
4272
4346
|
</div>
|
|
@@ -5468,48 +5542,91 @@ var alert_default = {
|
|
|
5468
5542
|
};
|
|
5469
5543
|
|
|
5470
5544
|
// src/components/spin/index.js
|
|
5545
|
+
var import_vue7 = require("vue");
|
|
5471
5546
|
var spin_default = {
|
|
5472
5547
|
name: "DjmSpin",
|
|
5473
5548
|
props: {
|
|
5474
5549
|
spinning: { type: Boolean, default: true },
|
|
5475
|
-
size: { type: String, default: "md" },
|
|
5476
5550
|
// sm | md | lg
|
|
5477
|
-
|
|
5551
|
+
size: { type: String, default: "md" },
|
|
5552
|
+
// ring 环形 / dots 点状 / bars 柱状 / pulse 脉冲
|
|
5553
|
+
type: { type: String, default: "ring" },
|
|
5554
|
+
tip: { type: String, default: "" },
|
|
5555
|
+
// 延迟多少毫秒后显示,0 表示立即
|
|
5556
|
+
delay: { type: Number, default: 0 },
|
|
5557
|
+
// 全屏加载:遮罩铺满视口
|
|
5558
|
+
fullscreen: { type: Boolean, default: false },
|
|
5559
|
+
// 自定义指示器颜色,默认跟随品牌色
|
|
5560
|
+
color: { type: String, default: "" }
|
|
5561
|
+
},
|
|
5562
|
+
setup(props) {
|
|
5563
|
+
const visible = (0, import_vue7.ref)(false);
|
|
5564
|
+
let timer = null;
|
|
5565
|
+
function sync() {
|
|
5566
|
+
window.clearTimeout(timer);
|
|
5567
|
+
timer = null;
|
|
5568
|
+
if (!props.spinning) {
|
|
5569
|
+
visible.value = false;
|
|
5570
|
+
return;
|
|
5571
|
+
}
|
|
5572
|
+
if (props.delay > 0) {
|
|
5573
|
+
timer = window.setTimeout(() => {
|
|
5574
|
+
visible.value = true;
|
|
5575
|
+
}, props.delay);
|
|
5576
|
+
} else {
|
|
5577
|
+
visible.value = true;
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
(0, import_vue7.watch)(() => [props.spinning, props.delay], sync, { immediate: true });
|
|
5581
|
+
(0, import_vue7.onBeforeUnmount)(() => window.clearTimeout(timer));
|
|
5582
|
+
return { visible };
|
|
5478
5583
|
},
|
|
5479
5584
|
computed: {
|
|
5480
|
-
// 有默认插槽即为包裹模式
|
|
5481
5585
|
wrapped() {
|
|
5482
5586
|
return !!this.$slots.default;
|
|
5587
|
+
},
|
|
5588
|
+
rootClass() {
|
|
5589
|
+
return [
|
|
5590
|
+
"djm-spin",
|
|
5591
|
+
"djm-spin-" + this.size,
|
|
5592
|
+
{
|
|
5593
|
+
"djm-spin-wrap": this.wrapped && !this.fullscreen,
|
|
5594
|
+
"djm-spin-inline": !this.wrapped && !this.fullscreen,
|
|
5595
|
+
"djm-spin-fullscreen": this.fullscreen
|
|
5596
|
+
}
|
|
5597
|
+
];
|
|
5483
5598
|
}
|
|
5484
5599
|
},
|
|
5485
5600
|
template: `
|
|
5486
5601
|
<div
|
|
5487
|
-
v-if="wrapped"
|
|
5488
|
-
class="
|
|
5489
|
-
:
|
|
5490
|
-
:
|
|
5602
|
+
v-if="fullscreen || wrapped || visible"
|
|
5603
|
+
:class="rootClass"
|
|
5604
|
+
:aria-busy="String(visible)"
|
|
5605
|
+
:role="visible ? 'status' : undefined"
|
|
5606
|
+
:aria-label="!wrapped && !fullscreen && !tip && visible ? '\u52A0\u8F7D\u4E2D' : undefined"
|
|
5491
5607
|
>
|
|
5492
|
-
<slot />
|
|
5493
|
-
<div v-if="
|
|
5494
|
-
<span class="djm-
|
|
5608
|
+
<slot v-if="wrapped && !fullscreen" />
|
|
5609
|
+
<div v-if="visible" class="djm-spin-mask">
|
|
5610
|
+
<span class="djm-spin-indicator" :class="'djm-spin-' + type" :style="color ? { color } : null">
|
|
5611
|
+
<slot name="indicator">
|
|
5612
|
+
<i v-if="type === 'ring'" class="djm-spinner"></i>
|
|
5613
|
+
<template v-else-if="type === 'dots'">
|
|
5614
|
+
<i></i><i></i><i></i>
|
|
5615
|
+
</template>
|
|
5616
|
+
<template v-else-if="type === 'bars'">
|
|
5617
|
+
<i></i><i></i><i></i><i></i>
|
|
5618
|
+
</template>
|
|
5619
|
+
<i v-else class="djm-spin-core"></i>
|
|
5620
|
+
</slot>
|
|
5621
|
+
</span>
|
|
5495
5622
|
<span v-if="tip" class="djm-spin-tip">{{ tip }}</span>
|
|
5496
5623
|
</div>
|
|
5497
5624
|
</div>
|
|
5498
|
-
<span
|
|
5499
|
-
v-else
|
|
5500
|
-
class="djm-spin-inline"
|
|
5501
|
-
:class="'djm-spin-' + size"
|
|
5502
|
-
role="status"
|
|
5503
|
-
:aria-label="tip ? undefined : '\u52A0\u8F7D\u4E2D'"
|
|
5504
|
-
>
|
|
5505
|
-
<span class="djm-spinner"></span>
|
|
5506
|
-
<span v-if="tip" class="djm-spin-tip">{{ tip }}</span>
|
|
5507
|
-
</span>
|
|
5508
5625
|
`
|
|
5509
5626
|
};
|
|
5510
5627
|
|
|
5511
5628
|
// src/components/popconfirm/index.js
|
|
5512
|
-
var
|
|
5629
|
+
var import_vue8 = require("vue");
|
|
5513
5630
|
var popconfirm_default = {
|
|
5514
5631
|
name: "DjmPopconfirm",
|
|
5515
5632
|
components: { DjmIcon: icon_default },
|
|
@@ -5525,10 +5642,10 @@ var popconfirm_default = {
|
|
|
5525
5642
|
},
|
|
5526
5643
|
emits: ["confirm", "cancel", "visible-change"],
|
|
5527
5644
|
setup(props, { emit }) {
|
|
5528
|
-
const open = (0,
|
|
5529
|
-
const root = (0,
|
|
5530
|
-
const panelEl = (0,
|
|
5531
|
-
const panelStyle = (0,
|
|
5645
|
+
const open = (0, import_vue8.ref)(false);
|
|
5646
|
+
const root = (0, import_vue8.ref)(null);
|
|
5647
|
+
const panelEl = (0, import_vue8.ref)(null);
|
|
5648
|
+
const panelStyle = (0, import_vue8.ref)({});
|
|
5532
5649
|
const PANEL_WIDTH = 244;
|
|
5533
5650
|
let detachPanel = null;
|
|
5534
5651
|
function syncTriggerA11y() {
|
|
@@ -5543,8 +5660,8 @@ var popconfirm_default = {
|
|
|
5543
5660
|
target.setAttribute("aria-haspopup", "dialog");
|
|
5544
5661
|
target.setAttribute("aria-expanded", String(open.value));
|
|
5545
5662
|
}
|
|
5546
|
-
(0,
|
|
5547
|
-
(0,
|
|
5663
|
+
(0, import_vue8.onMounted)(() => (0, import_vue8.nextTick)(syncTriggerA11y));
|
|
5664
|
+
(0, import_vue8.watch)(open, () => (0, import_vue8.nextTick)(syncTriggerA11y));
|
|
5548
5665
|
function updatePosition() {
|
|
5549
5666
|
if (!open.value || !root.value) return;
|
|
5550
5667
|
const rect = root.value.getBoundingClientRect();
|
|
@@ -5567,7 +5684,7 @@ var popconfirm_default = {
|
|
|
5567
5684
|
onReposition: updatePosition
|
|
5568
5685
|
});
|
|
5569
5686
|
requestAnimationFrame(updatePosition);
|
|
5570
|
-
(0,
|
|
5687
|
+
(0, import_vue8.nextTick)(() => {
|
|
5571
5688
|
const first = panelEl.value && panelEl.value.querySelector("button");
|
|
5572
5689
|
if (first) first.focus();
|
|
5573
5690
|
});
|
|
@@ -5583,7 +5700,7 @@ var popconfirm_default = {
|
|
|
5583
5700
|
detachPanel = null;
|
|
5584
5701
|
}
|
|
5585
5702
|
if (hadFocus) {
|
|
5586
|
-
(0,
|
|
5703
|
+
(0, import_vue8.nextTick)(() => {
|
|
5587
5704
|
const wrapper = root.value && root.value.querySelector(".djm-popconfirm-trigger");
|
|
5588
5705
|
const target = wrapper && (wrapper.querySelector('button, a[href], [role="button"]') || wrapper);
|
|
5589
5706
|
if (target) target.focus();
|
|
@@ -5603,7 +5720,7 @@ var popconfirm_default = {
|
|
|
5603
5720
|
emit("cancel");
|
|
5604
5721
|
close2();
|
|
5605
5722
|
}
|
|
5606
|
-
(0,
|
|
5723
|
+
(0, import_vue8.onBeforeUnmount)(close2);
|
|
5607
5724
|
return { open, root, panelEl, panelStyle, toggle, close: close2, confirm, cancel };
|
|
5608
5725
|
},
|
|
5609
5726
|
template: `
|
|
@@ -5647,7 +5764,7 @@ var popconfirm_default = {
|
|
|
5647
5764
|
};
|
|
5648
5765
|
|
|
5649
5766
|
// src/components/anchor/index.js
|
|
5650
|
-
var
|
|
5767
|
+
var import_vue9 = require("vue");
|
|
5651
5768
|
var anchor_default = {
|
|
5652
5769
|
name: "DjmAnchor",
|
|
5653
5770
|
props: {
|
|
@@ -5660,8 +5777,8 @@ var anchor_default = {
|
|
|
5660
5777
|
},
|
|
5661
5778
|
emits: ["change"],
|
|
5662
5779
|
setup(props, { emit }) {
|
|
5663
|
-
const root = (0,
|
|
5664
|
-
const activeKey = (0,
|
|
5780
|
+
const root = (0, import_vue9.ref)(null);
|
|
5781
|
+
const activeKey = (0, import_vue9.ref)("");
|
|
5665
5782
|
let scrollEl = null;
|
|
5666
5783
|
let target = null;
|
|
5667
5784
|
function resolveContainer() {
|
|
@@ -5715,9 +5832,9 @@ var anchor_default = {
|
|
|
5715
5832
|
activeKey.value = item.href;
|
|
5716
5833
|
emit("change", item.href);
|
|
5717
5834
|
}
|
|
5718
|
-
(0,
|
|
5719
|
-
(0,
|
|
5720
|
-
(0,
|
|
5835
|
+
(0, import_vue9.onMounted)(bind);
|
|
5836
|
+
(0, import_vue9.watch)(() => props.container, bind);
|
|
5837
|
+
(0, import_vue9.onBeforeUnmount)(unbind);
|
|
5721
5838
|
return { root, activeKey, go };
|
|
5722
5839
|
},
|
|
5723
5840
|
template: `
|
|
@@ -5739,7 +5856,7 @@ var anchor_default = {
|
|
|
5739
5856
|
};
|
|
5740
5857
|
|
|
5741
5858
|
// src/components/backtop/index.js
|
|
5742
|
-
var
|
|
5859
|
+
var import_vue10 = require("vue");
|
|
5743
5860
|
var backtop_default = {
|
|
5744
5861
|
name: "DjmBacktop",
|
|
5745
5862
|
components: { DjmIcon: icon_default },
|
|
@@ -5752,8 +5869,8 @@ var backtop_default = {
|
|
|
5752
5869
|
},
|
|
5753
5870
|
emits: ["click"],
|
|
5754
5871
|
setup(props, { emit }) {
|
|
5755
|
-
const visible = (0,
|
|
5756
|
-
const root = (0,
|
|
5872
|
+
const visible = (0, import_vue10.ref)(false);
|
|
5873
|
+
const root = (0, import_vue10.ref)(null);
|
|
5757
5874
|
let target = null;
|
|
5758
5875
|
let scrollEl = null;
|
|
5759
5876
|
function resolveContainer() {
|
|
@@ -5786,8 +5903,8 @@ var backtop_default = {
|
|
|
5786
5903
|
else target.scrollTo({ top: 0, behavior });
|
|
5787
5904
|
emit("click");
|
|
5788
5905
|
}
|
|
5789
|
-
(0,
|
|
5790
|
-
(0,
|
|
5906
|
+
(0, import_vue10.onMounted)(bind);
|
|
5907
|
+
(0, import_vue10.onBeforeUnmount)(unbind);
|
|
5791
5908
|
return { visible, root, toTop };
|
|
5792
5909
|
},
|
|
5793
5910
|
template: `
|
|
@@ -5864,7 +5981,7 @@ var space_default = {
|
|
|
5864
5981
|
};
|
|
5865
5982
|
|
|
5866
5983
|
// src/components/affix/index.js
|
|
5867
|
-
var
|
|
5984
|
+
var import_vue11 = require("vue");
|
|
5868
5985
|
var affix_default = {
|
|
5869
5986
|
name: "DjmAffix",
|
|
5870
5987
|
props: {
|
|
@@ -5875,10 +5992,10 @@ var affix_default = {
|
|
|
5875
5992
|
zIndex: { type: Number, default: 900 }
|
|
5876
5993
|
},
|
|
5877
5994
|
setup(props) {
|
|
5878
|
-
const root = (0,
|
|
5879
|
-
const fixed = (0,
|
|
5880
|
-
const affixStyle = (0,
|
|
5881
|
-
const holderStyle = (0,
|
|
5995
|
+
const root = (0, import_vue11.ref)(null);
|
|
5996
|
+
const fixed = (0, import_vue11.ref)(false);
|
|
5997
|
+
const affixStyle = (0, import_vue11.ref)({});
|
|
5998
|
+
const holderStyle = (0, import_vue11.ref)({});
|
|
5882
5999
|
let target = null;
|
|
5883
6000
|
let scrollEl = null;
|
|
5884
6001
|
function resolveContainer() {
|
|
@@ -5933,8 +6050,8 @@ var affix_default = {
|
|
|
5933
6050
|
scrollEl = null;
|
|
5934
6051
|
target = null;
|
|
5935
6052
|
}
|
|
5936
|
-
(0,
|
|
5937
|
-
(0,
|
|
6053
|
+
(0, import_vue11.onMounted)(bind);
|
|
6054
|
+
(0, import_vue11.onBeforeUnmount)(unbind);
|
|
5938
6055
|
return { root, fixed, affixStyle, holderStyle };
|
|
5939
6056
|
},
|
|
5940
6057
|
template: `
|
|
@@ -5985,7 +6102,7 @@ var segmented_default = {
|
|
|
5985
6102
|
};
|
|
5986
6103
|
|
|
5987
6104
|
// src/components/image/index.js
|
|
5988
|
-
var
|
|
6105
|
+
var import_vue12 = require("vue");
|
|
5989
6106
|
|
|
5990
6107
|
// src/utils/scroll-lock.js
|
|
5991
6108
|
var count = 0;
|
|
@@ -6032,11 +6149,11 @@ var image_default = {
|
|
|
6032
6149
|
preview: { type: Boolean, default: true }
|
|
6033
6150
|
},
|
|
6034
6151
|
setup(props) {
|
|
6035
|
-
const failed = (0,
|
|
6036
|
-
const open = (0,
|
|
6037
|
-
const zoomRef = (0,
|
|
6038
|
-
const closeRef = (0,
|
|
6039
|
-
(0,
|
|
6152
|
+
const failed = (0, import_vue12.ref)(false);
|
|
6153
|
+
const open = (0, import_vue12.ref)(false);
|
|
6154
|
+
const zoomRef = (0, import_vue12.ref)(null);
|
|
6155
|
+
const closeRef = (0, import_vue12.ref)(null);
|
|
6156
|
+
(0, import_vue12.watch)(() => props.src, () => {
|
|
6040
6157
|
failed.value = false;
|
|
6041
6158
|
});
|
|
6042
6159
|
function toSize(value) {
|
|
@@ -6050,7 +6167,7 @@ var image_default = {
|
|
|
6050
6167
|
open.value = true;
|
|
6051
6168
|
lockScroll();
|
|
6052
6169
|
document.addEventListener("keydown", onKeydown);
|
|
6053
|
-
await (0,
|
|
6170
|
+
await (0, import_vue12.nextTick)();
|
|
6054
6171
|
if (closeRef.value) closeRef.value.focus();
|
|
6055
6172
|
}
|
|
6056
6173
|
function closePreview() {
|
|
@@ -6060,7 +6177,7 @@ var image_default = {
|
|
|
6060
6177
|
document.removeEventListener("keydown", onKeydown);
|
|
6061
6178
|
if (zoomRef.value) zoomRef.value.focus();
|
|
6062
6179
|
}
|
|
6063
|
-
(0,
|
|
6180
|
+
(0, import_vue12.onBeforeUnmount)(closePreview);
|
|
6064
6181
|
return { failed, open, zoomRef, closeRef, toSize, openPreview, closePreview, t };
|
|
6065
6182
|
},
|
|
6066
6183
|
template: `
|
|
@@ -6115,13 +6232,15 @@ var image_default = {
|
|
|
6115
6232
|
};
|
|
6116
6233
|
|
|
6117
6234
|
// src/components/watermark/index.js
|
|
6118
|
-
var
|
|
6235
|
+
var import_vue14 = require("vue");
|
|
6119
6236
|
|
|
6120
6237
|
// src/theme/index.js
|
|
6121
|
-
var
|
|
6238
|
+
var import_vue13 = require("vue");
|
|
6122
6239
|
var KEY = "djm-theme";
|
|
6123
6240
|
var COLOR_KEY = "djm-primary";
|
|
6124
|
-
var
|
|
6241
|
+
var GLASS_KEY = "djm-glass";
|
|
6242
|
+
var theme = (0, import_vue13.ref)("light");
|
|
6243
|
+
var glass = (0, import_vue13.ref)(false);
|
|
6125
6244
|
var PRESET_COLORS = [
|
|
6126
6245
|
{ name: "\u9ED8\u8BA4\u84DD", value: "#1a6fc4" },
|
|
6127
6246
|
{ name: "\u79D1\u6280\u84DD", value: "#2563eb" },
|
|
@@ -6132,7 +6251,7 @@ var PRESET_COLORS = [
|
|
|
6132
6251
|
{ name: "\u6731\u7802\u7EA2", value: "#c0392b" },
|
|
6133
6252
|
{ name: "\u77F3\u58A8\u7070", value: "#4b5b6b" }
|
|
6134
6253
|
];
|
|
6135
|
-
var primaryColor = (0,
|
|
6254
|
+
var primaryColor = (0, import_vue13.ref)("");
|
|
6136
6255
|
var BRAND_VARS = [
|
|
6137
6256
|
"--djm-brand-50",
|
|
6138
6257
|
"--djm-brand-100",
|
|
@@ -6254,6 +6373,15 @@ function setTheme(name) {
|
|
|
6254
6373
|
function toggleTheme() {
|
|
6255
6374
|
setTheme(theme.value === "dark" ? "light" : "dark");
|
|
6256
6375
|
}
|
|
6376
|
+
function setGlass(enabled) {
|
|
6377
|
+
glass.value = !!enabled;
|
|
6378
|
+
document.documentElement.dataset.djmGlass = glass.value ? "on" : "";
|
|
6379
|
+
try {
|
|
6380
|
+
if (glass.value) localStorage.setItem(GLASS_KEY, "1");
|
|
6381
|
+
else localStorage.removeItem(GLASS_KEY);
|
|
6382
|
+
} catch (error) {
|
|
6383
|
+
}
|
|
6384
|
+
}
|
|
6257
6385
|
function initTheme() {
|
|
6258
6386
|
let saved = "";
|
|
6259
6387
|
try {
|
|
@@ -6273,9 +6401,16 @@ function initTheme() {
|
|
|
6273
6401
|
} catch (error) {
|
|
6274
6402
|
color = "";
|
|
6275
6403
|
}
|
|
6404
|
+
let glassSaved = false;
|
|
6405
|
+
try {
|
|
6406
|
+
glassSaved = localStorage.getItem(GLASS_KEY) === "1";
|
|
6407
|
+
} catch (error) {
|
|
6408
|
+
glassSaved = false;
|
|
6409
|
+
}
|
|
6276
6410
|
if (color) primaryColor.value = color;
|
|
6277
6411
|
const next = param === "dark" || param === "light" ? param : saved || "light";
|
|
6278
6412
|
setTheme(next);
|
|
6413
|
+
setGlass(glassSaved);
|
|
6279
6414
|
}
|
|
6280
6415
|
|
|
6281
6416
|
// src/components/watermark/index.js
|
|
@@ -6291,7 +6426,7 @@ var watermark_default = {
|
|
|
6291
6426
|
zIndex: { type: Number, default: 10 }
|
|
6292
6427
|
},
|
|
6293
6428
|
setup(props) {
|
|
6294
|
-
const dataUrl = (0,
|
|
6429
|
+
const dataUrl = (0, import_vue14.ref)("");
|
|
6295
6430
|
let canvasEl = null;
|
|
6296
6431
|
function build() {
|
|
6297
6432
|
const lines = (Array.isArray(props.content) ? props.content : [props.content]).filter(Boolean);
|
|
@@ -6328,13 +6463,13 @@ var watermark_default = {
|
|
|
6328
6463
|
});
|
|
6329
6464
|
dataUrl.value = canvasEl.toDataURL("image/png");
|
|
6330
6465
|
}
|
|
6331
|
-
const layerStyle = (0,
|
|
6466
|
+
const layerStyle = (0, import_vue14.computed)(() => ({
|
|
6332
6467
|
backgroundImage: dataUrl.value ? "url(" + dataUrl.value + ")" : "none",
|
|
6333
6468
|
zIndex: props.zIndex
|
|
6334
6469
|
}));
|
|
6335
|
-
(0,
|
|
6336
|
-
(0,
|
|
6337
|
-
(0,
|
|
6470
|
+
(0, import_vue14.onMounted)(build);
|
|
6471
|
+
(0, import_vue14.watch)(() => [props.content, props.gap, props.fontSize, props.color, props.rotate, theme.value], build, { deep: true });
|
|
6472
|
+
(0, import_vue14.onBeforeUnmount)(() => {
|
|
6338
6473
|
canvasEl = null;
|
|
6339
6474
|
});
|
|
6340
6475
|
return { layerStyle };
|
|
@@ -6524,7 +6659,7 @@ var autocomplete_default = {
|
|
|
6524
6659
|
};
|
|
6525
6660
|
|
|
6526
6661
|
// src/components/splitter/index.js
|
|
6527
|
-
var
|
|
6662
|
+
var import_vue15 = require("vue");
|
|
6528
6663
|
var splitter_default = {
|
|
6529
6664
|
name: "DjmSplitter",
|
|
6530
6665
|
props: {
|
|
@@ -6537,9 +6672,9 @@ var splitter_default = {
|
|
|
6537
6672
|
},
|
|
6538
6673
|
emits: ["update:modelValue", "change"],
|
|
6539
6674
|
setup(props, { emit }) {
|
|
6540
|
-
const root = (0,
|
|
6541
|
-
const dragging = (0,
|
|
6542
|
-
const ratio = (0,
|
|
6675
|
+
const root = (0, import_vue15.ref)(null);
|
|
6676
|
+
const dragging = (0, import_vue15.ref)(false);
|
|
6677
|
+
const ratio = (0, import_vue15.computed)(() => {
|
|
6543
6678
|
const value = Number(props.modelValue);
|
|
6544
6679
|
const safe = Number.isFinite(value) ? value : 50;
|
|
6545
6680
|
return Math.min(props.max, Math.max(props.min, safe));
|
|
@@ -6583,7 +6718,7 @@ var splitter_default = {
|
|
|
6583
6718
|
commit(ratio.value + step);
|
|
6584
6719
|
}
|
|
6585
6720
|
}
|
|
6586
|
-
(0,
|
|
6721
|
+
(0, import_vue15.onBeforeUnmount)(stopDrag);
|
|
6587
6722
|
return { root, dragging, ratio, startDrag, onKeydown };
|
|
6588
6723
|
},
|
|
6589
6724
|
template: `
|
|
@@ -6620,7 +6755,7 @@ var splitter_default = {
|
|
|
6620
6755
|
};
|
|
6621
6756
|
|
|
6622
6757
|
// src/components/carousel/index.js
|
|
6623
|
-
var
|
|
6758
|
+
var import_vue16 = require("vue");
|
|
6624
6759
|
var carousel_default = {
|
|
6625
6760
|
name: "DjmCarousel",
|
|
6626
6761
|
components: { DjmIcon: icon_default },
|
|
@@ -6634,7 +6769,7 @@ var carousel_default = {
|
|
|
6634
6769
|
},
|
|
6635
6770
|
emits: ["change"],
|
|
6636
6771
|
setup(props, { emit }) {
|
|
6637
|
-
const index = (0,
|
|
6772
|
+
const index = (0, import_vue16.ref)(0);
|
|
6638
6773
|
let timer = null;
|
|
6639
6774
|
const boxStyle = () => ({
|
|
6640
6775
|
height: typeof props.height === "number" ? props.height + "px" : props.height
|
|
@@ -6671,15 +6806,15 @@ var carousel_default = {
|
|
|
6671
6806
|
next();
|
|
6672
6807
|
}
|
|
6673
6808
|
}
|
|
6674
|
-
(0,
|
|
6675
|
-
(0,
|
|
6809
|
+
(0, import_vue16.onMounted)(start);
|
|
6810
|
+
(0, import_vue16.watch)(() => [props.autoplay, props.interval, props.items.length], start);
|
|
6676
6811
|
function pause() {
|
|
6677
6812
|
if (props.autoplay) stop();
|
|
6678
6813
|
}
|
|
6679
6814
|
function resume() {
|
|
6680
6815
|
if (props.autoplay) start();
|
|
6681
6816
|
}
|
|
6682
|
-
(0,
|
|
6817
|
+
(0, import_vue16.onBeforeUnmount)(stop);
|
|
6683
6818
|
return { index, boxStyle, go, next, prev, onKeydown, pause, resume };
|
|
6684
6819
|
},
|
|
6685
6820
|
template: `
|
|
@@ -6739,7 +6874,7 @@ var carousel_default = {
|
|
|
6739
6874
|
};
|
|
6740
6875
|
|
|
6741
6876
|
// src/components/tour/index.js
|
|
6742
|
-
var
|
|
6877
|
+
var import_vue17 = require("vue");
|
|
6743
6878
|
var tour_default = {
|
|
6744
6879
|
name: "DjmTour",
|
|
6745
6880
|
components: { DjmIcon: icon_default },
|
|
@@ -6751,11 +6886,11 @@ var tour_default = {
|
|
|
6751
6886
|
},
|
|
6752
6887
|
emits: ["update:modelValue", "change", "finish"],
|
|
6753
6888
|
setup(props, { emit }) {
|
|
6754
|
-
const current = (0,
|
|
6755
|
-
const highlight = (0,
|
|
6756
|
-
const cardStyle = (0,
|
|
6757
|
-
const card = (0,
|
|
6758
|
-
const step = (0,
|
|
6889
|
+
const current = (0, import_vue17.ref)(0);
|
|
6890
|
+
const highlight = (0, import_vue17.ref)({ top: "0px", left: "0px", width: "0px", height: "0px" });
|
|
6891
|
+
const cardStyle = (0, import_vue17.ref)({ position: "fixed", left: "0px", top: "0px", visibility: "hidden" });
|
|
6892
|
+
const card = (0, import_vue17.ref)(null);
|
|
6893
|
+
const step = (0, import_vue17.computed)(() => props.steps[current.value] || null);
|
|
6759
6894
|
function update() {
|
|
6760
6895
|
const scene = step.value;
|
|
6761
6896
|
if (!scene) return;
|
|
@@ -6785,7 +6920,7 @@ var tour_default = {
|
|
|
6785
6920
|
document.addEventListener("keydown", onKeydown);
|
|
6786
6921
|
window.addEventListener("resize", update);
|
|
6787
6922
|
window.addEventListener("scroll", update, true);
|
|
6788
|
-
(0,
|
|
6923
|
+
(0, import_vue17.nextTick)(() => {
|
|
6789
6924
|
update();
|
|
6790
6925
|
if (card.value) card.value.focus({ preventScroll: true });
|
|
6791
6926
|
});
|
|
@@ -6807,22 +6942,22 @@ var tour_default = {
|
|
|
6807
6942
|
}
|
|
6808
6943
|
current.value += 1;
|
|
6809
6944
|
emit("change", current.value);
|
|
6810
|
-
(0,
|
|
6945
|
+
(0, import_vue17.nextTick)(update);
|
|
6811
6946
|
}
|
|
6812
6947
|
function prev() {
|
|
6813
6948
|
if (current.value === 0) return;
|
|
6814
6949
|
current.value -= 1;
|
|
6815
6950
|
emit("change", current.value);
|
|
6816
|
-
(0,
|
|
6951
|
+
(0, import_vue17.nextTick)(update);
|
|
6817
6952
|
}
|
|
6818
|
-
(0,
|
|
6953
|
+
(0, import_vue17.watch)(() => props.modelValue, (value) => {
|
|
6819
6954
|
if (value) startScene();
|
|
6820
6955
|
else stopScene();
|
|
6821
6956
|
});
|
|
6822
|
-
(0,
|
|
6957
|
+
(0, import_vue17.onMounted)(() => {
|
|
6823
6958
|
if (props.modelValue) startScene();
|
|
6824
6959
|
});
|
|
6825
|
-
(0,
|
|
6960
|
+
(0, import_vue17.onBeforeUnmount)(stopScene);
|
|
6826
6961
|
return { current, step, highlight, cardStyle, card, close: close2, next, prev, t };
|
|
6827
6962
|
},
|
|
6828
6963
|
template: `
|
|
@@ -6860,7 +6995,7 @@ var tour_default = {
|
|
|
6860
6995
|
};
|
|
6861
6996
|
|
|
6862
6997
|
// src/components/calendar/index.js
|
|
6863
|
-
var
|
|
6998
|
+
var import_vue18 = require("vue");
|
|
6864
6999
|
function pad2(num) {
|
|
6865
7000
|
return String(num).padStart(2, "0");
|
|
6866
7001
|
}
|
|
@@ -6890,16 +7025,16 @@ var calendar_default = {
|
|
|
6890
7025
|
const today = /* @__PURE__ */ new Date();
|
|
6891
7026
|
const todayKey = toKey(today.getFullYear(), today.getMonth(), today.getDate());
|
|
6892
7027
|
const initial = parse(props.modelValue);
|
|
6893
|
-
const viewYear = (0,
|
|
6894
|
-
const viewMonth = (0,
|
|
6895
|
-
const weekNames = (0,
|
|
7028
|
+
const viewYear = (0, import_vue18.ref)(initial ? initial.year : today.getFullYear());
|
|
7029
|
+
const viewMonth = (0, import_vue18.ref)(initial ? initial.month : today.getMonth());
|
|
7030
|
+
const weekNames = (0, import_vue18.computed)(() => {
|
|
6896
7031
|
const base = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
6897
7032
|
return base.slice(props.firstDay).concat(base.slice(0, props.firstDay));
|
|
6898
7033
|
});
|
|
6899
|
-
const markSet = (0,
|
|
7034
|
+
const markSet = (0, import_vue18.computed)(() => new Set(
|
|
6900
7035
|
props.marks.map((item) => typeof item === "string" ? item : item.date).filter(Boolean)
|
|
6901
7036
|
));
|
|
6902
|
-
const cells = (0,
|
|
7037
|
+
const cells = (0, import_vue18.computed)(() => {
|
|
6903
7038
|
const first = new Date(viewYear.value, viewMonth.value, 1);
|
|
6904
7039
|
const offset = (first.getDay() - props.firstDay + 7) % 7;
|
|
6905
7040
|
const start = new Date(viewYear.value, viewMonth.value, 1 - offset);
|
|
@@ -6914,7 +7049,7 @@ var calendar_default = {
|
|
|
6914
7049
|
}
|
|
6915
7050
|
return list;
|
|
6916
7051
|
});
|
|
6917
|
-
const weeks = (0,
|
|
7052
|
+
const weeks = (0, import_vue18.computed)(() => {
|
|
6918
7053
|
const list = cells.value;
|
|
6919
7054
|
return Array.from({ length: 6 }, (_, index) => list.slice(index * 7, index * 7 + 7));
|
|
6920
7055
|
});
|
|
@@ -6957,7 +7092,7 @@ var calendar_default = {
|
|
|
6957
7092
|
event.preventDefault();
|
|
6958
7093
|
list[next].focus();
|
|
6959
7094
|
}
|
|
6960
|
-
(0,
|
|
7095
|
+
(0, import_vue18.watch)(() => props.modelValue, (value) => {
|
|
6961
7096
|
const parts = parse(value);
|
|
6962
7097
|
if (parts && (parts.year !== viewYear.value || parts.month !== viewMonth.value)) {
|
|
6963
7098
|
viewYear.value = parts.year;
|
|
@@ -7011,7 +7146,7 @@ var calendar_default = {
|
|
|
7011
7146
|
};
|
|
7012
7147
|
|
|
7013
7148
|
// src/components/float-button/index.js
|
|
7014
|
-
var
|
|
7149
|
+
var import_vue19 = require("vue");
|
|
7015
7150
|
var float_button_default = {
|
|
7016
7151
|
name: "DjmFloatButton",
|
|
7017
7152
|
components: { DjmIcon: icon_default },
|
|
@@ -7027,7 +7162,7 @@ var float_button_default = {
|
|
|
7027
7162
|
},
|
|
7028
7163
|
emits: ["click", "select"],
|
|
7029
7164
|
setup(props, { emit }) {
|
|
7030
|
-
const open = (0,
|
|
7165
|
+
const open = (0, import_vue19.ref)(false);
|
|
7031
7166
|
function onKeydown(event) {
|
|
7032
7167
|
if (event.key === "Escape") close2();
|
|
7033
7168
|
}
|
|
@@ -7062,7 +7197,7 @@ var float_button_default = {
|
|
|
7062
7197
|
emit("select", item);
|
|
7063
7198
|
if (typeof item.onClick === "function") item.onClick(item);
|
|
7064
7199
|
}
|
|
7065
|
-
(0,
|
|
7200
|
+
(0, import_vue19.onBeforeUnmount)(close2);
|
|
7066
7201
|
return { open, onMainClick, choose };
|
|
7067
7202
|
},
|
|
7068
7203
|
template: `
|
|
@@ -7097,7 +7232,7 @@ var float_button_default = {
|
|
|
7097
7232
|
};
|
|
7098
7233
|
|
|
7099
7234
|
// src/components/mentions/index.js
|
|
7100
|
-
var
|
|
7235
|
+
var import_vue20 = require("vue");
|
|
7101
7236
|
var uidSeed3 = 0;
|
|
7102
7237
|
var mentions_default = {
|
|
7103
7238
|
name: "DjmMentions",
|
|
@@ -7112,26 +7247,26 @@ var mentions_default = {
|
|
|
7112
7247
|
},
|
|
7113
7248
|
emits: ["update:modelValue", "input", "select"],
|
|
7114
7249
|
setup(props, { emit }) {
|
|
7115
|
-
const root = (0,
|
|
7116
|
-
const input = (0,
|
|
7117
|
-
const text = (0,
|
|
7118
|
-
const open = (0,
|
|
7119
|
-
const keyword = (0,
|
|
7120
|
-
const activeIndex = (0,
|
|
7250
|
+
const root = (0, import_vue20.ref)(null);
|
|
7251
|
+
const input = (0, import_vue20.ref)(null);
|
|
7252
|
+
const text = (0, import_vue20.ref)(props.modelValue);
|
|
7253
|
+
const open = (0, import_vue20.ref)(false);
|
|
7254
|
+
const keyword = (0, import_vue20.ref)("");
|
|
7255
|
+
const activeIndex = (0, import_vue20.ref)(-1);
|
|
7121
7256
|
const listId = "djm-mentions-" + ++uidSeed3;
|
|
7122
|
-
const panelStyle = (0,
|
|
7257
|
+
const panelStyle = (0, import_vue20.ref)({ ...PANEL_HIDDEN_STYLE });
|
|
7123
7258
|
let triggerIndex = -1;
|
|
7124
7259
|
let detachPanel = null;
|
|
7125
|
-
(0,
|
|
7260
|
+
(0, import_vue20.watch)(() => props.modelValue, (value) => {
|
|
7126
7261
|
text.value = value;
|
|
7127
7262
|
});
|
|
7128
|
-
const normalized = (0,
|
|
7129
|
-
const filtered = (0,
|
|
7263
|
+
const normalized = (0, import_vue20.computed)(() => props.options.map((item) => typeof item === "string" ? { value: item, label: item } : item));
|
|
7264
|
+
const filtered = (0, import_vue20.computed)(() => {
|
|
7130
7265
|
const key = keyword.value.trim().toLowerCase();
|
|
7131
7266
|
const list = key ? normalized.value.filter((item) => String(item.label).toLowerCase().indexOf(key) > -1) : normalized.value;
|
|
7132
7267
|
return list.slice(0, 6);
|
|
7133
7268
|
});
|
|
7134
|
-
const activeId = (0,
|
|
7269
|
+
const activeId = (0, import_vue20.computed)(() => activeIndex.value > -1 ? listId + "-" + activeIndex.value : void 0);
|
|
7135
7270
|
function updatePosition() {
|
|
7136
7271
|
if (!open.value || !root.value) return;
|
|
7137
7272
|
const rect = root.value.getBoundingClientRect();
|
|
@@ -7151,7 +7286,7 @@ var mentions_default = {
|
|
|
7151
7286
|
onReposition: updatePosition,
|
|
7152
7287
|
esc: false
|
|
7153
7288
|
});
|
|
7154
|
-
(0,
|
|
7289
|
+
(0, import_vue20.nextTick)(updatePosition);
|
|
7155
7290
|
}
|
|
7156
7291
|
function closePanel() {
|
|
7157
7292
|
if (!open.value) return;
|
|
@@ -7178,7 +7313,7 @@ var mentions_default = {
|
|
|
7178
7313
|
keyword.value = match[1];
|
|
7179
7314
|
activeIndex.value = -1;
|
|
7180
7315
|
if (!open.value) openPanel();
|
|
7181
|
-
else (0,
|
|
7316
|
+
else (0, import_vue20.nextTick)(updatePosition);
|
|
7182
7317
|
}
|
|
7183
7318
|
function onKeydown(event) {
|
|
7184
7319
|
if (!open.value) return;
|
|
@@ -7208,14 +7343,14 @@ var mentions_default = {
|
|
|
7208
7343
|
emit("update:modelValue", next);
|
|
7209
7344
|
emit("select", item);
|
|
7210
7345
|
closePanel();
|
|
7211
|
-
(0,
|
|
7346
|
+
(0, import_vue20.nextTick)(() => {
|
|
7212
7347
|
if (!input.value) return;
|
|
7213
7348
|
const pos = triggerIndex + item.label.length + 2;
|
|
7214
7349
|
input.value.focus();
|
|
7215
7350
|
input.value.setSelectionRange(pos, pos);
|
|
7216
7351
|
});
|
|
7217
7352
|
}
|
|
7218
|
-
(0,
|
|
7353
|
+
(0, import_vue20.onBeforeUnmount)(closePanel);
|
|
7219
7354
|
return {
|
|
7220
7355
|
root,
|
|
7221
7356
|
input,
|
|
@@ -7489,7 +7624,7 @@ var input_tag_default = {
|
|
|
7489
7624
|
};
|
|
7490
7625
|
|
|
7491
7626
|
// src/components/password/index.js
|
|
7492
|
-
var
|
|
7627
|
+
var import_vue21 = require("vue");
|
|
7493
7628
|
var password_default = {
|
|
7494
7629
|
name: "DjmPassword",
|
|
7495
7630
|
components: { DjmIcon: icon_default },
|
|
@@ -7503,8 +7638,8 @@ var password_default = {
|
|
|
7503
7638
|
},
|
|
7504
7639
|
emits: ["update:modelValue", "input", "change", "enter", "focus", "blur"],
|
|
7505
7640
|
setup(props, { emit }) {
|
|
7506
|
-
const visible = (0,
|
|
7507
|
-
const score = (0,
|
|
7641
|
+
const visible = (0, import_vue21.ref)(false);
|
|
7642
|
+
const score = (0, import_vue21.computed)(() => {
|
|
7508
7643
|
const value = props.modelValue || "";
|
|
7509
7644
|
if (!value) return 0;
|
|
7510
7645
|
let total = 0;
|
|
@@ -7514,12 +7649,12 @@ var password_default = {
|
|
|
7514
7649
|
if (/[^a-zA-Z\d]/.test(value)) total += 1;
|
|
7515
7650
|
return total;
|
|
7516
7651
|
});
|
|
7517
|
-
const level = (0,
|
|
7652
|
+
const level = (0, import_vue21.computed)(() => {
|
|
7518
7653
|
if (score.value <= 1) return 1;
|
|
7519
7654
|
if (score.value <= 3) return 2;
|
|
7520
7655
|
return 3;
|
|
7521
7656
|
});
|
|
7522
|
-
const label = (0,
|
|
7657
|
+
const label = (0, import_vue21.computed)(() => {
|
|
7523
7658
|
const key = ["", "password.weak", "password.medium", "password.strong"][level.value];
|
|
7524
7659
|
return t(key);
|
|
7525
7660
|
});
|
|
@@ -7569,7 +7704,7 @@ var password_default = {
|
|
|
7569
7704
|
};
|
|
7570
7705
|
|
|
7571
7706
|
// src/components/command-palette/index.js
|
|
7572
|
-
var
|
|
7707
|
+
var import_vue22 = require("vue");
|
|
7573
7708
|
|
|
7574
7709
|
// src/utils/focus-trap.js
|
|
7575
7710
|
var FOCUSABLE = [
|
|
@@ -7622,14 +7757,14 @@ var command_palette_default = {
|
|
|
7622
7757
|
},
|
|
7623
7758
|
emits: ["update:modelValue", "run"],
|
|
7624
7759
|
setup(props, { emit }) {
|
|
7625
|
-
const open = (0,
|
|
7626
|
-
const keyword = (0,
|
|
7627
|
-
const activeIndex = (0,
|
|
7628
|
-
const searchInput = (0,
|
|
7629
|
-
const panelEl = (0,
|
|
7760
|
+
const open = (0, import_vue22.ref)(false);
|
|
7761
|
+
const keyword = (0, import_vue22.ref)("");
|
|
7762
|
+
const activeIndex = (0, import_vue22.ref)(-1);
|
|
7763
|
+
const searchInput = (0, import_vue22.ref)(null);
|
|
7764
|
+
const panelEl = (0, import_vue22.ref)(null);
|
|
7630
7765
|
const listId = "djm-command-list-" + ++uidSeed4;
|
|
7631
7766
|
let releaseTrap = null;
|
|
7632
|
-
const filtered = (0,
|
|
7767
|
+
const filtered = (0, import_vue22.computed)(() => {
|
|
7633
7768
|
const key = keyword.value.trim().toLowerCase();
|
|
7634
7769
|
if (!key) return props.commands;
|
|
7635
7770
|
return props.commands.filter((item) => {
|
|
@@ -7637,7 +7772,7 @@ var command_palette_default = {
|
|
|
7637
7772
|
return text.indexOf(key) > -1;
|
|
7638
7773
|
});
|
|
7639
7774
|
});
|
|
7640
|
-
const activeId = (0,
|
|
7775
|
+
const activeId = (0, import_vue22.computed)(() => activeIndex.value > -1 ? listId + "-" + activeIndex.value : void 0);
|
|
7641
7776
|
function show() {
|
|
7642
7777
|
if (open.value) return;
|
|
7643
7778
|
open.value = true;
|
|
@@ -7646,7 +7781,7 @@ var command_palette_default = {
|
|
|
7646
7781
|
emit("update:modelValue", true);
|
|
7647
7782
|
lockScroll();
|
|
7648
7783
|
document.addEventListener("keydown", onDocumentKeydown);
|
|
7649
|
-
(0,
|
|
7784
|
+
(0, import_vue22.nextTick)(() => {
|
|
7650
7785
|
releaseTrap = trapFocus(panelEl.value);
|
|
7651
7786
|
if (searchInput.value) searchInput.value.focus();
|
|
7652
7787
|
});
|
|
@@ -7709,12 +7844,12 @@ var command_palette_default = {
|
|
|
7709
7844
|
if (typeof item.run === "function") item.run(item);
|
|
7710
7845
|
hide();
|
|
7711
7846
|
}
|
|
7712
|
-
(0,
|
|
7847
|
+
(0, import_vue22.watch)(() => props.modelValue, (value) => {
|
|
7713
7848
|
if (value) show();
|
|
7714
7849
|
else hide();
|
|
7715
7850
|
});
|
|
7716
|
-
(0,
|
|
7717
|
-
(0,
|
|
7851
|
+
(0, import_vue22.onMounted)(() => window.addEventListener("keydown", onGlobalKeydown));
|
|
7852
|
+
(0, import_vue22.onBeforeUnmount)(() => {
|
|
7718
7853
|
window.removeEventListener("keydown", onGlobalKeydown);
|
|
7719
7854
|
hide();
|
|
7720
7855
|
});
|
|
@@ -7766,7 +7901,7 @@ var command_palette_default = {
|
|
|
7766
7901
|
};
|
|
7767
7902
|
|
|
7768
7903
|
// src/components/qrcode/index.js
|
|
7769
|
-
var
|
|
7904
|
+
var import_vue23 = require("vue");
|
|
7770
7905
|
var qrcode_default = {
|
|
7771
7906
|
name: "DjmQRCode",
|
|
7772
7907
|
props: {
|
|
@@ -7781,8 +7916,8 @@ var qrcode_default = {
|
|
|
7781
7916
|
alt: { type: String, default: "\u4E8C\u7EF4\u7801" }
|
|
7782
7917
|
},
|
|
7783
7918
|
setup(props) {
|
|
7784
|
-
const src = (0,
|
|
7785
|
-
const error = (0,
|
|
7919
|
+
const src = (0, import_vue23.ref)("");
|
|
7920
|
+
const error = (0, import_vue23.ref)("");
|
|
7786
7921
|
let lib = null;
|
|
7787
7922
|
let seq2 = 0;
|
|
7788
7923
|
async function ensureLib() {
|
|
@@ -7818,8 +7953,8 @@ var qrcode_default = {
|
|
|
7818
7953
|
error.value = "\u4E8C\u7EF4\u7801\u751F\u6210\u5931\u8D25";
|
|
7819
7954
|
}
|
|
7820
7955
|
}
|
|
7821
|
-
(0,
|
|
7822
|
-
(0,
|
|
7956
|
+
(0, import_vue23.onMounted)(render);
|
|
7957
|
+
(0, import_vue23.watch)(() => [props.value, props.size, props.level, props.margin, props.dark, props.light], render);
|
|
7823
7958
|
return { src, error };
|
|
7824
7959
|
},
|
|
7825
7960
|
template: `
|
|
@@ -7858,7 +7993,7 @@ var status_default = {
|
|
|
7858
7993
|
};
|
|
7859
7994
|
|
|
7860
7995
|
// src/components/tooltip/index.js
|
|
7861
|
-
var
|
|
7996
|
+
var import_vue24 = require("vue");
|
|
7862
7997
|
var uid2 = 0;
|
|
7863
7998
|
var tooltip_default = {
|
|
7864
7999
|
name: "DjmTooltip",
|
|
@@ -7869,11 +8004,11 @@ var tooltip_default = {
|
|
|
7869
8004
|
delay: { type: Number, default: 80 }
|
|
7870
8005
|
},
|
|
7871
8006
|
setup(props) {
|
|
7872
|
-
const visible = (0,
|
|
7873
|
-
const rootRef = (0,
|
|
7874
|
-
const contentRef = (0,
|
|
7875
|
-
const actualPlacement = (0,
|
|
7876
|
-
const panelStyle = (0,
|
|
8007
|
+
const visible = (0, import_vue24.ref)(false);
|
|
8008
|
+
const rootRef = (0, import_vue24.ref)(null);
|
|
8009
|
+
const contentRef = (0, import_vue24.ref)(null);
|
|
8010
|
+
const actualPlacement = (0, import_vue24.ref)(props.placement);
|
|
8011
|
+
const panelStyle = (0, import_vue24.ref)({});
|
|
7877
8012
|
const tipId = "djm-tooltip-" + ++uid2;
|
|
7878
8013
|
let timer = null;
|
|
7879
8014
|
function triggerEl() {
|
|
@@ -7931,7 +8066,7 @@ var tooltip_default = {
|
|
|
7931
8066
|
window.clearTimeout(timer);
|
|
7932
8067
|
timer = window.setTimeout(async () => {
|
|
7933
8068
|
visible.value = true;
|
|
7934
|
-
await (0,
|
|
8069
|
+
await (0, import_vue24.nextTick)();
|
|
7935
8070
|
position();
|
|
7936
8071
|
bindTrigger(true);
|
|
7937
8072
|
bindReposition(true);
|
|
@@ -7944,7 +8079,7 @@ var tooltip_default = {
|
|
|
7944
8079
|
bindTrigger(false);
|
|
7945
8080
|
bindReposition(false);
|
|
7946
8081
|
}
|
|
7947
|
-
(0,
|
|
8082
|
+
(0, import_vue24.onBeforeUnmount)(() => {
|
|
7948
8083
|
window.clearTimeout(timer);
|
|
7949
8084
|
bindReposition(false);
|
|
7950
8085
|
});
|
|
@@ -7969,7 +8104,7 @@ var tooltip_default = {
|
|
|
7969
8104
|
};
|
|
7970
8105
|
|
|
7971
8106
|
// src/components/dropdown/index.js
|
|
7972
|
-
var
|
|
8107
|
+
var import_vue25 = require("vue");
|
|
7973
8108
|
var dropdown_default = {
|
|
7974
8109
|
name: "DjmDropdown",
|
|
7975
8110
|
components: { DjmIcon: icon_default },
|
|
@@ -7986,10 +8121,10 @@ var dropdown_default = {
|
|
|
7986
8121
|
},
|
|
7987
8122
|
emits: ["select", "visible-change"],
|
|
7988
8123
|
setup(props, { emit }) {
|
|
7989
|
-
const open = (0,
|
|
7990
|
-
const root = (0,
|
|
7991
|
-
const menuEl = (0,
|
|
7992
|
-
const panelStyle = (0,
|
|
8124
|
+
const open = (0, import_vue25.ref)(false);
|
|
8125
|
+
const root = (0, import_vue25.ref)(null);
|
|
8126
|
+
const menuEl = (0, import_vue25.ref)(null);
|
|
8127
|
+
const panelStyle = (0, import_vue25.ref)({});
|
|
7993
8128
|
let detachPanel = null;
|
|
7994
8129
|
function syncTriggerA11y() {
|
|
7995
8130
|
const wrapper = root.value && root.value.querySelector(".djm-dropdown-trigger");
|
|
@@ -8002,8 +8137,8 @@ var dropdown_default = {
|
|
|
8002
8137
|
if (props.disabled) target.setAttribute("aria-disabled", "true");
|
|
8003
8138
|
else target.removeAttribute("aria-disabled");
|
|
8004
8139
|
}
|
|
8005
|
-
(0,
|
|
8006
|
-
(0,
|
|
8140
|
+
(0, import_vue25.onMounted)(() => (0, import_vue25.nextTick)(syncTriggerA11y));
|
|
8141
|
+
(0, import_vue25.watch)(open, () => (0, import_vue25.nextTick)(syncTriggerA11y));
|
|
8007
8142
|
function updatePosition() {
|
|
8008
8143
|
if (!open.value || !root.value) return;
|
|
8009
8144
|
const rect = root.value.getBoundingClientRect();
|
|
@@ -8047,7 +8182,7 @@ var dropdown_default = {
|
|
|
8047
8182
|
returnFocus();
|
|
8048
8183
|
}
|
|
8049
8184
|
function focusFirstItem() {
|
|
8050
|
-
(0,
|
|
8185
|
+
(0, import_vue25.nextTick)(() => {
|
|
8051
8186
|
const el = menuEl.value && menuEl.value.querySelector(".djm-dropdown-item:not(:disabled)");
|
|
8052
8187
|
if (el) el.focus();
|
|
8053
8188
|
});
|
|
@@ -8106,7 +8241,7 @@ var dropdown_default = {
|
|
|
8106
8241
|
emit("select", item);
|
|
8107
8242
|
if (props.closeOnSelect) close2();
|
|
8108
8243
|
}
|
|
8109
|
-
(0,
|
|
8244
|
+
(0, import_vue25.onBeforeUnmount)(() => {
|
|
8110
8245
|
window.clearTimeout(hoverTimer);
|
|
8111
8246
|
close2();
|
|
8112
8247
|
});
|
|
@@ -8171,7 +8306,7 @@ var dropdown_default = {
|
|
|
8171
8306
|
};
|
|
8172
8307
|
|
|
8173
8308
|
// src/components/drawer/index.js
|
|
8174
|
-
var
|
|
8309
|
+
var import_vue26 = require("vue");
|
|
8175
8310
|
var uid3 = 0;
|
|
8176
8311
|
var drawer_default = {
|
|
8177
8312
|
name: "DjmDrawer",
|
|
@@ -8184,11 +8319,13 @@ var drawer_default = {
|
|
|
8184
8319
|
// 点击遮罩关闭
|
|
8185
8320
|
maskClosable: { type: Boolean, default: true },
|
|
8186
8321
|
showClose: { type: Boolean, default: true },
|
|
8187
|
-
closeOnEsc: { type: Boolean, default: true }
|
|
8322
|
+
closeOnEsc: { type: Boolean, default: true },
|
|
8323
|
+
// 毛玻璃底
|
|
8324
|
+
glass: { type: Boolean, default: false }
|
|
8188
8325
|
},
|
|
8189
8326
|
emits: ["update:modelValue", "open", "close"],
|
|
8190
8327
|
setup(props, { emit }) {
|
|
8191
|
-
const panelRef = (0,
|
|
8328
|
+
const panelRef = (0, import_vue26.ref)(null);
|
|
8192
8329
|
const titleId = `djm-drawer-title-${++uid3}`;
|
|
8193
8330
|
let locked = false;
|
|
8194
8331
|
let releaseTrap = null;
|
|
@@ -8209,7 +8346,7 @@ var drawer_default = {
|
|
|
8209
8346
|
lockScroll();
|
|
8210
8347
|
locked = true;
|
|
8211
8348
|
emit("open");
|
|
8212
|
-
await (0,
|
|
8349
|
+
await (0, import_vue26.nextTick)();
|
|
8213
8350
|
releaseTrap = trapFocus(panelRef.value);
|
|
8214
8351
|
}
|
|
8215
8352
|
function deactivate() {
|
|
@@ -8221,14 +8358,14 @@ var drawer_default = {
|
|
|
8221
8358
|
}
|
|
8222
8359
|
emit("close");
|
|
8223
8360
|
}
|
|
8224
|
-
(0,
|
|
8361
|
+
(0, import_vue26.watch)(() => props.modelValue, (open) => {
|
|
8225
8362
|
if (open) activate();
|
|
8226
8363
|
else deactivate();
|
|
8227
8364
|
});
|
|
8228
|
-
(0,
|
|
8365
|
+
(0, import_vue26.onMounted)(() => {
|
|
8229
8366
|
if (props.modelValue) activate();
|
|
8230
8367
|
});
|
|
8231
|
-
(0,
|
|
8368
|
+
(0, import_vue26.onBeforeUnmount)(() => {
|
|
8232
8369
|
document.removeEventListener("keydown", onKeydown);
|
|
8233
8370
|
release();
|
|
8234
8371
|
if (locked) unlockScroll();
|
|
@@ -8247,7 +8384,7 @@ var drawer_default = {
|
|
|
8247
8384
|
<aside
|
|
8248
8385
|
ref="panelRef"
|
|
8249
8386
|
class="djm-drawer"
|
|
8250
|
-
:class="'djm-drawer-' + placement"
|
|
8387
|
+
:class="['djm-drawer-' + placement, { 'djm-is-glass': glass }]"
|
|
8251
8388
|
:style="panelStyle"
|
|
8252
8389
|
role="dialog"
|
|
8253
8390
|
aria-modal="true"
|
|
@@ -8282,7 +8419,7 @@ var drawer_default = {
|
|
|
8282
8419
|
};
|
|
8283
8420
|
|
|
8284
8421
|
// src/components/modal/index.js
|
|
8285
|
-
var
|
|
8422
|
+
var import_vue27 = require("vue");
|
|
8286
8423
|
var uid4 = 0;
|
|
8287
8424
|
var modal_default = {
|
|
8288
8425
|
name: "DjmModal",
|
|
@@ -8297,11 +8434,13 @@ var modal_default = {
|
|
|
8297
8434
|
// 是否允许 Esc 关闭
|
|
8298
8435
|
closeOnEsc: { type: Boolean, default: true },
|
|
8299
8436
|
// 全屏铺满,适合配置类大表单
|
|
8300
|
-
fullscreen: { type: Boolean, default: false }
|
|
8437
|
+
fullscreen: { type: Boolean, default: false },
|
|
8438
|
+
// 毛玻璃底:需要显示背后页面时使用
|
|
8439
|
+
glass: { type: Boolean, default: false }
|
|
8301
8440
|
},
|
|
8302
8441
|
emits: ["update:modelValue", "open", "close"],
|
|
8303
8442
|
setup(props, { emit }) {
|
|
8304
|
-
const dialogRef = (0,
|
|
8443
|
+
const dialogRef = (0, import_vue27.ref)(null);
|
|
8305
8444
|
const titleId = `djm-modal-title-${++uid4}`;
|
|
8306
8445
|
let locked = false;
|
|
8307
8446
|
let releaseTrap = null;
|
|
@@ -8322,7 +8461,7 @@ var modal_default = {
|
|
|
8322
8461
|
lockScroll();
|
|
8323
8462
|
locked = true;
|
|
8324
8463
|
emit("open");
|
|
8325
|
-
await (0,
|
|
8464
|
+
await (0, import_vue27.nextTick)();
|
|
8326
8465
|
releaseTrap = trapFocus(dialogRef.value);
|
|
8327
8466
|
}
|
|
8328
8467
|
function deactivate() {
|
|
@@ -8334,14 +8473,14 @@ var modal_default = {
|
|
|
8334
8473
|
}
|
|
8335
8474
|
emit("close");
|
|
8336
8475
|
}
|
|
8337
|
-
(0,
|
|
8476
|
+
(0, import_vue27.watch)(() => props.modelValue, (open) => {
|
|
8338
8477
|
if (open) activate();
|
|
8339
8478
|
else deactivate();
|
|
8340
8479
|
});
|
|
8341
|
-
(0,
|
|
8480
|
+
(0, import_vue27.onMounted)(() => {
|
|
8342
8481
|
if (props.modelValue) activate();
|
|
8343
8482
|
});
|
|
8344
|
-
(0,
|
|
8483
|
+
(0, import_vue27.onBeforeUnmount)(() => {
|
|
8345
8484
|
document.removeEventListener("keydown", onKey);
|
|
8346
8485
|
release();
|
|
8347
8486
|
if (locked) unlockScroll();
|
|
@@ -8351,7 +8490,7 @@ var modal_default = {
|
|
|
8351
8490
|
dialogRef,
|
|
8352
8491
|
titleId,
|
|
8353
8492
|
t,
|
|
8354
|
-
dialogStyle: (0,
|
|
8493
|
+
dialogStyle: (0, import_vue27.computed)(
|
|
8355
8494
|
() => props.fullscreen ? { width: "calc(100vw - 32px)", height: "calc(100vh - 48px)" } : { width: props.width }
|
|
8356
8495
|
)
|
|
8357
8496
|
};
|
|
@@ -8363,7 +8502,7 @@ var modal_default = {
|
|
|
8363
8502
|
<div
|
|
8364
8503
|
ref="dialogRef"
|
|
8365
8504
|
class="djm-modal"
|
|
8366
|
-
:class="{ 'djm-is-fullscreen': fullscreen }"
|
|
8505
|
+
:class="{ 'djm-is-fullscreen': fullscreen, 'djm-is-glass': glass }"
|
|
8367
8506
|
:style="dialogStyle"
|
|
8368
8507
|
role="dialog"
|
|
8369
8508
|
aria-modal="true"
|
|
@@ -8461,7 +8600,7 @@ var confirm_dialog_default = {
|
|
|
8461
8600
|
};
|
|
8462
8601
|
|
|
8463
8602
|
// src/components/pagination/index.js
|
|
8464
|
-
var
|
|
8603
|
+
var import_vue28 = require("vue");
|
|
8465
8604
|
var pagination_default = {
|
|
8466
8605
|
name: "DjmPagination",
|
|
8467
8606
|
components: { Icon: icon_default },
|
|
@@ -8473,10 +8612,10 @@ var pagination_default = {
|
|
|
8473
8612
|
},
|
|
8474
8613
|
emits: ["update:page", "update:pageSize", "change"],
|
|
8475
8614
|
setup(props, { emit }) {
|
|
8476
|
-
const jumpText = (0,
|
|
8477
|
-
const pageCount = (0,
|
|
8478
|
-
const current = (0,
|
|
8479
|
-
const pages = (0,
|
|
8615
|
+
const jumpText = (0, import_vue28.ref)("");
|
|
8616
|
+
const pageCount = (0, import_vue28.computed)(() => Math.max(1, Math.ceil(props.total / Math.max(1, props.pageSize))));
|
|
8617
|
+
const current = (0, import_vue28.computed)(() => Math.min(Math.max(1, props.page), pageCount.value));
|
|
8618
|
+
const pages = (0, import_vue28.computed)(() => {
|
|
8480
8619
|
const count2 = pageCount.value;
|
|
8481
8620
|
const currentPage = current.value;
|
|
8482
8621
|
if (count2 <= 7) {
|
|
@@ -8573,7 +8712,7 @@ var pagination_default = {
|
|
|
8573
8712
|
};
|
|
8574
8713
|
|
|
8575
8714
|
// src/components/tabs/index.js
|
|
8576
|
-
var
|
|
8715
|
+
var import_vue29 = require("vue");
|
|
8577
8716
|
var uid5 = 0;
|
|
8578
8717
|
var tabs_default = {
|
|
8579
8718
|
name: "DjmTabs",
|
|
@@ -8589,7 +8728,7 @@ var tabs_default = {
|
|
|
8589
8728
|
emits: ["update:modelValue", "close"],
|
|
8590
8729
|
setup(props, { emit }) {
|
|
8591
8730
|
const panelId = `djm-tabs-panel-${++uid5}`;
|
|
8592
|
-
const activeItem = (0,
|
|
8731
|
+
const activeItem = (0, import_vue29.computed)(
|
|
8593
8732
|
() => props.items.find((item) => item.key === props.modelValue) || { label: String(props.modelValue) }
|
|
8594
8733
|
);
|
|
8595
8734
|
function tabId(item) {
|
|
@@ -8693,7 +8832,7 @@ var tabs_default = {
|
|
|
8693
8832
|
};
|
|
8694
8833
|
|
|
8695
8834
|
// src/components/context-menu/index.js
|
|
8696
|
-
var
|
|
8835
|
+
var import_vue30 = require("vue");
|
|
8697
8836
|
var context_menu_default = {
|
|
8698
8837
|
name: "DjmContextMenu",
|
|
8699
8838
|
components: { Icon: icon_default },
|
|
@@ -8705,8 +8844,8 @@ var context_menu_default = {
|
|
|
8705
8844
|
},
|
|
8706
8845
|
emits: ["update:modelValue", "select"],
|
|
8707
8846
|
setup(props, { emit }) {
|
|
8708
|
-
const menuRef = (0,
|
|
8709
|
-
const pos = (0,
|
|
8847
|
+
const menuRef = (0, import_vue30.ref)(null);
|
|
8848
|
+
const pos = (0, import_vue30.ref)({ left: 0, top: 0 });
|
|
8710
8849
|
const margin = 8;
|
|
8711
8850
|
function close2() {
|
|
8712
8851
|
emit("update:modelValue", false);
|
|
@@ -8726,7 +8865,7 @@ var context_menu_default = {
|
|
|
8726
8865
|
}
|
|
8727
8866
|
async function openAtCursor() {
|
|
8728
8867
|
pos.value = { left: props.x, top: props.y };
|
|
8729
|
-
await (0,
|
|
8868
|
+
await (0, import_vue30.nextTick)();
|
|
8730
8869
|
place();
|
|
8731
8870
|
const first = menuRef.value && menuRef.value.querySelector(".djm-context-menu-item:not(:disabled)");
|
|
8732
8871
|
if (first) first.focus();
|
|
@@ -8768,7 +8907,7 @@ var context_menu_default = {
|
|
|
8768
8907
|
detach = null;
|
|
8769
8908
|
}
|
|
8770
8909
|
}
|
|
8771
|
-
(0,
|
|
8910
|
+
(0, import_vue30.watch)(
|
|
8772
8911
|
() => props.modelValue,
|
|
8773
8912
|
(open) => {
|
|
8774
8913
|
if (open) {
|
|
@@ -8779,10 +8918,10 @@ var context_menu_default = {
|
|
|
8779
8918
|
}
|
|
8780
8919
|
}
|
|
8781
8920
|
);
|
|
8782
|
-
(0,
|
|
8921
|
+
(0, import_vue30.watch)([() => props.x, () => props.y], () => {
|
|
8783
8922
|
if (props.modelValue) openAtCursor();
|
|
8784
8923
|
});
|
|
8785
|
-
(0,
|
|
8924
|
+
(0, import_vue30.onBeforeUnmount)(unbind);
|
|
8786
8925
|
return { menuRef, pos, close: close2, onSelect, onKeydown, t };
|
|
8787
8926
|
},
|
|
8788
8927
|
template: `
|
|
@@ -8821,7 +8960,7 @@ var context_menu_default = {
|
|
|
8821
8960
|
};
|
|
8822
8961
|
|
|
8823
8962
|
// src/components/date-picker/index.js
|
|
8824
|
-
var
|
|
8963
|
+
var import_vue31 = require("vue");
|
|
8825
8964
|
var uidSeed5 = 0;
|
|
8826
8965
|
function pad3(value) {
|
|
8827
8966
|
return String(value).padStart(2, "0");
|
|
@@ -8856,36 +8995,36 @@ var date_picker_default = {
|
|
|
8856
8995
|
},
|
|
8857
8996
|
emits: ["update:modelValue", "change", "visible-change"],
|
|
8858
8997
|
setup(props, { emit }) {
|
|
8859
|
-
const open = (0,
|
|
8860
|
-
(0,
|
|
8861
|
-
const root = (0,
|
|
8862
|
-
const panel = (0,
|
|
8998
|
+
const open = (0, import_vue31.ref)(false);
|
|
8999
|
+
(0, import_vue31.watch)(open, (value) => emit("visible-change", value));
|
|
9000
|
+
const root = (0, import_vue31.ref)(null);
|
|
9001
|
+
const panel = (0, import_vue31.ref)(null);
|
|
8863
9002
|
const panelId = "djm-date-panel-" + ++uidSeed5;
|
|
8864
|
-
const panelStyle = (0,
|
|
9003
|
+
const panelStyle = (0, import_vue31.ref)({ ...PANEL_HIDDEN_STYLE });
|
|
8865
9004
|
let detachPanel = null;
|
|
8866
9005
|
const today = /* @__PURE__ */ new Date();
|
|
8867
9006
|
const todayKey = toKey2(today.getFullYear(), today.getMonth(), today.getDate());
|
|
8868
|
-
const values = (0,
|
|
9007
|
+
const values = (0, import_vue31.computed)(() => {
|
|
8869
9008
|
if (props.range) return Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
8870
9009
|
return props.modelValue ? [props.modelValue] : [];
|
|
8871
9010
|
});
|
|
8872
|
-
const displayText = (0,
|
|
9011
|
+
const displayText = (0, import_vue31.computed)(() => {
|
|
8873
9012
|
if (!props.range) return values.value[0] || "";
|
|
8874
9013
|
const [start, end] = values.value;
|
|
8875
9014
|
if (!start) return "";
|
|
8876
9015
|
return end ? `${start} ~ ${end}` : `${start} ~ ${t("datePicker.rangeEnd")}`;
|
|
8877
9016
|
});
|
|
8878
9017
|
const initial = parse2(values.value[0]);
|
|
8879
|
-
const viewYear = (0,
|
|
8880
|
-
const viewMonth = (0,
|
|
8881
|
-
const pendingStart = (0,
|
|
8882
|
-
const pendingEnd = (0,
|
|
8883
|
-
const placeholderText = (0,
|
|
9018
|
+
const viewYear = (0, import_vue31.ref)(initial ? initial.year : today.getFullYear());
|
|
9019
|
+
const viewMonth = (0, import_vue31.ref)(initial ? initial.month : today.getMonth());
|
|
9020
|
+
const pendingStart = (0, import_vue31.ref)(values.value[0] || "");
|
|
9021
|
+
const pendingEnd = (0, import_vue31.ref)(values.value[1] || "");
|
|
9022
|
+
const placeholderText = (0, import_vue31.computed)(() => {
|
|
8884
9023
|
if (props.placeholder) return props.placeholder;
|
|
8885
9024
|
return t(props.range ? "datePicker.rangePlaceholder" : "datePicker.placeholder");
|
|
8886
9025
|
});
|
|
8887
|
-
const weeks = (0,
|
|
8888
|
-
const narrow = (0,
|
|
9026
|
+
const weeks = (0, import_vue31.computed)(() => t("datePicker.weeks").split(","));
|
|
9027
|
+
const narrow = (0, import_vue31.ref)(false);
|
|
8889
9028
|
let media = null;
|
|
8890
9029
|
const onMediaChange = (event) => {
|
|
8891
9030
|
narrow.value = event.matches;
|
|
@@ -8896,14 +9035,14 @@ var date_picker_default = {
|
|
|
8896
9035
|
if (media.addEventListener) media.addEventListener("change", onMediaChange);
|
|
8897
9036
|
else media.addListener(onMediaChange);
|
|
8898
9037
|
}
|
|
8899
|
-
(0,
|
|
9038
|
+
(0, import_vue31.onBeforeUnmount)(() => {
|
|
8900
9039
|
if (!media) return;
|
|
8901
9040
|
if (media.removeEventListener) media.removeEventListener("change", onMediaChange);
|
|
8902
9041
|
else media.removeListener(onMediaChange);
|
|
8903
9042
|
});
|
|
8904
|
-
const panelCount = (0,
|
|
8905
|
-
const hoverKey = (0,
|
|
8906
|
-
const hoverRange = (0,
|
|
9043
|
+
const panelCount = (0, import_vue31.computed)(() => props.range ? Math.min(narrow.value ? 1 : 2, Math.max(1, props.panels)) : 1);
|
|
9044
|
+
const hoverKey = (0, import_vue31.ref)("");
|
|
9045
|
+
const hoverRange = (0, import_vue31.computed)(() => {
|
|
8907
9046
|
if (!props.range || !pendingStart.value || pendingEnd.value || !hoverKey.value) return null;
|
|
8908
9047
|
const a = pendingStart.value;
|
|
8909
9048
|
const b = hoverKey.value;
|
|
@@ -8939,7 +9078,7 @@ var date_picker_default = {
|
|
|
8939
9078
|
};
|
|
8940
9079
|
});
|
|
8941
9080
|
}
|
|
8942
|
-
const panels = (0,
|
|
9081
|
+
const panels = (0, import_vue31.computed)(
|
|
8943
9082
|
() => Array.from({ length: panelCount.value }, (_, offset) => {
|
|
8944
9083
|
const { year, month } = monthAt(offset);
|
|
8945
9084
|
return {
|
|
@@ -8954,7 +9093,7 @@ var date_picker_default = {
|
|
|
8954
9093
|
if (props.max && key > props.max) return true;
|
|
8955
9094
|
return typeof props.disabledDate === "function" ? Boolean(props.disabledDate(key)) : false;
|
|
8956
9095
|
}
|
|
8957
|
-
const presetList = (0,
|
|
9096
|
+
const presetList = (0, import_vue31.computed)(() => {
|
|
8958
9097
|
if (!props.range) return [];
|
|
8959
9098
|
return (props.presets || []).map((preset) => {
|
|
8960
9099
|
const value = typeof preset.value === "function" ? preset.value() : preset.value;
|
|
@@ -9082,7 +9221,7 @@ var date_picker_default = {
|
|
|
9082
9221
|
pendingEnd.value = "";
|
|
9083
9222
|
closePanel();
|
|
9084
9223
|
}
|
|
9085
|
-
(0,
|
|
9224
|
+
(0, import_vue31.onBeforeUnmount)(() => {
|
|
9086
9225
|
if (detachPanel) {
|
|
9087
9226
|
detachPanel();
|
|
9088
9227
|
detachPanel = null;
|
|
@@ -9211,7 +9350,7 @@ var date_picker_default = {
|
|
|
9211
9350
|
};
|
|
9212
9351
|
|
|
9213
9352
|
// src/components/tree-select/index.js
|
|
9214
|
-
var
|
|
9353
|
+
var import_vue32 = require("vue");
|
|
9215
9354
|
function collectLeaves(node, keyOf2, out = []) {
|
|
9216
9355
|
if (node.children && node.children.length) {
|
|
9217
9356
|
node.children.forEach((child) => collectLeaves(child, keyOf2, out));
|
|
@@ -9247,13 +9386,13 @@ var tree_select_default = {
|
|
|
9247
9386
|
},
|
|
9248
9387
|
emits: ["update:modelValue", "change", "visible-change"],
|
|
9249
9388
|
setup(props, { emit }) {
|
|
9250
|
-
const open = (0,
|
|
9251
|
-
const root = (0,
|
|
9252
|
-
const panel = (0,
|
|
9253
|
-
const searchInput = (0,
|
|
9254
|
-
const search = (0,
|
|
9255
|
-
const temp = (0,
|
|
9256
|
-
const panelStyle = (0,
|
|
9389
|
+
const open = (0, import_vue32.ref)(false);
|
|
9390
|
+
const root = (0, import_vue32.ref)(null);
|
|
9391
|
+
const panel = (0, import_vue32.ref)(null);
|
|
9392
|
+
const searchInput = (0, import_vue32.ref)(null);
|
|
9393
|
+
const search = (0, import_vue32.ref)("");
|
|
9394
|
+
const temp = (0, import_vue32.ref)([]);
|
|
9395
|
+
const panelStyle = (0, import_vue32.ref)({ ...PANEL_HIDDEN_STYLE });
|
|
9257
9396
|
let detachPanel = null;
|
|
9258
9397
|
function keyOf2(node) {
|
|
9259
9398
|
return node ? node[props.nodeKey] : void 0;
|
|
@@ -9262,26 +9401,26 @@ var tree_select_default = {
|
|
|
9262
9401
|
const value = node ? node[props.labelKey] : "";
|
|
9263
9402
|
return value === null || value === void 0 ? "" : String(value);
|
|
9264
9403
|
}
|
|
9265
|
-
const expandedIds = (0,
|
|
9404
|
+
const expandedIds = (0, import_vue32.ref)(
|
|
9266
9405
|
new Set(
|
|
9267
9406
|
collectNodes(props.options).filter((node) => node.children && node.children.length).map((node) => keyOf2(node))
|
|
9268
9407
|
)
|
|
9269
9408
|
);
|
|
9270
|
-
const nodeMap = (0,
|
|
9409
|
+
const nodeMap = (0, import_vue32.computed)(() => {
|
|
9271
9410
|
const map = /* @__PURE__ */ new Map();
|
|
9272
9411
|
collectNodes(props.options).forEach((node) => map.set(keyOf2(node), node));
|
|
9273
9412
|
return map;
|
|
9274
9413
|
});
|
|
9275
|
-
(0,
|
|
9414
|
+
(0, import_vue32.watch)(() => props.options, (options) => {
|
|
9276
9415
|
if (!options || !options.length || expandedIds.value.size) return;
|
|
9277
9416
|
expandedIds.value = new Set(
|
|
9278
9417
|
collectNodes(options).filter((node) => node.children && node.children.length).map((node) => keyOf2(node))
|
|
9279
9418
|
);
|
|
9280
9419
|
});
|
|
9281
|
-
const selectedNodes = (0,
|
|
9420
|
+
const selectedNodes = (0, import_vue32.computed)(
|
|
9282
9421
|
() => props.modelValue.map((id) => nodeMap.value.get(id)).filter(Boolean).map((node) => ({ key: keyOf2(node), label: labelOf(node) }))
|
|
9283
9422
|
);
|
|
9284
|
-
const searchState = (0,
|
|
9423
|
+
const searchState = (0, import_vue32.computed)(() => {
|
|
9285
9424
|
const text = search.value.trim().toLowerCase();
|
|
9286
9425
|
if (!text) return null;
|
|
9287
9426
|
const visible = /* @__PURE__ */ new Set();
|
|
@@ -9300,7 +9439,7 @@ var tree_select_default = {
|
|
|
9300
9439
|
walk(props.options);
|
|
9301
9440
|
return visible;
|
|
9302
9441
|
});
|
|
9303
|
-
const rows = (0,
|
|
9442
|
+
const rows = (0, import_vue32.computed)(() => {
|
|
9304
9443
|
const result = [];
|
|
9305
9444
|
const walk = (nodes, depth) => {
|
|
9306
9445
|
nodes.forEach((node) => {
|
|
@@ -9375,7 +9514,7 @@ var tree_select_default = {
|
|
|
9375
9514
|
onClose: closePanel,
|
|
9376
9515
|
onReposition: updatePosition
|
|
9377
9516
|
});
|
|
9378
|
-
(0,
|
|
9517
|
+
(0, import_vue32.nextTick)(() => {
|
|
9379
9518
|
updatePosition();
|
|
9380
9519
|
if (searchInput.value) searchInput.value.focus();
|
|
9381
9520
|
});
|
|
@@ -9431,7 +9570,7 @@ var tree_select_default = {
|
|
|
9431
9570
|
emit("change", []);
|
|
9432
9571
|
temp.value = [];
|
|
9433
9572
|
}
|
|
9434
|
-
(0,
|
|
9573
|
+
(0, import_vue32.onBeforeUnmount)(() => {
|
|
9435
9574
|
if (detachPanel) {
|
|
9436
9575
|
detachPanel();
|
|
9437
9576
|
detachPanel = null;
|
|
@@ -9570,10 +9709,10 @@ var tree_select_default = {
|
|
|
9570
9709
|
};
|
|
9571
9710
|
|
|
9572
9711
|
// src/components/rich-editor/index.js
|
|
9573
|
-
var
|
|
9712
|
+
var import_vue34 = require("vue");
|
|
9574
9713
|
|
|
9575
9714
|
// src/components/media-picker/index.js
|
|
9576
|
-
var
|
|
9715
|
+
var import_vue33 = require("vue");
|
|
9577
9716
|
var media_picker_default = {
|
|
9578
9717
|
name: "DjmMediaPicker",
|
|
9579
9718
|
components: { DjmModal: modal_default, DjmPagination: pagination_default, DjmIcon: icon_default },
|
|
@@ -9592,11 +9731,11 @@ var media_picker_default = {
|
|
|
9592
9731
|
},
|
|
9593
9732
|
emits: ["update:modelValue", "change"],
|
|
9594
9733
|
setup(props, { emit }) {
|
|
9595
|
-
const open = (0,
|
|
9596
|
-
const keyword = (0,
|
|
9597
|
-
const page = (0,
|
|
9598
|
-
const temp = (0,
|
|
9599
|
-
const selectedIds = (0,
|
|
9734
|
+
const open = (0, import_vue33.ref)(false);
|
|
9735
|
+
const keyword = (0, import_vue33.ref)("");
|
|
9736
|
+
const page = (0, import_vue33.ref)(1);
|
|
9737
|
+
const temp = (0, import_vue33.ref)([]);
|
|
9738
|
+
const selectedIds = (0, import_vue33.computed)(() => {
|
|
9600
9739
|
if (props.multiple) return Array.isArray(props.modelValue) ? props.modelValue : [];
|
|
9601
9740
|
if (props.modelValue === "" || props.modelValue === null || props.modelValue === void 0) return [];
|
|
9602
9741
|
return [props.modelValue];
|
|
@@ -9605,7 +9744,7 @@ var media_picker_default = {
|
|
|
9605
9744
|
if (item.type) return item.type === "image";
|
|
9606
9745
|
return /\.(png|jpe?g|gif|webp|svg|avif)$/i.test(item.url || "");
|
|
9607
9746
|
}
|
|
9608
|
-
const filtered = (0,
|
|
9747
|
+
const filtered = (0, import_vue33.computed)(() => {
|
|
9609
9748
|
const key = keyword.value.trim().toLowerCase();
|
|
9610
9749
|
return props.items.filter((item) => {
|
|
9611
9750
|
if (props.accept === "image" && !isImage(item)) return false;
|
|
@@ -9614,14 +9753,14 @@ var media_picker_default = {
|
|
|
9614
9753
|
return true;
|
|
9615
9754
|
});
|
|
9616
9755
|
});
|
|
9617
|
-
const paged = (0,
|
|
9756
|
+
const paged = (0, import_vue33.computed)(() => {
|
|
9618
9757
|
const start = (page.value - 1) * props.pageSize;
|
|
9619
9758
|
return filtered.value.slice(start, start + props.pageSize);
|
|
9620
9759
|
});
|
|
9621
|
-
(0,
|
|
9760
|
+
(0, import_vue33.watch)(keyword, () => {
|
|
9622
9761
|
page.value = 1;
|
|
9623
9762
|
});
|
|
9624
|
-
(0,
|
|
9763
|
+
(0, import_vue33.watch)(
|
|
9625
9764
|
() => filtered.value.length,
|
|
9626
9765
|
() => {
|
|
9627
9766
|
const max = Math.max(1, Math.ceil(filtered.value.length / props.pageSize));
|
|
@@ -9955,18 +10094,18 @@ var rich_editor_default = {
|
|
|
9955
10094
|
},
|
|
9956
10095
|
emits: ["update:modelValue", "upload-error"],
|
|
9957
10096
|
setup(props, { emit }) {
|
|
9958
|
-
const editor = (0,
|
|
9959
|
-
const fileInput = (0,
|
|
9960
|
-
const sourceMode = (0,
|
|
9961
|
-
const source = (0,
|
|
9962
|
-
const fullscreen = (0,
|
|
9963
|
-
const panel = (0,
|
|
9964
|
-
const uploadCount = (0,
|
|
9965
|
-
const textColor = (0,
|
|
9966
|
-
const bgColor = (0,
|
|
9967
|
-
const fontSize = (0,
|
|
9968
|
-
const count2 = (0,
|
|
9969
|
-
const formats = (0,
|
|
10097
|
+
const editor = (0, import_vue34.ref)(null);
|
|
10098
|
+
const fileInput = (0, import_vue34.ref)(null);
|
|
10099
|
+
const sourceMode = (0, import_vue34.ref)(false);
|
|
10100
|
+
const source = (0, import_vue34.ref)(props.modelValue);
|
|
10101
|
+
const fullscreen = (0, import_vue34.ref)(false);
|
|
10102
|
+
const panel = (0, import_vue34.ref)("");
|
|
10103
|
+
const uploadCount = (0, import_vue34.ref)(0);
|
|
10104
|
+
const textColor = (0, import_vue34.ref)(COLORS[0]);
|
|
10105
|
+
const bgColor = (0, import_vue34.ref)("#fdf3c4");
|
|
10106
|
+
const fontSize = (0, import_vue34.ref)("");
|
|
10107
|
+
const count2 = (0, import_vue34.ref)(0);
|
|
10108
|
+
const formats = (0, import_vue34.ref)({
|
|
9970
10109
|
bold: false,
|
|
9971
10110
|
italic: false,
|
|
9972
10111
|
underline: false,
|
|
@@ -9977,15 +10116,15 @@ var rich_editor_default = {
|
|
|
9977
10116
|
list: ""
|
|
9978
10117
|
});
|
|
9979
10118
|
let savedRange = null;
|
|
9980
|
-
const ready = (0,
|
|
9981
|
-
const toolbarGroups = (0,
|
|
10119
|
+
const ready = (0, import_vue34.computed)(() => !props.disabled && !sourceMode.value);
|
|
10120
|
+
const toolbarGroups = (0, import_vue34.computed)(() => {
|
|
9982
10121
|
const list = Array.isArray(props.toolbar) ? props.toolbar : TOOLBAR_PRESETS[props.toolbar] || TOOLBAR_PRESETS.full;
|
|
9983
10122
|
return new Set(list);
|
|
9984
10123
|
});
|
|
9985
10124
|
function has(group) {
|
|
9986
10125
|
return toolbarGroups.value.has(group);
|
|
9987
10126
|
}
|
|
9988
|
-
const mediaLibrary = (0,
|
|
10127
|
+
const mediaLibrary = (0, import_vue34.computed)(
|
|
9989
10128
|
() => (props.media || []).map((item, index) => {
|
|
9990
10129
|
if (typeof item === "string") {
|
|
9991
10130
|
return { id: "media-" + index, url: item, name: "", type: "image" };
|
|
@@ -10360,7 +10499,7 @@ var rich_editor_default = {
|
|
|
10360
10499
|
panel.value = "";
|
|
10361
10500
|
}
|
|
10362
10501
|
}
|
|
10363
|
-
(0,
|
|
10502
|
+
(0, import_vue34.watch)(
|
|
10364
10503
|
() => props.modelValue,
|
|
10365
10504
|
(value) => {
|
|
10366
10505
|
if (sourceMode.value) {
|
|
@@ -10372,14 +10511,14 @@ var rich_editor_default = {
|
|
|
10372
10511
|
count2.value = plainText(next).trim().length;
|
|
10373
10512
|
}
|
|
10374
10513
|
);
|
|
10375
|
-
(0,
|
|
10514
|
+
(0, import_vue34.onMounted)(() => {
|
|
10376
10515
|
if (editor.value) editor.value.innerHTML = clean(props.modelValue);
|
|
10377
10516
|
count2.value = plainText(props.modelValue).trim().length;
|
|
10378
10517
|
document.addEventListener("selectionchange", syncFormats);
|
|
10379
10518
|
document.addEventListener("click", onDocumentClick);
|
|
10380
10519
|
document.addEventListener("keydown", onKeydown);
|
|
10381
10520
|
});
|
|
10382
|
-
(0,
|
|
10521
|
+
(0, import_vue34.onBeforeUnmount)(() => {
|
|
10383
10522
|
document.removeEventListener("selectionchange", syncFormats);
|
|
10384
10523
|
document.removeEventListener("click", onDocumentClick);
|
|
10385
10524
|
document.removeEventListener("keydown", onKeydown);
|
|
@@ -10682,7 +10821,7 @@ var rich_editor_default = {
|
|
|
10682
10821
|
};
|
|
10683
10822
|
|
|
10684
10823
|
// src/components/floating-window/index.js
|
|
10685
|
-
var
|
|
10824
|
+
var import_vue35 = require("vue");
|
|
10686
10825
|
function clamp(value, min, max) {
|
|
10687
10826
|
return Math.min(Math.max(value, min), Math.max(min, max));
|
|
10688
10827
|
}
|
|
@@ -10700,12 +10839,12 @@ var floating_window_default = {
|
|
|
10700
10839
|
},
|
|
10701
10840
|
emits: ["close", "focus"],
|
|
10702
10841
|
setup(props, { emit }) {
|
|
10703
|
-
const root = (0,
|
|
10704
|
-
const pos = (0,
|
|
10705
|
-
const size = (0,
|
|
10706
|
-
const minimized = (0,
|
|
10707
|
-
const maximized = (0,
|
|
10708
|
-
const saved = (0,
|
|
10842
|
+
const root = (0, import_vue35.ref)(null);
|
|
10843
|
+
const pos = (0, import_vue35.ref)({ x: props.initialX, y: props.initialY });
|
|
10844
|
+
const size = (0, import_vue35.ref)({ w: props.width, h: props.height });
|
|
10845
|
+
const minimized = (0, import_vue35.ref)(false);
|
|
10846
|
+
const maximized = (0, import_vue35.ref)(false);
|
|
10847
|
+
const saved = (0, import_vue35.ref)(null);
|
|
10709
10848
|
let drag = null;
|
|
10710
10849
|
let resize = null;
|
|
10711
10850
|
function stage() {
|
|
@@ -10793,7 +10932,7 @@ var floating_window_default = {
|
|
|
10793
10932
|
}
|
|
10794
10933
|
emit("focus");
|
|
10795
10934
|
}
|
|
10796
|
-
(0,
|
|
10935
|
+
(0, import_vue35.onBeforeUnmount)(() => {
|
|
10797
10936
|
window.removeEventListener("pointermove", onDrag);
|
|
10798
10937
|
window.removeEventListener("pointerup", endDrag);
|
|
10799
10938
|
window.removeEventListener("pointermove", onResize);
|
|
@@ -10841,7 +10980,7 @@ var floating_window_default = {
|
|
|
10841
10980
|
};
|
|
10842
10981
|
|
|
10843
10982
|
// src/components/upload/index.js
|
|
10844
|
-
var
|
|
10983
|
+
var import_vue36 = require("vue");
|
|
10845
10984
|
var uidSeed6 = 0;
|
|
10846
10985
|
function extension(name) {
|
|
10847
10986
|
const index = name.lastIndexOf(".");
|
|
@@ -10891,11 +11030,11 @@ var upload_default = {
|
|
|
10891
11030
|
},
|
|
10892
11031
|
emits: ["update:modelValue", "change", "success", "error", "remove", "exceed"],
|
|
10893
11032
|
setup(props, { emit }) {
|
|
10894
|
-
const files = (0,
|
|
10895
|
-
const dragActive = (0,
|
|
10896
|
-
const inputRef = (0,
|
|
11033
|
+
const files = (0, import_vue36.ref)([]);
|
|
11034
|
+
const dragActive = (0, import_vue36.ref)(false);
|
|
11035
|
+
const inputRef = (0, import_vue36.ref)(null);
|
|
10897
11036
|
const tasks = /* @__PURE__ */ new Map();
|
|
10898
|
-
(0,
|
|
11037
|
+
(0, import_vue36.watch)(
|
|
10899
11038
|
() => props.modelValue,
|
|
10900
11039
|
(list) => {
|
|
10901
11040
|
const next = list || [];
|
|
@@ -10989,7 +11128,7 @@ var upload_default = {
|
|
|
10989
11128
|
if (pass === false) continue;
|
|
10990
11129
|
}
|
|
10991
11130
|
uidSeed6 += 1;
|
|
10992
|
-
const item = (0,
|
|
11131
|
+
const item = (0, import_vue36.reactive)({
|
|
10993
11132
|
uid: uidSeed6,
|
|
10994
11133
|
name: raw.name,
|
|
10995
11134
|
size: raw.size,
|
|
@@ -11049,7 +11188,7 @@ var upload_default = {
|
|
|
11049
11188
|
files.value = [];
|
|
11050
11189
|
emitList();
|
|
11051
11190
|
}
|
|
11052
|
-
(0,
|
|
11191
|
+
(0, import_vue36.onBeforeUnmount)(() => {
|
|
11053
11192
|
files.value.forEach((item) => {
|
|
11054
11193
|
if (item.url) URL.revokeObjectURL(item.url);
|
|
11055
11194
|
});
|
|
@@ -11197,7 +11336,7 @@ var upload_default = {
|
|
|
11197
11336
|
};
|
|
11198
11337
|
|
|
11199
11338
|
// src/components/tree/index.js
|
|
11200
|
-
var
|
|
11339
|
+
var import_vue37 = require("vue");
|
|
11201
11340
|
var tree_default = {
|
|
11202
11341
|
name: "DjmTree",
|
|
11203
11342
|
components: { Icon: icon_default },
|
|
@@ -11229,17 +11368,17 @@ var tree_default = {
|
|
|
11229
11368
|
},
|
|
11230
11369
|
emits: ["update:checked", "update:expanded", "node-click", "check", "node-drop", "load-error"],
|
|
11231
11370
|
setup(props, { emit }) {
|
|
11232
|
-
const lazyChildren = (0,
|
|
11233
|
-
const loadingKeys = (0,
|
|
11234
|
-
const innerExpanded = (0,
|
|
11235
|
-
const innerChecked = (0,
|
|
11236
|
-
(0,
|
|
11371
|
+
const lazyChildren = (0, import_vue37.ref)({});
|
|
11372
|
+
const loadingKeys = (0, import_vue37.ref)([]);
|
|
11373
|
+
const innerExpanded = (0, import_vue37.ref)([...props.expanded]);
|
|
11374
|
+
const innerChecked = (0, import_vue37.ref)([...props.checked]);
|
|
11375
|
+
(0, import_vue37.watch)(
|
|
11237
11376
|
() => props.expanded,
|
|
11238
11377
|
(value) => {
|
|
11239
11378
|
if (Array.isArray(value)) innerExpanded.value = value;
|
|
11240
11379
|
}
|
|
11241
11380
|
);
|
|
11242
|
-
(0,
|
|
11381
|
+
(0, import_vue37.watch)(
|
|
11243
11382
|
() => props.checked,
|
|
11244
11383
|
(value) => {
|
|
11245
11384
|
if (Array.isArray(value)) innerChecked.value = value;
|
|
@@ -11277,7 +11416,7 @@ var tree_default = {
|
|
|
11277
11416
|
});
|
|
11278
11417
|
return out;
|
|
11279
11418
|
}
|
|
11280
|
-
(0,
|
|
11419
|
+
(0, import_vue37.watch)(
|
|
11281
11420
|
() => props.data,
|
|
11282
11421
|
() => {
|
|
11283
11422
|
if (props.defaultExpandAll) innerExpanded.value = collectExpandable(props.data);
|
|
@@ -11294,7 +11433,7 @@ var tree_default = {
|
|
|
11294
11433
|
const children = childrenOf(node);
|
|
11295
11434
|
return Boolean(children && children.some((child) => matchSubtree(child)));
|
|
11296
11435
|
}
|
|
11297
|
-
const rows = (0,
|
|
11436
|
+
const rows = (0, import_vue37.computed)(() => {
|
|
11298
11437
|
const result = [];
|
|
11299
11438
|
const walk = (nodes, level) => {
|
|
11300
11439
|
nodes.forEach((node) => {
|
|
@@ -11365,8 +11504,8 @@ var tree_default = {
|
|
|
11365
11504
|
function isActive(node) {
|
|
11366
11505
|
return props.activeKey !== "" && node[props.nodeKey] === props.activeKey;
|
|
11367
11506
|
}
|
|
11368
|
-
const rootEl = (0,
|
|
11369
|
-
const focusIndex = (0,
|
|
11507
|
+
const rootEl = (0, import_vue37.ref)(null);
|
|
11508
|
+
const focusIndex = (0, import_vue37.ref)(-1);
|
|
11370
11509
|
function tabIndexOf(index) {
|
|
11371
11510
|
return (focusIndex.value === -1 ? 0 : focusIndex.value) === index ? 0 : -1;
|
|
11372
11511
|
}
|
|
@@ -11423,9 +11562,9 @@ var tree_default = {
|
|
|
11423
11562
|
function rowClassOf(node, level) {
|
|
11424
11563
|
return typeof props.rowClass === "function" ? props.rowClass(node, level) : props.rowClass;
|
|
11425
11564
|
}
|
|
11426
|
-
const dragKey = (0,
|
|
11427
|
-
const dropKey = (0,
|
|
11428
|
-
const dropPosition = (0,
|
|
11565
|
+
const dragKey = (0, import_vue37.ref)("");
|
|
11566
|
+
const dropKey = (0, import_vue37.ref)("");
|
|
11567
|
+
const dropPosition = (0, import_vue37.ref)("");
|
|
11429
11568
|
function findNodeByKey(key, nodes = props.data) {
|
|
11430
11569
|
for (const node of nodes) {
|
|
11431
11570
|
if (node[props.nodeKey] === key) return node;
|
|
@@ -11537,7 +11676,7 @@ var tree_default = {
|
|
|
11537
11676
|
onDrop,
|
|
11538
11677
|
onDragEnd,
|
|
11539
11678
|
labelOf,
|
|
11540
|
-
emptyLabel: (0,
|
|
11679
|
+
emptyLabel: (0, import_vue37.computed)(() => props.emptyText || t("tree.empty")),
|
|
11541
11680
|
t
|
|
11542
11681
|
};
|
|
11543
11682
|
},
|
|
@@ -11606,7 +11745,7 @@ var tree_default = {
|
|
|
11606
11745
|
};
|
|
11607
11746
|
|
|
11608
11747
|
// src/components/editable-table/index.js
|
|
11609
|
-
var
|
|
11748
|
+
var import_vue38 = require("vue");
|
|
11610
11749
|
var ACTIONS_KEY = "__editable_actions";
|
|
11611
11750
|
function isEmpty(value) {
|
|
11612
11751
|
if (value === "" || value === null || value === void 0) return true;
|
|
@@ -11629,13 +11768,13 @@ var editable_table_default = {
|
|
|
11629
11768
|
},
|
|
11630
11769
|
emits: ["edit", "save", "cancel"],
|
|
11631
11770
|
setup(props, { emit }) {
|
|
11632
|
-
const slots = (0,
|
|
11633
|
-
const editingKey = (0,
|
|
11634
|
-
const draft = (0,
|
|
11635
|
-
const errors = (0,
|
|
11636
|
-
const tableRef = (0,
|
|
11637
|
-
const editableColumns = (0,
|
|
11638
|
-
const renderColumns = (0,
|
|
11771
|
+
const slots = (0, import_vue38.useSlots)();
|
|
11772
|
+
const editingKey = (0, import_vue38.ref)("");
|
|
11773
|
+
const draft = (0, import_vue38.reactive)({});
|
|
11774
|
+
const errors = (0, import_vue38.reactive)({});
|
|
11775
|
+
const tableRef = (0, import_vue38.ref)(null);
|
|
11776
|
+
const editableColumns = (0, import_vue38.computed)(() => props.columns.filter((column) => column.editor));
|
|
11777
|
+
const renderColumns = (0, import_vue38.computed)(() => {
|
|
11639
11778
|
if (!props.showActions) return props.columns;
|
|
11640
11779
|
return props.columns.concat({
|
|
11641
11780
|
key: ACTIONS_KEY,
|
|
@@ -11647,7 +11786,7 @@ var editable_table_default = {
|
|
|
11647
11786
|
exportable: false
|
|
11648
11787
|
});
|
|
11649
11788
|
});
|
|
11650
|
-
const forwardedSlotNames = (0,
|
|
11789
|
+
const forwardedSlotNames = (0, import_vue38.computed)(() => {
|
|
11651
11790
|
const taken = new Set(editableColumns.value.map((column) => "cell-" + column.key));
|
|
11652
11791
|
taken.add("cell-" + ACTIONS_KEY);
|
|
11653
11792
|
return Object.keys(slots).filter((name) => !taken.has(name));
|
|
@@ -11722,7 +11861,7 @@ var editable_table_default = {
|
|
|
11722
11861
|
return false;
|
|
11723
11862
|
}
|
|
11724
11863
|
if (!validate()) {
|
|
11725
|
-
(0,
|
|
11864
|
+
(0, import_vue38.nextTick)(() => {
|
|
11726
11865
|
const el = tableRef.value && tableRef.value.$el ? tableRef.value.$el.querySelector(".djm-cell-error") : null;
|
|
11727
11866
|
if (el) el.scrollIntoView({ block: "nearest" });
|
|
11728
11867
|
});
|
|
@@ -11742,7 +11881,7 @@ var editable_table_default = {
|
|
|
11742
11881
|
clearErrors();
|
|
11743
11882
|
return true;
|
|
11744
11883
|
}
|
|
11745
|
-
(0,
|
|
11884
|
+
(0, import_vue38.watch)(
|
|
11746
11885
|
() => props.rows,
|
|
11747
11886
|
() => {
|
|
11748
11887
|
if (editingKey.value && !findRow(editingKey.value)) {
|
|
@@ -11878,8 +12017,8 @@ var descriptions_default = {
|
|
|
11878
12017
|
};
|
|
11879
12018
|
|
|
11880
12019
|
// src/components/message/index.js
|
|
11881
|
-
var
|
|
11882
|
-
var djmMessages = (0,
|
|
12020
|
+
var import_vue39 = require("vue");
|
|
12021
|
+
var djmMessages = (0, import_vue39.reactive)([]);
|
|
11883
12022
|
var seq = 0;
|
|
11884
12023
|
function close(id) {
|
|
11885
12024
|
const index = djmMessages.findIndex((item) => item.id === id);
|
|
@@ -11924,7 +12063,7 @@ var message_default = {
|
|
|
11924
12063
|
};
|
|
11925
12064
|
|
|
11926
12065
|
// src/components/org-picker/index.js
|
|
11927
|
-
var
|
|
12066
|
+
var import_vue40 = require("vue");
|
|
11928
12067
|
var org_picker_default = {
|
|
11929
12068
|
name: "DjmOrgPicker",
|
|
11930
12069
|
components: { DjmIcon: icon_default },
|
|
@@ -11943,13 +12082,13 @@ var org_picker_default = {
|
|
|
11943
12082
|
},
|
|
11944
12083
|
emits: ["update:modelValue", "change", "visible-change"],
|
|
11945
12084
|
setup(props, { emit }) {
|
|
11946
|
-
const open = (0,
|
|
11947
|
-
const root = (0,
|
|
11948
|
-
const searchRef = (0,
|
|
11949
|
-
const keyword = (0,
|
|
11950
|
-
const activeDept = (0,
|
|
11951
|
-
const temp = (0,
|
|
11952
|
-
const expandedIds = (0,
|
|
12085
|
+
const open = (0, import_vue40.ref)(false);
|
|
12086
|
+
const root = (0, import_vue40.ref)(null);
|
|
12087
|
+
const searchRef = (0, import_vue40.ref)(null);
|
|
12088
|
+
const keyword = (0, import_vue40.ref)("");
|
|
12089
|
+
const activeDept = (0, import_vue40.ref)("");
|
|
12090
|
+
const temp = (0, import_vue40.ref)([]);
|
|
12091
|
+
const expandedIds = (0, import_vue40.ref)(/* @__PURE__ */ new Set());
|
|
11953
12092
|
let detachPanel = null;
|
|
11954
12093
|
function collectDeptIds(nodes, out = []) {
|
|
11955
12094
|
nodes.forEach((node) => {
|
|
@@ -11979,22 +12118,22 @@ var org_picker_default = {
|
|
|
11979
12118
|
walk([root2]);
|
|
11980
12119
|
return ids;
|
|
11981
12120
|
}
|
|
11982
|
-
const staffMap = (0,
|
|
12121
|
+
const staffMap = (0, import_vue40.computed)(() => {
|
|
11983
12122
|
const map = /* @__PURE__ */ new Map();
|
|
11984
12123
|
props.staff.forEach((item) => map.set(item.id, item));
|
|
11985
12124
|
return map;
|
|
11986
12125
|
});
|
|
11987
|
-
const appliedStaff = (0,
|
|
12126
|
+
const appliedStaff = (0, import_vue40.computed)(
|
|
11988
12127
|
() => props.modelValue.map((id) => staffMap.value.get(id)).filter(Boolean)
|
|
11989
12128
|
);
|
|
11990
|
-
const visibleTags = (0,
|
|
12129
|
+
const visibleTags = (0, import_vue40.computed)(() => {
|
|
11991
12130
|
if (props.maxTagCount <= 0) return appliedStaff.value;
|
|
11992
12131
|
return appliedStaff.value.slice(0, props.maxTagCount);
|
|
11993
12132
|
});
|
|
11994
|
-
const restTagCount = (0,
|
|
12133
|
+
const restTagCount = (0, import_vue40.computed)(
|
|
11995
12134
|
() => Math.max(0, appliedStaff.value.length - visibleTags.value.length)
|
|
11996
12135
|
);
|
|
11997
|
-
const visibleStaff = (0,
|
|
12136
|
+
const visibleStaff = (0, import_vue40.computed)(() => {
|
|
11998
12137
|
const key = keyword.value.trim().toLowerCase();
|
|
11999
12138
|
if (key) {
|
|
12000
12139
|
return props.staff.filter(
|
|
@@ -12005,7 +12144,7 @@ var org_picker_default = {
|
|
|
12005
12144
|
const scope = deptScope(activeDept.value);
|
|
12006
12145
|
return props.staff.filter((item) => scope.has(item.deptId));
|
|
12007
12146
|
});
|
|
12008
|
-
const deptRows = (0,
|
|
12147
|
+
const deptRows = (0, import_vue40.computed)(() => {
|
|
12009
12148
|
const rows = [];
|
|
12010
12149
|
const walk = (nodes, depth) => {
|
|
12011
12150
|
nodes.forEach((node) => {
|
|
@@ -12017,11 +12156,11 @@ var org_picker_default = {
|
|
|
12017
12156
|
walk(props.departments, 0);
|
|
12018
12157
|
return rows;
|
|
12019
12158
|
});
|
|
12020
|
-
const selectedCount = (0,
|
|
12021
|
-
const placeholderText = (0,
|
|
12022
|
-
const emptyLabel = (0,
|
|
12023
|
-
const panel = (0,
|
|
12024
|
-
const panelStyle = (0,
|
|
12159
|
+
const selectedCount = (0, import_vue40.computed)(() => temp.value.length);
|
|
12160
|
+
const placeholderText = (0, import_vue40.computed)(() => props.placeholder || t("orgPicker.placeholder"));
|
|
12161
|
+
const emptyLabel = (0, import_vue40.computed)(() => props.emptyText || t("orgPicker.empty"));
|
|
12162
|
+
const panel = (0, import_vue40.ref)(null);
|
|
12163
|
+
const panelStyle = (0, import_vue40.ref)({ ...PANEL_HIDDEN_STYLE });
|
|
12025
12164
|
const PANEL_HEIGHT = 342;
|
|
12026
12165
|
function updatePosition() {
|
|
12027
12166
|
if (!open.value || !root.value) return;
|
|
@@ -12038,7 +12177,7 @@ var org_picker_default = {
|
|
|
12038
12177
|
expandedIds.value = new Set(collectDeptIds(props.departments));
|
|
12039
12178
|
}
|
|
12040
12179
|
expandAll();
|
|
12041
|
-
(0,
|
|
12180
|
+
(0, import_vue40.watch)(() => props.departments, () => {
|
|
12042
12181
|
expandedIds.value = /* @__PURE__ */ new Set([...expandedIds.value, ...collectDeptIds(props.departments)]);
|
|
12043
12182
|
});
|
|
12044
12183
|
function initialOf(item) {
|
|
@@ -12127,7 +12266,7 @@ var org_picker_default = {
|
|
|
12127
12266
|
function clearTemp() {
|
|
12128
12267
|
temp.value = [];
|
|
12129
12268
|
}
|
|
12130
|
-
(0,
|
|
12269
|
+
(0, import_vue40.onBeforeUnmount)(() => {
|
|
12131
12270
|
if (detachPanel) {
|
|
12132
12271
|
detachPanel();
|
|
12133
12272
|
detachPanel = null;
|
|
@@ -12313,7 +12452,7 @@ var org_picker_default = {
|
|
|
12313
12452
|
};
|
|
12314
12453
|
|
|
12315
12454
|
// src/components/schema-form/index.js
|
|
12316
|
-
var
|
|
12455
|
+
var import_vue41 = require("vue");
|
|
12317
12456
|
var CONTROL_MAP = {
|
|
12318
12457
|
input: input_default,
|
|
12319
12458
|
number: input_number_default,
|
|
@@ -12349,26 +12488,26 @@ var schema_form_default = {
|
|
|
12349
12488
|
},
|
|
12350
12489
|
emits: ["update:modelValue", "change"],
|
|
12351
12490
|
setup(props, { emit }) {
|
|
12352
|
-
const innerForm = (0,
|
|
12353
|
-
const model = (0,
|
|
12354
|
-
(0,
|
|
12491
|
+
const innerForm = (0, import_vue41.ref)(null);
|
|
12492
|
+
const model = (0, import_vue41.reactive)({ ...props.modelValue });
|
|
12493
|
+
(0, import_vue41.watch)(() => props.fields, (fields) => {
|
|
12355
12494
|
fields.forEach((field) => {
|
|
12356
12495
|
if (model[field.key] === void 0 && field.default !== void 0) {
|
|
12357
12496
|
model[field.key] = typeof field.default === "function" ? field.default() : field.default;
|
|
12358
12497
|
}
|
|
12359
12498
|
});
|
|
12360
12499
|
}, { immediate: true, deep: true });
|
|
12361
|
-
(0,
|
|
12500
|
+
(0, import_vue41.watch)(() => props.modelValue, (value) => {
|
|
12362
12501
|
if (!value) return;
|
|
12363
12502
|
Object.keys(value).forEach((key) => {
|
|
12364
12503
|
if (model[key] !== value[key]) model[key] = value[key];
|
|
12365
12504
|
});
|
|
12366
12505
|
}, { deep: true });
|
|
12367
|
-
(0,
|
|
12506
|
+
(0, import_vue41.watch)(model, () => {
|
|
12368
12507
|
emit("update:modelValue", { ...model });
|
|
12369
12508
|
emit("change", { ...model });
|
|
12370
12509
|
}, { deep: true });
|
|
12371
|
-
const formRules = (0,
|
|
12510
|
+
const formRules = (0, import_vue41.computed)(() => {
|
|
12372
12511
|
const merged = { ...props.rules };
|
|
12373
12512
|
props.fields.forEach((field) => {
|
|
12374
12513
|
if (!field.required && !field.rules) return;
|
|
@@ -12381,7 +12520,7 @@ var schema_form_default = {
|
|
|
12381
12520
|
});
|
|
12382
12521
|
return merged;
|
|
12383
12522
|
});
|
|
12384
|
-
const visibleFields = (0,
|
|
12523
|
+
const visibleFields = (0, import_vue41.computed)(
|
|
12385
12524
|
() => props.fields.filter((field) => {
|
|
12386
12525
|
if (typeof field.visibleWhen !== "function") return true;
|
|
12387
12526
|
return Boolean(field.visibleWhen(model));
|
|
@@ -12575,7 +12714,7 @@ var approval_flow_default = {
|
|
|
12575
12714
|
};
|
|
12576
12715
|
|
|
12577
12716
|
// src/components/query-filter/index.js
|
|
12578
|
-
var
|
|
12717
|
+
var import_vue42 = require("vue");
|
|
12579
12718
|
var CONTROL_MAP2 = {
|
|
12580
12719
|
input: input_default,
|
|
12581
12720
|
number: input_number_default,
|
|
@@ -12600,26 +12739,26 @@ var query_filter_default = {
|
|
|
12600
12739
|
},
|
|
12601
12740
|
emits: ["update:modelValue", "search", "reset"],
|
|
12602
12741
|
setup(props, { emit }) {
|
|
12603
|
-
const expanded = (0,
|
|
12604
|
-
const model = (0,
|
|
12605
|
-
(0,
|
|
12742
|
+
const expanded = (0, import_vue42.ref)(false);
|
|
12743
|
+
const model = (0, import_vue42.reactive)({ ...props.modelValue });
|
|
12744
|
+
(0, import_vue42.watch)(() => props.fields, (fields) => {
|
|
12606
12745
|
fields.forEach((field) => {
|
|
12607
12746
|
if (model[field.key] === void 0 && field.default !== void 0) {
|
|
12608
12747
|
model[field.key] = typeof field.default === "function" ? field.default() : field.default;
|
|
12609
12748
|
}
|
|
12610
12749
|
});
|
|
12611
12750
|
}, { immediate: true, deep: true });
|
|
12612
|
-
(0,
|
|
12751
|
+
(0, import_vue42.watch)(() => props.modelValue, (value) => {
|
|
12613
12752
|
if (!value) return;
|
|
12614
12753
|
Object.keys(value).forEach((key) => {
|
|
12615
12754
|
if (model[key] !== value[key]) model[key] = value[key];
|
|
12616
12755
|
});
|
|
12617
12756
|
}, { deep: true });
|
|
12618
|
-
(0,
|
|
12757
|
+
(0, import_vue42.watch)(model, () => {
|
|
12619
12758
|
emit("update:modelValue", { ...model });
|
|
12620
12759
|
}, { deep: true });
|
|
12621
|
-
const collapsible = (0,
|
|
12622
|
-
const visibleFields = (0,
|
|
12760
|
+
const collapsible = (0, import_vue42.computed)(() => props.fields.length > props.visibleCount);
|
|
12761
|
+
const visibleFields = (0, import_vue42.computed)(() => {
|
|
12623
12762
|
if (!collapsible.value || expanded.value) return props.fields;
|
|
12624
12763
|
return props.fields.slice(0, props.visibleCount);
|
|
12625
12764
|
});
|
|
@@ -12749,7 +12888,7 @@ var filter_tags_default = {
|
|
|
12749
12888
|
};
|
|
12750
12889
|
|
|
12751
12890
|
// src/components/kanban/index.js
|
|
12752
|
-
var
|
|
12891
|
+
var import_vue43 = require("vue");
|
|
12753
12892
|
function cloneColumns(list) {
|
|
12754
12893
|
return (list || []).map((col) => ({ ...col, cards: (col.cards || []).slice() }));
|
|
12755
12894
|
}
|
|
@@ -12766,15 +12905,15 @@ var kanban_default = {
|
|
|
12766
12905
|
},
|
|
12767
12906
|
emits: ["update:columns", "change", "card-move", "card-click", "card-add"],
|
|
12768
12907
|
setup(props, { emit }) {
|
|
12769
|
-
const inner = (0,
|
|
12770
|
-
(0,
|
|
12908
|
+
const inner = (0, import_vue43.ref)(cloneColumns(props.columns));
|
|
12909
|
+
(0, import_vue43.watch)(
|
|
12771
12910
|
() => props.columns,
|
|
12772
12911
|
(list) => {
|
|
12773
12912
|
inner.value = cloneColumns(list);
|
|
12774
12913
|
}
|
|
12775
12914
|
);
|
|
12776
|
-
const dragCard = (0,
|
|
12777
|
-
const dropTarget = (0,
|
|
12915
|
+
const dragCard = (0, import_vue43.ref)(null);
|
|
12916
|
+
const dropTarget = (0, import_vue43.ref)(null);
|
|
12778
12917
|
function columnOf(key) {
|
|
12779
12918
|
return inner.value.find((col) => col.key === key);
|
|
12780
12919
|
}
|
|
@@ -12937,7 +13076,7 @@ var kanban_default = {
|
|
|
12937
13076
|
};
|
|
12938
13077
|
|
|
12939
13078
|
// src/components/attachment-list/index.js
|
|
12940
|
-
var
|
|
13079
|
+
var import_vue44 = require("vue");
|
|
12941
13080
|
var IMAGE_EXTS = ["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg"];
|
|
12942
13081
|
function extOf(file) {
|
|
12943
13082
|
if (file.ext) return String(file.ext).toLowerCase();
|
|
@@ -12961,14 +13100,14 @@ var attachment_list_default = {
|
|
|
12961
13100
|
},
|
|
12962
13101
|
emits: ["preview", "download", "remove"],
|
|
12963
13102
|
setup(props, { emit }) {
|
|
12964
|
-
const list = (0,
|
|
13103
|
+
const list = (0, import_vue44.computed)(
|
|
12965
13104
|
() => props.files.map((file, index) => {
|
|
12966
13105
|
const ext = extOf(file);
|
|
12967
13106
|
const isImage = file.type === "image" || IMAGE_EXTS.includes(ext);
|
|
12968
13107
|
return { ...file, _key: file.uid !== void 0 ? file.uid : index, _ext: ext, _isImage: isImage };
|
|
12969
13108
|
})
|
|
12970
13109
|
);
|
|
12971
|
-
const emptyLabel = (0,
|
|
13110
|
+
const emptyLabel = (0, import_vue44.computed)(() => props.emptyText || t("attachment.empty"));
|
|
12972
13111
|
function onPreview(file) {
|
|
12973
13112
|
emit("preview", file);
|
|
12974
13113
|
}
|
|
@@ -13074,7 +13213,7 @@ var attachment_list_default = {
|
|
|
13074
13213
|
};
|
|
13075
13214
|
|
|
13076
13215
|
// src/components/notification/index.js
|
|
13077
|
-
var
|
|
13216
|
+
var import_vue45 = require("vue");
|
|
13078
13217
|
var TYPE_MAP = {
|
|
13079
13218
|
info: { icon: "info", cls: "djm-is-info" },
|
|
13080
13219
|
success: { icon: "check", cls: "djm-is-success" },
|
|
@@ -13094,8 +13233,8 @@ var notification_default = {
|
|
|
13094
13233
|
},
|
|
13095
13234
|
emits: ["click", "read", "read-all", "remove", "clear"],
|
|
13096
13235
|
setup(props, { emit }) {
|
|
13097
|
-
const unreadCount = (0,
|
|
13098
|
-
const emptyLabel = (0,
|
|
13236
|
+
const unreadCount = (0, import_vue45.computed)(() => props.items.filter((item) => !item.read).length);
|
|
13237
|
+
const emptyLabel = (0, import_vue45.computed)(() => props.emptyText || t("notification.empty"));
|
|
13099
13238
|
function typeOf(item) {
|
|
13100
13239
|
return TYPE_MAP[item.type] || TYPE_MAP.info;
|
|
13101
13240
|
}
|
|
@@ -13106,7 +13245,7 @@ var notification_default = {
|
|
|
13106
13245
|
function onReadAll() {
|
|
13107
13246
|
emit("read-all");
|
|
13108
13247
|
}
|
|
13109
|
-
const clearing = (0,
|
|
13248
|
+
const clearing = (0, import_vue45.ref)(false);
|
|
13110
13249
|
let clearTimer = null;
|
|
13111
13250
|
function onClear() {
|
|
13112
13251
|
if (!clearing.value) {
|
|
@@ -13120,7 +13259,7 @@ var notification_default = {
|
|
|
13120
13259
|
clearing.value = false;
|
|
13121
13260
|
emit("clear");
|
|
13122
13261
|
}
|
|
13123
|
-
(0,
|
|
13262
|
+
(0, import_vue45.onBeforeUnmount)(() => window.clearTimeout(clearTimer));
|
|
13124
13263
|
function onRemove(item) {
|
|
13125
13264
|
emit("remove", item);
|
|
13126
13265
|
}
|
|
@@ -13195,7 +13334,7 @@ var notification_default = {
|
|
|
13195
13334
|
};
|
|
13196
13335
|
|
|
13197
13336
|
// src/components/config-provider/index.js
|
|
13198
|
-
var
|
|
13337
|
+
var import_vue46 = require("vue");
|
|
13199
13338
|
var SIZE_HEIGHT = { xs: "24px", sm: "28px", md: "30px", lg: "34px" };
|
|
13200
13339
|
var config_provider_default = {
|
|
13201
13340
|
name: "DjmConfigProvider",
|
|
@@ -13205,7 +13344,7 @@ var config_provider_default = {
|
|
|
13205
13344
|
},
|
|
13206
13345
|
setup(props) {
|
|
13207
13346
|
if (props.locale) setLocale(props.locale);
|
|
13208
|
-
(0,
|
|
13347
|
+
(0, import_vue46.watch)(
|
|
13209
13348
|
() => props.locale,
|
|
13210
13349
|
(code) => {
|
|
13211
13350
|
if (code) setLocale(code);
|
|
@@ -13227,7 +13366,7 @@ var config_provider_default = {
|
|
|
13227
13366
|
};
|
|
13228
13367
|
|
|
13229
13368
|
// src/components/date-time-picker/index.js
|
|
13230
|
-
var
|
|
13369
|
+
var import_vue47 = require("vue");
|
|
13231
13370
|
var uidSeed7 = 0;
|
|
13232
13371
|
var pad4 = (value) => String(value).padStart(2, "0");
|
|
13233
13372
|
function toDateKey(year, month, day) {
|
|
@@ -13260,31 +13399,31 @@ var date_time_picker_default = {
|
|
|
13260
13399
|
},
|
|
13261
13400
|
emits: ["update:modelValue", "change", "visible-change"],
|
|
13262
13401
|
setup(props, { emit }) {
|
|
13263
|
-
const open = (0,
|
|
13264
|
-
(0,
|
|
13265
|
-
const root = (0,
|
|
13266
|
-
const panel = (0,
|
|
13402
|
+
const open = (0, import_vue47.ref)(false);
|
|
13403
|
+
(0, import_vue47.watch)(open, (value) => emit("visible-change", value));
|
|
13404
|
+
const root = (0, import_vue47.ref)(null);
|
|
13405
|
+
const panel = (0, import_vue47.ref)(null);
|
|
13267
13406
|
const panelId = "djm-datetime-panel-" + ++uidSeed7;
|
|
13268
|
-
const panelStyle = (0,
|
|
13407
|
+
const panelStyle = (0, import_vue47.ref)({ ...PANEL_HIDDEN_STYLE });
|
|
13269
13408
|
let detachPanel = null;
|
|
13270
13409
|
const today = /* @__PURE__ */ new Date();
|
|
13271
13410
|
const todayKey = toDateKey(today.getFullYear(), today.getMonth(), today.getDate());
|
|
13272
|
-
const hasSeconds = (0,
|
|
13273
|
-
const draft = (0,
|
|
13411
|
+
const hasSeconds = (0, import_vue47.computed)(() => props.format.indexOf("ss") > -1);
|
|
13412
|
+
const draft = (0, import_vue47.ref)({ date: "", h: "00", m: "00", s: "00" });
|
|
13274
13413
|
const initial = parseDate(parseValue(props.modelValue).date);
|
|
13275
|
-
const viewYear = (0,
|
|
13276
|
-
const viewMonth = (0,
|
|
13277
|
-
const displayText = (0,
|
|
13278
|
-
const placeholderText = (0,
|
|
13279
|
-
const weeks = (0,
|
|
13280
|
-
const hours = (0,
|
|
13281
|
-
const minutes = (0,
|
|
13414
|
+
const viewYear = (0, import_vue47.ref)(initial ? initial.year : today.getFullYear());
|
|
13415
|
+
const viewMonth = (0, import_vue47.ref)(initial ? initial.month : today.getMonth());
|
|
13416
|
+
const displayText = (0, import_vue47.computed)(() => props.modelValue || "");
|
|
13417
|
+
const placeholderText = (0, import_vue47.computed)(() => props.placeholder || t("dateTimePicker.placeholder"));
|
|
13418
|
+
const weeks = (0, import_vue47.computed)(() => t("datePicker.weeks").split(","));
|
|
13419
|
+
const hours = (0, import_vue47.computed)(() => Array.from({ length: 24 }, (_, index) => pad4(index)));
|
|
13420
|
+
const minutes = (0, import_vue47.computed)(() => {
|
|
13282
13421
|
const list = [];
|
|
13283
13422
|
for (let value = 0; value < 60; value += Math.max(1, props.minuteStep)) list.push(pad4(value));
|
|
13284
13423
|
return list;
|
|
13285
13424
|
});
|
|
13286
|
-
const seconds = (0,
|
|
13287
|
-
const timeCols = (0,
|
|
13425
|
+
const seconds = (0, import_vue47.computed)(() => Array.from({ length: 60 }, (_, index) => pad4(index)));
|
|
13426
|
+
const timeCols = (0, import_vue47.computed)(() => {
|
|
13288
13427
|
const cols = [
|
|
13289
13428
|
{ key: "h", list: hours.value },
|
|
13290
13429
|
{ key: "m", list: minutes.value }
|
|
@@ -13292,8 +13431,8 @@ var date_time_picker_default = {
|
|
|
13292
13431
|
if (hasSeconds.value) cols.push({ key: "s", list: seconds.value });
|
|
13293
13432
|
return cols;
|
|
13294
13433
|
});
|
|
13295
|
-
const monthLabel = (0,
|
|
13296
|
-
const cells = (0,
|
|
13434
|
+
const monthLabel = (0, import_vue47.computed)(() => t("datePicker.title", { year: viewYear.value, month: viewMonth.value + 1 }));
|
|
13435
|
+
const cells = (0, import_vue47.computed)(() => {
|
|
13297
13436
|
const first = new Date(viewYear.value, viewMonth.value, 1);
|
|
13298
13437
|
const offset = (first.getDay() + 6) % 7;
|
|
13299
13438
|
const start = new Date(viewYear.value, viewMonth.value, 1 - offset);
|
|
@@ -13429,7 +13568,7 @@ var date_time_picker_default = {
|
|
|
13429
13568
|
emit("change", "");
|
|
13430
13569
|
closePanel();
|
|
13431
13570
|
}
|
|
13432
|
-
(0,
|
|
13571
|
+
(0, import_vue47.onBeforeUnmount)(() => {
|
|
13433
13572
|
if (detachPanel) {
|
|
13434
13573
|
detachPanel();
|
|
13435
13574
|
detachPanel = null;
|
|
@@ -13554,7 +13693,7 @@ var date_time_picker_default = {
|
|
|
13554
13693
|
};
|
|
13555
13694
|
|
|
13556
13695
|
// src/components/virtual-list/index.js
|
|
13557
|
-
var
|
|
13696
|
+
var import_vue48 = require("vue");
|
|
13558
13697
|
var virtual_list_default = {
|
|
13559
13698
|
name: "DjmVirtualList",
|
|
13560
13699
|
props: {
|
|
@@ -13571,14 +13710,14 @@ var virtual_list_default = {
|
|
|
13571
13710
|
},
|
|
13572
13711
|
emits: ["scroll", "reach-bottom", "item-click"],
|
|
13573
13712
|
setup(props, { emit, expose }) {
|
|
13574
|
-
const viewport = (0,
|
|
13575
|
-
const scrollTop = (0,
|
|
13576
|
-
const viewHeight = (0,
|
|
13713
|
+
const viewport = (0, import_vue48.ref)(null);
|
|
13714
|
+
const scrollTop = (0, import_vue48.ref)(0);
|
|
13715
|
+
const viewHeight = (0, import_vue48.ref)(typeof props.height === "number" ? props.height : 320);
|
|
13577
13716
|
let bottomFired = false;
|
|
13578
13717
|
function rowHeight(item, index) {
|
|
13579
13718
|
return typeof props.itemHeight === "function" ? Math.max(1, Number(props.itemHeight(item, index)) || 1) : Math.max(1, props.itemHeight);
|
|
13580
13719
|
}
|
|
13581
|
-
const offsets = (0,
|
|
13720
|
+
const offsets = (0, import_vue48.computed)(() => {
|
|
13582
13721
|
const list = [0];
|
|
13583
13722
|
let sum = 0;
|
|
13584
13723
|
props.items.forEach((item, index) => {
|
|
@@ -13587,7 +13726,7 @@ var virtual_list_default = {
|
|
|
13587
13726
|
});
|
|
13588
13727
|
return list;
|
|
13589
13728
|
});
|
|
13590
|
-
const totalHeight = (0,
|
|
13729
|
+
const totalHeight = (0, import_vue48.computed)(() => offsets.value[offsets.value.length - 1]);
|
|
13591
13730
|
function findStart(top) {
|
|
13592
13731
|
const list = offsets.value;
|
|
13593
13732
|
let low = 0;
|
|
@@ -13599,7 +13738,7 @@ var virtual_list_default = {
|
|
|
13599
13738
|
}
|
|
13600
13739
|
return Math.max(0, low - 1);
|
|
13601
13740
|
}
|
|
13602
|
-
const range = (0,
|
|
13741
|
+
const range = (0, import_vue48.computed)(() => {
|
|
13603
13742
|
const total = props.items.length;
|
|
13604
13743
|
if (!total) return { start: 0, end: 0 };
|
|
13605
13744
|
const start = Math.max(0, findStart(scrollTop.value) - props.overscan);
|
|
@@ -13608,7 +13747,7 @@ var virtual_list_default = {
|
|
|
13608
13747
|
while (end < total && offsets.value[end] < limit) end += 1;
|
|
13609
13748
|
return { start, end: Math.min(total, end + props.overscan) };
|
|
13610
13749
|
});
|
|
13611
|
-
const visibleRows = (0,
|
|
13750
|
+
const visibleRows = (0, import_vue48.computed)(() => {
|
|
13612
13751
|
const { start, end } = range.value;
|
|
13613
13752
|
return props.items.slice(start, end).map((item, index) => {
|
|
13614
13753
|
const realIndex = start + index;
|
|
@@ -13643,7 +13782,7 @@ var virtual_list_default = {
|
|
|
13643
13782
|
else if (start < el.scrollTop) el.scrollTop = start;
|
|
13644
13783
|
else if (end > el.scrollTop + el.clientHeight) el.scrollTop = end - el.clientHeight;
|
|
13645
13784
|
}
|
|
13646
|
-
(0,
|
|
13785
|
+
(0, import_vue48.watch)(
|
|
13647
13786
|
() => props.height,
|
|
13648
13787
|
() => {
|
|
13649
13788
|
if (viewport.value) viewHeight.value = viewport.value.clientHeight;
|
|
@@ -13653,14 +13792,14 @@ var virtual_list_default = {
|
|
|
13653
13792
|
if (viewport.value) viewHeight.value = viewport.value.clientHeight;
|
|
13654
13793
|
}
|
|
13655
13794
|
let resizeObserver = null;
|
|
13656
|
-
(0,
|
|
13795
|
+
(0, import_vue48.onMounted)(() => {
|
|
13657
13796
|
measure();
|
|
13658
13797
|
if (window.ResizeObserver && viewport.value) {
|
|
13659
13798
|
resizeObserver = new ResizeObserver(() => measure());
|
|
13660
13799
|
resizeObserver.observe(viewport.value);
|
|
13661
13800
|
}
|
|
13662
13801
|
});
|
|
13663
|
-
(0,
|
|
13802
|
+
(0, import_vue48.onBeforeUnmount)(() => {
|
|
13664
13803
|
if (resizeObserver) resizeObserver.disconnect();
|
|
13665
13804
|
});
|
|
13666
13805
|
function onItemClick(row) {
|
|
@@ -13705,7 +13844,7 @@ var virtual_list_default = {
|
|
|
13705
13844
|
};
|
|
13706
13845
|
|
|
13707
13846
|
// src/components/batch-bar/index.js
|
|
13708
|
-
var
|
|
13847
|
+
var import_vue49 = require("vue");
|
|
13709
13848
|
var batch_bar_default = {
|
|
13710
13849
|
name: "DjmBatchBar",
|
|
13711
13850
|
props: {
|
|
@@ -13720,8 +13859,8 @@ var batch_bar_default = {
|
|
|
13720
13859
|
},
|
|
13721
13860
|
emits: ["clear", "select-all"],
|
|
13722
13861
|
setup(props, { emit }) {
|
|
13723
|
-
const text = (0,
|
|
13724
|
-
const canSelectAll = (0,
|
|
13862
|
+
const text = (0, import_vue49.computed)(() => props.label || t("batchBar.selected", { count: props.count }));
|
|
13863
|
+
const canSelectAll = (0, import_vue49.computed)(() => props.total > props.count);
|
|
13725
13864
|
return {
|
|
13726
13865
|
text,
|
|
13727
13866
|
canSelectAll,
|
|
@@ -13749,7 +13888,7 @@ var batch_bar_default = {
|
|
|
13749
13888
|
};
|
|
13750
13889
|
|
|
13751
13890
|
// src/components/import-wizard/index.js
|
|
13752
|
-
var
|
|
13891
|
+
var import_vue50 = require("vue");
|
|
13753
13892
|
function matchAccept2(name, accept) {
|
|
13754
13893
|
if (!accept) return true;
|
|
13755
13894
|
const ext = "." + String(name).split(".").pop().toLowerCase();
|
|
@@ -13776,19 +13915,19 @@ var import_wizard_default = {
|
|
|
13776
13915
|
},
|
|
13777
13916
|
emits: ["update:step", "update:mapping", "file-change", "submit", "retry"],
|
|
13778
13917
|
setup(props, { emit }) {
|
|
13779
|
-
const innerStep = (0,
|
|
13780
|
-
(0,
|
|
13918
|
+
const innerStep = (0, import_vue50.ref)(props.step || 1);
|
|
13919
|
+
(0, import_vue50.watch)(
|
|
13781
13920
|
() => props.step,
|
|
13782
13921
|
(value) => {
|
|
13783
13922
|
if (value) innerStep.value = value;
|
|
13784
13923
|
}
|
|
13785
13924
|
);
|
|
13786
|
-
const file = (0,
|
|
13787
|
-
const fileError = (0,
|
|
13788
|
-
const mappingError = (0,
|
|
13789
|
-
const fileInput = (0,
|
|
13790
|
-
const innerMapping = (0,
|
|
13791
|
-
(0,
|
|
13925
|
+
const file = (0, import_vue50.ref)(null);
|
|
13926
|
+
const fileError = (0, import_vue50.ref)("");
|
|
13927
|
+
const mappingError = (0, import_vue50.ref)("");
|
|
13928
|
+
const fileInput = (0, import_vue50.ref)(null);
|
|
13929
|
+
const innerMapping = (0, import_vue50.ref)({ ...props.mapping });
|
|
13930
|
+
(0, import_vue50.watch)(
|
|
13792
13931
|
() => props.mapping,
|
|
13793
13932
|
(value) => {
|
|
13794
13933
|
innerMapping.value = { ...value };
|
|
@@ -13799,7 +13938,7 @@ var import_wizard_default = {
|
|
|
13799
13938
|
innerStep.value = next;
|
|
13800
13939
|
emit("update:step", next);
|
|
13801
13940
|
}
|
|
13802
|
-
const steps = (0,
|
|
13941
|
+
const steps = (0, import_vue50.computed)(() => [
|
|
13803
13942
|
{ index: 1, title: t("importWizard.stepFile") },
|
|
13804
13943
|
{ index: 2, title: t("importWizard.stepMapping") },
|
|
13805
13944
|
{ index: 3, title: t("importWizard.stepResult") }
|
|
@@ -13841,7 +13980,7 @@ var import_wizard_default = {
|
|
|
13841
13980
|
mappingError.value = "";
|
|
13842
13981
|
emit("update:mapping", next);
|
|
13843
13982
|
}
|
|
13844
|
-
const missingRequired = (0,
|
|
13983
|
+
const missingRequired = (0, import_vue50.computed)(
|
|
13845
13984
|
() => props.columns.filter((col) => col.required && !innerMapping.value[col.key])
|
|
13846
13985
|
);
|
|
13847
13986
|
function submit() {
|
|
@@ -13853,7 +13992,7 @@ var import_wizard_default = {
|
|
|
13853
13992
|
}
|
|
13854
13993
|
emit("submit", { ...innerMapping.value });
|
|
13855
13994
|
}
|
|
13856
|
-
(0,
|
|
13995
|
+
(0, import_vue50.watch)(
|
|
13857
13996
|
() => props.result,
|
|
13858
13997
|
(value) => {
|
|
13859
13998
|
if (value && (value.total || value.success || value.failed || value.errors && value.errors.length)) {
|
|
@@ -13874,7 +14013,7 @@ var import_wizard_default = {
|
|
|
13874
14013
|
emit("retry");
|
|
13875
14014
|
goStep(2);
|
|
13876
14015
|
}
|
|
13877
|
-
const stats = (0,
|
|
14016
|
+
const stats = (0, import_vue50.computed)(() => {
|
|
13878
14017
|
const data = props.result || {};
|
|
13879
14018
|
return {
|
|
13880
14019
|
total: data.total || 0,
|
|
@@ -14020,7 +14159,7 @@ var import_wizard_default = {
|
|
|
14020
14159
|
};
|
|
14021
14160
|
|
|
14022
14161
|
// src/components/diff/index.js
|
|
14023
|
-
var
|
|
14162
|
+
var import_vue51 = require("vue");
|
|
14024
14163
|
|
|
14025
14164
|
// src/utils/text-diff.js
|
|
14026
14165
|
var MAX_CELLS = 1e6;
|
|
@@ -14084,8 +14223,8 @@ var diff_default = {
|
|
|
14084
14223
|
afterLabel: { type: String, default: "" }
|
|
14085
14224
|
},
|
|
14086
14225
|
setup(props) {
|
|
14087
|
-
const rows = (0,
|
|
14088
|
-
const stats = (0,
|
|
14226
|
+
const rows = (0, import_vue51.computed)(() => diffLines(props.before, props.after));
|
|
14227
|
+
const stats = (0, import_vue51.computed)(() => {
|
|
14089
14228
|
let add = 0;
|
|
14090
14229
|
let remove = 0;
|
|
14091
14230
|
rows.value.forEach((row) => {
|
|
@@ -14094,11 +14233,11 @@ var diff_default = {
|
|
|
14094
14233
|
});
|
|
14095
14234
|
return { add, remove };
|
|
14096
14235
|
});
|
|
14097
|
-
const expandedBlocks = (0,
|
|
14236
|
+
const expandedBlocks = (0, import_vue51.ref)([]);
|
|
14098
14237
|
function expand(index) {
|
|
14099
14238
|
expandedBlocks.value = expandedBlocks.value.concat(index);
|
|
14100
14239
|
}
|
|
14101
|
-
const displayRows = (0,
|
|
14240
|
+
const displayRows = (0, import_vue51.computed)(() => {
|
|
14102
14241
|
const ctx = Math.max(0, props.context);
|
|
14103
14242
|
const list = rows.value;
|
|
14104
14243
|
if (!ctx) return list;
|
|
@@ -14129,7 +14268,7 @@ var diff_default = {
|
|
|
14129
14268
|
}
|
|
14130
14269
|
return out;
|
|
14131
14270
|
});
|
|
14132
|
-
const splitRows = (0,
|
|
14271
|
+
const splitRows = (0, import_vue51.computed)(() => {
|
|
14133
14272
|
const list = displayRows.value;
|
|
14134
14273
|
const out = [];
|
|
14135
14274
|
let i = 0;
|
|
@@ -14154,8 +14293,8 @@ var diff_default = {
|
|
|
14154
14293
|
}
|
|
14155
14294
|
return out;
|
|
14156
14295
|
});
|
|
14157
|
-
const beforeLabelText = (0,
|
|
14158
|
-
const afterLabelText = (0,
|
|
14296
|
+
const beforeLabelText = (0, import_vue51.computed)(() => props.beforeLabel || t("diff.before"));
|
|
14297
|
+
const afterLabelText = (0, import_vue51.computed)(() => props.afterLabel || t("diff.after"));
|
|
14159
14298
|
return {
|
|
14160
14299
|
stats,
|
|
14161
14300
|
displayRows,
|
|
@@ -14221,7 +14360,7 @@ var diff_default = {
|
|
|
14221
14360
|
};
|
|
14222
14361
|
|
|
14223
14362
|
// src/components/tree-table/index.js
|
|
14224
|
-
var
|
|
14363
|
+
var import_vue52 = require("vue");
|
|
14225
14364
|
function keyOf(row, rowKey) {
|
|
14226
14365
|
return row && row[rowKey] !== void 0 ? row[rowKey] : row && row.id;
|
|
14227
14366
|
}
|
|
@@ -14260,23 +14399,23 @@ var tree_table_default = {
|
|
|
14260
14399
|
eachNode(props.data, (row) => keys.push(keyOf(row, props.rowKey)));
|
|
14261
14400
|
return keys;
|
|
14262
14401
|
}
|
|
14263
|
-
const innerExpanded = (0,
|
|
14402
|
+
const innerExpanded = (0, import_vue52.ref)(
|
|
14264
14403
|
props.expandedKeys ? props.expandedKeys.slice() : props.defaultExpandAll ? allKeys() : []
|
|
14265
14404
|
);
|
|
14266
|
-
(0,
|
|
14405
|
+
(0, import_vue52.watch)(
|
|
14267
14406
|
() => props.expandedKeys,
|
|
14268
14407
|
(value) => {
|
|
14269
14408
|
if (value) innerExpanded.value = value.slice();
|
|
14270
14409
|
}
|
|
14271
14410
|
);
|
|
14272
|
-
const innerChecked = (0,
|
|
14273
|
-
(0,
|
|
14411
|
+
const innerChecked = (0, import_vue52.ref)(props.checkedKeys ? props.checkedKeys.slice() : []);
|
|
14412
|
+
(0, import_vue52.watch)(
|
|
14274
14413
|
() => props.checkedKeys,
|
|
14275
14414
|
(value) => {
|
|
14276
14415
|
if (value) innerChecked.value = value.slice();
|
|
14277
14416
|
}
|
|
14278
14417
|
);
|
|
14279
|
-
const rows = (0,
|
|
14418
|
+
const rows = (0, import_vue52.computed)(() => {
|
|
14280
14419
|
const out = [];
|
|
14281
14420
|
function walk(list, level, parentKey) {
|
|
14282
14421
|
;
|
|
@@ -14291,7 +14430,7 @@ var tree_table_default = {
|
|
|
14291
14430
|
walk(props.data, 1, null);
|
|
14292
14431
|
return out;
|
|
14293
14432
|
});
|
|
14294
|
-
const descendantMap = (0,
|
|
14433
|
+
const descendantMap = (0, import_vue52.computed)(() => {
|
|
14295
14434
|
const map = {};
|
|
14296
14435
|
function collect(row) {
|
|
14297
14436
|
const key = keyOf(row, props.rowKey);
|
|
@@ -14306,16 +14445,16 @@ var tree_table_default = {
|
|
|
14306
14445
|
(props.data || []).forEach(collect);
|
|
14307
14446
|
return map;
|
|
14308
14447
|
});
|
|
14309
|
-
const leafKeys = (0,
|
|
14448
|
+
const leafKeys = (0, import_vue52.computed)(() => {
|
|
14310
14449
|
const keys = [];
|
|
14311
14450
|
eachNode(props.data, (row) => {
|
|
14312
14451
|
if (!row.children || !row.children.length) keys.push(keyOf(row, props.rowKey));
|
|
14313
14452
|
});
|
|
14314
14453
|
return keys;
|
|
14315
14454
|
});
|
|
14316
|
-
const checkedSet = (0,
|
|
14317
|
-
const allChecked = (0,
|
|
14318
|
-
const someChecked = (0,
|
|
14455
|
+
const checkedSet = (0, import_vue52.computed)(() => new Set(innerChecked.value));
|
|
14456
|
+
const allChecked = (0, import_vue52.computed)(() => leafKeys.value.length > 0 && leafKeys.value.every((key) => checkedSet.value.has(key)));
|
|
14457
|
+
const someChecked = (0, import_vue52.computed)(() => !allChecked.value && leafKeys.value.some((key) => checkedSet.value.has(key)));
|
|
14319
14458
|
function isIndeterminate(row) {
|
|
14320
14459
|
if (!props.selectable || props.checkStrictly) return false;
|
|
14321
14460
|
const desc = descendantMap.value[keyOf(row, props.rowKey)] || [];
|
|
@@ -14349,7 +14488,7 @@ var tree_table_default = {
|
|
|
14349
14488
|
}
|
|
14350
14489
|
emitChecked(Array.from(set));
|
|
14351
14490
|
}
|
|
14352
|
-
const nodeMap = (0,
|
|
14491
|
+
const nodeMap = (0, import_vue52.computed)(() => {
|
|
14353
14492
|
const map = {};
|
|
14354
14493
|
eachNode(props.data, (row, level, parentKey) => {
|
|
14355
14494
|
map[keyOf(row, props.rowKey)] = { row, parentKey };
|
|
@@ -14396,11 +14535,11 @@ var tree_table_default = {
|
|
|
14396
14535
|
function onRowClick(item) {
|
|
14397
14536
|
emit("row-click", item.row, item);
|
|
14398
14537
|
}
|
|
14399
|
-
const scrollStyle = (0,
|
|
14538
|
+
const scrollStyle = (0, import_vue52.computed)(() => {
|
|
14400
14539
|
if (!props.maxHeight) return null;
|
|
14401
14540
|
return { maxHeight: typeof props.maxHeight === "number" ? props.maxHeight + "px" : props.maxHeight };
|
|
14402
14541
|
});
|
|
14403
|
-
const emptyLabel = (0,
|
|
14542
|
+
const emptyLabel = (0, import_vue52.computed)(() => props.emptyText || t("treeTable.empty"));
|
|
14404
14543
|
return {
|
|
14405
14544
|
rows,
|
|
14406
14545
|
innerExpanded,
|
|
@@ -14502,7 +14641,7 @@ var tree_table_default = {
|
|
|
14502
14641
|
};
|
|
14503
14642
|
|
|
14504
14643
|
// src/components/schedule/index.js
|
|
14505
|
-
var
|
|
14644
|
+
var import_vue53 = require("vue");
|
|
14506
14645
|
var pad5 = (value) => String(value).padStart(2, "0");
|
|
14507
14646
|
function toKey3(date) {
|
|
14508
14647
|
return `${date.getFullYear()}-${pad5(date.getMonth() + 1)}-${pad5(date.getDate())}`;
|
|
@@ -14534,13 +14673,13 @@ var schedule_default = {
|
|
|
14534
14673
|
emits: ["update:modelValue", "event-click", "slot-click", "week-change"],
|
|
14535
14674
|
setup(props, { emit }) {
|
|
14536
14675
|
const todayKey = toKey3(/* @__PURE__ */ new Date());
|
|
14537
|
-
const nowMinutes = (0,
|
|
14676
|
+
const nowMinutes = (0, import_vue53.ref)((/* @__PURE__ */ new Date()).getHours() * 60 + (/* @__PURE__ */ new Date()).getMinutes());
|
|
14538
14677
|
const timer = window.setInterval(() => {
|
|
14539
14678
|
const now = /* @__PURE__ */ new Date();
|
|
14540
14679
|
nowMinutes.value = now.getHours() * 60 + now.getMinutes();
|
|
14541
14680
|
}, 6e4);
|
|
14542
|
-
const anchor = (0,
|
|
14543
|
-
(0,
|
|
14681
|
+
const anchor = (0, import_vue53.ref)(props.modelValue || todayKey);
|
|
14682
|
+
(0, import_vue53.watch)(
|
|
14544
14683
|
() => props.modelValue,
|
|
14545
14684
|
(value) => {
|
|
14546
14685
|
if (value) anchor.value = value;
|
|
@@ -14552,8 +14691,8 @@ var schedule_default = {
|
|
|
14552
14691
|
const offset = (day + 6) % 7;
|
|
14553
14692
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate() - offset);
|
|
14554
14693
|
}
|
|
14555
|
-
const weekStartDate = (0,
|
|
14556
|
-
const weekdays = (0,
|
|
14694
|
+
const weekStartDate = (0, import_vue53.computed)(() => startOfWeek(anchor.value));
|
|
14695
|
+
const weekdays = (0, import_vue53.computed)(() => t("schedule.weekdays").split(","));
|
|
14557
14696
|
function layoutDay(list) {
|
|
14558
14697
|
const sorted = list.map((item) => {
|
|
14559
14698
|
const startMin = toMinutes(item.start, props.startHour * 60);
|
|
@@ -14586,7 +14725,7 @@ var schedule_default = {
|
|
|
14586
14725
|
};
|
|
14587
14726
|
});
|
|
14588
14727
|
}
|
|
14589
|
-
const days = (0,
|
|
14728
|
+
const days = (0, import_vue53.computed)(() => {
|
|
14590
14729
|
const start = weekStartDate.value;
|
|
14591
14730
|
const list = Array.from({ length: 7 }, (_, index) => {
|
|
14592
14731
|
const date = new Date(start.getFullYear(), start.getMonth(), start.getDate() + index);
|
|
@@ -14604,20 +14743,20 @@ var schedule_default = {
|
|
|
14604
14743
|
});
|
|
14605
14744
|
return props.showWeekend ? list : list.slice(0, 5);
|
|
14606
14745
|
});
|
|
14607
|
-
const hours = (0,
|
|
14746
|
+
const hours = (0, import_vue53.computed)(() => {
|
|
14608
14747
|
const list = [];
|
|
14609
14748
|
for (let hour = props.startHour; hour < props.endHour; hour++) list.push(hour);
|
|
14610
14749
|
return list;
|
|
14611
14750
|
});
|
|
14612
|
-
const bodyHeight = (0,
|
|
14613
|
-
const gridStyle = (0,
|
|
14751
|
+
const bodyHeight = (0, import_vue53.computed)(() => (props.endHour - props.startHour) * props.hourHeight);
|
|
14752
|
+
const gridStyle = (0, import_vue53.computed)(() => ({
|
|
14614
14753
|
gridTemplateColumns: "56px repeat(" + Math.max(1, days.value.length) + ", minmax(0, 1fr))"
|
|
14615
14754
|
}));
|
|
14616
|
-
const nowTop = (0,
|
|
14617
|
-
const showNowLine = (0,
|
|
14755
|
+
const nowTop = (0, import_vue53.computed)(() => (nowMinutes.value - props.startHour * 60) / 60 * props.hourHeight);
|
|
14756
|
+
const showNowLine = (0, import_vue53.computed)(
|
|
14618
14757
|
() => nowMinutes.value >= props.startHour * 60 && nowMinutes.value <= props.endHour * 60 && days.value.some((day) => day.today)
|
|
14619
14758
|
);
|
|
14620
|
-
const rangeLabel = (0,
|
|
14759
|
+
const rangeLabel = (0, import_vue53.computed)(() => {
|
|
14621
14760
|
const list = days.value;
|
|
14622
14761
|
if (!list.length) return "";
|
|
14623
14762
|
const first = list[0];
|
|
@@ -14647,7 +14786,7 @@ var schedule_default = {
|
|
|
14647
14786
|
const minute = minutes % 60;
|
|
14648
14787
|
emit("slot-click", { date: day.key, time: `${pad5(hour)}:${pad5(minute)}` });
|
|
14649
14788
|
}
|
|
14650
|
-
(0,
|
|
14789
|
+
(0, import_vue53.onBeforeUnmount)(() => window.clearInterval(timer));
|
|
14651
14790
|
return {
|
|
14652
14791
|
days,
|
|
14653
14792
|
hours,
|
|
@@ -14747,7 +14886,7 @@ var schedule_default = {
|
|
|
14747
14886
|
};
|
|
14748
14887
|
|
|
14749
14888
|
// src/components/comment/index.js
|
|
14750
|
-
var
|
|
14889
|
+
var import_vue54 = require("vue");
|
|
14751
14890
|
var comment_default = {
|
|
14752
14891
|
name: "DjmComment",
|
|
14753
14892
|
components: { DjmAvatar: avatar_default, DjmIcon: icon_default },
|
|
@@ -14764,16 +14903,16 @@ var comment_default = {
|
|
|
14764
14903
|
},
|
|
14765
14904
|
emits: ["submit", "reply", "remove"],
|
|
14766
14905
|
setup(props, { emit }) {
|
|
14767
|
-
const content = (0,
|
|
14768
|
-
const replyTarget = (0,
|
|
14769
|
-
const placeholderText = (0,
|
|
14906
|
+
const content = (0, import_vue54.ref)("");
|
|
14907
|
+
const replyTarget = (0, import_vue54.ref)(null);
|
|
14908
|
+
const placeholderText = (0, import_vue54.computed)(() => {
|
|
14770
14909
|
if (replyTarget.value) return t("comment.replyPlaceholder", { name: replyTarget.value.author });
|
|
14771
14910
|
return props.placeholder || t("comment.placeholder");
|
|
14772
14911
|
});
|
|
14773
|
-
const submitLabel = (0,
|
|
14774
|
-
const emptyLabel = (0,
|
|
14775
|
-
const overLimit = (0,
|
|
14776
|
-
const canSubmit = (0,
|
|
14912
|
+
const submitLabel = (0, import_vue54.computed)(() => props.submitText || t("comment.submit"));
|
|
14913
|
+
const emptyLabel = (0, import_vue54.computed)(() => props.emptyText || t("comment.empty"));
|
|
14914
|
+
const overLimit = (0, import_vue54.computed)(() => content.value.length > props.maxLength);
|
|
14915
|
+
const canSubmit = (0, import_vue54.computed)(() => content.value.trim().length > 0 && !overLimit.value && !props.disabled && !props.loading);
|
|
14777
14916
|
function onInput(event) {
|
|
14778
14917
|
content.value = event.target.value;
|
|
14779
14918
|
}
|
|
@@ -14878,7 +15017,7 @@ var comment_default = {
|
|
|
14878
15017
|
};
|
|
14879
15018
|
|
|
14880
15019
|
// src/components/signature/index.js
|
|
14881
|
-
var
|
|
15020
|
+
var import_vue55 = require("vue");
|
|
14882
15021
|
var signature_default = {
|
|
14883
15022
|
name: "DjmSignature",
|
|
14884
15023
|
props: {
|
|
@@ -14892,10 +15031,10 @@ var signature_default = {
|
|
|
14892
15031
|
},
|
|
14893
15032
|
emits: ["update:modelValue", "change", "start", "end", "clear"],
|
|
14894
15033
|
setup(props, { emit }) {
|
|
14895
|
-
const canvas = (0,
|
|
14896
|
-
const root = (0,
|
|
14897
|
-
const strokes = (0,
|
|
14898
|
-
const hasImage = (0,
|
|
15034
|
+
const canvas = (0, import_vue55.ref)(null);
|
|
15035
|
+
const root = (0, import_vue55.ref)(null);
|
|
15036
|
+
const strokes = (0, import_vue55.ref)([]);
|
|
15037
|
+
const hasImage = (0, import_vue55.ref)(false);
|
|
14899
15038
|
let imageCache = null;
|
|
14900
15039
|
let drawing = false;
|
|
14901
15040
|
let current = null;
|
|
@@ -15010,7 +15149,7 @@ var signature_default = {
|
|
|
15010
15149
|
return canvas.value ? canvas.value.toDataURL("image/png") : "";
|
|
15011
15150
|
}
|
|
15012
15151
|
const isEmpty2 = () => strokes.value.length === 0 && !hasImage.value;
|
|
15013
|
-
(0,
|
|
15152
|
+
(0, import_vue55.watch)(
|
|
15014
15153
|
() => props.modelValue,
|
|
15015
15154
|
(value) => {
|
|
15016
15155
|
if (value === lastEmitted) return;
|
|
@@ -15032,7 +15171,7 @@ var signature_default = {
|
|
|
15032
15171
|
img.src = value;
|
|
15033
15172
|
}
|
|
15034
15173
|
);
|
|
15035
|
-
(0,
|
|
15174
|
+
(0, import_vue55.onMounted)(() => {
|
|
15036
15175
|
setupCanvas();
|
|
15037
15176
|
if (props.modelValue) {
|
|
15038
15177
|
const img = new Image();
|
|
@@ -15048,7 +15187,7 @@ var signature_default = {
|
|
|
15048
15187
|
if (root.value) observer.observe(root.value);
|
|
15049
15188
|
}
|
|
15050
15189
|
});
|
|
15051
|
-
(0,
|
|
15190
|
+
(0, import_vue55.onBeforeUnmount)(() => {
|
|
15052
15191
|
if (observer) observer.disconnect();
|
|
15053
15192
|
});
|
|
15054
15193
|
return {
|
|
@@ -15088,7 +15227,7 @@ var signature_default = {
|
|
|
15088
15227
|
};
|
|
15089
15228
|
|
|
15090
15229
|
// src/components/print/index.js
|
|
15091
|
-
var
|
|
15230
|
+
var import_vue56 = require("vue");
|
|
15092
15231
|
function escapeHtml(text) {
|
|
15093
15232
|
return String(text).replace(/[&<>"]/g, (ch) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[ch]);
|
|
15094
15233
|
}
|
|
@@ -15104,8 +15243,8 @@ var print_default = {
|
|
|
15104
15243
|
},
|
|
15105
15244
|
emits: ["before-print", "after-print"],
|
|
15106
15245
|
setup(props, { emit }) {
|
|
15107
|
-
const content = (0,
|
|
15108
|
-
const label = (0,
|
|
15246
|
+
const content = (0, import_vue56.ref)(null);
|
|
15247
|
+
const label = (0, import_vue56.computed)(() => props.buttonText || t("print.button"));
|
|
15109
15248
|
function collectStyles() {
|
|
15110
15249
|
return Array.from(document.querySelectorAll('link[rel="stylesheet"], style')).map((el) => el.outerHTML).join("");
|
|
15111
15250
|
}
|
|
@@ -15154,7 +15293,7 @@ var print_default = {
|
|
|
15154
15293
|
};
|
|
15155
15294
|
|
|
15156
15295
|
// src/components/gantt/index.js
|
|
15157
|
-
var
|
|
15296
|
+
var import_vue57 = require("vue");
|
|
15158
15297
|
var DAY = 864e5;
|
|
15159
15298
|
var pad6 = (value) => String(value).padStart(2, "0");
|
|
15160
15299
|
function parseDate3(value) {
|
|
@@ -15190,7 +15329,7 @@ var gantt_default = {
|
|
|
15190
15329
|
emits: ["task-click"],
|
|
15191
15330
|
setup(props, { emit }) {
|
|
15192
15331
|
const todayKey = toKey4(/* @__PURE__ */ new Date());
|
|
15193
|
-
const range = (0,
|
|
15332
|
+
const range = (0, import_vue57.computed)(() => {
|
|
15194
15333
|
const starts = props.tasks.map((task) => task.start).filter(Boolean).sort();
|
|
15195
15334
|
const ends = props.tasks.map((task) => task.end || task.start).filter(Boolean).sort();
|
|
15196
15335
|
let start = props.startDate || starts[0] || todayKey;
|
|
@@ -15203,7 +15342,7 @@ var gantt_default = {
|
|
|
15203
15342
|
}
|
|
15204
15343
|
return { start, end };
|
|
15205
15344
|
});
|
|
15206
|
-
const days = (0,
|
|
15345
|
+
const days = (0, import_vue57.computed)(() => {
|
|
15207
15346
|
const total = dayDiff(range.value.end, range.value.start) + 1;
|
|
15208
15347
|
const base = parseDate3(range.value.start);
|
|
15209
15348
|
return Array.from({ length: total }, (_, index) => {
|
|
@@ -15220,9 +15359,9 @@ var gantt_default = {
|
|
|
15220
15359
|
};
|
|
15221
15360
|
});
|
|
15222
15361
|
});
|
|
15223
|
-
const trackWidth = (0,
|
|
15224
|
-
const innerWidth = (0,
|
|
15225
|
-
const bars = (0,
|
|
15362
|
+
const trackWidth = (0, import_vue57.computed)(() => days.value.length * props.dayWidth);
|
|
15363
|
+
const innerWidth = (0, import_vue57.computed)(() => props.nameWidth + trackWidth.value);
|
|
15364
|
+
const bars = (0, import_vue57.computed)(
|
|
15226
15365
|
() => props.tasks.map((task, index) => {
|
|
15227
15366
|
const start = task.start || range.value.start;
|
|
15228
15367
|
const end = task.end || start;
|
|
@@ -15238,12 +15377,12 @@ var gantt_default = {
|
|
|
15238
15377
|
};
|
|
15239
15378
|
})
|
|
15240
15379
|
);
|
|
15241
|
-
const todayLeft = (0,
|
|
15380
|
+
const todayLeft = (0, import_vue57.computed)(() => {
|
|
15242
15381
|
const index = days.value.findIndex((day) => day.today);
|
|
15243
15382
|
if (index === -1) return null;
|
|
15244
15383
|
return props.nameWidth + index * props.dayWidth + props.dayWidth / 2;
|
|
15245
15384
|
});
|
|
15246
|
-
const emptyLabel = (0,
|
|
15385
|
+
const emptyLabel = (0, import_vue57.computed)(() => props.emptyText || t("gantt.empty"));
|
|
15247
15386
|
function onClick(bar) {
|
|
15248
15387
|
emit("task-click", bar.task);
|
|
15249
15388
|
}
|
|
@@ -15325,7 +15464,7 @@ var gantt_default = {
|
|
|
15325
15464
|
};
|
|
15326
15465
|
|
|
15327
15466
|
// src/components/field-list/index.js
|
|
15328
|
-
var
|
|
15467
|
+
var import_vue58 = require("vue");
|
|
15329
15468
|
var uidSeed8 = 0;
|
|
15330
15469
|
var field_list_default = {
|
|
15331
15470
|
name: "DjmFieldList",
|
|
@@ -15345,7 +15484,7 @@ var field_list_default = {
|
|
|
15345
15484
|
},
|
|
15346
15485
|
emits: ["update:modelValue", "add", "remove", "change"],
|
|
15347
15486
|
setup(props, { emit }) {
|
|
15348
|
-
const uids = (0,
|
|
15487
|
+
const uids = (0, import_vue58.ref)([]);
|
|
15349
15488
|
function syncUids() {
|
|
15350
15489
|
const length = props.modelValue.length;
|
|
15351
15490
|
if (uids.value.length === length) return;
|
|
@@ -15354,12 +15493,12 @@ var field_list_default = {
|
|
|
15354
15493
|
uids.value = next;
|
|
15355
15494
|
}
|
|
15356
15495
|
syncUids();
|
|
15357
|
-
(0,
|
|
15358
|
-
const errors = (0,
|
|
15359
|
-
const addLabel = (0,
|
|
15360
|
-
const emptyLabel = (0,
|
|
15361
|
-
const canAdd = (0,
|
|
15362
|
-
const canRemove = (0,
|
|
15496
|
+
(0, import_vue58.watch)(() => props.modelValue.length, syncUids);
|
|
15497
|
+
const errors = (0, import_vue58.ref)({});
|
|
15498
|
+
const addLabel = (0, import_vue58.computed)(() => props.addText || t("fieldList.add"));
|
|
15499
|
+
const emptyLabel = (0, import_vue58.computed)(() => props.emptyText || t("fieldList.empty"));
|
|
15500
|
+
const canAdd = (0, import_vue58.computed)(() => !props.disabled && (!props.max || props.modelValue.length < props.max));
|
|
15501
|
+
const canRemove = (0, import_vue58.computed)(() => !props.disabled && props.modelValue.length > props.min);
|
|
15363
15502
|
function commit(list) {
|
|
15364
15503
|
emit("update:modelValue", list);
|
|
15365
15504
|
emit("change", list);
|
|
@@ -15521,7 +15660,7 @@ var field_list_default = {
|
|
|
15521
15660
|
};
|
|
15522
15661
|
|
|
15523
15662
|
// src/components/chat/index.js
|
|
15524
|
-
var
|
|
15663
|
+
var import_vue59 = require("vue");
|
|
15525
15664
|
var chat_default = {
|
|
15526
15665
|
name: "DjmChat",
|
|
15527
15666
|
components: { DjmAvatar: avatar_default },
|
|
@@ -15538,19 +15677,19 @@ var chat_default = {
|
|
|
15538
15677
|
},
|
|
15539
15678
|
emits: ["submit"],
|
|
15540
15679
|
setup(props, { emit }) {
|
|
15541
|
-
const content = (0,
|
|
15542
|
-
const listRef = (0,
|
|
15543
|
-
const placeholderText = (0,
|
|
15544
|
-
const sendLabel = (0,
|
|
15545
|
-
const emptyLabel = (0,
|
|
15546
|
-
const canSend = (0,
|
|
15680
|
+
const content = (0, import_vue59.ref)("");
|
|
15681
|
+
const listRef = (0, import_vue59.ref)(null);
|
|
15682
|
+
const placeholderText = (0, import_vue59.computed)(() => props.placeholder || t("chat.placeholder"));
|
|
15683
|
+
const sendLabel = (0, import_vue59.computed)(() => props.sendText || t("chat.send"));
|
|
15684
|
+
const emptyLabel = (0, import_vue59.computed)(() => props.emptyText || t("chat.empty"));
|
|
15685
|
+
const canSend = (0, import_vue59.computed)(() => content.value.trim().length > 0 && !props.disabled && !props.loading);
|
|
15547
15686
|
function scrollToBottom() {
|
|
15548
15687
|
const el = listRef.value;
|
|
15549
15688
|
if (el) el.scrollTop = el.scrollHeight;
|
|
15550
15689
|
}
|
|
15551
|
-
(0,
|
|
15690
|
+
(0, import_vue59.watch)(
|
|
15552
15691
|
() => props.messages.length,
|
|
15553
|
-
() => (0,
|
|
15692
|
+
() => (0, import_vue59.nextTick)(scrollToBottom)
|
|
15554
15693
|
);
|
|
15555
15694
|
function onInput(event) {
|
|
15556
15695
|
content.value = event.target.value;
|
|
@@ -15661,7 +15800,7 @@ var chat_default = {
|
|
|
15661
15800
|
};
|
|
15662
15801
|
|
|
15663
15802
|
// src/components/org-chart/index.js
|
|
15664
|
-
var
|
|
15803
|
+
var import_vue60 = require("vue");
|
|
15665
15804
|
var org_chart_default = {
|
|
15666
15805
|
name: "DjmOrgChart",
|
|
15667
15806
|
components: { DjmAvatar: avatar_default, DjmIcon: icon_default },
|
|
@@ -15694,11 +15833,11 @@ var org_chart_default = {
|
|
|
15694
15833
|
walk(node);
|
|
15695
15834
|
return keys;
|
|
15696
15835
|
}
|
|
15697
|
-
const collapsed = (0,
|
|
15698
|
-
(0,
|
|
15836
|
+
const collapsed = (0, import_vue60.ref)(props.defaultExpandAll ? [] : collapsedByDefault(props.data));
|
|
15837
|
+
(0, import_vue60.watch)(() => props.data, (data) => {
|
|
15699
15838
|
collapsed.value = props.defaultExpandAll ? [] : collapsedByDefault(data);
|
|
15700
15839
|
});
|
|
15701
|
-
const layout = (0,
|
|
15840
|
+
const layout = (0, import_vue60.computed)(() => {
|
|
15702
15841
|
if (!props.data) return { nodes: [], links: [], width: 0, height: 0 };
|
|
15703
15842
|
const rowH = props.nodeHeight + props.verticalGap;
|
|
15704
15843
|
let cursor = 0;
|
|
@@ -15763,7 +15902,7 @@ var org_chart_default = {
|
|
|
15763
15902
|
function onClick(item) {
|
|
15764
15903
|
emit("node-click", item.node);
|
|
15765
15904
|
}
|
|
15766
|
-
const emptyLabel = (0,
|
|
15905
|
+
const emptyLabel = (0, import_vue60.computed)(() => props.emptyText || t("orgChart.empty"));
|
|
15767
15906
|
return {
|
|
15768
15907
|
layout,
|
|
15769
15908
|
toggle,
|
|
@@ -15824,7 +15963,7 @@ var org_chart_default = {
|
|
|
15824
15963
|
};
|
|
15825
15964
|
|
|
15826
15965
|
// src/components/page-tabs/index.js
|
|
15827
|
-
var
|
|
15966
|
+
var import_vue61 = require("vue");
|
|
15828
15967
|
var page_tabs_default = {
|
|
15829
15968
|
name: "DjmPageTabs",
|
|
15830
15969
|
components: { DjmIcon: icon_default },
|
|
@@ -15835,7 +15974,7 @@ var page_tabs_default = {
|
|
|
15835
15974
|
},
|
|
15836
15975
|
emits: ["update:modelValue", "change", "close"],
|
|
15837
15976
|
setup(props, { emit }) {
|
|
15838
|
-
const label = (0,
|
|
15977
|
+
const label = (0, import_vue61.computed)(() => t("pageTabs.label"));
|
|
15839
15978
|
function canClose(tab) {
|
|
15840
15979
|
return tab.closable === void 0 ? props.closable : tab.closable;
|
|
15841
15980
|
}
|
|
@@ -15945,8 +16084,8 @@ function moveRows(rows, dragIndex, dropIndex, position = "before") {
|
|
|
15945
16084
|
}
|
|
15946
16085
|
|
|
15947
16086
|
// src/utils/permission.js
|
|
15948
|
-
var
|
|
15949
|
-
var state2 = (0,
|
|
16087
|
+
var import_vue62 = require("vue");
|
|
16088
|
+
var state2 = (0, import_vue62.reactive)({
|
|
15950
16089
|
codes: /* @__PURE__ */ new Set()
|
|
15951
16090
|
});
|
|
15952
16091
|
function setPermissions(list) {
|
|
@@ -16088,7 +16227,7 @@ var components = [
|
|
|
16088
16227
|
org_chart_default,
|
|
16089
16228
|
page_tabs_default
|
|
16090
16229
|
];
|
|
16091
|
-
var version = "0.
|
|
16230
|
+
var version = "0.73.1";
|
|
16092
16231
|
function install(app, options = {}) {
|
|
16093
16232
|
if (options.locale) setLocale(options.locale);
|
|
16094
16233
|
components.forEach((component) => app.component(component.name, component));
|
|
@@ -16210,6 +16349,7 @@ var index_default = { install, version };
|
|
|
16210
16349
|
djmMessage,
|
|
16211
16350
|
djmMessages,
|
|
16212
16351
|
getLocale,
|
|
16352
|
+
glass,
|
|
16213
16353
|
hasPermission,
|
|
16214
16354
|
initTheme,
|
|
16215
16355
|
install,
|
|
@@ -16219,6 +16359,7 @@ var index_default = { install, version };
|
|
|
16219
16359
|
primaryColor,
|
|
16220
16360
|
resetPrimaryColor,
|
|
16221
16361
|
sanitizeHtml,
|
|
16362
|
+
setGlass,
|
|
16222
16363
|
setLocale,
|
|
16223
16364
|
setPermissions,
|
|
16224
16365
|
setPrimaryColor,
|