cnhis-design-vue 3.1.51-beta.27 → 3.1.51-beta.28
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/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultValuePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/defaultValuePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.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/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=a(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||i(e))&&(
|
|
1
|
+
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as a,isNumber as i}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=a(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||i(e))&&(n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps={...Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:a}=e;let i=!1;return o&&(i=new Date(n[o]).getTime()>t),a&&(i=i||new Date(n[a]).getTime()<t),i})}],["default_val","defaultValue"],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["free_entry",(e,t,n)=>{t.componentProps={...t.componentProps,allowCreate:"1"===e||1===e,shouldSave:"1"===n.save_free_entry||1===n.save_free_entry}}],["html_type",(e,n,o)=>{var a;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(a=c.get(e))?a:e;const i="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));i&&(n.componentProps={multiple:i,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],...["alias","name"].map((e=>[e,(e,t,n)=>{var o;t.title=`${null!=(o=n.alias)?o:n.name}${n.suffix?`(${n.suffix})`:""}`}]))]),v=new Map([["sum","isSum"],["show","isShow"],["elementId","columnName"],["columnWidth","colWidth"],["fixedWayEnum",{property:"isFixed",valueMap:m}],["multi_select_value",f],["setting",{fieldMap:_,assign:!0}]]);return l.map((e=>E(e,p,v)));function E(i,l,p){if(!p)return e(i);const m={};return Object.entries(i).forEach((([e,o])=>{const a=p.get(e);return a?a!==s?t(a)?m[a]=o:n(a)?a(o,m,i,l):void(r(a)&&(a.assign?Object.assign(m,u(o,a)):m[a.property||e]=u(o,a))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","isDateDisabled"])),m;function u(e,t){var o,i;return!r(t)||n(t)?e:a(e)?e.map((e=>u(e,t))):r(e)?E(e,l,t.fieldMap):null!=(i=null==(o=t.valueMap)?void 0:o.get(e))?i:e}}}(l.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{l as useColumnConfigAdaptor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defaultValuePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +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 a}from"../utils/index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function o(){const o="defaultValuePlugin",l=new Map([[[t.TIME],({defaultValue:t,valueFormat:a="HH:mm"})=>"current"===t?e(Date.now(),a):t],[[t.DATE],({defaultValue:t,valueFormat:a="yyyy-MM-dd HH:mm:ss"})=>"current"===t?e(Date.now(),a):t]]);return n({name:o,apply(e){let t=[];e.fieldHooks.fieldList.tap(o,(e=>(t=e,e))),e.dataHooks.data.tap(o,(e=>{t.length&&t.forEach((t=>{var n;const o=a(t);if(null==(null==o?void 0:o.defaultValue))return;const d=null==(n=t.editRender)?void 0:n.name,[,u]=[...l.entries()].find((([e])=>e.includes(d)))||[];e[t.field]=u?u(o):o.defaultValue}))})),e.dataHooks.dataEnd.tap(o,(()=>{t=[]}))}})}export{o as defaultValuePlugin};
|
|
@@ -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 n from"./filterDaterangeRenderPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as n from"./defaultValuePlugin.js";import*as s from"./filterDaterangeRenderPlugin/index.js";import*as t from"./filterRenderPlugin/index.js";import*as d from"./filterVisibleEventPlugin.js";import*as l from"./highLightSetPlugin.js";import*as g from"./keyboardEventPlugin/index.js";import*as u from"./lowCodeFieldAdaptorPlugin/index.js";import*as o from"./maxCheckSizePlugin.js";import*as a from"./operationalFormPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as m from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as x from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as f from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as p from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as j from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as b from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as w from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as c from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as h from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as W from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as v from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as k from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as C from"./rowClickPlugin/index.js";import*as S from"./rowDragPlugin/index.js";import*as E from"./rowGroupSettingPlugin/index.js";import*as D from"./varialbleHeightPlugin/index.js";import*as F from"./virtualTreePlugin/index.js";import{separateMetaModule as V}from"../../../../shared/utils/index.js";var q=V(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./defaultConfigPlugin/index.ts":i,"./defaultValuePlugin.ts":n,"./filterDaterangeRenderPlugin/index.tsx":s,"./filterRenderPlugin/index.tsx":t,"./filterVisibleEventPlugin.ts":d,"./highLightSetPlugin.tsx":l,"./keyboardEventPlugin/index.ts":g,"./lowCodeFieldAdaptorPlugin/index.tsx":u,"./maxCheckSizePlugin.ts":o,"./operationalFormPlugin/index.ts":a,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":P,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":m,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":x,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":f,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":p,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":j,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":R,"./rendererPlugins/widgets/checkRendererPlugin.tsx":b,"./rendererPlugins/widgets/colorRendererPlugin.tsx":w,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":c,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":h,"./rendererPlugins/widgets/labelRendererPlugin.tsx":W,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":v,"./rendererPlugins/widgets/seqRendererPlugin.tsx":k,"./rowClickPlugin/index.ts":C,"./rowDragPlugin/index.ts":S,"./rowGroupSettingPlugin/index.ts":E,"./varialbleHeightPlugin/index.tsx":D,"./virtualTreePlugin/index.ts":F}));export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as t}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as
|
|
1
|
+
import{createVNode as e,mergeProps as t}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as o}from"../../../../utils/index.js";import i from"./editDate.vue.js";import{defineTablePlugin as d}from"../../../../hooks/useTablePlugin.js";function a(){return d({name:"dateRendererPlugin",vxe(d){d.interceptor.add("event.clearActived",n(r.DATE,(e=>e.classList.contains("n-date-panel")))),d.renderer.add(r.DATE,{renderCell:o.createDefaultRenderCell(),renderEdit:o.createRenderEdit((({fieldItem:r,emitFormClick:n,row:o,column:d,$rowIndex:a})=>[e(i,t({value:o[d.field],"onUpdate:value":e=>o[d.field]=e,isStartDate:r.isStartDate,isEndDate:r.isEndDate,connectField:r.connectField,valueFormat:r.valueFormat},r.componentProps,{column:d,row:o,"row-index":a,onClick:n}),null)]))})}})}export{a as dateRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as o}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../../../../constants/index.js";import{useAutoFocus as r}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as i}from"../../../../utils/index.js";import d from"./editTime.vue.js";import{defineTablePlugin as l}from"../../../../hooks/useTablePlugin.js";function m(){const m="timeRendererPlugin";return l({name:m,vxe(r){r.interceptor.add("event.clearActived",n(t.TIME,(e=>e.classList.contains("n-popover")))),r.renderer.add(t.TIME,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(d,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l},t.componentProps,{onClick:r}),null)]))})},apply(e){r(e).bindAutoFocusConfig(m,t.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)})}})}export{m as timeRendererPlugin};
|
|
1
|
+
import{createVNode as e,mergeProps as o}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../../../../constants/index.js";import{useAutoFocus as r}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as i}from"../../../../utils/index.js";import d from"./editTime.vue.js";import{defineTablePlugin as l}from"../../../../hooks/useTablePlugin.js";function m(){const m="timeRendererPlugin";return l({name:m,vxe(r){r.interceptor.add("event.clearActived",n(t.TIME,(e=>e.classList.contains("n-popover")))),r.renderer.add(t.TIME,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(d,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l,valueFormat:t.valueFormat},t.componentProps,{onClick:r}),null)]))})},apply(e){r(e).bindAutoFocusConfig(m,t.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)})}})}export{m as timeRendererPlugin};
|
|
@@ -147,6 +147,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
147
147
|
bindEventSetting: BindEventSettingItem[];
|
|
148
148
|
allowSlash: boolean | string;
|
|
149
149
|
whiteList: string[];
|
|
150
|
+
defaultValue: any;
|
|
150
151
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
151
152
|
export declare type IhoTableFormChangePayload = {
|
|
152
153
|
column: IhoTableFieldItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.51-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.51-beta.28",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.51-beta.28",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.51-beta.
|
|
3
|
+
"version": "3.1.51-beta.28",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a8f7d7cdca3113620c2a7b0dbaf062673dfc51cc"
|
|
67
67
|
}
|