cnhis-design-vue 3.1.42-beta.36 → 3.1.42-beta.38
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/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +4 -3
- 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/utils/index.d.ts +3 -3
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{hex2rgba as o}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import"../../index.js";import{useUUIDMap as t}from"../utils/index.js";import{defineTablePlugin as e}from"../hooks/useTablePlugin.js";function i(){const i="highLightSetPlugin",{getItemFromUUID:n,removeItemFromUUID:u,setItemFromUUID:s}=t((()=>!1));return e({name:i,apply(t){t.dataHooks.data.tapPromise(i,(async(o,r)=>{r.uuid&&(o.rowColor||o.fontColor)&&s(r.uuid,!0)})),t.dataHooks.dataEnd.tap(i,(t=>{if(!t.uuid||!n(t.uuid))return;const e=t.rowStyle;t.rowStyle=function(t){if(t.row.rowColor||t.row.fontColor){const[i,n,u,s]=o(t.row.rowColor,.2),a={backgroundColor:`rgba(${i}, ${n}, ${u}, ${s})`,color:t.row.fontColor};return r(e)?Object.assign(a,e(t)):a}return r(e)?e(t):null},u(t.uuid)}))}})}export{i as highLightSetPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v}from"../../../../utils/index.js";import{isSeparateColumn as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v,parseMergeField as h}from"../../../../utils/index.js";import{isSeparateColumn as A,contentSeparate as E,getColumnInfoMaxLength as g,generateSeparateRowData as k}from"./separateUtils.js";import x from"./editSeparate.vue.js";import{defineTablePlugin as b}from"../../../../hooks/useTablePlugin.js";function w(){const w="separateRendererPlugins",P=e(new Map);function R(e,t){var o;return null==(o=P.get(e))?void 0:o.get(t)}function T(e,t,o){const n=P.get(e)||new WeakMap;P.set(e,n),n.set(t,o)}const _=e(new Map);return b({name:w,vxe(e){e.interceptor.add("event.clearActived",p(u.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(u.SEPARATE,{renderCell(e,{column:n,row:i}){const r=R(t(c),i)||{separateData:{}};return o("section",null,[r.separateData[n.field]])},renderEdit:f.createRenderEdit((({fieldItem:e,column:r,row:a,emitFormClick:l})=>{var u,p,f;const v=R(t(c),a),h=m(),A={};let E=null!=(p=null==(u=e.componentProps)?void 0:u.separateSlot)?p:e.separateSlot;return E&&(E=n(E),A.menu=d(E)?E:s(E)?e=>i(E,e):void 0),[o(x,{value:a[r.field],"onUpdate:value":e=>a[r.field]=e,"row-index":null==v?void 0:v.index,height:h,column:r,row:a,"display-content":null==(f=null==v?void 0:v.separateData)?void 0:f[r.field],onClick:l},A)]}))})},apply(e){function t(e){return(...t)=>{var o;return!(null==(o=t[0].row)?void 0:o.$__SEPARATE)&&(!d(e)||e(...t))}}e.fieldHooks.fieldList.tap(w,((e,{uuid:t})=>(t&&_.set(t,e.reduce(((e,t)=>(a(t,(t=>{A(t)&&e.push(n(t))})),e)),[])),e))),e.dataHooks.data.tapPromise(w,(async(e,t,{insertAfter:o,index:n,$table:i})=>{if(!t.uuid)return;const r=_.get(t.uuid);if(!r||!r.length)return;const a=[];for(const t of r){if(!t.field)continue;const o=await v(t,i);a.push({field:t.field,data:E(h(e,t),t,o)})}l(g(a)).forEach(((i,r)=>{const d=k(a,r);if(0===r)return T(t.uuid,e,{index:n,separateData:d}),void(e.$__SEPARATE_DATA=[d]);const s={$__SEPARATE:!0};T(t.uuid,s,{index:n,separateData:d}),e.$__SEPARATE_DATA.push(d),o(s)}))})),e.eventHooks.onResizableChange.tap(w,(async({column:e},t,o)=>{A(e)&&o.updateTableDataRef()})),e.configHooks.editConfig.tap(w,((e={},o)=>(e.beforeEditMethod=t(e.beforeEditMethod),e))),e.configHooks.checkboxConfig.tap(w,((e={},o)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(w,(e=>{r((()=>{e.value.uuid&&(P.delete(e.value.uuid),_.delete(e.value.uuid))}))}))}})}export{w as separateRendererPlugins};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as n}from"vue";import{isMatchLowCodeCondition as o}from"../../../../../../shared/utils/index.js";import{isObject as r,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{
|
|
1
|
+
import{createVNode as n}from"vue";import{isMatchLowCodeCondition as o}from"../../../../../../shared/utils/index.js";import{isObject as r,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as i,isRichContent as l,parseRichContent as c}from"../../../utils/index.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function s(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:s}){const u=i(d,s),a=l(u)?function(o){const r=c(o);return[n("div",{style:{color:r.background||r.icon}},[e(r.icon),r.change_text])];function e(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:r.icon},null):null}}(u):[u];return function(r,t,i,l){if(!e(r)||!r.length)return l;const c=r.find((n=>n.condition&&n.condition.find((n=>{const r=t[n.field_key||i.field];return o(r,n)}))));return c?n("div",{style:{color:c.color},class:c.icon},[l]):l}(function(n){var o,e,t;const i=null==(o=n.editRender)?void 0:o.props;if(!r(i))return;return null!=(t=i.colorAndIcon)?t:null==(e=i.settingObj)?void 0:e.colorAndIcon}(s),d,s,a)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{s as defaultRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as t,ref as o,computed as l,provide as a,watch as
|
|
1
|
+
import{defineComponent as e,inject as t,ref as o,computed as l,provide as a,watch as r,onMounted as n,createVNode as s,h as i,onBeforeUnmount as u,reactive as d,unref as c}from"vue";import{traverse as m}from"../../../../../shared/utils/index.js";import{useThrottleFn as p}from"@vueuse/core";import{promiseTimeout as f}from"@vueuse/shared";import{isFunction as h,omit as g,isString as v,last as x}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as I,WIDGET_TYPE as y}from"../../constants/index.js";import{useUUIDMap as R}from"../../utils/index.js";import{defineTablePlugin as H}from"../../hooks/useTablePlugin.js";class b{constructor(){this.records={},this.maxRecords=d({})}set(e,t,o){this.records[e]||(this.records[e]={}),this.records[e][t]=o,this.maxRecords[e]=Math.max(...Object.values(this.records[e]),0)}getMax(e){var t;return null!=(t=this.maxRecords[e])?t:0}}const{getItemFromUUID:w,removeItemFromUUID:D}=R((()=>new b),!0),{getItemFromUUID:U,removeItemFromUUID:S,setItemFromUUID:T}=R((()=>null)),{getItemFromUUID:E,removeItemFromUUID:F,setItemFromUUID:M}=R((()=>{})),j=e({props:{payload:{type:Object,required:!0}},setup(e){const u=t(I),d=t("$xetable"),c=o(),m=w(u),p=l((()=>e.payload.row[e.payload.column.field]));async function g(){await f(0);const{row:t,column:o}=e.payload,l=d.getRowSeq(t);m&&null!=l&&c.value&&m.set(l,o.field,c.value.clientHeight)}a("updateCellHeight",g),r([()=>e.payload.rowIndex,()=>e.payload.column.field,p,()=>e.payload.column.renderWidth],g,{immediate:!0}),n((()=>{d&&!U(u)&&T(u,d)}));const v=l((()=>{var t,o,l,a;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},n=null!=(a=null==(l=r.slots)?void 0:l.default)?a:r.slotFn;return h(n)?n:()=>p.value}));return()=>s("div",{ref:c,style:"padding:7px 0"},[i(v.value,e.payload)])}});function k(e,t,{scrollTop:o=0}){var l,a;const{uuid:r,rowConfig:n={}}=t;if(!r)return;const s=w(r),{oSize:i=0,gt:u=100}=null!=(l=E(r))?l:{},{internalData:d,reactData:m}=e,{scrollYStore:p,elemStore:f,afterFullData:h,fullDataRowIdData:g}=d;if(u>h.length)return;const v=null!=(a=n.height)?a:36,I=f["main-body-wrapper"],y=I?c(I):null,R=y?Math.max(8,Math.ceil(y.clientHeight/v)+2+2*i):8,H=[0];let b=0;o&&h.find(((t,l)=>{const a=e.getRowSeq(t),r=(x(H)||0)+Math.max(v,s.getMax(a));if(H.push(r),r>o)return b=Math.max(0,l-i),!0})),Object.assign(p,{startIndex:b,endIndex:b+R});const D=`${H[b]}px`,U=`${h.reduce(((t,o)=>{const l=e.getRowSeq(o);return t+Math.max(v,s.getMax(l))}),0)}px`;["main","left","right"].forEach((e=>{const t=f[`${e}-body-table`],o=t?c(t):null;o&&(o.style.marginTop=D),["header","body","footer"].forEach((t=>{const o=f[`${e}-${t}-ySpace`],l=o?c(o):null;l&&(l.style.height=U)}))}));const S=h.slice(p.startIndex,p.endIndex);S.forEach(((t,o)=>{const l=e.getRowid(t),a=g[l];a&&(a.$index=o)})),m.tableData=S}function C(){const e="variableHeightRendererPlugin";return H({name:e,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(j,{payload:t},null)})},apply(t){function o(e){if(!e.uuid)return;const t=E(e.uuid);t&&(e.scrollY=t),setTimeout((()=>{const t=U(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=t.getScroll();k(t,e,{scrollTop:o.scrollTop})}),300)}t.dataHooks.dataStart.tap(e,o),t.eventHooks.onFilterChange.tap(e,((e,t)=>o(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>o(t))),t.eventHooks.onToggleTreeExpand.tap(e,((e,t)=>o(t))),t.eventHooks.onResizableChange.tap(e,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&o(t)})),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=g(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT}}return e})),t.fieldHooks.fieldList.tap(e,((e,t,{$table:o})=>(t.uuid&&m(e,((e,l)=>{var a,r,n;if((null==(a=e.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const e=null!=(n=null==(r=t.rowConfig)?void 0:r.height)?n:36,a=w(t.uuid),s=t.cellStyle;t.cellStyle=function(t){const l={};if(t.column.fixed&&o.value){const r=Math.max(e,a.getMax(o.value.getRowSeq(t.row)));r&&(l.height=`${r}px`)}return Object.assign(l,s?h(s)?s(t):s:null)};const i=t.cellClassName;t.cellClassName=function(e){var t;const o=h(i)?i(e):i,l=o?v(o)?{[o]:!0}:o:{};return Object.assign({"virtual-height":(null==(t=e.column.editRender)?void 0:t.name)===y.VARIABLE_HEIGHT},l)},setTimeout((()=>{M(t.uuid,t.scrollY),t.scrollY={enabled:!1};const e=U(t.uuid);e&&(e.reactData.scrollYLoad=!1,k(e,t,{scrollTop:0}))}),300),l()}})),e))),t.setupHooks.setup.tap(e,(e=>{u((()=>{e.value.uuid&&(D(e.value.uuid),S(e.value.uuid),F(e.value.uuid))}))})),t.eventHooks.onScroll.tap(e,p((async(e,t)=>{const{uuid:o}=t;if(!o)return;const l=U(o);l&&(await f(0),k(l,t,e))}),200))}})}export{C as variableHeightRendererPlugin};
|
|
@@ -35,15 +35,16 @@ export declare type IhoTableFieldItem = {
|
|
|
35
35
|
annotation: boolean;
|
|
36
36
|
}>;
|
|
37
37
|
export declare namespace IhoTableLowCodeField {
|
|
38
|
-
type FieldSetting = {
|
|
38
|
+
type FieldSetting = Partial<{
|
|
39
|
+
mergedFeildExpression: string;
|
|
39
40
|
notParticipatingSearch: IHO_TABLE_STRING_STATUS;
|
|
40
|
-
mapping
|
|
41
|
+
mapping: {
|
|
41
42
|
type: string;
|
|
42
43
|
mappingFiled: Array<{
|
|
43
44
|
value: Array<Record<'key' | 'value', string>>;
|
|
44
45
|
}>;
|
|
45
46
|
};
|
|
46
|
-
}
|
|
47
|
+
}>;
|
|
47
48
|
type ColorAndIconItem = {
|
|
48
49
|
condition?: {
|
|
49
50
|
con: LOW_CODE_VALUE_RELATION | string;
|
|
@@ -50,4 +50,5 @@ export declare const createIhoTableClearActivedInterceptor: (type: EDITABLE_WIDG
|
|
|
50
50
|
export declare function isTransformTreeType(config: IhoTableConfig): boolean;
|
|
51
51
|
export declare function isRichContent(content: string): content is string;
|
|
52
52
|
export declare function parseRichContent(richContent: string): any;
|
|
53
|
+
export declare function parseMergeField(row: AnyObject, column: VxeTableDefines.ColumnInfo): any;
|
|
53
54
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i,findAncestor as u}from"../../../../shared/utils/index.js";import{promiseTimeout as l}from"@vueuse/shared";import{isNumber as c,cloneDeep as
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i,findAncestor as u}from"../../../../shared/utils/index.js";import{promiseTimeout as l}from"@vueuse/shared";import{isNumber as c,cloneDeep as d,isString as a,isObject as s}from"lodash-es";import{InjectionIhoTableEmits as f,InjectionIhoTableConfig as m,IHO_TABLE_STRING_STATUS as p,IHO_TABLE_NUMBER_STATUS as v,IHO_TABLE_TREE_TYPE as I}from"../constants/index.js";function g(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 h(){var e,t,r;const o=n(m);return o||g("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==o?void 0:o.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function T(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function R(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(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 C(e,n){return r()||await l(0),r()||function(){const n=+e.colWidth;return c(n)?n:64}();function r(){var r,o;return null==(o=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:o.renderWidth}}function F(e){const t=n(f);function o(){var n;return{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 i(e={}){t("formChange",{...o(),...d(r(e))})}function u(e={}){t("formClick",{...o(),...d(r(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[o("span",null,[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){return a(e)&&(e=i(e||"")),s(e)&&((n=e).notParticipatingSearch!==p.POSITIVE&&"manual"===(null==(t=n.mapping)?void 0:t.type));var n,t}}),P=Object.freeze({isPositive:e=>e===v.POSITIVE||e===p.POSITIVE,isNegative:e=>e===v.NEGATIVE||e===p.NEGATIVE,notPositive:e=>e!==v.POSITIVE&&e!==p.POSITIVE,notNegative:e=>e!==v.NEGATIVE&&e!==p.NEGATIVE}),S=(e,n)=>({$event:t,column:r})=>{var o;if((null==(o=r.editRender)?void 0:o.name)!==e)return!0;const i=null==t?void 0:t.target;return!s(i)||!u(i,n)};function A(e){return[I.TRANSFORM_WITH_SPAN_METHOD,I.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function N(e){return a(e)&&!!e.match(/^###\{[^{}]+}$/)}function $(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function x(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}=i(t);return r&&a(r)?r.replace(/#{(.+?)}/g,(function(n,t){var r;const o=t?null!=(r=e[t.trim()])?r:"":n;if(!N(o))return o;const{change_text:i}=$(o);return i})):e[n.field]}export{O as IhoTableRenderHelper,P as IhoTableStatusHelper,E as IhoTableUtils,g as IhoTableWarn,S as createIhoTableClearActivedInterceptor,T as eventListener2EventName,R as eventName2EventListener,C as getColumnRenderWidth,h as getRowHeight,N as isRichContent,A as isTransformTreeType,x as parseMergeField,$ as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};
|
|
@@ -28,7 +28,7 @@ export declare enum LOW_CODE_VALUE_RELATION {
|
|
|
28
28
|
LESSEQ = "LESSEQ"
|
|
29
29
|
}
|
|
30
30
|
export declare function isMatchLowCodeCondition(value: unknown, condition: {
|
|
31
|
-
con: LOW_CODE_VALUE_RELATION
|
|
31
|
+
con: LOW_CODE_VALUE_RELATION | string;
|
|
32
32
|
value: unknown;
|
|
33
|
-
}):
|
|
34
|
-
export declare function hex2rgba(hex: string): readonly [number, number, number, number];
|
|
33
|
+
}): any;
|
|
34
|
+
export declare function hex2rgba(hex: string, defaultAlpha?: number): readonly [number, number, number, number];
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as n,includes as r,isEmpty as o,negate as c,gt as u,gte as i,lt as s,lte as a,isNumber as f,isObject as x,isFunction as d}from"lodash-es";import{getCurrentInstance as E}from"vue";function l(t,n,r="children",o){function c(){throw"silence break traverse"}try{L(t).forEach((t=>{n(t,c,o),L(r).forEach((o=>{e(t[o])&&l(t[o],n,r,t)}))}))}catch(t){if("silence break traverse"===t)return;throw t}}function m(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(r?r():t.component(n,e))}function p(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function L(t){return Array.isArray(t)?t:[t]}function h(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const N=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),w=Object.seal(Object.create(null));function S(t,n){return function t(n,r){return x(n)?e(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((e,[n,o])=>(r.includes(n)||(x(o)&&!d(o)?e[n]=t(o,r):e[n]=o),e)),{}):n}(t,n)}function v(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function y(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function I(t,e="px"){if(f(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function Q(t,e){return t.some((t=>e.includes(t)))}const $=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function b(t,e){if(!x(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function O(t){if(!E())throw new Error(t||"can't use this hook out of setup environment")}var U=(t=>(t.EQ="EQ",t.NEQ="NEQ",t.CL="CL",t.NC="NC",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.BIG="BIG",t.BIGEQ="BIGEQ",t.LESS="LESS",t.LESSEQ="LESSEQ",t))(U||{});const C={EQ:(t,e)=>`${t}`===e,NEQ:(t,e)=>`${t}`!==e,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:o,NOT_NULL:c(o),BIG:u,BIGEQ:i,LESS:s,LESSEQ:a};function g(t,e){return(C[e.con]||(()=>!1))(t,`${e.value}`)}function B(t){const[
|
|
1
|
+
import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as n,includes as r,isEmpty as o,negate as c,gt as u,gte as i,lt as s,lte as a,isNumber as f,isObject as x,isFunction as d}from"lodash-es";import{getCurrentInstance as E}from"vue";function l(t,n,r="children",o){function c(){throw"silence break traverse"}try{L(t).forEach((t=>{n(t,c,o),L(r).forEach((o=>{e(t[o])&&l(t[o],n,r,t)}))}))}catch(t){if("silence break traverse"===t)return;throw t}}function m(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(r?r():t.component(n,e))}function p(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function L(t){return Array.isArray(t)?t:[t]}function h(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const N=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),w=Object.seal(Object.create(null));function S(t,n){return function t(n,r){return x(n)?e(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((e,[n,o])=>(r.includes(n)||(x(o)&&!d(o)?e[n]=t(o,r):e[n]=o),e)),{}):n}(t,n)}function v(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function y(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function I(t,e="px"){if(f(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function Q(t,e){return t.some((t=>e.includes(t)))}const $=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function b(t,e){if(!x(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function O(t){if(!E())throw new Error(t||"can't use this hook out of setup environment")}var U=(t=>(t.EQ="EQ",t.NEQ="NEQ",t.CL="CL",t.NC="NC",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.BIG="BIG",t.BIGEQ="BIGEQ",t.LESS="LESS",t.LESSEQ="LESSEQ",t))(U||{});const C={EQ:(t,e)=>`${t}`===e,NEQ:(t,e)=>`${t}`!==e,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:o,NOT_NULL:c(o),BIG:u,BIGEQ:i,LESS:s,LESSEQ:a};function g(t,e){return(C[e.con]||(()=>!1))(t,`${e.value}`)}function B(t,e=1){const[n,r,o,c,u]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!n)return[255,255,255,e];const i=u&&parseInt(u,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(c,16),+(f(i)?i.toFixed(2):e)]}export{w as DMZ,U as LOW_CODE_VALUE_RELATION,L as arrayed,O as checkInSetupEnv,S as deepOmit,y as findAncestor,p as generateTimeFormat,N as getStringWidth,B as hex2rgba,g as isMatchLowCodeCondition,$ as jsonParse,m as safeComponentRegister,v as separateMetaModule,b as shallowOmit,Q as targetStringIncludes,l as traverse,h as uuidGenerator,I as widthAppend};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.42-beta.
|
|
3
|
+
"version": "3.1.42-beta.38",
|
|
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": "
|
|
64
|
+
"gitHead": "5dc4be549c3123e634c6872ce71024643c4e32d6"
|
|
65
65
|
}
|