cnhis-design-vue 3.1.54-beta.7 → 3.1.54-beta.9

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.
@@ -3144,12 +3144,26 @@ export declare const CallbackMaps: Map<string, {
3144
3144
  enable?: boolean | undefined;
3145
3145
  usePreset?: boolean | undefined;
3146
3146
  } | undefined;
3147
+ operationalForm?: {
3148
+ operationFormParam: string[];
3149
+ operationalRule: string;
3150
+ operationalPrecision: string;
3151
+ operationalResult: string;
3152
+ }[] | undefined;
3147
3153
  operationForm?: {
3148
3154
  operationFormParam: string[];
3149
3155
  operationalRule: string;
3150
3156
  operationalPrecision: string;
3151
3157
  operationalResult: string;
3152
3158
  }[] | undefined;
3159
+ dateOperationalForm?: {
3160
+ scene: "DIFF" | "CALC";
3161
+ precision: string;
3162
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
3163
+ diffValField: string;
3164
+ startDateField: string;
3165
+ endDateField: string;
3166
+ }[] | undefined;
3153
3167
  }>;
3154
3168
  updateConfigRefDebounced: () => void;
3155
3169
  updateConfigRef: () => void;
@@ -5587,12 +5601,26 @@ export declare const CallbackMaps: Map<string, {
5587
5601
  enable?: boolean | undefined;
5588
5602
  usePreset?: boolean | undefined;
5589
5603
  } | undefined;
5604
+ operationalForm?: {
5605
+ operationFormParam: string[];
5606
+ operationalRule: string;
5607
+ operationalPrecision: string;
5608
+ operationalResult: string;
5609
+ }[] | undefined;
5590
5610
  operationForm?: {
5591
5611
  operationFormParam: string[];
5592
5612
  operationalRule: string;
5593
5613
  operationalPrecision: string;
5594
5614
  operationalResult: string;
5595
5615
  }[] | undefined;
5616
+ dateOperationalForm?: {
5617
+ scene: "DIFF" | "CALC";
5618
+ precision: string;
5619
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
5620
+ diffValField: string;
5621
+ startDateField: string;
5622
+ endDateField: string;
5623
+ }[] | undefined;
5596
5624
  }>;
5597
5625
  configChanged: boolean;
5598
5626
  fieldChanged: boolean;
@@ -2214,12 +2214,26 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2214
2214
  enable?: boolean | undefined;
2215
2215
  usePreset?: boolean | undefined;
2216
2216
  } | undefined;
2217
+ operationalForm?: {
2218
+ operationFormParam: string[];
2219
+ operationalRule: string;
2220
+ operationalPrecision: string;
2221
+ operationalResult: string;
2222
+ }[] | undefined;
2217
2223
  operationForm?: {
2218
2224
  operationFormParam: string[];
2219
2225
  operationalRule: string;
2220
2226
  operationalPrecision: string;
2221
2227
  operationalResult: string;
2222
2228
  }[] | undefined;
2229
+ dateOperationalForm?: {
2230
+ scene: "DIFF" | "CALC";
2231
+ precision: string;
2232
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
2233
+ diffValField: string;
2234
+ startDateField: string;
2235
+ endDateField: string;
2236
+ }[] | undefined;
2223
2237
  }>;
2224
2238
  updateConfigRefDebounced: () => void;
2225
2239
  updateConfigRef: () => void;
@@ -4657,12 +4671,26 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4657
4671
  enable?: boolean | undefined;
4658
4672
  usePreset?: boolean | undefined;
4659
4673
  } | undefined;
4674
+ operationalForm?: {
4675
+ operationFormParam: string[];
4676
+ operationalRule: string;
4677
+ operationalPrecision: string;
4678
+ operationalResult: string;
4679
+ }[] | undefined;
4660
4680
  operationForm?: {
4661
4681
  operationFormParam: string[];
4662
4682
  operationalRule: string;
4663
4683
  operationalPrecision: string;
4664
4684
  operationalResult: string;
4665
4685
  }[] | undefined;
4686
+ dateOperationalForm?: {
4687
+ scene: "DIFF" | "CALC";
4688
+ precision: string;
4689
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
4690
+ diffValField: string;
4691
+ startDateField: string;
4692
+ endDateField: string;
4693
+ }[] | undefined;
4666
4694
  }>;
4667
4695
  configChanged: boolean;
4668
4696
  fieldChanged: boolean;
@@ -2215,12 +2215,26 @@ declare const _default: import("vue").DefineComponent<{
2215
2215
  enable?: boolean | undefined;
2216
2216
  usePreset?: boolean | undefined;
2217
2217
  } | undefined;
