cnhis-design-vue 3.1.42-release.9 → 3.1.43-beta.1

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.
Files changed (81) hide show
  1. package/README.md +87 -87
  2. package/es/components/big-table/src/hooks/useEdit.d.ts +26 -26
  3. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  4. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  6. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  7. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
  8. package/es/components/date-picker/index.d.ts +27 -2
  9. package/es/components/date-picker/src/DatePicker.vue.d.ts +27 -2
  10. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  11. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  12. package/es/components/form-config/index.d.ts +5 -0
  13. package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
  14. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +20 -20
  15. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
  16. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +1 -1
  17. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +1 -1
  18. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  19. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  20. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +18 -0
  21. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  22. package/es/components/form-render/src/hooks/useChangeContext.d.ts +1 -1
  23. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -1
  24. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  25. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  26. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  27. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  28. package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
  29. package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
  30. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  31. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.d.ts +1 -0
  32. package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -0
  33. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +28 -3
  34. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  35. package/es/components/iho-table/src/plugins/index.js +1 -1
  36. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  37. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +27 -2
  38. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +4 -3
  39. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  40. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  41. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  42. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  43. package/es/components/iho-table/src/types/index.d.ts +7 -7
  44. package/es/components/iho-table/src/types/pluginType.d.ts +21 -18
  45. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  46. package/es/components/index.d.ts +1 -0
  47. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +4 -4
  48. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +20 -20
  49. package/es/components/keyboard/index.d.ts +3 -1
  50. package/es/components/keyboard/src/Keyboard.vue.d.ts +3 -1
  51. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +3 -1
  52. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  53. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  54. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  55. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  56. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  57. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  58. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  59. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  60. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  61. package/es/components/select-person/index.d.ts +13 -0
  62. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  63. package/es/components/select-person/src/SelectPerson.vue.d.ts +13 -0
  64. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  65. package/es/components/select-person/src/utils/index.d.ts +1 -1
  66. package/es/components/select-person/src/utils/index.js +1 -1
  67. package/es/components/shortcut-setter/index.d.ts +1 -0
  68. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
  69. package/es/env.d.ts +25 -25
  70. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  71. package/es/shared/hooks/useDateTime.js +1 -1
  72. package/es/shared/package.json.js +1 -1
  73. package/es/shared/types/business.d.ts +15 -0
  74. package/es/shared/types/business.js +1 -0
  75. package/es/shared/types/index.d.ts +1 -1
  76. package/es/shared/utils/business.d.ts +11 -0
  77. package/es/shared/utils/business.js +1 -0
  78. package/es/shared/utils/index.d.ts +1 -5
  79. package/es/shared/utils/index.js +1 -1
  80. package/es/shared/utils/tapable/index.d.ts +139 -0
  81. package/package.json +2 -2
