cnhis-design-vue 3.2.1-beta.7 → 3.2.1-release.0
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/button-print/index.d.ts +0 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +0 -1
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +3 -15
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/calendar/index.d.ts +11 -1
- package/es/components/calendar/src/Calendar.vue.d.ts +11 -1
- 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/field-set/index.d.ts +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -2
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -2
- package/es/components/field-set/src/Index.vue.d.ts +1 -1
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -2
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/types.d.ts +7 -11
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.d.ts +4 -7
- package/es/components/iho-table/src/plugins/verticalTablePlugin/utils.js +1 -1
- package/es/components/iho-table/src/utils/index.d.ts +0 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- 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/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/components/table-export-field/style/index.css +1 -1
- 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/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -3
- package/es/components/field-set/src/TableStyle.vue.d.ts +0 -71
- package/es/components/field-set/src/TableStyle.vue.js +0 -1
- package/es/components/field-set/src/TableStyle.vue2.js +0 -1
- package/es/components/table-export-field/style/table-export-field-iconfont.ttf +0 -0
- package/es/shared/assets/img/table_style_1.png.js +0 -1
- package/es/shared/assets/img/table_style_2.png.js +0 -1
- package/es/shared/assets/img/table_style_3.png.js +0 -1
- package/es/shared/assets/img/table_style_4.png.js +0 -1
|
@@ -469,7 +469,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
469
469
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
470
470
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
471
471
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
472
|
-
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
473
472
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
|
474
473
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
475
474
|
element: {
|
|
@@ -575,9 +574,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
575
574
|
requiredDisable: boolean;
|
|
576
575
|
hide: boolean;
|
|
577
576
|
}>;
|
|
578
|
-
isHighlightRow: boolean;
|
|
579
577
|
idx: number;
|
|
580
578
|
isHighlight: boolean;
|
|
579
|
+
isHighlightRow: boolean;
|
|
581
580
|
}>;
|
|
582
581
|
isArray: {
|
|
583
582
|
(value?: any): value is any[];
|
|
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
59
|
}[]>;
|
|
60
60
|
onSave: () => void;
|
|
61
61
|
setRef: (e: any, id: string) => void;
|
|
62
|
-
getTableFields: (type?: 'field' | 'fieldColor' | 'highlightRow'
|
|
62
|
+
getTableFields: (type?: 'field' | 'fieldColor' | 'highlightRow') => any;
|
|
63
63
|
NTabs: any;
|
|
64
64
|
NTabPane: import("vue").DefineComponent<{
|
|
65
65
|
readonly tab: PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as
|
|
1
|
+
import{defineComponent as e,provide as t,reactive as l,ref as i,computed as o,openBlock as a,createElementBlock as r,normalizeStyle as s,unref as d,createBlock as n,withCtx as f,Fragment as m,renderList as u,resolveDynamicComponent as h,mergeProps as p,createSlots as b,renderSlot as v,h as g}from"vue";import{useThemeVars as y,NTabs as c,NTabPane as F}from"naive-ui";import C from"./FieldSet.vue.js";import w from"./FieldColor.vue.js";import{InjectionFieldList as L,InjectionQueryWordbookData as T}from"./constants/index.js";var _=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function}},emits:["save"],setup(e,{expose:_,emit:$}){const k=e;t(L,k.fieldList),t(T,k.queryWordbookData);const x=l({}),R=i(y().value.primaryColor),j=o((()=>[{name:"field",tab:"字段设置",render:()=>g(C,{rowHeight:52})},{name:"fieldColor",tab:"字段颜色",render:()=>g(w,{isFieldColor:!0,defaultList:k.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>g(w,{isFieldColor:!1,defaultList:k.highlightRowColorList})}].filter((e=>k.showTabNames.includes(e.name)))));function A(){var e,t,l;$("save",{tableFields:null==(e=x.field)?void 0:e.getTableFields(),tableFieldColors:null==(t=x.fieldColor)?void 0:t.getTableFields(),tableHighlightRows:null==(l=x.highlightRow)?void 0:l.getTableFields()})}function S(e,t){x[t]=e}return _({getTableFields:function(e){var t;return null==(t=x[e||"field"])?void 0:t.getTableFields()}}),(e,t)=>(a(),r("div",{class:"c-field-set",style:s({"--row-height":"52px","--primary-color":R.value})},[d(j).length>1?(a(),n(d(c),{key:0,type:"line",naimated:""},{default:f((()=>[(a(!0),r(m,null,u(d(j),(t=>(a(),n(d(F),{key:t.name,name:t.name,tab:t.tab,"display-directive":"show"},{default:f((()=>[(a(),n(h(t.render()),p(e.$attrs,{ref_for:!0,ref:e=>S(e,t.name),onSave:A}),b({_:2},[u(e.$slots,((t,l)=>({name:l,fn:f((()=>[v(e.$slots,l)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(a(),n(h(d(j)[0].render()),p({key:1},e.$attrs,{ref:e=>S(e,d(j)[0].name),onSave:A}),b({_:2},[u(e.$slots,((t,l)=>({name:l,fn:f((()=>[v(e.$slots,l)]))})))]),1040))],4))}});export{_ as default};
|
|
@@ -176,7 +176,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
176
176
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
177
177
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
178
178
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
179
|
-
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
180
179
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
|
181
180
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
182
181
|
element: {
|
|
@@ -282,8 +281,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
282
281
|
requiredDisable: boolean;
|
|
283
282
|
hide: boolean;
|
|
284
283
|
}>;
|
|
285
|
-
isHighlightRow: boolean;
|
|
286
284
|
idx: number;
|
|
287
285
|
isHighlight: boolean;
|
|
286
|
+
isHighlightRow: boolean;
|
|
288
287
|
}>;
|
|
289
288
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as
|
|
1
|
+
import{defineComponent as e,openBlock as l,createElementBlock as t,Fragment as i,renderList as n,normalizeStyle as a,unref as o,createBlock as r,withCtx as d,createVNode as u,createCommentVNode as c,createElementVNode as s,normalizeClass as f,toDisplayString as m,withDirectives as p,vShow as v,resolveDynamicComponent as y,createTextVNode as h}from"vue";import{NTooltip as g,NIcon as b,NCheckbox as k,NSelect as x,NColorPicker as w,NInput as N,NInputNumber as U,NPopconfirm as S}from"naive-ui";import{setStyle as _,setColorInfo as C,isDisable as H}from"../utils/index.js";import{ReorderTwoOutline as E,CreateOutline as O,TrashOutline as P}from"@vicons/ionicons5";import{isFunction as R,range as j}from"lodash-es";import{COLOR_MAP as D}from"../constants/index.js";const M={class:"row"},A=["title"],F=s("span",null,"拖拽调整顺序",-1);var B=e({__name:"Row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1}},emits:["updateChecked","edit"],setup(e,{emit:B}){const T=e,V=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],W=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],q=[{label:"字体",value:"font"},{label:"背景",value:"background"}],G=Object.entries(D).map((([e])=>e));function I(){T.data.splice(T.index,1)}function L(){B("edit",T.element)}function z(e){switch(e.field){case"fixedWay":return V;case"sortDirection":return W;case"sortPriority":return function(){const e=j(1,T.data.length+1).map((e=>({label:e.toString(),value:e}))),l=T.data.filter((e=>!!e.sortPriority&&e.uuid!==T.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!l.includes(e.value)))}();case"colorScope":return q;default:return[]}}function J(e){var l;if(1==T.element.defaultMark||"color"===e.type&&T.isHighlightRow)return!0;if("checkbox"===e.type)return"show"===e.field&&e.fieldShowMaxValue?!T.element[e.field]&&(null==(l=T.data.filter((l=>l[e.field])))?void 0:l.length)===e.fieldShowMaxValue:H(T.element,e.field);if("sortPriority"!==e.field)return!1;const{sortDirection:t}=T.element;return!t||"NONE"===t}function K(e){return["title","result"].includes(e.field)&&T.element.style||{}}return(H,j)=>(l(),t("div",M,[(l(!0),t(i,null,n(e.columns,((n,H)=>{return l(),t(i,{key:H},[n.isShow?(l(),t("span",{key:0,class:"table-cell",title:e.element[n.field],style:a(o(_)(n,H))},["text"===n.type?(l(),t(i,{key:0},[0===H?(l(),r(o(g),{key:0,trigger:"hover"},{trigger:d((()=>[u(o(b),{style:{"margin-right":"5px",top:"2px"},component:o(E)},null,8,["component"])])),default:d((()=>[F])),_:1})):c("v-if",!0),s("span",{class:f([e.isHighlight&&"title"===n.field?"highlight":""]),style:a(K(n))},m("seq"===n.field?e.idx:e.element[n.field]),7)],64)):c("v-if",!0),"checkbox"===n.type?p((l(),r(o(k),{key:1,disabled:J(n),checked:e.element[n.field],"onUpdate:checked":[l=>e.element[n.field]=l,e=>function(e,l){B("updateChecked",{checked:e,column:l})}(e,n)]},null,8,["disabled","checked","onUpdate:checked"])),[[v,(D=e.element,M=n.field,"isShowHeaderFilter"===M?D.isConfiguredHeaderFilter&&"0001"!=T.element.id:"0001"!=T.element.id)]]):c("v-if",!0),"select"===n.type?p((l(),r(o(x),{key:2,clearable:"",disabled:J(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,e=>function(e,l){"sortDirection"===l.field&&"NONE"===e&&(T.element.sortPriority=null),"colorScope"===l.field&&C(T.element)}(e,n)],options:z(n)},null,8,["disabled","value","onUpdate:value","options"])),[[v,"fixedWay"===n.field||"0001"!=e.element.id]]):c("v-if",!0),"color"===n.type?(l(),r(o(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:J(n),value:e.element[n.field],"onUpdate:value":[l=>e.element[n.field]=l,j[0]||(j[0]=l=>o(C)(e.element))],"show-preview":"",modes:["hex"],swatches:o(G)},null,8,["disabled","value","onUpdate:value","swatches"])):c("v-if",!0),"input"===n.type?p((l(),r(o(N),{key:4,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l,clearable:""},null,8,["value","onUpdate:value"])),[[v,"0001"!=e.element.id]]):c("v-if",!0),"inputNumber"===n.type?(l(),r(o(U),{key:5,value:e.element[n.field],"onUpdate:value":l=>e.element[n.field]=l},null,8,["value","onUpdate:value"])):c("v-if",!0),"custom"===n.type&&o(R)(n.contentRender)?(l(),r(y((()=>n.contentRender(n,e.element))),{key:6})):c("v-if",!0),"custom"===n.type&&"opt"===n.field&&1!=e.element.defaultMark?(l(),t(i,{key:7},[u(o(g),{trigger:"hover"},{trigger:d((()=>[u(o(b),{component:o(O),onClick:L},null,8,["component"])])),default:d((()=>[h(" 编辑 ")])),_:1}),u(o(S),{onPositiveClick:I},{trigger:d((()=>[u(o(g),{trigger:"hover"},{trigger:d((()=>[u(o(b),{component:o(P)},null,8,["component"])])),default:d((()=>[h(" 删除 ")])),_:1})])),default:d((()=>[h(" 是否确认删除? ")])),_:1})],64)):c("v-if",!0)],12,A)):c("v-if",!0)],64);var D,M})),128))]))}});export{B as default};
|
|
@@ -30,7 +30,7 @@ export declare type FieldSetColumnItem = {
|
|
|
30
30
|
contentRender?: (column: AnyObject, row: AnyObject) => VNode | String;
|
|
31
31
|
[key: string]: any;
|
|
32
32
|
};
|
|
33
|
-
export declare type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow'
|
|
33
|
+
export declare type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow';
|
|
34
34
|
export declare type ColorSetItem = {
|
|
35
35
|
name: string;
|
|
36
36
|
columnName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set .main-wrapper__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .main-wrapper .item{background:#fff}.c-field-set .main-wrapper .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .main-wrapper .item:focus{background-color:#f2f2f2}.c-field-set .main-wrapper .item.disabled{cursor:not-allowed}.c-field-set .main-wrapper .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .main-wrapper .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .main-wrapper .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set .main-wrapper .table-cell .c-field-set__color-picker{display:block}.c-field-set .main-wrapper__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set .main-wrapper__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set .main-wrapper__table-body{flex:1;overflow-y:auto}.c-field-set .main-wrapper__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-
|
|
1
|
+
.c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{display:flex;flex-flow:column nowrap;height:100%;width:100%}.c-field-set .main-wrapper__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .main-wrapper .item{background:#fff}.c-field-set .main-wrapper .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .main-wrapper .item:focus{background-color:#f2f2f2}.c-field-set .main-wrapper .item.disabled{cursor:not-allowed}.c-field-set .main-wrapper .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:5px 0}.c-field-set .main-wrapper .table-cell{box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .main-wrapper .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set .main-wrapper .table-cell .c-field-set__color-picker{display:block}.c-field-set .main-wrapper__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;height:52px}.c-field-set .main-wrapper__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set .main-wrapper__table-body{flex:1;overflow-y:auto}.c-field-set .main-wrapper__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-set__color-block{display:inline-block;margin-left:20px;position:relative}.c-field-set__color-block:before{background-color:var(--color);border-radius:2px;content:"";height:14px;left:-20px;position:absolute;top:3px;width:14px}.c-field-set__space{width:100%}.c-field-set__space>div:first-child{width:80%}.c-field-set__space .filter-btn{color:var(--c-primary-color);cursor:pointer}.c-field-set__condition .opt-btn{cursor:pointer;display:inline-flex}.c-field-set__condition .condition-wrapper__item{align-items:center;display:flex;margin-top:10px}.c-field-set__condition .condition-wrapper__item .item-index{margin-right:10px}.c-field-set__condition .condition-wrapper__item>.n-date-picker,.c-field-set__condition .condition-wrapper__item>.n-input,.c-field-set__condition .condition-wrapper__item>.n-input-number,.c-field-set__condition .condition-wrapper__item>.n-select{margin-right:10px;width:20%}.c-field-set__condition .sql-expression-wrapper{margin-top:10px}
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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{isObject as e,isFunction as t,cloneDeep as i}from"lodash-es";import{toRaw as
|
|
1
|
+
import{isObject as e,isFunction as t,cloneDeep as i}from"lodash-es";import{toRaw as o,h as l}from"vue";import{HIGHEST_PRIORITY as s,IHO_TABLE_FIXED_STATUS as n,WIDGET_TYPE as d}from"../constants/index.js";import{defineTablePlugin as r}from"../hooks/useTablePlugin.js";import{getDefaultValue as a}from"./rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";import{IhoTableStatusHelper as f,IhoTableUtils as c}from"../utils/index.js";function m(){const m="lowCodeFieldAdaptorPlugin";return r({name:m,apply(r){r.fieldHooks.field.tap({name:m,stage:s},((s,r,m)=>{const p=s,u={className:p.bold?"iho-table__boldCell":"",field:p.columnName,showOverflow:"ellipsis",visible:f.notNegative(p.isShow),minWidth:p.colWidth,sortable:f.isPositive(p.isSort),fixed:n[p.isFixed],...p,title:p.alias||p.title};return function(e,i){const o={default:i.slotFn,header:i.headerSlotFn,edit:i.editSlotFn,footer:i.footerSlotFn,...i.slots};if(t(i.checkEditStatus)){const{default:e}=o;t(e)&&(o.default=t=>i.checkEditStatus(t)?e(t):[l("span",null,a(t.row,t.column.editRender.props))])}e.slots=o}(u,p),function(l,s,n){var r,a;const m=i(o(s));m.componentProps={size:"mini"===n.size?"small":n.size,...m.componentProps},n.forceClearable&&(m.componentProps.clearable=!0);l.editRender={name:c.getCellType(s),...l.editRender,props:m},l.editRender.enabled=!Reflect.get(d,l.editRender.name),!l.editRender.enabled&&t(null==(r=l.slots)?void 0:r.default)&&(l.editRender.enabled=t(null==(a=l.slots)?void 0:a.edit));if(!e(s.settingObj))return;Reflect.has(s.settingObj,"isHide")&&(l.visible=l.visible&&f.notPositive(s.settingObj.isHide))}(u,p,m),u})),r.fieldHooks.field.tap({name:m+"After",stage:1e3},(t=>(e(t.slots)&&Object.entries(t.slots).forEach((([e,i])=>{null==i&&Reflect.deleteProperty(t.slots,e)})),t)))}})}export{m as lowCodeFieldAdaptorPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{flow as e,method as t,pick as r,isArray as n,mapValues as i}from"lodash-es";import{onBeforeUnmount as o,unref as s}from"vue";import"../../../index.js";import{LOWEST_PRIORITY as l,WIDGET_TYPE as d}from"../../constants/index.js";import{VERTICAL_CELL_TYPE as a}from"./constants.js";import{renderHeader as u}from"./renderer.js";import{useUUIDMap as c}from"../../utils/index.js";import{isVerticalTable as f,isVerticalHeader as m,getSpanInfo as p,createVerticalFieldList as g,getFieldListDepth as h,bindHeaderInfoAndFlatten as v,isVerticalBody as b,getHeaderDepthByField as w}from"./utils.js";import{defineTablePlugin as D}from"../../hooks/useTablePlugin.js";const F=["RADIO","SWITCH"];function x(){const x="verticalTablePlugin";return D({name:x,vxe(n){function o(e,t){const{row:o,column:s}=t,{originalField:l={}}=o;if(m(s))return u(o,s);const{editRender:a={}}=l,c=a.name||d.DEFAULT,f=n.renderer.get(c);return f?i(f,(e=>e.bind(f,a,{...t,column:{...l,...r(s,["field"])}}))):{}}n.renderer.add(a,{renderCell:e(o,t(["renderCell"])),renderEdit:e(o,t(["renderEdit"]))})},apply(e){const{getItemFromUUID:t,removeItemFromUUID:i}=c((()=>({})),!1);e.configHooks.config.tap({name:x,stage:l},(e=>{if(!e.uuid||!f(e))return e;const{uuid:n}=e;return Reflect.set(window,"__state",t(n)),{uuid:n,showHeader:!1,...r(e,["border","height","verticalConfig","showSeq","size","rowGroupSetting","keyboardConfig"]),cellClassName({column:e}){const t=m(e);return{"vxe-header--column":t,"vxe-table--header":t}},cellStyle({column:e,row:t}){if(p(t,e).colspan>1)return{textAlign:"center"}},spanMethod:({row:e,column:t})=>p(e,t),editConfig:{...e.editConfig,beforeEditMethod({row:e,column:t}){const{originalField:r={}}=e;if(m(t))return!1;const{editRender:{name:n=d.DEFAULT}={}}=r;return!Object.values(d).concat(F).includes(n)}}}})),e.fieldHooks.fieldList.tap({name:x,stage:l},((e,r,{globProps:i})=>{const{uuid:o}=r;if(!o||!f(r))return e;const s=t(o);return s?(s.originalFieldList=e,n(i.tableData)?s.verticalFieldList=g(i.tableData,s.headerDepth=h(e)):[]):e})),e.dataHooks.dataList.tap({name:x,stage:l},((e,r)=>{const{uuid:n}=r;if(!n||!f(r))return e;const i=t(n);if(!i)return e;const{originalFieldList:o=[],headerDepth:s=0}=i,l=v(o,s);return i.verticalData=l.map((t=>new Proxy({},{get(r,n){var i;if("originalField"===n)return t;if(m({field:n}))return t[n];if(b({field:n})){const r=w({field:n});return"seq"===t.type?r+1:null==(i=e[r])?void 0:i[t.field]}return r[n]},set(r,n,i){if(!m({field:n})){const r=w({field:n});r>=0&&e[r]&&(e[r][t.field]=i)}return!0}})))})),e.setupHooks.setup.tap(x,(e=>{o((()=>{const{uuid:t}=s(e)||{};t&&i(t)}))}))}})}export{x as verticalTablePlugin};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { AnyObject } from '../../../../../shared/types';
|
|
2
|
-
import {
|
|
3
|
-
export declare type IhoTableVerticalState =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
headerDepth: number;
|
|
10
|
-
currentRow: AnyObject | null;
|
|
11
|
-
hoveringRow: AnyObject | null;
|
|
12
|
-
}>;
|
|
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
|
+
};
|
|
@@ -3,16 +3,13 @@ import { VxeTableDefines } from 'vxe-table';
|
|
|
3
3
|
import { IhoTableConfig, IhoTableFieldItem } from '../../../../../components/iho-table';
|
|
4
4
|
export declare function isVerticalTable(tableConfig: IhoTableConfig): boolean;
|
|
5
5
|
export declare function getFieldListDepth(fieldList: IhoTableFieldItem[]): number;
|
|
6
|
-
export declare function isVerticalHeader(field:
|
|
7
|
-
export declare function isVerticalBody(field:
|
|
8
|
-
export declare function getHeaderDepthByField(field:
|
|
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
9
|
export declare function bindHeaderInfoAndFlatten(fieldList: IhoTableFieldItem[], depth: number): IhoTableFieldItem[];
|
|
10
|
+
export declare function pickHeaderInfo(fieldItem: IhoTableFieldItem): Pick<IhoTableFieldItem, string>;
|
|
10
11
|
export declare function getSpanInfo(row: AnyObject, column: VxeTableDefines.ColumnInfo): {
|
|
11
12
|
rowspan: any;
|
|
12
13
|
colspan: any;
|
|
13
14
|
};
|
|
14
15
|
export declare function createVerticalFieldList(tableData: AnyObject[], headerDepth: number): IhoTableFieldItem[];
|
|
15
|
-
export declare function getVerticalInfoFromEvent(event: MouseEvent): {
|
|
16
|
-
type: string;
|
|
17
|
-
sequence: number;
|
|
18
|
-
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{traverse as
|
|
1
|
+
import{traverse as e}from"../../../../../shared/utils/index.js";import{isString as n,pick as r,range as t}from"lodash-es";import{VERTICAL_CELL_TYPE as i}from"./constants.js";function o(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 d({field:e}){return!!n(e)&&(null==e?void 0:e.startsWith("body_"))}function c({field:e}){var r;return n(e)?+(null!=(r=e.split("_")[1])?r:0):0}function f(n,r){const i=[];return e(n,((e,n,a)=>{e.parent=a,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`]=o(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 o(n){if(!n.children)return 1;let r=0;return e(n.children,(e=>{e.children||r++})),r}}function s(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:i,props:{},enable:!0}})))]}export{f as bindHeaderInfoAndFlatten,h as createVerticalFieldList,a as getFieldListDepth,c as getHeaderDepthByField,u as getSpanInfo,d as isVerticalBody,l as isVerticalHeader,o as isVerticalTable,s as pickHeaderInfo};
|
|
@@ -37,7 +37,6 @@ export declare const IhoTableRenderHelper: Readonly<{
|
|
|
37
37
|
isEditableColumn(config: IhoTableConfig, column: IhoTableFieldItem): boolean | undefined;
|
|
38
38
|
hasFilter(lowCodeField: LowCodeTableFieldItem): boolean;
|
|
39
39
|
hasDateFiler(lowCodeField: LowCodeTableFieldItem): boolean | undefined;
|
|
40
|
-
hasTitlePrefix(lowCodeField: LowCodeTableFieldItem): unknown;
|
|
41
40
|
}>;
|
|
42
41
|
export declare const IhoTableStatusHelper: Readonly<{
|
|
43
42
|
isPositive(value: string | number | undefined | null): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i}from"../../../../shared/utils/index.js";import{promiseTimeout as l}from"@vueuse/shared";import{parse as u,isValid as a,compareDesc as c}from"date-fns";import{isNumber as d,isFunction as s,isString as f,isObject as p,isArray as m}from"lodash-es";import{InjectionIhoTableConfig as v,InjectionIhoTableEmits as
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as o}from"vue";import{jsonParse as i}from"../../../../shared/utils/index.js";import{promiseTimeout as l}from"@vueuse/shared";import{parse as u,isValid as a,compareDesc as c}from"date-fns";import{isNumber as d,isFunction as s,isString as f,isObject as p,isArray as m}from"lodash-es";import{InjectionIhoTableConfig as v,InjectionIhoTableEmits as I,IHO_TABLE_STRING_STATUS as g,IHO_TABLE_NUMBER_STATUS as h,IHO_TABLE_TREE_TYPE as E,EDITABLE_WIDGET_TYPE as w,InjectionIhoTableUUID as T}from"../constants/index.js";import{getSeparateInfo as R}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function C(e){return console.warn(`[IhoTable]: ${e}`)}const S=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function F(){var e,t,r;const o=n(v);return o||C("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==o?void 0:o.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function D(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function P(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function b(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function A(e,n,r,o,i=2){const u=function(){var i;const l=null==(i=t(o))?void 0:i.getColumnByField(e.field);if(!l)return;const u=$(l);return u?s(u.separateWidth)?u.separateWidth({column:l,row:n,rowIndex:r,$table:t(o)}):d(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}();return d(u)&&u>0?u:i<=0?function(){const n=+e.colWidth;return d(n)?n:64}():(await l(0),A(e,n,r,o,i-1))}function O(e){const o=n(I);function i(){var n;const r=t(e);return{$table:r.$table,value:r.row[r.column.field],row:r.row,column:{...r.column,...null==(n=r.column.editRender)?void 0:n.props},index:r.rowIndex>-1?r.rowIndex:r.$rowIndex}}function l(e={}){o("formChange",{...i(),...r(e)})}function u(e={}){o("formClick",{...i(),...r(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function $(e){var n;return null==(n=e.editRender)?void 0:n.props}const x=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:t,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(t[r.field]);const i=n(T),l=R(i,t);if(!l)return c(t[r.field]);const{originalData:u=t,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:j(r,e),class:"iho-table__colorAndIcon"},[e])]}}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...O(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(U(e))return!0;let n=e.fieldSetting;return f(n)&&(n=i(n||"")),p(n)&&((t=n).notParticipatingSearch!==g.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r},hasDateFiler(e){var n;return null==(n=null==e?void 0:e.filterSetting)?void 0:n.daterange}}),N=Object.freeze({isPositive:e=>e===h.POSITIVE||e===g.POSITIVE,isNegative:e=>e===h.NEGATIVE||e===g.NEGATIVE,notPositive:e=>e!==h.POSITIVE&&e!==g.POSITIVE,notNegative:e=>e!==h.NEGATIVE&&e!==g.NEGATIVE});function V(e){return[E.TRANSFORM_WITH_SPAN_METHOD,E.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function W(e){return f(e)&&!!e.match(/^###\{[^{}]+}$/)}function _(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function y(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!f(t))return e[n.field];const{mergedFeildExpression:r}=i(t);return r&&f(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;W(r)&&(r=_(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const H=["SEARCH","SELECT","RADIO","CHECKBOX"];function U(e){return e.notParticipatingSearch===h.NEGATIVE&&H.includes(S.getCellType(e))&&m(e.options)&&e.options.length}function j(e,n=""){return"tooltip"!==e.showOverflow&&f(n)?n:""}function M(e,n){var r,o,i;n=t(n)||"";const l=null!=(o=null==(r=e.editRender)?void 0:r.props)?o:{},c=u(n,(null==(i=null==l?void 0:l.componentProps)?void 0:i.valueFormat)||"HH:mm",new Date);return!a(c)}function G(e,n,r){var o,i;const l=null!=(i=null==(o=e.editRender)?void 0:o.props)?i:{};return r=t(r)||"",!a(new Date(r))||f(l.connectField)&&n[l.connectField]&&(l.isStartDate&&c(new Date(r),new Date(n[l.connectField]))<0||l.isEndDate&&c(new Date(r),new Date(n[l.connectField]))>0)}function L(e){var n,t;return(!0===e.variableHeight||"1"===e.variableHeight)&&(null!=(t=null==(n=e.editRender)?void 0:n.name)?t:S.getCellType(e))!==w.SEPARATE}function k(e){const n=e.internalData.tableFullColumn;return!!m(n)&&n.some((e=>{var n,t;return L(null!=(t=null==(n=e.editRender)?void 0:n.props)?t:{})}))}export{x as IhoTableRenderHelper,N as IhoTableStatusHelper,S as IhoTableUtils,C as IhoTableWarn,D as eventListener2EventName,P as eventName2EventListener,A as getColumnRenderWidth,$ as getLowCodeFieldFromField,F as getRowHeight,j as getTitle,U as isCompatibleColumn,G as isInvalidDate,M as isInvalidTime,W as isRichContent,V as isTransformTreeType,L as isVariableHeightColumn,k as isVariableHeightTable,y as parseMergeField,_ as parseRichContent,O as useIhoTableFormEvent,b as useUUIDMap};
|