2218
+ operationalForm?: {
2219
+ operationFormParam: string[];
2220
+ operationalRule: string;
2221
+ operationalPrecision: string;
2222
+ operationalResult: string;
2223
+ }[] | undefined;
2218
2224
  operationForm?: {
2219
2225
  operationFormParam: string[];
2220
2226
  operationalRule: string;
2221
2227
  operationalPrecision: string;
2222
2228
  operationalResult: string;
2223
2229
  }[] | undefined;
2230
+ dateOperationalForm?: {
2231
+ scene: "DIFF" | "CALC";
2232
+ precision: string;
2233
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
2234
+ diffValField: string;
2235
+ startDateField: string;
2236
+ endDateField: string;
2237
+ }[] | undefined;
2224
2238
  }>;
2225
2239
  updateConfigRefDebounced: () => void;
2226
2240
  updateConfigRef: () => void;
@@ -4658,12 +4672,26 @@ declare const _default: import("vue").DefineComponent<{
4658
4672
  enable?: boolean | undefined;
4659
4673
  usePreset?: boolean | undefined;
4660
4674
  } | undefined;
4675
+ operationalForm?: {
4676
+ operationFormParam: string[];
4677
+ operationalRule: string;
4678
+ operationalPrecision: string;
4679
+ operationalResult: string;
4680
+ }[] | undefined;
4661
4681
  operationForm?: {
4662
4682
  operationFormParam: string[];
4663
4683
  operationalRule: string;
4664
4684
  operationalPrecision: string;
4665
4685
  operationalResult: string;
4666
4686
  }[] | undefined;
4687
+ dateOperationalForm?: {
4688
+ scene: "DIFF" | "CALC";
4689
+ precision: string;
4690
+ diffValUnit: "DAY" | "MIN" | "HOUR" | "DHM";
4691
+ diffValField: string;
4692
+ startDateField: string;
4693
+ endDateField: string;
4694
+ }[] | undefined;
4667
4695
  }>;
4668
4696
  configChanged: boolean;
4669
4697
  fieldChanged: boolean;
@@ -1 +1 @@
1
- import"../../../../../shared/utils/index.js";import"../../../index.js";import{isFunction as o}from"lodash-es";import{defineTablePlugin as n}from"../../hooks/useTablePlugin.js";import{getOperationalFormHandler as r}from"../../../../../shared/utils/business.js";function e(){const e="operationalFormPlugin";return n({name:e,apply(n){n.configHooks.config.tap(e,(n=>{const e=n.onFormChange;return n.onFormChange=function(t){const{column:i,row:s,$table:m}=t;!function(o,e){return r(n.operationForm,(n=>o[n]),((n,r)=>{e.getColumns().some((o=>o.field===n))&&(o[n]=r)})).operationalFormHandler}(s,m)(i.field),o(e)&&e(t)},n}))}})}export{e as operationalFormPlugin};
1
+ import"../../../../../shared/utils/index.js";import{format as o}from"date-fns";import"../../../index.js";import{isFunction as n,isNumber as t,isDate as e}from"lodash-es";import{EDITABLE_WIDGET_TYPE as r}from"../../constants/index.js";import{getLowCodeFieldFromField as i,IhoTableUtils as s}from"../../utils/index.js";import{defineTablePlugin as a}from"../../hooks/useTablePlugin.js";import{getOperationalFormHandler as m,getDateOperationalFormHandler as l}from"../../../../../shared/utils/business.js";function u(){const u="operationalFormPlugin";return a({name:u,apply(a){a.configHooks.config.tap(u,(a=>{const u=a.onFormChange;return a.onFormChange=function(d){const{column:p,row:f,$table:c}=d;!function(n,u){const{operationalFormHandler:d}=m(a.operationalForm||a.operationForm,(o=>n[o]),((o,t)=>{u.getColumns().some((n=>n.field===o))&&(n[o]=t)})),{dateOperationalFormHandler:p}=l(a.dateOperationalForm,(o=>n[o]),((a,m)=>{const l=u.getColumns().find((o=>o.field===a));if(!l)return;const d=i(l);d&&[r.DATE,r.TIME].includes(s.getCellType(d))&&(m=t(m)||e(m)?o(new Date(m),d.valueFormat||"yyyy-MM-dd HH:mm:ss"):null),n[a]=m}));return function(o){d(o),p(o)}}(f,c)(p.field),n(u)&&u(d)},a}))}})}export{u as operationalFormPlugin};
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
44
44
  emitFormChangeWithParams: (params?: AnyObject) => void;
