giime 0.3.14 → 0.3.15
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/index.css +11 -11
- package/es/components/src/base/select/Select.vue.d.ts +1 -0
- package/es/components/src/base/select/Select.vue2.mjs +8 -1
- package/es/components/src/base/select/Select.vue2.mjs.map +1 -1
- package/es/components/src/base/select/index.d.ts +1 -0
- package/es/components/src/composite/selectOptions/SelectOptions.vue.d.ts +15 -2
- package/es/components/src/composite/selectOptions/SelectOptions.vue2.mjs +58 -7
- package/es/components/src/composite/selectOptions/SelectOptions.vue2.mjs.map +1 -1
- package/es/components/src/composite/selectOptions/index.d.ts +415 -105
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/index.css +11 -11
- package/lib/components/src/base/select/Select.vue.d.ts +1 -0
- package/lib/components/src/base/select/Select.vue2.js +7 -0
- package/lib/components/src/base/select/Select.vue2.js.map +1 -1
- package/lib/components/src/base/select/index.d.ts +1 -0
- package/lib/components/src/composite/selectOptions/SelectOptions.vue.d.ts +15 -2
- package/lib/components/src/composite/selectOptions/SelectOptions.vue2.js +57 -6
- package/lib/components/src/composite/selectOptions/SelectOptions.vue2.js.map +1 -1
- package/lib/components/src/composite/selectOptions/index.d.ts +415 -105
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/index.css +11 -11
- package/package.json +1 -1
|
@@ -86,6 +86,13 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
86
|
vue.renderSlot(_ctx.$slots, "loading")
|
|
87
87
|
]),
|
|
88
88
|
key: "6"
|
|
89
|
+
} : void 0,
|
|
90
|
+
vue.unref(slots).label ? {
|
|
91
|
+
name: "label",
|
|
92
|
+
fn: vue.withCtx((slotValue) => [
|
|
93
|
+
vue.renderSlot(_ctx.$slots, "label", vue.normalizeProps(vue.guardReactiveProps(slotValue)))
|
|
94
|
+
]),
|
|
95
|
+
key: "7"
|
|
89
96
|
} : void 0
|
|
90
97
|
]),
|
|
91
98
|
1040
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.vue2.js","sources":["../../../../../../../packages/components/src/base/select/Select.vue"],"sourcesContent":["<template>\r\n <el-select ref=\"elRef\" v-bind=\"props\" v-on=\"elEvents\">\r\n <template v-if=\"slots.default\" #default>\r\n <slot name=\"default\" />\r\n </template>\r\n <template v-if=\"slots.header\" #header>\r\n <slot name=\"header\" />\r\n </template>\r\n <template v-if=\"slots.footer\" #footer>\r\n <slot name=\"footer\" />\r\n </template>\r\n <template v-if=\"slots.prefix\" #prefix>\r\n <slot name=\"prefix\" />\r\n </template>\r\n <template v-if=\"slots.empty\" #empty>\r\n <slot name=\"empty\" />\r\n </template>\r\n <template v-if=\"slots.tag\" #tag>\r\n <slot name=\"tag\" />\r\n </template>\r\n <template v-if=\"slots.loading\" #loading>\r\n <slot name=\"loading\" />\r\n </template>\r\n </el-select>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { ref, useSlots } from 'vue';\r\nimport { getGmEvent, getGmExports } from '@giime/utils';\r\nimport { elSelectEmits, selectEmits, selectProps } from './select';\r\n\r\ndefineOptions({\r\n name: 'GmSelect',\r\n});\r\nconst slots = useSlots();\r\nconst props = defineProps(selectProps);\r\nconst emit = defineEmits(selectEmits);\r\n// 重发el的事件\r\nconst elEvents = getGmEvent(elSelectEmits, emit);\r\n\r\nconst elRef = ref();\r\nconst exposeNames = ['focus', 'blur'] as const;\r\nconst { exposeFns } = getGmExports(elRef, exposeNames);\r\n\r\ndefineExpose({\r\n ...exposeFns,\r\n});\r\n</script>\r\n"],"names":["useSlots","getGmEvent","elSelectEmits","ref","getGmExports"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Select.vue2.js","sources":["../../../../../../../packages/components/src/base/select/Select.vue"],"sourcesContent":["<template>\r\n <el-select ref=\"elRef\" v-bind=\"props\" v-on=\"elEvents\">\r\n <template v-if=\"slots.default\" #default>\r\n <slot name=\"default\" />\r\n </template>\r\n <template v-if=\"slots.header\" #header>\r\n <slot name=\"header\" />\r\n </template>\r\n <template v-if=\"slots.footer\" #footer>\r\n <slot name=\"footer\" />\r\n </template>\r\n <template v-if=\"slots.prefix\" #prefix>\r\n <slot name=\"prefix\" />\r\n </template>\r\n <template v-if=\"slots.empty\" #empty>\r\n <slot name=\"empty\" />\r\n </template>\r\n <template v-if=\"slots.tag\" #tag>\r\n <slot name=\"tag\" />\r\n </template>\r\n <template v-if=\"slots.loading\" #loading>\r\n <slot name=\"loading\" />\r\n </template>\r\n <template v-if=\"slots.label\" #label=\"slotValue\">\r\n <slot name=\"label\" v-bind=\"slotValue\" />\r\n </template>\r\n </el-select>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { ref, useSlots } from 'vue';\r\nimport { getGmEvent, getGmExports } from '@giime/utils';\r\nimport { elSelectEmits, selectEmits, selectProps } from './select';\r\n\r\ndefineOptions({\r\n name: 'GmSelect',\r\n});\r\nconst slots = useSlots();\r\nconst props = defineProps(selectProps);\r\nconst emit = defineEmits(selectEmits);\r\n// 重发el的事件\r\nconst elEvents = getGmEvent(elSelectEmits, emit);\r\n\r\nconst elRef = ref();\r\nconst exposeNames = ['focus', 'blur'] as const;\r\nconst { exposeFns } = getGmExports(elRef, exposeNames);\r\n\r\ndefineExpose({\r\n ...exposeFns,\r\n});\r\n</script>\r\n"],"names":["useSlots","getGmEvent","elSelectEmits","ref","getGmExports"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAWC,gBAAW,CAAAC,oBAAA,EAAe,IAAI,CAAA,CAAA;AAE/C,IAAA,MAAM,QAAQC,OAAI,EAAA,CAAA;AAClB,IAAM,MAAA,WAAA,GAAc,CAAC,OAAA,EAAS,MAAM,CAAA,CAAA;AACpC,IAAA,MAAM,EAAE,SAAA,EAAc,GAAAC,sBAAA,CAAa,OAAO,WAAW,CAAA,CAAA;AAErD,IAAa,QAAA,CAAA;AAAA,MACX,GAAG,SAAA;AAAA,KACJ,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -468,6 +468,7 @@ export declare const GmSelect: import("../../../../utils").SFCWithInstall<{
|
|
|
468
468
|
empty?(_: {}): any;
|
|
469
469
|
tag?(_: {}): any;
|
|
470
470
|
loading?(_: {}): any;
|
|
471
|
+
label?(_: any): any;
|
|
471
472
|
};
|
|
472
473
|
})> & Record<string, any>;
|
|
473
474
|
export type SelectInstance = InstanceType<typeof Select>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
2
|
clearable: {
|
|
3
3
|
type: BooleanConstructor;
|
|
4
4
|
default: boolean;
|
|
@@ -237,5 +237,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
237
237
|
optionLabel: string;
|
|
238
238
|
optionValue: string;
|
|
239
239
|
labelKey: string | boolean;
|
|
240
|
-
}, {}
|
|
240
|
+
}, {}>, {
|
|
241
|
+
header?(_: {}): any;
|
|
242
|
+
footer?(_: {}): any;
|
|
243
|
+
prefix?(_: {}): any;
|
|
244
|
+
empty?(_: {}): any;
|
|
245
|
+
tag?(_: {}): any;
|
|
246
|
+
loading?(_: {}): any;
|
|
247
|
+
label?(_: any): any;
|
|
248
|
+
}>;
|
|
241
249
|
export default _default;
|
|
250
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
251
|
+
new (): {
|
|
252
|
+
$slots: S;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
@@ -19,6 +19,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
19
|
const props = __props;
|
|
20
20
|
const emit = __emit;
|
|
21
21
|
const events = event.getGmEvent(selectOptions.selectOptionsEmits, emit);
|
|
22
|
+
const slots = vue.useSlots();
|
|
22
23
|
const labelOptions = vue.computed(() => {
|
|
23
24
|
return props.options.map((it, i) => {
|
|
24
25
|
const res = {
|
|
@@ -41,7 +42,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
41
42
|
return vue.openBlock(), vue.createBlock(
|
|
42
43
|
_component_gm_select,
|
|
43
44
|
vue.mergeProps(props, vue.toHandlers(vue.unref(events))),
|
|
44
|
-
{
|
|
45
|
+
vue.createSlots({
|
|
45
46
|
default: vue.withCtx(() => [
|
|
46
47
|
(vue.openBlock(true), vue.createElementBlock(
|
|
47
48
|
vue.Fragment,
|
|
@@ -57,11 +58,61 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
58
|
/* KEYED_FRAGMENT */
|
|
58
59
|
))
|
|
59
60
|
]),
|
|
60
|
-
_:
|
|
61
|
-
/*
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
_: 2
|
|
62
|
+
/* DYNAMIC */
|
|
63
|
+
}, [
|
|
64
|
+
vue.unref(slots).header ? {
|
|
65
|
+
name: "header",
|
|
66
|
+
fn: vue.withCtx(() => [
|
|
67
|
+
vue.renderSlot(_ctx.$slots, "header")
|
|
68
|
+
]),
|
|
69
|
+
key: "0"
|
|
70
|
+
} : void 0,
|
|
71
|
+
vue.unref(slots).footer ? {
|
|
72
|
+
name: "footer",
|
|
73
|
+
fn: vue.withCtx(() => [
|
|
74
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
75
|
+
]),
|
|
76
|
+
key: "1"
|
|
77
|
+
} : void 0,
|
|
78
|
+
vue.unref(slots).prefix ? {
|
|
79
|
+
name: "prefix",
|
|
80
|
+
fn: vue.withCtx(() => [
|
|
81
|
+
vue.renderSlot(_ctx.$slots, "prefix")
|
|
82
|
+
]),
|
|
83
|
+
key: "2"
|
|
84
|
+
} : void 0,
|
|
85
|
+
vue.unref(slots).empty ? {
|
|
86
|
+
name: "empty",
|
|
87
|
+
fn: vue.withCtx(() => [
|
|
88
|
+
vue.renderSlot(_ctx.$slots, "empty")
|
|
89
|
+
]),
|
|
90
|
+
key: "3"
|
|
91
|
+
} : void 0,
|
|
92
|
+
vue.unref(slots).tag ? {
|
|
93
|
+
name: "tag",
|
|
94
|
+
fn: vue.withCtx(() => [
|
|
95
|
+
vue.renderSlot(_ctx.$slots, "tag")
|
|
96
|
+
]),
|
|
97
|
+
key: "4"
|
|
98
|
+
} : void 0,
|
|
99
|
+
vue.unref(slots).loading ? {
|
|
100
|
+
name: "loading",
|
|
101
|
+
fn: vue.withCtx(() => [
|
|
102
|
+
vue.renderSlot(_ctx.$slots, "loading")
|
|
103
|
+
]),
|
|
104
|
+
key: "5"
|
|
105
|
+
} : void 0,
|
|
106
|
+
vue.unref(slots).label ? {
|
|
107
|
+
name: "label",
|
|
108
|
+
fn: vue.withCtx((slotValue) => [
|
|
109
|
+
vue.renderSlot(_ctx.$slots, "label", vue.normalizeProps(vue.guardReactiveProps(slotValue)))
|
|
110
|
+
]),
|
|
111
|
+
key: "6"
|
|
112
|
+
} : void 0
|
|
113
|
+
]),
|
|
114
|
+
1040
|
|
115
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
65
116
|
);
|
|
66
117
|
};
|
|
67
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOptions.vue2.js","sources":["../../../../../../../packages/components/src/composite/selectOptions/SelectOptions.vue"],"sourcesContent":["<template>\r\n <gm-select v-bind=\"props\" v-on=\"events\">\r\n <gm-option v-for=\"(item, index) in labelOptions\" :key=\"index\" :label=\"item.label\" :value=\"item.value\" />\r\n </gm-select>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { computed } from 'vue';\r\nimport { getGmEvent } from '@giime/utils';\r\nimport { isString } from '@giime/utils/src/is';\r\nimport { selectOptionsEmits, selectOptionsProps } from './selectOptions';\r\ndefineOptions({\r\n name: 'GmSelectOptions',\r\n});\r\nconst props = defineProps(selectOptionsProps);\r\nconst emit = defineEmits(selectOptionsEmits);\r\nconst events = getGmEvent(selectOptionsEmits, emit);\r\n\r\nconst labelOptions = computed(() => {\r\n return props.options.map((it, i) => {\r\n const res = {\r\n label: it[props.optionLabel],\r\n value: it[props.optionValue],\r\n };\r\n if (props.labelKey === true) {\r\n res.label = `${it.id}. ${res.label}`;\r\n } else if (props.labelKey === 'index') {\r\n res.label = `${i + 1}. ${res.label}`;\r\n } else if (isString(props.labelKey) && Object.prototype.hasOwnProperty.call(it, props.labelKey)) {\r\n res.label = `${it[props.labelKey]}. ${res.label}`;\r\n }\r\n return res;\r\n });\r\n});\r\n</script>\r\n"],"names":["getGmEvent","selectOptionsEmits","computed","isString"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SelectOptions.vue2.js","sources":["../../../../../../../packages/components/src/composite/selectOptions/SelectOptions.vue"],"sourcesContent":["<template>\r\n <gm-select v-bind=\"props\" v-on=\"events\">\r\n <gm-option v-for=\"(item, index) in labelOptions\" :key=\"index\" :label=\"item.label\" :value=\"item.value\" />\r\n <template v-if=\"slots.header\" #header>\r\n <slot name=\"header\" />\r\n </template>\r\n <template v-if=\"slots.footer\" #footer>\r\n <slot name=\"footer\" />\r\n </template>\r\n <template v-if=\"slots.prefix\" #prefix>\r\n <slot name=\"prefix\" />\r\n </template>\r\n <template v-if=\"slots.empty\" #empty>\r\n <slot name=\"empty\" />\r\n </template>\r\n <template v-if=\"slots.tag\" #tag>\r\n <slot name=\"tag\" />\r\n </template>\r\n <template v-if=\"slots.loading\" #loading>\r\n <slot name=\"loading\" />\r\n </template>\r\n <template v-if=\"slots.label\" #label=\"slotValue\">\r\n <slot name=\"label\" v-bind=\"slotValue\" />\r\n </template>\r\n </gm-select>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { computed, useSlots } from 'vue';\r\nimport { getGmEvent } from '@giime/utils';\r\nimport { isString } from '@giime/utils/src/is';\r\nimport { selectOptionsEmits, selectOptionsProps } from './selectOptions';\r\ndefineOptions({\r\n name: 'GmSelectOptions',\r\n});\r\nconst props = defineProps(selectOptionsProps);\r\nconst emit = defineEmits(selectOptionsEmits);\r\nconst events = getGmEvent(selectOptionsEmits, emit);\r\nconst slots = useSlots();\r\n\r\nconst labelOptions = computed(() => {\r\n return props.options.map((it, i) => {\r\n const res = {\r\n label: it[props.optionLabel],\r\n value: it[props.optionValue],\r\n };\r\n if (props.labelKey === true) {\r\n res.label = `${it.id}. ${res.label}`;\r\n } else if (props.labelKey === 'index') {\r\n res.label = `${i + 1}. ${res.label}`;\r\n } else if (isString(props.labelKey) && Object.prototype.hasOwnProperty.call(it, props.labelKey)) {\r\n res.label = `${it[props.labelKey]}. ${res.label}`;\r\n }\r\n return res;\r\n });\r\n});\r\n</script>\r\n"],"names":["getGmEvent","selectOptionsEmits","useSlots","computed","isString"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAM,MAAA,MAAA,GAASA,gBAAW,CAAAC,gCAAA,EAAoB,IAAI,CAAA,CAAA;AAClD,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,OAAO,KAAM,CAAA,OAAA,CAAQ,GAAI,CAAA,CAAC,IAAI,CAAM,KAAA;AAClC,QAAA,MAAM,GAAM,GAAA;AAAA,UACV,KAAA,EAAO,EAAG,CAAA,KAAA,CAAM,WAAW,CAAA;AAAA,UAC3B,KAAA,EAAO,EAAG,CAAA,KAAA,CAAM,WAAW,CAAA;AAAA,SAC7B,CAAA;AACA,QAAI,IAAA,KAAA,CAAM,aAAa,IAAM,EAAA;AAC3B,UAAA,GAAA,CAAI,QAAQ,CAAG,EAAA,EAAA,CAAG,EAAE,CAAA,EAAA,EAAK,IAAI,KAAK,CAAA,CAAA,CAAA;AAAA,SACpC,MAAA,IAAW,KAAM,CAAA,QAAA,KAAa,OAAS,EAAA;AACrC,UAAA,GAAA,CAAI,QAAQ,CAAG,EAAA,CAAA,GAAI,CAAC,CAAA,EAAA,EAAK,IAAI,KAAK,CAAA,CAAA,CAAA;AAAA,SACzB,MAAA,IAAAC,WAAA,CAAS,KAAM,CAAA,QAAQ,CAAK,IAAA,MAAA,CAAO,SAAU,CAAA,cAAA,CAAe,IAAK,CAAA,EAAA,EAAI,KAAM,CAAA,QAAQ,CAAG,EAAA;AAC/F,UAAI,GAAA,CAAA,KAAA,GAAQ,GAAG,EAAG,CAAA,KAAA,CAAM,QAAQ,CAAC,CAAA,EAAA,EAAK,IAAI,KAAK,CAAA,CAAA,CAAA;AAAA,SACjD;AACA,QAAO,OAAA,GAAA,CAAA;AAAA,OACR,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|