cnhis-design-vue 3.2.7-release.1 → 3.2.7-release.3

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 (196) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +2 -0
  3. package/es/components/base-search/src/index.vue.d.ts +2 -0
  4. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  5. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  6. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  8. package/es/components/button-print/index.d.ts +27 -0
  9. package/es/components/button-print/src/ButtonPrint.vue.d.ts +27 -0
  10. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  11. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
  12. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  13. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
  14. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  15. package/es/components/button-print/style/index.css +1 -1
  16. package/es/components/callback/src/components/render/popupMaps.d.ts +27 -0
  17. package/es/components/classification/index.d.ts +60 -5
  18. package/es/components/classification/src/components/search-filter/index.vue.d.ts +60 -5
  19. package/es/components/classification/src/components/set-classification/index.vue.d.ts +60 -5
  20. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  21. package/es/components/classification/src/index.vue.d.ts +60 -5
  22. package/es/components/date-picker/index.d.ts +13 -0
  23. package/es/components/date-picker/src/DatePicker.vue.d.ts +13 -0
  24. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  29. package/es/components/field-set/src/FieldColor.vue.d.ts +26 -0
  30. package/es/components/field-set/src/components/condition.vue.d.ts +13 -0
  31. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +26 -0
  32. package/es/components/field-set/src/components/edit-filter.vue.d.ts +13 -0
  33. package/es/components/form-config/index.d.ts +37 -0
  34. package/es/components/form-config/src/FormConfig.vue.d.ts +37 -0
  35. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
  36. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +20 -0
  37. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  38. package/es/components/form-render/index.d.ts +14 -0
  39. package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
  40. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  41. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
  42. package/es/components/form-render/src/components/renderer/formItem.d.ts +9 -0
  43. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  44. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
  45. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
  46. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  47. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  48. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  49. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  50. package/es/components/form-render/src/types/index.d.ts +2 -1
  51. package/es/components/form-render/src/utils/business.js +1 -1
  52. package/es/components/form-render/src/utils/schema.d.ts +1 -1
  53. package/es/components/form-render/src/utils/schema.js +1 -1
  54. package/es/components/iho-chat/index.d.ts +269 -94
  55. package/es/components/iho-chat/src/Index.vue.d.ts +269 -94
  56. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  57. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +35 -13
  58. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  59. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +41 -14
  60. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  61. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +50 -14
  62. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  63. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +13 -20
  64. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  65. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +13 -0
  66. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  67. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +60 -11
  68. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  69. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  70. package/es/components/iho-chat/src/components/ContextMenu.d.ts +5 -5
  71. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  72. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +62 -24
  73. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  74. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  75. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -3
  76. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  77. package/es/components/iho-chat/src/components/Video.vue.d.ts +14 -2
  78. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  79. package/es/components/iho-chat/src/hooks/useSearchUserList.d.ts +11 -0
  80. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -0
  81. package/es/components/iho-chat/src/hooks/useSession.d.ts +1 -1
  82. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  83. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  84. package/es/components/iho-chat/src/hooks/useVideo.d.ts +11 -0
  85. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  86. package/es/components/iho-chat/src/types/index.d.ts +0 -1
  87. package/es/components/iho-chat/src/utils/index.js +1 -1
  88. package/es/components/iho-chat/style/index.css +1 -1
  89. package/es/components/iho-table/index.d.ts +13 -0
  90. package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -0
  91. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  92. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +13 -0
  93. package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -0
  94. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -0
  95. package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.d.ts +13 -0
  96. package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.js +1 -0
  97. package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue2.js +1 -0
  98. package/es/components/iho-table/src/plugins/index.js +1 -1
  99. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +13 -0
  100. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  101. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +20 -2
  102. package/es/components/iho-table/src/types/index.d.ts +3 -0
  103. package/es/components/iho-table/src/utils/index.d.ts +0 -1
  104. package/es/components/iho-table/src/utils/index.js +1 -1
  105. package/es/components/index.css +1 -1
  106. package/es/components/info-header/index.d.ts +34 -0
  107. package/es/components/info-header/src/InfoHeader.vue.d.ts +34 -0
  108. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
  109. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -1
  110. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
  111. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +16 -0
  112. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -1
  113. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
  114. package/es/components/quick-search/src/index.vue2.js +1 -1
  115. package/es/components/scale-view/index.d.ts +23 -1
  116. package/es/components/scale-view/src/ScaleView.vue.d.ts +23 -1
  117. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  118. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +21 -1
  119. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -1
  120. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  121. package/es/components/scale-view/src/directive/drag-move.d.ts +3 -0
  122. package/es/components/scale-view/src/directive/drag-move.js +1 -0
  123. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
  124. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  125. package/es/components/scale-view/style/index.css +1 -1
  126. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  127. package/es/components/shortcut-setter/index.d.ts +15 -0
  128. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
  129. package/es/components/steps-wheel/index.d.ts +1 -1
  130. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  131. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +13 -0
  132. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +13 -0
  133. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +13 -0
  134. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +13 -0
  135. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +47 -5
  136. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +13 -0
  137. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +13 -0
  138. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +37 -19
  139. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  140. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +47 -5
  141. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  142. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +47 -5
  143. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +13 -0
  144. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +13 -0
  145. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +13 -0
  146. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -0
  147. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +33 -18
  148. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  149. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +13 -0
  150. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
  151. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +69 -4
  152. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +69 -4
  153. package/es/components/table-filter/src/tool/transformData.js +1 -1
  154. package/es/components/table-filter/src/types/index.d.ts +3 -0
  155. package/es/components/time-line/index.d.ts +4 -4
  156. package/es/components/time-line/src/TimeLine.vue.d.ts +1 -1
  157. package/es/components/time-line/src/TimeLine.vue2.js +1 -1
  158. package/es/components/time-picker/index.d.ts +20 -2
  159. package/es/components/time-picker/src/TimePicker.vue.d.ts +21 -2
  160. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  161. package/es/env.d.ts +25 -25
  162. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  163. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  164. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  165. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  166. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  167. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  168. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  169. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  170. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  171. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  172. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  173. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  174. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  175. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  176. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  177. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  178. package/es/shared/assets/img/failure.png.js +1 -1
  179. package/es/shared/assets/img/no-permission.png.js +1 -1
  180. package/es/shared/assets/img/nodata.png.js +1 -1
  181. package/es/shared/assets/img/notfound.png.js +1 -1
  182. package/es/shared/assets/img/qr.png.js +1 -1
  183. package/es/shared/assets/img/success.png.js +1 -1
  184. package/es/shared/assets/img/table_style_2.png.js +1 -1
  185. package/es/shared/assets/img/video.png.js +1 -1
  186. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  187. package/es/shared/assets/img/xb_big.png.js +1 -1
  188. package/es/shared/assets/img/xb_small.png.js +1 -1
  189. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  190. package/es/shared/package.json.js +1 -1
  191. package/es/shared/utils/business.js +1 -1
  192. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  193. package/es/shared/utils/tapable/index.d.ts +139 -0
  194. package/package.json +2 -2
  195. package/es/components/iho-table/src/plugins/headerPlugin.d.ts +0 -1
  196. package/es/components/iho-table/src/plugins/headerPlugin.js +0 -1
