cnhis-design-vue 3.1.41-beta.40 → 3.1.41-beta.41

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.
@@ -2097,6 +2097,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2097
2097
  uuid?: string | undefined;
2098
2098
  isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2099
2099
  isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2100
+ hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2100
2101
  showSeq?: boolean | undefined;
2101
2102
  selectType?: "checkbox" | "radio" | null | undefined;
2102
2103
  rowGroupSetting?: {
@@ -4502,6 +4503,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4502
4503
  uuid?: string | undefined;
4503
4504
  isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4504
4505
  isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4506
+ hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4505
4507
  showSeq?: boolean | undefined;
4506
4508
  selectType?: "checkbox" | "radio" | null | undefined;
4507
4509
  rowGroupSetting?: {
@@ -2096,6 +2096,7 @@ declare const _default: import("vue").DefineComponent<{
2096
2096
  uuid?: string | undefined;
2097
2097
  isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2098
2098
  isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2099
+ hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2099
2100
  showSeq?: boolean | undefined;
2100
2101
  selectType?: "checkbox" | "radio" | null | undefined;
2101
2102
  rowGroupSetting?: {
@@ -4501,6 +4502,7 @@ declare const _default: import("vue").DefineComponent<{
4501
4502
  uuid?: string | undefined;
4502
4503
  isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4503
4504
  isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4505
+ hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4504
4506
  showSeq?: boolean | undefined;
4505
4507
  selectType?: "checkbox" | "radio" | null | undefined;
4506
4508
  rowGroupSetting?: {
@@ -59,10 +59,10 @@ export declare enum IHO_TABLE_STRING_STATUS {
59
59
  POSITIVE = "1"
60
60
  }
61
61
  export declare enum IHO_TABLE_TREE_TYPE {
62
- NOT_TREE = 0,
63
- UNKNOWN = 1,
64
- TRANSFORM_TREE_TYPE = 2,
65
- TRANSFORM_WITH_SPAN_METHOD = 3
62
+ NOT_TREE = "0",
63
+ UNKNOWN = "1",
64
+ TRANSFORM_TREE_TYPE = "2",
65
+ TRANSFORM_WITH_SPAN_METHOD = "3"
66
66
  }
67
67
  export declare enum IHO_TABLE_FIXED_STATUS {
68
68
  left = 1,
@@ -1 +1 @@
1
- import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,T=1/0;var A=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e))(A||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e[e.NOT_TREE=0]="NOT_TREE",e[e.UNKNOWN=1]="UNKNOWN",e[e.TRANSFORM_TREE_TYPE=2]="TRANSFORM_TREE_TYPE",e[e.TRANSFORM_WITH_SPAN_METHOD=3]="TRANSFORM_WITH_SPAN_METHOD",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const R=["formChange","settingClick","formClick","keyboard"],i=[...R,...E],I=Symbol("injectionIhoTableConfig"),N=Symbol("injectionIhoTableFieldList"),O=Symbol("InjectionIhoTableEmits"),D=Symbol("InjectionIhoTableAnnotation"),c=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),d=Symbol("InjectionIhoTableEventListener");export{A as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,i as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,D as InjectionIhoTableAnnotation,I as InjectionIhoTableConfig,O as InjectionIhoTableEmits,d as InjectionIhoTableEventListener,N as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,c as InjectionIhoTableUUID,T as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
1
+ import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),i=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(i||{});const S=["formChange","settingClick","formClick","keyboard"],I=[...S,...E],R=Symbol("injectionIhoTableConfig"),O=Symbol("injectionIhoTableFieldList"),D=Symbol("InjectionIhoTableEmits"),N=Symbol("InjectionIhoTableAnnotation"),c=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),d=Symbol("InjectionIhoTableHandler"),M=Symbol("InjectionIhoTableEventListener");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,i as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,S as IhoTableCustomEventNameTuple,I as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,N as InjectionIhoTableAnnotation,R as InjectionIhoTableConfig,D as InjectionIhoTableEmits,M as InjectionIhoTableEventListener,O as InjectionIhoTableFieldList,d as InjectionIhoTableHandler,h as InjectionIhoTableInstance,c as InjectionIhoTableUUID,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
@@ -1 +1 @@
1
- import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s,isTransformTreeType as n}from"../../utils/index.js";function r(){const r="defaultTablePlugin";return t({name:r,apply(t){t.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(s.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),t.configHooks.treeConfig.tap({name:r,stage:i},((e,o)=>n(o)?Object.assign({transform:!0,expandAll:!0,reserve:!0,children:"childrenList",parentField:"parentId",rowField:"__parentId",hasChild:"hasChild"},e):e)),t.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}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,apply(t){t.configHooks.config.tap({name:n,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(s.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
@@ -1 +1 @@
1
- import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";function l(){const l="seqRendererPlugin";return s({name:l,apply(s){s.fieldHooks.field.tap({name:l,before:"checkRendererPlugin"},((s,{index:f,insertBefore:c},m)=>{var u;if(0===f&&m.showSeq){const s={align:"center",fixed:"left",width:50,type:"seq",field:l,annotation:!1,slots:{header(){const i=o(r);return[e(t,{style:{cursor:"pointer"},size:"14",color:"#777",component:n,onClick:function(){i&&i("settingClick")}},null)]}}};i(null==(u=m.columnConfig)?void 0:u.seqSlotFn)&&(s.slots.default=m.columnConfig.seqSlotFn),c(s)}return s}))}})}export{l as seqRendererPlugin};
1
+ import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as t}from"lodash-es";import{NIcon as i}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as s}from"../../../constants/index.js";import{IhoTableStatusHelper as r}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function f(){const f="seqRendererPlugin";return l({name:f,apply(l){l.fieldHooks.field.tap({name:f,before:"checkRendererPlugin"},((l,{index:m,insertBefore:c},u)=>{var d;if(0===m&&u.showSeq){const l={align:"center",fixed:"left",width:50,type:"seq",field:f,annotation:!1};r.notPositive(u.hideSettingBtn)&&(l.slots||(l.slots={}),l.slots.header=()=>{const t=o(s);return[e(i,{style:{cursor:"pointer"},size:"14",color:"#777",component:n,onClick:function(){t&&t("settingClick")}},null)]}),t(null==(d=u.columnConfig)?void 0:d.seqSlotFn)&&(l.slots||(l.slots={}),l.slots.default=u.columnConfig.seqSlotFn),c(l)}return l}))}})}export{f as seqRendererPlugin};
@@ -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{IHO_TABLE_TREE_TYPE as s}from"../../constants/index.js";import{isTransformTreeType as a}from"../../utils/index.js";import{defineTablePlugin as d}from"../../hooks/useTablePlugin.js";function u(){const u="virtualTreePlugin",l=new Map;return d({name:u,apply(d){d.dataHooks.data.tap(u,((r,o,i)=>{if(!o.treeConfig)return;const{transform:s,rowField:d="__parentId",parentField:u="parentId",children:l="childrenList"}=o.treeConfig;function f(e){e[d]=e[d]||e.theUniqueKey||t()}a(o)&&s&&(f(r),n(r[l])&&e(r[l],((e,t,r)=>{r&&(e[u]=r[d]),i.insertAfter(e),f(e)}),l,r))})),d.fieldHooks.fieldList.tap(u,((e,t)=>{if(!t.treeConfig)return e;const{transform:n}=t.treeConfig||r;if(!a(t)||!n||!t.uuid)return e;const o=e.filter((e=>!1!==e.visible));let i=o.findIndex((e=>e.treeNode));~i||o.some(((e,t)=>{if(!e.type)return i=t,e.treeNode=!0}));const s=o.length-i-o.filter((e=>"right"===e.fixed)).length;return l.set(t.uuid,{index:i,colspan:s}),e})),d.configHooks.treeConfig.tap(u,((e,t)=>{if(!e)return e;const{transform:r,parentField:n="parentId",hasChild:i="hasChild"}=e;if(o(t.spanMethod)||!r||t.isTree!==s.TRANSFORM_WITH_SPAN_METHOD)return e;const a=Object.freeze({rowspan:0,colspan:0}),d=Object.freeze({rowspan:1,colspan:1});return t.spanMethod=({row:e,column:r,$columnIndex:o})=>{const s=l.get(t.uuid);if(!s)return d;const u=Reflect.has(e,i)?!e[i]:e[n];return r.treeNode?u?d:{rowspan:1,colspan:s.colspan}:u||"right"===r.fixed||o<s.index?d:a},e})),d.setupHooks.setup.tap(u,(e=>{i((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&l.delete(e.value.uuid)}))}))}})}export{u as virtualTreePlugin};
1
+ import{traverse as e,uuidGenerator as t,DMZ as r}from"../../../../../shared/utils/index.js";import{isArray as n,isFunction as i}from"lodash-es";import{onBeforeUnmount as o}from"vue";import"../../../index.js";import{HIGHEST_PRIORITY as s,IHO_TABLE_TREE_TYPE as a}from"../../constants/index.js";import{isTransformTreeType as d}from"../../utils/index.js";import{defineTablePlugin as l}from"../../hooks/useTablePlugin.js";function f(){const f="virtualTreePlugin",u=new Map;return l({name:f,apply(l){l.configHooks.treeConfig.tap({name:f,stage:s},((e,t)=>d(t)?Object.assign({transform:!0,expandAll:!0,reserve:!0,children:"childrenList",rowField:"__id"},e):e)),l.dataHooks.data.tap(f,((r,i,o)=>{if(!i.treeConfig)return;const{transform:s,rowField:a="__id",parentField:l="parentId",children:f="childrenList"}=i.treeConfig;function u(e){e[a]=e[a]||e.theUniqueKey||t()}d(i)&&s&&(u(r),n(r[f])&&e(r[f],((e,t,r)=>{r&&(e[l]=r[a]),o.insertAfter(e),u(e)}),f,r))})),l.fieldHooks.fieldList.tap(f,((e,t)=>{if(!t.treeConfig)return e;const{transform:n}=t.treeConfig||r;if(!d(t)||!n||!t.uuid)return e;const i=e.filter((e=>!1!==e.visible));let o=i.findIndex((e=>e.treeNode));~o||i.some(((e,t)=>{if(!e.type)return o=t,e.treeNode=!0}));const s=i.length-o-i.filter((e=>"right"===e.fixed)).length;return u.set(t.uuid,{index:o,colspan:s}),e})),l.configHooks.treeConfig.tap(f,((e,t)=>{if(!e)return e;const{transform:r,parentField:n="parentId",hasChild:o="hasChild"}=e;if(i(t.spanMethod)||!r||`${t.isTree}`!==a.TRANSFORM_WITH_SPAN_METHOD)return e;const s=Object.freeze({rowspan:0,colspan:0}),d=Object.freeze({rowspan:1,colspan:1});return t.spanMethod=({row:e,column:r,$columnIndex:i})=>{const a=u.get(t.uuid);if(!a)return d;const l=Reflect.has(e,o)?!e[o]:e[n];return r.treeNode?l?d:{rowspan:1,colspan:a.colspan}:l||"right"===r.fixed||i<a.index?d:s},e})),l.setupHooks.setup.tap(f,(e=>{o((()=>{var t;(null==(t=e.value)?void 0:t.uuid)&&u.delete(e.value.uuid)}))}))}})}export{f as virtualTreePlugin};
@@ -15,6 +15,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
15
15
  uuid: string;
16
16
  isTree: MaybeString<0 | 1 | 2 | 3>;
17
17
  isBatchSelect: MaybeString<0 | 1>;
18
+ hideSettingBtn: MaybeString<0 | 1>;
18
19
  showSeq: boolean;
19
20
  selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
20
21
  rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
@@ -1 +1 @@
1
- import{inject as e,unref as n,toRaw as t,createVNode as r}from"vue";import{jsonParse as o,findAncestor as i}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{isNumber as l,cloneDeep as c,isString as a,isObject as d}from"lodash-es";import{InjectionIhoTableEmits as s,InjectionIhoTableConfig as f,IHO_TABLE_STRING_STATUS as m,IHO_TABLE_NUMBER_STATUS as v,IHO_TABLE_TREE_TYPE as p}from"../constants/index.js";function I(e){return console.warn(`[IhoTable]: ${e}`)}const E=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function T(){var n,t,r;const o=e(f);return o||I("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(n=null==o?void 0:o.value)?void 0:n.rowConfig)?void 0:t.height)?r:32}function h(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function g(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}async function C(e,t){return r()||await u(0),r()||function(){const n=+e.colWidth;return l(n)?n:64}();function r(){var r,o;return null==(o=null==(r=n(t))?void 0:r.getColumnByField(e.field))?void 0:o.renderWidth}}function w(n){const r=e(s);function o(){var e;return{value:n.row[n.column.field],row:n.row,column:{...n.column,...null==(e=n.column.editRender)?void 0:e.props},index:n.rowIndex>-1?n.rowIndex:n.$rowIndex}}function i(e={}){r("formChange",{...o(),...c(t(e))})}function u(e={}){r("formClick",{...o(),...c(t(e))})}return{emitFormChange:function(){i()},emitFormClick:function(){u()},emitFormChangeWithParams:i,emitFormClickWithParams:u}}const O=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[r("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...w(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){return a(e)&&(e=o(e||"")),d(e)&&((n=e).notParticipatingSearch!==m.POSITIVE&&"manual"===(null==(t=n.mapping)?void 0:t.type));var n,t}}),P=Object.freeze({isPositive:e=>e===v.POSITIVE||e===m.POSITIVE,isNegative:e=>e===v.NEGATIVE||e===m.NEGATIVE,notPositive:e=>e!==v.POSITIVE&&e!==m.POSITIVE,notNegative:e=>e!==v.NEGATIVE&&e!==m.NEGATIVE}),R=(e,n)=>({$event:t,column:r})=>{var o;if((null==(o=r.editRender)?void 0:o.name)!==e)return!0;const u=null==t?void 0:t.target;return!d(u)||!i(u,n)};function F(e){return[p.TRANSFORM_WITH_SPAN_METHOD,p.TRANSFORM_TREE_TYPE].includes(e.isTree)}export{O as IhoTableRenderHelper,P as IhoTableStatusHelper,E as IhoTableUtils,I as IhoTableWarn,R as createIhoTableClearActivedInterceptor,h as eventListener2EventName,g as eventName2EventListener,C as getColumnRenderWidth,T as getRowHeight,F as isTransformTreeType,w as useIhoTableFormEvent};
1
+ import{inject as e,unref as n,toRaw as t,createVNode as r}from"vue";import{jsonParse as o,findAncestor as i}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{isNumber as l,cloneDeep as c,isString as a,isObject as d}from"lodash-es";import{InjectionIhoTableEmits as s,InjectionIhoTableConfig as f,IHO_TABLE_STRING_STATUS as m,IHO_TABLE_NUMBER_STATUS as v,IHO_TABLE_TREE_TYPE as p}from"../constants/index.js";function I(e){return console.warn(`[IhoTable]: ${e}`)}const E=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function T(){var n,t,r;const o=e(f);return o||I("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(n=null==o?void 0:o.value)?void 0:n.rowConfig)?void 0:t.height)?r:32}function h(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function g(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}async function C(e,t){return r()||await u(0),r()||function(){const n=+e.colWidth;return l(n)?n:64}();function r(){var r,o;return null==(o=null==(r=n(t))?void 0:r.getColumnByField(e.field))?void 0:o.renderWidth}}function w(n){const r=e(s);function o(){var e;return{value:n.row[n.column.field],row:n.row,column:{...n.column,...null==(e=n.column.editRender)?void 0:e.props},index:n.rowIndex>-1?n.rowIndex:n.$rowIndex}}function i(e={}){r("formChange",{...o(),...c(t(e))})}function u(e={}){r("formClick",{...o(),...c(t(e))})}return{emitFormChange:function(){i()},emitFormClick:function(){u()},emitFormChangeWithParams:i,emitFormClickWithParams:u}}const O=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[r("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...w(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){return a(e)&&(e=o(e||"")),d(e)&&((n=e).notParticipatingSearch!==m.POSITIVE&&"manual"===(null==(t=n.mapping)?void 0:t.type));var n,t}}),P=Object.freeze({isPositive:e=>e===v.POSITIVE||e===m.POSITIVE,isNegative:e=>e===v.NEGATIVE||e===m.NEGATIVE,notPositive:e=>e!==v.POSITIVE&&e!==m.POSITIVE,notNegative:e=>e!==v.NEGATIVE&&e!==m.NEGATIVE}),R=(e,n)=>({$event:t,column:r})=>{var o;if((null==(o=r.editRender)?void 0:o.name)!==e)return!0;const u=null==t?void 0:t.target;return!d(u)||!i(u,n)};function F(e){return[p.TRANSFORM_WITH_SPAN_METHOD,p.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}export{O as IhoTableRenderHelper,P as IhoTableStatusHelper,E as IhoTableUtils,I as IhoTableWarn,R as createIhoTableClearActivedInterceptor,h as eventListener2EventName,g as eventName2EventListener,C as getColumnRenderWidth,T as getRowHeight,F as isTransformTreeType,w as useIhoTableFormEvent};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.41-beta.40",
3
+ "version": "3.1.41-beta.41",
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": "3a173f73d3f4ea4d684f65694843d3b6c0b400f3"
64
+ "gitHead": "e317d8b9ed0db6215d4a0135e398135a391c70ae"
65
65
  }