package/es/env.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
25
-
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';
25
+
@@ -0,0 +1,86 @@
1
+ declare const draggableComponent: import('vue').DefineComponent<
2
+ {
3
+ list: {
4
+ type: ArrayConstructor;
5
+ required: boolean;
6
+ default: any;
7
+ };
8
+ modelValue: {
9
+ type: ArrayConstructor;
10
+ required: boolean;
11
+ default: any;
12
+ };
13
+ itemKey: {
14
+ type: (FunctionConstructor | StringConstructor)[];
15
+ required: boolean;
16
+ };
17
+ clone: {
18
+ type: FunctionConstructor;
19
+ default: (original: any) => any;
20
+ };
21
+ tag: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ move: {
26
+ type: FunctionConstructor;
27
+ default: any;
28
+ };
29
+ componentData: {
30
+ type: ObjectConstructor;
31
+ required: boolean;
32
+ default: any;
33
+ };
34
+ },
35
+ unknown,
36
+ {
37
+ error: boolean;
38
+ },
39
+ {
40
+ realList(): any;
41
+ getKey(): any;
42
+ },
43
+ {
44
+ getUnderlyingVm(domElement: any): any;
45
+ getUnderlyingPotencialDraggableComponent(htmElement: any): any;
46
+ emitChanges(evt: any): void;
47
+ alterList(onList: any): void;
48
+ spliceList(): void;
49
+ updatePosition(oldIndex: any, newIndex: any): void;
50
+ getRelatedContextFromMoveEvent({ to, related }: { to: any; related: any }): any;
51
+ getVmIndexFromDomIndex(domIndex: any): any;
52
+ onDragStart(evt: any): void;
53
+ onDragAdd(evt: any): void;
54
+ onDragRemove(evt: any): void;
55
+ onDragUpdate(evt: any): void;
56
+ computeFutureIndex(relatedContext: any, evt: any): any;
57
+ onDragMove(evt: any, originalEvent: any): any;
58
+ onDragEnd(): void;
59
+ },
60
+ import('vue').ComponentOptionsMixin,
61
+ import('vue').ComponentOptionsMixin,
62
+ any[],
63
+ any,
64
+ import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps,
65
+ Readonly<
66
+ {
67
+ move: Function;
68
+ tag: string;
69
+ clone: Function;
70
+ list: unknown[];
71
+ modelValue: unknown[];
72
+ componentData: Record<string, any>;
73
+ } & {
74
+ itemKey?: string | Function;
75
+ }
76
+ >,
77
+ {
78
+ move: Function;
79
+ tag: string;
80
+ clone: Function;
81
+ list: unknown[];
82
+ modelValue: unknown[];
83
+ componentData: Record<string, any>;
84
+ }
85
+ >;
86
+ export default draggableComponent;
@@ -1 +1 @@
1
- import{computed as e,unref as t}from"vue";import{useDebounceFn as n,useEventListener as l}from"@vueuse/core";import{isValid as i}from"date-fns";function o(o,s,u){const r=n((e=>{!function(e){const t=e.target;if(["INPUT"].includes(t.tagName)){const{selectionStart:e=0,selectionEnd:n=0}=t;e===n&&t.select()}}(e)}),200),c=e((()=>{var e;return null==(e=o.value)?void 0:e.$el})),a=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;u[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=u[n])}(e,t))),e}));function d(e,n,l){const i=e.value;if(!i)return;const o=e.selectionEnd||0,u=i.length;let r=0,c=0,a=0,d="",f=0;for(;r<u;){const e=i[r++];if(/\d/.test(e)&&(d+=e),r===o){a=d.length;const e=i.slice(r).match(/^\d+/);f=e?e[0].length:0}}const v=t(s),g=Array.isArray(v)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?v[1]:v[0]:v;let m="",p=0,h=0;for(r=0;r<g.length&&(l||!(c>=d.length));){const e=g[r++];if(/[yMdHms]/.test(e)?m+=d[c++]||"0":m+=e,n&&c===a){a=-1,p=m.length,h=p;let e=g.slice(r).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(m+=d.slice(c,c+f),c+=f),r+=e[0].length):(e=g.slice(r).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(p+=e[1].length,h=p+e[2].length))}}const b=m!==i;if(b){e.value=m;const t=new InputEvent("input");e.dispatchEvent(t)}return n&&(p=p||m.length+1,h=h||m.length+1,e.setSelectionRange(p,h)),b}return l(c,"input",(function(e){const t=e.target;if(!t.value||!Reflect.get(t,"_f_"))return;Reflect.set(t,"_f_",0),d(t,!0)&&(e.preventDefault(),e.stopPropagation())}),!0),l(c,"keydown",(function(e){const{key:t,target:n}=e;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t){d(n,!1,!0);const e=null==n?void 0:n.value,t=Reflect.get(u,"type")||"";e&&!t.includes("range")&&i(new Date(e))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=a.value;if(null==n?void 0:n(e.getTime()))return;const s=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,u=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,r=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==s?void 0:s(e.getHours()))return;if(null==u?void 0:u(e.getMinutes()))return;if(null==r?void 0:r(e.getMinutes()))return;return!0}(new Date(e))&&(n.value="",n.dispatchEvent(new InputEvent("input")))}}),!0),l(c,"click",r,!0),{focus:()=>{var e,t;return null==(t=null==(e=o.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=o.value)?void 0:e.blur)?void 0:t.call(e)}}}export{o as useDateTime};
1
+ import{computed as e,unref as t}from"vue";import{useDebounceFn as n,useEventListener as l}from"@vueuse/core";import{isValid as i}from"date-fns";function o(o,s,u){const r=n((e=>{!function(e){const t=e.target;if(["INPUT"].includes(t.tagName)){const{selectionStart:e=0,selectionEnd:n=0}=t;e===n&&t.select()}}(e)}),200),c=e((()=>{var e;return null==(e=o.value)?void 0:e.$el})),a=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;u[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=u[n])}(e,t))),e}));function d(e,n,l){const i=e.value;if(!i)return;const o=e.selectionEnd||0,u=i.length;let r=0,c=0,a=0,d="",f=0;for(;r<u;){const e=i[r++];if(/\d/.test(e)&&(d+=e),r===o){a=d.length;const e=i.slice(r).match(/^\d+/);f=e?e[0].length:0}}const v=t(s),g=Array.isArray(v)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?v[1]:v[0]:v;let m="",p=0,h=0;for(r=0;r<g.length&&(l||!(c>=d.length));){const e=g[r++];if(/[yMdHms]/.test(e)?m+=d[c++]||"0":m+=e,n&&c===a){a=-1,p=m.length,h=p;let e=g.slice(r).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(m+=d.slice(c,c+f),c+=f),r+=e[0].length):(e=g.slice(r).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(p+=e[1].length,h=p+e[2].length))}}const b=m!==i;if(b){e.value=m;const t=new InputEvent("input");e.dispatchEvent(t)}return n&&(p=p||m.length+1,h=h||m.length+1,e.setSelectionRange(p,h)),b}return l(c,"input",(function(e){const t=e.target;if(!t.value||!Reflect.get(t,"_f_"))return;Reflect.set(t,"_f_",0),d(t,!0)&&(e.preventDefault(),e.stopPropagation())}),!0),l(c,"keydown",(function(e){const{key:t}=e,n=e.target;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t){d(n,!1,!0);const e=null==n?void 0:n.value,t=Reflect.get(u,"type")||"";e&&!t.includes("range")&&i(new Date(e))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=a.value;if(null==n?void 0:n(e.getTime()))return;const s=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,u=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,r=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==s?void 0:s(e.getHours()))return;if(null==u?void 0:u(e.getMinutes()))return;if(null==r?void 0:r(e.getMinutes()))return;return!0}(new Date(e))&&(n.value="",n.dispatchEvent(new InputEvent("input")))}}),!0),l(c,"click",r,!0),{focus:()=>{var e,t;return null==(t=null==(e=o.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=o.value)?void 0:e.blur)?void 0:t.call(e)}}}export{o as useDateTime};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",s="3.1.42-release.9",i="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.1.42-release.9",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,i as main,e as name,n as peerDependencies,s as version};
1
+ var e="@cnhis-design-vue/shared",i="3.1.43-beta.1",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.1.43-beta.1",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};
@@ -0,0 +1,15 @@
1
+ export declare type LOW_CODE_VALUE_RELATION = 'EQ' | 'NEQ' | 'CL' | 'NC' | 'NULL' | 'NOT_NULL' | 'BIG' | 'BIGEQ' | 'LESS' | 'LESSEQ';
2
+ export declare type BindEventSetting = {
3
+ event_type: string;
4
+ event_field?: string;
5
+ params?: {
6
+ p_value?: string;
7
+ p_name: string;
8
+ p_select: LOW_CODE_VALUE_RELATION;
9
+ }[];
10
+ results?: {
11
+ p_value: string;
12
+ p_name: string;
13
+ }[];
14
+ [K: string]: unknown;
15
+ };
@@ -0,0 +1 @@
1
+
@@ -1,4 +1,5 @@
1
1
  import { App } from '@vue/runtime-core';
