cosey 0.7.17 → 0.8.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/components/components.d.ts +3 -1
- package/components/components.js +1 -0
- package/components/field/components/date/date.d.ts +1 -0
- package/components/field/components/week/week.vue.js +1 -1
- package/components/field/components/week-range/week-range.d.ts +5 -0
- package/components/field/components/week-range/week-range.js +1 -0
- package/components/field/components/week-range/week-range.vue.d.ts +4 -0
- package/components/field/components/week-range/week-range.vue.js +34 -0
- package/components/field/field.api.d.ts +3 -0
- package/components/field/field.api.js +72 -70
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/week-range-picker/index.d.ts +865 -0
- package/components/week-range-picker/index.js +7 -0
- package/components/week-range-picker/panel-week-range.api.d.ts +32 -0
- package/components/week-range-picker/panel-week-range.api.js +15 -0
- package/components/week-range-picker/panel-week-range.d.ts +25 -0
- package/components/week-range-picker/panel-week-range.js +204 -0
- package/components/week-range-picker/panel-week-range.style.d.ts +4 -0
- package/components/week-range-picker/panel-week-range.style.js +94 -0
- package/components/week-range-picker/week-range-picker.api.d.ts +269 -0
- package/components/week-range-picker/week-range-picker.api.js +16 -0
- package/components/week-range-picker/week-range-picker.d.ts +540 -0
- package/components/week-range-picker/week-range-picker.js +44 -0
- package/components/week-range-picker/week-range-picker.style.d.ts +4 -0
- package/components/week-range-picker/week-range-picker.style.js +12 -0
- package/locale/lang/ar.d.ts +1 -0
- package/locale/lang/ar.js +1 -0
- package/locale/lang/en.d.ts +1 -0
- package/locale/lang/en.js +2 -1
- package/locale/lang/zh-cn.d.ts +1 -0
- package/locale/lang/zh-cn.js +2 -1
- package/package.json +1 -1
|
@@ -49,6 +49,7 @@ import { TransitionGroup } from './transition-group';
|
|
|
49
49
|
import { Upload } from './upload';
|
|
50
50
|
import { VideoCard } from './video-card';
|
|
51
51
|
import { VideoViewer } from './video-viewer';
|
|
52
|
+
import { WeekRangePicker } from './week-range-picker';
|
|
52
53
|
declare module 'vue' {
|
|
53
54
|
interface GlobalComponents {
|
|
54
55
|
CoAudioCard: typeof AudioCard;
|
|
@@ -107,6 +108,7 @@ declare module 'vue' {
|
|
|
107
108
|
CoUpload: typeof Upload;
|
|
108
109
|
CoVideoCard: typeof VideoCard;
|
|
109
110
|
CoVideoViewer: typeof VideoViewer;
|
|
111
|
+
CoWeekRangePicker: typeof WeekRangePicker;
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
|
-
export { AudioCard, AudioViewer, Card, Close, Col, ConfigProvider, Container, ContextMenu, ContextMenuItem, ContextSubMenu, Copy, DndSort, DndSortItem, Editor, Field, FileCard, Form, FormDialog, FormDrawer, FormGroup, FormItem, FormList, FormQuery, Highlight, HorizontalTree, Icon, IconifyIcon, ImageCard, InputNumberRange, LongText, Mask, MediaCard, MediaCardGroup, MediaViewer, NumberFormat, OnlyChild, OptionalWrapper, Panel, RemoteSelect, Ribbon, Row, ScrollView, SnugMenu, SnugMenuItem, StackDialog, SvgIcon, SvgaCard, SvgaViewer, Table, TableAction, Toggle, Transition, TransitionGroup, Upload, VideoCard, VideoViewer, };
|
|
114
|
+
export { AudioCard, AudioViewer, Card, Close, Col, ConfigProvider, Container, ContextMenu, ContextMenuItem, ContextSubMenu, Copy, DndSort, DndSortItem, Editor, Field, FileCard, Form, FormDialog, FormDrawer, FormGroup, FormItem, FormList, FormQuery, Highlight, HorizontalTree, Icon, IconifyIcon, ImageCard, InputNumberRange, LongText, Mask, MediaCard, MediaCardGroup, MediaViewer, NumberFormat, OnlyChild, OptionalWrapper, Panel, RemoteSelect, Ribbon, Row, ScrollView, SnugMenu, SnugMenuItem, StackDialog, SvgIcon, SvgaCard, SvgaViewer, Table, TableAction, Toggle, Transition, TransitionGroup, Upload, VideoCard, VideoViewer, WeekRangePicker, };
|
package/components/components.js
CHANGED
|
@@ -49,3 +49,4 @@ export { TransitionGroup } from './transition-group/index.js';
|
|
|
49
49
|
export { Upload } from './upload/index.js';
|
|
50
50
|
export { VideoCard } from './video-card/index.js';
|
|
51
51
|
export { VideoViewer } from './video-viewer/index.js';
|
|
52
|
+
export { WeekRangePicker } from './week-range-picker/index.js';
|
|
@@ -14,6 +14,7 @@ export interface MapDateModeValueType {
|
|
|
14
14
|
datetime: DateBaseValue;
|
|
15
15
|
datetimerange: [DateBaseValue, DateBaseValue];
|
|
16
16
|
week: DateBaseValue;
|
|
17
|
+
weekrange: Date[];
|
|
17
18
|
}
|
|
18
19
|
export type FieldDateMode = keyof MapDateModeValueType;
|
|
19
20
|
export interface FieldDateProps<T extends FieldDateMode = 'date'> extends FieldComponentCommonProps {
|
|
@@ -15,7 +15,7 @@ var stdin_default = defineComponent((props, {
|
|
|
15
15
|
return () => {
|
|
16
16
|
if (props.readonly) {
|
|
17
17
|
const value = props.componentProps?.modelValue;
|
|
18
|
-
return addNullablePlaceholder(value, val => dayjs(val).format(t("co.
|
|
18
|
+
return addNullablePlaceholder(value, val => dayjs(val).format(t("co.form.weekOfYear")));
|
|
19
19
|
}
|
|
20
20
|
return h(ElDatePicker, mergeProps({
|
|
21
21
|
placeholder: t("co.common.pleaseSelect"),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type FieldDateSlots, type FieldDateEmits, type FieldDateExpose, type FieldDateProps } from '../date/date';
|
|
2
|
+
export type FieldWeekRangeProps = FieldDateProps<'weekrange'>;
|
|
3
|
+
export type FieldWeekRangeSlots = FieldDateSlots;
|
|
4
|
+
export type FieldWeekRangeEmits = FieldDateEmits<'weekrange'>;
|
|
5
|
+
export type FieldWeekRangeExpose = FieldDateExpose;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SlotsType } from 'vue';
|
|
2
|
+
import { type FieldWeekRangeProps } from './week-range';
|
|
3
|
+
declare const _default: import("vue").DefineSetupFnComponent<FieldWeekRangeProps, {}, SlotsType<import("../date/date").FieldDateSlots>, FieldWeekRangeProps & {}, import("vue").PublicProps>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, h, mergeProps } from 'vue';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { WeekRangePicker as _WeekRangePicker } from '../../../week-range-picker/index.js';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
5
|
+
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
6
|
+
|
|
7
|
+
var stdin_default = defineComponent((props, {
|
|
8
|
+
slots
|
|
9
|
+
}) => {
|
|
10
|
+
const {
|
|
11
|
+
t
|
|
12
|
+
} = useLocale();
|
|
13
|
+
return () => {
|
|
14
|
+
if (props.readonly) {
|
|
15
|
+
const value = props.componentProps?.modelValue;
|
|
16
|
+
return addNullablePlaceholder(value, val => val.map(item => dayjs(item).format(t("co.form.weekOfYear"))).join(" - "));
|
|
17
|
+
}
|
|
18
|
+
return h(_WeekRangePicker, mergeProps({
|
|
19
|
+
startPlaceholder: t("co.common.pleaseSelect"),
|
|
20
|
+
endPlaceholder: t("co.common.pleaseSelect"),
|
|
21
|
+
style: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
width: "100%"
|
|
24
|
+
}
|
|
25
|
+
}, props.componentProps ?? {}), slots);
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
name: "CoFieldWeekRange",
|
|
29
|
+
inheritAttrs: false,
|
|
30
|
+
props: ["componentProps", "componentSlots", "readonly"],
|
|
31
|
+
slots: {}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { stdin_default as default };
|
|
@@ -34,6 +34,7 @@ import { type FieldTransferProps } from './components/transfer/transfer';
|
|
|
34
34
|
import { type FieldTreeSelectProps } from './components/tree-select/tree-select';
|
|
35
35
|
import { type FieldUploadProps } from './components/upload/upload';
|
|
36
36
|
import { type FieldWeekProps } from './components/week/week';
|
|
37
|
+
import { type FieldWeekRangeProps } from './components/week-range/week-range';
|
|
37
38
|
import { type FieldYearProps } from './components/year/year';
|
|
38
39
|
import { type FieldYearRangeProps } from './components/year-range/year-range';
|
|
39
40
|
import { type FieldYearsProps } from './components/years/years';
|
|
@@ -73,6 +74,7 @@ export interface MapFieldTypeComponentProps {
|
|
|
73
74
|
treeselect: FieldTreeSelectProps;
|
|
74
75
|
upload: FieldUploadProps;
|
|
75
76
|
week: FieldWeekProps;
|
|
77
|
+
weekrange: FieldWeekRangeProps;
|
|
76
78
|
year: FieldYearProps;
|
|
77
79
|
yearrange: FieldYearRangeProps;
|
|
78
80
|
years: FieldYearsProps;
|
|
@@ -170,6 +172,7 @@ export declare const mapFieldTypeComponent: {
|
|
|
170
172
|
treeselect: import("vue").DefineSetupFnComponent<FieldTreeSelectProps, {}, import("vue").SlotsType<import("./components/select/select").FieldSelectSlots>, FieldTreeSelectProps & {}, import("vue").PublicProps>;
|
|
171
173
|
upload: import("vue").DefineSetupFnComponent<FieldUploadProps, {}, import("vue").SlotsType<import("./components/upload/upload").FieldUploadSlots>, FieldUploadProps & {}, import("vue").PublicProps>;
|
|
172
174
|
week: import("vue").DefineSetupFnComponent<FieldWeekProps, {}, import("vue").SlotsType<import("./components/date/date").FieldDateSlots>, FieldWeekProps & {}, import("vue").PublicProps>;
|
|
175
|
+
weekrange: import("vue").DefineSetupFnComponent<FieldWeekRangeProps, {}, import("vue").SlotsType<import("./components/date/date").FieldDateSlots>, FieldWeekRangeProps & {}, import("vue").PublicProps>;
|
|
173
176
|
year: import("vue").DefineSetupFnComponent<FieldYearProps, {}, import("vue").SlotsType<import("./components/date/date").FieldDateSlots>, FieldYearProps & {}, import("vue").PublicProps>;
|
|
174
177
|
yearrange: import("vue").DefineSetupFnComponent<FieldYearRangeProps, {}, import("vue").SlotsType<import("./components/date/date").FieldDateSlots>, FieldYearRangeProps & {}, import("vue").PublicProps>;
|
|
175
178
|
years: import("vue").DefineSetupFnComponent<FieldYearsProps, {}, import("vue").SlotsType<import("./components/date/date").FieldDateSlots>, FieldYearsProps & {}, import("vue").PublicProps>;
|
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
import stdin_default$
|
|
2
|
-
import stdin_default$
|
|
3
|
-
import stdin_default$
|
|
4
|
-
import stdin_default$
|
|
5
|
-
import stdin_default$
|
|
6
|
-
import stdin_default$
|
|
7
|
-
import stdin_default$
|
|
8
|
-
import stdin_default$
|
|
9
|
-
import stdin_default$
|
|
10
|
-
import stdin_default$
|
|
11
|
-
import stdin_default$
|
|
12
|
-
import stdin_default$
|
|
13
|
-
import stdin_default$
|
|
14
|
-
import stdin_default$
|
|
15
|
-
import stdin_default$
|
|
16
|
-
import stdin_default$
|
|
17
|
-
import stdin_default$
|
|
18
|
-
import stdin_default$
|
|
19
|
-
import stdin_default$
|
|
20
|
-
import stdin_default$
|
|
21
|
-
import stdin_default$
|
|
22
|
-
import stdin_default$
|
|
23
|
-
import stdin_default$
|
|
24
|
-
import stdin_default$
|
|
25
|
-
import stdin_default$
|
|
26
|
-
import stdin_default$
|
|
27
|
-
import stdin_default$
|
|
28
|
-
import stdin_default$
|
|
29
|
-
import stdin_default$
|
|
30
|
-
import stdin_default$
|
|
31
|
-
import stdin_default$
|
|
32
|
-
import stdin_default$
|
|
33
|
-
import stdin_default$
|
|
34
|
-
import stdin_default$
|
|
35
|
-
import stdin_default$
|
|
1
|
+
import stdin_default$C from './components/autocomplete/autocomplete.vue.js';
|
|
2
|
+
import stdin_default$B from './components/cascader/cascader.vue.js';
|
|
3
|
+
import stdin_default$A from './components/checkbox/checkbox.vue.js';
|
|
4
|
+
import stdin_default$z from './components/checkbox-group/checkbox-group.vue.js';
|
|
5
|
+
import stdin_default$y from './components/color/color.vue.js';
|
|
6
|
+
import stdin_default$x from './components/date/date.vue.js';
|
|
7
|
+
import stdin_default$w from './components/date-range/date-range.vue.js';
|
|
8
|
+
import stdin_default$u from './components/date-time/date-time.vue.js';
|
|
9
|
+
import stdin_default$t from './components/date-time-range/date-time-range.vue.js';
|
|
10
|
+
import stdin_default$v from './components/dates/dates.vue.js';
|
|
11
|
+
import stdin_default$s from './components/input/input.vue.js';
|
|
12
|
+
import stdin_default$r from './components/input-tag/input-tag.vue.js';
|
|
13
|
+
import stdin_default$q from './components/mention/mention.vue.js';
|
|
14
|
+
import stdin_default$p from './components/month/month.vue.js';
|
|
15
|
+
import stdin_default$o from './components/month-range/month-range.vue.js';
|
|
16
|
+
import stdin_default$n from './components/months/months.vue.js';
|
|
17
|
+
import stdin_default$m from './components/number/number.vue.js';
|
|
18
|
+
import stdin_default$l from './components/number-range/number-range.vue.js';
|
|
19
|
+
import stdin_default$k from './components/password/password.vue.js';
|
|
20
|
+
import stdin_default$j from './components/radio-group/radio-group.vue.js';
|
|
21
|
+
import stdin_default$i from './components/rate/rate.vue.js';
|
|
22
|
+
import stdin_default$h from './components/remote-select/remote-select.js';
|
|
23
|
+
import stdin_default$g from './components/segmented/segmented.vue.js';
|
|
24
|
+
import stdin_default$f from './components/select/select.vue.js';
|
|
25
|
+
import stdin_default$e from './components/select-v2/select-v2.vue.js';
|
|
26
|
+
import stdin_default$d from './components/slider/slider.vue.js';
|
|
27
|
+
import stdin_default$c from './components/switch/switch.vue.js';
|
|
28
|
+
import stdin_default$b from './components/textarea/textarea.vue.js';
|
|
29
|
+
import stdin_default$a from './components/time/time.vue.js';
|
|
30
|
+
import stdin_default$9 from './components/time-range/time-range.vue.js';
|
|
31
|
+
import stdin_default$8 from './components/time-select/time-select.vue.js';
|
|
32
|
+
import stdin_default$7 from './components/transfer/transfer.vue.js';
|
|
33
|
+
import stdin_default$6 from './components/tree-select/tree-select.vue.js';
|
|
34
|
+
import stdin_default$5 from './components/upload/upload.vue.js';
|
|
35
|
+
import stdin_default$4 from './components/week/week.vue.js';
|
|
36
|
+
import stdin_default$3 from './components/week-range/week-range.vue.js';
|
|
36
37
|
import stdin_default$2 from './components/year/year.vue.js';
|
|
37
38
|
import stdin_default$1 from './components/year-range/year-range.vue.js';
|
|
38
39
|
import stdin_default from './components/years/years.vue.js';
|
|
39
40
|
export { fieldComponentCommonProps } from './components/common.js';
|
|
40
41
|
|
|
41
42
|
const mapFieldTypeComponent = {
|
|
42
|
-
autocomplete: stdin_default$
|
|
43
|
-
cascader: stdin_default$
|
|
44
|
-
checkbox: stdin_default$
|
|
45
|
-
checkboxgroup: stdin_default$
|
|
46
|
-
color: stdin_default$
|
|
47
|
-
date: stdin_default$
|
|
48
|
-
daterange: stdin_default$
|
|
49
|
-
dates: stdin_default$
|
|
50
|
-
datetime: stdin_default$
|
|
51
|
-
datetimerange: stdin_default$
|
|
52
|
-
input: stdin_default$
|
|
53
|
-
inputtag: stdin_default$
|
|
54
|
-
mention: stdin_default$
|
|
55
|
-
month: stdin_default$
|
|
56
|
-
monthrange: stdin_default$
|
|
57
|
-
months: stdin_default$
|
|
58
|
-
number: stdin_default$
|
|
59
|
-
numberrange: stdin_default$
|
|
60
|
-
password: stdin_default$
|
|
61
|
-
radiogroup: stdin_default$
|
|
62
|
-
rate: stdin_default$
|
|
63
|
-
remoteselect: stdin_default$
|
|
64
|
-
segmented: stdin_default$
|
|
65
|
-
select: stdin_default$
|
|
66
|
-
selectv2: stdin_default$
|
|
67
|
-
slider: stdin_default$
|
|
68
|
-
switch: stdin_default$
|
|
69
|
-
textarea: stdin_default$
|
|
70
|
-
time: stdin_default$
|
|
71
|
-
timerange: stdin_default$
|
|
72
|
-
timeselect: stdin_default$
|
|
73
|
-
transfer: stdin_default$
|
|
74
|
-
treeselect: stdin_default$
|
|
75
|
-
upload: stdin_default$
|
|
76
|
-
week: stdin_default$
|
|
43
|
+
autocomplete: stdin_default$C,
|
|
44
|
+
cascader: stdin_default$B,
|
|
45
|
+
checkbox: stdin_default$A,
|
|
46
|
+
checkboxgroup: stdin_default$z,
|
|
47
|
+
color: stdin_default$y,
|
|
48
|
+
date: stdin_default$x,
|
|
49
|
+
daterange: stdin_default$w,
|
|
50
|
+
dates: stdin_default$v,
|
|
51
|
+
datetime: stdin_default$u,
|
|
52
|
+
datetimerange: stdin_default$t,
|
|
53
|
+
input: stdin_default$s,
|
|
54
|
+
inputtag: stdin_default$r,
|
|
55
|
+
mention: stdin_default$q,
|
|
56
|
+
month: stdin_default$p,
|
|
57
|
+
monthrange: stdin_default$o,
|
|
58
|
+
months: stdin_default$n,
|
|
59
|
+
number: stdin_default$m,
|
|
60
|
+
numberrange: stdin_default$l,
|
|
61
|
+
password: stdin_default$k,
|
|
62
|
+
radiogroup: stdin_default$j,
|
|
63
|
+
rate: stdin_default$i,
|
|
64
|
+
remoteselect: stdin_default$h,
|
|
65
|
+
segmented: stdin_default$g,
|
|
66
|
+
select: stdin_default$f,
|
|
67
|
+
selectv2: stdin_default$e,
|
|
68
|
+
slider: stdin_default$d,
|
|
69
|
+
switch: stdin_default$c,
|
|
70
|
+
textarea: stdin_default$b,
|
|
71
|
+
time: stdin_default$a,
|
|
72
|
+
timerange: stdin_default$9,
|
|
73
|
+
timeselect: stdin_default$8,
|
|
74
|
+
transfer: stdin_default$7,
|
|
75
|
+
treeselect: stdin_default$6,
|
|
76
|
+
upload: stdin_default$5,
|
|
77
|
+
week: stdin_default$4,
|
|
78
|
+
weekrange: stdin_default$3,
|
|
77
79
|
year: stdin_default$2,
|
|
78
80
|
yearrange: stdin_default$1,
|
|
79
81
|
years: stdin_default,
|
package/components/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export * from './transition-group';
|
|
|
50
50
|
export * from './upload';
|
|
51
51
|
export * from './video-card';
|
|
52
52
|
export * from './video-viewer';
|
|
53
|
+
export * from './week-range-picker';
|
|
53
54
|
import { type App } from 'vue';
|
|
54
55
|
import * as components from './components';
|
|
55
56
|
declare const installer: {
|
package/components/index.js
CHANGED
|
@@ -47,6 +47,7 @@ export { TransitionGroup } from './transition-group/index.js';
|
|
|
47
47
|
export { Upload } from './upload/index.js';
|
|
48
48
|
export { VideoCard } from './video-card/index.js';
|
|
49
49
|
export { VideoViewer } from './video-viewer/index.js';
|
|
50
|
+
export { WeekRangePicker } from './week-range-picker/index.js';
|
|
50
51
|
import * as components from './components.js';
|
|
51
52
|
export { audioCardEmits, audioCardProps } from './audio-card/audio-card.api.js';
|
|
52
53
|
export { cardEmits, cardProps, cardSlots } from './card/card.api.js';
|