cnhis-design-vue 3.1.42-beta.37 → 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.
@@ -1 +1 @@
1
- import{isFunction as o}from"lodash-es";import"../../index.js";import{useUUIDMap as r}from"../utils/index.js";import t from"xe-utils";import"moment";import{defineTablePlugin as e}from"../hooks/useTablePlugin.js";function i(){const i="highLightSetPlugin",{getItemFromUUID:n,removeItemFromUUID:m,setItemFromUUID:u}=r((()=>!1));return e({name:i,apply(r){r.dataHooks.data.tapPromise(i,(async(o,r)=>{r.uuid&&(o.rowColor||o.fontColor)&&u(r.uuid,!0)})),r.dataHooks.dataEnd.tap(i,(r=>{if(!r.uuid||!n(r.uuid))return;const e=r.rowStyle;r.rowStyle=function(r){const i=t.hexToRGBA(r.row.rowColor,.2),n={backgroundColor:`rgba(${i.r}, ${i.g}, ${i.b}, ${i.a})`,color:r.row.fontColor};return o(e)?Object.assign(n,e(r)):n},m(r.uuid)}))}})}export{i as highLightSetPlugin};
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 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 E(e){return console.warn(`[IhoTable]: ${e}`)}const g=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function T(){var e,t,r;const o=n(m);return o||E("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 h(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 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}=i(t);return r&&a(r)?r.replace(/#{(.+?)}/g,(function(n,t){var r;return t?null!=(r=e[t.trim()])?r:"":n})):e[n.field]}export{O as IhoTableRenderHelper,P as IhoTableStatusHelper,g as IhoTableUtils,E as IhoTableWarn,S as createIhoTableClearActivedInterceptor,h as eventListener2EventName,R as eventName2EventListener,C as getColumnRenderWidth,T as getRowHeight,N as isRichContent,A as isTransformTreeType,U as parseMergeField,$ as parseRichContent,F as useIhoTableFormEvent,w as useUUIDMap};
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};
@@ -31,4 +31,4 @@ export declare function isMatchLowCodeCondition(value: unknown, condition: {
31
31
  con: LOW_CODE_VALUE_RELATION | string;
32
32
  value: unknown;
33
33
  }): any;
34
- export declare function hex2rgba(hex: string): readonly [number, number, number, number];
34
+ export declare function hex2rgba(hex: string, defaultAlpha?: number): readonly [number, number, number, number];
@@ -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[e,n,r,o,c]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!e)return[0,0,0,1];const u=(c?parseInt(c,16):255)/255;return[parseInt(n,16),parseInt(r,16),parseInt(o,16),+(f(u)?u.toFixed(2):1)]}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};
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.37",
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": "0f573c47e635b9b5359525c58e85f4c3819e819b"
64
+ "gitHead": "5dc4be549c3123e634c6872ce71024643c4e32d6"
65
65
  }