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 CHANGED
@@ -755,17 +755,6 @@ video {
755
755
  margin: 0;
756
756
  }
757
757
 
758
- [data-v-ec3af0bb] .gmSearchForm .el-form-item {
759
- margin-right: 0;
760
- margin-bottom: 4px;
761
- }
762
- .gm-flex-center[data-v-2a79bac9] {
763
- align-items: center;
764
- }
765
-
766
- .gm-flex-justify-between[data-v-2a79bac9] {
767
- justify-content: space-between;
768
- }
769
758
  .gm-number-interval-single[data-v-47a13fd0] {
770
759
  border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
771
760
  box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
@@ -784,6 +773,17 @@ video {
784
773
  .gm-number-interval-single[data-v-47a13fd0]:hover .gm-number-interval-close[data-v-47a13fd0] {
785
774
  display: flex;
786
775
  }
776
+ .gm-flex-center[data-v-2a79bac9] {
777
+ align-items: center;
778
+ }
779
+
780
+ .gm-flex-justify-between[data-v-2a79bac9] {
781
+ justify-content: space-between;
782
+ }
783
+ [data-v-ec3af0bb] .gmSearchForm .el-form-item {
784
+ margin-right: 0;
785
+ margin-bottom: 4px;
786
+ }
787
787
  [data-v-72a53f6c] .gmTableNoBorder .el-table__body .el-table__cell {
788
788
  border-right: none;
789
789
  }
@@ -206,6 +206,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
206
206
  empty?(_: {}): any;
207
207
  tag?(_: {}): any;
208
208
  loading?(_: {}): any;
209
+ label?(_: any): any;
209
210
  }>;
210
211
  export default _default;
211
212
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,4 +1,4 @@
1
- import { defineComponent, useSlots, ref, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot } from 'vue';
1
+ import { defineComponent, useSlots, ref, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import '../../../../utils/index.mjs';
3
3
  import { selectProps, selectEmits, elSelectEmits } from './select.mjs';
4
4
  import { getGmEvent } from '../../../../utils/src/elementPlus/event.mjs';
@@ -82,6 +82,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
82
82
  renderSlot(_ctx.$slots, "loading")
83
83
  ]),
84
84
  key: "6"
85
+ } : void 0,
86
+ unref(slots).label ? {
87
+ name: "label",
88
+ fn: withCtx((slotValue) => [
89
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(slotValue)))
90
+ ]),
91
+ key: "7"
85
92
  } : void 0
86
93
  ]),
87
94
  1040
