cnhis-design-vue 3.1.52-beta.3 → 3.1.52-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/body-select/index.d.ts +57 -0
- package/es/components/body-select/index.js +1 -0
- package/es/components/body-select/src/config/index.d.ts +101 -0
- package/es/components/body-select/src/config/index.js +1 -0
- package/es/components/body-select/src/hooks/renderCanvas.d.ts +6 -0
- package/es/components/body-select/src/hooks/renderCanvas.js +1 -0
- package/es/components/body-select/src/index.vue.d.ts +58 -0
- package/es/components/body-select/src/index.vue.js +1 -0
- package/es/components/body-select/src/index.vue2.js +1 -0
- package/es/components/body-select/style/index.css +1 -0
- package/es/components/button-print/src/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +45 -41
- package/es/components/classification/index.d.ts +82 -10
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +82 -10
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +82 -10
- package/es/components/classification/src/index.vue.d.ts +82 -10
- package/es/components/classification/style/index.css +1 -1
- package/es/components/date-picker/index.d.ts +38 -3
- package/es/components/date-picker/src/DatePicker.vue.d.ts +38 -3
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +2 -2
- package/es/components/form-config/index.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +74 -74
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -37
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +37 -37
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-render/index.d.ts +37 -37
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +37 -37
- package/es/components/form-render/src/components/renderer/date.d.ts +25 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +6 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +2 -2
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +2 -2
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/iho-table/index.d.ts +8 -4
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -4
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/copyPastePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +38 -3
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +38 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +16 -12
- package/es/components/iho-table/src/utils/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +75 -75
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +38 -38
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +37 -37
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/quick-search/index.d.ts +3 -1
- package/es/components/quick-search/src/index.vue.d.ts +3 -1
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +37 -37
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/index.d.ts +2 -0
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +76 -8
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +38 -4
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +38 -4
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +76 -8
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +2 -2
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +82 -10
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +38 -3
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +152 -12
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +152 -12
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +9 -0
- package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
- package/es/shared/hooks/useDateTime.d.ts +8 -2
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as r,ref as
|
|
1
|
+
import{defineComponent as e,computed as r,ref as a,inject as t,watch as l,createVNode as o}from"vue";import{isEqual as u,isArray as n,isEmpty as i,isString as s,isNumber as v,isFunction as d,omit as c,cloneDeep as p}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as f}from"../../constants/index.js";import{useCommonInjection as y}from"../../hooks/useCommonInjection.js";import{formRenderLog as m}from"../../utils/index.js";import{connect as h,mapProps as k}from"@formily/vue";import g from"../../../../search-cascader/index.js";import j from"../../../../../shared/components/no-data/NoData.vue.js";import{assignUpdateValue as w}from"../../utils/schema.js";import{useFormField as _}from"../../hooks/useFormField.js";import{useFormRequest as b}from"../../hooks/useFormRequest.js";const K=h(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:h}){const k=r({get:()=>e.value,set(r){u(r,e.value)||h("update:value",r)}}),w=a(!1),K=a([]),{field:F,fieldKey:O}=_(),q=r((()=>{var r,a,t;return null!=(t=null==(a=null==(r=e.wordbook)?void 0:r.show_key)?void 0:a[0])?t:e.labelField})),S=r((()=>{var r,a;return null!=(a=null==(r=e.wordbook)?void 0:r.value_key)?a:e.valueField})),x=r((()=>{var r,a;return null==(a=null==(r=e.wordbook)?void 0:r.render_key)?void 0:a[0]})),C=r((()=>{var r;return(null==(r=e.wordbook)?void 0:r.level_num)||1/0})),L=t(f),{getSearchRequestInfo:P}=b(),A=a(150),I=a();async function R(r,a,t=!0){var l,o,u,f;if(A.value=a&&(null==(l=I.value)?void 0:l.getWidth())||150,n(e.value)&&!i(e.value)&&e.value.every((e=>e[S.value]))&&!r&&!a){const r=1===e.value.length,a=null==(o=K.value)?void 0:o.length,[t,l]=function(e){if(!e.length)return[];const r=[(e=p(e))[0]];let a=e[0];for(let r=1;r<e.length;r++){const t=e[r];t&&(a.children=[t],t.parent=a,a=t)}return[e,r]}(e.value),u=t[Math.max(0,t.length-2)];if(!r){K.value=l;const e=t[Math.max(0,t.length-2)];return await R(e,void 0),e}if(a)return u}try{if(r&&!r.__keyword&&r.isLeaf)return y(r);if(!(null==r?void 0:r.__keyword)){const l=await L.addAsync(function(r,t,l,o,u){const n={autograph:()=>t,wordbookId:"id",wordbookType:"type",fieldKeys:()=>r.search_key?JSON.stringify(r.search_key):void 0,conObj:()=>JSON.stringify(function(e,r,a){return r?e.conObj||[]:a?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:a[S.value]}]:e.conObjFirstLevel||[]}(r,a,o)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>a,page:()=>1},i=Object.entries(n).reduce(((e,[a,t])=>(e[a]=s(t)?r[t]:d(t)?t():void 0,e)),{});return{...P(),params:i,key:u,cache:e.requestCache,payload:{field:l,labelKey:q.value,valueKey:S.value}}}(e.wordbook,e.autograph,F.value,r,O.value));if(r){if(!l.length)return t?y(r):Promise.reject();r.children=l.map((e=>function(e,r,a){return{...e,parent:r,isLeaf:h(r)+1>=a}}(e,r,C.value)))}else K.value=l.map((e=>function(e,r){e.__keyword=!!r,e.isLeaf=!!r,r&&(e[q.value]=e[x.value||q.value]||e[q.value]);return e}(e,a))),a&&(null==(u=I.value)||u.setCursor(K.value[0]));return}if(!s(r.id_link))return Promise.reject();const l=r.id_link.split("_").filter((e=>e));v(C.value)&&C.value!==1/0&&l.splice(C.value);const o=await async function(r){if(!P().primaryKeyUrl)return[];try{return await L.addAsync(a(e.wordbook,e.autograph,r,O.value))}catch(e){s(e)&&m(e)}function a(r,a,t,l){const o=P();return{key:l,params:{autograph:a,tableId:r.id,primaryKeyValue:t.join(","),page:1},...o,url:o.primaryKeyUrl,cache:e.requestCache,payload:{field:F.value,labelKey:q.value,valueKey:S.value}}}}(l);if(!o)return Promise.reject();const{lastOption:n,options:c}=function(e,r){let a=e[0];return{options:r.reduce(((r,l,o)=>{const u=t(e,l);return 0===o?(a=u,[u]):(Object.assign(u,{parent:a,isLeaf:o+1>=C.value}),a.children=[u],a=u,r)}),[]),lastOption:a};function t(e,r){return e.find((e=>e[S.value]===r))}}(o,l);return c.length<C.value&&(await R(n),i(n.children))?(k.value=function(e,r){return r.map((r=>e.find((e=>e[S.value]===r))))}(o,l),w.value=!1,Promise.reject()):(K.value=c,null==(f=I.value)||f.setCursor(n),n)}catch(e){s(e)&&m(e)}function y(e){return k.value=function(e){const r=[];let a=e;for(;a;)r.unshift(c(a,["parent","isLeaf","__keyword","children"])),a=a.parent;return r}(e),w.value=!1,Promise.reject()}function h(e){let r=1,a=e.parent;for(;a;)r++,a=a.parent;return r}}function U(){A.value=150}l((()=>e.wordbook),((r,a)=>{u(r,a)||(K.value=[],r&&(k.value||!e.lazyRequest)&&R())}),{immediate:!0});const{injectValueValidate:V,injectValueBindKey:B}=y();V(k);const N=B(k);return()=>o(g,{ref:I,value:k.value,"onUpdate:value":e=>k.value=e,show:w.value,"onUpdate:show":e=>w.value=e,options:K.value,key:N.value,labelKey:q.value,valueKey:S.value,search:R,onFocus:U,menuWidth:A.value},{empty:()=>o(j,null,null)})}}),k({dataSource:"options"},w));export{K as LEVEL_SEARCH_CASCADER};
|
|
@@ -69,6 +69,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
69
69
|
default: string;
|
|
70
70
|
};
|
|
71
71
|
clearable: BooleanConstructor;
|
|
72
|
+
selectAll: BooleanConstructor;
|
|
72
73
|
onChange: {};
|
|
73
74
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
74
75
|
value: {
|
|
@@ -138,6 +139,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
138
139
|
default: string;
|
|
139
140
|
};
|
|
140
141
|
clearable: BooleanConstructor;
|
|
142
|
+
selectAll: BooleanConstructor;
|
|
141
143
|
onChange: {};
|
|
142
144
|
}>> & {
|
|
143
145
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -151,6 +153,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
151
153
|
childFieldStrategy: "checked" | "all";
|
|
152
154
|
childWidthMode: "inner" | "outer";
|
|
153
155
|
clearable: boolean;
|
|
156
|
+
selectAll: boolean;
|
|
154
157
|
}>;
|
|
155
158
|
export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
156
159
|
value: {
|
|
@@ -220,6 +223,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
220
223
|
default: string;
|
|
221
224
|
};
|
|
222
225
|
clearable: BooleanConstructor;
|
|
226
|
+
selectAll: BooleanConstructor;
|
|
223
227
|
onChange: {};
|
|
224
228
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
225
229
|
value: {
|
|
@@ -289,6 +293,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
289
293
|
default: string;
|
|
290
294
|
};
|
|
291
295
|
clearable: BooleanConstructor;
|
|
296
|
+
selectAll: BooleanConstructor;
|
|
292
297
|
onChange: {};
|
|
293
298
|
}>> & {
|
|
294
299
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -302,4 +307,5 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
302
307
|
childFieldStrategy: "checked" | "all";
|
|
303
308
|
childWidthMode: "inner" | "outer";
|
|
304
309
|
clearable: boolean;
|
|
310
|
+
selectAll: boolean;
|
|
305
311
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,createVNode as
|
|
1
|
+
import{defineComponent as e,computed as t,createVNode as l,mergeProps as a,isVNode as o}from"vue";import i from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{connect as r,mapProps as n}from"@formily/vue";import{isArray as u,xor as d,isNumber as s,isEmpty as c}from"lodash-es";import{NCheckboxGroup as p,NCheckbox as m,NRadioGroup as v}from"naive-ui";import"../../../index.js";import{useComplexOptions as f}from"../../hooks/useComplexOptions.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"date-fns";import{assignUpdateValue as h,createVisitedSetter as y}from"../../utils/schema.js";import{useUrlConfigOptions as g,useAutographOptions as j}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as b}from"../../hooks/useCommonInjection.js";import{useFormField as x}from"../../hooks/useFormField.js";function k(i,r,n){return e({name:i,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},urlConfig:{type:Object},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},clearable:Boolean,selectAll:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:i,attrs:v}){const{field:h}=x();const k=t({get(){return t=e.value,s(t)?t+"":t;var t},set(e){i("update:value",e)}}),{renderComplexOption:C}=f(e,k),{labelKey:F,valueKey:S,fullOptions:O}=e.urlConfig?g(e,k):j(e,k),{injectValueBindKey:w,injectValueValidate:_}=b();_(k);const B=w(k);function W(){k.value=null}const K=t({get:()=>u(k.value)&&k.value.length===O.value.length,set(e){const t=e?O.value.map((e=>e[S.value])):[];d(t,k.value).length&&(k.value=t)}}),R=t((()=>u(e.value)&&e.value.length&&e.value.length<O.value.length));function A(t){let a;const i={display:"flex",alignItems:"center"};if(t.__spanPercent&&"inner"===e.childWidthMode){const e=`${t.__spanPercent}%`;i.maxWidth=e,function(e,t){return!c(t.childrenFields)&&(u(e)?e.includes(t[S.value]):e===t[S.value])}(k.value,t)&&(i.width=e)}return l(n,{key:t[S.value],value:t[S.value],disabled:t.disabled,currentValue:k.value,cancelable:e.clearable,onCancel:W,style:i},"function"==typeof(r=a=C({value:k.value,option:t,valueKey:S.value,labelKey:F.value,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode}))||"[object Object]"===Object.prototype.toString.call(r)&&!o(r)?a:{default:()=>[a]});var r}return()=>{const t=O.value.map((e=>{var t;const l=null==(t=e.childrenFields)?void 0:t.reduce(((e,t)=>e+ +(t.elem_width||3)),0);return{...e,__spanPercent:(l||0)/12*100}})),o={display:"flex",flexDirection:e.vertical?"column":"row",flexWrap:"wrap",justifyItems:"flex-start",alignItems:e.vertical?"flex-start":"center",width:"100%"},i=l(r,a({key:B.value,value:k.value,"onUpdate:value":e=>k.value=e,onClick:y(h),style:{width:"100%"}},v),{default:()=>[l("section",{style:o},[t.map(A)])]});return e.selectAll?l("section",null,[[r!==p?null:l(m,{checked:K.value,"onUpdate:checked":e=>K.value=e,indeterminate:R.value},{default:()=>"全选"}),i]]):i}}})}const C=r(k("FormRadio",v,i),n({dataSource:"options"},h)),F=r(k("FormCheckbox",p,m),n({dataSource:"options"},h));export{F as CHECKBOX,C as RADIO};
|
|
@@ -106,6 +106,9 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
106
106
|
type: BooleanConstructor;
|
|
107
107
|
default: boolean;
|
|
108
108
|
};
|
|
109
|
+
selectAll: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
};
|
|
109
112
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend")[], "update:value" | "postRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
110
113
|
value: {
|
|
111
114
|
type: PropType<ArrayAble<string | number> | null>;
|
|
@@ -209,6 +212,9 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
209
212
|
type: BooleanConstructor;
|
|
210
213
|
default: boolean;
|
|
211
214
|
};
|
|
215
|
+
selectAll: {
|
|
216
|
+
type: BooleanConstructor;
|
|
217
|
+
};
|
|
212
218
|
}>> & {
|
|
213
219
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
214
220
|
onPostRecommend?: ((...args: any[]) => any) | undefined;
|
|
@@ -221,6 +227,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
221
227
|
lazyRequest: boolean;
|
|
222
228
|
requestCache: boolean;
|
|
223
229
|
deletable: boolean;
|
|
230
|
+
selectAll: boolean;
|
|
224
231
|
shouldSave: boolean;
|
|
225
232
|
recommend: boolean;
|
|
226
233
|
recommendCache: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,inject as t,useAttrs as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as t,useAttrs as a,ref as o,createVNode as u,mergeProps as n,toRaw as r,nextTick as s,createTextVNode as i}from"vue";import{arrayed as p}from"../../../../../shared/utils/index.js";import{HelpCircleSharp as m}from"@vicons/ionicons5";import{promiseTimeout as c}from"@vueuse/shared";import{cloneDeep as d,isArray as v,isString as f,isObject as y,omit as h,xor as g}from"lodash-es";import{useCommonInjection as S,useSelectOptionProps as b}from"../../hooks/useCommonInjection.js";import{useComplexOptions as j,useComplexOptionsSpan as C}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as w,InjectionFormUUID as k}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import{NSelect as B,NTooltip as F,NIcon as x,NTag as A,NButton as O}from"naive-ui";import"date-fns";import{assignUpdateValue as H,assignClearBindVisited as P,createVisitedSetter as R}from"../../utils/schema.js";import{useFormField as V}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import{connect as K,mapProps as L}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as E,useAutographOptions as _,useRecommendOptions as I,searchContentMatcher as N}from"../../hooks/useFormRenderOptions.js";const q=K(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:H,emit:P}){const K=l({get:()=>e.value,async set(e){P("update:value",e),Y(e)}}),L=l((()=>(e.multiple&&e.allowModify&&console.warn("多选模式下不支持allowModify"),!e.multiple&&e.allowModify))),{labelKey:q,valueKey:M,showKey:z,fetchData:W,searchContent:U,fullOptions:D,filterOptions:T,remoteOptions:$,loading:G}=e.urlConfig?E(e,K):_(e,K),{renderComplexOption:J,hasComplexOption:Q}=j(e,K),{getRecommend:X,postRecommend:Y,sortedOptions:Z}=I(e,T,P,q,M),{field:ee,fieldKey:le}=V();t(w).setContext(le.value,(e=>({currentOption:d(function(e){const l=pe(D.value);return v(e)?function(e){const t=l.reduce(((e,l)=>(e[l[M.value]]=l,e)),{});return e.map((e=>t[e]))}(e):(t=e,l.find((e=>e[M.value]===t)));var t}(e))})));const te=async(e="")=>(U.value=e,Promise.allSettled([W(e),X(e)])),{injectValueValidate:ae,injectValueWatchFromEmpty:oe,injectValueBindKey:ue}=S();oe(K,te),ae(K);const ne=ue(K),{menuProps:re,nodeProps:se}=b();function ie(e){const l=e[q.value];if(!l||!f(l))return"";const t=U.value?N(U.value,l):null,a=t?u("section",null,[t.map(((e,l)=>0!==l&&e?u("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):l;return e.desc?u("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[a,e.desc?u(F,null,{trigger:()=>u(x,{component:m},null),default:()=>e.desc}):null]):a}function pe(l){return e.allowCreate&&U.value&&!l.some((e=>e[q.value]===U.value))?[...l,{[q.value]:U.value,[M.value]:U.value,created:!0,shouldSave:e.shouldSave}]:l}const me=l((()=>pe(L.value?D.value:Z.value))),ce=a(),de=l((()=>{if(e.allowCreate||e.showCustomValue)return K.value;const l=e.multiple&&v(K.value);return D.value.find((e=>l?K.value.includes(e[M.value]):e[M.value]===K.value))?K.value:null})),ve=o(!1);async function fe(e){e&&await te(),ve.value=e}let ye=null;async function he(l,t){K.value=l,ye&&y(t)&&L.value&&(ye.focus(),await s(),ye.value=t[q.value]||"",ye.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&ye.setSelectionRange(0,0)),$.value&&t&&p(t).forEach((e=>{if(!y(e))return;const l=e;l.created&&l.shouldSave&&$.value.push(h(r(l),["created","shouldSave"]))}))}const ge=t(k),{getSpan:Se}=C(),be=R(ee,(async l=>{var t,a,o;L.value&&(ye=l.target,ye&&K.value&&(await s(),ye.value=null!=(o=null!=(a=null==(t=D.value.find((e=>e[M.value]===K.value)))?void 0:t[q.value])?a:K.value)?o:"",ye.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&(await c(0),ye.setSelectionRange(0,0))))}));function je(e){if(!L.value)return;if(ye=e.target,!ye)return;if(!ye.value)return K.value=null;const l=D.value.find((e=>e[q.value]===ye.value));l?K.value=l[M.value]:(U.value=ye.value,K.value=ye.value)}const Ce=o("");function we({option:l,handleClose:t}){var a;const o=null!=(a=z.value&&l[z.value])?a:l[q.value];return e.multiple?(Ce.value="",e.deletable?u(A,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>u("span",{title:o},[o])}):`${o} ;`):(Ce.value=o,o)}function ke(l){if(!e.multiple)return;const t=l?me.value.map((e=>e[M.value])):[];g(t,e.value).length&&(K.value=t)}function Be(){return[u(O,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>ke(!0)},{default:()=>[i("全选")]}),u(O,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>ke(!1)},{default:()=>[i("清空")]})]}function Fe(l){let t=H;return e.multiple&&e.selectAll&&(t={action:Be,...H}),u(B,n({title:Ce.value,key:ne.value,multiple:e.multiple,remote:!0,filterable:!0,loading:G.value,value:de.value,onUpdateValue:he,"menu-props":re,"node-props":se,labelField:q.value,valueField:M.value,options:me.value,onSearch:te,show:ve.value,"onUpdate:show":fe,onFocus:be,onBlur:je,renderLabel:ie,renderTag:we},l,ce),t)}return()=>{var e,l;if(!Q.value)return Fe();const t=null!=(l=null==(e=ee.value.decoratorProps)?void 0:e.span)?l:6,a=Se(ge,ee.value.address);return u("section",{class:"form-render__selectChildField",style:{"--column":a+t}},[Fe({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),D.value.map((e=>J({option:e,value:K.value,valueKey:M.value,labelKey:q.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":a}}})))])}}}),L({dataSource:"options"},H,P));export{q as SELECT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{format as s}from"date-fns";import{useFieldNormalize as l}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"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(f){const{createValidatorSchema:x}=c(),_=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,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=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},h=e=>{var o,t,r,s,l,a,p;const c=_(e);e.urlConfig?u(c,e):e.autograph&&m(c,e);const d=!!e.__multiple,f="1"===e.allowModify,x=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(c["x-component-props"],{multiple:d,options:(null==(r=e.componentProps)?void 0:r.options)||e.option,allowModify:f,allowCreate:"1"===e.free_entry||!!c["x-component-props"].allowCreate||f,shouldSave:"1"===e.save_free_entry,showField:null!=(l=e.show_key)?l:null==(s=e.componentProps)?void 0:s.showField,maxTagCount:null!=(p=i(e.multi_select_value))?p:null==(a=c["x-component-props"])?void 0:a.maxTagCount,selectAll:"1"===x||!0===x,...n(e,["lazyRequest","requestCache"])}),d&&(c.type="array"),c},g=e=>{var o,t;const n=_(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=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},v=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",v],["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=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(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:null!=t?t:null==n?void 0:n.decimal_length,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",h],["REMOTE_SEARCH",h],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=s(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(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=_(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=_(e);return o.type="array",!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,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(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"],n(e,["wrapperStyle","display"])),o}]]),w=e=>{if(e.suffixConfig)return C(e);return(b.get(e.html_type)||y)(e)},C=o=>{if(!o.suffixConfig&&!o.prefixConfig)return w(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=_(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:j(n)}),i},{FieldNormalizeWaterfallHook:A,FieldListNormalizeWaterfallHook:O}=l();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,l)=>{var a;const p=null==(a=(o=A.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(v(o),l),i=e[s(o)].properties={}):i?i[s(o)]=r(w(o),l):(i=null,e[s(o)]=r(w(o),l)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{f as useFieldListAdaptor};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../es/shared/types';
|
|
2
|
-
import { Form, IFieldState } from '@formily/core';
|
|
2
|
+
import { Field, Form, IFieldState } from '@formily/core';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { FieldItem, FormItemDepsCollector, FormRenderProps } from '../../../../../es/components/form-render';
|
|
5
5
|
export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID, getFieldList, formItemDepsCollector }: {
|
|
@@ -9,7 +9,7 @@ export declare function useFormExposeEvent({ formModel, formRenderRef, formUUID,
|
|
|
9
9
|
getFieldList: () => FieldItem[];
|
|
10
10
|
formItemDepsCollector: FormItemDepsCollector;
|
|
11
11
|
}): {
|
|
12
|
-
validate(path?: string, { force }?: {
|
|
12
|
+
validate(path?: string | ((field: Field) => boolean), { force }?: {
|
|
13
13
|
force?: boolean | undefined;
|
|
14
14
|
}): Promise<void>;
|
|
15
15
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{
|
|
1
|
+
import{arrayed as e,findAncestor as t}from"../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{Path as o}from"@formily/path";import{isObject as i}from"@vue/shared";import{promiseTimeout as n}from"@vueuse/shared";import{isFunction as s,isArray as a,isString as f}from"lodash-es";import{nextTick as m}from"vue";import"../../index.js";import{FormItemLineBarDepKeyPrepend as l,NESTED_FORM_ITEM_TYPE as u}from"../constants/index.js";import{queryDecoratorByAddress as d,queryInput as c,queryDecoratorByFieldKey as p,findNextWidget as g}from"../utils/dom.js";import{validateMessageParser as h,combineExtendKey as v,splitExtendKey as y}from"../utils/index.js";import{getParentLinebar as x}from"../utils/schema.js";function I({formModel:t,formRenderRef:n,formUUID:u,getFieldList:g,formItemDepsCollector:I}){return{validate(o="*",{force:m}={}){if(s(o)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(o(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();o=e.length?`*(${e.join(",")})`:"*"}const l=[];m&&t.setFieldState(o,(e=>{"visible"===e.display&&"editable"!==e.pattern&&r(e)&&(l.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const p=t.validate(o).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(g,[]):e)));return m&&l.forEach((({pattern:e,state:t})=>t.pattern=e)),p;function g(t,r){if(!i(r))return t;let o=!1;return a(r.messages)&&r.messages.forEach((r=>{i(r)&&(t.push(...e(r).map(v)),o=!0)})),!o&&t.push(v(r)),t}function v(e){if(e.decoratorElement)return e;const r=t.query(e.path),o=r.get("title"),s=e.messages.map((e=>function(e,t){if(!t||!i(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return h(r&&f(r)?r:e,t.fieldItem)}(e,r.get("decoratorProps")))),a=d(e.address,n.value,u);return{...e,messages:s,title:o,decoratorElement:a,...c(a)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=v(g(),r)),r},setFormValues(e,i=!0,n=!0){i&&(e=y(g(),e)),t.setFieldState("*",(t=>{r(t)&&(n||o.existIn(e,t.path))&&(t.value=o.getIn(e,t.path))}))},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:async e=>n.value?await async function(e,t,r){if(!n.value)return s();const o=p(e,t,u);if(o)return s(o);const i=x(e,r);return i?(I.trigger(l+i,!0),await m(),s(p(e,t,u))):s();function s(e){return{decoratorElement:e,...c(e)}}}(e,n.value,g()):null}}function j({props:e,formRenderRef:r,formModel:o}){return{onKeydown:async function i(a){var f;if(e.enterToNextWidget&&a.target){if("TEXTAREA"===a.target.tagName&&!a.ctrlKey)return;a.preventDefault()}if(await n(0),Reflect.get(a,"stopCapture")||!e.enterToNextWidget||!r.value)return;const m=t(a.target,(e=>e.classList.contains("form-render__formItem")));if(!m)return;const l=`.form-render__formItem${u.map((e=>`:not([widget-type=${e}])`)).join("")}`,d=Array.from(r.value.querySelectorAll(l)),c=d.findIndex((e=>e.id===m.id));if(!~c)return;const{widget:p,field:h}=g(d,c,a.target);if(p)if(s(e.enterToNextWidget)){const t=h&&o.query(h).take();!t||e.enterToNextWidget(null==(f=t.decoratorProps)?void 0:f.fieldItem)?v():i({target:p})}else v();async function v(){await n(0),p.focus()}}}}export{j as useFormDomEvent,I as useFormExposeEvent};
|
|
@@ -2,7 +2,6 @@ import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/sh
|
|
|
2
2
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
|
-
export * from '@formily/core';
|
|
6
5
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
6
|
declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
8
7
|
declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
|
|
@@ -181,3 +180,4 @@ export declare type FieldItem = {
|
|
|
181
180
|
reactions: ArrayAble<ReactionType>;
|
|
182
181
|
[key: string]: any;
|
|
183
182
|
}>;
|
|
183
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -31,11 +31,11 @@ export declare type FormRenderExpose = {
|
|
|
31
31
|
formModel: Form;
|
|
32
32
|
/**
|
|
33
33
|
* @desc 触发表单校验
|
|
34
|
-
* @param {string} path 目标路径, 支持Path语法
|
|
34
|
+
* @param {string|((field:Field)=>boolean)} path 目标路径, 支持Path语法
|
|
35
35
|
* @param {{force?:boolean}} options 校验选项, force代表强制校验不可编辑项
|
|
36
36
|
* @return {void | Promise<Object[]>}
|
|
37
37
|
*/
|
|
38
|
-
validate(path?: string, options?: {
|
|
38
|
+
validate(path?: string | ((field: Field) => boolean), options?: {
|
|
39
39
|
force?: boolean;
|
|
40
40
|
}): Promise<unknown>;
|
|
41
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1880,6 +1880,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import{once as t}from"lodash-es";import a from"./src/IhoTable.vue.js";import e from"./src/plugins/index.js";import"vue";import"./src/constants/index.js";import"@vueuse/shared";import"./src/utils/separateMap.js";import"../../shared/utils/tapable/SyncHook.js";import"../../shared/utils/tapable/SyncBailHook.js";import"../../shared/utils/tapable/SyncWaterfallHook.js";import"../../shared/utils/tapable/SyncLoopHook.js";import"../../shared/utils/tapable/AsyncParallelHook.js";import"../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../shared/utils/tapable/AsyncSeriesHook.js";import"../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./src/types/pluginType.js";import{useTablePlugin as r}from"./src/hooks/useTablePlugin.js";export{defineTablePlugin,useTablePlugin}from"./src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./src/hooks/useColumnConfigAdaptor.js";const{use:l}=r(),i=t((s=>{l(Object.values(e).map((s=>s())),s)})),p=a;p.install=function(t){o(t,p,s+"IhoTable")};export{p as default,i as useIhoTablePresetPlugins};
|
|
1
|
+
import{COMPONENT_NAMESPACE as s}from"../../shared/global/variable.js";import{safeComponentRegister as o}from"../../shared/utils/index.js";import{once as t}from"lodash-es";import a from"./src/IhoTable.vue.js";import e from"./src/plugins/index.js";import"vue";import"./src/constants/index.js";import"@vueuse/shared";import"date-fns";import"./src/utils/separateMap.js";import"../../shared/utils/tapable/SyncHook.js";import"../../shared/utils/tapable/SyncBailHook.js";import"../../shared/utils/tapable/SyncWaterfallHook.js";import"../../shared/utils/tapable/SyncLoopHook.js";import"../../shared/utils/tapable/AsyncParallelHook.js";import"../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../shared/utils/tapable/AsyncSeriesHook.js";import"../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./src/types/pluginType.js";import{useTablePlugin as r}from"./src/hooks/useTablePlugin.js";export{defineTablePlugin,useTablePlugin}from"./src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./src/hooks/useColumnConfigAdaptor.js";const{use:l}=r(),i=t((s=>{l(Object.values(e).map((s=>s())),s)})),p=a;p.install=function(t){o(t,p,s+"IhoTable")};export{p as default,i as useIhoTablePresetPlugins};
|
|
@@ -1880,6 +1880,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -27,7 +27,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
|
|
|
27
27
|
readonly treeConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.TreeConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
28
28
|
readonly mouseConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MouseConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
29
29
|
readonly menuConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MenuConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
30
|
-
readonly keyboardConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.KeyboardConfig
|
|
30
|
+
readonly keyboardConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.KeyboardConfig & Partial<import("vxe-table").VxeTablePropTypes.KeyboardConfig & {
|
|
31
|
+
forceArrowKey: boolean;
|
|
32
|
+
}>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
31
33
|
readonly scrollY: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollY | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
32
34
|
readonly scrollX: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollX | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
33
35
|
readonly editRules: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.EditRules | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyPastePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unref as e}from"vue";import"../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{selectOptionsMap as n}from"./rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{isInvalidDate as o,isInvalidTime as l,IhoTableUtils as i}from"../utils/index.js";import{EDITABLE_WIDGET_TYPE as r}from"../constants/index.js";import{isString as u,trim as d,isEmpty as s,isEqual as a,isFunction as f}from"lodash-es";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function c(){const c="copyPastePlugin",m=t("ihoTableClipData","");return p({name:c,apply(t){function p(t,p,c,g,E){var C,b;if(!(null==(C=null==c?void 0:c.keyboardConfig)?void 0:C.isClip))return;if("paste"===t&&!p.getSelectedCell())return;const{row:T,column:x}=p.getSelectedCell()||p.getEditRecord()||{};if(!T||!x||!v(x,r.SELECT)&&e(m)===T[x.field])return;const R=c.uuid&&v(x,r.SELECT)&&n.get(c.uuid)[x.field],y=T[x.field];if("copy"===t){const e=(null==(b=(R||[]).filter((e=>y.includes(e.value))))?void 0:b.map((e=>e.label)).join(","))||y;m.value=e}else{if(u(e(m))&&(m.value=d(e(m)||"")),!e(m)||!function(e){var t;const n=null==(t=e.editRender)?void 0:t.props;return n&&Object.keys(r).includes(i.getCellType(n))}(x)||T.$__SEPARATE||!function(e,t,n,o){var l,i;const{beforeEditMethod:r}=t.editConfig||{},u={rowIndex:null!=(l=e.getRowIndex(n))?l:0,columnIndex:null!=(i=e.getColumnIndex(o))?i:0};return!r||f(r)&&r({row:n,column:o,...u,$table:e,$grid:void 0})}(p,c,T,x))return;if(v(x,r.DATE)&&o(x,T,m))return;if(v(x,r.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(m)||"").toString()))return;if(v(x,r.TIME)&&l(x,m))return;let t=e(m)||"";if(R&&!s(R)){const e=R.filter((e=>t.split(",").includes(e.label))).map((e=>e.value));if(s(e))return;if(function(e){var t,n;const o=null==(t=e.editRender)?void 0:t.props;return v(e,r.SELECT)&&(null==(n=o.componentProps)?void 0:n.multiple)}(x)){if(a(y,e))return;t=e}else{if(e.includes(y))return;t=e[0]}}T[x.field]=t,g("formChange",{column:x,row:T,oldValue:y,value:t,index:p.getRowIndex(T)}),v(x,r.SEPARATE)&&(null==E||E())}}function v(e,t){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&i.getCellType(o)===t}t.eventHooks.onCopy.tap(c,(({$table:e},t,{emits:n})=>p("copy",e,t,n))),t.eventHooks.onPaste.tap(c,(({$table:e},t,{emits:n,updateTableDataRef:o})=>p("paste",e,t,n,o)))}})}export{c as copyPastePlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as
|
|
1
|
+
import{format as e}from"date-fns";import"../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../constants/index.js";import{getLowCodeFieldFromField as n}from"../utils/index.js";import{defineTablePlugin as a}from"../hooks/useTablePlugin.js";function l(){const l="defaultValuePlugin",o=new Map([[t.TIME,({defaultValue:t,valueFormat:n="HH:mm"})=>"current"===t?e(Date.now(),n):t],[t.DATE,({defaultValue:t,valueFormat:n="yyyy-MM-dd HH:mm:ss"})=>"current"===t?e(Date.now(),n):t]]);function u(e){var t;const a=n(e);if(!a||null==a.defaultValue)return null;const l=null==(t=e.editRender)?void 0:t.name,u=l&&o.get(l);return u?u(a):a.defaultValue}return a({name:l,apply(e){const t=Object.freeze([]);let n=t;e.fieldHooks.field.tap(l,(e=>{const t=u(e);return null!=t&&(e.editRender={defaultValue:t,...e.editRender}),e})),e.fieldHooks.fieldList.tap(l,(e=>n=e)),e.dataHooks.data.tap(l,(e=>{n.length&&n.forEach((t=>{if(null!=e[t.field])return;const n=u(t);null!=n&&(e[t.field]=n)}))})),e.dataHooks.dataEnd.tap(l,(()=>n=t))}})}export{l as defaultValuePlugin};
|
|
@@ -32,6 +32,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
onConfirm: {
|
|
33
33
|
type: FunctionConstructor;
|
|
34
34
|
};
|
|
35
|
+
formattedValue: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
placeholder: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
allowedInvalidValue: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
35
44
|
}, {
|
|
36
45
|
attrs: {
|
|
37
46
|
[x: string]: unknown;
|
|
@@ -43,9 +52,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
52
|
onConfirm: {
|
|
44
53
|
type: FunctionConstructor;
|
|
45
54
|
};
|
|
46
|
-
|
|
55
|
+
formattedValue: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
};
|
|
58
|
+
placeholder: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
allowedInvalidValue: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
64
|
+
}>> & {
|
|
65
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
emit: (event: "update:formatted-value", ...args: any[]) => void;
|
|
47
68
|
datePickerRef: import("vue").Ref<import("../../../../../../es/shared/types").AnyObject | null>;
|
|
48
69
|
panelInstRef: import("vue").Ref<null>;
|
|
70
|
+
placeholderRef: import("vue").Ref<any>;
|
|
71
|
+
currentFormattedValue: import("vue").WritableComputedRef<string | null | undefined>;
|
|
49
72
|
isDateTime: import("vue").ComputedRef<boolean>;
|
|
50
73
|
formatRef: import("vue").ComputedRef<string>;
|
|
51
74
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
@@ -54,15 +77,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
77
|
handleConfirm: (target: HTMLInputElement) => void;
|
|
55
78
|
onUpdateShow: (show: boolean) => void;
|
|
56
79
|
onConfirm: (...args: any[]) => Promise<void>;
|
|
80
|
+
isAllowedInvalidValue: (value?: string) => boolean | "" | undefined;
|
|
57
81
|
NDatePicker: any;
|
|
58
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
82
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
83
|
updateUnchangedValue: {
|
|
60
84
|
type: BooleanConstructor;
|
|
61
85
|
};
|
|
62
86
|
onConfirm: {
|
|
63
87
|
type: FunctionConstructor;
|
|
64
88
|
};
|
|
65
|
-
|
|
89
|
+
formattedValue: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
};
|
|
92
|
+
placeholder: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
};
|
|
95
|
+
allowedInvalidValue: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
};
|
|
98
|
+
}>> & {
|
|
99
|
+
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
}, {
|
|
66
101
|
updateUnchangedValue: boolean;
|
|
67
102
|
}>>;
|
|
68
103
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function forceArrowKeyPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../index.js";import{EDITABLE_WIDGET_TYPE as e}from"../constants/index.js";import{promiseTimeout as r}from"@vueuse/shared";import{identity as o}from"lodash-es";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function n(){const n="forceArrowKeyPlugin",i=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function s({keyboardConfig:e={}}){return e.isArrow&&e.forceArrowKey}return t({name:n,apply(t){t.eventHooks.onKeydown.tap(n,(async({$event:e,$table:o},t)=>{const n=e;if(!s(t)||!i.includes(n.key))return;const d=o.getEditRecord()||{};if(d.row&&d.column){e.preventDefault();const r="ArrowLeft"===n.key,t="ArrowUp"===n.key,i="ArrowRight"===n.key,s="ArrowDown"===n.key;o.moveSelected(d,r,t,i,s,n)}await r(0);const{row:p,column:l}=o.getSelectedCell()||{};p&&l&&await o.setEditCell(p,l)}));const d={[e.NUMBER]:e=>{var r;return e.editRender.props={...e.editRender.props,componentProps:{keyboard:{ArrowUp:!1,ArrowDown:!1},...null==(r=e.editRender.props)?void 0:r.componentProps}},e}};t.fieldHooks.field.tap(n,((e,r,t)=>{var n;if(!s(t))return e;return(d[null==(n=e.editRender)?void 0:n.name]||o)(e)}))}})}export{n as forceArrowKeyPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./copyPastePlugin.js";import*as n from"./defaultConfigPlugin/index.js";import*as s from"./defaultValuePlugin.js";import*as t from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as l from"./filterVisibleEventPlugin.js";import*as g from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as o from"./highLightSetPlugin.js";import*as a from"./keyboardEventPlugin/index.js";import*as P from"./lowCodeFieldAdaptorPlugin/index.js";import*as m from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as j from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as w from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as h from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as W from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as v from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as S from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as y from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as E from"./rowClickPlugin/index.js";import*as A from"./rowDragPlugin/index.js";import*as D from"./rowGroupSettingPlugin/index.js";import*as F from"./varialbleHeightPlugin/index.js";import*as V from"./virtualTreePlugin/index.js";import{separateMetaModule as q}from"../../../../shared/utils/index.js";var z=q(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./copyPastePlugin.ts":i,"./defaultConfigPlugin/index.ts":n,"./defaultValuePlugin.ts":s,"./filterDaterangeRenderPlugin/index.tsx":t,"./filterRenderPlugin/index.tsx":d,"./filterVisibleEventPlugin.ts":l,"./forceArrowKeyPlugin.ts":g,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":o,"./keyboardEventPlugin/index.ts":a,"./lowCodeFieldAdaptorPlugin/index.tsx":P,"./maxCheckSizePlugin.ts":m,"./operationalFormPlugin/index.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":f,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":p,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":b,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":c,"./rendererPlugins/widgets/checkRendererPlugin.tsx":h,"./rendererPlugins/widgets/colorRendererPlugin.tsx":W,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":v,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":S,"./rendererPlugins/widgets/seqRendererPlugin.tsx":y,"./rowClickPlugin/index.ts":E,"./rowDragPlugin/index.ts":A,"./rowGroupSettingPlugin/index.ts":D,"./varialbleHeightPlugin/index.tsx":F,"./virtualTreePlugin/index.ts":V}));export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:a,column:i}=t.getSelectedCell()||t.getEditRecord()||{};if(!a||!i)return;r("keyboard",{$table:t,key:o.key,index:t.getRowIndex(a),value:a[i.field],row:a,column:i})}))}})}export{t as keyboardEventPlugin};
|