@@ -1 +1 @@
1
- import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as l}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...i(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...i(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function x(x,_){const{createValidatorSchema:h}=c(),b=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==_?void 0:_.beforeSetValue,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=h(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},v=e=>{var o,t,n,l,s,a,p,c,d,x,_,h,v,g;const y=b(e);e.urlConfig?u(y,e):e.autograph&&m(y,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=f(null!=(l=null==(n=e.componentProps)?void 0:n.selectAll)?l:e.selectAll),A=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(x=null==(d=e.componentProps)?void 0:d.showField)?x:e.show_key,k=null!=(h=null==(_=e.componentProps)?void 0:_.options)?h:e.option,N=null!=(g=r(e.multi_select_value))?g:null==(v=e.componentProps)?void 0:v.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:A,showField:j,maxTagCount:N,selectAll:O,...i(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},g=e=>{var o,t;const n=b(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},y=e=>{const t=b(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},w=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark},"x-content":e.slots}),C=new Map([["LINEBAR",w],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=b(e);return Object.assign(o["x-component-props"],{...i(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=b(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=b(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:r(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",v],["REMOTE_SEARCH",v],["DATE",e=>{const o=b(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=b(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:d(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=b(e);return Object.assign(o["x-component-props"],{...i(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=b(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=b(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=b(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=b(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=b(e);Array.isArray(e.properties)&&l("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?k(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],i(e,["wrapperStyle","display"])),o}]]),O=e=>{if(e.suffixConfig)return A(e);return(C.get(e.html_type)||y)(e)},A=o=>{if(!o.suffixConfig&&!o.prefixConfig)return O(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=b(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:k(n)}),i},{FieldNormalizeWaterfallHook:E,FieldListNormalizeWaterfallHook:j}=s();function k(o,i={column:9999}){let r=null;const l=j.call(t(o),i).reduce(((e,o,n)=>{var l;const a=null==(l=(o=E.call(o,i)).validate)?void 0:l.obj_type;return a&&x&&x.collect(a,t(o)),"LINEBAR"===o.html_type?(e[p(o)]=s(w(o),n),r=e[p(o)].properties={}):r?r[p(o)]=s(O(o),n):(r=null,e[p(o)]=s(O(o),n)),e}),{});return i.linebarAutoHidden&&Object.values(l).forEach((e=>{if("LINEBAR"!==e["x-component"])return;e["x-reactions"]?e["x-reactions"]=n(e["x-reactions"]):e["x-reactions"]=[];const o=Object.keys(e.properties||{}).map((o=>`${e.name}.${o}#selfDisplay`));e["x-reactions"].push({dependencies:o,fulfill:{state:{visible:"{{hasVisible($deps)}}"}}})})),l;function s(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function p(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:k}}export{x as useFieldListAdaptor};
1
+ import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,castArray as n,pick as i}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as l}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{traverseSchema as a,fieldKeyEscape as p,createLinebarId as c}from"../utils/schema.js";import{useFormValidator as d}from"./useFormValidator.js";import{transformDateFormat as m}from"../utils/business.js";function u(e,o){Object.assign(e["x-component-props"],{...i(o,["wordbook","autograph"])})}function x(e,o){Object.assign(e["x-component-props"],{...i(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(n,_){const{createValidatorSchema:b}=d(),v=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==_?void 0:_.beforeSetValue,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=b(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},g=e=>{var o,t,n,l,s,a,p,c,d,m,_,h,b,g;const y=v(e);e.urlConfig?x(y,e):e.autograph&&u(y,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=f(null!=(l=null==(n=e.componentProps)?void 0:n.selectAll)?l:e.selectAll),A=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(m=null==(d=e.componentProps)?void 0:d.showField)?m:e.show_key,k=null!=(h=null==(_=e.componentProps)?void 0:_.options)?h:e.option,N=null!=(g=r(e.multi_select_value))?g:null==(b=e.componentProps)?void 0:b.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:A,showField:j,maxTagCount:N,selectAll:O,...i(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},y=e=>{var o,t;const n=v(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?x(n,e):e.autograph&&u(n,e),n},w=e=>{const t=v(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},C=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:"1"===e.is_not_fold,id:c(e.val_key),show:"0"!==e.is_show,remark:e.remark},"x-content":e.slots}),O=new Map([["LINEBAR",C],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=v(e);return Object.assign(o["x-component-props"],{...i(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=v(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=v(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:r(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",g],["REMOTE_SEARCH",g],["DATE",e=>{const o=v(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:m(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=v(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:m(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=v(e);return Object.assign(o["x-component-props"],{...i(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=v(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=v(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",y],["CHECKBOX",y],["SWITCH",e=>{const o=v(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=v(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=v(e);Array.isArray(e.properties)&&l("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?N(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],i(e,["wrapperStyle","display"])),o}]]),A=e=>{if(e.suffixConfig)return E(e);return(O.get(e.html_type)||w)(e)},E=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(o);const t=v(o),n=o.suffixConfig?e(o.suffixConfig):[],i=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:o.is_show}))),{...o,hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...n.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:o.is_show})))],r=i.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(t,{type:"void",name:p(i),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...t["x-decorator-props"],showFeedback:!1,suffixFields:i.map((e=>e.val_key))},properties:N(i)}),t},{FieldNormalizeWaterfallHook:j,FieldListNormalizeWaterfallHook:k}=s();function N(o,i={column:9999}){let r=null;const l=k.call(t(o),i).reduce(((e,o,l)=>{var a;const p=null==(a=(o=j.call(o,i)).validate)?void 0:a.obj_type;return p&&n&&n.collect(p,t(o)),"LINEBAR"===o.html_type?(e[c(o)]=s(C(o),l),r=e[c(o)].properties={}):r?r[c(o)]=s(A(o),l):(r=null,e[c(o)]=s(A(o),l)),e}),{});return i.linebarAutoHidden&&Object.values(l).forEach((e=>{"LINEBAR"===e["x-component"]&&h(e)})),a({properties:l,"x-root":!0},((e,o)=>{"INPUT_GROUP"===e["x-component"]&&h(e,!!o&&!o["x-root"])})),l;function s(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function c(o){return o.suffixConfig?p([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:N}}function h(e,o=!1){e["x-reactions"]?e["x-reactions"]=n(e["x-reactions"]):e["x-reactions"]=[];const t=Object.keys(e.properties||{}).map((t=>`${o?"*.":""}${e.name}.${t}#selfDisplay`));e["x-reactions"].push({dependencies:t,fulfill:{state:{visible:"{{hasVisible($deps)}}"}}})}export{_ as useFieldListAdaptor};
@@ -104,6 +104,7 @@ export declare function useFieldNormalize(): {
104
104
  linebarDirection: "horizontal" | "vertical";
105
105
  linebarTextDirection: "horizontal" | "vertical";
106
106
  autoWidth: number | boolean;
107
+ feedbackType: "default" | "tooltip";
107
108
  }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
108
109
  FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
109
110
  fieldList: FieldItem[];
@@ -208,5 +209,6 @@ export declare function useFieldNormalize(): {
208
209
  linebarDirection: "horizontal" | "vertical";
209
210
  linebarTextDirection: "horizontal" | "vertical";
210
211
  autoWidth: number | boolean;
212
+ feedbackType: "default" | "tooltip";
211
213
  }>], import("../../../../shared/utils/tapable").UnsetAdditionalOptions>;
212
214
  };
@@ -131,6 +131,7 @@ export type FieldItem = {
131
131
  bordered: boolean | string;
132
132
  displayMode: 'table' | 'form';
133
133
  editor_title: string;
134
+ editor_title_mode: 'EMBEDDED_FORM' | 'HOVER_TOOLTIP' | 'POPUP_ALERT';
134
135
  linebarWidth: string;
135
136
  linebarDirection: 'horizontal' | 'vertical';
136
137
  linebarTextDirection: 'horizontal' | 'vertical';
@@ -15,7 +15,7 @@ export interface FieldVisitorContext {
15
15
  insertAfter(f: FieldItem | FieldItem[]): void;
16
16
  }
17
17
  export type FieldVisitor = Record<string, (context: FieldVisitorContext) => void>;
18
- export type AgeContext = Record<'age' | 'day' | 'month' | 'year' | 'hours', number>;
18
+ export type AgeContext = Record<'age' | 'day' | 'month' | 'year' | 'hours' | 'minutes', number>;
19
19
  export type IdCardParseInfo = Record<'sex' | 'birthday', string> & AgeContext;
20
20
  export type FormRenderExpose = {
21
21
  formModel: Form;
@@ -170,6 +170,7 @@ export type FormRenderProps = Partial<{
170
170
  linebarDirection: 'vertical' | 'horizontal';
171
171
  linebarTextDirection: 'vertical' | 'horizontal';
172
172
  autoWidth: boolean | number;
173
+ feedbackType: 'tooltip' | 'default';
173
174
  }>;
174
175
  export type FormBusinessFormatter = (payload: {
175
176
  fieldKey: string;
@@ -1 +1 @@
1
- import{differenceInDays as t,differenceInMonths as e,differenceInYears as n,differenceInHours as a,format as r}from"date-fns";import{isString as s}from"lodash-es";import{FIELD_AGE_UNIT as o,FIELD_SEX_VALUE as u}from"../constants/index.js";function d(t){return((t,e,n)=>{const a={},r=1-t.substr(e,1)%2;a.sex=1===r?u.FEMALE:u.MALE;const s=(2==n?"19":"")+t.substr(6,n),o=t.substr(6+n,2),d=t.substr(8+n,2);a.birthday=s+"-"+o+"-"+d+" 00:00";const c=new Date,i=c.getMonth()+1<parseInt(o,10)||c.getMonth()+1==parseInt(o,10)&&c.getDate()<parseInt(d,10)?1:0;return Object.assign(a,g(a.birthday)),a.age=a.year=c.getFullYear()-parseInt(s,10)-i,a})(t,15==t.length?14:16,15==t.length?2:4)}function c(t=""){if(!s(t)||!t)return"date";const e=t.includes("y"),n=t.includes("M"),a=t.includes("d"),r=t.includes("H"),o=t.includes("m"),u=t.includes("s");return e||n||a||!(r||o||u)?r||o||u?"datetime":!e||n||a?!e&&n&&a?"month":"date":"year":"time"}const i=/^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}(\d|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}))$/,h=/^[1-9]\d{5}\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}$/;function f(t){return i.test(t)&&function(t){if(!t||18!==t.length)return!1;const e=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let n=0;for(let a=0;a<17;a++)n+=+t[a]*e[a];return t.charAt(17).toUpperCase()===["1","0","X","9","8","7","6","5","4","3","2"][n%11]}(t)||h.test(t)}function l(t){return/^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(t)}function g(r){const s={},o=new Date,u=new Date(r);return s.day=t(o,u),s.month=e(o,u),s.age=s.year=n(o,u),s.hours=a(o,u),s}function m(t,e,n="yyyy-MM-dd HH:mm"){var a;const s=new Date,u={[o.MINUTE]:()=>d(s,"Minutes",t),[o.HOUR]:()=>d(s,"Hours",t),[o.DAY]:()=>d(s,"Date",t),[o.WEEK]:()=>d(s,"Date",7*t),[o.MONTH]:()=>d(s,"Month",t),[o.YEAR]:()=>d(s,"FullYear",t)};return null==(a=u[e])||a.call(u),r(function(t,e){const n=[{[o.DAY]:"Date",[o.WEEK]:"Date",[o.MONTH]:"Date",[o.YEAR]:"Date"},{[o.HOUR]:"Hours"},{[o.MINUTE]:"Minutes"}],a=n.findIndex((t=>Reflect.has(t,e)));~a&&n.slice(a+1).forEach((e=>{Object.values(e).forEach((e=>{t[`set${e}`]("Date"===e?1:0)}))}));return t.setSeconds(0),t}(s,e),n);function d(t,e,n){t[`set${e}`](t[`get${e}`]()-n)}}function M(t){const e=t.hours<24?{ageUnit:o.HOUR,age:Math.max(t.hours,1)}:t.day<30?{ageUnit:o.DAY,age:Math.max(t.day,1)}:t.day<365?{ageUnit:o.MONTH,age:Math.max(t.month,1)}:{ageUnit:o.YEAR,age:Math.max(t.year,1)};return e.age=Math.max(e.age,1),e}const D=/^(\d{4})-?(\d{2})-?(\d{2})?\s?(\d{2})?:?(\d{2})?:?(\d{2})?$/;function y(t){if(!s(t))return;const e=t.match(D);if(!e)return;const[,n,a,r,o,u,d]=e;return new Date(`${n}-${a}-${r||"01"} ${o||"00"}:${u||"00"}:${d||"00"}`)}export{y as businessDateParser,f as isIdCard,l as isMobile,m as parseAge2Birthday,M as parseAgeFromContext,g as parseBirthday,d as parseIdCard,c as transformDateFormat};
1
+ import{format as t,differenceInDays as e,differenceInMonths as n,differenceInYears as r,differenceInHours as s,differenceInMinutes as a}from"date-fns";import{isString as u}from"lodash-es";import{FIELD_AGE_UNIT as o,FIELD_SEX_VALUE as d}from"../constants/index.js";function i(t){return((t,e,n)=>{const r={},s=1-t.substr(e,1)%2;r.sex=1===s?d.FEMALE:d.MALE;const a=(2==n?"19":"")+t.substr(6,n),u=t.substr(6+n,2),o=t.substr(8+n,2);r.birthday=a+"-"+u+"-"+o+" 00:00";const i=new Date,c=i.getMonth()+1<parseInt(u,10)||i.getMonth()+1==parseInt(u,10)&&i.getDate()<parseInt(o,10)?1:0;return Object.assign(r,m(r.birthday)),r.age=r.year=i.getFullYear()-parseInt(a,10)-c,r})(t,15==t.length?14:16,15==t.length?2:4)}function c(t=""){if(!u(t)||!t)return"date";const e=t.includes("y"),n=t.includes("M"),r=t.includes("d"),s=t.includes("H"),a=t.includes("m"),o=t.includes("s");return e||n||r||!(s||a||o)?s||a||o?"datetime":!e||n||r?!e&&n&&r?"month":"date":"year":"time"}const l=/^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}(\d|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}))$/,f=/^[1-9]\d{5}\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}$/;function g(t){return l.test(t)&&function(t){if(!t||18!==t.length)return!1;const e=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];let n=0;for(let r=0;r<17;r++)n+=+t[r]*e[r];return t.charAt(17).toUpperCase()===["1","0","X","9","8","7","6","5","4","3","2"][n%11]}(t)||f.test(t)}function h(t){return/^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(t)}function m(t){const u={},o=new Date,d=new Date(t),i=[["day",e],["month",n],["year",r],["hours",s],["minutes",a]];return Object.defineProperties(u,i.reduce(((t,[e,n])=>(t[e]={get:(()=>{let t=null;return()=>(null===t&&(t=n(o,d)),t)})()},t)),{})),u}function M(e,n,r="yyyy-MM-dd HH:mm"){var s;const a=new Date,u={[o.MINUTE]:()=>d(a,"Minutes",e),[o.HOUR]:()=>d(a,"Hours",e),[o.DAY]:()=>d(a,"Date",e),[o.WEEK]:()=>d(a,"Date",7*e),[o.MONTH]:()=>d(a,"Month",e),[o.YEAR]:()=>d(a,"FullYear",e)};return null==(s=u[n])||s.call(u),t(function(t,e){const n=[{[o.DAY]:"Date",[o.WEEK]:"Date",[o.MONTH]:"Date",[o.YEAR]:"Date"},{[o.HOUR]:"Hours"},{[o.MINUTE]:"Minutes"}],r=n.findIndex((t=>Reflect.has(t,e)));~r&&n.slice(r+1).forEach((e=>{Object.values(e).forEach((e=>{t[`set${e}`]("Date"===e?1:0)}))}));return t.setSeconds(0),t}(a,n),r);function d(t,e,n){t[`set${e}`](t[`get${e}`]()-n)}}function D(t){const e=t.minutes<60?{ageUnit:o.MINUTE,age:t.minutes}:t.hours<24?{ageUnit:o.HOUR,age:t.hours}:t.day<30?{ageUnit:o.DAY,age:t.day}:t.day<365?{ageUnit:o.MONTH,age:t.month}:{ageUnit:o.YEAR,age:t.year};return e.age=Math.max(e.age,1),e}const y=/^(\d{4})-?(\d{2})-?(\d{2})?\s?(\d{2})?:?(\d{2})?:?(\d{2})?$/;function E(t){if(!u(t))return;const e=t.match(y);if(!e)return;const[,n,r,s,a,o,d]=e;return new Date(`${n}-${r}-${s||"01"} ${a||"00"}:${o||"00"}:${d||"00"}`)}export{E as businessDateParser,g as isIdCard,h as isMobile,M as parseAge2Birthday,D as parseAgeFromContext,m as parseBirthday,i as parseIdCard,c as transformDateFormat};
@@ -3,7 +3,7 @@ import { GeneralField } from '@formily/core';
3
3
  import { ISchema } from '@formily/json-schema/esm/types';
4
4
  import { Ref } from 'vue';
5
5
  import { DependKeyType, FieldItem, ObjectDependKey } from '../../../../components/form-render';
6
- export declare function traverseSchema(schema: ISchema, handler: (_s: ISchema) => void): void;
6
+ export declare function traverseSchema(schema: ISchema, handler: (_s: ISchema, parent?: ISchema) => void, parent?: ISchema): void;
7
7
  export declare function fieldKeyEscape(fieldList: FieldItem[]): string;
8
8
  export declare function dotEscape(id: string): string;
9
9
  export declare function createFieldAddressId(id: string): string;
@@ -1 +1 @@
1
- import{isField as e}from"@formily/core";import{isObject as t,isPromise as r}from"@vue/shared";import{isString as n,isArray as o,isFunction as u,noop as a}from"lodash-es";function i(e,r){r(e),t(e.properties)&&Object.values(e.properties).forEach((e=>{i(e,r)}))}function c(e){return l(e.map((e=>e.val_key)).join("-"))}function l(e){return e.replace(/[.]/g,"-")}function f(e){return l(`address-${e}`)}function s(e){return l(`id-${e}`)}function p(e,r){e&&function(){const r=new Map;o(e)?e.forEach((e=>{var n;t(e)?r.set(e.paramName,{key:null!=(n=e.paramValue)?n:e.paramName,dependKey:e}):r.set(e,e)})):t(e)?Object.entries(e).forEach((([e,t])=>{r.set(e,t)})):n(e)&&r.set(e,e);return r}().forEach(((e,t)=>{if(n(e))return r(t,e);r(t,e.key,e.dependKey)}))}function d(e,t){let r=null;for(const o of t){if(o.val_key===e){n(o)&&(r=null);break}n(o)&&(r=o.val_key)}return r;function n(e){return"LINEBAR"===e.html_type}}function v(t,n){const o={...t};return e(n)&&Object.assign(o,{"onUpdate:value"(e){var t;const o=null==(t=n.decoratorProps)?void 0:t.beforeSetValue;if(u(o)){const t=o(n.path.toString(),e,{field:n,oldValue:n.value});return r(t)?t.then((e=>n.setValue(e)),a):n.setValue(t)}n.setValue(e)}}),o}function m(t,r){const n={...t};return e(r)&&(n.key=void 0===n.value?0:1),n}function y(t,r){const n={...t};return e(r)&&(n.onClear=()=>r.visited=!0),n}function h(e){return{type:"object",properties:e}}function k(t,r){return(...n)=>(e(t.value)&&(t.value.visited=!0),u(r)?r(...n):void 0)}export{y as assignClearBindVisited,v as assignUpdateValue,m as assignValueBindKey,f as createFieldAddressId,s as createLinebarId,h as createObjSchema,k as createVisitedSetter,l as dotEscape,c as fieldKeyEscape,d as getParentLinebar,p as traverseDependKey,i as traverseSchema};
1
+ import{isField as e}from"@formily/core";import{isObject as t,isPromise as r}from"@vue/shared";import{isString as n,isArray as o,isFunction as u,noop as a}from"lodash-es";function i(e,r,n){r(e,n),t(e.properties)&&Object.values(e.properties).forEach((t=>{i(t,r,e)}))}function c(e){return l(e.map((e=>e.val_key)).join("-"))}function l(e){return e.replace(/[.]/g,"-")}function f(e){return l(`address-${e}`)}function s(e){return l(`id-${e}`)}function p(e,r){e&&function(){const r=new Map;o(e)?e.forEach((e=>{var n;t(e)?r.set(e.paramName,{key:null!=(n=e.paramValue)?n:e.paramName,dependKey:e}):r.set(e,e)})):t(e)?Object.entries(e).forEach((([e,t])=>{r.set(e,t)})):n(e)&&r.set(e,e);return r}().forEach(((e,t)=>{if(n(e))return r(t,e);r(t,e.key,e.dependKey)}))}function d(e,t){let r=null;for(const o of t){if(o.val_key===e){n(o)&&(r=null);break}n(o)&&(r=o.val_key)}return r;function n(e){return"LINEBAR"===e.html_type}}function v(t,n){const o={...t};return e(n)&&Object.assign(o,{"onUpdate:value"(e){var t;const o=null==(t=n.decoratorProps)?void 0:t.beforeSetValue;if(u(o)){const t=o(n.path.toString(),e,{field:n,oldValue:n.value});return r(t)?t.then((e=>n.setValue(e)),a):n.setValue(t)}n.setValue(e)}}),o}function m(t,r){const n={...t};return e(r)&&(n.key=void 0===n.value?0:1),n}function y(t,r){const n={...t};return e(r)&&(n.onClear=()=>r.visited=!0),n}function h(e){return{type:"object",properties:e}}function k(t,r){return(...n)=>(e(t.value)&&(t.value.visited=!0),u(r)?r(...n):void 0)}export{y as assignClearBindVisited,v as assignUpdateValue,m as assignValueBindKey,f as createFieldAddressId,s as createLinebarId,h as createObjSchema,k as createVisitedSetter,l as dotEscape,c as fieldKeyEscape,d as getParentLinebar,p as traverseDependKey,i as traverseSchema};