@yh-ui/components 0.1.24 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-artifacts/src/ai-artifacts.vue +1 -1
- package/dist/ai-bubble/src/ai-bubble.vue +2 -2
- package/dist/ai-code-block/src/ai-code-block.vue +1 -1
- package/dist/ai-mention/index.d.ts +0 -1
- package/dist/ai-mention/src/ai-mention.vue +24 -9
- package/dist/ai-mention/src/ai-mention.vue.d.ts +1 -1
- package/dist/ai-thought-chain/src/ai-thought-chain.vue +1 -1
- package/dist/calendar/index.d.ts +84 -612
- package/dist/calendar/src/calendar.vue +3 -3
- package/dist/calendar/src/calendar.vue.d.ts +43 -220
- package/dist/date-picker/src/date-picker.vue +1 -1
- package/dist/date-picker/src/date-table.vue +1 -1
- package/dist/date-picker/src/month-table.vue +1 -1
- package/dist/date-picker/src/panel-utils.cjs +13 -13
- package/dist/date-picker/src/panel-utils.d.ts +1 -1
- package/dist/date-picker/src/panel-utils.mjs +13 -13
- package/dist/date-picker/src/quarter-table.vue +1 -1
- package/dist/date-picker/src/year-table.vue +1 -1
- package/dist/dayjs.cjs +11 -0
- package/dist/dayjs.d.ts +4 -0
- package/dist/dayjs.mjs +3 -0
- package/dist/form/src/form-schema.vue +13 -14
- package/dist/gantt-chart/src/gantt-chart.vue +7 -15
- package/dist/gantt-chart/src/gantt-chart.vue.d.ts +1 -1
- package/dist/highlight.cjs +34 -0
- package/dist/highlight.d.ts +13 -0
- package/dist/highlight.mjs +54 -0
- package/dist/image/src/image-viewer.vue +48 -26
- package/dist/image/src/image.vue +7 -5
- package/dist/markdown-it.cjs +11 -0
- package/dist/markdown-it.d.ts +2 -0
- package/dist/markdown-it.mjs +3 -0
- package/dist/menu/src/menu.vue +5 -5
- package/dist/transfer/index.cjs +9 -3
- package/dist/transfer/index.mjs +9 -3
- package/dist/typography/src/paragraph.vue +9 -2
- package/dist/upload/src/upload.vue +5 -4
- package/dist/viewerjs.cjs +11 -0
- package/dist/viewerjs.d.ts +2 -0
- package/dist/viewerjs.mjs +3 -0
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed, watch, onMounted } from "vue";
|
|
3
|
-
import dayjs from "dayjs";
|
|
4
|
-
import
|
|
3
|
+
import dayjs from "../../dayjs";
|
|
4
|
+
import isoWeekPlugin from "dayjs/esm/plugin/isoWeek/index.js";
|
|
5
5
|
import { useNamespace, useLocale } from "@yh-ui/hooks";
|
|
6
6
|
import { useComponentTheme } from "@yh-ui/theme";
|
|
7
7
|
import {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
DEFAULT_CHINA_HOLIDAYS_2026
|
|
11
11
|
} from "./calendar";
|
|
12
12
|
import { YhButton } from "../../button";
|
|
13
|
-
dayjs.extend(
|
|
13
|
+
dayjs.extend(isoWeekPlugin);
|
|
14
14
|
defineOptions({
|
|
15
15
|
name: "YhCalendar"
|
|
16
16
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { Dayjs } from 'dayjs';
|
|
1
|
+
import type { Dayjs } from '../../dayjs';
|
|
3
2
|
import { type CalendarDateCell, type HolidayMap } from './calendar';
|
|
4
3
|
declare var __VLS_1: {
|
|
5
4
|
date: string;
|
|
@@ -152,28 +151,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
152
151
|
(): number;
|
|
153
152
|
(value: number): Dayjs;
|
|
154
153
|
};
|
|
155
|
-
set: (unit: dayjs.UnitType, value: number) => Dayjs;
|
|
156
|
-
get: (unit: dayjs.UnitType) => number;
|
|
157
|
-
add:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
subtract: {
|
|
162
|
-
(value: number, unit?: dayjs.ManipulateType): Dayjs;
|
|
163
|
-
(value: number, unit: dayjs.QUnitType): Dayjs;
|
|
164
|
-
};
|
|
165
|
-
startOf: {
|
|
166
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
167
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
168
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
169
|
-
};
|
|
170
|
-
endOf: {
|
|
171
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
172
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
173
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
174
|
-
};
|
|
154
|
+
set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
|
|
155
|
+
get: (unit: import("dayjs").UnitType) => number;
|
|
156
|
+
add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
157
|
+
subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
158
|
+
startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
159
|
+
endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
175
160
|
format: (template?: string) => string;
|
|
176
|
-
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
|
|
161
|
+
diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
|
|
177
162
|
valueOf: () => number;
|
|
178
163
|
unix: () => number;
|
|
179
164
|
daysInMonth: () => number;
|
|
@@ -182,44 +167,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
182
167
|
toISOString: () => string;
|
|
183
168
|
toString: () => string;
|
|
184
169
|
utcOffset: () => number;
|
|
185
|
-
isBefore:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
189
|
-
};
|
|
190
|
-
isSame: {
|
|
191
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
192
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
193
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
194
|
-
};
|
|
195
|
-
isAfter: {
|
|
196
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
197
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
198
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
199
|
-
};
|
|
170
|
+
isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
171
|
+
isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
172
|
+
isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
200
173
|
locale: {
|
|
201
174
|
(): string;
|
|
202
175
|
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
|
|
203
176
|
};
|
|
204
|
-
|
|
205
|
-
week: {
|
|
206
|
-
(): number;
|
|
207
|
-
(value: number): Dayjs;
|
|
208
|
-
};
|
|
209
|
-
isoWeekYear: () => number;
|
|
210
|
-
isoWeek: {
|
|
211
|
-
(): number;
|
|
212
|
-
(value: number): Dayjs;
|
|
213
|
-
};
|
|
214
|
-
isoWeekday: {
|
|
215
|
-
(): number;
|
|
216
|
-
(value: number): Dayjs;
|
|
217
|
-
};
|
|
218
|
-
quarter: {
|
|
219
|
-
(): number;
|
|
220
|
-
(quarter: number): Dayjs;
|
|
221
|
-
};
|
|
222
|
-
}, dayjs.Dayjs | {
|
|
177
|
+
}, Dayjs | {
|
|
223
178
|
clone: () => Dayjs;
|
|
224
179
|
isValid: () => boolean;
|
|
225
180
|
year: {
|
|
@@ -254,28 +209,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
254
209
|
(): number;
|
|
255
210
|
(value: number): Dayjs;
|
|
256
211
|
};
|
|
257
|
-
set: (unit: dayjs.UnitType, value: number) => Dayjs;
|
|
258
|
-
get: (unit: dayjs.UnitType) => number;
|
|
259
|
-
add:
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
subtract: {
|
|
264
|
-
(value: number, unit?: dayjs.ManipulateType): Dayjs;
|
|
265
|
-
(value: number, unit: dayjs.QUnitType): Dayjs;
|
|
266
|
-
};
|
|
267
|
-
startOf: {
|
|
268
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
269
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
270
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
271
|
-
};
|
|
272
|
-
endOf: {
|
|
273
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
274
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
275
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
276
|
-
};
|
|
212
|
+
set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
|
|
213
|
+
get: (unit: import("dayjs").UnitType) => number;
|
|
214
|
+
add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
215
|
+
subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
216
|
+
startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
217
|
+
endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
277
218
|
format: (template?: string) => string;
|
|
278
|
-
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
|
|
219
|
+
diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
|
|
279
220
|
valueOf: () => number;
|
|
280
221
|
unix: () => number;
|
|
281
222
|
daysInMonth: () => number;
|
|
@@ -284,43 +225,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
284
225
|
toISOString: () => string;
|
|
285
226
|
toString: () => string;
|
|
286
227
|
utcOffset: () => number;
|
|
287
|
-
isBefore:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
291
|
-
};
|
|
292
|
-
isSame: {
|
|
293
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
294
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
295
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
296
|
-
};
|
|
297
|
-
isAfter: {
|
|
298
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
299
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
300
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
301
|
-
};
|
|
228
|
+
isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
229
|
+
isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
230
|
+
isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
302
231
|
locale: {
|
|
303
232
|
(): string;
|
|
304
233
|
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
|
|
305
234
|
};
|
|
306
|
-
isBetween: (a: dayjs.ConfigType, b: dayjs.ConfigType, c?: dayjs.OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
|
|
307
|
-
week: {
|
|
308
|
-
(): number;
|
|
309
|
-
(value: number): Dayjs;
|
|
310
|
-
};
|
|
311
|
-
isoWeekYear: () => number;
|
|
312
|
-
isoWeek: {
|
|
313
|
-
(): number;
|
|
314
|
-
(value: number): Dayjs;
|
|
315
|
-
};
|
|
316
|
-
isoWeekday: {
|
|
317
|
-
(): number;
|
|
318
|
-
(value: number): Dayjs;
|
|
319
|
-
};
|
|
320
|
-
quarter: {
|
|
321
|
-
(): number;
|
|
322
|
-
(quarter: number): Dayjs;
|
|
323
|
-
};
|
|
324
235
|
}>;
|
|
325
236
|
/** 当前选中的日期对象 (Dayjs - 单选模式) */
|
|
326
237
|
selectedDate: import("vue").Ref<{
|
|
@@ -358,28 +269,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
358
269
|
(): number;
|
|
359
270
|
(value: number): Dayjs;
|
|
360
271
|
};
|
|
361
|
-
set: (unit: dayjs.UnitType, value: number) => Dayjs;
|
|
362
|
-
get: (unit: dayjs.UnitType) => number;
|
|
363
|
-
add:
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
subtract: {
|
|
368
|
-
(value: number, unit?: dayjs.ManipulateType): Dayjs;
|
|
369
|
-
(value: number, unit: dayjs.QUnitType): Dayjs;
|
|
370
|
-
};
|
|
371
|
-
startOf: {
|
|
372
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
373
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
374
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
375
|
-
};
|
|
376
|
-
endOf: {
|
|
377
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
378
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
379
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
380
|
-
};
|
|
272
|
+
set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
|
|
273
|
+
get: (unit: import("dayjs").UnitType) => number;
|
|
274
|
+
add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
275
|
+
subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
276
|
+
startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
277
|
+
endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
381
278
|
format: (template?: string) => string;
|
|
382
|
-
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
|
|
279
|
+
diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
|
|
383
280
|
valueOf: () => number;
|
|
384
281
|
unix: () => number;
|
|
385
282
|
daysInMonth: () => number;
|
|
@@ -388,44 +285,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
388
285
|
toISOString: () => string;
|
|
389
286
|
toString: () => string;
|
|
390
287
|
utcOffset: () => number;
|
|
391
|
-
isBefore:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
395
|
-
};
|
|
396
|
-
isSame: {
|
|
397
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
398
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
399
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
400
|
-
};
|
|
401
|
-
isAfter: {
|
|
402
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
403
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
404
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
405
|
-
};
|
|
288
|
+
isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
289
|
+
isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
290
|
+
isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
406
291
|
locale: {
|
|
407
292
|
(): string;
|
|
408
293
|
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
|
|
409
294
|
};
|
|
410
|
-
|
|
411
|
-
week: {
|
|
412
|
-
(): number;
|
|
413
|
-
(value: number): Dayjs;
|
|
414
|
-
};
|
|
415
|
-
isoWeekYear: () => number;
|
|
416
|
-
isoWeek: {
|
|
417
|
-
(): number;
|
|
418
|
-
(value: number): Dayjs;
|
|
419
|
-
};
|
|
420
|
-
isoWeekday: {
|
|
421
|
-
(): number;
|
|
422
|
-
(value: number): Dayjs;
|
|
423
|
-
};
|
|
424
|
-
quarter: {
|
|
425
|
-
(): number;
|
|
426
|
-
(quarter: number): Dayjs;
|
|
427
|
-
};
|
|
428
|
-
} | undefined, dayjs.Dayjs | {
|
|
295
|
+
} | undefined, Dayjs | {
|
|
429
296
|
clone: () => Dayjs;
|
|
430
297
|
isValid: () => boolean;
|
|
431
298
|
year: {
|
|
@@ -460,28 +327,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
460
327
|
(): number;
|
|
461
328
|
(value: number): Dayjs;
|
|
462
329
|
};
|
|
463
|
-
set: (unit: dayjs.UnitType, value: number) => Dayjs;
|
|
464
|
-
get: (unit: dayjs.UnitType) => number;
|
|
465
|
-
add:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
subtract: {
|
|
470
|
-
(value: number, unit?: dayjs.ManipulateType): Dayjs;
|
|
471
|
-
(value: number, unit: dayjs.QUnitType): Dayjs;
|
|
472
|
-
};
|
|
473
|
-
startOf: {
|
|
474
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
475
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
476
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
477
|
-
};
|
|
478
|
-
endOf: {
|
|
479
|
-
(unit: dayjs.OpUnitType): Dayjs;
|
|
480
|
-
(unit: dayjs.OpUnitType | "isoWeek"): Dayjs;
|
|
481
|
-
(unit: dayjs.QUnitType | dayjs.OpUnitType): Dayjs;
|
|
482
|
-
};
|
|
330
|
+
set: (unit: import("dayjs").UnitType, value: number) => Dayjs;
|
|
331
|
+
get: (unit: import("dayjs").UnitType) => number;
|
|
332
|
+
add: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
333
|
+
subtract: (value: number, unit?: import("dayjs").ManipulateType) => Dayjs;
|
|
334
|
+
startOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
335
|
+
endOf: (unit: import("dayjs").OpUnitType) => Dayjs;
|
|
483
336
|
format: (template?: string) => string;
|
|
484
|
-
diff: (date?: dayjs.ConfigType, unit?: dayjs.QUnitType | dayjs.OpUnitType, float?: boolean) => number;
|
|
337
|
+
diff: (date?: import("dayjs").ConfigType, unit?: import("dayjs").QUnitType | import("dayjs").OpUnitType, float?: boolean) => number;
|
|
485
338
|
valueOf: () => number;
|
|
486
339
|
unix: () => number;
|
|
487
340
|
daysInMonth: () => number;
|
|
@@ -490,43 +343,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
490
343
|
toISOString: () => string;
|
|
491
344
|
toString: () => string;
|
|
492
345
|
utcOffset: () => number;
|
|
493
|
-
isBefore:
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
497
|
-
};
|
|
498
|
-
isSame: {
|
|
499
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
500
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
501
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
502
|
-
};
|
|
503
|
-
isAfter: {
|
|
504
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType): boolean;
|
|
505
|
-
(date?: dayjs.ConfigType, unit?: dayjs.OpUnitType | "isoWeek"): boolean;
|
|
506
|
-
(date?: dayjs.ConfigType, unit?: dayjs.QUnitType): boolean;
|
|
507
|
-
};
|
|
346
|
+
isBefore: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
347
|
+
isSame: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
348
|
+
isAfter: (date?: import("dayjs").ConfigType, unit?: import("dayjs").OpUnitType) => boolean;
|
|
508
349
|
locale: {
|
|
509
350
|
(): string;
|
|
510
351
|
(preset: string | ILocale, object?: Partial<ILocale>): Dayjs;
|
|
511
352
|
};
|
|
512
|
-
isBetween: (a: dayjs.ConfigType, b: dayjs.ConfigType, c?: dayjs.OpUnitType | null, d?: "()" | "[]" | "[)" | "(]") => boolean;
|
|
513
|
-
week: {
|
|
514
|
-
(): number;
|
|
515
|
-
(value: number): Dayjs;
|
|
516
|
-
};
|
|
517
|
-
isoWeekYear: () => number;
|
|
518
|
-
isoWeek: {
|
|
519
|
-
(): number;
|
|
520
|
-
(value: number): Dayjs;
|
|
521
|
-
};
|
|
522
|
-
isoWeekday: {
|
|
523
|
-
(): number;
|
|
524
|
-
(value: number): Dayjs;
|
|
525
|
-
};
|
|
526
|
-
quarter: {
|
|
527
|
-
(): number;
|
|
528
|
-
(quarter: number): Dayjs;
|
|
529
|
-
};
|
|
530
353
|
} | undefined>;
|
|
531
354
|
/** 切换月份 (delta: 1 或 -1) */
|
|
532
355
|
moveMonth: (delta: number) => void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useNamespace, useLocale } from "@yh-ui/hooks";
|
|
4
4
|
import { generateCalendar } from "./panel-utils";
|
|
5
|
-
import dayjs from "dayjs";
|
|
5
|
+
import dayjs from "../../dayjs";
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
date: { type: Date, required: true },
|
|
8
8
|
selectedDate: { type: [Date, Array, null], required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useNamespace, useLocale } from "@yh-ui/hooks";
|
|
4
|
-
import dayjs from "dayjs";
|
|
4
|
+
import dayjs from "../../dayjs";
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
date: { type: Date, required: true },
|
|
7
7
|
selectedDate: { type: [Date, Array, null], required: false },
|
|
@@ -4,20 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.parseDate = exports.generateCalendar = exports.formatDate = exports.DEFAULT_FORMATS = void 0;
|
|
7
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
7
|
+
var _dayjs = _interopRequireDefault(require("../../dayjs.cjs"));
|
|
8
|
+
var _index = _interopRequireDefault(require("dayjs/esm/plugin/isBetween/index.js"));
|
|
9
|
+
var _index2 = _interopRequireDefault(require("dayjs/esm/plugin/weekOfYear/index.js"));
|
|
10
|
+
var _index3 = _interopRequireDefault(require("dayjs/esm/plugin/isoWeek/index.js"));
|
|
11
|
+
var _index4 = _interopRequireDefault(require("dayjs/esm/plugin/quarterOfYear/index.js"));
|
|
12
|
+
var _index5 = _interopRequireDefault(require("dayjs/esm/plugin/advancedFormat/index.js"));
|
|
13
|
+
var _index6 = _interopRequireDefault(require("dayjs/esm/plugin/customParseFormat/index.js"));
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
_dayjs.default.extend(
|
|
16
|
-
_dayjs.default.extend(
|
|
17
|
-
_dayjs.default.extend(
|
|
18
|
-
_dayjs.default.extend(
|
|
19
|
-
_dayjs.default.extend(
|
|
20
|
-
_dayjs.default.extend(
|
|
15
|
+
_dayjs.default.extend(_index.default);
|
|
16
|
+
_dayjs.default.extend(_index2.default);
|
|
17
|
+
_dayjs.default.extend(_index3.default);
|
|
18
|
+
_dayjs.default.extend(_index4.default);
|
|
19
|
+
_dayjs.default.extend(_index5.default);
|
|
20
|
+
_dayjs.default.extend(_index6.default);
|
|
21
21
|
const DEFAULT_FORMATS = exports.DEFAULT_FORMATS = {
|
|
22
22
|
date: "YYYY-MM-DD",
|
|
23
23
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
dayjs.extend(
|
|
9
|
-
dayjs.extend(
|
|
10
|
-
dayjs.extend(
|
|
11
|
-
dayjs.extend(
|
|
12
|
-
dayjs.extend(
|
|
13
|
-
dayjs.extend(
|
|
1
|
+
import dayjs from "../../dayjs.mjs";
|
|
2
|
+
import isBetweenPlugin from "dayjs/esm/plugin/isBetween/index.js";
|
|
3
|
+
import weekOfYearPlugin from "dayjs/esm/plugin/weekOfYear/index.js";
|
|
4
|
+
import isoWeekPlugin from "dayjs/esm/plugin/isoWeek/index.js";
|
|
5
|
+
import quarterOfYearPlugin from "dayjs/esm/plugin/quarterOfYear/index.js";
|
|
6
|
+
import advancedFormatPlugin from "dayjs/esm/plugin/advancedFormat/index.js";
|
|
7
|
+
import customParseFormatPlugin from "dayjs/esm/plugin/customParseFormat/index.js";
|
|
8
|
+
dayjs.extend(isBetweenPlugin);
|
|
9
|
+
dayjs.extend(weekOfYearPlugin);
|
|
10
|
+
dayjs.extend(isoWeekPlugin);
|
|
11
|
+
dayjs.extend(quarterOfYearPlugin);
|
|
12
|
+
dayjs.extend(advancedFormatPlugin);
|
|
13
|
+
dayjs.extend(customParseFormatPlugin);
|
|
14
14
|
export const DEFAULT_FORMATS = {
|
|
15
15
|
date: "YYYY-MM-DD",
|
|
16
16
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useNamespace, useLocale } from "@yh-ui/hooks";
|
|
4
|
-
import dayjs from "dayjs";
|
|
4
|
+
import dayjs from "../../dayjs";
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
date: { type: Date, required: true },
|
|
7
7
|
selectedDate: { type: [Date, Array, null], required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { useNamespace } from "@yh-ui/hooks";
|
|
4
|
-
import dayjs from "dayjs";
|
|
4
|
+
import dayjs from "../../dayjs";
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
date: { type: Date, required: true },
|
|
7
7
|
selectedDate: { type: [Date, Array, null], required: false },
|
package/dist/dayjs.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var dayjsModule = _interopRequireWildcard(require("dayjs"));
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
const dayjs = "default" in dayjsModule ? dayjsModule.default ?? dayjsModule : dayjsModule;
|
|
11
|
+
module.exports = dayjs;
|
package/dist/dayjs.d.ts
ADDED
package/dist/dayjs.mjs
ADDED
|
@@ -34,6 +34,10 @@ watch(
|
|
|
34
34
|
const isGroup = (item) => {
|
|
35
35
|
return "items" in item && Array.isArray(item.items);
|
|
36
36
|
};
|
|
37
|
+
const getGroupTitle = (item) => isGroup(item) ? item.title || "" : "";
|
|
38
|
+
const getGroupProps = (item) => isGroup(item) ? item.props : void 0;
|
|
39
|
+
const isGroupCollapsible = (item) => isGroup(item) ? !!item.collapsible : false;
|
|
40
|
+
const getGroupItems = (item) => isGroup(item) ? item.items : [];
|
|
37
41
|
const optionMap = reactive({});
|
|
38
42
|
const collapsedMap = reactive({});
|
|
39
43
|
const loadingMap = reactive({});
|
|
@@ -265,22 +269,20 @@ defineExpose({
|
|
|
265
269
|
<div class="yh-form-col yh-form-col--24">
|
|
266
270
|
<fieldset
|
|
267
271
|
:class="[ns.e('group'), {
|
|
268
|
-
'is-collapsed': collapsedMap[item
|
|
272
|
+
'is-collapsed': collapsedMap[getGroupTitle(item)]
|
|
269
273
|
}]"
|
|
270
|
-
v-bind="item
|
|
274
|
+
v-bind="getGroupProps(item)"
|
|
271
275
|
>
|
|
272
276
|
<legend
|
|
273
|
-
v-if="(item
|
|
277
|
+
v-if="getGroupTitle(item)"
|
|
274
278
|
:class="ns.e('group-title')"
|
|
275
|
-
@click="item
|
|
279
|
+
@click="isGroupCollapsible(item) && toggleCollapse(getGroupTitle(item))"
|
|
276
280
|
>
|
|
277
|
-
<span class="yh-form-schema__group-title-text">{{
|
|
278
|
-
(item as FormSchemaGroup).title
|
|
279
|
-
}}</span>
|
|
281
|
+
<span class="yh-form-schema__group-title-text">{{ getGroupTitle(item) }}</span>
|
|
280
282
|
<span
|
|
281
|
-
v-if="item
|
|
283
|
+
v-if="isGroupCollapsible(item)"
|
|
282
284
|
:class="['yh-form-schema__collapse-icon', {
|
|
283
|
-
'is-collapsed': collapsedMap[item
|
|
285
|
+
'is-collapsed': collapsedMap[getGroupTitle(item)]
|
|
284
286
|
}]"
|
|
285
287
|
>
|
|
286
288
|
<svg viewBox="0 0 1024 1024" width="12" height="12">
|
|
@@ -292,11 +294,8 @@ defineExpose({
|
|
|
292
294
|
</span>
|
|
293
295
|
</legend>
|
|
294
296
|
|
|
295
|
-
<div
|
|
296
|
-
v-
|
|
297
|
-
class="yh-form--grid"
|
|
298
|
-
>
|
|
299
|
-
<template v-for="subItem in item.items" :key="subItem.field">
|
|
297
|
+
<div v-show="!collapsedMap[getGroupTitle(item)]" class="yh-form--grid">
|
|
298
|
+
<template v-for="subItem in getGroupItems(item)" :key="subItem.field">
|
|
300
299
|
<div
|
|
301
300
|
v-if="!isItemHidden(subItem)"
|
|
302
301
|
:class="['yh-form-col', subItem.col ? `yh-form-col--${subItem.col}` : 'yh-form-col--24']"
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed, watch } from "vue";
|
|
3
|
-
import dayjs from "dayjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import dayjs from "../../dayjs";
|
|
4
|
+
import isBetweenPlugin from "dayjs/esm/plugin/isBetween/index.js";
|
|
5
|
+
import isoWeekPlugin from "dayjs/esm/plugin/isoWeek/index.js";
|
|
6
|
+
import quarterOfYearPlugin from "dayjs/esm/plugin/quarterOfYear/index.js";
|
|
7
7
|
import { useNamespace } from "@yh-ui/hooks";
|
|
8
8
|
import { useComponentTheme } from "@yh-ui/theme";
|
|
9
|
-
import {
|
|
10
|
-
GanttChartProps,
|
|
11
|
-
GanttChartEmits,
|
|
12
|
-
GanttTask,
|
|
13
|
-
GanttDependencyLink,
|
|
14
|
-
GanttTaskStyle,
|
|
15
|
-
FlattenedGanttTask
|
|
16
|
-
} from "./gantt-chart";
|
|
17
9
|
import { YhTooltip } from "../../tooltip";
|
|
18
10
|
import { YhInput } from "../../input";
|
|
19
11
|
import { YhRadioGroup, YhRadioButton } from "../../radio";
|
|
20
|
-
dayjs.extend(
|
|
21
|
-
dayjs.extend(
|
|
22
|
-
dayjs.extend(
|
|
12
|
+
dayjs.extend(isBetweenPlugin);
|
|
13
|
+
dayjs.extend(isoWeekPlugin);
|
|
14
|
+
dayjs.extend(quarterOfYearPlugin);
|
|
23
15
|
defineOptions({ name: "YhGanttChart" });
|
|
24
16
|
const props = defineProps({
|
|
25
17
|
data: { type: Array, required: true, default: () => [] },
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const KNOWN_LANGUAGES = /* @__PURE__ */new Set(["bash", "c", "cpp", "css", "go", "html", "java", "javascript", "json", "jsx", "markdown", "md", "plaintext", "python", "rust", "shell", "sql", "text", "ts", "tsx", "typescript", "vue", "xml", "yaml", "yml"]);
|
|
8
|
+
const escapeHtml = value => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
9
|
+
const normalizeLanguage = language => {
|
|
10
|
+
if (!language) return "";
|
|
11
|
+
const normalized = language.toLowerCase();
|
|
12
|
+
if (normalized === "vue") return "html";
|
|
13
|
+
if (normalized === "ts") return "typescript";
|
|
14
|
+
if (normalized === "js") return "javascript";
|
|
15
|
+
if (normalized === "sh") return "shell";
|
|
16
|
+
if (normalized === "md") return "markdown";
|
|
17
|
+
return normalized;
|
|
18
|
+
};
|
|
19
|
+
const render = code => ({
|
|
20
|
+
value: escapeHtml(code)
|
|
21
|
+
});
|
|
22
|
+
const hljs = {
|
|
23
|
+
getLanguage(language) {
|
|
24
|
+
const normalized = normalizeLanguage(language);
|
|
25
|
+
return normalized && KNOWN_LANGUAGES.has(normalized) ? normalized : void 0;
|
|
26
|
+
},
|
|
27
|
+
highlight(code, _options) {
|
|
28
|
+
return render(code);
|
|
29
|
+
},
|
|
30
|
+
highlightAuto(code) {
|
|
31
|
+
return render(code);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
module.exports = hljs;
|