cosey 0.4.52 → 0.5.0
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/checkbox-group/checkbox-group.d.ts +2 -2
- package/components/field/components/checkbox-group/checkbox-group.vue.js +8 -3
- package/components/field/components/radio-group/radio-group.d.ts +2 -2
- package/components/field/components/radio-group/radio-group.vue.js +7 -2
- package/components/field/components/remote-select/remote-select.d.ts +16 -0
- package/components/field/components/remote-select/remote-select.js +1 -0
- package/components/field/components/remote-select/remote-select.vue.d.ts +3 -0
- package/components/field/components/remote-select/remote-select.vue.js +32 -0
- package/components/field/components/select/select.d.ts +6 -3
- package/components/field/components/select/select.js +1 -1
- package/components/field/components/select/select.vue.js +21 -9
- package/components/field/components/select-v2/select-v2.d.ts +1 -2
- package/components/field/components/select-v2/select-v2.js +2 -1
- package/components/field/components/select-v2/select-v2.vue.js +11 -5
- package/components/field/field.d.ts +3 -0
- package/components/field/field.js +44 -42
- package/components/form/form-item.vue.js +1 -1
- package/components/form-group/form-group.d.ts +2 -2
- package/components/form-group/form-group.vue.js +9 -13
- package/components/form-group/style/index.js +2 -3
- package/components/form-query/form-query.vue.d.ts +2 -2
- package/components/form-query/form-query.vue.js +42 -41
- package/components/form-query/index.d.ts +6 -6
- package/components/form-query/style/index.js +4 -1
- package/components/image-card/image-card.vue.js +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +2 -0
- package/components/remote-select/index.d.ts +1149 -0
- package/components/remote-select/index.js +8 -0
- package/components/remote-select/remote-select.d.ts +263 -0
- package/components/remote-select/remote-select.js +37 -0
- package/components/remote-select/remote-select.vue.d.ts +530 -0
- package/components/remote-select/remote-select.vue.js +187 -0
- package/components/remote-select/style/index.d.ts +4 -0
- package/components/remote-select/style/index.js +33 -0
- package/components/table/table-query/table-query.vue.d.ts +3 -3
- package/components/table/table.vue.js +5 -5
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/useProps.d.ts +24 -0
- package/hooks/useProps.js +29 -0
- package/package.json +1 -1
- package/utils/components.d.ts +29 -0
- package/utils/components.js +13 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/components/table/utils.d.ts +0 -6
- package/components/table/utils.js +0 -7
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { defineComponent, useSlots, computed, ref, Fragment, provide, createBlock, openBlock, unref, mergeProps, withCtx,
|
|
1
|
+
import { defineComponent, useSlots, computed, ref, Fragment, provide, createBlock, openBlock, unref, mergeProps, withCtx, createElementBlock, resolveDynamicComponent, renderSlot, cloneVNode, isVNode, createVNode } from 'vue';
|
|
2
2
|
import { formQueryProps, defaultMapSizeColNumber, formQueryContextSymbol } from './form-query.js';
|
|
3
3
|
import { ElForm, ElButton } from 'element-plus';
|
|
4
4
|
import { FormItem as _FormItem } from '../form/index.js';
|
|
5
5
|
import { Row as _Row } from '../row/index.js';
|
|
6
6
|
import { Toggle as _Toggle } from '../toggle/index.js';
|
|
7
7
|
import stdin_default$1 from './style/index.js';
|
|
8
|
+
import { Search } from '@element-plus/icons-vue';
|
|
8
9
|
import { useFormTemplate } from '../form/useFormTemplate.js';
|
|
9
10
|
import { useComponentConfig } from '../config-provider/config-provider.js';
|
|
10
11
|
import { useLocale } from '../../hooks/useLocale.js';
|
|
11
12
|
import { useTwoWayBinding } from '../../hooks/useTwoWayBinding.js';
|
|
12
13
|
import { defineTemplate } from '../../utils/vue.js';
|
|
13
14
|
|
|
15
|
+
function _isSlot(s) {
|
|
16
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
17
|
+
}
|
|
14
18
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
15
19
|
...{
|
|
16
20
|
name: "FormQuery"
|
|
@@ -90,6 +94,37 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
90
94
|
}) : item;
|
|
91
95
|
});
|
|
92
96
|
});
|
|
97
|
+
const buttonsTemplate = defineTemplate(() => {
|
|
98
|
+
let _slot, _slot2;
|
|
99
|
+
return createVNode(_FormItem, {
|
|
100
|
+
"class": `${prefixCls.value}-form-item-buttons`,
|
|
101
|
+
"width": props.inline ? "auto" : void 0
|
|
102
|
+
}, {
|
|
103
|
+
default: () => [createVNode("div", {
|
|
104
|
+
"class": [`${prefixCls.value}-buttons`, {
|
|
105
|
+
"is-inline": props.inline
|
|
106
|
+
}]
|
|
107
|
+
}, [slots.button ? slots.button({
|
|
108
|
+
reset,
|
|
109
|
+
submit,
|
|
110
|
+
submitting: submitting.value
|
|
111
|
+
}) : createVNode(Fragment, null, [!props.hideSubmit && createVNode(ElButton, {
|
|
112
|
+
"onClick": () => submit(),
|
|
113
|
+
"type": "primary",
|
|
114
|
+
"loading": submitting.value,
|
|
115
|
+
"icon": Search
|
|
116
|
+
}, _isSlot(_slot = t("co.form.search")) ? _slot : {
|
|
117
|
+
default: () => [_slot]
|
|
118
|
+
}), !props.hideReset && createVNode(ElButton, {
|
|
119
|
+
"onClick": () => reset()
|
|
120
|
+
}, _isSlot(_slot2 = t("co.form.reset")) ? _slot2 : {
|
|
121
|
+
default: () => [_slot2]
|
|
122
|
+
})]), props.grid && showToggle.value && createVNode(_Toggle, {
|
|
123
|
+
"modelValue": innerCollapsed.value,
|
|
124
|
+
"onUpdate:modelValue": $event => innerCollapsed.value = $event
|
|
125
|
+
}, null)])]
|
|
126
|
+
});
|
|
127
|
+
});
|
|
93
128
|
__expose(expose);
|
|
94
129
|
return (_ctx, _cache) => {
|
|
95
130
|
return openBlock(), createBlock(unref(ElForm), mergeProps({
|
|
@@ -102,48 +137,14 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
102
137
|
}, mergedRowProps.value, {
|
|
103
138
|
onSizeChange: handleSizeChange
|
|
104
139
|
}), {
|
|
105
|
-
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(template)))),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
109
|
-
class: normalizeClass(`${unref(prefixCls)}-buttons`)
|
|
110
|
-
}, [renderSlot(_ctx.$slots, "button", {
|
|
111
|
-
reset: unref(reset),
|
|
112
|
-
submit: unref(submit),
|
|
113
|
-
submitting: unref(submitting)
|
|
114
|
-
}, () => [!_ctx.hideSubmit ? (openBlock(), createBlock(unref(ElButton), {
|
|
115
|
-
key: 0,
|
|
116
|
-
onClick: _cache[0] || (_cache[0] = () => unref(submit)()),
|
|
117
|
-
type: "primary",
|
|
118
|
-
loading: unref(submitting)
|
|
119
|
-
}, {
|
|
120
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.form.search")), 1
|
|
121
|
-
/* TEXT */)]),
|
|
122
|
-
_: 1
|
|
123
|
-
/* STABLE */
|
|
124
|
-
}, 8, ["loading"])) : createCommentVNode("v-if", true), !_ctx.hideReset ? (openBlock(), createBlock(unref(ElButton), {
|
|
125
|
-
key: 1,
|
|
126
|
-
onClick: unref(reset)
|
|
127
|
-
}, {
|
|
128
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.form.reset")), 1
|
|
129
|
-
/* TEXT */)]),
|
|
130
|
-
_: 1
|
|
131
|
-
/* STABLE */
|
|
132
|
-
}, 8, ["onClick"])) : createCommentVNode("v-if", true)]), showToggle.value ? (openBlock(), createBlock(unref(_Toggle), {
|
|
133
|
-
key: 0,
|
|
134
|
-
modelValue: unref(innerCollapsed),
|
|
135
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => isRef(innerCollapsed) ? innerCollapsed.value = $event : null)
|
|
136
|
-
}, null, 8, ["modelValue"])) : createCommentVNode("v-if", true)], 2
|
|
137
|
-
/* CLASS */)]),
|
|
138
|
-
_: 3
|
|
139
|
-
/* FORWARDED */
|
|
140
|
-
}, 8, ["class"])]),
|
|
141
|
-
_: 3
|
|
142
|
-
/* FORWARDED */
|
|
140
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(template)))), (openBlock(), createBlock(resolveDynamicComponent(unref(buttonsTemplate))))]),
|
|
141
|
+
_: 1
|
|
142
|
+
/* STABLE */
|
|
143
143
|
}, 16
|
|
144
|
-
/* FULL_PROPS */)) :
|
|
144
|
+
/* FULL_PROPS */)) : (openBlock(), createElementBlock(Fragment, {
|
|
145
145
|
key: 1
|
|
146
|
-
})
|
|
146
|
+
}, [renderSlot(_ctx.$slots, "default"), (openBlock(), createBlock(resolveDynamicComponent(unref(buttonsTemplate))))], 64
|
|
147
|
+
/* STABLE_FRAGMENT */))]),
|
|
147
148
|
_: 3
|
|
148
149
|
/* FORWARDED */
|
|
149
150
|
}, 16, ["class"]);
|
|
@@ -160,6 +160,8 @@ declare const _FormQuery: {
|
|
|
160
160
|
inlineMessage: boolean;
|
|
161
161
|
showMessage: boolean;
|
|
162
162
|
colProps: import("..").ColProps;
|
|
163
|
+
minFields: number;
|
|
164
|
+
collapsed: boolean;
|
|
163
165
|
submitText: string;
|
|
164
166
|
resetText: string;
|
|
165
167
|
hideSubmit: boolean;
|
|
@@ -171,8 +173,6 @@ declare const _FormQuery: {
|
|
|
171
173
|
hideRequiredAsterisk: boolean;
|
|
172
174
|
scrollToError: boolean;
|
|
173
175
|
scrollIntoViewOptions: boolean | Record<string, any>;
|
|
174
|
-
minFields: number;
|
|
175
|
-
collapsed: boolean;
|
|
176
176
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
177
177
|
P: {};
|
|
178
178
|
B: {};
|
|
@@ -337,6 +337,8 @@ declare const _FormQuery: {
|
|
|
337
337
|
inlineMessage: boolean;
|
|
338
338
|
showMessage: boolean;
|
|
339
339
|
colProps: import("..").ColProps;
|
|
340
|
+
minFields: number;
|
|
341
|
+
collapsed: boolean;
|
|
340
342
|
submitText: string;
|
|
341
343
|
resetText: string;
|
|
342
344
|
hideSubmit: boolean;
|
|
@@ -348,8 +350,6 @@ declare const _FormQuery: {
|
|
|
348
350
|
hideRequiredAsterisk: boolean;
|
|
349
351
|
scrollToError: boolean;
|
|
350
352
|
scrollIntoViewOptions: boolean | Record<string, any>;
|
|
351
|
-
minFields: number;
|
|
352
|
-
collapsed: boolean;
|
|
353
353
|
}>;
|
|
354
354
|
__isFragment?: never;
|
|
355
355
|
__isTeleport?: never;
|
|
@@ -514,6 +514,8 @@ declare const _FormQuery: {
|
|
|
514
514
|
inlineMessage: boolean;
|
|
515
515
|
showMessage: boolean;
|
|
516
516
|
colProps: import("..").ColProps;
|
|
517
|
+
minFields: number;
|
|
518
|
+
collapsed: boolean;
|
|
517
519
|
submitText: string;
|
|
518
520
|
resetText: string;
|
|
519
521
|
hideSubmit: boolean;
|
|
@@ -525,8 +527,6 @@ declare const _FormQuery: {
|
|
|
525
527
|
hideRequiredAsterisk: boolean;
|
|
526
528
|
scrollToError: boolean;
|
|
527
529
|
scrollIntoViewOptions: boolean | Record<string, any>;
|
|
528
|
-
minFields: number;
|
|
529
|
-
collapsed: boolean;
|
|
530
530
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
531
531
|
$slots: import("./form-query").FormQuerySlots;
|
|
532
532
|
}) & import("vue").Plugin;
|
|
@@ -2,8 +2,8 @@ import { defineComponent, useSlots, ref, computed, mergeProps, createBlock, open
|
|
|
2
2
|
import { imageProps } from './image-card.js';
|
|
3
3
|
import { useLockscreen, ElImage } from 'element-plus';
|
|
4
4
|
import stdin_default$1 from './style/index.js';
|
|
5
|
-
import { defineTemplate } from '../../utils/vue.js';
|
|
6
5
|
import { useComponentConfig } from '../config-provider/config-provider.js';
|
|
6
|
+
import { defineTemplate } from '../../utils/vue.js';
|
|
7
7
|
|
|
8
8
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
9
9
|
...{
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -32,6 +32,7 @@ export { NumberFormat } from './number-format/index.js';
|
|
|
32
32
|
export { OnlyChild } from './only-child/index.js';
|
|
33
33
|
export { OptionalWrapper } from './optional-wrapper/index.js';
|
|
34
34
|
export { Panel } from './panel/index.js';
|
|
35
|
+
export { RemoteSelect } from './remote-select/index.js';
|
|
35
36
|
export { Row } from './row/index.js';
|
|
36
37
|
export { ScrollView } from './scroll-view/index.js';
|
|
37
38
|
export { SnugMenu, SnugMenuItem } from './snug-menu/index.js';
|
|
@@ -78,6 +79,7 @@ export { defaultLongTextProps } from './long-text/long-text.js';
|
|
|
78
79
|
export { defaultMediaCardBaseProps, mediaCardBaseProps } from './media-card/media-card.js';
|
|
79
80
|
export { defaultMediaViewerBaseProps, defaultMediaViewerProps } from './media-viewer/media-viewer.js';
|
|
80
81
|
export { defaultNumberFormatProps } from './number-format/number-format.js';
|
|
82
|
+
export { remoteSelectEmits, remoteSelectProps, remoteSelectSlots } from './remote-select/remote-select.js';
|
|
81
83
|
export { defaultBreakpoints, defaultRowProps, generateAlgorithms, rowColumns, rowContextSymbol, rowSizes } from './row/row.js';
|
|
82
84
|
export { snugMenuContextSymbol } from './snug-menu/snug-menu.js';
|
|
83
85
|
export { createStackDialogInfo, stackDialogProps, useStackDialog, useStackDialogProvide } from './stack-dialog/stack-dialog.js';
|