@silver-formily/element-plus 2.1.0 → 2.2.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.
Files changed (121) hide show
  1. package/LICENSE +21 -21
  2. package/esm/__builtins__/configs/index.mjs.map +1 -1
  3. package/esm/__builtins__/shared/hooks.mjs.map +1 -1
  4. package/esm/__builtins__/shared/loading.mjs.map +1 -1
  5. package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
  6. package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
  7. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  8. package/esm/array-base/index.mjs +18 -21
  9. package/esm/array-base/index.mjs.map +1 -1
  10. package/esm/array-base/symbols.mjs.map +1 -1
  11. package/esm/array-base/utils.mjs +29 -33
  12. package/esm/array-base/utils.mjs.map +1 -1
  13. package/esm/array-cards/index.mjs +29 -31
  14. package/esm/array-cards/index.mjs.map +1 -1
  15. package/esm/array-collapse/index.mjs +35 -36
  16. package/esm/array-collapse/index.mjs.map +1 -1
  17. package/esm/array-collapse/utils.mjs +2 -8
  18. package/esm/array-collapse/utils.mjs.map +1 -1
  19. package/esm/array-items/index.mjs +30 -33
  20. package/esm/array-items/index.mjs.map +1 -1
  21. package/esm/array-list-tabs/index.mjs +27 -28
  22. package/esm/array-list-tabs/index.mjs.map +1 -1
  23. package/esm/array-list-tabs/utils.mjs +5 -11
  24. package/esm/array-list-tabs/utils.mjs.map +1 -1
  25. package/esm/array-table/index.mjs +52 -53
  26. package/esm/array-table/index.mjs.map +1 -1
  27. package/esm/array-table/utils.mjs +12 -18
  28. package/esm/array-table/utils.mjs.map +1 -1
  29. package/esm/array-tabs/index.mjs +17 -19
  30. package/esm/array-tabs/index.mjs.map +1 -1
  31. package/esm/cascader/index.mjs +17 -20
  32. package/esm/cascader/index.mjs.map +1 -1
  33. package/esm/checkbox/index.mjs +16 -19
  34. package/esm/checkbox/index.mjs.map +1 -1
  35. package/esm/date-picker/index.mjs +12 -14
  36. package/esm/date-picker/index.mjs.map +1 -1
  37. package/esm/editable/index.mjs +48 -50
  38. package/esm/editable/index.mjs.map +1 -1
  39. package/esm/form/form.mjs +6 -6
  40. package/esm/form/form.mjs.map +1 -1
  41. package/esm/form-button-group/index.mjs +23 -26
  42. package/esm/form-button-group/index.mjs.map +1 -1
  43. package/esm/form-button-group/utils.mjs +2 -8
  44. package/esm/form-button-group/utils.mjs.map +1 -1
  45. package/esm/form-collapse/index.mjs +18 -20
  46. package/esm/form-collapse/index.mjs.map +1 -1
  47. package/esm/form-collapse/utils.mjs.map +1 -1
  48. package/esm/form-dialog/index.mjs +18 -18
  49. package/esm/form-dialog/index.mjs.map +1 -1
  50. package/esm/form-drawer/index.mjs +17 -17
  51. package/esm/form-drawer/index.mjs.map +1 -1
  52. package/esm/form-grid/hooks.mjs.map +1 -1
  53. package/esm/form-grid/index.mjs +20 -23
  54. package/esm/form-grid/index.mjs.map +1 -1
  55. package/esm/form-item/index.mjs +59 -57
  56. package/esm/form-item/index.mjs.map +1 -1
  57. package/esm/form-item/utils.mjs.map +1 -1
  58. package/esm/form-layout/form-layout.mjs +12 -16
  59. package/esm/form-layout/form-layout.mjs.map +1 -1
  60. package/esm/form-layout/utils.mjs +18 -23
  61. package/esm/form-layout/utils.mjs.map +1 -1
  62. package/esm/form-step/index.mjs +24 -26
  63. package/esm/form-step/index.mjs.map +1 -1
  64. package/esm/form-step/utils.mjs.map +1 -1
  65. package/esm/form-tab/hooks.mjs.map +1 -1
  66. package/esm/form-tab/index.mjs +19 -20
  67. package/esm/form-tab/index.mjs.map +1 -1
  68. package/esm/form-tab/utils.mjs.map +1 -1
  69. package/esm/index.d.ts +3 -0
  70. package/esm/index.mjs +46 -40
  71. package/esm/index.mjs.map +1 -1
  72. package/esm/input/index.mjs +20 -23
  73. package/esm/input/index.mjs.map +1 -1
  74. package/esm/input-number/index.mjs +7 -9
  75. package/esm/input-number/index.mjs.map +1 -1
  76. package/esm/pagination/components/jumper.mjs.map +1 -1
  77. package/esm/pagination/components/next.mjs.map +1 -1
  78. package/esm/pagination/components/pager.mjs.map +1 -1
  79. package/esm/pagination/components/prev.mjs.map +1 -1
  80. package/esm/pagination/components/total.mjs.map +1 -1
  81. package/esm/pagination/pagination.mjs.map +1 -1
  82. package/esm/password/index.mjs.map +1 -1
  83. package/esm/preview-text/index.d.ts +5 -0
  84. package/esm/preview-text/index.mjs +149 -128
  85. package/esm/preview-text/index.mjs.map +1 -1
  86. package/esm/preview-text/rate.d.ts +5 -0
  87. package/esm/preview-text/utils.d.ts +5 -5
  88. package/esm/preview-text/utils.mjs.map +1 -1
  89. package/esm/radio/index.mjs +25 -28
  90. package/esm/radio/index.mjs.map +1 -1
  91. package/esm/rate/index.d.ts +187 -0
  92. package/esm/rate/index.mjs +14 -0
  93. package/esm/rate/index.mjs.map +1 -0
  94. package/esm/reset/index.mjs.map +1 -1
  95. package/esm/segmented/index.d.ts +26 -0
  96. package/esm/segmented/index.mjs +37 -0
  97. package/esm/segmented/index.mjs.map +1 -0
  98. package/esm/segmented/segmented.d.ts +25 -0
  99. package/esm/select/index.mjs +16 -19
  100. package/esm/select/index.mjs.map +1 -1
  101. package/esm/select-table/index.mjs +12 -15
  102. package/esm/select-table/index.mjs.map +1 -1
  103. package/esm/slider/index.d.ts +177 -0
  104. package/esm/slider/index.mjs +14 -0
  105. package/esm/slider/index.mjs.map +1 -0
  106. package/esm/submit/index.mjs.map +1 -1
  107. package/esm/switch/index.mjs.map +1 -1
  108. package/esm/time-picker/index.mjs +6 -8
  109. package/esm/time-picker/index.mjs.map +1 -1
  110. package/esm/time-select/index.mjs +6 -8
  111. package/esm/time-select/index.mjs.map +1 -1
  112. package/esm/transfer/index.mjs.map +1 -1
  113. package/esm/tree/index.mjs +28 -31
  114. package/esm/tree/index.mjs.map +1 -1
  115. package/esm/tree/utils.mjs.map +1 -1
  116. package/esm/tree-select/index.mjs +17 -20
  117. package/esm/tree-select/index.mjs.map +1 -1
  118. package/esm/upload/index.mjs +7 -9
  119. package/esm/upload/index.mjs.map +1 -1
  120. package/esm/vendor/sizes.mjs.map +1 -1
  121. package/package.json +113 -113
@@ -1,15 +1,12 @@
1
1
  import { connect as E, mapProps as T } from "@silver-formily/vue";
2
2
  import { ElRadioButton as B, ElRadio as v, ElRadioGroup as C, version as G } from "element-plus";