2
+ export * from './business';
2
3
  export declare type SFCWithInstall<T> = T & {
3
4
  install: (app: App, ...options: any[]) => any;
4
5
  };
@@ -19,4 +20,3 @@ export declare type TupleToUnion<T extends readonly unknown[]> = T[number];
19
20
  declare type UnionToIntersection<T> = (T extends T ? (params: T) => any : never) extends (P: infer R) => any ? R : never;
20
21
  export declare type UnionToTuple<T, Result extends unknown[] = []> = UnionToIntersection<T extends any ? () => T : never> extends () => infer Return ? UnionToTuple<Exclude<T, Return>, [Return, ...Result]> : Result;
21
22
  export declare type MaybeString<T extends string | number> = T | `${T}`;
22
- export {};
@@ -0,0 +1,11 @@
1
+ import { BindEventSetting, LOW_CODE_VALUE_RELATION } from '../../../es/shared/types';
2
+ export declare function isMatchLowCodeCondition(value: unknown, condition: {
3
+ con: LOW_CODE_VALUE_RELATION;
4
+ value: unknown;
5
+ }): boolean;
6
+ declare function handleFieldTriggerSetValue(bindEventSetting: BindEventSetting, { getter, setter }: {
7
+ setter: (key: string, value: unknown) => void;
8
+ getter: (key: string) => unknown;
9
+ }): void;
10
+ export declare function getBindEventSettingTrigger(key: keyof BindEventSetting): typeof handleFieldTriggerSetValue;
11
+ export {};
@@ -0,0 +1 @@
1
+ import{isArray as e,isString as t,includes as n,isEmpty as r,negate as E,gt as o,gte as u,lt as a,lte as c,noop as L,isObject as _}from"lodash-es";const s={EQ:(e,t)=>`${e}`===t,NEQ:(e,t)=>`${e}`!==t,CL:(r,E)=>!(!e(r)&&!t(r))&&n(r,E),NC:(r,E)=>!e(r)&&!t(r)||!n(r,E),NULL:r,NOT_NULL:E(r),BIG:o,BIGEQ:u,LESS:a,LESSEQ:c};function p(e,t){return(s[t.con]||(()=>!1))(e,`${t.value}`)}const S=Object.freeze({SET_VALUE:function(e,{getter:t,setter:n}){if(!_(e))return;const{results:r=[],params:E=[]}=e;if(!r.length)return;E.every((e=>e&&e.p_name&&p(t(e.p_name),{con:e.p_select,value:e.p_value})))&&r.forEach((e=>n(e.p_name,e.p_value)))},REPEAT_VALIDATE:L,IS_SHOW_FIELD:L,SQLSAVE:L,API:L});function f(e){return S[e]||L}export{f as getBindEventSettingTrigger,p as isMatchLowCodeCondition};
@@ -1,5 +1,6 @@
1
1
  import { AnyObject, ArrayAble } from '../../../es/shared/types';
