cnhis-design-vue 3.1.44-beta.0 → 3.1.44-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/form-config/index.d.ts +5 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
- package/es/components/form-render/src/components/renderer/combination.d.ts +10 -1
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -0
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +39 -1
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.d.ts +41 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +80 -2
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -184,6 +184,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
184
184
|
requestCache?: boolean | undefined;
|
|
185
185
|
maxGroupNum?: number | undefined;
|
|
186
186
|
jsonCombination?: boolean | undefined;
|
|
187
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
|
187
188
|
children?: any[] | undefined;
|
|
188
189
|
properties?: any[] | undefined;
|
|
189
190
|
componentProps?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1895,6 +1896,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1895
1896
|
requestCache?: boolean | undefined;
|
|
1896
1897
|
maxGroupNum?: number | undefined;
|
|
1897
1898
|
jsonCombination?: boolean | undefined;
|
|
1899
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
|
1898
1900
|
children?: any[] | undefined;
|
|
1899
1901
|
properties?: any[] | undefined;
|
|
1900
1902
|
componentProps?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -4551,6 +4553,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4551
4553
|
requestCache?: boolean | undefined;
|
|
4552
4554
|
maxGroupNum?: number | undefined;
|
|
4553
4555
|
jsonCombination?: boolean | undefined;
|
|
4556
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
|
4554
4557
|
children?: any[] | undefined;
|
|
4555
4558
|
properties?: any[] | undefined;
|
|
4556
4559
|
componentProps?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -6274,6 +6277,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6274
6277
|
requestCache?: boolean | undefined;
|
|
6275
6278
|
maxGroupNum?: number | undefined;
|
|
6276
6279
|
jsonCombination?: boolean | undefined;
|
|
6280
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
|
6277
6281
|
children?: any[] | undefined;
|
|
6278
6282
|
properties?: any[] | undefined;
|
|
6279
6283
|
componentProps?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -7969,6 +7973,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7969
7973
|
requestCache?: boolean | undefined;
|
|
7970
7974
|
maxGroupNum?: number | undefined;
|
|
7971
7975
|
jsonCombination?: boolean | undefined;
|
|
7976
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
|
7972
7977
|
children?: any[] | undefined;
|
|
7973
7978
|
properties?: any[] | undefined;
|
|
7974
7979
|
componentProps?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -186,6 +186,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
186
186
|
requestCache?: boolean | undefined;
|
|
187
187
|
maxGroupNum?: number | undefined;
|
|
188
188
|
jsonCombination?: boolean | undefined;
|
|
189
|
+
combinationItemDeletable?: boolean | import("../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
189
190
|
children?: any[] | undefined;
|
|
190
191
|
properties?: any[] | undefined;
|
|
191
192
|
componentProps?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1897,6 +1898,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1897
1898
|
requestCache?: boolean | undefined;
|
|
1898
1899
|
maxGroupNum?: number | undefined;
|
|
1899
1900
|
jsonCombination?: boolean | undefined;
|
|
1901
|
+
combinationItemDeletable?: boolean | import("../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
1900
1902
|
children?: any[] | undefined;
|
|
1901
1903
|
properties?: any[] | undefined;
|
|
1902
1904
|
componentProps?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -4553,6 +4555,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4553
4555
|
requestCache?: boolean | undefined;
|
|
4554
4556
|
maxGroupNum?: number | undefined;
|
|
4555
4557
|
jsonCombination?: boolean | undefined;
|
|
4558
|
+
combinationItemDeletable?: boolean | import("../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
4556
4559
|
children?: any[] | undefined;
|
|
4557
4560
|
properties?: any[] | undefined;
|
|
4558
4561
|
componentProps?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -6276,6 +6279,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6276
6279
|
requestCache?: boolean | undefined;
|
|
6277
6280
|
maxGroupNum?: number | undefined;
|
|
6278
6281
|
jsonCombination?: boolean | undefined;
|
|
6282
|
+
combinationItemDeletable?: boolean | import("../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
6279
6283
|
children?: any[] | undefined;
|
|
6280
6284
|
properties?: any[] | undefined;
|
|
6281
6285
|
componentProps?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -7971,6 +7975,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7971
7975
|
requestCache?: boolean | undefined;
|
|
7972
7976
|
maxGroupNum?: number | undefined;
|
|
7973
7977
|
jsonCombination?: boolean | undefined;
|
|
7978
|
+
combinationItemDeletable?: boolean | import("../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
7974
7979
|
children?: any[] | undefined;
|
|
7975
7980
|
properties?: any[] | undefined;
|
|
7976
7981
|
componentProps?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -149,6 +149,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
149
149
|
requestCache?: boolean | undefined;
|
|
150
150
|
maxGroupNum?: number | undefined;
|
|
151
151
|
jsonCombination?: boolean | undefined;
|
|
152
|
+
combinationItemDeletable?: boolean | import("../../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
152
153
|
children?: any[] | undefined;
|
|
153
154
|
properties?: any[] | undefined;
|
|
154
155
|
componentProps?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1872,6 +1873,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1872
1873
|
requestCache?: boolean | undefined;
|
|
1873
1874
|
maxGroupNum?: number | undefined;
|
|
1874
1875
|
jsonCombination?: boolean | undefined;
|
|
1876
|
+
combinationItemDeletable?: boolean | import("../../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
1875
1877
|
children?: any[] | undefined;
|
|
1876
1878
|
properties?: any[] | undefined;
|
|
1877
1879
|
componentProps?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -3567,6 +3569,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3567
3569
|
requestCache?: boolean | undefined;
|
|
3568
3570
|
maxGroupNum?: number | undefined;
|
|
3569
3571
|
jsonCombination?: boolean | undefined;
|
|
3572
|
+
combinationItemDeletable?: boolean | import("../../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
3570
3573
|
children?: any[] | undefined;
|
|
3571
3574
|
properties?: any[] | undefined;
|
|
3572
3575
|
componentProps?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { FieldItem } from '../../../../../../es/components/form-render';
|
|
2
|
+
import { CombinationItemDeletableFn, FieldItem } from '../../../../../../es/components/form-render';
|
|
3
3
|
export declare const COMBINATION: import("vue").DefineComponent<{
|
|
4
4
|
title: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -18,6 +18,10 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
18
18
|
type: PropType<() => FieldItem[]>;
|
|
19
19
|
default: () => never[];
|
|
20
20
|
};
|
|
21
|
+
combinationItemDeletable: {
|
|
22
|
+
type: PropType<boolean | CombinationItemDeletableFn>;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
21
25
|
onInput: {};
|
|
22
26
|
onBlur: {};
|
|
23
27
|
onChange: {};
|
|
@@ -39,6 +43,10 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
39
43
|
type: PropType<() => FieldItem[]>;
|
|
40
44
|
default: () => never[];
|
|
41
45
|
};
|
|
46
|
+
combinationItemDeletable: {
|
|
47
|
+
type: PropType<boolean | CombinationItemDeletableFn>;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
42
50
|
onInput: {};
|
|
43
51
|
onBlur: {};
|
|
44
52
|
onChange: {};
|
|
@@ -47,5 +55,6 @@ export declare const COMBINATION: import("vue").DefineComponent<{
|
|
|
47
55
|
}, {
|
|
48
56
|
disabled: boolean;
|
|
49
57
|
title: string;
|
|
58
|
+
combinationItemDeletable: boolean | CombinationItemDeletableFn;
|
|
50
59
|
getProperties: () => FieldItem[];
|
|
51
60
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as o,computed as t,watch as
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,watch as a,inject as i,onBeforeUnmount as r,createVNode as n}from"vue";import{isObjectField as m}from"@formily/core";import{autorun as l}from"@formily/reactive";import{RecursionField as u,connect as s}from"@formily/vue";import{AddCircleOutline as c,RemoveCircle as p}from"@vicons/ionicons5";import{isNumber as d,isArray as f,isFunction as v,range as b}from"lodash-es";import{NButton as y,NIcon as x}from"naive-ui";import"../../../index.js";import{InjectionBusinessCollector as h}from"../../constants/index.js";import"../../utils/index.js";import{useFormField as _}from"../../hooks/useFormField.js";import{useFieldListAdaptor as j}from"../../hooks/useFieldListAdaptor.js";import{createObjSchema as C}from"../../utils/schema.js";const F=s(e({name:"FormCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},disabled:{type:Boolean},getProperties:{type:Function,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e){const{field:s,fieldKey:F}=_(),g=o(1),k=t((()=>d(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));function I(){g.value++}a((()=>e.value),(e=>{f(e)&&(g.value=Math.min(Math.max(e.length,1),k.value))}),{immediate:!0});const N=i(h),{schemaAdaptor:D}=j(N),G=o([]);return r(l((()=>{f(s.value.value)&&(G.value=s.value.value.map(((o,t)=>v(e.combinationItemDeletable)?e.combinationItemDeletable(o||{},t):e.combinationItemDeletable)))}))),()=>n("section",{class:"form-render__combination"},[n("header",{class:"form-render__combinationHeader"},[n("div",{class:"form-render__combinationHeaderText"},[e.title]),n(y,{onClick:I,text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:g.value>=k.value||e.disabled},{icon:()=>n(x,{component:c},null),default:()=>"新增"})]),b(g.value).map(((o,t)=>n("section",{class:"form-render__combinationContent"},[n(u,{schema:C(D(e.getProperties())),name:t},null),n(y,{text:!0,disabled:!G.value[t],type:"error",class:"form-render__combinationClose",onClick:()=>async function(e){if(g.value>1)g.value--,await s.value.remove(e);else{const o=s.value.query(`${F.value}.${e}`).take();if(!o||!m(o))return;await o.reset()}}(t)},{icon:()=>n(x,{component:p},null)})])))])}}));export{F as COMBINATION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var t;const n={name:e.val_key,type:null!=(t=e.fieldType)?t:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable"};e.reactions&&(n["x-reactions"]=e.reactions),e.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o(e,["reactions"]),span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const r=u(e);return r&&(n["x-validator"]=r),"0"===e.is_null&&(n.required=!0),n},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var t;const n={name:e.val_key,type:null!=(t=e.fieldType)?t:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable"};e.reactions&&(n["x-reactions"]=e.reactions),e.noDecorator||Object.assign(n,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:o(e,["reactions"]),span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const r=u(e);return r&&(n["x-validator"]=r),"0"===e.is_null&&(n.required=!0),n},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,getProperties:()=>e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?C(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),y=e=>{if(e.suffixConfig)return v(e);return(b.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return y(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:C(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function C(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(y(o),s):(n=null,e[i(o)]=r(y(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:C}}export{d as useFieldListAdaptor};
|
|
@@ -88,6 +88,7 @@ export declare type FormWordbook = Partial<{
|
|
|
88
88
|
conObj: AnyObject[];
|
|
89
89
|
conObjFirstLevel: AnyObject[];
|
|
90
90
|
}>;
|
|
91
|
+
export declare type CombinationItemDeletableFn = (itemData: AnyObject, index: number) => boolean;
|
|
91
92
|
export declare type FieldItem = {
|
|
92
93
|
val_key: string;
|
|
93
94
|
html_type: HtmlType;
|
|
@@ -137,6 +138,7 @@ export declare type FieldItem = {
|
|
|
137
138
|
requestCache: boolean;
|
|
138
139
|
maxGroupNum: number;
|
|
139
140
|
jsonCombination: boolean;
|
|
141
|
+
combinationItemDeletable: boolean | CombinationItemDeletableFn;
|
|
140
142
|
children: FieldItem[];
|
|
141
143
|
properties: FieldItem[];
|
|
142
144
|
componentProps: AnyObject;
|
|
@@ -162,6 +162,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
162
162
|
requestCache?: boolean | undefined;
|
|
163
163
|
maxGroupNum?: number | undefined;
|
|
164
164
|
jsonCombination?: boolean | undefined;
|
|
165
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
|
165
166
|
children?: any[] | undefined;
|
|
166
167
|
properties?: any[] | undefined;
|
|
167
168
|
componentProps?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -164,6 +164,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
164
|
requestCache?: boolean | undefined;
|
|
165
165
|
maxGroupNum?: number | undefined;
|
|
166
166
|
jsonCombination?: boolean | undefined;
|
|
167
|
+
combinationItemDeletable?: boolean | import("../../../../es/components/form-render").CombinationItemDeletableFn | undefined;
|
|
167
168
|
children?: any[] | undefined;
|
|
168
169
|
properties?: any[] | undefined;
|
|
169
170
|
componentProps?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -50,7 +50,45 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
50
|
valueCp: import("vue").Ref<any>;
|
|
51
51
|
dateFormat: import("vue").ComputedRef<string>;
|
|
52
52
|
handleChange: (val: any) => void;
|
|
53
|
-
|
|
53
|
+
CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
54
|
+
updateUnchangedValue: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
};
|
|
57
|
+
onConfirm: {
|
|
58
|
+
type: FunctionConstructor;
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
attrs: {
|
|
62
|
+
[x: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
65
|
+
updateUnchangedValue: {
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
};
|
|
68
|
+
onConfirm: {
|
|
69
|
+
type: FunctionConstructor;
|
|
70
|
+
};
|
|
71
|
+
}>> & {}>>;
|
|
72
|
+
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
73
|
+
panelInstRef: import("vue").Ref<null>;
|
|
74
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
75
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
76
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
77
|
+
focus: () => any;
|
|
78
|
+
blur: () => any;
|
|
79
|
+
onUpdateShow: (show: boolean) => void;
|
|
80
|
+
onConfirm: (...args: any[]) => void;
|
|
81
|
+
NDatePicker: any;
|
|
82
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
83
|
+
updateUnchangedValue: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
};
|
|
86
|
+
onConfirm: {
|
|
87
|
+
type: FunctionConstructor;
|
|
88
|
+
};
|
|
89
|
+
}>>, {
|
|
90
|
+
updateUnchangedValue: boolean;
|
|
91
|
+
}>>;
|
|
54
92
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
93
|
type: {
|
|
56
94
|
type: PropType<ITypeDate>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as o}from"vue";import
|
|
1
|
+
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as o}from"vue";import p from"../../../../../date-picker/index.js";import m from"moment";import{isString as d}from"lodash-es";import v from"../../../../../../_virtual/plugin-vue_export-helper.js";var i=v(e({__name:"Date",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:v}){const i=e,n=a(),c=t((()=>{let e="";switch(i.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e}));function f(e){n.value=e;const a=e?m(e).format(c.value):e;v("update:value",a)}return l((()=>i.value),(e=>{e&&d(e)?n.value=m(e).valueOf():n.value=null}),{immediate:!0}),(a,t)=>(r(),u(o(p),{type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:n.value,"onUpdate:value":f},null,8,["type","clearable","valueFormat","placeholder","value"]))}}),[["__file","Date.vue"]]);export{i as default};
|
package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.d.ts
CHANGED
|
@@ -73,8 +73,48 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
initData: () => void;
|
|
74
74
|
handleRadioClick: (value: string) => void;
|
|
75
75
|
handleChange: (val: any, type: 'start' | 'end') => void;
|
|
76
|
-
|
|
76
|
+
isStartDateDisabled: (ts: number) => boolean;
|
|
77
|
+
isEndDateDisabled: (ts: number) => boolean;
|
|
77
78
|
NButton: any;
|
|
79
|
+
CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
80
|
+
updateUnchangedValue: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
};
|
|
83
|
+
onConfirm: {
|
|
84
|
+
type: FunctionConstructor;
|
|
85
|
+
};
|
|
86
|
+
}, {
|
|
87
|
+
attrs: {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
};
|
|
90
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
91
|
+
updateUnchangedValue: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
};
|
|
94
|
+
onConfirm: {
|
|
95
|
+
type: FunctionConstructor;
|
|
96
|
+
};
|
|
97
|
+
}>> & {}>>;
|
|
98
|
+
datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
|
|
99
|
+
panelInstRef: import("vue").Ref<null>;
|
|
100
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
101
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
102
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
103
|
+
focus: () => any;
|
|
104
|
+
blur: () => any;
|
|
105
|
+
onUpdateShow: (show: boolean) => void;
|
|
106
|
+
onConfirm: (...args: any[]) => void;
|
|
107
|
+
NDatePicker: any;
|
|
108
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
109
|
+
updateUnchangedValue: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
};
|
|
112
|
+
onConfirm: {
|
|
113
|
+
type: FunctionConstructor;
|
|
114
|
+
};
|
|
115
|
+
}>>, {
|
|
116
|
+
updateUnchangedValue: boolean;
|
|
117
|
+
}>>;
|
|
78
118
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
79
119
|
type: {
|
|
80
120
|
type: PropType<ITypeDate>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as
|
|
1
|
+
import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as i,renderList as v,normalizeClass as d,toDisplayString as o,createCommentVNode as n,createVNode as s,unref as c,withCtx as p,createTextVNode as m,createElementVNode as f}from"vue";import{NButton as y}from"naive-ui";import h from"../../../../../date-picker/index.js";import b from"moment";import{isString as g}from"lodash-es";import{getAllDateRangeInfo as k}from"../helpers/presetValToTimestamp.js";import Y from"../../../../../../_virtual/plugin-vue_export-helper.js";const F={class:"render-widget-date-range"},_={key:0,class:"radio-date-group"},D=["onClick"],M={key:1,class:"date-detail-range"},x=f("span",{class:"divider"},null,-1);var S=Y(e({__name:"DateRange",props:{type:{type:String,default:"date"},filterExplicit:{type:Number,default:1},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const Y=e,S=a([]),w=a(!0),P=a(""),j=a(),C=a(),E=l((()=>{let e="";switch(Y.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),H=l((()=>{let e="";switch(Y.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e}));function O(e,a){switch(a){case"start":j.value=e;break;case"end":C.value=e}const l=j.value?b(j.value).format(E.value):null,t=C.value?b(C.value).format(E.value):null;f("update:value",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}function R(e){return!!C.value&&e>C.value}function T(e){return!!j.value&&e<j.value}return t((()=>Y.value),(e=>{if(e&&g(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(j.value=b(a.trim()).valueOf()),void(l.trim()&&(C.value=b(l.trim()).valueOf()))}j.value=C.value=null,P.value=""}),{immediate:!0}),function(){const e=k(E.value);S.value=e}(),(a,l)=>(u(),r("div",F,[0===e.filterExplicit?(u(),r(i,{key:0},[w.value?n("v-if",!0):(u(),r("div",_,[(u(!0),r(i,null,v(S.value,(e=>(u(),r("span",{key:e.value,class:d(["radio-date-item",P.value===e.value?"radio-date-item-active":""]),onClick:a=>{return l=e.value,P.value===l?P.value="":P.value=l,void(P.value&&f("update:value",P.value));var l}},o(e.label),11,D)))),128))])),s(c(y),{secondary:"",class:d(w.value?"select-date-right":"select-date-left"),onClick:l[0]||(l[0]=e=>w.value=!w.value)},{default:p((()=>[m(o(c(H)),1)])),_:1},8,["class"])],64)):n("v-if",!0),w.value?(u(),r("div",M,[s(c(h),{type:e.type,"default-time":"00:00:00",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:j.value,"is-date-disabled":R,"onUpdate:value":l[1]||(l[1]=e=>O(e,"start"))},null,8,["type","clearable","valueFormat","placeholder","value"]),x,s(c(h),{type:e.type,"default-time":"23:59:59",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:C.value,"is-date-disabled":T,"onUpdate:value":l[2]||(l[2]=e=>O(e,"end"))},null,8,["type","clearable","valueFormat","placeholder","value"])])):n("v-if",!0)]))}}),[["__file","DateRange.vue"]]);export{S as default};
|
package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,watch as
|
|
1
|
+
import{defineComponent as e,ref as l,watch as t,openBlock as u,createBlock as r,unref as a,withCtx as i,createVNode as n,createElementVNode as p}from"vue";import{NInputGroup as o,NInputNumber as d}from"naive-ui";import{isString as m}from"lodash-es";import s from"../../../../../../_virtual/plugin-vue_export-helper.js";const v=p("span",{class:"divider"}," ~ ",-1);var c=s(e({__name:"InputNumberGroup",props:{startPlaceholder:{type:String,default:"请输入"},endPlaceholder:{type:String,default:"请输入"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:p}){const s=e,c=l(),h=l();function f(e,l){var t,u;let r="";switch(l){case"startNumber":r=`${null!=e?e:""} ~ ${null!=(t=h.value)?t:""}`;break;case"endNumber":r=`${null!=(u=c.value)?u:""} ~ ${null!=e?e:""}`}const a=r.split(" ~ ").some((e=>e.trim()));p("update:value",a?r:"")}return t((()=>s.value),(e=>{if(c.value=h.value=null,e&&m(e)&&e.includes("~")){const[l,t]=e.split("~");return l.trim()&&(c.value=Number(l.trim())),void(t.trim()&&(h.value=Number(t.trim())))}}),{immediate:!0}),(l,t)=>(u(),r(a(o),{class:"render-widget-input-number-group"},{default:i((()=>[n(a(d),{style:{minWidth:"88px"},placeholder:e.startPlaceholder,value:c.value,"onUpdate:value":t[0]||(t[0]=e=>f(e,"startNumber"))},null,8,["placeholder","value"]),v,n(a(d),{style:{minWidth:"88px"},placeholder:e.endPlaceholder,value:h.value,"onUpdate:value":t[1]||(t[1]=e=>f(e,"endNumber"))},null,8,["placeholder","value"])])),_:1}))}}),[["__file","InputNumberGroup.vue"]]);export{c as default};
|
|
@@ -134,7 +134,45 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
134
134
|
valueCp: import("vue").Ref<any>;
|
|
135
135
|
dateFormat: import("vue").ComputedRef<string>;
|
|
136
136
|
handleChange: (val: any) => void;
|
|
137
|
-
|
|
137
|
+
CDatePicker: import("../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
138
|
+
updateUnchangedValue: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
};
|
|
141
|
+
onConfirm: {
|
|
142
|
+
type: FunctionConstructor;
|
|
143
|
+
};
|
|
144
|
+
}, {
|
|
145
|
+
attrs: {
|
|
146
|
+
[x: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
149
|
+
updateUnchangedValue: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
};
|
|
152
|
+
onConfirm: {
|
|
153
|
+
type: FunctionConstructor;
|
|
154
|
+
};
|
|
155
|
+
}>> & {}>>;
|
|
156
|
+
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
157
|
+
panelInstRef: import("vue").Ref<null>;
|
|
158
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
159
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
160
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
161
|
+
focus: () => any;
|
|
162
|
+
blur: () => any;
|
|
163
|
+
onUpdateShow: (show: boolean) => void;
|
|
164
|
+
onConfirm: (...args: any[]) => void;
|
|
165
|
+
NDatePicker: any;
|
|
166
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
167
|
+
updateUnchangedValue: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
};
|
|
170
|
+
onConfirm: {
|
|
171
|
+
type: FunctionConstructor;
|
|
172
|
+
};
|
|
173
|
+
}>>, {
|
|
174
|
+
updateUnchangedValue: boolean;
|
|
175
|
+
}>>;
|
|
138
176
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
139
177
|
type: {
|
|
140
178
|
type: import("vue").PropType<"date" | "datetime">;
|
|
@@ -251,8 +289,48 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
251
289
|
initData: () => void;
|
|
252
290
|
handleRadioClick: (value: string) => void;
|
|
253
291
|
handleChange: (val: any, type: "end" | "start") => void;
|
|
254
|
-
|
|
292
|
+
isStartDateDisabled: (ts: number) => boolean;
|
|
293
|
+
isEndDateDisabled: (ts: number) => boolean;
|
|
255
294
|
NButton: any;
|
|
295
|
+
CDatePicker: import("../../../..").SFCWithInstall<import("vue").DefineComponent<{
|
|
296
|
+
updateUnchangedValue: {
|
|
297
|
+
type: BooleanConstructor;
|
|
298
|
+
};
|
|
299
|
+
onConfirm: {
|
|
300
|
+
type: FunctionConstructor;
|
|
301
|
+
};
|
|
302
|
+
}, {
|
|
303
|
+
attrs: {
|
|
304
|
+
[x: string]: unknown;
|
|
305
|
+
};
|
|
306
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
307
|
+
updateUnchangedValue: {
|
|
308
|
+
type: BooleanConstructor;
|
|
309
|
+
};
|
|
310
|
+
onConfirm: {
|
|
311
|
+
type: FunctionConstructor;
|
|
312
|
+
};
|
|
313
|
+
}>> & {}>>;
|
|
314
|
+
datePickerRef: import("vue").Ref<import("../../../..").AnyObject | null>;
|
|
315
|
+
panelInstRef: import("vue").Ref<null>;
|
|
316
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
317
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
318
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
319
|
+
focus: () => any;
|
|
320
|
+
blur: () => any;
|
|
321
|
+
onUpdateShow: (show: boolean) => void;
|
|
322
|
+
onConfirm: (...args: any[]) => void;
|
|
323
|
+
NDatePicker: any;
|
|
324
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
325
|
+
updateUnchangedValue: {
|
|
326
|
+
type: BooleanConstructor;
|
|
327
|
+
};
|
|
328
|
+
onConfirm: {
|
|
329
|
+
type: FunctionConstructor;
|
|
330
|
+
};
|
|
331
|
+
}>>, {
|
|
332
|
+
updateUnchangedValue: boolean;
|
|
333
|
+
}>>;
|
|
256
334
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
257
335
|
type: {
|
|
258
336
|
type: import("vue").PropType<"date" | "datetime">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.44-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.44-beta.1",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.44-beta.1",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.44-beta.
|
|
3
|
+
"version": "3.1.44-beta.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "927adec22164092ff81df53c819705f208aa14fd"
|
|
65
65
|
}
|