cnhis-design-vue 3.1.57-beta.23 → 3.1.57-beta.27
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +25 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +3 -3
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +2 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/form-config/index.d.ts +34 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +34 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -0
- package/es/components/form-render/index.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/iho-table/index.d.ts +11 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +11 -0
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/plugins/dragScrollPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/dragScrollPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +31 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.d.ts +3 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/renderer.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +8 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.js +1 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +15 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +7 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
- package/es/components/info-header/index.d.ts +33 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +33 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +15 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-setter/index.d.ts +14 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +14 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/selectHooks/useOptionFiltered.d.ts +3 -1
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.d.ts +1 -1
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -2149,6 +2149,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2149
2149
|
isTree?: import("../../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2150
2150
|
isBatchSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
2151
2151
|
isSingleSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
2152
|
+
dragScroll?: boolean | undefined;
|
|
2152
2153
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2153
2154
|
rowDraggable?: boolean | undefined;
|
|
2154
2155
|
showSeq?: boolean | undefined;
|
|
@@ -2235,10 +2236,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2235
2236
|
startDateField: string;
|
|
2236
2237
|
endDateField: string;
|
|
2237
2238
|
}[] | undefined;
|
|
2239
|
+
verticalConfig?: {
|
|
2240
|
+
enable?: boolean | undefined;
|
|
2241
|
+
} | undefined;
|
|
2238
2242
|
}>;
|
|
2239
2243
|
updateConfigRefDebounced: () => void;
|
|
2240
2244
|
updateConfigRef: () => void;
|
|
2241
2245
|
fieldListRef: import("vue").Ref<{
|
|
2246
|
+
[x: string]: any;
|
|
2242
2247
|
property?: string | undefined;
|
|
2243
2248
|
type?: import("vxe-table").VxeColumnPropTypes.Type | undefined;
|
|
2244
2249
|
field?: string | undefined;
|
|
@@ -2536,6 +2541,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2536
2541
|
getTitle?: (() => string) | undefined;
|
|
2537
2542
|
getKey?: (() => string) | undefined;
|
|
2538
2543
|
annotation?: boolean | undefined;
|
|
2544
|
+
depth?: number | undefined;
|
|
2545
|
+
parent?: any | undefined;
|
|
2539
2546
|
}[]>;
|
|
2540
2547
|
updateFieldListRefDebounced: () => void;
|
|
2541
2548
|
updateFieldListRef: () => void;
|
|
@@ -4606,6 +4613,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4606
4613
|
isTree?: import("../../../shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4607
4614
|
isBatchSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
4608
4615
|
isSingleSelect?: import("../../../shared/types").MaybeString<0 | 1> | undefined;
|
|
4616
|
+
dragScroll?: boolean | undefined;
|
|
4609
4617
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4610
4618
|
rowDraggable?: boolean | undefined;
|
|
4611
4619
|
showSeq?: boolean | undefined;
|
|
@@ -4692,6 +4700,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4692
4700
|
startDateField: string;
|
|
4693
4701
|
endDateField: string;
|
|
4694
4702
|
}[] | undefined;
|
|
4703
|
+
verticalConfig?: {
|
|
4704
|
+
enable?: boolean | undefined;
|
|
4705
|
+
} | undefined;
|
|
4695
4706
|
}>;
|
|
4696
4707
|
configChanged: boolean;
|
|
4697
4708
|
fieldChanged: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,provide as o,ref as a,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,mergeProps as u,unref as
|
|
1
|
+
import{defineComponent as e,computed as t,provide as o,ref as a,toRaw as l,watch as n,resolveComponent as s,openBlock as r,createElementBlock as i,mergeProps as u,unref as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as m,normalizeStyle as p,createVNode as v,createSlots as b,renderList as h,withCtx as g,createCommentVNode as x,renderSlot as k,normalizeProps as y,guardReactiveProps as C}from"vue";import{useTheme as D}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as j}from"@vueuse/core";import"date-fns";import{isString as $,isEqualWith as I,isFunction as w,pick as q}from"lodash-es";import{useFormAsyncQueue as R,presetRequestHandler as H}from"../../../shared/hooks/useFormRequest/index.js";import{promiseTimeout as T}from"@vueuse/shared";import{widthAppend as _,uuidGenerator as A}from"../../../shared/utils/index.js";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import{useVersion as L}from"../../../shared/hooks/useVersion.js";import{VxeTableEventNameList as S,InjectionIhoTableEmits as F,InjectionTableAsyncQueue as O,InjectionIhoTableAnnotation as B,InjectionIhoTableUUID as E,InjectionIhoTableInstance as P,InjectionIhoTableConfig as N,InjectionIhoTableFieldList as V,InjectionIhoTableHandler as W}from"./constants/index.js";import{createTableHooks as z,applyTableConfigHooks as G,applyTableFieldHooks as J,createTableEventHandlers as K,createDomInsertComponent as M,createDataTransfer as Q}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as U}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as X}from"./utils/index.js";const Y=["id"];var Z=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...S],setup(e,{expose:S,emit:Z}){var ee,te;const oe=e,ae=D({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),le=t((()=>{var e,t;const o=null!=(t=null==(e=oe.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":$(o)&&(o.includes("calc")||o.endsWith("%"))?o:_(o)}})),ne=U(),se=function(e,...t){Z(e,...t);const o=d(ce)[X(e)];w(o)&&o(...t),ne.trigger(e,...t)};o(F,se);const re=R(t((()=>oe.requestInstance)),t((()=>!!oe.uniqueCacheData))).create(oe.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});o(O,re);const ie=z();o(B,t((()=>oe.annotation)));const ue=A();o(E,ue);const de=a();o(P,de);const ce=a({uuid:null!=(te=null==(ee=oe.tableConfig)?void 0:ee.uuid)?te:ue});o(N,ce);const fe=j(me,10);function me(){var e,t;ce.value=G(ie,{...oe.tableConfig,uuid:null!=(t=null==(e=oe.tableConfig)?void 0:e.uuid)?t:ue},{$table:de,emits:se,globProps:oe})}const pe=a([]);o(V,pe);const ve=j(be,10);function be(){const e=J(ie,oe.fieldList,ce.value,{$table:de,emits:se,globProps:oe});I(e,l(pe.value),((e,t)=>{if(w(e)&&w(t))return e.toString()===t.toString()}))||(pe.value=e)}const he=Q(ie,ce,de),ge=a([]);async function xe(){var e,t;const o=await he(oe.tableData),a=null==(e=de.value)?void 0:e.getTableData().fullData;if(a){let e=0;if(!(a.some((t=>{var a;if(!(null==(a=de.value)?void 0:a.isInsertByRow(t))){if(t!==o[e])return!0;e++}}))||e!==o.length))return}ge.value=o,null==(t=de.value)||t.recalculate(!0)}const ke={updateTableDataRef:j(xe,10),updateConfigRef:fe,updateFieldListRef:ve};o(W,ke);const ye=K({hooks:ie,config:ce,$table:de,context:ke,emits:se}),Ce=t((()=>({...ce.value,...ye})));let De=!1,je=!1,$e=!1;const Ie=j((()=>{De&&me(),je&&be(),$e&&xe(),De=!1,je=!1,$e=!1}),10);n((()=>oe.tableConfig),(()=>{De=!0,je=!0,$e=!0,Ie()}),{deep:!0}),n((()=>oe.fieldList),(()=>{je=!0,$e=!0,Ie()}),{deep:!0}),n([()=>[...oe.tableData],()=>{var e;return null==(e=oe.tableData)?void 0:e.length}],(()=>{$e=!0,Ie()})),n([()=>oe.tableData,()=>{var e;return null==(e=oe.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=ce.value.treeConfig)?void 0:e.expandAll)&&(await T(11),null==(t=de.value)||t.setAllTreeExpand(!0))})),me(),be(),xe();const{header:we,footer:qe}=M(ie);function Re(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return S({$table:de,async loadData(e){var t;null==(t=de.value)||t.loadData(await he(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),reload(){var e,t;null==(e=de.value)||e.loadColumn([]),null==(t=de.value)||t.loadData([]),me(),be(),xe()},...ie.exposeHooks.expose.call({},ce,{$table:de,emits:se})}),ie.setupHooks.setup.call(ce,pe,{$table:de,emits:se}),(e,t)=>{const o=s("vxe-grid");return r(),i("section",u({class:"iho-table",id:d(ue),style:d(ae)},d(L)()),[(r(),c(f(d(we)))),m("section",{style:p(d(le))},[v(o,u({ref_key:"$table",ref:de},d(Ce),{columns:pe.value,data:ge.value}),b({_:2},[h(e.$slots,((t,o)=>({name:o,fn:g((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,o,y(C(Re(t))))]))})))]),1040,["columns","data"])],4),(r(),c(f(d(qe))))],16,Y)}}});export{Z as default};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnyObject, Nullable } from '../../../../../shared/types';
|
|
2
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
|
-
import { Ref } from 'vue';
|
|
4
3
|
import { VxeTableInstance } from 'vxe-table';
|
|
5
4
|
import { IhoTableHandlerContext, IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler, TableHooks } from '../../../../../components/iho-table/src/types';
|
|
6
5
|
export declare const createTableHooks: () => Readonly<{
|
|
@@ -13,10 +12,7 @@ export declare const createTableHooks: () => Readonly<{
|
|
|
13
12
|
exposeHooks: import("../../../../../components/iho-table/src/types").AbstractExposeHooks;
|
|
14
13
|
}>;
|
|
15
14
|
export declare function applyTableConfigHooks(hooks: TableHooks, config: IhoTableConfig, context: IhoTableHandlerContext): IhoTableConfig;
|
|
16
|
-
export declare function applyTableFieldHooks(hooks: TableHooks, fieldList: IhoTableFieldItem[], config: IhoTableConfig, context:
|
|
17
|
-
$table: Ref<Nullable<VxeTableInstance>>;
|
|
18
|
-
emits: IhoTableEmits;
|
|
19
|
-
}): IhoTableFieldItem[];
|
|
15
|
+
export declare function applyTableFieldHooks(hooks: TableHooks, fieldList: IhoTableFieldItem[], config: IhoTableConfig, context: IhoTableHandlerContext): IhoTableFieldItem[];
|
|
20
16
|
export declare function createTableEventHandlers({ hooks, config, $table, emits, context }: {
|
|
21
17
|
hooks: TableHooks;
|
|
22
18
|
config: MaybeRef<IhoTableConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as
|
|
1
|
+
import{arrayed as o}from"../../../../../shared/utils/index.js";import{cloneDeep as e,isArray as r}from"lodash-es";import{unref as t,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i}from"../../utils/index.js";import{useConfigHooks as a}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as l}from"./useDomInsertHooks.js";import{useEventHooks as c}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as d}from"./useFieldHooks.js";import{useSetupHooks as m}from"./useSetupHooks.js";const p=(()=>{let o=null;return()=>o||(o=Object.freeze({configHooks:a().create(),fieldHooks:d().create(),eventHooks:c().create(),dataHooks:f().create(),setupHooks:m().create(),domInsertHooks:l().create(),exposeHooks:u().create()}))})();function k(o,r,t){const s=o.configHooks.config.call(e(r),t);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((e=>{s[e]=o.configHooks[e].call(s[e],s,t)})),s}function H(t,s,n,i){t.fieldHooks.fieldStart.promise(n,i);let a=function e(s){return s.reduce(((s,a,f)=>{const l=[],c=[];let u=!1;return a=t.fieldHooks.field.call(a,{index:f,remove(){u=!0},insertAfter(e){c.push(...o(e))},insertBefore(e){l.push(...o(e))}},n,i),s.push(...l),u||(s.push(a),r(a.children)&&(a.children=e(a.children))),s.push(...c),s}),[])}(e(s));return a=t.fieldHooks.fieldList.call(a,n,i),t.fieldHooks.fieldEnd.promise(n,i),a}function h({hooks:o,config:e,$table:r,emits:s,context:a}){return n.reduce(((n,f)=>(n[f]=n=>function(n,f){var l;const c=i(n);s(c,f),null==(l=o.eventHooks[n])||l.promise(f,t(e),{$table:t(r),emits:s,...a})}(f,n),n)),{})}function g(e,r,s){return async n=>{e.dataHooks.dataStart.promise(t(r));let i=await n.reduce((async(n,i,a)=>{const f=[],l=[];let c=!1;await e.dataHooks.data.promise(i,t(r),{index:a,$table:s,insertBefore(e){f.push(...o(e))},insertAfter(e){l.push(...o(e))},remove(){c=!0}});const u=await n;return u.push(...f),!c&&u.push(i),u.push(...l),u}),Promise.resolve([]));return i=e.dataHooks.dataList.call(i,t(r)),e.dataHooks.dataEnd.promise(t(r)),i}}function C(o){return{header:s({name:"IhoTableHeader",render:()=>o.domInsertHooks.header.call([])}),footer:s({name:"IhoTableFooter",render:()=>o.domInsertHooks.footer.call([])})}}export{k as applyTableConfigHooks,H as applyTableFieldHooks,g as createDataTransfer,C as createDomInsertComponent,h as createTableEventHandlers,p as createTableHooks};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../shared/types';
|
|
2
|
-
import { AsyncParallelHook, AsyncSeriesHook } from '../../../../../shared/utils/tapable';
|
|
2
|
+
import { AsyncParallelHook, AsyncSeriesHook, SyncWaterfallHook } from '../../../../../shared/utils/tapable';
|
|
3
3
|
import { AbstractDataHooks } from '../../../../../components/iho-table/src/types';
|
|
4
4
|
declare class TableDataHooks extends AbstractDataHooks {
|
|
5
5
|
readonly dataStart: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -11,6 +11,7 @@ declare class TableDataHooks extends AbstractDataHooks {
|
|
|
11
11
|
insertAfter(data: import("../../../../../shared/types").ArrayAble<AnyObject>): void;
|
|
12
12
|
}], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
13
13
|
readonly dataEnd: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
14
|
+
readonly dataList: SyncWaterfallHook<[AnyObject[], import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
|
14
15
|
}
|
|
15
16
|
export declare function useDataHooks(): {
|
|
16
17
|
create: () => TableDataHooks;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import
|
|
1
|
+
import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import t from"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import a from"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import s from"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{AbstractDataHooks as o}from"../../types/pluginType.js";class e extends o{constructor(){super(...arguments),this.dataStart=new a(["config"]),this.data=new s(["rowData","context","config"]),this.dataEnd=new a(["config"]),this.dataList=new t(["dataList","config"])}}function r(){return{create:function(){return new e}}}export{r as useDataHooks};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dragScrollPlugin(): import("../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{findAncestor as e}from"../../../../shared/utils/index.js";import{useThrottleFn as t}from"@vueuse/core";import{flow as o}from"lodash-es";import{onBeforeUnmount as s,unref as r}from"vue";import"../../index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function u(){const e="dragScrollPlugin";return n({name:e,apply(r){const n={events:new Map,regist(e,t,o){document.body.addEventListener(t,o);const s=this.events.get(e)||[];s.push((()=>document.body.removeEventListener(t,o))),this.events.set(e,s)},stopper(e){var t;o(null!=(t=this.events.get(e))?t:[])(),this.events.delete(e)}};r.configHooks.config.tap(e,((e,{$table:o})=>{if(!1===e.dragScroll||!e.uuid)return e;n.stopper(e.uuid);let s=0,r=0,u=0,l=0,a=!1;const c={queue:[],lock:!1,add(e){this.queue.push(e),this.execute()},async execute(){if(!this.lock){this.lock=!0;try{for(;this.queue.length;)await this.queue.shift()()}finally{this.lock=!1}}},clear(){this.queue=[]}};return n.regist(e.uuid,"mousemove",t((e=>{var t;if(!a){const{bodyEle:t,inEmptyArea:s}=i(e,o);return void(t&&(t.style.cursor=s?"grab":"default"))}const{pageX:n,pageY:p}=e,d=n-s,m=p-r;c.add((()=>o.value.scrollTo(Math.max(0,u-d),Math.max(0,l-m)))),window.getSelection&&(null==(t=window.getSelection())||t.removeAllRanges())}),50)),n.regist(e.uuid,"mousedown",(e=>{const{bodyEle:t,inEmptyArea:n}=i(e,o);if(!t||!n)return;s=e.pageX,r=e.pageY;const{scrollTop:c,scrollLeft:p}=o.value.getScroll();u=p,l=c,a=!0})),n.regist(e.uuid,"mouseup",(()=>{a=!1,c.clear()})),e})),r.setupHooks.setup.tap(e,(e=>{s((()=>e.value.uuid&&n.stopper(e.value.uuid)))}))}})}function i(e,t){const o=e.target,s="TD"===o.tagName||o.classList.contains("vxe-cell"),n=r(t);return n?{target:o,bodyEle:l(o,n),inEmptyArea:s}:{target:o,inEmptyArea:s,bodyEle:null}}function l(t,o){const s=r(o.getRefMaps().refElem);let n=!1,u=!1,i=null;return e(t,(e=>(n||(n=e===s),u||(u=e.classList.contains("vxe-table--body-wrapper"),i=e),n&&u)))?i:null}export{u as dragScrollPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useAttrs as
|
|
1
|
+
import{useAttrs as e,onBeforeUnmount as t,inject as l,createVNode as o}from"vue";import{arrayed as n,widthAppend as a}from"../../../../shared/utils/index.js";import{isObject as r,isString as i,isFunction as s}from"lodash-es";import u from"../../../annotation-edit/index.js";import"../../index.js";import{InjectionIhoTableAnnotation as d,InjectionIhoTableConfig as m}from"../constants/index.js";import{getLowCodeFieldFromField as c,IhoTableRenderHelper as h}from"../utils/index.js";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function f(){const f="headerPlugin";return p({name:f,apply(p){let v=null;p.setupHooks.setup.tap(f,(()=>{v=e(),t((()=>{v=null}))})),p.fieldHooks.field.tap(f,(e=>{var t;const p=null==(t=e.slots)?void 0:t.header;return e.slots={...e.slots,header:t=>function(e,t,c){var p;const f=l(d),x=l(m),b=l("$xetable"),j=e.column||{},g=r(null==f?void 0:f.value)&&!1!==t.annotation,w=h.isEditableColumn(x.value,j),W=h.hasFilter(t)||h.hasDateFiler(t),k=null==(p=t.titlePrefix)?void 0:p.content,y=i(c)?c:s(c)?c(e):null;let D=!1;if(x.value){const e=x.value.editRules&&x.value.editRules[j.field];e&&(D=n(e).some((e=>e.required)))}const M=x.value.border?Math.max(2,Math.ceil(b.reactData.scrollbarWidth/b.reactData.tableColumn.length)):1,P=a(Math.max(0,j.renderWidth-20-M-(D?14:0)-(g?18:0)-(W?23:0)-(w?22:0)-(k?20:0)-(j.sortable?23:0)));return o("section",{class:"iho-table__headerWrapper"},[o("section",{style:{width:P}},[null!=y?y:o("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[function(){const e=j.title,t=/\\n|\n|\r/g;if(!t.test(e))return e;const l=e.replace(t,"<br>").split("<br>");return l.map(((e,t)=>[e,t===l.length-1?null:o("br",null,null)]))}()])]),g?o(u,{modelValue:f.value[j.field],"onUpdate:modelValue":e=>f.value[j.field]=e,shortcuts:v&&(v["annotation-shortcuts"]||v.annotationShortcuts)||[]},null):null])}(t,c(e),p)},e}))}})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin.js";import*as t from"./defaultValuePlugin.js";import*as l from"./filterDaterangeRenderPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin.js";import*as t from"./defaultValuePlugin.js";import*as l from"./dragScrollPlugin.js";import*as d from"./filterDaterangeRenderPlugin/index.js";import*as g from"./filterRenderPlugin/index.js";import*as o from"./filterVisibleEventPlugin.js";import*as u from"./forceArrowKeyPlugin.js";import*as a from"./headerPlugin.js";import*as P from"./highLightSetPlugin.js";import*as m from"./keyboardEventPlugin.js";import*as f from"./lowCodeFieldAdaptorPlugin.js";import*as p from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin.js";import*as j from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as b from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as c from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as R from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as h from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as W from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as v from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";import*as S from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as k from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as C from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as y from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as A from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as E from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as D from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as F from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as T from"./rowClickPlugin.js";import*as V from"./rowDragPlugin.js";import*as q from"./rowGroupSettingPlugin/index.js";import*as z from"./varialbleHeightPlugin.js";import*as G from"./verticalTablePlugin/index.js";import*as H from"./virtualTreePlugin.js";import*as I from"./wordbookSettingPlugin.js";import{separateMetaModule as K}from"../../../../shared/utils/index.js";var L=K(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin.ts":r,"./colorAndIconPlugin.ts":i,"./copyPastePlugin.ts":n,"./defaultConfigPlugin.ts":s,"./defaultValuePlugin.ts":t,"./dragScrollPlugin.ts":l,"./filterDaterangeRenderPlugin/index.tsx":d,"./filterRenderPlugin/index.tsx":g,"./filterVisibleEventPlugin.ts":o,"./forceArrowKeyPlugin.ts":u,"./headerPlugin.tsx":a,"./highLightSetPlugin.tsx":P,"./keyboardEventPlugin.ts":m,"./lowCodeFieldAdaptorPlugin.tsx":f,"./maxCheckSizePlugin.ts":p,"./operationalFormPlugin.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":j,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":c,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":w,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":h,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":W,"./rendererPlugins/editableWidgets/switchRendererPlugin.tsx":v,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":S,"./rendererPlugins/widgets/checkRendererPlugin.tsx":k,"./rendererPlugins/widgets/colorRendererPlugin.tsx":C,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":y,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":A,"./rendererPlugins/widgets/labelRendererPlugin.tsx":E,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":D,"./rendererPlugins/widgets/seqRendererPlugin.tsx":F,"./rowClickPlugin.ts":T,"./rowDragPlugin.ts":V,"./rowGroupSettingPlugin/index.ts":q,"./varialbleHeightPlugin.tsx":z,"./verticalTablePlugin/index.ts":G,"./virtualTreePlugin.ts":H,"./wordbookSettingPlugin.ts":I}));export{L as default};
|
|
@@ -30,6 +30,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
type: StringConstructor;
|
|
31
31
|
default: string;
|
|
32
32
|
};
|
|
33
|
+
isDateDisabled: {
|
|
34
|
+
type: PropType<(current: number, row: AnyObject) => boolean>;
|
|
35
|
+
};
|
|
36
|
+
isTimeDisabled: {
|
|
37
|
+
type: PropType<(current: number, row: AnyObject) => {
|
|
38
|
+
isHourDisabled: boolean;
|
|
39
|
+
isMinuteDisabled: boolean;
|
|
40
|
+
isSecondDisabled: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
33
43
|
}, {
|
|
34
44
|
attr: AnyObject;
|
|
35
45
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -61,6 +71,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
71
|
type: StringConstructor;
|
|
62
72
|
default: string;
|
|
63
73
|
};
|
|
74
|
+
isDateDisabled: {
|
|
75
|
+
type: PropType<(current: number, row: AnyObject) => boolean>;
|
|
76
|
+
};
|
|
77
|
+
isTimeDisabled: {
|
|
78
|
+
type: PropType<(current: number, row: AnyObject) => {
|
|
79
|
+
isHourDisabled: boolean;
|
|
80
|
+
isMinuteDisabled: boolean;
|
|
81
|
+
isSecondDisabled: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
64
84
|
}>> & {
|
|
65
85
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
66
86
|
}>>;
|
|
@@ -73,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
93
|
timePickerProps: {
|
|
74
94
|
format: string | undefined;
|
|
75
95
|
};
|
|
76
|
-
isDateDisabled: (ts: number) =>
|
|
96
|
+
isDateDisabled: (ts: number) => boolean;
|
|
77
97
|
isTimeDisabled: ((ts: number) => any) | undefined;
|
|
78
98
|
type: any;
|
|
79
99
|
clearable: boolean;
|
|
@@ -196,6 +216,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
196
216
|
type: StringConstructor;
|
|
197
217
|
default: string;
|
|
198
218
|
};
|
|
219
|
+
isDateDisabled: {
|
|
220
|
+
type: PropType<(current: number, row: AnyObject) => boolean>;
|
|
221
|
+
};
|
|
222
|
+
isTimeDisabled: {
|
|
223
|
+
type: PropType<(current: number, row: AnyObject) => {
|
|
224
|
+
isHourDisabled: boolean;
|
|
225
|
+
isMinuteDisabled: boolean;
|
|
226
|
+
isSecondDisabled: boolean;
|
|
227
|
+
}>;
|
|
228
|
+
};
|
|
199
229
|
}>> & {
|
|
200
230
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
201
231
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as
|
|
1
|
+
import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as a,unref as o,mergeProps as s,isRef as u}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as c}from"lodash-es";import{useIhoTableFormEvent as m}from"../../../../utils/index.js";import D from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:null},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},connectField:{type:String,default:"-_-"},isDateDisabled:{type:Function},isTimeDisabled:{type:Function}},emits:["update:value"],setup(e,{emit:f}){const p=e,v=t(),w=i("$xetable"),{emitFormChangeWithParams:b}=m({...p,$table:w}),F=n(),g=r({get:()=>p.value?p.value:null,set(e){const t=p.value;if(t===e)return;const{isDateDisabled:i,isTimeDisabled:n}=y.value;if(e){const t=Date.parse(e);if(i(t))return;const{isHourDisabled:r,isMinuteDisabled:l,isSecondDisabled:a}=(null==n?void 0:n(t))||{},{h:o,m:s,s:u}=h(new Date(e)),d=null==r?void 0:r(o),c=null==l?void 0:l(s,o),m=null==a?void 0:a(u,s,o);if(d||c||m)return}f("update:value",e),b({oldValue:t})}}),y=r((()=>{const{valueFormat:e,format:t,type:i="datetime"}=v;return{type:i,clearable:!0,allowedInvalidValue:"-",...v,timePickerProps:{format:d(e||t)},isDateDisabled:e=>{var t;return(null==(t=p.isDateDisabled)?void 0:t.call(p,e,p.row))||function(e){return!!p.row[p.connectField]&&T(e,p.isEndDate?new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime():new Date(p.row[p.connectField]).getTime())}(e)},isTimeDisabled:(null==i?void 0:i.includes("time"))?S(p.isTimeDisabled)||$:void 0}}));function T(e,t){return p.isStartDate&&p.connectField?e>t:!(!p.isEndDate||!p.connectField)&&e<t}function $(e){const t=new Date(p.row[p.connectField]),i=new Date(e),{h:n,m:r,s:l}=h(t),a=(e,t,i,n)=>!(p.isEndDate&&i>n)&&(!(p.isStartDate&&i<n)&&T(e,t));return{isHourDisabled:t=>{if(!p.row[p.connectField])return!1;const r=new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:o}=h(i);return a(t,n,e-60*t*60*1e3-60*l*1e3-1e3*o,r)},isMinuteDisabled:t=>{if(!p.row[p.connectField])return!1;const l=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:00:00`).getTime(),{s:o}=h(i);return a(t,r,e-60*t*1e3-1e3*o,l)},isSecondDisabled:t=>{if(!p.row[p.connectField])return!1;const i=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:${r}:00`).getTime();return a(t,l,e-1e3*t,i)}}}function S(e){return c(e)?t=>e(t,p.row):null}function h(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return(e,t)=>(l(),a(o(D),s({ref_key:"formRef",ref:F},o(y),{"formatted-value":o(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function verticalTablePlugin(): import("../../../../../components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{flow as e,method as t,pick as r,isArray as i,mapValues as n}from"lodash-es";import{onBeforeUnmount as o,unref as l}from"vue";import"../../../index.js";import{LOWEST_PRIORITY as s,WIDGET_TYPE as d}from"../../constants/index.js";import{renderHeader as a}from"./renderer.js";import{useUUIDMap as u}from"../../utils/index.js";import{isVerticalTable as c,isVerticalHeader as f,getSpanInfo as m,createVerticalFieldList as p,getFieldListDepth as g,bindHeaderInfoAndFlatten as h,isVerticalBody as v,getHeaderDepthByField as F}from"./utils.js";import{defineTablePlugin as L}from"../../hooks/useTablePlugin.js";function w(){const w="verticalTablePlugin";return L({name:w,vxe(r){function i(e,t){const{row:i,column:o}=t,{originalField:l={}}=i;if(f(o))return a(i,o);const{editRender:s={}}=l,u=s.name||d.DEFAULT,c=r.renderer.get(u);return c?n(c,(r=>r.bind(c,e,t))):{}}r.renderer.add("VERTICAL_TABLE_CELL",{renderCell:e(i,t(["renderCell"])),renderEdit:e(i,t(["renderEdit"]))})},apply(e){const{getItemFromUUID:t,removeItemFromUUID:n,setItemFromUUID:a}=u((()=>({})),!1);e.configHooks.config.tap({name:w,stage:s},(e=>{if(!e.uuid||!c(e))return e;const{uuid:i}=e;return a(i,{}),Reflect.set(window,"__state",t(i)),{uuid:i,showHeader:!1,...r(e,["border","height","verticalConfig","showSeq","size","rowGroupSetting"]),cellClassName({column:e}){const t=f(e);return{"vxe-header--column":t,"vxe-table--header":t}},cellStyle({column:e,row:t}){if(m(t,e).colspan>1)return{textAlign:"center"}},spanMethod:({row:e,column:t})=>m(e,t),editConfig:{...e.editConfig,beforeEditMethod({row:e,column:t}){const{originalField:r={}}=e;if(f(t))return!1;const{editRender:{name:i=d.DEFAULT}={}}=r;return!Reflect.get(d,i)}}}})),e.fieldHooks.fieldList.tap({name:w,stage:s},((e,r,{globProps:n})=>{const{uuid:o}=r;if(!o||!c(r))return e;const l=t(o);return l?(l.originalFieldList=e,i(n.tableData)?l.verticalFieldList=p(e,l.headerDepth=g(e)):[]):e})),e.dataHooks.dataList.tap({name:w,stage:s},((e,r)=>{const{uuid:i}=r;if(!i||!c(r))return e;const n=t(i);if(!n)return e;const{originalFieldList:o=[],headerDepth:l=0}=n,s=h(o,l);return n.verticalData=s.map((t=>new Proxy({},{get(r,i){var n;if("originalField"===i)return t;if(f({field:i}))return t[i];if(v({field:i})){const r=F({field:i});return"seq"===t.type?r+1:null==(n=e[r])?void 0:n[t.field]}return r[i]},set(r,i,n){if(!f({field:i})){const r=F({field:i});r>=0&&e[r]&&(e[r][t.field]=n)}return!0}})))})),e.setupHooks.setup.tap(w,(e=>{o((()=>{const{uuid:t}=l(e)||{};t&&n(t)}))}))}})}export{w as verticalTablePlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,n){return e[n.field]}export{e as renderHeader};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../shared/types';
|
|
2
|
+
import { IhoTableFieldItem } from '../../../../../components/iho-table';
|
|
3
|
+
export declare type IhoTableVerticalState = {
|
|
4
|
+
originalFieldList?: IhoTableFieldItem[];
|
|
5
|
+
verticalFieldList?: IhoTableFieldItem[];
|
|
6
|
+
verticalData?: AnyObject[];
|
|
7
|
+
headerDepth?: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../shared/types';
|
|
2
|
+
import { VxeTableDefines } from 'vxe-table';
|
|
3
|
+
import { IhoTableConfig, IhoTableFieldItem } from '../../../../../components/iho-table';
|
|
4
|
+
export declare function isVerticalTable(tableConfig: IhoTableConfig): boolean;
|
|
5
|
+
export declare function getFieldListDepth(fieldList: IhoTableFieldItem[]): number;
|
|
6
|
+
export declare function isVerticalHeader({ field }: IhoTableFieldItem): boolean;
|
|
7
|
+
export declare function isVerticalBody({ field }: IhoTableFieldItem): boolean;
|
|
8
|
+
export declare function getHeaderDepthByField({ field }: IhoTableFieldItem): number;
|
|
9
|
+
export declare function bindHeaderInfoAndFlatten(fieldList: IhoTableFieldItem[], depth: number): IhoTableFieldItem[];
|
|
10
|
+
export declare function pickHeaderInfo(fieldItem: IhoTableFieldItem): Pick<IhoTableFieldItem, string>;
|
|
11
|
+
export declare function getSpanInfo(row: AnyObject, column: VxeTableDefines.ColumnInfo): {
|
|
12
|
+
rowspan: any;
|
|
13
|
+
colspan: any;
|
|
14
|
+
};
|
|
15
|
+
export declare function createVerticalFieldList(tableData: AnyObject[], headerDepth: number): IhoTableFieldItem[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{traverse as e}from"../../../../../shared/utils/index.js";import{isString as n,pick as r,range as t}from"lodash-es";function i(e){var n;return!!(null==(n=e.verticalConfig)?void 0:n.enable)}function a(e){let n=0;return function e(r,t=0){r.forEach((r=>{r.children?e(r.children,t+1):n=Math.max(n,t)}))}(e),n}function l({field:e}){return!!n(e)&&(null==e?void 0:e.startsWith("header_"))}function o({field:e}){return!!n(e)&&(null==e?void 0:e.startsWith("body_"))}function d({field:e}){var r;return n(e)?+(null!=(r=e.split("_")[1])?r:0):0}function c(n,r){const i=[];return e(n,((e,n,l)=>{e.parent=l,e.children||(!function(e,n){let r=e,i=n;if(!e.parent)return e[`header_${n}`]=e.title,void t(n+1).forEach((r=>{e[`header_${r}_colspan`]=r===n?n+1:0,e[`header_${r}_rowspan`]=r===n?1:0}));for(;r;)e[`header_${i}`]=r.title,e[`header_${i}_rowspan`]=a(r),e[`header_${i}_colspan`]=1,i--,r=r.parent}(e,r),i.push(e))})),i.forEach(((e,n)=>{const r=i[n-1];r&&Object.entries(e).forEach((([n,t])=>{n.match(/^header_(\d+)$/)&&t===r[n]&&(e[`${n}_colspan`]=0,e[`${n}_rowspan`]=0)}))})),i;function a(n){if(!n.children)return 1;let r=0;return e(n.children,(e=>{e.children||r++})),r}}function f(e){return r(e,Object.keys(e).filter((e=>e.startsWith("header_"))))}function u(e,n){var r,t;return l(n)?{rowspan:null!=(r=e[n.field+"_rowspan"])?r:1,colspan:null!=(t=e[n.field+"_colspan"])?t:1}:{colspan:1,rowspan:1}}function h(e,n){return[...t(n+1).map((e=>({field:`header_${e}`,title:`header_${e}`,minWidth:100,fixed:"left"}))),...e.map(((e,n)=>({field:`body_${n}`,title:`body_${n}`,minWidth:100,editRender:{name:"VERTICAL_TABLE_CELL",props:{},enable:!0}})))]}export{c as bindHeaderInfoAndFlatten,h as createVerticalFieldList,a as getFieldListDepth,d as getHeaderDepthByField,u as getSpanInfo,o as isVerticalBody,l as isVerticalHeader,i as isVerticalTable,f as pickHeaderInfo};
|
|
@@ -18,6 +18,7 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
18
18
|
isTree: MaybeString<0 | 1 | 2 | 3>;
|
|
19
19
|
isBatchSelect: MaybeString<0 | 1>;
|
|
20
20
|
isSingleSelect: MaybeString<0 | 1>;
|
|
21
|
+
dragScroll: boolean;
|
|
21
22
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
22
23
|
rowDraggable: boolean;
|
|
23
24
|
showSeq: boolean;
|
|
@@ -54,12 +55,18 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
54
55
|
radioConfig: Partial<VxeTableProps['radioConfig'] & {
|
|
55
56
|
slots: VxeColumnPropTypes.Slots;
|
|
56
57
|
}>;
|
|
58
|
+
verticalConfig: {
|
|
59
|
+
enable?: boolean;
|
|
60
|
+
};
|
|
57
61
|
[K: string]: unknown;
|
|
58
62
|
}>;
|
|
59
63
|
export declare type IhoTableFieldItem = {
|
|
60
64
|
[K in keyof VxeTableDefines.ColumnInfo]?: K extends 'children' ? IhoTableFieldItem[] : K extends keyof VxeTableDefines.ColumnInfo ? VxeTableDefines.ColumnInfo[K] : never;
|
|
61
65
|
} & Partial<{
|
|
62
66
|
annotation: boolean;
|
|
67
|
+
depth: number;
|
|
68
|
+
parent: IhoTableFieldItem;
|
|
69
|
+
[key: string]: any;
|
|
63
70
|
}>;
|
|
64
71
|
export declare namespace IhoTableLowCodeField {
|
|
65
72
|
type FieldSetting = Partial<{
|
|
@@ -6,7 +6,7 @@ import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, Vx
|
|
|
6
6
|
import { VxeTableEvents } from 'vxe-table/types/table';
|
|
7
7
|
import { VxePagerEvents } from 'vxe-table/types/pager';
|
|
8
8
|
import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
|
|
9
|
-
import { IhoTableConfig, IhoTableEmits, IhoTableEventTypes, IhoTableFieldItem, IhoTableHandler } from '.';
|
|
9
|
+
import { IhoTableConfig, IhoTableEmits, IhoTableEventTypes, IhoTableFieldItem, IhoTableHandler, IhoTableProps } from '.';
|
|
10
10
|
export declare type IhoTableInstance = {
|
|
11
11
|
interceptor: VxeGlobalInterceptor;
|
|
12
12
|
renderer: VxeGlobalRenderer;
|
|
@@ -24,6 +24,7 @@ export declare type TablePlugin = {
|
|
|
24
24
|
export declare type IhoTableHandlerContext<isRef extends boolean = true> = {
|
|
25
25
|
$table: isRef extends true ? Ref<Nullable<VxeTableInstance>> : Nullable<VxeTableInstance>;
|
|
26
26
|
emits: IhoTableEmits;
|
|
27
|
+
globProps: IhoTableProps;
|
|
27
28
|
};
|
|
28
29
|
export declare type TableHooks = Readonly<{
|
|
29
30
|
configHooks: AbstractConfigHooks;
|
|
@@ -150,6 +151,7 @@ export declare abstract class AbstractDataHooks {
|
|
|
150
151
|
abstract readonly dataStart: AsyncParallelHook<WithTableConfig>;
|
|
151
152
|
abstract readonly data: AsyncSeriesHook<WithTableDataContext<[AnyObject]>>;
|
|
152
153
|
abstract readonly dataEnd: AsyncParallelHook<WithTableConfig>;
|
|
154
|
+
abstract readonly dataList: SyncWaterfallHook<WithTableConfig<[AnyObject[]]>>;
|
|
153
155
|
}
|
|
154
156
|
export declare abstract class AbstractSetupHooks {
|
|
155
157
|
abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>, IhoTableHandlerContext]>;
|
|
@@ -165,6 +165,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
165
165
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
166
166
|
outBordered: boolean;
|
|
167
167
|
forceClearable: boolean;
|
|
168
|
+
wordSplitFilter: boolean;
|
|
168
169
|
}>>>;
|
|
169
170
|
};
|
|
170
171
|
}, {
|
|
@@ -334,6 +335,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
334
335
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
335
336
|
outBordered: boolean;
|
|
336
337
|
forceClearable: boolean;
|
|
338
|
+
wordSplitFilter: boolean;
|
|
337
339
|
}>>>;
|
|
338
340
|
};
|
|
339
341
|
}>> & {
|
|
@@ -510,6 +512,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
510
512
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
511
513
|
outBordered: boolean;
|
|
512
514
|
forceClearable: boolean;
|
|
515
|
+
wordSplitFilter: boolean;
|
|
513
516
|
}>>;
|
|
514
517
|
};
|
|
515
518
|
themeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
@@ -759,6 +762,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
759
762
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
760
763
|
outBordered: boolean;
|
|
761
764
|
forceClearable: boolean;
|
|
765
|
+
wordSplitFilter: boolean;
|
|
762
766
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
|
763
767
|
[key: symbol]: any;
|
|
764
768
|
[key: `x-${string}`]: any;
|
|
@@ -2772,6 +2776,10 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2772
2776
|
default: boolean;
|
|
2773
2777
|
};
|
|
2774
2778
|
forceClearable: BooleanConstructor;
|
|
2779
|
+
wordSplitFilter: {
|
|
2780
|
+
type: BooleanConstructor;
|
|
2781
|
+
default: boolean;
|
|
2782
|
+
};
|
|
2775
2783
|
}, {
|
|
2776
2784
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
2777
2785
|
fieldList: {
|
|
@@ -2937,6 +2945,10 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2937
2945
|
default: boolean;
|
|
2938
2946
|
};
|
|
2939
2947
|
forceClearable: BooleanConstructor;
|
|
2948
|
+
wordSplitFilter: {
|
|
2949
|
+
type: BooleanConstructor;
|
|
2950
|
+
default: boolean;
|
|
2951
|
+
};
|
|
2940
2952
|
}>> & {
|
|
2941
2953
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
2942
2954
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
@@ -3101,6 +3113,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3101
3113
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
3102
3114
|
outBordered: boolean;
|
|
3103
3115
|
forceClearable: boolean;
|
|
3116
|
+
wordSplitFilter: boolean;
|
|
3104
3117
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
|
3105
3118
|
[key: symbol]: any;
|
|
3106
3119
|
[key: `x-${string}`]: any;
|
|
@@ -3442,6 +3455,10 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3442
3455
|
default: boolean;
|
|
3443
3456
|
};
|
|
3444
3457
|
forceClearable: BooleanConstructor;
|
|
3458
|
+
wordSplitFilter: {
|
|
3459
|
+
type: BooleanConstructor;
|
|
3460
|
+
default: boolean;
|
|
3461
|
+
};
|
|
3445
3462
|
}>> & {
|
|
3446
3463
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
3447
3464
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
@@ -3461,6 +3478,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3461
3478
|
uniqueCacheData: boolean;
|
|
3462
3479
|
outBordered: boolean;
|
|
3463
3480
|
forceClearable: boolean;
|
|
3481
|
+
wordSplitFilter: boolean;
|
|
3464
3482
|
operationalFormInit: boolean;
|
|
3465
3483
|
}>;
|
|
3466
3484
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
@@ -3749,6 +3767,10 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3749
3767
|
default: boolean;
|
|
3750
3768
|
};
|
|
3751
3769
|
forceClearable: BooleanConstructor;
|
|
3770
|
+
wordSplitFilter: {
|
|
3771
|
+
type: BooleanConstructor;
|
|
3772
|
+
default: boolean;
|
|
3773
|
+
};
|
|
3752
3774
|
}, {
|
|
3753
3775
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
3754
3776
|
fieldList: {
|
|
@@ -3914,6 +3936,10 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3914
3936
|
default: boolean;
|
|
3915
3937
|
};
|
|
3916
3938
|
forceClearable: BooleanConstructor;
|
|
3939
|
+
wordSplitFilter: {
|
|
3940
|
+
type: BooleanConstructor;
|
|
3941
|
+
default: boolean;
|
|
3942
|
+
};
|
|
3917
3943
|
}>> & {
|
|
3918
3944
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
3919
3945
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
@@ -4078,6 +4104,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4078
4104
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
4079
4105
|
outBordered: boolean;
|
|
4080
4106
|
forceClearable: boolean;
|
|
4107
|
+
wordSplitFilter: boolean;
|
|
4081
4108
|
}>) => Record<string, import("@formily/json-schema").Stringify<{
|
|
4082
4109
|
[key: symbol]: any;
|
|
4083
4110
|
[key: `x-${string}`]: any;
|
|
@@ -4419,6 +4446,10 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4419
4446
|
default: boolean;
|
|
4420
4447
|
};
|
|
4421
4448
|
forceClearable: BooleanConstructor;
|
|
4449
|
+
wordSplitFilter: {
|
|
4450
|
+
type: BooleanConstructor;
|
|
4451
|
+
default: boolean;
|
|
4452
|
+
};
|
|
4422
4453
|
}>> & {
|
|
4423
4454
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
4424
4455
|
onScroll?: ((...args: any[]) => any) | undefined;
|
|
@@ -4438,6 +4469,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4438
4469
|
uniqueCacheData: boolean;
|
|
4439
4470
|
outBordered: boolean;
|
|
4440
4471
|
forceClearable: boolean;
|
|
4472
|
+
wordSplitFilter: boolean;
|
|
4441
4473
|
operationalFormInit: boolean;
|
|
4442
4474
|
}>;
|
|
4443
4475
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
@@ -4620,6 +4652,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4620
4652
|
operationalForm: import("../../shared/types").LowCodeTypes.operationalConfig[];
|
|
4621
4653
|
outBordered: boolean;
|
|
4622
4654
|
forceClearable: boolean;
|
|
4655
|
+
wordSplitFilter: boolean;
|
|
4623
4656
|
}>>>;
|
|
4624
4657
|
};
|
|
4625
4658
|
}>> & {
|