45
45
  emit: (event: "update:value", ...args: any[]) => void;
46
46
  formRef: import("vue").Ref<any>;
47
- formattedValue: import("vue").WritableComputedRef<string | undefined>;
47
+ formattedValue: import("vue").WritableComputedRef<string | null | undefined>;
48
48
  formatConfig: import("vue").ComputedRef<{
49
49
  valueFormat: string;
50
50
  format: string;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,inject as r,ref as a,computed as i,openBlock as o,createBlock as s,unref as n,mergeProps as u,isRef as l}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as d}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import f from"../../../../../../date-picker/index.js";var w=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:w}){const c=e,D=t(),v=r("$xetable"),{emitFormChangeWithParams:b}=p({...c,$table:v}),y=a(),g=i({get:()=>c.value,set(e){const t=c.value;t!==e&&(w("update:value",e),b({oldValue:t}))}}),$=i((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:T=!1,isEndDate:h=!1}=D,x=D.connectField||"",j=(e,t)=>T&&x?e>t:!(!h||!x)&&e<t,F=e=>{const t=new Date(c.row[x]),r=new Date(e),{h:a,m:i,s:o}=S(t),s=(e,t,r,a)=>!(h&&r>a)&&(!(T&&r<a)&&j(e,t));return{isHourDisabled:t=>{if(!c.row[x])return!1;const i=new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=S(r);return s(t,a,e-60*t*60*1e3-60*o*1e3-1e3*n,i)},isMinuteDisabled:t=>{if(!c.row[x])return!1;const o=new Date(`${c.row[x].split(" ")[0]} ${a}:00:00`).getTime(),{s:n}=S(r);return s(t,i,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!c.row[x])return!1;const r=new Date(`${c.row[x].split(" ")[0]} ${a}:${i}:00`).getTime();return s(t,o,e-1e3*t,r)}}},H={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...$.value,isDateDisabled:M(D.isDateDisabled)||(e=>!!c.row[x]&&j(e,h?new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime():new Date(c.row[x]).getTime()))};function M(e){return d(e)?t=>e(t,c.row):null}function S(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return H.type.includes("time")&&(H.isTimeDisabled=M(D.isTimeDisabled)||F),(e,t)=>(o(),s(n(f),u({ref_key:"formRef",ref:y},n(H),{"formatted-value":n(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>l(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{w as default};
1
+ import{defineComponent as e,useAttrs as t,inject as r,ref as a,computed as i,openBlock as o,createBlock as s,unref as n,mergeProps as l,isRef as u}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as d}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import f from"../../../../../../date-picker/index.js";var w=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:w}){const c=e,D=t(),v=r("$xetable"),{emitFormChangeWithParams:b}=p({...c,$table:v}),y=a(),g=i({get:()=>c.value?c.value:null,set(e){const t=c.value;t!==e&&(w("update:value",e),b({oldValue:t}))}}),$=i((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:T=!1,isEndDate:h=!1}=D,x=D.connectField||"",j=(e,t)=>T&&x?e>t:!(!h||!x)&&e<t,F=e=>{const t=new Date(c.row[x]),r=new Date(e),{h:a,m:i,s:o}=S(t),s=(e,t,r,a)=>!(h&&r>a)&&(!(T&&r<a)&&j(e,t));return{isHourDisabled:t=>{if(!c.row[x])return!1;const i=new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=S(r);return s(t,a,e-60*t*60*1e3-60*o*1e3-1e3*n,i)},isMinuteDisabled:t=>{if(!c.row[x])return!1;const o=new Date(`${c.row[x].split(" ")[0]} ${a}:00:00`).getTime(),{s:n}=S(r);return s(t,i,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!c.row[x])return!1;const r=new Date(`${c.row[x].split(" ")[0]} ${a}:${i}:00`).getTime();return s(t,o,e-1e3*t,r)}}},H={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...$.value,isDateDisabled:M(D.isDateDisabled)||(e=>!!c.row[x]&&j(e,h?new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime():new Date(c.row[x]).getTime()))};function M(e){return d(e)?t=>e(t,c.row):null}function S(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return H.type.includes("time")&&(H.isTimeDisabled=M(D.isTimeDisabled)||F),(e,t)=>(o(),s(n(f),l({ref_key:"formRef",ref:y},n(H),{"formatted-value":n(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{w as default};
@@ -36,7 +36,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
36
36
  usePreset: boolean;
37
37
  [K: string]: any;
38
38
  }>;
39
+ operationalForm: LowCodeTypes.operationalConfig[];
39
40
  operationForm: LowCodeTypes.operationalConfig[];
41
+ dateOperationalForm: LowCodeTypes.dateOperationalConfig[];
40
42
  checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
41
43
  slots: VxeColumnPropTypes.Slots;
42
44
  maxCheckSize: number;
@@ -1 +1 @@
1
- import{reactive as a,computed as t,toRaw as e,unref as n}from"vue";import{ConditionEnums as l,WidgetTypeEnums as o,WidgetOptionEnums as i}from"../../../types/enums.js";import{transformConditions as r,transformRawConditions as u,transformDataToFront as c}from"../../../tool/transformData.js";const s=(s,p,d)=>{const m=a({params:[]}),v=t((()=>m.params.map((({p_name:a,title:t})=>({label:t||a,value:a}))))),y=a=>m.params.find((t=>t.p_name===a)),C=(a,t)=>{const e=s.value[a];e&&(e.condition=t,(a=>{var t,e,n,l;const o=y(a.key);(null==(e=null==(t=o._rawData)?void 0:t.accurateSearch)?void 0:e.switchEnable)&&(a.isAccurateSearch=!0,a.accurateSearchKey=null==(l=null==(n=o._rawData)?void 0:n.accurateSearch)?void 0:l.searchKey)})(e),(a=>{const t=y(a.key);a.value=(null==t?void 0:t.type)!==o.SELECT&&(null==t?void 0:t.type)!==o.SELECTDYNAMIC||(null==t?void 0:t.optionSetting)!==i.MULTIPLE?null:[],a.timeVal=null})(e))};return{State:m,paramOptions:v,addFilterCondition:()=>{s.value.push({key:null,condition:null,value:null,presetVal:null})},delFilterCondition:a=>{s.value.splice(a,1)},updateKey:(a,t)=>{const e=s.value[a];e&&(e.key=t,C(a,l.EQUAL))},updateCondition:C,getParamCfg:y,initFilterConditions:async(a,t)=>{const n=await(async a=>{try{return c(d,p)}catch(a){return[]}})();m.params=n,s.value=r(t,e(m.params))},getRawFilterConditions:()=>u(n(s))}};export{s as useFilterConditions};
1
+ import{reactive as a,computed as t,toRaw as e,unref as n}from"vue";import{ConditionEnums as l,WidgetTypeEnums as o,WidgetOptionEnums as r}from"../../../types/enums.js";import{transformConditions as i,transformRawConditions as u,transformDataToFront as s}from"../../../tool/transformData.js";const c=(c,p,d)=>{const m=a({params:[]}),v=t((()=>m.params.map((({p_name:a,title:t})=>({label:t||a,value:a}))))),y=a=>m.params.find((t=>t.p_name===a)),C=(a,t)=>{const e=c.value[a];e&&(e.condition=t,(a=>{var t,e,n,l;const o=y(a.key);(null==(e=null==(t=o._rawData)?void 0:t.accurateSearch)?void 0:e.switchEnable)&&(a.isAccurateSearch=!0,a.accurateSearchKey=null==(l=null==(n=o._rawData)?void 0:n.accurateSearch)?void 0:l.searchKey)})(e),(a=>{const t=y(a.key);a.value=(null==t?void 0:t.type)!==o.SELECT&&(null==t?void 0:t.type)!==o.SELECTDYNAMIC||(null==t?void 0:t.optionSetting)!==r.MULTIPLE?null:[],a.presetVal=a.timeVal=null})(e))};return{State:m,paramOptions:v,addFilterCondition:()=>{c.value.push({key:null,condition:null,value:null,presetVal:null})},delFilterCondition:a=>{c.value.splice(a,1)},updateKey:(a,t)=>{const e=c.value[a];e&&(e.key=t,C(a,l.EQUAL))},updateCondition:C,getParamCfg:y,initFilterConditions:async(a,t)=>{const n=await(async a=>{try{return s(d,p)}catch(a){return[]}})();m.params=n,c.value=i(t,e(m.params))},getRawFilterConditions:()=>u(n(c))}};export{c as useFilterConditions};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.54-beta.7",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.54-beta.7",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};
1
+ var e="@cnhis-design-vue/shared",i="3.1.54-beta.9",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.54-beta.9",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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.54-beta.7",
3
+ "version": "3.1.54-beta.9",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -63,5 +63,5 @@
63
63
  "iOS 7",
64
64
  "last 3 iOS versions"
65
65
  ],
66
- "gitHead": "06024f878581a1991f3ac2e97cb2ae706b8ec44c"
66
+ "gitHead": "33e4dc35784e38eecb9b8da5679e1bce6358ce88"
67
67
  }