cnhis-design-vue 3.2.6-release.1 → 3.2.6
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/button-print/index.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +4 -2
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/utils/index.d.ts +1 -0
- package/es/components/form-config/src/utils/index.js +1 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/index.d.ts +497 -19
- package/es/components/iho-chat/src/Index.vue.d.ts +502 -24
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.d.ts +5 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +89 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue.js +1 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -0
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +94 -4
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +129 -3
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +24 -2
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +0 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +16 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +133 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue.js +1 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +15 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +24 -13
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +10 -1
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/index.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +5 -0
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +24 -0
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -0
- package/es/components/iho-chat/src/types/index.d.ts +3 -0
- package/es/components/iho-chat/src/utils/index.d.ts +2 -1
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/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
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e,findAncestor as t,targetStringIncludes as r}from"../../../../shared/utils/index.js";import{isField as o}from"@formily/core";import{Path as
|
1
|
+
import{arrayed as e,findAncestor as t,targetStringIncludes as r}from"../../../../shared/utils/index.js";import{isField as o}from"@formily/core";import{Path as i}from"@formily/path";import{isObject as n}from"@vue/shared";import{promiseTimeout as a}from"@vueuse/shared";import{isFunction as s,isArray as l,castArray as d,isString as u}from"lodash-es";import{nextTick as c}from"vue";import"../../index.js";import{NESTED_FORM_ITEM_TYPE as m}from"../constants/index.js";import{formValueFormatter as f}from"../utils/valueFormatter.js";import{queryDecoratorByAddress as p,queryInput as g,queryDecoratorByFieldKey as v,findNextWidget as y}from"../utils/dom.js";import{validateMessageParser as h,combineExtendKey as S,splitExtendKey as b,isEnter as x}from"../utils/index.js";import{getParentLinebar as F}from"../utils/schema.js";import{useSelectedSetting as C}from"./useSelectedSetting.js";function E({formModel:t,formRenderRef:r,formUUID:a,getFieldList:m,formItemDepsCollector:y,businessCollector:x,wordbookSettingHandler:E,operationalFormHandler:D,changeContextCollector:I,emitFormChange:j}){const{applySelectedSetting:w}=C();return{validate(i,{force:c}={}){if(null==i&&(i="*"),s(i)){const e=Object.entries(t.fields).reduce(((e,[t,r])=>(i(r)&&e.push(t),e)),[]);if(!e.length)return Promise.resolve();i=e.length?`*(${e.join(",")})`:"*"}const m=[];c&&t.setFieldState(i,(e=>{"visible"===e.display&&"editable"!==e.pattern&&o(e)&&(m.push({pattern:e.pattern,state:e}),e.pattern="editable")}));const f=t.validate(i).catch((e=>Promise.reject(Array.isArray(e)?e.reduce(v,[]):e)));return c&&m.forEach((({pattern:e,state:t})=>t.pattern=e)),f;function v(t,r){if(!n(r))return t;let o=!1;return l(r.messages)&&r.messages.forEach((r=>{n(r)&&(t.push(...e(r).map(y)),o=!0)})),!o&&t.push(y(r)),t}function y(e){if(e.decoratorElement)return e;const o=t.query(e.path),i=o.get("title"),s=d(e.messages).map((e=>function(e,t){if(!t||!n(t.fieldItem))return e;const r=t.fieldItem.defined_error_msg;return h(r&&u(r)?r:e,t.fieldItem)}(e,o.get("decoratorProps")))),l=p(e.address,r.value,a);return{...e,messages:s,title:i,decoratorElement:l,...g(l)}}},getFormValues(e=!0){let r=t.getFormState().values;return e&&(r=S(m(),r)),r},async setFormValues(e,r){r=Object.assign({avoidDependKeyConnection:!0,needSplitExtendKey:!0,avoidWordbookSettingConnection:!0,avoidOperationalFormConnection:!0,dependKeyKeepValue:!1,avoidBusinessConnection:!1,avoidFormChangeEvent:!1,overwrite:!0},r),x.triggerDisabled=r.avoidBusinessConnection,y.triggerDisabled=r.avoidDependKeyConnection,y.keepValue=r.dependKeyKeepValue,E.triggerDisabled=r.avoidWordbookSettingConnection,D.triggerDisabled=r.avoidOperationalFormConnection,r.needSplitExtendKey&&(e=b(m(),e)),r.avoidFormChangeEvent&&(j.value=!1),t.setFieldState("*",(t=>{o(t)&&(r.overwrite||i.existIn(e,t.path))&&(t.value=i.getIn(e,t.path))})),await c(),j.value=!0,x.triggerDisabled=!1,y.triggerDisabled=!1,E.triggerDisabled=!1,D.triggerDisabled=!1,y.keepValue=!1},setFieldState(e,r){t.setFieldState(e,r)},resetFields:(e="*")=>t.reset(e),queryWidget:e=>async function(e,t,o){if(!r.value)return l();const n=v(e,t,a);if(n)return l(n);const s=F(e,o);return s?(y.trigger(i.parse(s),!0),await c(),l(v(e,t,a))):l();function l(e){return{decoratorElement:e,...g(e)}}}(e,r.value,m()),applySelectedSetting(e){const r=t.getFormState().values;w(r,e,((e,r)=>{t.setFieldState(e,(e=>{o(e)&&e.setValue(r)}))}))},getTextFormValues:()=>f(t,I)}}function D({props:e,formRenderRef:o,formModel:i,formUUID:n}){return{onKeydown:async function l(d){var u;if(!d.isComposing)if(x(d)){if(e.enterToNextWidget&&d.target){if("TEXTAREA"===d.target.tagName&&!d.ctrlKey)return;d.preventDefault()}if(await a(0),Reflect.get(d,"stopCapture")||!e.enterToNextWidget||!o.value)return;const r=t(d.target,(e=>e.classList.contains("form-render__formItem")));if(!r)return;const n=`.form-render__formItem${m.map((e=>`:not([widget-type=${e}])`)).join("")}`,f=Array.from(o.value.querySelectorAll(n)),p=f.findIndex((e=>e.id===r.id));if(!~p)return;const{widget:g,field:v}=y(f,p,d.target);if(!g)return;if(s(e.enterToNextWidget)){const t=v&&i.query(v).take();!t||e.enterToNextWidget(null==(u=t.decoratorProps)?void 0:u.fieldItem)?c(g,e.autoExpand):l({target:g,code:"Enter"})}else c(g,e.autoExpand)}else if("Tab"===d.code){if(!e.autoExpand)return;await a(0);const t=document.querySelector(":focus");if(!t)return;c(t,!0)}async function c(e,o){if(await a(0),e.focus(),!o)return;if(!t(e,(e=>e.getAttribute("uuid")===n)))return;if(!r(["radio","checkbox"],e.className))if(e.click(),"INPUT"!==e.tagName){const t=e.querySelector("input");if(!t)return;t.focus(),i(t)}else i(e);function i(e){if("INPUT"!==e.tagName)return;const t=e.value;t&&t.match(/^\d{4}-\d{2}/)&&e.setSelectionRange(0,4)}}}}}export{D as useFormDomEvent,E as useFormExposeEvent};
|
@@ -1 +1 @@
|
|
1
|
-
import{inject as t,provide as n,computed as e,createVNode as r,Fragment as o}from"vue";import{traverse as i,arrayed as u}from"../../../../shared/utils/index.js";import{isGeneralField as c}from"@formily/core";import{Path as f}from"@formily/path";import{HelpCircleSharp as s}from"@vicons/ionicons5";import{isObject as l}from"@vue/shared";import{useMemoize as p}from"@vueuse/core";import{isString as a,isFunction as d,omit as E,castArray as T,flattenDeep as h}from"lodash-es";import{NTooltip as m,NIcon as R}from"naive-ui";import{NESTED_FORM_ITEM_TYPE as v}from"../constants/index.js";import"date-fns";function x(t){console.warn(`[FormRender]: ${t}`)}function y(t,n,e=["children","properties","suffixConfig"],r="val_key",o="default_val"){return function t(n,r){r.forEach((r=>{l(r)&&(null!=c(r)&&null==n[i(r)]&&f.setIn(n,i(r),c(r)),e.forEach((e=>{r[e]&&(n[i(r)]||(n[i(r)]={}),t(n[i(r)],u(r[e])))})))}))}(t,n),t;function i(t){return t[r]}function c(t){return t[o]}}function g(e,r){let o=t(e,null);return o||(o=r(),n(e,o)),o}function I(t){return t&&a(t)?+t:t}function A(t,n,e){if(l(t)&&!d(t)){const e={};return Object.entries(t).forEach((([t,r])=>{d(r)&&(e[t]=()=>r(n))})),e}return{default:()=>d(t)?t(n):e?e(t):[t]}}function W(t,n){return e((()=>{const e={};return t.prefix&&(e.prefix=()=>r(o,null,[A(t.prefix,t,n).default()])),t.suffix&&(e.suffix=()=>r(o,null,[A(t.suffix,t,n).default()])),e}))}function _(t,n){return a(t)&&t?t.replace(/\$\{([^}]*)}/g,(function(t,e){const r=e.split("||");for(const t of r){const e=n[t.trim()];if(e)return e}return""})):""}function D(t){return t.reduce(((t,n)=>(a(n.extendKey)&&n.extendKey&&t.push(n),$(n)&&t.push(...D(n.children||[])),t)),[])}function G(t,n){const e=D(t);if(!e.length)return n;const r={},o=new Map;return Object.entries(n).forEach((([t,i])=>{const u=e.find((n=>n.val_key===t));if(!u)return r[t]=i;const{val_key:c,extendKey:f}=u,s=o.get(f)||{};o.set(f,s),s[c]=n[c]})),[...o.entries()].forEach((([t,n])=>{r[t]=JSON.stringify(n)})),r}function P(t,n){const e=D(t);if(!e.length)return n;const r=p((t=>{try{return l(n[t])?n[t]:JSON.parse(n[t])||{}}catch(t){return{}}})),o=E(n,e.map((t=>t.extendKey)));return e.forEach((({val_key:t,extendKey:n})=>{Reflect.has(o,t)||(o[t]=r(n)[t])})),o}function S(t){return t&&v.includes(t)}function $(t){return S(c(t)?t.componentType:t.html_type)}function w(t,n){return r("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[t,n.desc?r(m,null,{trigger:()=>r(R,{component:s},null),default:()=>n.desc}):null])}function K(t,n){return f.parse(t.startsWith(".")?t:`.${t}`,n).toString()}function X(t){return t.replace(/</g,"<").replace(/>/g,">")}function j(t,n){return t.reduce(((t,e)=>(n(e)||(t.push(e),e.properties&&(e.properties=j(e.properties,n)),e.children&&(e.children=j(e.children,n))),t)),[])}function k(t,n){let e=null;return i(t,((t,r)=>{n(t)&&(e=t,r())}),["children","properties"]),e}var O=function(t){return t[t.PREPARE=0]="PREPARE",t[t.TEXT=1]="TEXT",t[t.WIDGET_START=2]="WIDGET_START",t[t.WIDGET=3]="WIDGET",t}(O||{});function
|
1
|
+
import{inject as t,provide as n,computed as e,createVNode as r,Fragment as o}from"vue";import{traverse as i,arrayed as u}from"../../../../shared/utils/index.js";import{isGeneralField as c}from"@formily/core";import{Path as f}from"@formily/path";import{HelpCircleSharp as s}from"@vicons/ionicons5";import{isObject as l}from"@vue/shared";import{useMemoize as p}from"@vueuse/core";import{isString as a,isFunction as d,omit as E,castArray as T,flattenDeep as h}from"lodash-es";import{NTooltip as m,NIcon as R}from"naive-ui";import{NESTED_FORM_ITEM_TYPE as v}from"../constants/index.js";import"date-fns";function x(t){console.warn(`[FormRender]: ${t}`)}function y(t,n,e=["children","properties","suffixConfig"],r="val_key",o="default_val"){return function t(n,r){r.forEach((r=>{l(r)&&(null!=c(r)&&null==n[i(r)]&&f.setIn(n,i(r),c(r)),e.forEach((e=>{r[e]&&(n[i(r)]||(n[i(r)]={}),t(n[i(r)],u(r[e])))})))}))}(t,n),t;function i(t){return t[r]}function c(t){return t[o]}}function g(e,r){let o=t(e,null);return o||(o=r(),n(e,o)),o}function I(t){return t&&a(t)?+t:t}function A(t,n,e){if(l(t)&&!d(t)){const e={};return Object.entries(t).forEach((([t,r])=>{d(r)&&(e[t]=()=>r(n))})),e}return{default:()=>d(t)?t(n):e?e(t):[t]}}function W(t,n){return e((()=>{const e={};return t.prefix&&(e.prefix=()=>r(o,null,[A(t.prefix,t,n).default()])),t.suffix&&(e.suffix=()=>r(o,null,[A(t.suffix,t,n).default()])),e}))}function _(t,n){return a(t)&&t?t.replace(/\$\{([^}]*)}/g,(function(t,e){const r=e.split("||");for(const t of r){const e=n[t.trim()];if(e)return e}return""})):""}function D(t){return t.reduce(((t,n)=>(a(n.extendKey)&&n.extendKey&&t.push(n),$(n)&&t.push(...D(n.children||[])),t)),[])}function G(t,n){const e=D(t);if(!e.length)return n;const r={},o=new Map;return Object.entries(n).forEach((([t,i])=>{const u=e.find((n=>n.val_key===t));if(!u)return r[t]=i;const{val_key:c,extendKey:f}=u,s=o.get(f)||{};o.set(f,s),s[c]=n[c]})),[...o.entries()].forEach((([t,n])=>{r[t]=JSON.stringify(n)})),r}function P(t,n){const e=D(t);if(!e.length)return n;const r=p((t=>{try{return l(n[t])?n[t]:JSON.parse(n[t])||{}}catch(t){return{}}})),o=E(n,e.map((t=>t.extendKey)));return e.forEach((({val_key:t,extendKey:n})=>{Reflect.has(o,t)||(o[t]=r(n)[t])})),o}function S(t){return t&&v.includes(t)}function $(t){return S(c(t)?t.componentType:t.html_type)}function w(t,n){return r("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[t,n.desc?r(m,null,{trigger:()=>r(R,{component:s},null),default:()=>n.desc}):null])}function K(t,n){return f.parse(t.startsWith(".")?t:`.${t}`,n).toString()}function X(t){return t.replace(/</g,"<").replace(/>/g,">")}function j(t,n){return t.reduce(((t,e)=>(n(e)||(t.push(e),e.properties&&(e.properties=j(e.properties,n)),e.children&&(e.children=j(e.children,n))),t)),[])}function k(t,n){let e=null;return i(t,((t,r)=>{n(t)&&(e=t,r())}),["children","properties"]),e}var O=function(t){return t[t.PREPARE=0]="PREPARE",t[t.TEXT=1]="TEXT",t[t.WIDGET_START=2]="WIDGET_START",t[t.WIDGET=3]="WIDGET",t}(O||{});function N(t){const n=[...t],e=[];let r=O.PREPARE,o="";function i(t){switch(r=t,r){case O.PREPARE:case O.WIDGET_START:case O.WIDGET:o=""}}function u(t="text",n=o){e.push({type:t,content:n})}function c(){const t=e.pop();t&&("text"===t.type?o=t.content:e.push(t))}return n.forEach(((t,e)=>{const f=e===n.length-1;switch(r){case O.PREPARE:return"#"===t?(i(O.WIDGET_START),void(f&&u())):(i(O.TEXT),o=t,void(f&&u()));case O.TEXT:return"#"===t?void(f?(o+=t,u()):(u(),i(O.WIDGET_START))):(o+=t,void(f&&u()));case O.WIDGET_START:return"{"!==t||f?(c(),i(O.TEXT),o+=`#${t}`,void(f&&u())):void i(O.WIDGET);case O.WIDGET:return"}"===t?(u("widget"),void i(O.PREPARE)):"#"===t?(c(),u(),i(O.WIDGET_START),o+=`#${t}`,void(f&&u())):(o+=t,void(f&&u("text",`#{${o}`)))}})),e}function b(t,n){let e=T(t);return n.forEach((({from:t,to:n})=>{e.forEach(((r,o)=>{a(r)&&(e[o]=r.split(t).map(((t,e,r)=>[t,e<r.length-1?n:null])))})),e=h(e)})),e}function J(t){return"Enter"===t.code||"NumpadEnter"===t.code}export{j as FieldListFilter,G as combineExtendKey,W as createInputSlot,A as createSlot,X as editorUnescape,k as findItemByValCondition,x as formRenderLog,K as getAbsoluteKey,g as injectOrProvide,J as isEnter,$ as isNestedFieldType,S as isNestedType,y as mergeDeepProperties,N as parseEnhanceText,I as parseNumberFromMaybeString,w as renderDescOption,b as replace2Any,P as splitExtendKey,_ as validateMessageParser};
|