3
- import { defineComponent as O, computed as c, useSlots as x, createBlock as p, openBlock as t, unref as u, normalizeProps as A, guardReactiveProps as L, withCtx as i, createElementBlock as f, Fragment as d, renderList as _, resolveDynamicComponent as y, mergeProps as b, createTextVNode as h, toDisplayString as j, renderSlot as w } from "vue";
4
- import "@formily/reactive";
5
- import { mapReadPretty as D } from "../__builtins__/shared/transform-component.mjs";
6
- import { useCleanAttrs as F, composeExport as N } from "../__builtins__/shared/utils.mjs";
7
- import { PreviewText as z } from "../preview-text/index.mjs";
8
- import { isPlainObj as H } from "@formily/shared";
9
- import { lt as I } from "../__builtins__/shared/simple-version-compare.mjs";
10
- import "@formily/core";
11
- import "@silver-formily/reactive-vue";
12
- import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
3
+ import { PreviewText as O } from "../preview-text/index.mjs";
4
+ import { defineComponent as x, computed as c, useSlots as A, createBlock as p, openBlock as t, unref as u, normalizeProps as L, guardReactiveProps as h, withCtx as s, createElementBlock as f, Fragment as d, renderList as _, resolveDynamicComponent as y, mergeProps as b, createTextVNode as j, toDisplayString as w, renderSlot as D } from "vue";
5
+ import { isPlainObj as F } from "@formily/shared";
6
+ import { useCleanAttrs as N, composeExport as z } from "../__builtins__/shared/utils.mjs";
7
+ import { lt as H } from "../__builtins__/shared/simple-version-compare.mjs";
8
+ import { mapReadPretty as I } from "../__builtins__/shared/transform-component.mjs";
9
+ import '../styles/radio/index.css';const V = /* @__PURE__ */ x({
13
10
  name: "FRadioGroup",
14
11
  __name: "radio-group",
15
12
  props: {
@@ -23,15 +20,15 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
23
20
  }
24
21
  },
25
22
  setup(P) {
26
- const o = P, { props: R } = F(), s = c(() => o.optionType === "button" ? B : v), S = I(G, "2.6.0");
27
- function l(e) {
28
- return H(e);
23
+ const o = P, { props: R } = N(), l = c(() => o.optionType === "button" ? B : v), S = H(G, "2.6.0");
24
+ function i(e) {
25
+ return F(e);
29
26
  }
30
27
  function g(e, n) {
31
- return l(o.options[n]) ? o.options[n].label : e.label;
28
+ return i(o.options[n]) ? o.options[n].label : e.label;
32
29
  }
33
30
  const m = c(() => o.options.map((e) => {
34
- if (!l(e))
31
+ if (!i(e))
35
32
  return {
36
33
  label: e,
37
34
  value: e
@@ -41,17 +38,17 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
41
38
  ...e,
42
39
  label: e.value
43
40
  } : e;
44
- })), k = x();
45
- return (e, n) => (t(), p(u(C), A(L(u(R))), {
46
- default: i(() => [
47
- u(k).option ? (t(!0), f(d, { key: 1 }, _(m.value, (r, a) => (t(), p(y(s.value), b({ key: a }, { ref_for: !0 }, r), {
48
- default: i(() => [
49
- w(e.$slots, "option", { option: r })
41
+ })), k = A();
42
+ return (e, n) => (t(), p(u(C), L(h(u(R))), {
43
+ default: s(() => [
44
+ u(k).option ? (t(!0), f(d, { key: 1 }, _(m.value, (r, a) => (t(), p(y(l.value), b({ key: a }, { ref_for: !0 }, r), {
45
+ default: s(() => [
46
+ D(e.$slots, "option", { option: r })
50
47
  ]),
51
48
  _: 2
52
- }, 1040))), 128)) : (t(!0), f(d, { key: 0 }, _(m.value, (r, a) => (t(), p(y(s.value), b({ key: a }, { ref_for: !0 }, r), {
53
- default: i(() => [
54
- h(j(g(r, a)), 1)
49
+ }, 1040))), 128)) : (t(!0), f(d, { key: 0 }, _(m.value, (r, a) => (t(), p(y(l.value), b({ key: a }, { ref_for: !0 }, r), {
50
+ default: s(() => [
51
+ j(w(g(r, a)), 1)
55
52
  ]),
56
53
  _: 2
57
54
  }, 1040))), 128))
@@ -62,12 +59,12 @@ import '../styles/radio/index.css';const V = /* @__PURE__ */ O({
62
59
  }), $ = E(
63
60
  V,
64
61
  T({ dataSource: "options", disabled: !0 }),
65
- D(z.Select)
66
- ), re = N(v, {
62
+ I(O.Select)
63
+ ), Y = z(v, {
67
64
  Group: $
68
65
  });
69
66
  export {
70
- re as Radio,
71
- re as default
67
+ Y as Radio,
68
+ Y as default
72
69
  };
73
70
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { RadioProps } from 'element-plus'\nimport type { PropType } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\nimport { computed, useSlots } from 'vue'\nimport { lt, useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FRadioGroup',\n})\n\nconst props = defineProps({\n options: {\n type: Array as PropType<Array<RadioProps | string | number>>,\n default: () => [],\n },\n optionType: {\n type: String as PropType<'default' | 'button'>,\n default: 'default',\n },\n})\n\nconst { props: radioProps } = useCleanAttrs()\n\nconst OptionType = computed(() => {\n return props.optionType === 'button' ? ElRadioButton : ElRadio\n})\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\n\nfunction isRadioPropsObject(option: any): option is RadioProps {\n return isPlainObj(option)\n}\n\nfunction getOptionLabel(option: any, index: number) {\n if (isRadioPropsObject(props.options[index])) {\n return props.options[index].label\n }\n return option.label\n}\n\nconst compatiableProps = computed(() => {\n return props.options.map((option) => {\n if (!isRadioPropsObject(option)) {\n return {\n label: option,\n value: option,\n }\n }\n /* istanbul ignore if -- @preserve */\n if (IS_LESS_THAN_2_6_0) {\n return {\n ...option,\n label: option.value,\n }\n }\n return option\n })\n})\n\nconst slots = useSlots()\n</script>\n\n<template>\n <ElRadioGroup v-bind=\"radioProps\">\n <template v-if=\"!slots.option\">\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n {{ getOptionLabel(option, index) }}\n </component>\n </template>\n <template v-else>\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\n <slot name=\"option\" :option=\"option\" />\n </component>\n </template>\n </ElRadioGroup>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRadio } from 'element-plus'\nimport { composeExport, mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FRadioGroup from './radio-group.vue'\nimport './style.scss'\n\nconst RadioGroup = connect<typeof FRadioGroup>(\n FRadioGroup,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\nexport const Radio = composeExport(ElRadio, {\n Group: RadioGroup,\n})\n\nexport default Radio\n"],"names":["props","__props","radioProps","useCleanAttrs","OptionType","computed","ElRadioButton","ElRadio","IS_LESS_THAN_2_6_0","lt","version","isRadioPropsObject","option","isPlainObj","getOptionLabel","index","compatiableProps","slots","useSlots","_openBlock","_createBlock","_unref","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_mergeProps","_renderSlot","_ctx","RadioGroup","connect","FRadioGroup","mapProps","mapReadPretty","PreviewText","Radio","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAWR,EAAE,OAAOC,EAAA,IAAeC,EAAA,GAExBC,IAAaC,EAAS,MACnBL,EAAM,eAAe,WAAWM,IAAgBC,CACxD,GACKC,IAAqBC,EAAGC,GAAS,OAAO;AAE9C,aAASC,EAAmBC,GAAmC;AAC7D,aAAOC,EAAWD,CAAM;AAAA,IAC1B;AAEA,aAASE,EAAeF,GAAaG,GAAe;AAClD,aAAIJ,EAAmBX,EAAM,QAAQe,CAAK,CAAC,IAClCf,EAAM,QAAQe,CAAK,EAAE,QAEvBH,EAAO;AAAA,IAChB;AAEA,UAAMI,IAAmBX,EAAS,MACzBL,EAAM,QAAQ,IAAI,CAACY,MAAW;AACnC,UAAI,CAACD,EAAmBC,CAAM;AAC5B,eAAO;AAAA,UACL,OAAOA;AAAA,UACP,OAAOA;AAAA,QAAA;AAAA,MAEX;AAEA,aAAIJ,IACK;AAAA,QACL,GAAGI;AAAA,QACH,OAAOA,EAAO;AAAA,MAAA,IAGXA;AAAA,IACT,CAAC,CACF,GAEKK,IAAQC,EAAA;sBAIZC,EAAA,GAAAC,EAWeC,UAXOA,EAAAnB,CAAA,CAAU,CAAA,GAAA;AAAA,iBAC9B,MAIW;AAAA,QAJMmB,EAAAJ,CAAA,EAAM,UAMrBE,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAuC;AAAA,YAAvCe,EAAuCC,EAAA,QAAA,UAAA,EAAlB,QAAAhB,GAAc;AAAA,UAAA;;6BANrCO,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAmC;AAAA,gBAAhCE,EAAeF,GAAQG,CAAK,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;IC5DjCc,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC,GACaC,KAAQC,EAAc7B,GAAS;AAAA,EAC1C,OAAOsB;AACT,CAAC;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/radio/radio-group.vue","../../src/radio/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport type { RadioProps } from 'element-plus'\r\nimport type { PropType } from 'vue'\r\nimport { isPlainObj } from '@formily/shared'\r\nimport { ElRadio, ElRadioButton, ElRadioGroup, version } from 'element-plus'\r\nimport { computed, useSlots } from 'vue'\r\nimport { lt, useCleanAttrs } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FRadioGroup',\r\n})\r\n\r\nconst props = defineProps({\r\n options: {\r\n type: Array as PropType<Array<RadioProps | string | number>>,\r\n default: () => [],\r\n },\r\n optionType: {\r\n type: String as PropType<'default' | 'button'>,\r\n default: 'default',\r\n },\r\n})\r\n\r\nconst { props: radioProps } = useCleanAttrs()\r\n\r\nconst OptionType = computed(() => {\r\n return props.optionType === 'button' ? ElRadioButton : ElRadio\r\n})\r\nconst IS_LESS_THAN_2_6_0 = lt(version, '2.6.0')\r\n\r\nfunction isRadioPropsObject(option: any): option is RadioProps {\r\n return isPlainObj(option)\r\n}\r\n\r\nfunction getOptionLabel(option: any, index: number) {\r\n if (isRadioPropsObject(props.options[index])) {\r\n return props.options[index].label\r\n }\r\n return option.label\r\n}\r\n\r\nconst compatiableProps = computed(() => {\r\n return props.options.map((option) => {\r\n if (!isRadioPropsObject(option)) {\r\n return {\r\n label: option,\r\n value: option,\r\n }\r\n }\r\n /* istanbul ignore if -- @preserve */\r\n if (IS_LESS_THAN_2_6_0) {\r\n return {\r\n ...option,\r\n label: option.value,\r\n }\r\n }\r\n return option\r\n })\r\n})\r\n\r\nconst slots = useSlots()\r\n</script>\r\n\r\n<template>\r\n <ElRadioGroup v-bind=\"radioProps\">\r\n <template v-if=\"!slots.option\">\r\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\r\n {{ getOptionLabel(option, index) }}\r\n </component>\r\n </template>\r\n <template v-else>\r\n <component :is=\"OptionType\" v-for=\"(option, index) of compatiableProps\" :key=\"index\" v-bind=\"option\">\r\n <slot name=\"option\" :option=\"option\" />\r\n </component>\r\n </template>\r\n </ElRadioGroup>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport { ElRadio } from 'element-plus'\r\nimport { composeExport, mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport FRadioGroup from './radio-group.vue'\r\nimport './style.scss'\r\n\r\nconst RadioGroup = connect<typeof FRadioGroup>(\r\n FRadioGroup,\r\n mapProps({ dataSource: 'options', disabled: true }),\r\n mapReadPretty(PreviewText.Select),\r\n)\r\nexport const Radio = composeExport(ElRadio, {\r\n Group: RadioGroup,\r\n})\r\n\r\nexport default Radio\r\n"],"names":["props","__props","radioProps","useCleanAttrs","OptionType","computed","ElRadioButton","ElRadio","IS_LESS_THAN_2_6_0","lt","version","isRadioPropsObject","option","isPlainObj","getOptionLabel","index","compatiableProps","slots","useSlots","_openBlock","_createBlock","_unref","_createElementBlock","_Fragment","_renderList","_resolveDynamicComponent","_mergeProps","_renderSlot","_ctx","RadioGroup","connect","FRadioGroup","mapProps","mapReadPretty","PreviewText","Radio","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAWR,EAAE,OAAOC,EAAA,IAAeC,EAAA,GAExBC,IAAaC,EAAS,MACnBL,EAAM,eAAe,WAAWM,IAAgBC,CACxD,GACKC,IAAqBC,EAAGC,GAAS,OAAO;AAE9C,aAASC,EAAmBC,GAAmC;AAC7D,aAAOC,EAAWD,CAAM;AAAA,IAC1B;AAEA,aAASE,EAAeF,GAAaG,GAAe;AAClD,aAAIJ,EAAmBX,EAAM,QAAQe,CAAK,CAAC,IAClCf,EAAM,QAAQe,CAAK,EAAE,QAEvBH,EAAO;AAAA,IAChB;AAEA,UAAMI,IAAmBX,EAAS,MACzBL,EAAM,QAAQ,IAAI,CAACY,MAAW;AACnC,UAAI,CAACD,EAAmBC,CAAM;AAC5B,eAAO;AAAA,UACL,OAAOA;AAAA,UACP,OAAOA;AAAA,QAAA;AAAA,MAEX;AAEA,aAAIJ,IACK;AAAA,QACL,GAAGI;AAAA,QACH,OAAOA,EAAO;AAAA,MAAA,IAGXA;AAAA,IACT,CAAC,CACF,GAEKK,IAAQC,EAAA;sBAIZC,EAAA,GAAAC,EAWeC,UAXOA,EAAAnB,CAAA,CAAU,CAAA,GAAA;AAAA,iBAC9B,MAIW;AAAA,QAJMmB,EAAAJ,CAAA,EAAM,UAMrBE,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAuC;AAAA,YAAvCe,EAAuCC,EAAA,QAAA,UAAA,EAAlB,QAAAhB,GAAc;AAAA,UAAA;;6BANrCO,EAAA,EAAA,GAAAG,EAEYC,GAAA,EAAA,KAAA,KAAAC,EAF0CR,EAAA,OAAgB,CAAlCJ,GAAQG,YAA5CK,EAEYK,EAFIrB,OAAU,GAA1BsB,EAEY,EAF6D,KAAKX,KAAK,EAAA,SAAA,GAAA,GAAUH,CAAM,GAAA;AAAA,qBACjG,MAAmC;AAAA,gBAAhCE,EAAeF,GAAQG,CAAK,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;IC5DjCc,IAAaC;AAAA,EACjBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC,GACaC,IAAQC,EAAc7B,GAAS;AAAA,EAC1C,OAAOsB;AACT,CAAC;"}
@@ -0,0 +1,187 @@
1
+ import { ElRate } from 'element-plus';
2
+ export type RateProps = typeof ElRate;
3
+ export declare const Rate: import('element-plus/es/utils/index.mjs').SFCWithInstall<import('vue').DefineComponent<{
4
+ size: {
5
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
6
+ };
7
+ max: {
8
+ type: import('vue').PropType<number>;
9
+ default: number;
10
+ };
11
+ disabled: {
12
+ type: import('vue').PropType<boolean>;
13
+ default: undefined;
14
+ };
15
+ id: {
16
+ type: import('vue').PropType<string>;
17
+ default: undefined;
18
+ };
19
+ modelValue: {
20
+ type: import('vue').PropType<number>;
21
+ default: number;
22
+ };
23
+ ariaLabel: {
24
+ type: import('vue').PropType<string>;
25
+ };
26
+ clearable: {
27
+ type: import('vue').PropType<boolean>;
28
+ };
29
+ lowThreshold: {
30
+ type: import('vue').PropType<number>;
31
+ default: number;
32
+ };
33
+ highThreshold: {
34
+ type: import('vue').PropType<number>;
35
+ default: number;
36
+ };
37
+ colors: {
38
+ type: import('vue').PropType<string[] | Record<number, string>>;
39
+ default: () => string[];
40
+ };
41
+ voidColor: {
42
+ type: import('vue').PropType<string>;
43
+ default: string;
44
+ };
45
+ disabledVoidColor: {
46
+ type: import('vue').PropType<string>;
47
+ default: string;
48
+ };
49
+ icons: {
50
+ type: import('vue').PropType<(string | import('vue').Component)[] | Record<number, string | import('vue').Component>>;
51
+ default: () => any[];
52
+ };
53
+ voidIcon: {
54
+ type: import('vue').PropType<string | import('vue').Component>;
55
+ default: () => any;
56
+ };
57
+ disabledVoidIcon: {
58
+ type: import('vue').PropType<string | import('vue').Component>;
59
+ default: () => any;
60
+ };
61
+ allowHalf: {
62
+ type: import('vue').PropType<boolean>;
63
+ };
64
+ showText: {
65
+ type: import('vue').PropType<boolean>;
66
+ };
67
+ showScore: {
68
+ type: import('vue').PropType<boolean>;
69
+ };
70
+ textColor: {
71
+ type: import('vue').PropType<string>;
72
+ default: string;
73
+ };
74
+ texts: {
75
+ type: import('vue').PropType<string[]>;
76
+ default: () => string[];
77
+ };
78
+ scoreTemplate: {
79
+ type: import('vue').PropType<string>;
80
+ default: string;
81
+ };
82
+ }, {
83
+ setCurrentValue: (value: number, event?: MouseEvent) => void;
84
+ resetCurrentValue: () => void;
85
+ }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
86
+ "update:modelValue": (value: number) => void;
87
+ change: (value: number) => void;
88
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
89
+ size: {
90
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
91
+ };
92
+ max: {
93
+ type: import('vue').PropType<number>;
94
+ default: number;
95
+ };
96
+ disabled: {
97
+ type: import('vue').PropType<boolean>;
98
+ default: undefined;
99
+ };
100
+ id: {
101
+ type: import('vue').PropType<string>;
102
+ default: undefined;
103
+ };
104
+ modelValue: {
105
+ type: import('vue').PropType<number>;
106
+ default: number;
107
+ };
108
+ ariaLabel: {
109
+ type: import('vue').PropType<string>;
110
+ };
111
+ clearable: {
112
+ type: import('vue').PropType<boolean>;
113
+ };
114
+ lowThreshold: {
115
+ type: import('vue').PropType<number>;
116
+ default: number;
117
+ };
118
+ highThreshold: {
119
+ type: import('vue').PropType<number>;
120
+ default: number;
121
+ };
122
+ colors: {
123
+ type: import('vue').PropType<string[] | Record<number, string>>;
124
+ default: () => string[];
125
+ };
126
+ voidColor: {
127
+ type: import('vue').PropType<string>;
128
+ default: string;
129
+ };
130
+ disabledVoidColor: {
131
+ type: import('vue').PropType<string>;
132
+ default: string;
133
+ };
134
+ icons: {
135
+ type: import('vue').PropType<(string | import('vue').Component)[] | Record<number, string | import('vue').Component>>;
136
+ default: () => any[];
137
+ };
138
+ voidIcon: {
139
+ type: import('vue').PropType<string | import('vue').Component>;
140
+ default: () => any;
141
+ };
142
+ disabledVoidIcon: {
143
+ type: import('vue').PropType<string | import('vue').Component>;
144
+ default: () => any;
145
+ };
146
+ allowHalf: {
147
+ type: import('vue').PropType<boolean>;
148
+ };
149
+ showText: {
150
+ type: import('vue').PropType<boolean>;
151
+ };
152
+ showScore: {
153
+ type: import('vue').PropType<boolean>;
154
+ };
155
+ textColor: {
156
+ type: import('vue').PropType<string>;
157
+ default: string;
158
+ };
159
+ texts: {
160
+ type: import('vue').PropType<string[]>;
161
+ default: () => string[];
162
+ };
163
+ scoreTemplate: {
164
+ type: import('vue').PropType<string>;
165
+ default: string;
166
+ };
167
+ }>> & {
168
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
169
+ onChange?: ((value: number) => any) | undefined;
170
+ }, {
171
+ disabled: boolean;
172
+ id: string;
173
+ modelValue: number;
174
+ max: number;
175
+ textColor: string;
176
+ colors: string[] | Record<number, string>;
177
+ lowThreshold: number;
178
+ highThreshold: number;
179
+ voidColor: string;
180
+ disabledVoidColor: string;
181
+ icons: Array<string | import('vue').Component> | Record<number, string | import('vue').Component>;
182
+ voidIcon: string | import('vue').Component;
183
+ disabledVoidIcon: string | import('vue').Component;
184
+ texts: string[];
185
+ scoreTemplate: string;
186
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
187
+ export default Rate;
@@ -0,0 +1,14 @@
1
+ import { connect as e, mapProps as r } from "@silver-formily/vue";
2
+ import { ElRate as t } from "element-plus";
3
+ import { PreviewText as o } from "../preview-text/index.mjs";
4
+ import { mapReadPretty as a } from "../__builtins__/shared/transform-component.mjs";
5
+ const f = e(
6
+ t,
7
+ r({ readOnly: "readonly", disabled: !0 }),
8
+ a(o.Rate)
9
+ );
10
+ export {
11
+ f as Rate,
12
+ f as default
13
+ };
14
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/rate/index.ts"],"sourcesContent":["import { connect, mapProps } from '@silver-formily/vue'\nimport { ElRate } from 'element-plus'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\n\nexport type RateProps = typeof ElRate\n\nexport const Rate = connect<typeof ElRate>(\n ElRate,\n mapProps({ readOnly: 'readonly', disabled: true }),\n mapReadPretty(PreviewText.Rate),\n)\n\nexport default Rate\n"],"names":["Rate","connect","ElRate","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;AAOO,MAAMA,IAAOC;AAAA,EAClBC;AAAA,EACAC,EAAS,EAAE,UAAU,YAAY,UAAU,IAAM;AAAA,EACjDC,EAAcC,EAAY,IAAI;AAChC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { PropType } from 'vue'\nimport { useParentForm } from '@silver-formily/vue'\nimport { ElButton } from 'element-plus'\n\ndefineOptions({\n name: 'FReset',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n onClick: Function as PropType<(e: MouseEvent) => void | boolean>,\n forceClear: {\n type: Boolean,\n default: false,\n },\n validate: {\n type: Boolean,\n default: false,\n },\n onResetValidateSuccess: Function as PropType<(payload: any) => void>,\n onResetValidateFailed: Function as PropType<(error: any) => void>,\n})\n\nconst formRef = useParentForm()\n\nfunction handleClick(e: MouseEvent) {\n if (props.onClick && (props.onClick)?.(e) === false)\n return\n\n const form = formRef?.value\n form?.reset('*', {\n forceClear: props.forceClear,\n })\n props.validate && form?.validate()\n .then(props.onResetValidateSuccess)\n .catch(error => props.onResetValidateFailed?.(error))\n}\n</script>\n\n<template>\n <ElButton v-bind=\"$attrs\" @click=\"handleClick\">\n <slot />\n </ElButton>\n</template>\n","import { observer } from '@silver-formily/reactive-vue'\nimport FReset from './reset.vue'\n\nexport const Reset = observer(FReset)\n\nexport default Reset\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","form","error","_openBlock","_createBlock","_unref","_mergeProps","_ctx","_renderSlot","Reset","observer","FReset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAcRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,UAAIL,EAAM,WAAYA,EAAM,UAAWK,CAAC,MAAM;AAC5C;AAEF,YAAMC,IAAOJ,GAAS;AACtB,MAAAI,GAAM,MAAM,KAAK;AAAA,QACf,YAAYN,EAAM;AAAA,MAAA,CACnB,GACDA,EAAM,YAAYM,GAAM,SAAA,EACrB,KAAKN,EAAM,sBAAsB,EACjC,MAAM,CAAAO,MAASP,EAAM,wBAAwBO,CAAK,CAAC;AAAA,IACxD;sBAIEC,EAAA,GAAAC,EAEWC,MAFXC,EAEWC,UAFa,EAAG,SAAOR,EAAA,CAAW,GAAA;AAAA,iBAC3C,MAAQ;AAAA,QAARS,EAAQD,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICvCCE,IAAQC,EAASC,CAAM;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/reset/reset.vue","../../src/reset/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { PropType } from 'vue'\r\nimport { useParentForm } from '@silver-formily/vue'\r\nimport { ElButton } from 'element-plus'\r\n\r\ndefineOptions({\r\n name: 'FReset',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps({\r\n onClick: Function as PropType<(e: MouseEvent) => void | boolean>,\r\n forceClear: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n validate: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n onResetValidateSuccess: Function as PropType<(payload: any) => void>,\r\n onResetValidateFailed: Function as PropType<(error: any) => void>,\r\n})\r\n\r\nconst formRef = useParentForm()\r\n\r\nfunction handleClick(e: MouseEvent) {\r\n if (props.onClick && (props.onClick)?.(e) === false)\r\n return\r\n\r\n const form = formRef?.value\r\n form?.reset('*', {\r\n forceClear: props.forceClear,\r\n })\r\n props.validate && form?.validate()\r\n .then(props.onResetValidateSuccess)\r\n .catch(error => props.onResetValidateFailed?.(error))\r\n}\r\n</script>\r\n\r\n<template>\r\n <ElButton v-bind=\"$attrs\" @click=\"handleClick\">\r\n <slot />\r\n </ElButton>\r\n</template>\r\n","import { observer } from '@silver-formily/reactive-vue'\r\nimport FReset from './reset.vue'\r\n\r\nexport const Reset = observer(FReset)\r\n\r\nexport default Reset\r\n"],"names":["props","__props","formRef","useParentForm","handleClick","e","form","error","_openBlock","_createBlock","_unref","_mergeProps","_ctx","_renderSlot","Reset","observer","FReset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAcRC,IAAUC,EAAA;AAEhB,aAASC,EAAYC,GAAe;AAClC,UAAIL,EAAM,WAAYA,EAAM,UAAWK,CAAC,MAAM;AAC5C;AAEF,YAAMC,IAAOJ,GAAS;AACtB,MAAAI,GAAM,MAAM,KAAK;AAAA,QACf,YAAYN,EAAM;AAAA,MAAA,CACnB,GACDA,EAAM,YAAYM,GAAM,SAAA,EACrB,KAAKN,EAAM,sBAAsB,EACjC,MAAM,CAAAO,MAASP,EAAM,wBAAwBO,CAAK,CAAC;AAAA,IACxD;sBAIEC,EAAA,GAAAC,EAEWC,MAFXC,EAEWC,UAFa,EAAG,SAAOR,EAAA,CAAW,GAAA;AAAA,iBAC3C,MAAQ;AAAA,QAARS,EAAQD,EAAA,QAAA,SAAA;AAAA,MAAA;;;;ICvCCE,IAAQC,EAASC,CAAM;"}
@@ -0,0 +1,26 @@
1
+ export declare const Segmented: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ options?: import('element-plus/es/components/segmented/src/types.mjs').Option[];
4
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
5
+ P: {};
6
+ B: {};
7
+ D: {};
8
+ C: {};
9
+ M: {};
10
+ Defaults: {};
11
+ }, Readonly<{
12
+ options?: import('element-plus/es/components/segmented/src/types.mjs').Option[];
13
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
14
+ __isFragment?: never;
15
+ __isTeleport?: never;
16
+ __isSuspense?: never;
17
+ } & import('vue').ComponentOptionsBase<Readonly<{
18
+ options?: import('element-plus/es/components/segmented/src/types.mjs').Option[];
19
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
20
+ $slots: {
21
+ default?(_: {
22
+ item: any;
23
+ }): any;
24
+ };
25
+ });
26
+ export default Segmented;
@@ -0,0 +1,37 @@
1
+ import { connect as m, mapProps as a } from "@silver-formily/vue";
2
+ import { PreviewText as i } from "../preview-text/index.mjs";
3
+ import { defineComponent as c, useSlots as d, createBlock as l, openBlock as f, unref as e, mergeProps as u, createSlots as S, withCtx as g, renderSlot as P, normalizeProps as _, guardReactiveProps as h } from "vue";
4
+ import { ElSegmented as k } from "element-plus";
5
+ import { useCleanAttrs as v } from "../__builtins__/shared/utils.mjs";
6
+ import { mapReadPretty as x } from "../__builtins__/shared/transform-component.mjs";
7
+ const C = /* @__PURE__ */ c({
8
+ name: "FSegmented",
9
+ inheritAttrs: !1,
10
+ __name: "segmented",
11
+ props: {
12
+ options: {}
13
+ },
14
+ setup(t) {
15
+ const o = t, r = d(), { props: s } = v();
16
+ return (n, w) => (f(), l(e(k), u(e(s), {
17
+ options: o.options
18
+ }), S({ _: 2 }, [
19
+ e(r).default ? {
20
+ name: "default",
21
+ fn: g((p) => [
22
+ P(n.$slots, "default", _(h(p)))
23
+ ]),
24
+ key: "0"
25
+ } : void 0
26
+ ]), 1040, ["options"]));
27
+ }
28
+ }), E = m(
29
+ C,
30
+ a({ dataSource: "options", disabled: !0 }),
31
+ x(i.Select)
32
+ );
33
+ export {
34
+ E as Segmented,
35
+ E as default
36
+ };
37
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/segmented/segmented.vue","../../src/segmented/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ElSegmented } from 'element-plus'\nimport { useSlots } from 'vue'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSegmented',\n inheritAttrs: false,\n})\n\nconst props = defineProps<{\n options?: SegmentedOptions\n}>()\n\ntype SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number]\n\ntype SegmentedOptions = SegmentedOption[]\n\nconst slots = useSlots()\nconst { props: segmentedProps } = useCleanAttrs()\n</script>\n\n<template>\n <ElSegmented v-bind=\"segmentedProps\" :options=\"props.options\">\n <template v-if=\"slots.default\" #default=\"slotData\">\n <slot v-bind=\"slotData\" />\n </template>\n </ElSegmented>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSegmented from './segmented.vue'\n\nexport const Segmented = connect<typeof FSegmented>(\n FSegmented,\n mapProps({ dataSource: 'options', disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Segmented\n"],"names":["props","__props","slots","useSlots","segmentedProps","useCleanAttrs","_createBlock","_unref","ElSegmented","_mergeProps","_withCtx","slotData","_renderSlot","_ctx","Segmented","connect","FSegmented","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;AAUA,UAAMA,IAAQC,GAQRC,IAAQC,EAAA,GACR,EAAE,OAAOC,EAAA,IAAmBC,EAAA;2BAIhCC,EAIcC,EAAAC,CAAA,GAJdC,EAIcF,EAAAH,CAAA,GAJqB;AAAA,MAAG,SAASJ,EAAM;AAAA,IAAA;MACnCO,EAAAL,CAAA,EAAM;cAAU;AAAA,QAC9B,IAAAQ,EAAA,CADuCC,MAAQ;AAAA,UAC/CC,EAA0BC,yBAAZF,CAAQ,CAAA,CAAA;AAAA,QAAA;;;;;ICpBfG,IAAYC;AAAA,EACvBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,UAAU,IAAM;AAAA,EAClDC,EAAcC,EAAY,MAAM;AAClC;"}
@@ -0,0 +1,25 @@
1
+ import { ElSegmented } from 'element-plus';
2
+ type __VLS_Props = {
3
+ options?: SegmentedOptions;
4
+ };
5
+ type SegmentedOption = NonNullable<InstanceType<typeof ElSegmented>['$props']['options']>[number];
6
+ type SegmentedOptions = SegmentedOption[];
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {
11
+ item: any;
12
+ }): any;
13
+ };
14
+ refs: {};
15
+ rootEl: any;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -1,14 +1,11 @@
1
1
  import { useField as S, connect as b, mapProps as P } from "@silver-formily/vue";
2
- import { defineComponent as h, useSlots as C, createBlock as f, openBlock as s, unref as e, normalizeProps as E, guardReactiveProps as K, createSlots as _, withCtx as t, createElementBlock as m, Fragment as u, renderList as y, mergeProps as d, renderSlot as n, createCommentVNode as c } from "vue";
3
- import { ElSelect as B, ElOptionGroup as F, ElOption as k } from "element-plus";
4
- import "@formily/reactive";
5
- import { mapReadPretty as R } from "../__builtins__/shared/transform-component.mjs";
6
- import { PreviewText as w } from "../preview-text/index.mjs";
7
- import "@formily/core";
8
- import "@silver-formily/reactive-vue";
2
+ import { PreviewText as h } from "../preview-text/index.mjs";
3
+ import { defineComponent as C, useSlots as E, createBlock as f, openBlock as s, unref as e, normalizeProps as K, guardReactiveProps as _, createSlots as B, withCtx as t, createElementBlock as u, Fragment as m, renderList as y, mergeProps as d, renderSlot as n, createCommentVNode as c } from "vue";
4
+ import { ElSelect as F, ElOptionGroup as R, ElOption as k } from "element-plus";
5
+ import { o as w } from "../vendor/lodash.mjs";
9
6
  import { useCleanAttrs as A } from "../__builtins__/shared/utils.mjs";
10
- import { o as G } from "../vendor/lodash.mjs";
11
- const O = /* @__PURE__ */ h({
7
+ import { mapReadPretty as G } from "../__builtins__/shared/transform-component.mjs";
8
+ const O = /* @__PURE__ */ C({
12
9
  name: "FSelect",
13
10
  inheritAttrs: !1,
14
11
  __name: "select",
@@ -16,21 +13,21 @@ const O = /* @__PURE__ */ h({
16
13
  options: {}
17
14
  },
18
15
  setup(v) {
19
- const g = v, l = C(), { props: i } = A(), p = S();
16
+ const g = v, l = E(), { props: i } = A(), p = S();
20
17
  function $(o) {
21
18
  return o.options !== void 0;
22
19
  }
23
- return (o, z) => (s(), f(e(B), E(K(e(i))), _({
20
+ return (o, z) => (s(), f(e(F), K(_(e(i))), B({
24
21
  default: t(() => [
25
- (s(!0), m(u, null, y(g.options, (r) => (s(), m(u, null, [
26
- $(r) ? (s(), f(e(F), d({
22
+ (s(!0), u(m, null, y(g.options, (r) => (s(), u(m, null, [
23
+ $(r) ? (s(), f(e(R), d({
27
24
  key: 0,
28
25
  ref_for: !0
29
- }, e(G)(r, "options"), {
26
+ }, e(w)(r, "options"), {
30
27
  key: r.label
31
28
  }), {
32
29
  default: t(() => [
33
- (s(!0), m(u, null, y(r.options, (a) => (s(), f(e(k), d({
30
+ (s(!0), u(m, null, y(r.options, (a) => (s(), f(e(k), d({
34
31
  key: e(i).valueKey ? a[e(i).valueKey] : a.label
35
32
  }, { ref_for: !0 }, a), {
36
33
  default: t(() => [
@@ -115,13 +112,13 @@ const O = /* @__PURE__ */ h({
115
112
  } : void 0
116
113
  ]), 1040));
117
114
  }
118
- }), M = b(
115
+ }), H = b(
119
116
  O,
120
117
  P({ dataSource: "options", loading: !0, disabled: !0 }),
121
- R(w.Select)
118
+ G(h.Select)
122
119
  );
123
120
  export {
124
- M as Select,
125
- M as default
121
+ H as Select,
122
+ H as default
126
123
  };
127
124
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/select/select.vue","../../src/select/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useField } from '@silver-formily/vue'\nimport { ElOption, ElOptionGroup, ElSelect } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { useCleanAttrs } from '../__builtins__'\n\ndefineOptions({\n name: 'FSelect',\n inheritAttrs: false,\n})\n\nconst props = defineProps<{\n options?: Array<OptionType | OptionGroupType>\n}>()\n\nconst slots = defineSlots<{\n option?: (props: { option: OptionType }) => any\n header?: () => any\n footer?: () => any\n prefix?: () => any\n empty?: () => any\n tag?: () => any\n loading?: () => any\n label?: () => any\n}>()\n\ntype OptionType = InstanceType<typeof ElOption>['$props']\ntype OptionGroupType = InstanceType<typeof ElOptionGroup>['$props'] & {\n options: OptionType[]\n}\n\nconst { props: selectProps } = useCleanAttrs()\n\nconst fieldRef = useField()\n\nfunction isGroup(option: OptionType | OptionGroupType): option is OptionGroupType {\n return (option as OptionGroupType).options !== undefined\n}\n</script>\n\n<template>\n <ElSelect v-bind=\"selectProps\">\n <template v-for=\"option of props.options\">\n <template v-if=\"isGroup(option)\">\n <ElOptionGroup v-bind=\"omit(option, 'options')\" :key=\"option.label\">\n <ElOption v-for=\"i of option.options\" :key=\"selectProps.valueKey ? i[selectProps.valueKey] : i.label\" v-bind=\"i\">\n <slot v-if=\"slots.option\" name=\"option\" :option=\"i\" />\n </ElOption>\n </ElOptionGroup>\n </template>\n <ElOption v-else v-bind=\"option\" :key=\"selectProps.valueKey ? option[selectProps.valueKey] : option.label\">\n <slot v-if=\"slots.option\" name=\"option\" :option=\"option\" />\n </ElOption>\n </template>\n <template v-if=\"slots.header\" #header>\n <slot name=\"header\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"slots.empty\" #empty>\n <slot name=\"empty\" />\n </template>\n <template v-if=\"slots.tag\" #tag>\n <slot name=\"tag\" :field=\"fieldRef\" />\n </template>\n <template v-if=\"slots.loading\" #loading>\n <slot name=\"loading\" />\n </template>\n <template v-if=\"slots.label\" #label=\"{ label, value: labelValue }\">\n <slot name=\"label\" :label=\"label\" :value=\"labelValue\" />\n </template>\n </ElSelect>\n</template>\n","import { connect, mapProps } from '@silver-formily/vue'\nimport { mapReadPretty } from '../__builtins__'\nimport { PreviewText } from '../preview-text'\nimport FSelect from './select.vue'\n\nexport const Select = connect<typeof FSelect>(\n FSelect,\n mapProps({ dataSource: 'options', loading: true, disabled: true }),\n mapReadPretty(PreviewText.Select),\n)\n\nexport default Select\n"],"names":["props","__props","slots","_useSlots","selectProps","useCleanAttrs","fieldRef","useField","isGroup","option","_openBlock","_createBlock","_unref","_createSlots","_createElementBlock","_Fragment","_renderList","_mergeProps","omit","i","_renderSlot","_ctx","label","labelValue","Select","connect","FSelect","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GAIRC,IAAQC,EAAA,GAgBR,EAAE,OAAOC,EAAA,IAAgBC,EAAA,GAEzBC,IAAWC,EAAA;AAEjB,aAASC,EAAQC,GAAiE;AAChF,aAAQA,EAA2B,YAAY;AAAA,IACjD;sBAIEC,EAAA,GAAAC,EAkCWC,UAlCOA,EAAAR,CAAA,CAAW,CAAA,GAAAS,EAAA;AAAA,iBACjB,MAA+B;AAAA,SAAzCH,EAAA,EAAA,GAAAI,EAWWC,GAAA,MAAAC,EAXgBhB,EAAM,UAAhBS;UACCD,EAAQC,CAAM,KAC5BC,EAAA,GAAAC,EAIgBC,MAJhBK,EAIgB;AAAA;;aAJOL,EAAAM,CAAA,EAAKT,GAAM,SAAA,GAAA;AAAA,YAAe,KAAKA,EAAO;AAAA,UAAA;uBACjD,MAA2B;AAAA,eAArCC,EAAA,EAAA,GAAAI,EAEWC,GAAA,MAAAC,EAFWP,EAAO,UAAZU,OAAjBT,KAAAC,EAEWC,MAFXK,EAEW;AAAA,gBAF4B,KAAKL,EAAAR,CAAA,EAAY,WAAWe,EAAEP,EAAAR,CAAA,EAAY,QAAQ,IAAIe,EAAE;AAAA,cAAA,oBAAeA,CAAC,GAAA;AAAA,2BAC7G,MAAsD;AAAA,kBAA1CjB,EAAM,SAAlBkB,EAAsDC,EAAA,QAAA,UAAA;AAAA;oBAAb,QAAQF;AAAA,kBAAA;;;;;;uBAIvDT,EAAA,GAAAC,EAEWC,MAFXK,EAEW;AAAA;;aAFcR,GAAM;AAAA,YAAG,KAAKG,EAAAR,CAAA,EAAY,WAAWK,EAAOG,EAAAR,CAAA,EAAY,QAAQ,IAAIK,EAAO;AAAA,UAAA;uBAClG,MAA2D;AAAA,cAA/CP,EAAM,SAAlBkB,EAA2DC,EAAA,QAAA,UAAA;AAAA;gBAAlB,QAAAZ;AAAA,cAAA;;;;;;;;MAG7BP,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCkB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCkB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBkB,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERnB,EAAM;cAAQ;AAAA,cAC5B,MAAqB;AAAA,UAArBkB,EAAqBC,EAAA,QAAA,OAAA;AAAA,QAAA;;;MAEPnB,EAAM;cAAM;AAAA,cAC1B,MAAqC;AAAA,UAArCkB,EAAqCC,EAAA,QAAA,OAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEnBJ,EAAM;cAAU;AAAA,cAC9B,MAAuB;AAAA,UAAvBkB,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;MAETnB,EAAM;cAAQ;AAAA,cAC5B,CAAwD,EADnB,OAAAoB,GAAK,OAASC,QAAU;AAAA,UAC7DH,EAAwDC,EAAA,QAAA,SAAA;AAAA,YAApC,OAAAC;AAAA,YAAe,OAAOC;AAAA,UAAA;;;;;;ICpEnCC,IAASC;AAAA,EACpBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,SAAS,IAAM,UAAU,IAAM;AAAA,EACjEC,EAAcC,EAAY,MAAM;AAClC;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/select/select.vue","../../src/select/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { useField } from '@silver-formily/vue'\r\nimport { ElOption, ElOptionGroup, ElSelect } from 'element-plus'\r\nimport { omit } from 'lodash-es'\r\nimport { useCleanAttrs } from '../__builtins__'\r\n\r\ndefineOptions({\r\n name: 'FSelect',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps<{\r\n options?: Array<OptionType | OptionGroupType>\r\n}>()\r\n\r\nconst slots = defineSlots<{\r\n option?: (props: { option: OptionType }) => any\r\n header?: () => any\r\n footer?: () => any\r\n prefix?: () => any\r\n empty?: () => any\r\n tag?: () => any\r\n loading?: () => any\r\n label?: () => any\r\n}>()\r\n\r\ntype OptionType = InstanceType<typeof ElOption>['$props']\r\ntype OptionGroupType = InstanceType<typeof ElOptionGroup>['$props'] & {\r\n options: OptionType[]\r\n}\r\n\r\nconst { props: selectProps } = useCleanAttrs()\r\n\r\nconst fieldRef = useField()\r\n\r\nfunction isGroup(option: OptionType | OptionGroupType): option is OptionGroupType {\r\n return (option as OptionGroupType).options !== undefined\r\n}\r\n</script>\r\n\r\n<template>\r\n <ElSelect v-bind=\"selectProps\">\r\n <template v-for=\"option of props.options\">\r\n <template v-if=\"isGroup(option)\">\r\n <ElOptionGroup v-bind=\"omit(option, 'options')\" :key=\"option.label\">\r\n <ElOption v-for=\"i of option.options\" :key=\"selectProps.valueKey ? i[selectProps.valueKey] : i.label\" v-bind=\"i\">\r\n <slot v-if=\"slots.option\" name=\"option\" :option=\"i\" />\r\n </ElOption>\r\n </ElOptionGroup>\r\n </template>\r\n <ElOption v-else v-bind=\"option\" :key=\"selectProps.valueKey ? option[selectProps.valueKey] : option.label\">\r\n <slot v-if=\"slots.option\" name=\"option\" :option=\"option\" />\r\n </ElOption>\r\n </template>\r\n <template v-if=\"slots.header\" #header>\r\n <slot name=\"header\" :field=\"fieldRef\" />\r\n </template>\r\n <template v-if=\"slots.footer\" #footer>\r\n <slot name=\"footer\" :field=\"fieldRef\" />\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\" :field=\"fieldRef\" />\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=\"{ label, value: labelValue }\">\r\n <slot name=\"label\" :label=\"label\" :value=\"labelValue\" />\r\n </template>\r\n </ElSelect>\r\n</template>\r\n","import { connect, mapProps } from '@silver-formily/vue'\r\nimport { mapReadPretty } from '../__builtins__'\r\nimport { PreviewText } from '../preview-text'\r\nimport FSelect from './select.vue'\r\n\r\nexport const Select = connect<typeof FSelect>(\r\n FSelect,\r\n mapProps({ dataSource: 'options', loading: true, disabled: true }),\r\n mapReadPretty(PreviewText.Select),\r\n)\r\n\r\nexport default Select\r\n"],"names":["props","__props","slots","_useSlots","selectProps","useCleanAttrs","fieldRef","useField","isGroup","option","_openBlock","_createBlock","_unref","_createSlots","_createElementBlock","_Fragment","_renderList","_mergeProps","omit","i","_renderSlot","_ctx","label","labelValue","Select","connect","FSelect","mapProps","mapReadPretty","PreviewText"],"mappings":";;;;;;;;;;;;;;;AAWA,UAAMA,IAAQC,GAIRC,IAAQC,EAAA,GAgBR,EAAE,OAAOC,EAAA,IAAgBC,EAAA,GAEzBC,IAAWC,EAAA;AAEjB,aAASC,EAAQC,GAAiE;AAChF,aAAQA,EAA2B,YAAY;AAAA,IACjD;sBAIEC,EAAA,GAAAC,EAkCWC,UAlCOA,EAAAR,CAAA,CAAW,CAAA,GAAAS,EAAA;AAAA,iBACjB,MAA+B;AAAA,SAAzCH,EAAA,EAAA,GAAAI,EAWWC,GAAA,MAAAC,EAXgBhB,EAAM,UAAhBS;UACCD,EAAQC,CAAM,KAC5BC,EAAA,GAAAC,EAIgBC,MAJhBK,EAIgB;AAAA;;aAJOL,EAAAM,CAAA,EAAKT,GAAM,SAAA,GAAA;AAAA,YAAe,KAAKA,EAAO;AAAA,UAAA;uBACjD,MAA2B;AAAA,eAArCC,EAAA,EAAA,GAAAI,EAEWC,GAAA,MAAAC,EAFWP,EAAO,UAAZU,OAAjBT,KAAAC,EAEWC,MAFXK,EAEW;AAAA,gBAF4B,KAAKL,EAAAR,CAAA,EAAY,WAAWe,EAAEP,EAAAR,CAAA,EAAY,QAAQ,IAAIe,EAAE;AAAA,cAAA,oBAAeA,CAAC,GAAA;AAAA,2BAC7G,MAAsD;AAAA,kBAA1CjB,EAAM,SAAlBkB,EAAsDC,EAAA,QAAA,UAAA;AAAA;oBAAb,QAAQF;AAAA,kBAAA;;;;;;uBAIvDT,EAAA,GAAAC,EAEWC,MAFXK,EAEW;AAAA;;aAFcR,GAAM;AAAA,YAAG,KAAKG,EAAAR,CAAA,EAAY,WAAWK,EAAOG,EAAAR,CAAA,EAAY,QAAQ,IAAIK,EAAO;AAAA,UAAA;uBAClG,MAA2D;AAAA,cAA/CP,EAAM,SAAlBkB,EAA2DC,EAAA,QAAA,UAAA;AAAA;gBAAlB,QAAAZ;AAAA,cAAA;;;;;;;;MAG7BP,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCkB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAwC;AAAA,UAAxCkB,EAAwCC,EAAA,QAAA,UAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEtBJ,EAAM;cAAS;AAAA,cAC7B,MAAsB;AAAA,UAAtBkB,EAAsBC,EAAA,QAAA,QAAA;AAAA,QAAA;;;MAERnB,EAAM;cAAQ;AAAA,cAC5B,MAAqB;AAAA,UAArBkB,EAAqBC,EAAA,QAAA,OAAA;AAAA,QAAA;;;MAEPnB,EAAM;cAAM;AAAA,cAC1B,MAAqC;AAAA,UAArCkB,EAAqCC,EAAA,QAAA,OAAA,EAAnB,OAAOT,EAAAN,CAAA,EAAA,CAAQ;AAAA,QAAA;;;MAEnBJ,EAAM;cAAU;AAAA,cAC9B,MAAuB;AAAA,UAAvBkB,EAAuBC,EAAA,QAAA,SAAA;AAAA,QAAA;;;MAETnB,EAAM;cAAQ;AAAA,cAC5B,CAAwD,EADnB,OAAAoB,GAAK,OAASC,QAAU;AAAA,UAC7DH,EAAwDC,EAAA,QAAA,SAAA;AAAA,YAApC,OAAAC;AAAA,YAAe,OAAOC;AAAA,UAAA;;;;;;ICpEnCC,IAASC;AAAA,EACpBC;AAAAA,EACAC,EAAS,EAAE,YAAY,WAAW,SAAS,IAAM,UAAU,IAAM;AAAA,EACjEC,EAAcC,EAAY,MAAM;AAClC;"}
@@ -2,12 +2,9 @@ import { useField as W, connect as z, mapProps as G } from "@silver-formily/vue"
2
2
  import { defineComponent as U, ref as g, computed as j, watch as R, nextTick as v, createElementBlock as S, openBlock as c, normalizeClass as A, unref as n, createCommentVNode as J, withDirectives as Q, createElementVNode as X, createVNode as V, toDisplayString as Y, withCtx as f, createTextVNode as C, createBlock as y, mergeProps as w, renderSlot as Z, Fragment as ee, renderList as le } from "vue";
3
3
  import { isValid as te, isEqual as oe, isFn as ae } from "@formily/shared";
4
4
  import { useAttrs as re, ElLink as ne, version as E, ElTable as ue, ElTableColumn as b, ElRadioGroup as ie, ElRadio as se, vLoading as ce } from "element-plus";
5
- import { stylePrefix as x } from "../__builtins__/configs/index.mjs";
6
- import "@formily/reactive";
7
- import { lt as K } from "../__builtins__/shared/simple-version-compare.mjs";
8
- import "@formily/core";
9
- import "@silver-formily/reactive-vue";
10
- import { u as L, x as de, d as me, a as fe, r as pe } from "../vendor/lodash.mjs";
5
+ import { u as x, x as de, d as me, a as fe, r as pe } from "../vendor/lodash.mjs";
6
+ import { stylePrefix as K } from "../__builtins__/configs/index.mjs";
7
+ import { lt as L } from "../__builtins__/shared/simple-version-compare.mjs";
11
8
  import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
12
9
  name: "FSelectTable",
13
10
  inheritAttrs: !1,
@@ -31,7 +28,7 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
31
28
  setup(B, { emit: D }) {
32
29
  const e = B, d = D, _ = re(), q = W();
33
30
  function F(l) {
34
- return K(E, "2.6.0") ? { label: l } : { value: l };
31
+ return L(E, "2.6.0") ? { label: l } : { value: l };
35
32
  }
36
33
  const s = g(), t = e.rowKey;
37
34
  function M() {
@@ -45,7 +42,7 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
45
42
  R(
46
43
  () => e.dataSource,
47
44
  async () => {
48
- const l = L(
45
+ const l = x(
49
46
  u.value.map((a) => a[t])
50
47
  );
51
48
  if (await v(), !!s.value)
@@ -92,7 +89,7 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
92
89
  [...u.value, ...l],
93
90
  (r, o) => r[t] === o[t]
94
91
  ), a.length > 0) {
95
- const r = L(a.map((o) => o[t]));
92
+ const r = x(a.map((o) => o[t]));
96
93
  pe(u.value, (o) => r.includes(o[t]));
97
94
  }
98
95
  if (e.optionAsValue)
@@ -124,16 +121,16 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
124
121
  return e.selectable && ae(e.selectable) ? e.selectable(l, a, q.value) : !0;
125
122
  }
126
123
  return (l, a) => (c(), S("div", {
127
- class: A(`${n(x)}-select-table`)
124
+ class: A(`${n(K)}-select-table`)
128
125
  }, [
129
126
  k.value > 0 && e.showAlertToolbar ? (c(), S("div", {
130
127
  key: 0,
131
- class: A(`${n(x)}-select-table-alert-container`)
128
+ class: A(`${n(K)}-select-table-alert-container`)
132
129
  }, [
133
130
  X("span", null, "已选择 " + Y(k.value) + " 项", 1),
134
131
  V(n(ne), {
135
132
  type: "primary",
136
- underline: n(K)(n(E), "2.9.9") ? !1 : "never",
133
+ underline: n(L)(n(E), "2.9.9") ? !1 : "never",
137
134
  style: { "margin-left": "8px" },
138
135
  onClick: $
139
136
  }, {
@@ -195,12 +192,12 @@ import '../styles/select-table/index.css';const ye = /* @__PURE__ */ U({
195
192
  ])
196
193
  ], 2));
197
194
  }
198
- }), Ae = z(
195
+ }), he = z(
199
196
  ye,
200
197
  G({ dataSource: "dataSource", loading: "loading" })
201
198
  );
202
199
  export {
203
- Ae as SelectTable,
204
- Ae as default
200
+ he as SelectTable,
201
+ he as default
205
202
  };
206
203
  //# sourceMappingURL=index.mjs.map