cnhis-design-vue 3.1.56 → 3.1.57-beta.1
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/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +3 -0
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +19 -16
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -15
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -15
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +45 -38
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/form-config/index.d.ts +9 -7
- package/es/components/form-config/src/FormConfig.vue.d.ts +9 -7
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/switch.d.ts +16 -2
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.d.ts +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -8
- package/es/components/iho-table/src/constants/index.d.ts +1 -0
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +48 -10
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/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/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/src/types/index.d.ts +3 -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/hooks/selectHooks/useSelectRenders.d.ts +1 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +6 -0
- 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,useAttrs as t,inject as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as o,unref as a,mergeProps as s,isRef as u}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as c}from"lodash-es";import{useIhoTableFormEvent as m}from"../../../../utils/index.js";import D from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:null},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},connectField:{type:String,default:"-_-"}},emits:["update:value"],setup(e,{emit:f}){const p=e,w=t(),v=i("$xetable"),{emitFormChangeWithParams:b}=m({...p,$table:v}),F=n(),g=r({get:()=>p.value?p.value:null,set(e){const t=p.value;if(t===e)return;const{isDateDisabled:i,isTimeDisabled:n}=y.value;if(e){const t=Date.parse(e);if(i(t))return;const{isHourDisabled:r,isMinuteDisabled:l,isSecondDisabled:o}=(null==n?void 0:n(t))||{},{h:a,m:s,s:u}=x(new Date(e)),d=null==r?void 0:r(a),c=null==l?void 0:l(s,a),m=null==o?void 0:o(u,s,a);if(d||c||m)return}f("update:value",e),b({oldValue:t})}}),y=r((()=>{const{valueFormat:e,format:t,type:i="datetime"}=w;return{type:i,clearable:!0,allowedInvalidValue:"-",...w,timePickerProps:{format:d(e||t)},isDateDisabled:h(w.isDateDisabled)||S,isTimeDisabled:(null==i?void 0:i.includes("time"))?h(w.isTimeDisabled)||T:void 0}}));function $(e,t){return p.isStartDate&&p.connectField?e>t:!(!p.isEndDate||!p.connectField)&&e<t}function S(e){return!!p.row[p.connectField]&&$(e,p.isEndDate?new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime():new Date(p.row[p.connectField]).getTime())}function T(e){const t=new Date(p.row[p.connectField]),i=new Date(e),{h:n,m:r,s:l}=x(t),o=(e,t,i,n)=>!(p.isEndDate&&i>n)&&(!(p.isStartDate&&i<n)&&$(e,t));return{isHourDisabled:t=>{if(!p.row[p.connectField])return!1;const r=new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:a}=x(i);return o(t,n,e-60*t*60*1e3-60*l*1e3-1e3*a,r)},isMinuteDisabled:t=>{if(!p.row[p.connectField])return!1;const l=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:00:00`).getTime(),{s:a}=x(i);return o(t,r,e-60*t*1e3-1e3*a,l)},isSecondDisabled:t=>{if(!p.row[p.connectField])return!1;const i=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:${r}:00`).getTime();return o(t,l,e-1e3*t,i)}}}function h(e){return c(e)?t=>e(t,p.row):null}function x(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return(e,t)=>(l(),o(a(D),s({ref_key:"formRef",ref:F},a(y),{"formatted-value":a(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:
|
|
1
|
+
function e(e){return{bindAutoFocusConfig:function(t,n,o,{before:r,after:c,focusType:u="function"}={}){e.fieldHooks.field.tap(t,(e=>{var t;return(null==(t=e.editRender)?void 0:t.name)===n?((e=r?r(e):e).editRender&&!Reflect.has(e.editRender,"autofocus")&&Reflect.set(e.editRender,"autofocus","class"===u?o:"function"===u?function(e){const t=({cell:t}={})=>{const n=t&&t.querySelector(e);return n&&n.click(),n};return t.toString=()=>e,t}(o):void 0),c?c(e):e):e}))}}}export{e as useAutoFocus};
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{computed as e,createVNode as
|
|
1
|
+
import{computed as e,createVNode as o,mergeProps as r}from"vue";import{NRadio as t}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../constants/index.js";import{IhoTableRenderHelper as i,IhoTableUtils as l}from"../../../utils/index.js";import{isFunction as d}from"lodash-es";import{defineTablePlugin as a}from"../../../hooks/useTablePlugin.js";function u(){const u="radioRendererPlugin";return a({name:u,vxe(l){l.renderer.add(n.RADIO,{renderCell:i.createRenderEdit((({fieldItem:n,emitFormChangeWithParams:i,row:l,column:d,$table:a})=>{const u=e({get:()=>l[d.field],set(){const{fullData:e}=a.getTableData();null==e||e.forEach((e=>e[d.field]=!1)),l[d.field]=!0,i({oldValue:!1})}}),m=(null==n?void 0:n.componentProps)||{};return[l.$__SEPARATE?"":o(t,r({checked:u.value,"onUpdate:checked":e=>u.value=e},m),null)]}))})},apply(e){e.configHooks.editConfig.tap(u,((e={},o)=>{const r=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var o;const{row:t,column:i}=e[0];return!function(e){return!!e&&l.getCellType(e)===n.RADIO}(null==(o=i.editRender)?void 0:o.props)&&(!d(r)||r(...e))},e}))}})}export{u as radioRendererPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function switchRendererPlugin(): import("../../../../../../components/iho-table").TablePlugin;
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computed as e,createVNode as i}from"vue";import{traverse as o}from"../../../../../../shared/utils/index.js";import{NSwitch as r,NCheckbox as t}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as d}from"../../../constants/index.js";import{IhoTableRenderHelper as n}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function a(){const a="switchRendererPlugin";return l({name:a,vxe(o){o.renderer.add(d.SWITCH,{renderCell:n.createRenderEdit((({fieldItem:o,emitFormChangeWithParams:d,row:n,column:l})=>{var a,u;const{open:s={},close:c={},show_mode:m="SWITCH"}=o,f=null==(a=s.value)||a,v=null!=(u=c.value)&&u,p=e({get:()=>n[l.field]===f,set(e){const i=n[l.field];n[l.field]=e?f:v,d({oldValue:i})}});return[n.$__SEPARATE?"":"SWITCH"===m?i(r,{value:p.value,"onUpdate:value":e=>p.value=e},{checked:()=>s.describe,unchecked:()=>c.describe}):i(t,{checked:p.value,"onUpdate:checked":e=>p.value=e},{default:()=>s.describe})]}))})},apply(e){e.fieldHooks.fieldList.tap(a,((e,i)=>{var r;let t=!1;if(o(e,((e,i)=>{var o;(null==(o=e.editRender)?void 0:o.name)===d.SWITCH&&(t=!0,i())})),t){const e=null==(r=i.editConfig)?void 0:r.beforeEditMethod;i.editConfig={...i.editConfig,beforeEditMethod(i){var o;const{column:r}=i;return(null==(o=r.editRender)?void 0:o.name)!==d.SWITCH&&(!e||e(i))}}}return e}))}})}export{a as switchRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as l,inject as t,ref as a,computed as r,reactive as u,watch as o,nextTick as i,openBlock as n,createBlock as d,unref as c,withCtx as v,createVNode as m,mergeProps as s,isRef as f,createElementBlock as p,Fragment as h,renderList as y,createTextVNode as k,toDisplayString as b,createCommentVNode as w}from"vue";import{NPopover as _,NInput as g,NSpace as V,NScrollbar as C,NButton as F}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as q,isValid as O,getHours as j,getMinutes as S,getSeconds as $,format as A}from"date-fns";var H=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:H}){const I=e,P=l(),R=t("$xetable"),{emitFormChangeWithParams:E}=x({...I,$table:R}),M=a(null),U=a(!1),z=a(),K=a(),N=r((()=>K.value&&L(K.value)?{style:"text-decoration: line-through"}:{})),T=r({get(){if(!K.value)return null;const e=q(K.value,G.valueFormat,new Date);return O(e)?K.value:I.formattedValue?I.formattedValue:null},set(e){J(e)}}),{placeholder:W="请选择",valueFormat:B="HH:mm"}=P,G=u({...P,placeholder:W,valueFormat:B,format:B});function J(e){if(K.value=e||"",e&&L(e))return;const l=I.formattedValue;l!==e&&(H("update:formattedValue",e),E({oldValue:l}))}function L(e){var l,t,a;const r=q(e,G.format,new Date),u=j(r),o=S(r),i=$(r),n=null==(l=G.isHourDisabled)?void 0:l.call(G,u),d=null==(t=G.isMinuteDisabled)?void 0:t.call(G,o,u),c=null==(a=G.isSecondDisabled)?void 0:a.call(G,i,o,u);return
|
|
1
|
+
import{defineComponent as e,useAttrs as l,inject as t,ref as a,computed as r,reactive as u,watch as o,nextTick as i,openBlock as n,createBlock as d,unref as c,withCtx as v,createVNode as m,mergeProps as s,isRef as f,createElementBlock as p,Fragment as h,renderList as y,createTextVNode as k,toDisplayString as b,createCommentVNode as w}from"vue";import{NPopover as _,NInput as g,NSpace as V,NScrollbar as C,NButton as F}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as q,isValid as O,getHours as j,getMinutes as S,getSeconds as $,format as A}from"date-fns";var H=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:H}){const I=e,P=l(),R=t("$xetable"),{emitFormChangeWithParams:E}=x({...I,$table:R}),M=a(null),U=a(!1),z=a(),K=a(),N=r((()=>K.value&&L(K.value)?{style:"text-decoration: line-through"}:{})),T=r({get(){if(!K.value)return null;const e=q(K.value,G.valueFormat,new Date);return O(e)?K.value:I.formattedValue?I.formattedValue:null},set(e){J(e)}}),{placeholder:W="请选择",valueFormat:B="HH:mm"}=P,G=u({...P,placeholder:W,valueFormat:B,format:B});function J(e){if(K.value=e||"",e&&L(e))return;const l=I.formattedValue;l!==e&&(H("update:formattedValue",e),E({oldValue:l}))}function L(e){var l,t,a;const r=q(e,G.format,new Date),u=j(r),o=S(r),i=$(r),n=null==(l=G.isHourDisabled)?void 0:l.call(G,u),d=null==(t=G.isMinuteDisabled)?void 0:t.call(G,o,u),c=null==(a=G.isSecondDisabled)?void 0:a.call(G,i,o,u);return n||d||c}function Q(){[G.valueFormat.replace(/[^\w]/g,""),G.valueFormat].some((e=>{const l=q(K.value,e,new Date);if(!K.value||O(l)){return J(K.value?A(l,G.valueFormat):null),!0}return!1}))}function X(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=M.value)||l.blur(),U.value=!1)}return o((()=>I.formattedValue),(e=>{if(!e)return"";K.value=e}),{immediate:!0}),o((()=>U.value),(async e=>{var l,t,a,r,u;e&&(await i(),null==(u=null==(r=null==(a=null==(t=null==(l=z.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(l,t)=>(n(),d(c(_),{show:U.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[4]||(t[4]=()=>U.value=!1)},{trigger:v((()=>[m(c(g),{ref_key:"formRef",ref:M,clearable:"",placeholder:c(W),value:K.value,"onUpdate:value":t[0]||(t[0]=e=>K.value=e),valueModifiers:{trim:!0},"input-props":c(N),onClick:t[1]||(t[1]=()=>U.value=!0),onChange:Q,onKeydown:X},null,8,["placeholder","value","input-props"])])),default:v((()=>[m(c(V),null,{default:v((()=>[m(c(D),s({ref_key:"timePickerRef",ref:z,show:""},c(G),{class:"iho-table__time-picker",to:!1,"formatted-value":c(T),"onUpdate:formatted-value":t[2]||(t[2]=e=>f(T)?T.value=e:null),onConfirm:t[3]||(t[3]=()=>U.value=!1)}),null,16,["formatted-value"]),m(c(C),{class:"iho-table__scrollbar"},{default:v((()=>[e.shortcutOptions.length?(n(),d(c(V),{key:0,vertical:"",wrap:!1},{default:v((()=>[(n(!0),p(h,null,y(e.shortcutOptions,(e=>(n(),d(c(F),{size:"tiny",key:e,disabled:L(e),onClick:l=>function(e){J(e),U.value=!1}(e)},{default:v((()=>[k(b(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):w("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,defineComponent as
|
|
1
|
+
import{createVNode as e,defineComponent as o,inject as a}from"vue";import"../../../../index.js";import{NCheckbox as n}from"naive-ui";import{isNumber as t}from"lodash-es";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";function r(){const o="checkRendererPlugin";return s({name:o,apply(a){a.fieldHooks.field.tap(o,((a,{index:n,insertBefore:s},r)=>{if(0===n&&r.selectType&&["checkbox","radio"].includes(r.selectType)){const{radioConfig:a,checkboxConfig:n={}}=r,i={width:45,align:"center",fixed:"left",..."radio"===r.selectType?a:n,field:o,type:r.selectType,annotation:!1};n.disableHeader&&(i.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...i.slots}),n.useNCheckbox&&(i.slots={...t(n.maxCheckSize)?{}:{header:o=>[e(l,{params:o},null)]},checkbox:o=>[e(l,{params:o},null)],...i.slots}),s(i)}return a}))}})}const l=o({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(o){const t=a("$xetable");function s(e,a){var n;a.stopPropagation(),"header"===(null==(n=o.params)?void 0:n.type)?null==t||t.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==t||t.triggerCheckRowEvent(new MouseEvent("mouse-down"),o.params,e)}return()=>e(n,{checked:o.params.checked,"onUpdate:checked":e=>o.params.checked=e,indeterminate:o.params.indeterminate,disabled:o.params.disabled,onUpdateChecked:s},null)}});export{r as checkRendererPlugin};
|
|
@@ -160,6 +160,9 @@ export declare type LowCodeTableFieldItem = {
|
|
|
160
160
|
autograph: string;
|
|
161
161
|
wordbook: LowCodeTypes.wordbook;
|
|
162
162
|
requestCache: boolean;
|
|
163
|
+
open: LowCodeTypes.switchProperty;
|
|
164
|
+
close: LowCodeTypes.switchProperty;
|
|
165
|
+
show_mode: LowCodeTypes.showModeType;
|
|
163
166
|
lazyRequest: boolean;
|
|
164
167
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
165
168
|
export declare type IhoTableFormChangePayload = {
|