cnhis-design-vue 3.2.4-beta.14 → 3.2.4-beta.15
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/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/shared/hooks/useAsyncQueue/index.d.ts +1 -1
- package/es/shared/hooks/useFormRequest/index.d.ts +1 -0
- package/es/shared/hooks/useFormRequest/index.js +1 -1
- package/es/shared/hooks/useFormRequest/types.d.ts +2 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -457,9 +457,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
457
457
|
requiredDisable: boolean;
|
|
458
458
|
hide: boolean;
|
|
459
459
|
}>;
|
|
460
|
+
isHighlightRow: boolean;
|
|
460
461
|
idx: number;
|
|
461
462
|
isHighlight: boolean;
|
|
462
|
-
isHighlightRow: boolean;
|
|
463
463
|
}>;
|
|
464
464
|
EditDialog: import("vue").DefineComponent<{
|
|
465
465
|
visible: {
|
|
@@ -575,9 +575,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
575
575
|
requiredDisable: boolean;
|
|
576
576
|
hide: boolean;
|
|
577
577
|
}>;
|
|
578
|
+
isHighlightRow: boolean;
|
|
578
579
|
idx: number;
|
|
579
580
|
isHighlight: boolean;
|
|
580
|
-
isHighlightRow: boolean;
|
|
581
581
|
}>;
|
|
582
582
|
isArray: {
|
|
583
583
|
(value?: any): value is any[];
|
|
@@ -282,8 +282,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
282
282
|
requiredDisable: boolean;
|
|
283
283
|
hide: boolean;
|
|
284
284
|
}>;
|
|
285
|
+
isHighlightRow: boolean;
|
|
285
286
|
idx: number;
|
|
286
287
|
isHighlight: boolean;
|
|
287
|
-
isHighlightRow: boolean;
|
|
288
288
|
}>;
|
|
289
289
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as t,createVNode as a,toRaw as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as a,toRaw as r,h as o,onBeforeUnmount as n}from"vue";import{widthAppend as i,getCharWidth as u,traverse as l,arrayed as s}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as p,isArray as f,compact as c,range as _,uniq as m,flatten as E}from"lodash-es";import{NInput as h}from"naive-ui";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as A,InjectionIhoTableUUID as v,InjectionIhoTableHandler as R}from"../../../../constants/index.js";import{useAutoFocus as g}from"../hooks/useAutoFocus.js";import{getLowCodeFieldFromField as D,IhoTableRenderHelper as T,getRowHeight as w,getColumnRenderWidth as b,parseMergeField as $}from"../../../../utils/index.js";import x from"./editSeparate.vue.js";import{contentSeparate as C,getLengthDiffArray as P,getColumnInfoMaxLength as S,generateSeparateRowData as k,isSeparateColumn as H}from"./separateUtils.js";import{getSeparateInfo as I,setSeparateInfo as j,deleteSeparateInfo as M}from"../../../../utils/separateMap.js";import{defineTablePlugin as O}from"../../../../hooks/useTablePlugin.js";function F(){const F="separateRendererPlugins",y=e(new Map);return O({name:F,vxe(e){e.renderer.add(A.SEPARATE,{renderCell(e,{column:r,row:o}){const n=t(v),{separateData:l={},isOriginRow:s}=I(n,o)||{},d=D(r),p=(null==d?void 0:d.separateFormatter)?d.separateFormatter(l[r.field]):l[r.field];return a("section",{class:"iho-table__ellipsis iho-table__colorAndIcon",title:p,style:{textIndent:s&&(null==d?void 0:d.separateIndent)?i(u("一")*d.separateIndent):0}},[p])},renderEdit:T.createRenderEdit((({fieldItem:e,column:n,row:i,emitFormClick:u})=>{var l,s;const f=t(v),c=I(f,i),_=w(),m={};let E=null!=(s=null==(l=e.componentProps)?void 0:l.separateSlot)?s:e.separateSlot;return E&&(E=r(E),m.menu=d(E)?E:p(E)?e=>o(E,e):void 0),e.separateRowEdit?function(){var e;if(!c)return[];if(c.ihoTableHandler=t(R),c.separateData["__"+n.field]=null!=(e=c.separateData["__"+n.field])?e:c.separateData[n.field],m.menu){const e=m.menu;return a(e,{column:n,col:n,row:i,value:c.separateData["__"+n.field],"onUpdate:value":e=>c.separateData["__"+n.field]=e},null)}return a(h,{value:c.separateData["__"+n.field],"onUpdate:value":e=>c.separateData["__"+n.field]=e},null)}():function(){var t;const r=null==(t=null==c?void 0:c.separateData)?void 0:t[n.field],o=d(e.separateFormatter)?e.separateFormatter(r):r;return[a(x,{value:i[n.field],"onUpdate:value":e=>i[n.field]=e,rowIndex:c.index,height:_,column:n,row:i,displayContent:o,onClick:u},m)]}()}))})},apply(e){function t(e){return(...t)=>{var a;return!(null==(a=t[0].row)?void 0:a.$__SEPARATE)&&(!d(e)||e(...t))}}g(e).bindAutoFocusConfig(F,A.SEPARATE,".iho-table__separateText"),e.eventHooks.onEditClosed.tap(F,(({row:e,column:t,$table:a},r,{emits:o})=>{if(!e.$__uuid)return;const n=D(t);if(!n||!n.separateRowEdit)return;const i=I(e.$__uuid,e);if(!i)return;const{separateData:u,originalData:l,ihoTableHandler:s,index:d}=i,{field:p}=t;if(null!==u["__"+p]&&u["__"+p]!==u[p]&&f(l.$__SEPARATE_DATA)){const e=l.$__SEPARATE_DATA.map((e=>{var t;return null!=(t=e["__"+p])?t:e[p]})),r=l[p];l[p]=f(l[p])?e:e.join(""),o("formChange",{value:l[p],oldValue:r,row:l,column:t,index:d,$table:a}),null==s||s.updateTableDataRef()}})),e.fieldHooks.fieldList.tap(F,((e,{uuid:t})=>(t&&y.set(t,e.reduce(((e,t)=>(l(t,(t=>{H(t)&&(e.push(r(t)),t.showOverflow="ellipsis")})),e)),[])),e))),e.dataHooks.data.tapPromise(F,(async(e,t,{insertAfter:a,index:r,$table:o})=>{var n;if(!t.uuid)return;const i=y.get(t.uuid);if(!i||!i.length)return;const u=[];for(const t of i){if(!t.field)continue;const a=await b(t,e,r,o),i={field:t.field,column:t,data:C($(e,t),t,a,null==(n=D(t))?void 0:n.separateDeep)};u.push(i)}function l(e){return u.find((t=>t.field===e))}u.forEach((e=>{const{column:t}=e,a=D(t);if(!a)return;if(!a.separateDeep||!a.separateBinder)return;const r=c(s(a.separateBinder).map(l));if(!r.length)return;const o=r.concat(e),n=Math.max(...o.map((e=>e.data.length)));_(n).forEach((e=>{const t=o.map((t=>({item:t.data[e],data:t.data}))),a=t.map((({item:e})=>n(e)));if(1===m(a).length)return;const r=Math.max(...a);function n(e){return f(e)?e.length:1}t.forEach((({item:t,data:a})=>{const o=n(t);o!==r&&(f(t)?t.push(...P(r,o)):a[e]=_(r).map(((e,a)=>0===a?t:"")))}))}))})),u.forEach((e=>{e.data=E(e.data)})),_(S(u)).forEach(((o,n,i)=>{var l;const s=k(u,n),d={index:r,originalData:e,separateData:s,separateIndex:n,separateLength:i.length,isOriginRow:0===n,isLastRow:n===i.length-1};if(0===n)return e.$__SEPARATE_DATA=[s],e.$__SEPARATE_ROW_CACHE=e.$__SEPARATE_ROW_CACHE||[],e.$__uuid=t.uuid,void j(t.uuid,e,d);const p=null!=(l=e.$__SEPARATE_ROW_CACHE[n-1])?l:e.$__SEPARATE_ROW_CACHE[n-1]={$__SEPARATE:!0,$__uuid:t.uuid,$__SEPARATE_INDEX:n};p.$__ORIGIN_INDEX=r,j(t.uuid,p,d),e.$__SEPARATE_DATA.push(s),a(p)}))})),e.eventHooks.onResizableChange.tap(F,(async(e,t,a)=>{a.updateTableDataRef()})),e.configHooks.editConfig.tap(F,((e={},t)=>{const a=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var r;if(!t.uuid)return f();const o=y.get(t.uuid);if(!o||!o.length)return f();const{row:n,column:i}=e[0],u=I(t.uuid,n);if(!u)return f();const l=null==(r=i.editRender)?void 0:r.props;if(!l||l.separateRowEdit)return f();const{isOriginRow:s,isLastRow:p}=u;return("bottom"===l.separatePlacement?p:s)&&f();function f(){return!d(a)||a(...e)}},e})),e.configHooks.checkboxConfig.tap(F,((e={},a)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(F,(e=>{n((()=>{e.value.uuid&&(y.delete(e.value.uuid),M(e.value.uuid))}))}))}})}export{F as separateRendererPlugins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStringWidth as
|
|
1
|
+
import{getCharWidth as t,getStringWidth as n}from"../../../../../../../shared/utils/index.js";import{isArray as r,isString as e,isNumber as o}from"lodash-es";import{EDITABLE_WIDGET_TYPE as a}from"../../../../constants/index.js";import{getLowCodeFieldFromField as i}from"../../../../utils/index.js";function u(t){return Math.max(...t.map((t=>t.data.length)),1)}function s(t,n){return t.reduce(((t,r)=>(t[r.field]=r.data[n],t)),{})}function d(a,u,s,l=!1){var f,m;const c=(null==(f=i(u))?void 0:f.separateIndent)||0;if(r(a)){if(l){const t=null==(m=i(u))?void 0:m.separateFormatter;return a.map((n=>d(t?t(n):n,u,s,l)))}return a}if(!e(a)||!o(s))return[a];s-=24;const p=[...a].reduce(((r,e)=>{const o=r[r.length-1],a=1===r.length?s-c*t("一"):s;return n(o+e)>a?r.push(e):r[r.length-1]=o+e,r}),[""]);return l?[p]:p}function l(t){var n;return t.field&&(null==(n=t.editRender)?void 0:n.name)===a.SEPARATE}function f(t,n,r=""){const e=Math.abs(t-n);return Array.from({length:e}).map((()=>r))}export{d as contentSeparate,s as generateSeparateRowData,u as getColumnInfoMaxLength,f as getLengthDiffArray,l as isSeparateColumn};
|
|
@@ -185,6 +185,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
185
185
|
separateBinder: ArrayAble<string>;
|
|
186
186
|
separateRowEdit: boolean;
|
|
187
187
|
separatePlacement: 'bottom';
|
|
188
|
+
separateIndent: number;
|
|
188
189
|
separateWidth: ((payload: {
|
|
189
190
|
column: VxeTableDefines.ColumnInfo;
|
|
190
191
|
row: AnyObject;
|
|
@@ -11,7 +11,7 @@ export declare class AsyncQueue<T = any, K = any, R = any> {
|
|
|
11
11
|
readonly name: string;
|
|
12
12
|
private readonly processor;
|
|
13
13
|
private readonly getKey;
|
|
14
|
-
|
|
14
|
+
parallelism: number;
|
|
15
15
|
private readonly _queued;
|
|
16
16
|
private readonly _entries;
|
|
17
17
|
private _activeTasks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e}from"@vue/shared";import{uuidGenerator as t}from"../../utils/index.js";import{unref as r}from"vue";import{cloneDeep as n,isFunction as
|
|
1
|
+
import{isObject as e}from"@vue/shared";import{uuidGenerator as t}from"../../utils/index.js";import{unref as r}from"vue";import{cloneDeep as n,isFunction as s}from"lodash-es";import"naive-ui";import"@vueuse/core";import"date-fns";import{AsyncQueue as o}from"../useAsyncQueue/index.js";import"@vueuse/shared";import"../selectHooks/useSearchContent.js";import"@vicons/ionicons5";let a=null;const u={method:"post",url:"",primaryKeyUrl:"",mergeUrl:""},i={url:{get:"/fdp-api/fdp/aiRec/search",post:"/fdp-api/fdp/aiRec/sendBehaviorData",delete:"/fdp-api/fdp/aiRec/delete"},getRecommendIds:()=>({})};function c(){return{getHttpInstance:function(){return a},registGlobHttpInstance:function(e){a=e},registGlobRecommendInfo:function(e){Object.assign(i,e)},registGlobSearchInfo:function(e){Object.assign(u,e)},getSearchRequestInfo:function(){return{...u}},getRecommendRequestInfo:function(){return n(i)}}}function l(n,a){const{getHttpInstance:u}=c();let i=null;return{create:function(c=3,l){const f=new o({name:"FormRenderAsyncQueue",uniqueData:a.value,parallelism:c,async processor({key:t,mergeUrl:o,method:a="post",cache:m,params:p,url:d,payload:h},R,g){var y,w,b,q;const v=null!=(y=r(n))?y:u();if(!v)return console.log("before use http feature, you should regist http instance by useFormRequest.registGlobHttpInstance()"),R(),void g();try{let r;if(l&&s(l.beforeRequest)&&(p=null!=(w=l.beforeRequest(t,p,h))?w:{}),o){(!i||Object.keys(i.waitingRequestParams).length>=10)&&(i=function(e,t,r,n,s){const o=new Promise(((s,a)=>{n.parallelism=1e3,setTimeout((async()=>{try{s(await e[r](t,o.waitingRequestParams))}catch(e){a(e)}}),10)})).finally((()=>{i=null,n.parallelism=s}));return o.waitingRequestParams={},o}(v,o,a,f,c)),i.waitingRequestParams[t]=p;const n=await i;r=e(n)?{...n,map:null!=(q=null==(b=n.map)?void 0:b[t])?q:{rows:[]}}:{}}else r=await v[a](d,p);l&&s(l.afterRequest)&&(r=l.afterRequest(t,r,h)),R(void 0,Array.isArray(r)?r:[]),!m&&g()}catch(e){R(new Error(`Request error => ${e}`)),g()}},getKey:({url:e,method:r="post",cache:n,params:s})=>n?e+r+JSON.stringify(s||{}):t()});return f}}}function f(t){if(!e(t))throw t;return r=t,Reflect.has(r,"map")&&Reflect.has(r,"result")?function(e){const{result:t,map:r}=e;if("SUCCESS"!==t)throw e;return r.rows}(t):function(e){return Reflect.has(e,"result")&&Reflect.has(e,"obj")}(t)?function(t){const{obj:r,result:n}=t;if("SUCCESS"!==n||!e(r))throw t;return Object.entries(r).reduce(((e,[t,r])=>(r.forEach((r=>e.push({...r,type:t}))),e)),[])}(t):function(e){return Reflect.has(e,"data")&&Reflect.has(e,"success")}(t)?function(e){const{data:t,success:r}=e;if(!r)throw e;return t}(t):[];var r}export{f as presetRequestHandler,l as useFormAsyncQueue,c as useFormRequest};
|
|
@@ -6,6 +6,7 @@ export declare namespace FormRequestDefine {
|
|
|
6
6
|
key: any;
|
|
7
7
|
cache?: boolean;
|
|
8
8
|
url: string;
|
|
9
|
+
mergeUrl?: string;
|
|
9
10
|
method?: RequestType;
|
|
10
11
|
params?: AnyObject;
|
|
11
12
|
payload?: AnyObject;
|
|
@@ -16,6 +17,7 @@ export declare namespace FormRequestDefine {
|
|
|
16
17
|
method: RequestType;
|
|
17
18
|
url: string;
|
|
18
19
|
primaryKeyUrl?: string;
|
|
20
|
+
mergeUrl?: string;
|
|
19
21
|
};
|
|
20
22
|
type RecommendIds = Partial<Record<'businessId' | 'componentId' | 'deptId' | 'userId', string>>;
|
|
21
23
|
type RecommendInfo = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../utils/index.js";import{isEqual as e,noop as
|
|
1
|
+
import"../utils/index.js";import{isEqual as e,noop as t,isString as r,isNumber as n,isEmpty as i,isFunction as o,cloneDeep as a,omit as l,isArray as u}from"lodash-es";import"naive-ui";import{computed as s,ref as c,watch as d,unref as v}from"vue";import"@vueuse/core";import"date-fns";import{useFormRequest as p}from"./useFormRequest/index.js";import"@vueuse/shared";import"./selectHooks/useSearchContent.js";import"@vicons/ionicons5";function h(h,y,{asyncQueue:f,fieldKey:m,getRequestPayload:k=t}){const g=s({get:()=>h.value,set(t){e(t,h.value)||y("update:value",t)}}),w=c(!1),_=c([]),b=s((()=>{var e,t,r;return null!=(r=null==(t=null==(e=h.wordbook)?void 0:e.show_key)?void 0:t[0])?r:h.labelField})),O=s((()=>{var e,t;return null!=(t=null==(e=h.wordbook)?void 0:e.value_key)?t:h.valueField})),L=s((()=>{var e,t;return null==(t=null==(e=h.wordbook)?void 0:e.render_key)?void 0:t[0]})),j=s((()=>{var e;return(null==(e=h.wordbook)?void 0:e.level_num)||1/0})),C=function(e,t,r){return{transformListToChildren(e){if(!e.length)return[];const t=[(e=a(e))[0]];let r=e[0];for(let t=1;t<e.length;t++){const n=e[t];n&&(r.children=[n],n.parent=r,r=n)}return[e,t]},getNodeDepth(e){let t=1,r=e.parent;for(;r;)t++,r=r.parent;return t},enrichChildOption(e,t,r){return{...e,parent:t,isLeaf:this.getNodeDepth(t)+1>=r}},enrichKeywordOption:(e,n)=>(e.__keyword=!!n,e.isLeaf=!!n,n&&r.value&&e[r.value]&&(e[t.value]=e[r.value]),e),sortOptionWithIdList:(t,r)=>r.map((r=>t.find((t=>t[e.value]===r)))),generateOptionWithIdList(t,r,n){let i=t[0];return{options:r.reduce(((e,r,a)=>{const l=o(t,r);return 0===a?(i=l,[l]):(Object.assign(l,{parent:i,isLeaf:a+1>=n}),i.children=[l],i=l,e)}),[]),lastOption:i};function o(t,r){return t.find((t=>t[e.value]===r))}},parseLinkFromString2List:e=>e.split("_").filter((e=>e)),isClickNodeCheckbox:e=>e&&!e.__keyword&&e.isLeaf,createConfigObject:(t,r,n)=>r?t.conObj||[]:n?[{con:"EQ",is_compare_field:!1,field_key:t.level_key,value:n[e.value]}]:t.conObjFirstLevel||[],createOptionValue(e){const t=[];let r=e;for(;r;)t.unshift(l(r,["parent","isLeaf","__keyword","children"])),r=r.parent;return t},shouldInitOptionList:(t,r,n)=>u(t)&&!i(t)&&t.every((t=>t[e.value]))&&!r&&!n}}(O,b,L),{getSearchRequestInfo:K}=p(),I=c(150),R=c();async function x(e,t,a=!0){var l,u;if(I.value=t&&(null==(l=R.value)?void 0:l.getWidth())||150,C.shouldInitOptionList(g.value,e,t)){const[e,t]=C.transformListToChildren(g.value),r=e[Math.max(0,e.length-2)];if(g.value.length>1){_.value=t;const r=e[Math.max(0,e.length-2)];return await x(r,void 0,!1),r}if(null==(u=_.value)?void 0:u.length)return r}try{return C.isClickNodeCheckbox(e)?s(e):e?e.__keyword?async function(){var t;if(!r(e.id_link))return Promise.reject(`id_link isn't string "${e.id_link}"`);const o=C.parseLinkFromString2List(e.id_link);n(j.value)&&j.value!==1/0&&o.splice(j.value);const a=await async function(e){if(!K().primaryKeyUrl)return[];try{return await f.addAsync(t(h.wordbook,h.autograph,e,v(m)))}catch(e){r(e)&&console.error(e)}function t(e,t,r,n){const i=K();return{key:n,params:{autograph:t,tableId:e.id,primaryKeyValue:r.join(","),page:1},...i,url:i.primaryKeyUrl,cache:h.requestCache,payload:{field:{},labelKey:b.value,valueKey:O.value}}}}(o);if(!a)return Promise.reject("fetchPrimaryKeyValue failed");const{lastOption:l,options:u}=C.generateOptionWithIdList(a,o,j.value);if(u.length<j.value&&(await x(l),i(l.children)))return g.value=C.sortOptionWithIdList(a,o),w.value=!1,Promise.reject("lastOption.children is empty");return _.value=u,null==(t=R.value)||t.setCursor(l),l}():async function(){const t=await f.addAsync(c(h.wordbook,h.autograph,e,v(m)));if(!t.length)return a?s(e):Promise.reject("childrenList is empty");e.children=t.map((t=>C.enrichChildOption(t,e,j.value)))}():async function(){var r;const n=await f.addAsync(c(h.wordbook,h.autograph,e,v(m)));_.value=n.map((e=>C.enrichKeywordOption(e,t))),t&&(null==(r=R.value)||r.setCursor(_.value[0]))}()}catch(e){r(e)&&console.error(e)}function s(e){return g.value=C.createOptionValue(e),w.value=!1,Promise.reject("update value success, no need to continue")}function c(e,n,i,a){const l={autograph:()=>n,wordbookId:"id",wordbookType:"type",fieldKeys:()=>e.search_key?JSON.stringify(e.search_key):void 0,conObj:()=>JSON.stringify(C.createConfigObject(e,t,i)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>t,page:()=>1},u=Object.entries(l).reduce(((t,[n,i])=>(t[n]=r(i)?e[i]:o(i)?i():void 0,t)),{});return{...K(),params:u,key:a,cache:h.requestCache,payload:{...k(),labelKey:b.value,valueKey:O.value}}}}return d((()=>h.wordbook),((t,r)=>{e(t,r)||(_.value=[],t&&(g.value||!h.lazyRequest)&&x())}),{immediate:!0}),{valueRef:g,labelKey:b,valueKey:O,optionsRef:_,showRef:w,fetchData:x,menuWidth:I,searchCascaderRef:R}}export{h as useLevelSearchCascader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.4-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.4-beta.15",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.2.4-beta.15",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};
|
|
@@ -6,6 +6,7 @@ export declare function safeComponentRegister(app: App, component: Component, cN
|
|
|
6
6
|
export declare function generateTimeFormat(format: string): string | undefined;
|
|
7
7
|
export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T];
|
|
8
8
|
export declare function uuidGenerator(): string;
|
|
9
|
+
export declare function getCharWidth(char: string): any;
|
|
9
10
|
export declare const getStringWidth: import("@vueuse/core").UseMemoizedFn<number, [str: string]>;
|
|
10
11
|
export declare const DMZ: AnyObject;
|
|
11
12
|
export declare function deepOmit<T extends AnyObject>(target: T, keys: Array<keyof T>): any;
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{isObject as o}from"@vue/shared";import{useMemoize as i}from"@vueuse/core";import{isString as u,isNumber as c,isArray as s,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getDateOperationalFormHandler,getOperationalFormHandler,isConditionsMatchSqlExpression,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression,isMatchNewLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",u,c=0){r=h(r),e=h(e);for(let s=0;s<e.length;s++){if(n(e[s],i,u,c),o)return;for(let i=0;i<r.length;i++){const u=e[s][r[i]];if(Array.isArray(u)&&t(u,n,r,e[s],c+1),o)return}}}(t,e,n,r,0)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:i={}}=t._context;i[n]||(!Reflect.get(t,"__cnhis_version")&&o(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!u(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function h(t){return Array.isArray(t)?t:[t]}function m(){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 x={a:7.7,b:8.6,c:7.7,d:8.6,e:7.7,f:5,g:8.6,h:8.2,i:3.3,j:3.3,k:7.6,l:3.5,m:12.1,n:8.2,o:8.2,p:8.6,q:8.6,r:5.4,s:7.1,t:5,u:8.2,v:7.6,w:10.9,x:7.3,y:7.6,z:7.6,A:9.43,B:9.33,C:9.93,D:10,E:8.27,F:8.1,G:10.4,H:10.4,I:3.7,J:7.5,K:9.2,L:7.9,M:12.4,N:10.4,O:10.8,P:8.9,Q:10.8,R:9.1,S:8.8,T:8.9,U:10.4,V:9.4,W:13.5,X:9.4,Y:9.1,Z:9.1,".":4.03,",":4.03,"(":5.17,")":5.17,"-":7.51,"+":7.51,"/":4.11,"\\":4.11,"%":12.68,"‰":17.75},g=/\d/,v=/[\u4e00-\u9fa5():,。]/;const
|
|
1
|
+
import{getCurrentInstance as t,defineComponent as e,provide as n,createVNode as r}from"vue";import{isObject as o}from"@vue/shared";import{useMemoize as i}from"@vueuse/core";import{isString as u,isNumber as c,isArray as s,isFunction as f}from"lodash-es";import a from"../package.json.js";export{getBindEventSettingTrigger,getDateOperationalFormHandler,getOperationalFormHandler,isConditionsMatchSqlExpression,isMatchLowCodeCondition,isMatchLowCodeConditionsWithSqlExpression,isMatchNewLowCodeConditionsWithSqlExpression}from"./business.js";function l(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",u,c=0){r=h(r),e=h(e);for(let s=0;s<e.length;s++){if(n(e[s],i,u,c),o)return;for(let i=0;i<r.length;i++){const u=e[s][r[i]];if(Array.isArray(u)&&t(u,n,r,e[s],c+1),o)return}}}(t,e,n,r,0)}function d(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:i={}}=t._context;i[n]||(!Reflect.get(t,"__cnhis_version")&&o(a)&&Reflect.set(t,"__cnhis_version",a.version),r?r():t.component(n,e))}function p(t){if(!u(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function h(t){return Array.isArray(t)?t:[t]}function m(){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 x={a:7.7,b:8.6,c:7.7,d:8.6,e:7.7,f:5,g:8.6,h:8.2,i:3.3,j:3.3,k:7.6,l:3.5,m:12.1,n:8.2,o:8.2,p:8.6,q:8.6,r:5.4,s:7.1,t:5,u:8.2,v:7.6,w:10.9,x:7.3,y:7.6,z:7.6,A:9.43,B:9.33,C:9.93,D:10,E:8.27,F:8.1,G:10.4,H:10.4,I:3.7,J:7.5,K:9.2,L:7.9,M:12.4,N:10.4,O:10.8,P:8.9,Q:10.8,R:9.1,S:8.8,T:8.9,U:10.4,V:9.4,W:13.5,X:9.4,Y:9.1,Z:9.1,".":4.03,",":4.03,"(":5.17,")":5.17,"-":7.51,"+":7.51,"/":4.11,"\\":4.11,"%":12.68,"‰":17.75},g=/\d/,v=/[\u4e00-\u9fa5():,。]/;function y(t){return x[t]?x[t]:g.test(t)?8.9:v.test(t)?13.95:void 0}const w=i((function(t){if(!t)return 0;let e="";return[...t].reduce(((t,n)=>{const r=e;return e=n," "===n?" "===r?t:t+4:t+(y(n)||6)}),0)})),E=Object.seal(Object.create(null));function O(t,e){return function t(e,n){return o(e)?s(e)?e.map((e=>t(e,n))):Object.entries(e).reduce(((e,[r,i])=>(n.includes(r)||(o(i)&&!f(i)?e[r]=t(i,n):e[r]=i),e)),{}):e}(t,e)}function b(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function j(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 C(t,e="px"){if(!t)return"";if(c(t))return`${t}${e}`;if(u(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function S(t,e){return t.some((t=>e.includes(t)))}const M=i((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function $(t,e){if(!o(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function _(e){if(!t())throw new Error(e||"can't use this hook out of setup environment")}function I(t,e=1){const[n,r,o,i,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 s=u&&parseInt(u,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(i,16),+(c(s)?s.toFixed(2):e)]}function A(t){return e({setup(e,{slots:o}){let i=(null==t?void 0:t.parent)&&Reflect.get(t.parent,"provides");const u=[];for(;i;)Object.entries(i).forEach((([t,e])=>{u.includes(t)||(u.push(t),n(t,e))})),i=Object.getPrototypeOf(i);return()=>{var t;return r("div",null,[null==(t=o.default)?void 0:t.call(o)])}}})}const H=i((function(t,e){return!(!u(e)||!u(t))&&e.split(",").some((e=>e.trim().includes(t)))}),{getKey:(...t)=>t.reduce(((t,e)=>String(t)+"_"+String(e)),"")});function L(t){try{return t instanceof HTMLElement}catch(e){return o(t)&&1===t.nodeType&&o(t.style)&&o(t.ownerDocument)}}function R(t){let e=0;return function t(n,r=0){n.forEach((n=>{n.children?t(n.children,r+1):e=Math.max(e,r)}))}(t),e}export{E as DMZ,h as arrayed,_ as checkInSetupEnv,A as createProviderWrapper,O as deepOmit,j as findAncestor,p as generateTimeFormat,R as getArrDepth,y as getCharWidth,w as getStringWidth,I as hex2rgba,L as isHTMLElement,M as jsonParse,H as keywordMatcher,d as safeComponentRegister,b as separateMetaModule,$ as shallowOmit,S as targetStringIncludes,l as traverse,m as uuidGenerator,C as widthAppend};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.2.4-beta.
|
|
3
|
+
"version": "3.2.4-beta.15",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"iOS 7",
|
|
72
72
|
"last 3 iOS versions"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "8608bbfc8f8273af160171d5f3b105559efd3463"
|
|
75
75
|
}
|