cnhis-design-vue 3.1.41-beta.28 → 3.1.41-beta.29

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.
@@ -1 +1 @@
1
- import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i,IHO_TABLE_TREE_TYPE as t}from"../../constants/index.js";import{defineTablePlugin as s}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as n}from"../../utils/index.js";function r(){const r="defaultTablePlugin";return s({name:r,apply(s){s.configHooks.config.tap({name:r,stage:i},(o=>{const i=e({height:"100%",border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o);return(n.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),s.configHooks.treeConfig.tap({name:r,stage:i},((e,o)=>o.isTree===t.TRANSFORM_TREE_TYPE?Object.assign({transform:!0,expandAll:!0,lazy:!0,reserve:!0},e):e)),s.configHooks.mouseConfig.tap({name:r,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{r as defaultConfigPlugin};
1
+ import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i,IHO_TABLE_TREE_TYPE as t}from"../../constants/index.js";import{defineTablePlugin as s}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as n}from"../../utils/index.js";function r(){const r="defaultTablePlugin";return s({name:r,apply(s){s.configHooks.config.tap({name:r,stage:i},(o=>{const i=e({height:"100%",border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o);return(n.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),s.configHooks.treeConfig.tap({name:r,stage:i},((e,o)=>o.isTree===t.TRANSFORM_TREE_TYPE?Object.assign({transform:!0,expandAll:!0,lazy:!0,reserve:!0,children:"childrenList",parentField:"parentId",rowField:"__parentId",hasChild:"hasChild"},e):e)),s.configHooks.mouseConfig.tap({name:r,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{r as defaultConfigPlugin};
@@ -1 +1 @@
1
- import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as n,isFunction as o}from"lodash-es";import{onBeforeUnmount as i}from"vue";import"../../../index.js";import{defineTablePlugin as s}from"../../hooks/useTablePlugin.js";function a(){const a="virtualTreePlugin",d=new Map;return s({name:a,apply(s){s.dataHooks.data.tap(a,((r,o,i)=>{if(!o.treeConfig)return;const{transform:s,rowField:a="__parentId",parentField:d="parentId",children:l="childrenList"}=o.treeConfig;function u(e){e[a]=e[a]||e.theUniqueKey||t()}s&&(u(r),n(r[l])&&e(r[l],((e,t,r)=>{r&&(e[d]=r[a]),i.insertAfter(e),u(e)}),l,r))})),s.fieldHooks.fieldList.tap(a,((e,t)=>{const{transform:n}=t.treeConfig||r;if(n&&t.uuid){const r=e.filter((e=>!1!==e.visible));let n=r.findIndex((e=>e.treeNode));~n||r.some(((e,t)=>{if(!e.type)return n=t,e.treeNode=!0}));const o=r.length-n-r.filter((e=>"right"===e.fixed)).length;d.set(t.uuid,{index:n,colspan:o})}return e})),s.configHooks.treeConfig.tap(a,((e,t)=>{if(!e)return e;const{transform:r,parentField:n="parentId",rowField:i="__parentId"}=e;if(!r)return e;if(Object.assign(e,{parentField:n,rowField:i}),r&&!o(t.spanMethod)){const e=Object.freeze({rowspan:0,colspan:0}),r=Object.freeze({rowspan:1,colspan:1});t.spanMethod=({row:o,column:i,$columnIndex:s})=>{const a=d.get(t.uuid);return a?i.treeNode?o[n]?r:{rowspan:1,colspan:a.colspan}:o[n]||"right"===i.fixed||s<a.index?r:e:r}}return e})),s.setupHooks.setup.tap(a,(e=>{i((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&d.delete(e.value.uuid)}))}))}})}export{a as virtualTreePlugin};
1
+ import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as n,isFunction as o}from"lodash-es";import{onBeforeUnmount as i}from"vue";import"../../../index.js";import{defineTablePlugin as s}from"../../hooks/useTablePlugin.js";function a(){const a="virtualTreePlugin",d=new Map;return s({name:a,apply(s){s.dataHooks.data.tap(a,((r,o,i)=>{if(!o.treeConfig)return;const{transform:s,rowField:a="__parentId",parentField:d="parentId",children:l="childrenList"}=o.treeConfig;function u(e){e[a]=e[a]||e.theUniqueKey||t()}s&&(u(r),n(r[l])&&e(r[l],((e,t,r)=>{r&&(e[d]=r[a]),i.insertAfter(e),u(e)}),l,r))})),s.fieldHooks.fieldList.tap(a,((e,t)=>{const{transform:n}=t.treeConfig||r;if(n&&t.uuid){const r=e.filter((e=>!1!==e.visible));let n=r.findIndex((e=>e.treeNode));~n||r.some(((e,t)=>{if(!e.type)return n=t,e.treeNode=!0}));const o=r.length-n-r.filter((e=>"right"===e.fixed)).length;d.set(t.uuid,{index:n,colspan:o})}return e})),s.configHooks.treeConfig.tap(a,((e,t)=>{if(!e)return e;const{transform:r,parentField:n="parentId",rowField:i="__parentId",hasChild:s="hasChild"}=e;if(!r)return e;if(Object.assign(e,{parentField:n,rowField:i}),r&&!o(t.spanMethod)){const e=Object.freeze({rowspan:0,colspan:0}),r=Object.freeze({rowspan:1,colspan:1});t.spanMethod=({row:o,column:i,$columnIndex:a})=>{const l=d.get(t.uuid);if(!l)return r;const u=Reflect.has(o,s)?!o[s]:o[n];return i.treeNode?u?r:{rowspan:1,colspan:l.colspan}:u||"right"===i.fixed||a<l.index?r:e}}return e})),s.setupHooks.setup.tap(a,(e=>{i((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&d.delete(e.value.uuid)}))}))}})}export{a as virtualTreePlugin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.41-beta.28",
3
+ "version": "3.1.41-beta.29",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "d9099331961f79903694a1aaf31a67178afa2dd2"
64
+ "gitHead": "877c050a41004e6d9a9178b145134300ea1e9d7a"
65
65
  }