cnhis-design-vue 3.2.3-beta.12 → 3.2.3-beta.13
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/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEditCell.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +21 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -457,9 +457,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
457
457
|
requiredDisable: boolean;
|
|
458
458
|
hide: boolean;
|
|
459
459
|
}>;
|
|
460
|
+
isHighlightRow: boolean;
|
|
460
461
|
idx: number;
|
|
461
462
|
isHighlight: boolean;
|
|
462
|
-
isHighlightRow: boolean;
|
|
463
463
|
}>;
|
|
464
464
|
EditDialog: import("vue").DefineComponent<{
|
|
465
465
|
visible: {
|
|
@@ -575,9 +575,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
575
575
|
requiredDisable: boolean;
|
|
576
576
|
hide: boolean;
|
|
577
577
|
}>;
|
|
578
|
+
isHighlightRow: boolean;
|
|
578
579
|
idx: number;
|
|
579
580
|
isHighlight: boolean;
|
|
580
|
-
isHighlightRow: boolean;
|
|
581
581
|
}>;
|
|
582
582
|
isArray: {
|
|
583
583
|
(value?: any): value is any[];
|
|
@@ -282,8 +282,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
282
282
|
requiredDisable: boolean;
|
|
283
283
|
hide: boolean;
|
|
284
284
|
}>;
|
|
285
|
+
isHighlightRow: boolean;
|
|
285
286
|
idx: number;
|
|
286
287
|
isHighlight: boolean;
|
|
287
|
-
isHighlightRow: boolean;
|
|
288
288
|
}>;
|
|
289
289
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findAncestor as e}from"../../../../../../../shared/utils/index.js";import{onBeforeUnmount as
|
|
1
|
+
import{findAncestor as e}from"../../../../../../../shared/utils/index.js";import{isFunction as t}from"lodash-es";import{onBeforeUnmount as i,unref as n}from"vue";import{WIDGET_TYPE as o}from"../../../../constants/index.js";import{isVerticalTable as l,createVerticalStateHandler as r,isVerticalHeader as d,basicParamsConvert as u}from"../utils.js";const s=["RADIO","SWITCH"],c=(c,a,f)=>{a.eventHooks.onCellClick.tap("useEditCell",((e,i)=>{var n,o;const{uuid:d}=i;if(!d||!l(i))return;const{row:u,$columnIndex:s,column:c}=e,a=f(d);if(!a||!c.editRender)return;const v=r(a).getTableConfig("editConfig.beforeEditMethod");!t(v)||v(e)?a.editCell=u&&s<=(null!=(o=null==(n=a.fixedLeftVerticalData)?void 0:n.length)?o:0)?{row:u,column:c}:null:a.editCell=null})),c.config.tap("useEditCell",((i,n)=>(i.uuid&&(n.editStateEvent&&window.removeEventListener("click",n.editStateEvent,{capture:!0}),n.editStateEvent=t=>{e(t.target,(e=>e.getAttribute("uuid")===i.uuid||e.classList.contains("vxe-table--ignore-clear")))||(n.editCell=null)},window.addEventListener("click",n.editStateEvent,{capture:!0})),i.editConfig={...i.editConfig,showIcon:!1,beforeEditMethod(e){var i;const{row:l,column:c}=e,{originalField:a={}}=l;if(d(c.field))return!1;const{editRender:{name:f=o.DEFAULT}={}}=a;if(Object.values(o).concat(s).includes(f))return!1;if(null==(i=a.slots)?void 0:i.default)return!!a.slots.edit;const v=r(n).getTableConfig("editConfig.beforeEditMethod");return!t(v)||v(u(e,n))}},i))),a.setupHooks.setup.tap("Vertical-UseEditCell",(e=>{i((()=>{const{uuid:t}=n(e)||{};if(!t)return;const i=f(t);i.editStateEvent&&window.removeEventListener("click",i.editStateEvent,{capture:!0})}))}))};export{c as useEditCell};
|
package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e}from"lodash-es";import{unref as l}from"vue";import{isVerticalTable as
|
|
1
|
+
import{isObject as e}from"lodash-es";import{unref as l}from"vue";import{isVerticalTable as t,basicParamsConvert as r}from"../utils.js";const c=(c,o,i)=>{o.eventHooks.beforeEvent.tap("Vertical--useEventConvert",((c,o,a,n)=>{var d;if(!e(c))return c;const v=null==(d=l(o))?void 0:d.uuid;if(!v||!t(o))return c;const u=c,b=i(v),{$table:k,$event:s,cell:C}=u,m=r(u,b),h=m.type;return u.column&&("headerCellClick"===n&&"body"===h?n="cellClick":"cellClick"===n&&"header"===h&&(n="headerCellClick"),"headerCellDblclick"===n&&"body"===h?n="cellDblclick":"cellDblclick"===n&&"header"===h&&(n="headerCellDblclick")),{_originalPayload:u,$table:k,$event:s,cell:C,...m,eventName:n,verticalState:b}}))};export{c as useEventConvert};
|
|
@@ -36,3 +36,24 @@ export declare function createVerticalStateHandler(verticalState: IhoTableVertic
|
|
|
36
36
|
readonly getTableConfig: (path: string) => any;
|
|
37
37
|
};
|
|
38
38
|
export declare function createDataProxy(originalField: IhoTableFieldItem, dataList: AnyObject[] | (() => AnyObject[])): {};
|
|
39
|
+
export declare function basicParamsConvert({ $columnIndex, $rowIndex, column, columnIndex, row, rowIndex, type, _columnIndex, _rowIndex }: Partial<{
|
|
40
|
+
$columnIndex: number;
|
|
41
|
+
$rowIndex: number;
|
|
42
|
+
column: VxeTableDefines.ColumnInfo;
|
|
43
|
+
columnIndex: number;
|
|
44
|
+
row: AnyObject;
|
|
45
|
+
rowIndex: number;
|
|
46
|
+
type: 'body' | 'header';
|
|
47
|
+
_columnIndex: number;
|
|
48
|
+
_rowIndex: number;
|
|
49
|
+
}>, verticalState: IhoTableVerticalState): {
|
|
50
|
+
column: VxeTableDefines.ColumnInfo | undefined;
|
|
51
|
+
row: AnyObject | undefined;
|
|
52
|
+
_columnIndex: number | undefined;
|
|
53
|
+
_rowIndex: number | undefined;
|
|
54
|
+
columnIndex: number | undefined;
|
|
55
|
+
rowIndex: number | undefined;
|
|
56
|
+
$columnIndex: number | undefined;
|
|
57
|
+
$rowIndex: number | undefined;
|
|
58
|
+
type: "body" | "header" | undefined;
|
|
59
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{traverse as e,findAncestor as n,getStringWidth as t}from"../../../../../../shared/utils/index.js";import{isString as r,isNumber as i,constant as o,isFunction as
|
|
1
|
+
import{traverse as e,findAncestor as n,getStringWidth as t}from"../../../../../../shared/utils/index.js";import{isString as r,isNumber as i,constant as o,isFunction as l,noop as a,range as d,property as u}from"lodash-es";import{IhoTableRenderHelper as c}from"../../../utils/index.js";import{VERTICAL_CELL_TYPE as f}from"./constants.js";function s(e){var n;return!!(null==(n=e.verticalConfig)?void 0:n.enable)}function h(e){return!!r(e)&&e.startsWith("header_")}function p(e){return!!r(e)&&e.startsWith("body_")}function _(e){var n;return r(e)?+(null!=(n=e.split("_")[1])?n:-1):-1}function m(n,t){const r=[];return e(n,((e,n,o)=>{e.parent=o,e.children||(!function(e,n){let t=e,r=n;if(!e.parent)return e[`header_${n}`]=e.title,void d(n+1).forEach((t=>{e[`header_${t}_colspan`]=t===n?n+1:0,e[`header_${t}_rowspan`]=t===n?1:0}));for(;t;)e[`header_${r}`]=t.title,e[`header_${r}_rowspan`]=i(t),e[`header_${r}_colspan`]=1,r--,t=t.parent}(e,t),r.push(e))})),r.forEach(((e,n)=>{const i=r[n-1];i&&Object.entries(e).forEach((([n,r])=>{n.match(/^header_(\d+)$/)&&r===i[n]&&r&&n!==`header_${t}`&&(e[`${n}_colspan`]=0,e[`${n}_rowspan`]=0)}))})),r;function i(n){if(!n.children)return 1;let t=0;return e(n.children,(e=>{e.children||t++})),t}}function g({row:e,column:n}){var t,r;return h(n.field)?{rowspan:null!=(t=e[n.field+"_rowspan"])?t:1,colspan:null!=(r=e[n.field+"_colspan"])?r:1}:{colspan:1,rowspan:1}}const x=({cell:e}={})=>{const n=e&&e.querySelector("input,.n-input__input-el");return n&&n.click(),n};function w(n,r){let i=120;return e(r,((e,r,o,l)=>{l===n&&(i=Math.max(i,t(e.title||"")+20+(c.hasTitlePrefix(e)?20:0)))})),Math.ceil(i)}function $(e,n,t){const r=T(t);let u=r.getTableConfig("verticalConfig.headerWidth");u="auto"===u?w:i(u)?o(u):l(u)?u:w;let c=r.getTableConfig("verticalConfig.bodyWidth");c=i(c)?o(c):l(c)?c:a;let s=r.getTableConfig("verticalConfig.bodyMinWidth");return s=i(s)?o(s):l(s)?s:o(120),[...d(n+1).map((e=>({field:`header_${e}`,title:`header_${e}`,width:u(e,t.originalFieldList),fixed:"left",editRender:{name:f,props:{},enable:!1}}))),...e.map(((e,n)=>({field:`body_${n}`,title:`body_${n}`,minWidth:s(n),width:c(n),editRender:{name:f,props:{},enable:!0,autofocus:x}})))]}function y(e){const t=n(e.target,(e=>"TD"===e.tagName||"TH"===e.tagName));if(!t)return;const r=t.className.match(/(body|header)_(\d+)/);if(!r)return;const[i,o,l]=r;return{fieldKey:i,type:o,sequence:+l}}function b(e){return u("originalField")(e)}function v(e,n){return u(`originalData.${n}`)(e)}function I(e,n){const t=_(n.field),r=b(e);return{row:v(e,t),rowIndex:t,$rowIndex:t,column:r,fixed:r.fixed,type:r.type}}function C(n){const t=[];return e(n,(e=>{"left"===e.fixed&&t.push(e)})),t}function T(e){return{getOriginDataByColumn(n){const{originalData:t=[]}=e;return t[_(n.field)]},getTableConfig:n=>u(n)(e.originalTableConfig)}}function D(e,n){return new Proxy({},{get(t,r){var i;if("originalField"===r)return e;if("originalData"===r)return l(n)?n():n;if(h(r))return e[r];if(p(r)){const t=_(r);return"seq"===e.type?t+1:null==(i=n[t])?void 0:i[e.field]}return t[r]},set(t,r,i){if(!h(r)){const t=_(r);t>=0&&n[t]&&(n[t][e.field]=i)}return!0}})}function W({$columnIndex:e,$rowIndex:n,column:t,columnIndex:r,row:i,rowIndex:o,type:l,_columnIndex:a,_rowIndex:d},u){var c;if(t){const f=l;if(l=h(t.field)?"header":"body",i){const s=_(t.field);t=b(i),i="header"===l?void 0:v(i,s),a=r=e="header"===f?n||0:((null==(c=u.fixedLeftVerticalData)?void 0:c.length)||0)+(n||0),d=o=n="header"===l?-1:s}}return{column:t,row:i,_columnIndex:a,_rowIndex:d,columnIndex:r,rowIndex:o,$columnIndex:e,$rowIndex:n,type:l}}x.toString=()=>"input,.n-input__input-el";export{W as basicParamsConvert,m as bindHeaderInfoAndFlatten,D as createDataProxy,$ as createVerticalFieldList,T as createVerticalStateHandler,C as findFixedLeftFields,_ as getHeaderDepthByField,I as getOriginBasePayload,b as getOriginFieldFromRowData,v as getOriginRowFromRowData,g as getSpanInfo,y as getVerticalInfoFromEvent,p as isVerticalBody,h as isVerticalHeader,s as isVerticalTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.3-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.3-beta.13",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.2.3-beta.13",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.2.3-beta.
|
|
3
|
+
"version": "3.2.3-beta.13",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "8ec6c5f452bded81b77937a624340f19a77f81f7"
|
|
75
75
|
}
|