cnhis-design-vue 3.1.46-beta.9 → 3.1.46-release.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 (133) hide show
  1. package/es/components/base-search/index.d.ts +8 -17
  2. package/es/components/base-search/src/index.vue.d.ts +8 -17
  3. package/es/components/base-search/src/index.vue2.js +1 -1
  4. package/es/components/base-search/style/index.css +1 -1
  5. package/es/components/button-print/src/utils/print.js +1 -1
  6. package/es/components/classification/index.d.ts +18 -219
  7. package/es/components/classification/src/components/search-filter/index.vue.d.ts +18 -219
  8. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  9. package/es/components/classification/src/components/set-classification/index.vue.d.ts +18 -219
  10. package/es/components/classification/src/index.vue.d.ts +18 -219
  11. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  19. package/es/components/fabric-chart/src/utils/index.d.ts +0 -1
  20. package/es/components/fabric-chart/src/utils/index.js +1 -1
  21. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  22. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +1 -1
  23. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
  24. package/es/components/index.css +1 -1
  25. package/es/components/index.d.ts +1 -2
  26. package/es/components/index.js +1 -1
  27. package/es/components/quick-search/index.d.ts +7 -21
  28. package/es/components/quick-search/src/index.vue.d.ts +7 -21
  29. package/es/components/quick-search/src/index.vue2.js +1 -1
  30. package/es/components/quick-search/style/index.css +1 -1
  31. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +17 -219
  32. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  33. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -17
  34. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  35. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +0 -19
  36. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  37. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +11 -178
  38. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  39. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +5 -1
  40. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -1
  41. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +1 -2
  42. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -1
  43. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +17 -217
  44. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  45. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +17 -219
  46. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  47. package/es/components/table-filter/src/components/render-widget/basicData.d.ts +4 -0
  48. package/es/components/table-filter/src/components/render-widget/basicData.js +1 -0
  49. package/es/components/table-filter/src/components/render-widget/components/{DateOut.vue.d.ts → Date.vue.d.ts} +2 -21
  50. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -0
  51. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -0
  52. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +8 -117
  53. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  54. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +9 -13
  55. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  56. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.d.ts +6 -8
  57. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
  58. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.d.ts +6 -7
  59. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -1
  60. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +25 -19
  61. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
  62. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +36 -611
  63. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  64. package/es/components/table-filter/src/components/render-widget/enums.d.ts +3 -10
  65. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  66. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +6 -2
  67. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  68. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +3 -4
  69. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  70. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +35 -639
  71. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  72. package/es/components/table-filter/src/constants/index.d.ts +1 -3
  73. package/es/components/table-filter/src/constants/index.js +1 -1
  74. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +4 -9
  75. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  76. package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +3 -3
  77. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  78. package/es/components/table-filter/src/tool/baseOptions.d.ts +8 -0
  79. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  80. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +7 -0
  81. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -0
  82. package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
  83. package/es/components/table-filter/src/tool/transformData.js +1 -1
  84. package/es/components/table-filter/src/types/enums.d.ts +0 -3
  85. package/es/components/table-filter/src/types/enums.js +1 -1
  86. package/es/components/table-filter/src/types/index.d.ts +0 -7
  87. package/es/shared/package.json.js +1 -1
  88. package/es/shared/utils/fabricjs/index.js +1 -1
  89. package/package.json +2 -2
  90. package/es/components/table-export-field/index.d.ts +0 -967
  91. package/es/components/table-export-field/index.js +0 -1
  92. package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -192
  93. package/es/components/table-export-field/src/components/ExportModal.vue.js +0 -1
  94. package/es/components/table-export-field/src/components/ExportModal.vue2.js +0 -1
  95. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +0 -687
  96. package/es/components/table-export-field/src/components/SaveProjectModal.vue.js +0 -1
  97. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +0 -1
  98. package/es/components/table-export-field/src/constants/index.d.ts +0 -3
  99. package/es/components/table-export-field/src/constants/index.js +0 -1
  100. package/es/components/table-export-field/src/hooks/useAsyncData.d.ts +0 -6
  101. package/es/components/table-export-field/src/hooks/useAsyncData.js +0 -1
  102. package/es/components/table-export-field/src/index.vue.d.ts +0 -968
  103. package/es/components/table-export-field/src/index.vue.js +0 -1
  104. package/es/components/table-export-field/src/index.vue2.js +0 -1
  105. package/es/components/table-export-field/src/types/index.d.ts +0 -6
  106. package/es/components/table-export-field/src/types/index.js +0 -1
  107. package/es/components/table-export-field/style/index.css +0 -1
  108. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +0 -231
  109. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.js +0 -1
  110. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +0 -1
  111. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.js +0 -1
  112. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +0 -1
  113. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +0 -71
  114. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.js +0 -1
  115. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +0 -1
  116. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +0 -223
  117. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.js +0 -1
  118. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +0 -1
  119. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +0 -158
  120. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.js +0 -1
  121. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +0 -1
  122. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.d.ts +0 -27
  123. package/es/components/table-filter/src/components/render-widget/helpers/dateDisabled.js +0 -1
  124. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.d.ts +0 -55
  125. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +0 -1
  126. package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +0 -56
  127. package/es/components/table-filter/src/components/render-widget/helpers/enums.js +0 -1
  128. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.d.ts +0 -4
  129. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +0 -1
  130. package/es/components/table-filter/src/components/render-widget/helpers/setDefaultValue.d.ts +0 -4
  131. package/es/components/table-filter/src/components/render-widget/helpers/setDefaultValue.js +0 -1
  132. package/es/components/table-filter/src/hooks/useAsyncData.d.ts +0 -4
  133. package/es/components/table-filter/src/hooks/useAsyncData.js +0 -1
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as d,normalizeClass as o,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(),P=a(),I=t((()=>_.unit)),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){p("update:unit",e)}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":w.value=e;break;case"end":P.value=e}const t=w.value?g(w.value).format(R.value):null,l=P.value?g(P.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,P.value)}function G(e){return F(e,U.value,P.value)}function J(e){return M(e,U.value,w.value)}function K(e){return S(e,U.value,w.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){const[a,t]=e.split("~");return a.trim()&&(w.value=g(a.trim()).valueOf()),void(t.trim()&&(P.value=g(t.trim()).valueOf()))}w.value=P.value=null,p("update:unit","")}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:n(I),onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):d("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:o(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):d("v-if",!0),d(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:w.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:P.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):d("v-if",!0)]))}});export{_ as default};
1
+ import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as v,renderList as d,normalizeClass as i,toDisplayString as o,createCommentVNode as n,createVNode as s,unref as c,withCtx as m,createTextVNode as p,createElementVNode as f}from"vue";import{NButton as y}from"naive-ui";import b from"../../../../../date-picker/index.js";import h from"moment";import{isString as g}from"lodash-es";import{getAllDateRangeInfo as k}from"../helpers/presetValToTimestamp.js";const Y={class:"render-widget-date-range"},F={key:0,class:"radio-date-group"},M=["onClick"],D={key:1,class:"date-detail-range"},S=f("span",{class:"divider"},null,-1);var w=e({__name:"DateRangeInner",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const w=e,P=a([]),C=a(!1),_=a(""),j=a(),x=a(),H=l((()=>{let e="";switch(w.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),O=l((()=>{let e="";switch(w.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e}));function T(e,a){switch(a){case"start":j.value=e;break;case"end":x.value=e}const l=j.value?h(j.value).format(H.value):null,t=x.value?h(x.value).format(H.value):null;f("update:value",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}function U(e){return!!x.value&&e>x.value}function $(e){return!!j.value&&e<j.value}return t((()=>w.value),(e=>{if(e&&g(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(j.value=h(a.trim()).valueOf()),void(l.trim()&&(x.value=h(l.trim()).valueOf()))}j.value=x.value=null,_.value=""}),{immediate:!0}),function(){const e=k(H.value);P.value=e}(),(a,l)=>(u(),r("div",Y,[C.value?n("v-if",!0):(u(),r("div",F,[(u(!0),r(v,null,d(P.value,(e=>(u(),r("span",{key:e.value,class:i(["radio-date-item",_.value===e.value?"radio-date-item-active":""]),onClick:a=>{return l=e.value,_.value===l?_.value="":_.value=l,void(_.value&&f("update:value",_.value));var l}},o(e.label),11,M)))),128))])),s(c(y),{secondary:"",class:i(C.value?"select-date-right":"select-date-left"),onClick:l[0]||(l[0]=e=>C.value=!C.value)},{default:m((()=>[p(o(c(O)),1)])),_:1},8,["class"]),C.value?(u(),r("div",D,[s(c(b),{type:e.type,to:"body","default-time":"00:00:00",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:j.value,"is-date-disabled":U,"onUpdate:value":l[1]||(l[1]=e=>T(e,"start"))},null,8,["type","clearable","valueFormat","placeholder","value"]),S,s(c(b),{type:e.type,to:"body","default-time":"23:59:59",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:x.value,"is-date-disabled":$,"onUpdate:value":l[2]||(l[2]=e=>T(e,"end"))},null,8,["type","clearable","valueFormat","placeholder","value"])])):n("v-if",!0)]))}});export{w as default};
@@ -1,5 +1,4 @@
1
1
  import { PropType } from 'vue';
2
- import { AnyObject } from '../../../../../../../es/shared/types';
3
2
  declare type ITypeDate = 'daterange' | 'datetimerange';
4
3
  declare const _default: import("vue").DefineComponent<{
5
4
  type: {
@@ -57,18 +56,15 @@ declare const _default: import("vue").DefineComponent<{
57
56
  }>>;
58
57
  emit: (event: "update:value", ...args: any[]) => void;
59
58
  valueCp: import("vue").Ref<any>;
60
- rangeShortcuts: import("vue").Ref<any>;
61
59
  dateFormat: import("vue").ComputedRef<string>;
62
- optionSetting: import("vue").ComputedRef<any>;
63
- handleChange: (val: any) => void;
64
- isDateDisabled: (ts: number) => boolean;
65
- timeDisabled: (ts: number) => {
66
- isHourDisabled(hour: number): boolean | undefined;
67
- isMinuteDisabled(minute: number, hour: number | null): boolean | undefined;
68
- isSecondDisabled(second: number, minute: number | null, hour: number | null): boolean | undefined;
60
+ rangeShortcuts: {
61
+ 今天: number[];
62
+ 昨天: number[];
63
+ 近一周: number[];
64
+ 近一月: number[];
69
65
  };
70
- init: () => void;
71
- CDatePicker: import("../../../../../../../es/shared/types").SFCWithInstall<import("vue").DefineComponent<{
66
+ handleChange: (val: any) => void;
67
+ CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
72
68
  updateUnchangedValue: {
73
69
  type: BooleanConstructor;
74
70
  };
@@ -87,7 +83,7 @@ declare const _default: import("vue").DefineComponent<{
87
83
  type: FunctionConstructor;
88
84
  };
89
85
  }>> & {}>>;
90
- datePickerRef: import("vue").Ref<AnyObject | null>;
86
+ datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
91
87
  panelInstRef: import("vue").Ref<null>;
92
88
  isDateTime: import("vue").ComputedRef<boolean>;
93
89
  formatRef: import("vue").ComputedRef<string>;
@@ -137,9 +133,9 @@ declare const _default: import("vue").DefineComponent<{
137
133
  }, {
138
134
  type: ITypeDate;
139
135
  value: string;
140
- componentCfg: Record<string, any>;
141
136
  clearable: boolean;
142
137
  startPlaceholder: string;
143
138
  endPlaceholder: string;
139
+ componentCfg: Record<string, any>;
144
140
  }>;
145
141
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as r,createBlock as o,unref as u}from"vue";import n from"../../../../../date-picker/index.js";import i from"moment";import{isString as s}from"lodash-es";import{WidgetOptionEnums as d}from"../../../types/enums.js";import{DateExtraOptions as p,DateExtraMap as m}from"../helpers/dateExtraMap.js";import{formatDateRangeInfo as c}from"../helpers/presetValToTimestamp.js";import{setDateDisabled as f,setTimeDisabled as v}from"../helpers/dateDisabled.js";var g=e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:g}){const h=e,y=t(),b=t(),P=a((()=>{let e="";switch(h.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),Y=a((()=>{var e;return null==(e=h.componentCfg)?void 0:e.widgetCfg.optionSetting}));function j(e){if(e){const[t,a]=e,l=`${i(t).format(P.value)} ~ ${i(a).format(P.value)}`;g("update:value",l)}else g("update:value",e)}function D(e){return f(e,Y.value)}function O(e){return v(e,Y.value)}return l((()=>h.value),(e=>{if(e&&s(e)&&e.includes("~")){const[t,a]=e.split("~");y.value=[i(t.trim()).valueOf(),i(a.trim()).valueOf()]}else y.value=null}),{immediate:!0}),function(){var e,t;const{originType:a}=null==(e=h.componentCfg)?void 0:e.widgetCfg,l=`${a}_${Y.value||d.ALL}_RANGE`,r=null!=(t=p[m[l]])?t:[];let o={};r.forEach((({label:e,value:t})=>{const a=c(t,P.value,Y.value,!0);if(a){const[t,l]=a;o[e]=[t.valueOf(),l.valueOf()]}})),b.value=o}(),(t,a)=>(r(),o(u(n),{to:"body",type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:y.value,"is-date-disabled":D,"is-time-disabled":O,shortcuts:b.value,"onUpdate:value":j},null,8,["type","clearable","startPlaceholder","endPlaceholder","value","shortcuts"]))}});export{g as default};
1
+ import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as d}from"vue";import s from"../../../../../date-picker/index.js";import f from"moment";import{isString as o}from"lodash-es";var n=e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:n}){const c=e,p=a(),v=t((()=>{let e="";switch(c.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),m={"今天":[f().startOf("day").valueOf(),f().endOf("day").valueOf()],"昨天":[f().subtract(1,"days").startOf("day").valueOf(),f().subtract(1,"days").endOf("day").valueOf()],"近一周":[f().subtract(1,"w").startOf("day").valueOf(),f().endOf("day").valueOf()],"近一月":[f().subtract(1,"months").startOf("day").valueOf(),f().endOf("day").valueOf()]};function i(e){if(e){const[a,t]=e,l=`${f(a).format(v.value)} ~ ${f(t).format(v.value)}`;n("update:value",l)}else n("update:value",e)}return l((()=>c.value),(e=>{if(e&&o(e)&&e.includes("~")){const[a,t]=e.split("~");p.value=[f(a.trim()).valueOf(),f(t.trim()).valueOf()]}else p.value=null}),{immediate:!0}),(a,t)=>(r(),u(d(s),{to:"body",type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:p.value,shortcuts:m,"onUpdate:value":i},null,8,["type","clearable","startPlaceholder","endPlaceholder","value"]))}});export{n as default};
@@ -1,21 +1,19 @@
1
1
  import { PropType } from 'vue';
2
- import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType } from '../../../../../../../es/components/table-filter/src/types';
3
- import { AnyObject } from '../../../../../../../es/shared/types';
2
+ import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType, ISearchType } from '../../../../../../../es/components/table-filter/src/types';
4
3
  declare const _default: import("vue").DefineComponent<{
5
4
  componentCfg: {
6
- type: PropType<AnyObject>;
5
+ type: PropType<ISearchType>;
7
6
  };
8
7
  value: {
9
8
  type: StringConstructor;
10
9
  default: string;
11
10
  };
12
11
  }, {
13
- getDynamicLabelData: (params: any, filterApiConfig: any) => Promise<any>;
14
- message: import("naive-ui").MessageApi;
12
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
15
13
  baseActiveColor: string;
16
14
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
17
15
  componentCfg: {
18
- type: PropType<AnyObject>;
16
+ type: PropType<ISearchType>;
19
17
  };
20
18
  value: {
21
19
  type: StringConstructor;
@@ -27,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
27
25
  emit: (event: "update:value", ...args: any[]) => void;
28
26
  selectedList: import("vue").Ref<string[]>;
29
27
  tagList: import("vue").Ref<never[]>;
30
- filterApiConfig: AnyObject;
28
+ filterApiConfig: import("../../../../..").AnyObject;
31
29
  categoryList: import("vue").ComputedRef<IFilterCategoryLabelItemType[]>;
32
30
  onResize: (el: HTMLElement, categoryItem: IFilterCategoryLabelItemType) => void;
33
31
  handleLabelUpfold: (categoryItem: IFilterCategoryLabelItemType) => void;
@@ -50,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
50
48
  };
51
49
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
52
50
  componentCfg: {
53
- type: PropType<AnyObject>;
51
+ type: PropType<ISearchType>;
54
52
  };
55
53
  value: {
56
54
  type: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as l,inject as t,watch as a,computed as o,openBlock as s,createElementBlock as n,Fragment as i,renderList as c,unref as r,createElementVNode as d,toDisplayString as u,normalizeClass as p,withDirectives as f,createBlock as m,normalizeStyle as b,withCtx as v,createVNode as h,withModifiers as y,createCommentVNode as g}from"vue";import{useMessage as k,NTag as S,NTooltip as w,NIcon as C}from"naive-ui";import{ChevronUpCircleOutline as x,ChevronDownCircleOutline as U}from"@vicons/ionicons5";import L from"../../../directive/resize.js";import j from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as T}from"../../../constants/index.js";import{isString as B}from"lodash-es";const _={class:"label-attr-filter-container"},z={class:"edit-f-label"},D={class:"label-f-content"},I={key:0,class:"label-f-unfold-btn"},A=["onClick"],H=d("span",null,"收起",-1),N=d("span",null,"展开",-1);var O=e({__name:"LabelInner",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:O}){const $=e,{getDynamicLabelData:q}=j(),E=k(),F="rgb(85, 133, 245)",G=l([]),J=l([]),K=t(T);a((()=>$.value),(e=>{const l=e&&B(e)?e.split("|#|"):[];G.value=l}),{immediate:!0});const M=o((()=>J.value&&J.value.length>0?J.value.map((e=>(e.labelList.map((e=>{e.isSelect=G.value.includes(e.labelShowText)})),e))):[])),P=e=>e.isSelect?{background:e.backgroundColor||F,borderColor:e.backgroundColor||F}:{};return(async()=>{try{const{widgetCfg:e={}}=$.componentCfg,{classifyStr:l=""}=e;let t=await q({classifyStr:l},K);if(t){const{list:e=[]}=t;J.value=e}}catch(e){E.error(`获取标签数据请求失败:${e}`),console.log(e)}})(),(e,l)=>(s(),n("div",_,[(s(!0),n(i,null,c(r(M),(e=>(s(),n("div",{class:"edit-labels-content",key:e.classifyId},[d("span",z,u(e.classifyName)+":",1),d("div",{class:p(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[f((s(),n("div",D,[(s(!0),n(i,null,c(e.labelList,(e=>(s(),m(r(S),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)G.value.push(l.labelShowText);else{const e=G.value.findIndex((e=>e===l.labelShowText));e>-1&&G.value.splice(e,1)}O("update:value",G.value.join("|#|"))})(l,e),style:b(P(e))},{default:v((()=>[h(r(w),{placement:"top-start",duration:0},{trigger:v((()=>[d("span",null,u(e.labelShowText),1)])),default:v((()=>[d("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[r(L),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(s(),n("div",I,[d("span",{class:"operate-btn",onClick:y((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(s(),n(i,{key:0},[H,h(r(C),{component:r(x),size:"16"},null,8,["component"])],64)):(s(),n(i,{key:1},[N,h(r(C),{component:r(U),size:"16"},null,8,["component"])],64))],8,A)])):g("v-if",!0)])))),128))]))}});export{O as default};
1
+ import{defineComponent as e,ref as l,inject as t,watch as s,computed as o,openBlock as n,createElementBlock as a,Fragment as i,renderList as c,unref as r,createElementVNode as d,toDisplayString as u,normalizeClass as p,withDirectives as f,createBlock as m,normalizeStyle as b,withCtx as v,createVNode as h,withModifiers as y,createCommentVNode as g}from"vue";import{NTag as k,NTooltip as S,NIcon as w}from"naive-ui";import{ChevronUpCircleOutline as C,ChevronDownCircleOutline as x}from"@vicons/ionicons5";import U from"../../../directive/resize.js";import L from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as j}from"../../../constants/index.js";import{isString as B}from"lodash-es";const T={class:"label-attr-filter-container"},_={class:"edit-f-label"},z={class:"label-f-content"},I={key:0,class:"label-f-unfold-btn"},q=["onClick"],A=d("span",null,"收起",-1),G=d("span",null,"展开",-1);var H=e({__name:"LabelInner",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:H}){const M=e,{handleGetConfigApi:N}=L(),O="rgb(85, 133, 245)",D=l([]),E=l([]),F=t(j);s((()=>M.value),(e=>{const l=e&&B(e)?e.split("|#|"):[];D.value=l}),{immediate:!0});const J=o((()=>E.value&&E.value.length>0?E.value.map((e=>(e.labelList.map((e=>{e.isSelect=D.value.includes(e.labelShowText)})),e))):[])),K=e=>e.isSelect?{background:e.backgroundColor||O,borderColor:e.backgroundColor||O}:{};return(async()=>{try{const{widgetCfg:e={}}=M.componentCfg,{classifyStr:l=""}=e;let t=await N({classifyStr:l},"requestListByClassify",{},F);if(t){const{list:e=[]}=t;E.value=e}}catch(e){console.log(e)}})(),(e,l)=>(n(),a("div",T,[(n(!0),a(i,null,c(r(J),(e=>(n(),a("div",{class:"edit-labels-content",key:e.classifyId},[d("span",_,u(e.classifyName)+":",1),d("div",{class:p(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[f((n(),a("div",z,[(n(!0),a(i,null,c(e.labelList,(e=>(n(),m(r(k),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)D.value.push(l.labelShowText);else{const e=D.value.findIndex((e=>e===l.labelShowText));e>-1&&D.value.splice(e,1)}H("update:value",D.value.join("|#|"))})(l,e),style:b(K(e))},{default:v((()=>[h(r(S),{placement:"top-start",duration:0},{trigger:v((()=>[d("span",null,u(e.labelShowText),1)])),default:v((()=>[d("span",null,u(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[r(U),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(n(),a("div",I,[d("span",{class:"operate-btn",onClick:y((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(n(),a(i,{key:0},[A,h(r(w),{component:r(C),size:"16"},null,8,["component"])],64)):(n(),a(i,{key:1},[G,h(r(w),{component:r(x),size:"16"},null,8,["component"])],64))],8,q)])):g("v-if",!0)])))),128))]))}});export{H as default};
@@ -1,23 +1,22 @@
1
1
  import { PropType } from 'vue';
2
2
  import { SelectOption } from 'naive-ui';
3
- import { AnyObject } from '../../../../../../../es/shared/types';
3
+ import { ISearchType } from '../../../../../../../es/components/table-filter/src/types';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  componentCfg: {
6
- type: PropType<AnyObject>;
6
+ type: PropType<ISearchType>;
7
7
  };
8
8
  value: {
9
9
  type: StringConstructor;
10
10
  default: string;
11
11
  };
12
12
  }, {
13
- getDynamicLabelData: (params: any, filterApiConfig: any) => Promise<any>;
13
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
14
14
  $attrs: {
15
15
  [x: string]: unknown;
16
16
  };
17
- message: import("naive-ui").MessageApi;
18
17
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
19
18
  componentCfg: {
20
- type: PropType<AnyObject>;
19
+ type: PropType<ISearchType>;
21
20
  };
22
21
  value: {
23
22
  type: StringConstructor;
@@ -28,14 +27,14 @@ declare const _default: import("vue").DefineComponent<{
28
27
  }>>;
29
28
  emit: (event: "update:value", ...args: any[]) => void;
30
29
  tagList: import("vue").Ref<never[]>;
31
- filterApiConfig: AnyObject;
30
+ filterApiConfig: import("../../../../..").AnyObject;
32
31
  valueCp: import("vue").WritableComputedRef<string[]>;
33
32
  optionList: import("vue").ComputedRef<SelectOption[]>;
34
33
  initTagList: () => Promise<void>;
35
34
  NSelect: any;
36
35
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
36
  componentCfg: {
38
- type: PropType<AnyObject>;
37
+ type: PropType<ISearchType>;
39
38
  };
40
39
  value: {
41
40
  type: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as a,inject as l,computed as o,openBlock as u,createBlock as s,unref as n,mergeProps as r,isRef as i}from"vue";import{useMessage as p,NSelect as c}from"naive-ui";import v from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as f}from"../../../constants/index.js";var m=e({__name:"LabelOut",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:m}){const h=e,{getDynamicLabelData:b}=v(),d=t(),g=p(),y=a([]),S=l(f),w=o({set(e){const t=e?e.join("|#|"):e;m("update:value",t)},get:()=>h.value?h.value.split("|#|"):[]}),x=o((()=>{if(y.value&&y.value.length>0){let e=[],t=[];return y.value.forEach((a=>{a.labelList.forEach((a=>{e.includes(a.labelShowText)||(e.push(a.labelShowText),t.push({label:a.labelShowText,value:a.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=h.componentCfg,{classifyStr:t=""}=e;let a=await b({classifyStr:t},S);if(a){const{list:e=[]}=a;y.value=e}}catch(e){g.error(`获取标签数据请求失败:${e}`),console.log(e)}})(),(e,t)=>(u(),s(n(c),r({to:"body"},n(d),{value:n(w),"onUpdate:value":t[0]||(t[0]=e=>i(w)?w.value=e:null),options:n(x)}),null,16,["value","options"]))}});export{m as default};
1
+ import{defineComponent as e,useAttrs as t,ref as l,inject as a,computed as o,openBlock as s,createBlock as u,unref as n,mergeProps as i,isRef as r}from"vue";import{NSelect as p}from"naive-ui";import c from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as f}from"../../../constants/index.js";var v=e({__name:"LabelOut",props:{componentCfg:{type:Object},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:v}){const m=e,{handleGetConfigApi:h}=c(),d=t(),b=l([]),g=a(f),y=o({set(e){const t=e?e.join("|#|"):e;v("update:value",t)},get:()=>m.value?m.value.split("|#|"):[]}),x=o((()=>{if(b.value&&b.value.length>0){let e=[],t=[];return b.value.forEach((l=>{l.labelList.forEach((l=>{e.includes(l.labelShowText)||(e.push(l.labelShowText),t.push({label:l.labelShowText,value:l.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=m.componentCfg,{classifyStr:t=""}=e;let l=await h({classifyStr:t},"requestListByClassify",{},g);if(l){const{list:e=[]}=l;b.value=e}}catch(e){console.log(e)}})(),(e,t)=>(s(),u(n(p),i({to:"body"},n(d),{value:n(y),"onUpdate:value":t[0]||(t[0]=e=>r(y)?y.value=e:null),options:n(x)}),null,16,["value","options"]))}});export{v as default};
@@ -1,39 +1,45 @@
1
+ import { SelectOption } from 'naive-ui';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  value: {
3
4
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
4
5
  };
5
- componentCfg: {
6
- type: ObjectConstructor;
7
- };
8
6
  }, {
9
- $attrs: {
10
- [x: string]: unknown;
11
- };
12
7
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
13
8
  value: {
14
9
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
15
10
  };
16
- componentCfg: {
17
- type: ObjectConstructor;
18
- };
19
11
  }>> & {
20
12
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
13
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
21
14
  }>>;
22
- emit: (event: "update:value", ...args: any[]) => void;
23
- valueCp: import("vue").ComputedRef<string | number | unknown[] | undefined>;
24
- isMultiple: import("vue").ComputedRef<unknown>;
25
- isShowWhole: import("vue").ComputedRef<any>;
26
- optionList: import("vue").ComputedRef<any>;
27
- handleUpdate: (val: any) => void;
15
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
16
+ $attrs: {
17
+ [x: string]: unknown;
18
+ };
19
+ emit: (event: "update:value" | "changeInitState", ...args: any[]) => void;
20
+ selectOptions: import("vue").Ref<any[]>;
21
+ isRemote: import("vue").Ref<boolean>;
22
+ isLoading: import("vue").Ref<boolean>;
23
+ filterApiConfig: import("../../../../..").AnyObject;
24
+ valueCp: import("vue").WritableComputedRef<unknown>;
25
+ searchOptions: (keyword: string) => Promise<any>;
26
+ _handleSearch: (query: string) => Promise<void>;
27
+ handleSearch: (query: string) => Promise<void>;
28
+ handleInitData: () => Promise<void>;
29
+ renderLabel: (option: SelectOption) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
30
+ [key: string]: any;
31
+ }>;
32
+ renderTag: ({ option, handleClose }: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
33
+ [key: string]: any;
34
+ }>;
35
+ init: () => Promise<void>;
28
36
  NSelect: any;
29
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "changeInitState")[], "update:value" | "changeInitState", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
38
  value: {
31
39
  type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
32
40
  };
33
- componentCfg: {
34
- type: ObjectConstructor;
35
- };
36
41
  }>> & {
37
42
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
43
+ onChangeInitState?: ((...args: any[]) => any) | undefined;
38
44
  }, {}>;
39
45
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,computed as r,openBlock as u,createBlock as o,unref as n,mergeProps as a}from"vue";import{NSelect as i}from"naive-ui";import{WholeSelectObj as l}from"../helpers/selectExtraMap.js";import{WidgetValEnums as p}from"../../../types/enums.js";var s=e({__name:"Select",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:s}){const m=e,v=t(),f=r((()=>m.value)),c=r((()=>v.multiple)),d=r((()=>{const{widgetCfg:e}=m.componentCfg,{showWholeOption:t=!1}=e;return t})),g=r((()=>{const{widgetCfg:e}=m.componentCfg,{valueList:t=[]}=e;if(d.value){return[JSON.parse(JSON.stringify(l)),...t]}return t}));function y(e){if(d.value&&c.value&&Array.isArray(e)&&e.includes(p.WHOLE)){const t=e.slice(-1);if(t.includes(p.WHOLE))return void s("update:value",t);const r=e.filter((e=>e!==p.WHOLE));s("update:value",r)}else s("update:value",e)}return(e,t)=>(u(),o(n(i),a(n(v),{options:n(g),value:n(f),"onUpdate:value":y}),null,16,["options","value"]))}});export{s as default};
1
+ import{defineComponent as e,useAttrs as a,ref as t,inject as n,computed as l,openBlock as o,createBlock as i,unref as u,mergeProps as r,isRef as s,h as c}from"vue";import{NSelect as p,NTag as v}from"naive-ui";import{useDebounceFn as d}from"@vueuse/core";import f from"../../../hooks/useMixins.js";import{InjectionFilterApiConfig as m}from"../../../constants/index.js";var y=e({__name:"Select",props:{value:{type:[Array,String,Number]}},emits:["update:value","changeInitState"],setup(e,{emit:y}){const g=e,{handleGetConfigApi:h}=f(),b=a(),w=t([]),I=t(!1),S=t(!1),A=n(m),O=l({set(e){const a=Array.isArray(e)?e:e?[e]:null;y("update:value",a)},get(){var e;if(Array.isArray(g.value)&&g.value.length>0){const{multiple:e}=b;return e||1!=g.value.length?g.value:g.value[0]}return null!=(e=g.value)?e:null}});async function k(e){try{if(b.dynamicOptionInfo){const{autograph:a,dataSourceId:t,dataSourceType:n,filterKeys:l,showKeys:o,valueKey:i}=b.dynamicOptionInfo;let u={wordbookId:t,autograph:a,wordbookType:n,fieldKeys:l,page:1};l.length>0&&(u[l[0]]=e),S.value=!0;let r=await h(u,"requestDynamicSelect",{},A);if(r){const{fieldList:e=[],rows:a=[]}=r,t=a.map((e=>({...e,label:e[o[0]],value:e[i]})));return w.value=t,t}}}catch(e){console.log(e)}finally{S.value=!1}}const K=d((async e=>{await async function(e){const{manualMapping:a}=b;if(!a){const a=e.trim();await k(a)}}(e)}),300);async function M(){const{manualMapping:e,dynamicOptionInfo:a,valueList:t}=b;if(e&&Array.isArray(t))return I.value=!1,void(w.value=t.map((({value:e,label:a})=>({value:e,label:a}))));Object.keys(a).length>0&&A&&(I.value=!0,await k(""))}function x(e){const{manualMapping:a}=b;if(a)return c("div",e.label);const{showKeys:t=[]}=b.dynamicOptionInfo;return b.dynamicOptionInfo&&t.length>0?c("div",{class:"select-widget-dynamic-option"},t.map((a=>c("span",{class:"select-widget-dynamic-item"},e[a])))):c("div",e.label)}function C({option:e,handleClose:a}){const{multiple:t}=b;return t?c(v,{style:{padding:"0 8px"},closable:!0,onClose:e=>{e.stopPropagation(),a()}},{default:()=>c("div",e.label)}):c("div",e.label)}return async function(){const{manualMapping:e,defValue:a,defValueUnit:t,_frontId:n,isInit:l}=b;await M();const o=Array.isArray(g.value)?g.value.length>0:g.value;if(!l&&!o){if(e)return y("update:value",a),void y("changeInitState",n,!0);if(t)switch(t){case"FIRST":{const e=w.value[0];y("update:value",[e.value]),y("changeInitState",n,!0);break}}}}(),(e,a)=>(o(),i(u(p),r(u(b),{value:u(O),"onUpdate:value":a[0]||(a[0]=e=>s(O)?O.value=e:null),to:"body",loading:S.value,options:w.value,remote:I.value,"render-label":x,"render-tag":C,onSearch:u(K),onClear:M}),null,16,["value","loading","options","remote","onSearch"]))}});export{y as default};