2
2
  import { App, Component } from 'vue';
3
+ export * from './business';
3
4
  export declare function traverse<T extends ArrayAble<AnyObject>>(target: T, handler: (item: T extends Array<infer P> ? P : T, stop: () => void, parent?: typeof item) => void, keys?: ArrayAble<string>, parent?: T): void;
4
5
  export declare function safeComponentRegister(app: App, component: Component, cName?: string | undefined, scheduler?: () => void): void;
5
6
  export declare function generateTimeFormat(format: string): string | undefined;
@@ -15,9 +16,4 @@ export declare function targetStringIncludes(arr: string[], target: string): boo
15
16
  export declare const jsonParse: import("@vueuse/core").UseMemoizedFn<any, [value: string]>;
16
17
  export declare function shallowOmit<T, K extends Array<keyof T>>(target: T, keys: K): Omit<T, K[number]>;
17
18
  export declare function checkInSetupEnv(message?: string): void;
18
- export declare type LOW_CODE_VALUE_RELATION = 'EQ' | 'NEQ' | 'CL' | 'NC' | 'NULL' | 'NOT_NULL' | 'BIG' | 'BIGEQ' | 'LESS' | 'LESSEQ';
19
- export declare function isMatchLowCodeCondition(value: unknown, condition: {
20
- con: LOW_CODE_VALUE_RELATION;
21
- value: unknown;
22
- }): boolean;
23
19
  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 i,gt as c,gte as u,lt as s,lte as f,isObject as a,isNumber as x,isFunction as l}from"lodash-es";import{getCurrentInstance as d}from"vue";import m from"../package.json.js";function p(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",c){r=y(r),e=y(e);for(let u=0;u<e.length;u++){if(n(e[u],i,c),o)return;for(let i=0;i<r.length;i++){const c=e[u][r[i]];if(Array.isArray(c)&&t(c,n,r,e[u]),o)return}}}(t,e,n,r)}function h(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(!Reflect.get(t,"__cnhis_version")&&a(m)&&Reflect.set(t,"__cnhis_version",m.version),r?r():t.component(n,e))}function w(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function y(t){return Array.isArray(t)?t:[t]}function v(){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 $=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})),E=Object.seal(Object.create(null));function g(t,n){return function t(n,r){return a(n)?e(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((e,[n,o])=>(r.includes(n)||(a(o)&&!l(o)?e[n]=t(o,r):e[n]=o),e)),{}):n}(t,n)}function I(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function _(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 b(t,e="px"){if(x(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 j(t,e){return t.some((t=>e.includes(t)))}const L=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function O(t,e){if(!a(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function S(t){if(!d())throw new Error(t||"can't use this hook out of setup environment")}const N={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:i(o),BIG:c,BIGEQ:u,LESS:s,LESSEQ:f};function A(t,e){return(N[e.con]||(()=>!1))(t,`${e.value}`)}function U(t,e=1){const[n,r,o,i,c]=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 u=c&&parseInt(c,16)/255;return[parseInt(r,16),parseInt(o,16),parseInt(i,16),+(x(u)?u.toFixed(2):e)]}export{E as DMZ,y as arrayed,S as checkInSetupEnv,g as deepOmit,_ as findAncestor,w as generateTimeFormat,$ as getStringWidth,U as hex2rgba,A as isMatchLowCodeCondition,L as jsonParse,h as safeComponentRegister,I as separateMetaModule,O as shallowOmit,j as targetStringIncludes,p as traverse,v as uuidGenerator,b as widthAppend};
1
+ import{useMemoize as t}from"@vueuse/core";import{isObject as e,isString as n,isNumber as r,isArray as o,isFunction as i}from"lodash-es";import{getCurrentInstance as c}from"vue";import u from"../package.json.js";export{getBindEventSettingTrigger,isMatchLowCodeCondition}from"./business.js";function s(t,e,n="children",r){let o=!1;function i(){o=!0}!function t(e,n,r="children",c){r=x(r),e=x(e);for(let u=0;u<e.length;u++){if(n(e[u],i,c),o)return;for(let i=0;i<r.length;i++){const c=e[u][r[i]];if(Array.isArray(c)&&t(c,n,r,e[u]),o)return}}}(t,e,n,r)}function f(t,n,r=n.name,o){if(!r)throw new Error(`[CUI]: invalid component name for ${n}`);const{components:i={}}=t._context;i[r]||(!Reflect.get(t,"__cnhis_version")&&e(u)&&Reflect.set(t,"__cnhis_version",u.version),o?o():t.component(r,n))}function a(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function x(t){return Array.isArray(t)?t:[t]}function d(){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 l=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})),m=Object.seal(Object.create(null));function p(t,n){return function t(n,r){return e(n)?o(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((n,[o,c])=>(r.includes(o)||(e(c)&&!i(c)?n[o]=t(c,r):n[o]=c),n)),{}):n}(t,n)}function h(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function g(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 w(t,e="px"){if(r(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 y(t,e){return t.some((t=>e.includes(t)))}const v=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function $(t,n){if(!e(t))return t;const r={...t};for(let t=0;t<n.length;t++)Reflect.deleteProperty(r,n[t]);return r}function b(t){if(!c())throw new Error(t||"can't use this hook out of setup environment")}function j(t,e=1){const[n,o,i,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 s=u&&parseInt(u,16)/255;return[parseInt(o,16),parseInt(i,16),parseInt(c,16),+(r(s)?s.toFixed(2):e)]}export{m as DMZ,x as arrayed,b as checkInSetupEnv,p as deepOmit,g as findAncestor,a as generateTimeFormat,l as getStringWidth,j as hex2rgba,v as jsonParse,f as safeComponentRegister,h as separateMetaModule,$ as shallowOmit,y as targetStringIncludes,s as traverse,d as uuidGenerator,w as widthAppend};
@@ -0,0 +1,139 @@
1
+ type FixedSizeArray<T extends number, U> = T extends 0
2
+ ? void[]
3
+ : ReadonlyArray<U> & {
4
+ 0: U;
5
+ length: T;
6
+ };
7
+ type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
8
+ type Append<T extends any[], U> = {
9
+ 0: [U];
10
+ 1: [T[0], U];
11
+ 2: [T[0], T[1], U];
12
+ 3: [T[0], T[1], T[2], U];
13
+ 4: [T[0], T[1], T[2], T[3], U];
14
+ 5: [T[0], T[1], T[2], T[3], T[4], U];
15
+ 6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
16
+ 7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
17
+ 8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
18
+ }[Measure<T['length']>];
19
+ type AsArray<T> = T extends any[] ? T : [T];
20
+
21
+ declare class UnsetAdditionalOptions {
22
+ _UnsetAdditionalOptions: true;
23
+ }
24
+ type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
25
+
26
+ type Callback<E, T> = (error: E | null, result?: T) => void;
27
+ type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
28
+
29
+ type FullTap = Tap & {
30
+ type: 'sync' | 'async' | 'promise';
31
+ fn: Function;
32
+ };
33
+
34
+ type Tap = TapOptions & {
35
+ name: string;
36
+ };
37
+
38
+ type TapOptions = {
39
+ before?: string;
40
+ stage?: number;
41
+ };
42
+
43
+ interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
44
+ name?: string;
45
+ tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
46
+ call?: (...args: any[]) => void;
47
+ loop?: (...args: any[]) => void;
48
+ error?: (err: Error) => void;
49
+ result?: (result: R) => void;
50
+ done?: () => void;
51
+ register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
52
+ }
53
+
54
+ type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
55
+
56
+ declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
57
+ constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
58
+ name: string | undefined;
59
+ taps: FullTap[];
60
+ intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
61
+ isUsed(): boolean;
62
+ callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
63
+ promise(...args: AsArray<T>): Promise<R>;
64
+ tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
65
+ withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
66
+ }
67
+
68
+ export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
69
+ call(...args: AsArray<T>): R;
70
+ }
71
+
72
+ export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
73
+ export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
74
+ export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
75
+ T,
76
+ AsArray<T>[0],
77
+ AdditionalOptions
78
+ > {}
79
+
80
+ declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
81
+ tapAsync(
82
+ options: string | (Tap & IfSet<AdditionalOptions>),
83
+ fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
84
+ ): void;
85
+ tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
86
+ }
87
+
88
+ export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
89
+ T,
90
+ void,
91
+ AdditionalOptions
92
+ > {}
93
+ export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
94
+ T,
95
+ R,
96
+ AdditionalOptions
97
+ > {}
98
+ export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
99
+ T,
100
+ void,
101
+ AdditionalOptions
102
+ > {}
103
+ export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
104
+ T,
105
+ R,
106
+ AdditionalOptions
107
+ > {}
108
+ export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
109
+ T,
110
+ void,
111
+ AdditionalOptions
112
+ > {}
113
+ export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
114
+ T,
115
+ AsArray<T>[0],
116
+ AdditionalOptions
117
+ > {}
118
+
119
+ type HookFactory<H> = (key: any, hook?: H) => H;
120
+
121
+ interface HookMapInterceptor<H> {
122
+ factory?: HookFactory<H>;
123
+ }
124
+
125
+ export class HookMap<H> {
126
+ constructor(factory: HookFactory<H>, name?: string);
127
+ name: string | undefined;
128
+ get(key: any): H | undefined;
129
+ for(key: any): H;
130
+ intercept(interceptor: HookMapInterceptor<H>): void;
131
+ }
132
+
133
+ export class MultiHook<H> {
134
+ constructor(hooks: H[], name?: string);
135
+ name: string | undefined;
136
+ tap(options: string | Tap, fn?: Function): void;
137
+ tapAsync(options: string | Tap, fn?: Function): void;
138
+ tapPromise(options: string | Tap, fn?: Function): void;
139
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.42-release.9",
3
+ "version": "3.1.43-beta.1",
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": "a8f7d7cdca3113620c2a7b0dbaf062673dfc51cc"
64
+ "gitHead": "060606a57c49c4c96947343e9458ddff9c49a40e"
65
65
  }