@@ -1 +1 @@
1
- {"version":3,"file":"Select.vue2.mjs","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":[],"mappings":";;;;;;;;;;;;;;AAiCA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAW,UAAW,CAAA,aAAA,EAAe,IAAI,CAAA,CAAA;AAE/C,IAAA,MAAM,QAAQ,GAAI,EAAA,CAAA;AAClB,IAAM,MAAA,WAAA,GAAc,CAAC,OAAA,EAAS,MAAM,CAAA,CAAA;AACpC,IAAA,MAAM,EAAE,SAAA,EAAc,GAAA,YAAA,CAAa,OAAO,WAAW,CAAA,CAAA;AAErD,IAAa,QAAA,CAAA;AAAA,MACX,GAAG,SAAA;AAAA,KACJ,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Select.vue2.mjs","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":[],"mappings":";;;;;;;;;;;;;;AAoCA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,QAAA,GAAW,UAAW,CAAA,aAAA,EAAe,IAAI,CAAA,CAAA;AAE/C,IAAA,MAAM,QAAQ,GAAI,EAAA,CAAA;AAClB,IAAM,MAAA,WAAA,GAAc,CAAC,OAAA,EAAS,MAAM,CAAA,CAAA;AACpC,IAAA,MAAM,EAAE,SAAA,EAAc,GAAA,YAAA,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
+ };
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, unref, withCtx, createElementBlock, Fragment, renderList } from 'vue';
1
+ import { defineComponent, useSlots, computed, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, unref, createSlots, withCtx, createElementBlock, Fragment, renderList, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import '../../../../utils/index.mjs';
3
3
  import { isString } from '../../../../utils/src/is.mjs';
4
4
  import { selectOptionsProps, selectOptionsEmits } from './selectOptions.mjs';
@@ -15,6 +15,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  const props = __props;
16
16
  const emit = __emit;
17
17
  const events = getGmEvent(selectOptionsEmits, emit);
18
+ const slots = useSlots();
18
19
  const labelOptions = computed(() => {
19
20
  return props.options.map((it, i) => {
20
21
  const res = {
@@ -37,7 +38,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
37
38
  return openBlock(), createBlock(
38
39
  _component_gm_select,
39
40
  mergeProps(props, toHandlers(unref(events))),
40
- {
41
+ createSlots({
41
42
  default: withCtx(() => [
42
43
  (openBlock(true), createElementBlock(
43
44
  Fragment,
@@ -53,11 +54,61 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
53
54
  /* KEYED_FRAGMENT */
54
55
  ))
55
56
  ]),
56
- _: 1
57
- /* STABLE */
58
- },
59
- 16
60
- /* FULL_PROPS */
57
+ _: 2
58
+ /* DYNAMIC */
59
+ }, [
60
+ unref(slots).header ? {
61
+ name: "header",
62
+ fn: withCtx(() => [
63
+ renderSlot(_ctx.$slots, "header")
64
+ ]),
65
+ key: "0"
66
+ } : void 0,
67
+ unref(slots).footer ? {
68
+ name: "footer",
69
+ fn: withCtx(() => [
70
+ renderSlot(_ctx.$slots, "footer")
71
+ ]),
72
+ key: "1"
73
+ } : void 0,
74
+ unref(slots).prefix ? {
75
+ name: "prefix",
76
+ fn: withCtx(() => [
77
+ renderSlot(_ctx.$slots, "prefix")
78
+ ]),
79
+ key: "2"
80
+ } : void 0,
81
+ unref(slots).empty ? {
82
+ name: "empty",
83
+ fn: withCtx(() => [
84
+ renderSlot(_ctx.$slots, "empty")
85
+ ]),
86
+ key: "3"
87
+ } : void 0,
88
+ unref(slots).tag ? {
89
+ name: "tag",
90
+ fn: withCtx(() => [
91
+ renderSlot(_ctx.$slots, "tag")
92
+ ]),
93
+ key: "4"
94
+ } : void 0,
95
+ unref(slots).loading ? {
96
+ name: "loading",
97
+ fn: withCtx(() => [
98
+ renderSlot(_ctx.$slots, "loading")
99
+ ]),
100
+ key: "5"
101
+ } : void 0,
102
+ unref(slots).label ? {
103
+ name: "label",
104
+ fn: withCtx((slotValue) => [
105
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(slotValue)))
106
+ ]),
107
+ key: "6"
108
+ } : void 0
109
+ ]),
110
+ 1040
111
+ /* FULL_PROPS, DYNAMIC_SLOTS */
61
112
  );
62
113
  };
63
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectOptions.vue2.mjs","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":[],"mappings":";;;;;;;;;;;;;;AAaA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAM,MAAA,MAAA,GAAS,UAAW,CAAA,kBAAA,EAAoB,IAAI,CAAA,CAAA;AAElD,IAAM,MAAA,YAAA,GAAe,SAAS,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,IAAA,QAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SelectOptions.vue2.mjs","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":[],"mappings":";;;;;;;;;;;;;;AAkCA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAM,MAAA,MAAA,GAAS,UAAW,CAAA,kBAAA,EAAoB,IAAI,CAAA,CAAA;AAClD,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,YAAA,GAAe,SAAS,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,IAAA,QAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}