cnhis-design-vue 3.1.48-beta.2 → 3.1.48-beta.4
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/plugins/bindEventSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/bindEventSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
- package/es/components/iho-table/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +0 -1
- package/es/components/iho-table/src/plugins/tooltipPlugin.d.ts +0 -1
- package/es/components/iho-table/src/plugins/tooltipPlugin.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bindEventSettingPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as n}from"lodash-es";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{getBindEventSettingTrigger as o}from"../../../../../shared/utils/business.js";function e(){const e="bindEventSettingPlugin";return t({name:e,apply(t){t.configHooks.config.tap(e,(t=>{const e=t.onFormChange;return t.onFormChange=function(t){var i;const{column:r,row:s}=t,u=null==(i=r.editRender)?void 0:i.props;if(u&&(null==u?void 0:u.bindEventSetting)){u.bindEventSetting.forEach((n=>{o(n.event_type)(n,{getter:n=>s[n],setter:(n,t)=>s[n]=t})}))}n(e)&&e(t)},t}))}})}export{e as bindEventSettingPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./
|
|
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 s from"./filterRenderPlugin/index.js";import*as d from"./highLightSetPlugin.js";import*as t from"./keyboardEventPlugin/index.js";import*as l from"./lowCodeFieldAdaptorPlugin/index.js";import*as g from"./maxCheckSizePlugin.js";import*as u from"./operationalFormPlugin/index.js";import*as o from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as a from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as m from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as x from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as f from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as j from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as R from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as b from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as w from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as c from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as h from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as W from"./rowClickPlugin/index.js";import*as v from"./rowDragPlugin/index.js";import*as k from"./rowGroupSettingPlugin/index.js";import*as C from"./varialbleHeightPlugin/index.js";import*as S from"./virtualTreePlugin/index.js";import{separateMetaModule as D}from"../../../../shared/utils/index.js";var E=D(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./defaultConfigPlugin/index.ts":i,"./filterDaterangeRenderPlugin/index.tsx":n,"./filterRenderPlugin/index.tsx":s,"./highLightSetPlugin.tsx":d,"./keyboardEventPlugin/index.ts":t,"./lowCodeFieldAdaptorPlugin/index.tsx":l,"./maxCheckSizePlugin.ts":g,"./operationalFormPlugin/index.ts":u,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":o,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":P,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":a,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":m,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":x,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":p,"./rendererPlugins/widgets/checkRendererPlugin.tsx":f,"./rendererPlugins/widgets/colorRendererPlugin.tsx":j,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":R,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":b,"./rendererPlugins/widgets/labelRendererPlugin.tsx":w,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":c,"./rendererPlugins/widgets/seqRendererPlugin.tsx":h,"./rowClickPlugin/index.ts":W,"./rowDragPlugin/index.ts":v,"./rowGroupSettingPlugin/index.ts":k,"./varialbleHeightPlugin/index.tsx":C,"./virtualTreePlugin/index.ts":S}));export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as d,isString as r}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as v}from"../../constants/index.js";import{defineTablePlugin as b}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as j}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function w(){const w="lowCodeFieldAdaptorPlugin";return b({name:w,apply(b){b.fieldHooks.field.tap({name:w,stage:c},((c,m,b)=>{const w=c,P={className:w.bold?"iho-table__boldCell":"",field:w.columnName,showOverflow:"
|
|
1
|
+
import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as d,isString as r}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as v}from"../../constants/index.js";import{defineTablePlugin as b}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as j}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function w(){const w="lowCodeFieldAdaptorPlugin";return b({name:w,apply(b){b.fieldHooks.field.tap({name:w,stage:c},((c,m,b)=>{const w=c,P={className:w.bold?"iho-table__boldCell":"",field:w.columnName,showOverflow:"ellipsis",visible:g.notNegative(w.isShow),minWidth:w.colWidth,sortable:g.isPositive(w.isSort),fixed:f[w.isFixed],...w,title:w.alias||w.title};return function(e,d){const c={default:d.slotFn,header:d.headerSlotFn,edit:d.editSlotFn,footer:d.footerSlotFn,...d.slots};if(a(d.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>d.checkEditStatus(l)?e(l):[t("span",null,j(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,d){var c;const f=l(h),m=l(v),p=l("$xetable"),b=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,b),j=R.hasFilter(t)||R.hasDateFiler(t),w=null==(c=t.titlePrefix)?void 0:c.content,P=r(d)?d:a(d)?d(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[b.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1;return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:s(Math.max(0,b.renderWidth-20-S-(F?14:0)-(g?18:0)-(j?23:0)-(x?22:0)-(w?20:0)-(b.sortable?23:0)))}},[null!=P?P:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[b.title])]),g?i(u,{modelValue:f.value[b.field],"onUpdate:modelValue":e=>f.value[b.field]=e},null):null])}(e,d,f),e.slots=c}(P,w),function(t,l,i){var o,s;const r=d(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={autofocus:"input",name:x.getCellType(l),props:r},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(P,w,b),P})),b.fieldHooks.field.tap({name:w+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{w as lowCodeFieldAdaptorPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as e,createVNode as o,mergeProps as t,onBeforeUnmount as i}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n,InjectionIhoTableUUID as l}from"../../../../constants/index.js";import{useAutoFocus as r}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as s,
|
|
1
|
+
import{inject as e,createVNode as o,mergeProps as t,onBeforeUnmount as i}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n,InjectionIhoTableUUID as l}from"../../../../constants/index.js";import{useAutoFocus as r}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as s,getTitle as u,IhoTableRenderHelper as d,IhoTableUtils as p}from"../../../../utils/index.js";import c from"./editSelect.js";import{getDefaultValue as a,getArray as f}from"./selectUtils.js";import{selectOptionsMap as m}from"../hooks/useSelectOption.js";import{defineTablePlugin as v}from"../../../../hooks/useTablePlugin.js";function E(){const E="selectRendererPlugin";return v({name:E,vxe(i){i.interceptor.add("event.clearActived",s(n.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),i.renderer.add(n.SELECT,{renderCell({props:t},{row:i,column:n}){const r=e(l),s=m.get(r)[n.field]||[],d=a(i,t,s);return[o("span",{title:u(n,d)},[d])]},renderEdit:d.createRenderEdit((({fieldItem:i,emitFormClick:n,row:r,column:s,$rowIndex:u})=>{const d=e(l),p=m.get(d)[s.field]||[];return[o(c,t({queryOptions:i.queryOptions},i.componentProps,{options:p,column:s,row:r,"row-index":u,value:r[s.field],"onUpdate:value":e=>r[s.field]=e,onClick:n}),null)]}))})},apply(e){r(e).bindAutoFocusConfig(E,n.SELECT,".n-base-selection-input");let o=null;e.fieldHooks.fieldList.tap(E,((e,{uuid:t})=>(o=e,t&&m.set(t,{}),e))),e.fieldHooks.fieldEnd.tapPromise(E,(async({uuid:e})=>{if(!e)return;const t=m.get(e);null==o||o.forEach((async e=>{var o,i,n;const l=null==(o=e.editRender)?void 0:o.props;if(e.field&&l&&"SELECT"===p.getCellType(l)){if(t[e.field])return;let o=f(l.options)||f(null==(i=l.componentProps)?void 0:i.options)||[];if(l.queryOptions)try{const t={column:e,isFullData:!0};o=await(null==(n=l.queryOptions)?void 0:n.call(l,t))}catch(e){console.log(`获取${l.field}_options错误`)}t[e.field]=o}})),o=null})),e.setupHooks.setup.tap(E,(e=>{i((()=>{e.value.uuid&&m.delete(e.value.uuid)}))}))}})}export{E as selectRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e}from"vue";import"../../../../index.js";import{WIDGET_TYPE as r}from"../../../constants/index.js";import{getRowHeight as
|
|
1
|
+
import{createVNode as e}from"vue";import"../../../../index.js";import{WIDGET_TYPE as r}from"../../../constants/index.js";import{getTitle as n,getRowHeight as o}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function t(){const t={blue:"blue",sky:"skyblue",azure:"azure",palegreen:"palegreen",yellow:"yellow",darkorange:"darkorange",magenta:"magenta",purple:"purple",maroon:"maroon",orange:"orange",green:"green",red:"red",grey:"grey"};return l({name:"colorRendererPlugin",vxe(l){l.renderer.add(r.COLOR,{renderCell(r,{row:l,column:a}){const u=l[a.field];if(!u)return[];const[i,g]=u.split("-");return[e("div",{title:n(a,u),style:{background:t[g]||i,height:o()-8+"px"}},null)]}})}})}export{t as colorRendererPlugin};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as
|
|
1
|
+
import{createVNode as n}from"vue";import"../../../../../../shared/utils/index.js";import{isObject as o,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as r,isRichContent as i,parseRichContent as l,getTitle as d}from"../../../utils/index.js";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";import{isMatchLowCodeCondition as c}from"../../../../../../shared/utils/business.js";function u(){return s({name:"defaultRendererPlugin",vxe(s){s.renderer.add(t.DEFAULT,{renderCell(t,{row:s,column:u}){const a=r(s,u),f=i(a)?function(o,e){const t=l(o);return[n("div",{title:d(e,t.change_text),style:{color:t.background||t.icon}},[r(t.icon),t.change_text])];function r(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:t.icon},null):null}}(a,u):[a];return function(o,t,r,i){if(!e(o)||!o.length)return n("div",{title:d(r,i)},[i]);const l=o.find((n=>n.condition&&n.condition.find((n=>{const o=t[n.field_key||r.field];return c(o,n)}))));return n("div",l?{title:d(r,i),style:{color:l.color},class:l.icon}:{title:d(r,i)},[i])}(function(n){var e,t,r;const i=null==(e=n.editRender)?void 0:e.props;if(!o(i))return;return null!=(r=i.colorAndIcon)?r:null==(t=i.settingObj)?void 0:t.colorAndIcon}(u),s,u,f)}}),s.renderer.add(t.STATUS,s.renderer.get(t.DEFAULT))}})}export{u as defaultRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e}from"vue";import{jsonParse as r}from"../../../../../../shared/utils/index.js";import{isArray as l,isString as o}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{defineTablePlugin as n}from"../../../hooks/useTablePlugin.js";function
|
|
1
|
+
import{createVNode as e}from"vue";import{jsonParse as r}from"../../../../../../shared/utils/index.js";import{isArray as l,isString as o}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{getTitle as i}from"../../../utils/index.js";import{defineTablePlugin as n}from"../../../hooks/useTablePlugin.js";function a(){return n({name:"labelRendererPlugin",vxe(n){n.renderer.add(t.LABEL,{renderCell(t,{row:n,column:a}){try{if(!n[a.field])return[];const t=r(n[a.field]),m=l(t.labels)?t.labels:(s=t.labelStr,o(s)?s.split(",").map((e=>({labelName:e}))):[]);return e("section",{title:i(a,m.map((e=>e.labelName)).join(",")),style:{display:"flex"}},[m.map((function(r){return e("div",{style:{backgroundColor:r.color||"#5585f5",color:"white",flex:"1"}},[r.labelName])}))])}catch(e){return[]}var s}})}})}export{a as labelRendererPlugin};
|
|
@@ -53,4 +53,5 @@ export declare function isRichContent(content: string): content is string;
|
|
|
53
53
|
export declare function parseRichContent(richContent: string): any;
|
|
54
54
|
export declare function parseMergeField(row: AnyObject, column: VxeTableDefines.ColumnInfo): any;
|
|
55
55
|
export declare function isCompatibleColumn(field: LowCodeTableFieldItem): number | false;
|
|
56
|
+
export declare function getTitle(column: VxeTableDefines.ColumnInfo, value?: string): string;
|
|
56
57
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as d,isString as a,isObject as s,isArray as f,cloneDeep as m}from"lodash-es";import{InjectionIhoTableConfig as p,InjectionIhoTableEmits as v,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as E,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function h(e){return console.warn(`[IhoTable]: ${e}`)}const T=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(p);return i||h("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function w(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function S(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return d(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function F(e){const t=n(v);function i(){var n;return{$table:e.$table,value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...m(r(e))})}function u(e={}){t("formClick",{...i(),...m(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}function P(e){var n;return null==(n=e.editRender)?void 0:n.props}const A=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",{title:_(t,n[t.field])},[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...F(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(D(e))return!0;let n=e.fieldSetting;return a(n)&&(n=o(n||"")),s(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),$=Object.freeze({isPositive:e=>e===E.POSITIVE||e===g.POSITIVE,isNegative:e=>e===E.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==E.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==E.NEGATIVE&&e!==g.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!s(o)||!l(o,n)};function b(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function V(e){return a(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!a(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&a(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;V(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const y=["SEARCH","SELECT","RADIO","CHECKBOX"];function D(e){return e.notParticipatingSearch===E.NEGATIVE&&y.includes(T.getCellType(e))&&f(e.options)&&e.options.length}function _(e,n=""){return"tooltip"===e.showOverflow?"":n}export{A as IhoTableRenderHelper,$ as IhoTableStatusHelper,T as IhoTableUtils,h as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,w as eventName2EventListener,O as getColumnRenderWidth,P as getLowCodeFieldFromField,C as getRowHeight,_ as getTitle,D as isCompatibleColumn,V as isRichContent,b as isTransformTreeType,U as parseMergeField,x as parseRichContent,F as useIhoTableFormEvent,S as useUUIDMap};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.48-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.48-beta.4",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.48-beta.4",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 +1 @@
|
|
|
1
|
-
import{isArray as e,isString as n,includes as r,
|
|
1
|
+
import{isArray as e,isString as n,includes as r,negate as t,gt as o,gte as a,isNumber as l,lt as u,lte as i,noop as c,isObject as p}from"lodash-es";import{unref as f}from"vue";function s(e){return null==e||""==e}const E={EQ:(e,n)=>`${e}`===n,NEQ:(e,n)=>`${e}`!==n,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:s,NOT_NULL:t(s),BIG:o,BIGEQ:a,LESS:(e,r)=>!!(l(e)||n(e)&&e)&&u(e,r),LESSEQ:(e,r)=>!!(l(e)||n(e)&&e)&&i(e,r)};function m(e,n){return(E[n.con]||(()=>!1))(e,`${n.value}`)}const L=Object.freeze({SET_VALUE:function(e,{getter:n,setter:r}){if(!p(e))return;const{results:t=[],params:o=[]}=e;if(!t.length)return;o.every((e=>e&&e.p_name&&m(n(e.p_name),{con:e.p_select,value:e.p_value})))&&t.forEach((e=>r(e.p_name,e.p_value)))},REPEAT_VALIDATE:c,IS_SHOW_FIELD:c,SQLSAVE:c,API:c});function _(e){return L[e]||c}function S(r,t,o){function a(n){return e(n)&&!!n.length}function u(e,r=!0){e.forEach((e=>{const a=e.operationFormParam.reduce(((e,n)=>(e[n=n.replace(/^table\./,"")]=+t(n),e)),{}),u=e.operationalRule.replace(/\${(.+?)}/g,"$1");let i=new Function("table",`return ${u}`)(a);n(i)&&(i=+i),i=l(i)?isNaN(i)?"":i.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,i)}))}return{operationalFormHandler:function(e){if(!a(f(r)))return;const n=f(r).filter((n=>n.operationFormParam.includes(`table.${e}`)));n.length&&u(n)},triggerAllOperationalFormHandler:function(){a(f(r))&&u(f(r),!1)}}}export{_ as getBindEventSettingTrigger,S as getOperationalFormHandler,m as isMatchLowCodeCondition};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.48-beta.
|
|
3
|
+
"version": "3.1.48-beta.4",
|
|
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": "5067928630f2b0c5cbc9009ea4bc7910be25da36"
|
|
67
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function fieldConnectionPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as n}from"lodash-es";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";import{getBindEventSettingTrigger as e}from"../../../../../shared/utils/business.js";function t(){const t="fieldConnectionPlugin";return o({name:t,apply(o){o.configHooks.config.tap(t,(o=>{const t=o.onFormChange;return o.onFormChange=function(o){var i;const{column:r,row:s}=o,l=null==(i=r.editRender)?void 0:i.props;if(l&&(null==l?void 0:l.bindEventSetting)){l.bindEventSetting.forEach((n=>{e(n.event_type)(n,{getter:n=>s[n],setter:(n,o)=>s[n]=o})}))}n(t)&&t(o)},o}))}})}export{t as fieldConnectionPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tooltipPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../index.js";import{IhoTableUtils as o,parseMergeField as e,isRichContent as t,parseRichContent as l}from"../utils/index.js";import{WIDGET_TYPE as r}from"../constants/index.js";import{isObject as i}from"@vue/shared";import{isArray as n}from"lodash-es";import{jsonParse as s}from"../../../../shared/utils/index.js";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function a(){const a="tooltipPlugin";return p({name:a,apply(p){p.fieldHooks.field.tap(a,((p,a,d,u)=>{var f,m;const c=null==(f=p.editRender)?void 0:f.props;if(!i(c))return p;const h=o.getCellType(c);return(null==(m=d.tooltipConfig)?void 0:m.showAll)&&(h!==r.LABEL&&h!==r.DEFAULT||(p.showOverflow="tooltip")),h!==r.PICTURE&&h!==r.HEADPORTRAIT&&h!==r.HTML||(p.showOverflow="ellipsis"),d.tooltipConfig={contentMethod:i=>{var p;const{column:a,row:d}=i,u=null==(p=a.editRender)?void 0:p.props;switch(o.getCellType(u)){case r.LABEL:{const o=s(d[a.field]);return n(o.labels)?o.labels.map((o=>o.labelName)).join(","):o.labelStr}case r.DEFAULT:{const o=e(d,a);if(t(o)){return l(o).change_text}return o}case r.HTML:return""}},...d.tooltipConfig},p}))}})}export{a as tooltipPlugin};
|