cnhis-design-vue 3.2.4-beta.18 → 3.2.4-beta.19

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.
@@ -610,7 +610,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
610
610
  setGroupTreeExpand: () => void;
611
611
  resetTableInlineEditStatus: () => false | undefined;
612
612
  renderAnnotation: (columnConfig: import("../../shared/types").AnyObject) => JSX.Element | null;
613
- toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
613
+ toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[] | (() => any);
614
614
  triggerExpand: (e: any, isExpand: any) => void;
615
615
  getOtherConfigInit: () => any;
616
616
  refreshTable: () => void;
@@ -612,7 +612,7 @@ declare const _default: import("vue").DefineComponent<{
612
612
  setGroupTreeExpand: () => void;
613
613
  resetTableInlineEditStatus: () => false | undefined;
614
614
  renderAnnotation: (columnConfig: AnyObject) => JSX.Element | null;
615
- toolTipTitle: (item: any, type?: any) => (() => any) | (JSX.Element | null)[];
615
+ toolTipTitle: (item: any, type?: any) => (JSX.Element | null)[] | (() => any);
616
616
  triggerExpand: (e: any, isExpand: any) => void;
617
617
  getOtherConfigInit: () => any;
618
618
  refreshTable: () => void;
@@ -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{reactive as e,inject as o,createVNode as l,mergeProps as n,onBeforeUnmount as t}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as d}from"../../../../constants/index.js";import{useAutoFocus as u}from"../hooks/useAutoFocus.js";import{getTitle as s,IhoTableRenderHelper as a,IhoTableUtils as c}from"../../../../utils/index.js";import p from"./editSelect.js";import{getDefaultValue as f,isConnectField as m,getArray as v}from"./selectUtils.js";import{getSelectOptions as w,selectOptionsMap as C}from"../hooks/useSelectOption.js";import{cloneDeep as y,isFunction as b,isEqual as g}from"lodash-es";import{defineTablePlugin as h}from"../../../../hooks/useTablePlugin.js";function P(){const P="selectRendererPlugin",x=e(new Map);function E(e){return!0===e||"1"===e}return h({name:P,vxe(e){e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:t,$table:r}){var u,a,c,p,m,v;const C=o(d),y=w(C,t.field,n,r);if(e&&e.labelToValue&&y.length){const o=E(null!=(a=null==(u=e.componentProps)?void 0:u.allowModify)?a:e.allowModify),l=E(null!=(p=null==(c=e.componentProps)?void 0:c.allowCreate)?p:e.allowCreate)||o;if(!o&&!l){const o=n[t.field],{aliasField:l="",labelField:i="label",valueField:r="value"}=e.componentProps||{};if(!y.find((e=>e[r]===o))){const e=y.find((e=>e[i]===o||e[l]===o));e?n[t.field]=e[r]:Reflect.deleteProperty(n,t.field)}}}const b=f(n,e,y),g=i(b).join(","),h=e&&(null==(m=e.componentProps)?void 0:m.multiple)&&(E(e.variableHeight)||(null==(v=e.componentProps)?void 0:v.indexedText));return[l("span",{title:s(t,g),class:"iho-table__colorAndIcon"},[h?i(b).reduce(((e,o)=>(null!=o&&e.push([o,";",l("br",null,null)]),e)),[]):g])]},renderEdit:a.createRenderEdit((({fieldItem:e,emitFormClick:t,row:i,column:r,$rowIndex:u,$table:s})=>{var a,c,f,m;const v=o(d),C=w(v,r.field,i,s),y=E(null!=(c=null==(a=e.componentProps)?void 0:a.allowModify)?c:e.allowModify),b=E(null!=(m=null==(f=e.componentProps)?void 0:f.allowCreate)?m:e.allowCreate)||y;return[l(p,n({queryOptions:e.queryOptions},e.componentProps,{options:C,column:r,row:i,"row-index":u,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,allowModify:y,allowCreate:b,onClick:t}),null)]}))})},apply(e){async function o(e,o={}){var l,n,t;const i=null==(l=e.editRender)?void 0:l.props;if(!i)return[];let r=v(i.options)||v(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const l={column:e,isFullData:!0,...o};r=await(null==(t=i.queryOptions)?void 0:t.call(i,l))}catch(e){console.log(`获取${i.field}_options错误`)}return r}function l(e){return e&&c.getCellType(e)===r.SELECT}u(e).bindAutoFocusConfig(P,r.SELECT,".n-base-selection-input,.n-base-selection-tags"),e.fieldHooks.fieldList.tap(P,((e,{uuid:n})=>{if(n){C.get(n)||C.set(n,{}),x.set(n,y(e));const t=C.get(n);e.forEach((async n=>{var i;const r=null==(i=n.editRender)?void 0:i.props;if(n.field&&r&&l(r)&&!m(e,n.field)){if(b(r.queryOptions)&&t[n.field])return;t[n.field]=[],t[n.field]=await o(n)}}))}return e})),e.dataHooks.data.tap(P,((e,{uuid:n},t)=>{if(!n)return;const i=x.get(n);if(!i||!i.length)return;const r=C.get(n);i.forEach((async n=>{var t;const d=null==(t=n.editRender)?void 0:t.props;if(n.field&&d&&l(d)&&(null==d?void 0:d.connectField)){const l=d.connectField.split(","),t=e[d.columnName];l.forEach((async l=>{const u=null==i?void 0:i.find((e=>e.field===l));if(!u)return;const s=t?`${l}__${d.columnName}-${t}`:l;r[s]||(r[s]=[],r[s]=await o(u,{row:e,connectColumn:n}))}))}}))})),e.setupHooks.setup.tap(P,(e=>{t((()=>{var o;const l=null==(o=e.value)?void 0:o.uuid;l&&(C.delete(l),x.delete(l))}))})),e.eventHooks.onCellDblclick.tap(P,((e,o,{emits:n})=>{var t,i,r;const{$table:d,row:u,column:s}=e,a=Reflect.get(e,"verticalState");let{column:c,row:p}=d.reactData.editStore.actived;if(!(c&&p||(a&&(c=null==(t=a.editCell)?void 0:t.column,p=null==(i=a.editCell)?void 0:i.row),c&&p)))return;a&&(c=s,p=u);const f=null==(r=c.editRender)?void 0:r.props,{cellDblclickSelectable:m=!1,multiple:v=!1,valueField:C="value"}=f.componentProps||{};if(!m||!l(f))return;const y=o.uuid&&w(o.uuid,c.field,p,d);if(1!==(null==y?void 0:y.length))return;const b=v?[y[0][C]]:y[0][C],h=p[c.field];d.clearEdit(),g(b,h)||(p[c.field]=b,n("formChange",{column:c,row:p,oldValue:h,value:b,index:d.getRowIndex(p),$table:d,option:y[0]}),a&&(a.editCell=null))}))}})}export{P as selectRendererPlugin};
1
+ import{reactive as e,inject as l,createVNode as o,mergeProps as n,onBeforeUnmount as t}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as d}from"../../../../constants/index.js";import{useAutoFocus as u}from"../hooks/useAutoFocus.js";import{getTitle as s,IhoTableRenderHelper as a,IhoTableUtils as c}from"../../../../utils/index.js";import p from"./editSelect.js";import{getDefaultValue as f,isConnectField as m,getArray as v}from"./selectUtils.js";import{getSelectOptions as w,selectOptionsMap as C}from"../hooks/useSelectOption.js";import{cloneDeep as y,isFunction as b,isEqual as g}from"lodash-es";import{defineTablePlugin as h}from"../../../../hooks/useTablePlugin.js";function P(){const P="selectRendererPlugin",x=e(new Map);function E(e){return!0===e||"1"===e}return h({name:P,vxe(e){e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:t,$table:r}){var u,a,c,p,m,v;const C=l(d),y=w(C,t.field,n,r);if(e&&e.labelToValue&&y.length){const l=E(null!=(a=null==(u=e.componentProps)?void 0:u.allowModify)?a:e.allowModify),o=E(null!=(p=null==(c=e.componentProps)?void 0:c.allowCreate)?p:e.allowCreate)||l,i=n[t.field];if(!l&&!o&&null!=i&&""!==i){const{aliasField:l="",labelField:o="label",valueField:r="value"}=e.componentProps||{};if(!y.find((e=>e[r]===i))){const e=y.find((e=>e[o]===i||e[l]===i));e?n[t.field]=e[r]:Reflect.deleteProperty(n,t.field)}}}const b=f(n,e,y),g=i(b).join(","),h=e&&(null==(m=e.componentProps)?void 0:m.multiple)&&(E(e.variableHeight)||(null==(v=e.componentProps)?void 0:v.indexedText));return[o("span",{title:s(t,g),class:"iho-table__colorAndIcon"},[h?i(b).reduce(((e,l)=>(null!=l&&e.push([l,";",o("br",null,null)]),e)),[]):g])]},renderEdit:a.createRenderEdit((({fieldItem:e,emitFormClick:t,row:i,column:r,$rowIndex:u,$table:s})=>{var a,c,f,m;const v=l(d),C=w(v,r.field,i,s),y=E(null!=(c=null==(a=e.componentProps)?void 0:a.allowModify)?c:e.allowModify),b=E(null!=(m=null==(f=e.componentProps)?void 0:f.allowCreate)?m:e.allowCreate)||y;return[o(p,n({queryOptions:e.queryOptions},e.componentProps,{options:C,column:r,row:i,"row-index":u,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,allowModify:y,allowCreate:b,onClick:t}),null)]}))})},apply(e){async function l(e,l={}){var o,n,t;const i=null==(o=e.editRender)?void 0:o.props;if(!i)return[];let r=v(i.options)||v(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const o={column:e,isFullData:!0,...l};r=await(null==(t=i.queryOptions)?void 0:t.call(i,o))}catch(e){console.log(`获取${i.field}_options错误`)}return r}function o(e){return e&&c.getCellType(e)===r.SELECT}u(e).bindAutoFocusConfig(P,r.SELECT,".n-base-selection-input,.n-base-selection-tags"),e.fieldHooks.fieldList.tap(P,((e,{uuid:n})=>{if(n){C.get(n)||C.set(n,{}),x.set(n,y(e));const t=C.get(n);e.forEach((async n=>{var i;const r=null==(i=n.editRender)?void 0:i.props;if(n.field&&r&&o(r)&&!m(e,n.field)){if(b(r.queryOptions)&&t[n.field])return;t[n.field]=[],t[n.field]=await l(n)}}))}return e})),e.dataHooks.data.tap(P,((e,{uuid:n},t)=>{if(!n)return;const i=x.get(n);if(!i||!i.length)return;const r=C.get(n);i.forEach((async n=>{var t;const d=null==(t=n.editRender)?void 0:t.props;if(n.field&&d&&o(d)&&(null==d?void 0:d.connectField)){const o=d.connectField.split(","),t=e[d.columnName];o.forEach((async o=>{const u=null==i?void 0:i.find((e=>e.field===o));if(!u)return;const s=t?`${o}__${d.columnName}-${t}`:o;r[s]||(r[s]=[],r[s]=await l(u,{row:e,connectColumn:n}))}))}}))})),e.setupHooks.setup.tap(P,(e=>{t((()=>{var l;const o=null==(l=e.value)?void 0:l.uuid;o&&(C.delete(o),x.delete(o))}))})),e.eventHooks.onCellDblclick.tap(P,((e,l,{emits:n})=>{var t,i,r;const{$table:d,row:u,column:s}=e,a=Reflect.get(e,"verticalState");let{column:c,row:p}=d.reactData.editStore.actived;if(!(c&&p||(a&&(c=null==(t=a.editCell)?void 0:t.column,p=null==(i=a.editCell)?void 0:i.row),c&&p)))return;a&&(c=s,p=u);const f=null==(r=c.editRender)?void 0:r.props,{cellDblclickSelectable:m=!1,multiple:v=!1,valueField:C="value"}=f.componentProps||{};if(!m||!o(f))return;const y=l.uuid&&w(l.uuid,c.field,p,d);if(1!==(null==y?void 0:y.length))return;const b=v?[y[0][C]]:y[0][C],h=p[c.field];d.clearEdit(),g(b,h)||(p[c.field]=b,n("formChange",{column:c,row:p,oldValue:h,value:b,index:d.getRowIndex(p),$table:d,option:y[0]}),a&&(a.editCell=null))}))}})}export{P as selectRendererPlugin};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.4-beta.18",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.4-beta.18",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};
1
+ var e="@cnhis-design-vue/shared",i="3.2.4-beta.19",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.4-beta.19",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.4-beta.18",
3
+ "version": "3.2.4-beta.19",
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": "e6ba41455a6b75e717ca1e850432aac5bb5d038a"
74
+ "gitHead": "bc0031c57459c46f1eb946e3f3ffa1930322b810"
75
75
  }