cnhis-design-vue 3.1.42-beta.38 → 3.1.42-beta.39

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{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};
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){let r=t?e[t.trim()]:null;N(r)&&(r=$(r).change_text);return r||(null==r?"--":r)})):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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.42-beta.38",
3
+ "version": "3.1.42-beta.39",
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": "5dc4be549c3123e634c6872ce71024643c4e32d6"
64
+ "gitHead": "87ac375a458bfdc1b17fbe7193ef98ef7860cc41"
65
65
  }