@gct-paas/design 0.0.1-dev.6 → 0.0.1-dev.7
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/dist/index.min.cjs +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +3 -0
- package/es/hooks/useStyle.d.ts +15 -0
- package/es/hooks/useStyle.mjs +135 -0
- package/es/index.d.ts +5 -1
- package/es/index.mjs +22 -3
- package/es/interface/index.d.ts +1 -0
- package/es/interface/index.mjs +3 -0
- package/es/interface/props/index.d.ts +1 -0
- package/es/interface/props/index.mjs +1 -0
- package/es/interface/props/plugin-comp-props.d.ts +15 -0
- package/es/interface/props/plugin-comp-props.mjs +1 -0
- package/es/schema/common-config/autofill-editor-config.d.ts +4 -0
- package/es/schema/common-config/autofill-editor-config.mjs +45 -0
- package/es/schema/common-config/base-button-config.d.ts +45 -0
- package/es/schema/common-config/base-button-config.mjs +85 -0
- package/es/schema/common-config/button-editor-config.d.ts +14 -0
- package/es/schema/common-config/button-editor-config.mjs +142 -0
- package/es/schema/common-config/button-props-func.d.ts +5 -0
- package/es/schema/common-config/button-props-func.mjs +12 -0
- package/es/schema/common-config/column-editor-config.d.ts +3 -0
- package/es/schema/common-config/column-editor-config.mjs +29 -0
- package/es/schema/common-config/common-style.d.ts +3 -0
- package/es/schema/common-config/common-style.mjs +86 -0
- package/es/schema/common-config/display-editor-config.d.ts +3 -0
- package/es/schema/common-config/display-editor-config.mjs +67 -0
- package/es/schema/common-config/formItem-editor-config.d.ts +3 -0
- package/es/schema/common-config/formItem-editor-config.mjs +70 -0
- package/es/schema/common-config/permission-editor-config.d.ts +2 -0
- package/es/schema/common-config/permission-editor-config.mjs +16 -0
- package/es/schema/index.d.ts +9 -0
- package/es/schema/index.mjs +11 -0
- package/es/types/index.d.ts +26 -0
- package/package.json +10 -5
package/dist/index.min.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(){console.log("Hello World!")}exports.run=o;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),t=require("@gct-paas/core"),r=require("lodash-es"),A={position:"",top:"",left:"",right:"",bottom:"",width:"",height:"",backgroundColor:"",marginAll:"",marginTop:"",marginRight:"",marginBottom:"",marginLeft:"",paddingAll:"",paddingTop:"",paddingRight:"",paddingBottom:"",paddingLeft:"",labelFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:t.TextDecoration.NONE,color:""},contentFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:t.TextDecoration.NONE,color:""},tagStyle:{color:"",tagType:t.TagTypeEnum.RADIUS},tagStyleOpen:!1,borderAll:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderLeft:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderRight:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderBottom:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTop:{borderStyle:t.BorderStyle.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTopRightRadius:"0",borderTopLeftRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderAllRadius:"0"},B=["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"];function F(o){return o+"px"}const p={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:o=>o?700:400},italic:{attr:"fontStyle",callback:o=>o?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:o=>o?F(o):""},align:{attr:"textAlign"}},font(o){if(!o)return{};const e={};return Object.assign(e,r.pick(o,p.fontAttrs)),typeof p.mapAttrs=="object"&&Object.keys(p.mapAttrs).forEach(n=>{const{attr:s,callback:a}=p.mapAttrs[n];e[s]=typeof a=="function"?a(o[n]):o[n]}),e}};function O(o){const{style:e={},ignoringStyle:n=[]}=o||{},s=l.computed(()=>_(e)),a=l.computed(()=>{var c,m,b,g,y,f,E,h,T,D,S,x;const u={position:r.isEmpty(e.position)?"":e.position+" !important",top:r.isEmpty(e.top)?"":e.top+"px !important",left:r.isEmpty(e.left)?"":e.left+"px !important",right:r.isEmpty(e.right)?"":e.right+"px !important",bottom:r.isEmpty(e.bottom)?"":e.bottom+"px !important",width:r.isEmpty(e.width)?"":e.width+"px !important",height:r.isEmpty(e.height)?"":e.height+"px !important",backgroundColor:r.isEmpty(e.backgroundColor)?"":e.backgroundColor+" !important",marginTop:r.isEmpty(e.marginTop)?"":e.marginTop+"px !important",marginRight:r.isEmpty(e.marginRight)?"":e.marginRight+"px !important",marginBottom:r.isEmpty(e.marginBottom)?"":e.marginBottom+"px !important",marginLeft:r.isEmpty(e.marginLeft)?"":e.marginLeft+"px !important",paddingTop:r.isEmpty(e.paddingTop)?"":e.paddingTop+"px !important",paddingRight:r.isEmpty(e.paddingRight)?"":e.paddingRight+"px !important",paddingBottom:r.isEmpty(e.paddingBottom)?"":e.paddingBottom+"px !important",paddingLeft:r.isEmpty(e.paddingLeft)?"":e.paddingLeft+"px !important",borderLeft:`${(c=e.borderLeft)==null?void 0:c.borderWidth}px ${(m=e.borderLeft)==null?void 0:m.borderStyle} ${(b=e.borderLeft)==null?void 0:b.borderColor} !important`,borderRight:`${(g=e.borderRight)==null?void 0:g.borderWidth}px ${(y=e.borderRight)==null?void 0:y.borderStyle} ${(f=e.borderRight)==null?void 0:f.borderColor} !important`,borderBottom:`${(E=e.borderBottom)==null?void 0:E.borderWidth}px ${(h=e.borderBottom)==null?void 0:h.borderStyle} ${(T=e.borderBottom)==null?void 0:T.borderColor} !important`,borderTop:`${(D=e.borderTop)==null?void 0:D.borderWidth}px ${(S=e.borderTop)==null?void 0:S.borderStyle} ${(x=e.borderTop)==null?void 0:x.borderColor} !important`,borderTopRightRadius:r.isEmpty(e.borderTopRightRadius)?"":e.borderTopRightRadius+"px !important",borderTopLeftRadius:r.isEmpty(e.borderTopLeftRadius)?"":e.borderTopLeftRadius+"px !important",borderBottomRightRadius:r.isEmpty(e.borderBottomRightRadius)?"":e.borderBottomRightRadius+"px !important",borderBottomLeftRadius:r.isEmpty(e.borderBottomLeftRadius)?"":e.borderBottomLeftRadius+"px !important"};return n.forEach(I=>{u[I]=void 0}),u}),L=l.computed(()=>p.font(e.labelFont)),P=l.computed(()=>p.font(e.contentFont));return{wrapperStyle:a,wStyle:s,labelFont:L,contentFont:P}}function _(o={}){const e={};for(const n in o)e[n]=G(n,o[n]);return e}function G(o,e){return r.isNil(e)||r.isEmpty(e)?"":B.includes(o)?e+" !important":e+"px !important"}const R=[t.FIELD_TYPE.REF,t.FIELD_TYPE.USER,t.FIELD_TYPE.ORG,t.FIELD_TYPE.RDO_REF,t.FIELD_TYPE.ATTACHMENT],M=({groupName:o})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:o,hidden:e=>e.props.bindFieldKey||e.props.fieldReadonly?!0:!R.includes(e.props.fieldType)||e.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:o,hidden:e=>e.props.bindFieldKey||e.props.fieldReadonly?!0:!R.includes(e.props.fieldType)||e.props.enableAutofill===!1||e.props.multiple}];function i(o){return Object.prototype.hasOwnProperty.call(o.props,"model")?!o.props.model:Object.prototype.hasOwnProperty.call(o.props,"refForm")?!o.props.refForm:!1}const d={hidden:!1,componentDependency:{sortDependency:[],configDependency:{[t.Dependency_ENUM.HIDDEN]:{expression:""},[t.Dependency_ENUM.READONLY]:{expression:""},[t.Dependency_ENUM.DISABLED]:{expression:""},[t.Dependency_ENUM.REQUIRED]:{expression:""},[t.Dependency_ENUM.ASSIGNMENT]:{expression:"",strategy:t.ASSIGNMENTSTRATEGY_ENUM.alwaysCover}}}},C=[{component:"dependency-editor",name:"componentDependency",label:"",group:t.PropGroup.COMPONENTDEPENDENCY,hidden:o=>o.materialType===t.MaterialEnum.MaterialEmbedTableField||o.type===t.FormComponents.Form&&o.preLocation?!0:i(o)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:t.PropGroup.FIELD_CONFIG,hidden(o){return!o.isField||!o.props.field||!!o.props.bindFieldKey||!!o.props.fieldReadonly||o.materialType===t.MaterialEnum.cardListFormField||[t.FIELD_TYPE.EXPRESSION_CONDITION,t.FIELD_TYPE.SERIALRULE,t.FIELD_TYPE.LABEL_TEMPLATE].includes(o.props.fieldType)}}],U={disabled:!1,icon:"icon-park:all-application",iconColor:"",title:"${sys.pageDesigner.button}",buttonStyle:t.ButtonStyle.ORDINARY,confirm:!1,confirmText:"",hasIcon:!1,hasText:!0,type:t.ButtonType.PRIMARY,danger:!1,size:t.ButtonSize.DEFAULT,enableCustomColor:!1,backgroundColor:"",fontColor:"",...d},k=[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:t.PropGroup.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(o,e)=>{o.alias=e}},{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:t.PropGroup.BUTTON},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:t.PropGroup.BUTTON,hidden:o=>!o.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.BUTTON,_config:{options:Object.values(t.ButtonSize).map(o=>({value:o,label:"sys.pageDesigner."+o}))}}],W={disabled:!1,buttonTheme:t.ButtonColorTheme.DEFAULT,buttonType:t.ButtonColorType.DEFAULT,icon:"",iconColor:"",buttonStyle:t.ButtonStyle.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""},Y=[{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:t.PropGroup.ButtonStyle,hidden:o=>i(o)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:t.PropGroup.ButtonStyle,hidden:o=>!o.props.hasIcon||i(o),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:t.PropGroup.ButtonStyle,hidden:o=>i(o)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:o=>!o.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:o=>!o.props.enableCustomColor||o.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.ButtonStyle,hidden:o=>!!o,_config:{options:Object.values(t.ButtonSize).map(o=>({value:o,label:"sys.pageDesigner."+o}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:t.PropGroup.ButtonStyle,hidden:o=>i(o),_config:{tooltip:"sys.pageDesigner.buttonConfirm"}},{component:"texteare-editor",name:"confirmText",label:"sys.pageDesigner.regHint",group:t.PropGroup.ButtonStyle,_config:{i18n:!0,placeholder:"sys.pageDesigner.confirmTodo"},hidden:o=>!o.props.confirm||i(o)}],z=[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:t.StyleGroup.LAYOUT,hidden:o=>!!o.props.parentWidgetId||!!o.preLocation},{component:"margin-editor",group:t.StyleGroup.MARGIN,hidden:o=>!!o.props.parentWidgetId||!!o.preLocation,_config:{hiddenMarginOrPadding:"padding"}}],$=[{component:"radio-icon-editor",name:"fixedAlign",label:"sys.pageDesigner.columnFixed",group:t.PropGroup.SHOW,_config:{options:[{label:"sys.pageDesigner.left",value:t.fixedAlignENUM.LEFT},{label:"sys.pageDesigner.none",value:t.fixedAlignENUM.NONE},{label:"sys.pageDesigner.right",value:t.fixedAlignENUM.RIGHT}]}}],H={field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...d},j=[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:t.PropGroup.BASIC,hidden:o=>o.platform===t.Platform.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:t.PropGroup.BASIC,hidden:o=>!o.props.showExplain,_config:{i18n:!0}},{component:"switch-editor",name:"displayLabelText",label:"sys.pageDesigner.displayLabelText",group:t.PropGroup.ADVANCED},{component:"switch-editor",name:"disabled",label:"sys.pageDesigner.disabled",group:t.PropGroup.ADVANCED},{component:"switch-editor",name:"readonly",label:"sys.pageDesigner.readonly",group:t.PropGroup.ADVANCED},...C],v=[{component:"permission-editor",label:"",group:t.PropGroup.PERMISSION,hidden:o=>i(o)}];function N(){if(!window.gct_paas){console.error("未找到 gct_paas 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}}exports.baseBtnEditor=k;exports.baseBtnProp=U;exports.buttonEditor=Y;exports.buttonProps=W;exports.buttonStyleEditor=z;exports.default=N;exports.displayEditor=C;exports.displayProps=d;exports.fixedAlignEditor=$;exports.formItemDisplayEditor=j;exports.formItemProps=H;exports.getAutofillEditor=M;exports.hiddenButtonProps=i;exports.install=N;exports.notNeedPxStyle=B;exports.permissionEditor=v;exports.style=A;exports.useStyle=O;
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register([],function(e,o){"use strict";return{execute:function(){e("run",n);function n(){console.log("Hello World!")}}}});
|
|
1
|
+
System.register(["vue","@gct-paas/core","lodash-es"],function(i,eo){"use strict";var u,f,S,s,a,d,D,r,y,R,h,C,b,B,x,T,g,N,n,A,I;return{setters:[t=>{u=t.computed},t=>{f=t.TextDecoration,S=t.TagTypeEnum,s=t.BorderStyle,a=t.FIELD_TYPE,d=t.Dependency_ENUM,D=t.ASSIGNMENTSTRATEGY_ENUM,r=t.PropGroup,y=t.MaterialEnum,R=t.FormComponents,h=t.ButtonStyle,C=t.ButtonType,b=t.ButtonSize,B=t.ButtonColorTheme,x=t.ButtonColorType,T=t.StyleGroup,g=t.fixedAlignENUM,N=t.Platform},t=>{n=t.isEmpty,A=t.isNil,I=t.pick}],execute:function(){i({default:O,hiddenButtonProps:l,install:O,useStyle:V});const t=i("style",{position:"",top:"",left:"",right:"",bottom:"",width:"",height:"",backgroundColor:"",marginAll:"",marginTop:"",marginRight:"",marginBottom:"",marginLeft:"",paddingAll:"",paddingTop:"",paddingRight:"",paddingBottom:"",paddingLeft:"",labelFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:f.NONE,color:""},contentFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:f.NONE,color:""},tagStyle:{color:"",tagType:S.RADIUS},tagStyleOpen:!1,borderAll:{borderStyle:s.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderLeft:{borderStyle:s.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderRight:{borderStyle:s.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderBottom:{borderStyle:s.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTop:{borderStyle:s.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTopRightRadius:"0",borderTopLeftRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderAllRadius:"0"}),K=i("notNeedPxStyle",["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"]);function w(o){return o+"px"}const c={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:o=>o?700:400},italic:{attr:"fontStyle",callback:o=>o?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:o=>o?w(o):""},align:{attr:"textAlign"}},font(o){if(!o)return{};const e={};return Object.assign(e,I(o,c.fontAttrs)),typeof c.mapAttrs=="object"&&Object.keys(c.mapAttrs).forEach(p=>{const{attr:E,callback:m}=c.mapAttrs[p];e[E]=typeof m=="function"?m(o[p]):o[p]}),e}};function V(o){const{style:e={},ignoringStyle:p=[]}=o||{},E=u(()=>Q(e)),m=u(()=>{var _,M,k,U,W,G,$,z,Y,H,j,v;const P={position:n(e.position)?"":e.position+" !important",top:n(e.top)?"":e.top+"px !important",left:n(e.left)?"":e.left+"px !important",right:n(e.right)?"":e.right+"px !important",bottom:n(e.bottom)?"":e.bottom+"px !important",width:n(e.width)?"":e.width+"px !important",height:n(e.height)?"":e.height+"px !important",backgroundColor:n(e.backgroundColor)?"":e.backgroundColor+" !important",marginTop:n(e.marginTop)?"":e.marginTop+"px !important",marginRight:n(e.marginRight)?"":e.marginRight+"px !important",marginBottom:n(e.marginBottom)?"":e.marginBottom+"px !important",marginLeft:n(e.marginLeft)?"":e.marginLeft+"px !important",paddingTop:n(e.paddingTop)?"":e.paddingTop+"px !important",paddingRight:n(e.paddingRight)?"":e.paddingRight+"px !important",paddingBottom:n(e.paddingBottom)?"":e.paddingBottom+"px !important",paddingLeft:n(e.paddingLeft)?"":e.paddingLeft+"px !important",borderLeft:`${(_=e.borderLeft)==null?void 0:_.borderWidth}px ${(M=e.borderLeft)==null?void 0:M.borderStyle} ${(k=e.borderLeft)==null?void 0:k.borderColor} !important`,borderRight:`${(U=e.borderRight)==null?void 0:U.borderWidth}px ${(W=e.borderRight)==null?void 0:W.borderStyle} ${(G=e.borderRight)==null?void 0:G.borderColor} !important`,borderBottom:`${($=e.borderBottom)==null?void 0:$.borderWidth}px ${(z=e.borderBottom)==null?void 0:z.borderStyle} ${(Y=e.borderBottom)==null?void 0:Y.borderColor} !important`,borderTop:`${(H=e.borderTop)==null?void 0:H.borderWidth}px ${(j=e.borderTop)==null?void 0:j.borderStyle} ${(v=e.borderTop)==null?void 0:v.borderColor} !important`,borderTopRightRadius:n(e.borderTopRightRadius)?"":e.borderTopRightRadius+"px !important",borderTopLeftRadius:n(e.borderTopLeftRadius)?"":e.borderTopLeftRadius+"px !important",borderBottomRightRadius:n(e.borderBottomRightRadius)?"":e.borderBottomRightRadius+"px !important",borderBottomLeftRadius:n(e.borderBottomLeftRadius)?"":e.borderBottomLeftRadius+"px !important"};return p.forEach(oo=>{P[oo]=void 0}),P}),J=u(()=>c.font(e.labelFont)),Z=u(()=>c.font(e.contentFont));return{wrapperStyle:m,wStyle:E,labelFont:J,contentFont:Z}}function Q(o={}){const e={};for(const p in o)e[p]=X(p,o[p]);return e}function X(o,e){return A(e)||n(e)?"":K.includes(o)?e+" !important":e+"px !important"}const L=[a.REF,a.USER,a.ORG,a.RDO_REF,a.ATTACHMENT],to=i("getAutofillEditor",({groupName:o})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:o,hidden:e=>e.props.bindFieldKey||e.props.fieldReadonly?!0:!L.includes(e.props.fieldType)||e.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:o,hidden:e=>e.props.bindFieldKey||e.props.fieldReadonly?!0:!L.includes(e.props.fieldType)||e.props.enableAutofill===!1||e.props.multiple}]);function l(o){return Object.prototype.hasOwnProperty.call(o.props,"model")?!o.props.model:Object.prototype.hasOwnProperty.call(o.props,"refForm")?!o.props.refForm:!1}const F=i("displayProps",{hidden:!1,componentDependency:{sortDependency:[],configDependency:{[d.HIDDEN]:{expression:""},[d.READONLY]:{expression:""},[d.DISABLED]:{expression:""},[d.REQUIRED]:{expression:""},[d.ASSIGNMENT]:{expression:"",strategy:D.alwaysCover}}}}),q=i("displayEditor",[{component:"dependency-editor",name:"componentDependency",label:"",group:r.COMPONENTDEPENDENCY,hidden:o=>o.materialType===y.MaterialEmbedTableField||o.type===R.Form&&o.preLocation?!0:l(o)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:r.FIELD_CONFIG,hidden(o){return!o.isField||!o.props.field||!!o.props.bindFieldKey||!!o.props.fieldReadonly||o.materialType===y.cardListFormField||[a.EXPRESSION_CONDITION,a.SERIALRULE,a.LABEL_TEMPLATE].includes(o.props.fieldType)}}]),ro=i("baseBtnProp",{disabled:!1,icon:"icon-park:all-application",iconColor:"",title:"${sys.pageDesigner.button}",buttonStyle:h.ORDINARY,confirm:!1,confirmText:"",hasIcon:!1,hasText:!0,type:C.PRIMARY,danger:!1,size:b.DEFAULT,enableCustomColor:!1,backgroundColor:"",fontColor:"",...F}),no=i("baseBtnEditor",[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:r.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(o,e)=>{o.alias=e}},{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:r.BUTTON},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:r.BUTTON,hidden:o=>!o.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.BUTTON,_config:{options:Object.values(b).map(o=>({value:o,label:"sys.pageDesigner."+o}))}}]),io=i("buttonProps",{disabled:!1,buttonTheme:B.DEFAULT,buttonType:x.DEFAULT,icon:"",iconColor:"",buttonStyle:h.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""}),ao=i("buttonEditor",[{component:"button-type-editor",name:{type:"type",danger:"danger",icon:"icon",label:"label",hasText:"hasText",hasIcon:"hasIcon"},label:"sys.pageDesigner.buttonType",group:r.ButtonStyle,hidden:o=>l(o)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:r.ButtonStyle,hidden:o=>!o.props.hasIcon||l(o),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:r.ButtonStyle,hidden:o=>l(o)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:o=>!o.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:o=>!o.props.enableCustomColor||o.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.ButtonStyle,hidden:o=>!!o,_config:{options:Object.values(b).map(o=>({value:o,label:"sys.pageDesigner."+o}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:r.ButtonStyle,hidden:o=>l(o),_config:{tooltip:"sys.pageDesigner.buttonConfirm"}},{component:"texteare-editor",name:"confirmText",label:"sys.pageDesigner.regHint",group:r.ButtonStyle,_config:{i18n:!0,placeholder:"sys.pageDesigner.confirmTodo"},hidden:o=>!o.props.confirm||l(o)}]),po=i("buttonStyleEditor",[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:T.LAYOUT,hidden:o=>!!o.props.parentWidgetId||!!o.preLocation},{component:"margin-editor",group:T.MARGIN,hidden:o=>!!o.props.parentWidgetId||!!o.preLocation,_config:{hiddenMarginOrPadding:"padding"}}]),lo=i("fixedAlignEditor",[{component:"radio-icon-editor",name:"fixedAlign",label:"sys.pageDesigner.columnFixed",group:r.SHOW,_config:{options:[{label:"sys.pageDesigner.left",value:g.LEFT},{label:"sys.pageDesigner.none",value:g.NONE},{label:"sys.pageDesigner.right",value:g.RIGHT}]}}]),so=i("formItemProps",{field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...F}),co=i("formItemDisplayEditor",[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:r.BASIC,hidden:o=>o.platform===N.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:r.BASIC,hidden:o=>!o.props.showExplain,_config:{i18n:!0}},{component:"switch-editor",name:"displayLabelText",label:"sys.pageDesigner.displayLabelText",group:r.ADVANCED},{component:"switch-editor",name:"disabled",label:"sys.pageDesigner.disabled",group:r.ADVANCED},{component:"switch-editor",name:"readonly",label:"sys.pageDesigner.readonly",group:r.ADVANCED},...q]),uo=i("permissionEditor",[{component:"permission-editor",label:"",group:r.PERMISSION,hidden:o=>l(o)}]);function O(){if(!window.gct_paas){console.error("未找到 gct_paas 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useStyle } from './useStyle';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
export declare function useStyle(widget: LowCodeWidget.BasicSchema): {
|
|
3
|
+
wrapperStyle: import('vue').ComputedRef<any>;
|
|
4
|
+
wStyle: import('vue').ComputedRef<any>;
|
|
5
|
+
labelFont: import('vue').ComputedRef<any>;
|
|
6
|
+
contentFont: import('vue').ComputedRef<any>;
|
|
7
|
+
};
|
|
8
|
+
export declare const schemaToStyle: (schema: any) => any;
|
|
9
|
+
export declare function propsToStyle(styleProps?: any): any;
|
|
10
|
+
export declare const transAlign2flex: {
|
|
11
|
+
left: string;
|
|
12
|
+
center: string;
|
|
13
|
+
right: string;
|
|
14
|
+
justify: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { notNeedPxStyle } from '../schema/common-config/common-style.mjs';
|
|
3
|
+
import { pick, isEmpty, isNil } from 'lodash-es';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function pxToVw(pxValue) {
|
|
7
|
+
if (import.meta.env.VITE_APP_ENV === "mobile") {
|
|
8
|
+
return pxValue / 375 * 100 + "vw";
|
|
9
|
+
} else {
|
|
10
|
+
return pxValue + "px";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const cmpStyle = {
|
|
14
|
+
fontAttrs: [
|
|
15
|
+
"fontWeight",
|
|
16
|
+
"fontSize",
|
|
17
|
+
"color",
|
|
18
|
+
"textDecorationLine",
|
|
19
|
+
"textAlign"
|
|
20
|
+
],
|
|
21
|
+
mapAttrs: {
|
|
22
|
+
bold: {
|
|
23
|
+
attr: "fontWeight",
|
|
24
|
+
callback: (value) => {
|
|
25
|
+
return value ? 700 : 400;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
italic: {
|
|
29
|
+
attr: "fontStyle",
|
|
30
|
+
callback: (value) => {
|
|
31
|
+
return value ? "italic" : "normal";
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
textDecoration: {
|
|
35
|
+
attr: "textDecorationLine"
|
|
36
|
+
},
|
|
37
|
+
fontSize: {
|
|
38
|
+
attr: "fontSize",
|
|
39
|
+
callback: (value) => {
|
|
40
|
+
return value ? pxToVw(value) : "";
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
align: {
|
|
44
|
+
attr: "textAlign"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
// 获取font样式,
|
|
48
|
+
font(font) {
|
|
49
|
+
if (!font) return {};
|
|
50
|
+
const o = {};
|
|
51
|
+
Object.assign(o, pick(font, cmpStyle.fontAttrs));
|
|
52
|
+
if (typeof cmpStyle.mapAttrs === "object") {
|
|
53
|
+
Object.keys(cmpStyle.mapAttrs).forEach((k) => {
|
|
54
|
+
const { attr, callback } = cmpStyle.mapAttrs[k];
|
|
55
|
+
o[attr] = typeof callback === "function" ? callback(font[k]) : font[k];
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return o;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function useStyle(widget) {
|
|
62
|
+
const { style = {}, ignoringStyle = [] } = widget || {};
|
|
63
|
+
const wStyle = computed(() => {
|
|
64
|
+
return propsToStyle(style);
|
|
65
|
+
});
|
|
66
|
+
const wrapperStyle = computed(() => {
|
|
67
|
+
const styleData = {
|
|
68
|
+
position: isEmpty(style.position) ? "" : style.position + " !important",
|
|
69
|
+
top: isEmpty(style.top) ? "" : style.top + "px !important",
|
|
70
|
+
left: isEmpty(style.left) ? "" : style.left + "px !important",
|
|
71
|
+
right: isEmpty(style.right) ? "" : style.right + "px !important",
|
|
72
|
+
bottom: isEmpty(style.bottom) ? "" : style.bottom + "px !important",
|
|
73
|
+
width: isEmpty(style.width) ? "" : style.width + "px !important",
|
|
74
|
+
height: isEmpty(style.height) ? "" : style.height + "px !important",
|
|
75
|
+
backgroundColor: isEmpty(style.backgroundColor) ? "" : style.backgroundColor + " !important",
|
|
76
|
+
marginTop: isEmpty(style.marginTop) ? "" : style.marginTop + "px !important",
|
|
77
|
+
marginRight: isEmpty(style.marginRight) ? "" : style.marginRight + "px !important",
|
|
78
|
+
marginBottom: isEmpty(style.marginBottom) ? "" : style.marginBottom + "px !important",
|
|
79
|
+
marginLeft: isEmpty(style.marginLeft) ? "" : style.marginLeft + "px !important",
|
|
80
|
+
paddingTop: isEmpty(style.paddingTop) ? "" : style.paddingTop + "px !important",
|
|
81
|
+
paddingRight: isEmpty(style.paddingRight) ? "" : style.paddingRight + "px !important",
|
|
82
|
+
paddingBottom: isEmpty(style.paddingBottom) ? "" : style.paddingBottom + "px !important",
|
|
83
|
+
paddingLeft: isEmpty(style.paddingLeft) ? "" : style.paddingLeft + "px !important",
|
|
84
|
+
borderLeft: `${style.borderLeft?.borderWidth}px ${style.borderLeft?.borderStyle} ${style.borderLeft?.borderColor} !important`,
|
|
85
|
+
borderRight: `${style.borderRight?.borderWidth}px ${style.borderRight?.borderStyle} ${style.borderRight?.borderColor} !important`,
|
|
86
|
+
borderBottom: `${style.borderBottom?.borderWidth}px ${style.borderBottom?.borderStyle} ${style.borderBottom?.borderColor} !important`,
|
|
87
|
+
borderTop: `${style.borderTop?.borderWidth}px ${style.borderTop?.borderStyle} ${style.borderTop?.borderColor} !important`,
|
|
88
|
+
borderTopRightRadius: isEmpty(style.borderTopRightRadius) ? "" : style.borderTopRightRadius + "px !important",
|
|
89
|
+
borderTopLeftRadius: isEmpty(style.borderTopLeftRadius) ? "" : style.borderTopLeftRadius + "px !important",
|
|
90
|
+
borderBottomRightRadius: isEmpty(style.borderBottomRightRadius) ? "" : style.borderBottomRightRadius + "px !important",
|
|
91
|
+
borderBottomLeftRadius: isEmpty(style.borderBottomLeftRadius) ? "" : style.borderBottomLeftRadius + "px !important"
|
|
92
|
+
};
|
|
93
|
+
ignoringStyle.forEach((key) => {
|
|
94
|
+
styleData[key] = void 0;
|
|
95
|
+
});
|
|
96
|
+
return styleData;
|
|
97
|
+
});
|
|
98
|
+
const labelFont = computed(() => {
|
|
99
|
+
return cmpStyle.font(style.labelFont);
|
|
100
|
+
});
|
|
101
|
+
const contentFont = computed(() => {
|
|
102
|
+
return cmpStyle.font(style.contentFont);
|
|
103
|
+
});
|
|
104
|
+
return {
|
|
105
|
+
wrapperStyle,
|
|
106
|
+
wStyle,
|
|
107
|
+
labelFont,
|
|
108
|
+
contentFont
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const schemaToStyle = (schema) => cmpStyle.font(schema);
|
|
112
|
+
function propsToStyle(styleProps = {}) {
|
|
113
|
+
const wStyle = {};
|
|
114
|
+
for (const prop in styleProps) {
|
|
115
|
+
wStyle[prop] = makeStyleProp(prop, styleProps[prop]);
|
|
116
|
+
}
|
|
117
|
+
return wStyle;
|
|
118
|
+
}
|
|
119
|
+
function makeStyleProp(prop, value) {
|
|
120
|
+
if (isNil(value) || isEmpty(value)) {
|
|
121
|
+
return "";
|
|
122
|
+
}
|
|
123
|
+
if (notNeedPxStyle.includes(prop)) {
|
|
124
|
+
return value + " !important";
|
|
125
|
+
}
|
|
126
|
+
return value + "px !important";
|
|
127
|
+
}
|
|
128
|
+
const transAlign2flex = {
|
|
129
|
+
left: "flex-start",
|
|
130
|
+
center: "center",
|
|
131
|
+
right: "flex-end",
|
|
132
|
+
justify: "space-between"
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export { propsToStyle, schemaToStyle, transAlign2flex, useStyle };
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
import './hooks/index.mjs';
|
|
2
|
+
import './interface/index.mjs';
|
|
3
|
+
import './schema/index.mjs';
|
|
4
|
+
export { useStyle } from './hooks/useStyle.mjs';
|
|
5
|
+
export { getAutofillEditor } from './schema/common-config/autofill-editor-config.mjs';
|
|
6
|
+
export { baseBtnEditor, baseBtnProp } from './schema/common-config/base-button-config.mjs';
|
|
7
|
+
export { buttonEditor, buttonProps, buttonStyleEditor } from './schema/common-config/button-editor-config.mjs';
|
|
8
|
+
export { hiddenButtonProps } from './schema/common-config/button-props-func.mjs';
|
|
9
|
+
export { fixedAlignEditor } from './schema/common-config/column-editor-config.mjs';
|
|
10
|
+
export { notNeedPxStyle, style } from './schema/common-config/common-style.mjs';
|
|
11
|
+
export { displayEditor, displayProps } from './schema/common-config/display-editor-config.mjs';
|
|
12
|
+
export { formItemDisplayEditor, formItemProps } from './schema/common-config/formItem-editor-config.mjs';
|
|
13
|
+
export { permissionEditor } from './schema/common-config/permission-editor-config.mjs';
|
|
14
|
+
|
|
1
15
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
16
|
+
function install() {
|
|
17
|
+
if (!window.gct_paas) {
|
|
18
|
+
console.error(
|
|
19
|
+
"\u672A\u627E\u5230 gct_paas \u5BF9\u8C61\uFF0C\u8BF7\u5148\u5B89\u88C5 @gct-paas/core \u5305\u540E\u518D\u5B89\u88C5 @gct-paas/design \u5305\uFF01"
|
|
20
|
+
);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
4
23
|
}
|
|
5
24
|
|
|
6
|
-
export {
|
|
25
|
+
export { install as default, install };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PluginCompProps } from './plugin-comp-props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* 插件组件输入参数
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @interface PluginCompProps
|
|
7
|
+
*/
|
|
8
|
+
export interface PluginCompProps {
|
|
9
|
+
/**
|
|
10
|
+
* 组件配置模型
|
|
11
|
+
*
|
|
12
|
+
* @type {LowCodeWidget.BasicSchema}
|
|
13
|
+
*/
|
|
14
|
+
widget: LowCodeWidget.BasicSchema;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const SHOW_FIELD_TYPE = [
|
|
5
|
+
FIELD_TYPE.REF,
|
|
6
|
+
FIELD_TYPE.USER,
|
|
7
|
+
FIELD_TYPE.ORG,
|
|
8
|
+
FIELD_TYPE.RDO_REF,
|
|
9
|
+
FIELD_TYPE.ATTACHMENT
|
|
10
|
+
];
|
|
11
|
+
const getAutofillEditor = ({
|
|
12
|
+
groupName
|
|
13
|
+
}) => {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
component: "switch-editor",
|
|
17
|
+
name: "enableAutofill",
|
|
18
|
+
label: "sys.pageDesigner.autofill",
|
|
19
|
+
group: groupName,
|
|
20
|
+
hidden: (widget) => {
|
|
21
|
+
if (widget.props.bindFieldKey || widget.props.fieldReadonly) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
return !SHOW_FIELD_TYPE.includes(widget.props.fieldType) || widget.props.multiple;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
component: "autofill-editor",
|
|
29
|
+
name: "autofillRules",
|
|
30
|
+
label: "",
|
|
31
|
+
group: groupName,
|
|
32
|
+
hidden: (widget) => {
|
|
33
|
+
if (widget.props.bindFieldKey || widget.props.fieldReadonly) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return (
|
|
37
|
+
// 如果不是这些字段类型/是多选模式/或者没开启自动填充 则隐藏
|
|
38
|
+
!SHOW_FIELD_TYPE.includes(widget.props.fieldType) || widget.props.enableAutofill === false || widget.props.multiple
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { getAutofillEditor };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ButtonSize, ButtonStyle, operateSysEnums, LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
export interface BaseButtonProps extends LowCodeWidget.WidgetProps {
|
|
3
|
+
/**
|
|
4
|
+
* 关联表单
|
|
5
|
+
*/
|
|
6
|
+
refForm?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 关联列表
|
|
9
|
+
*/
|
|
10
|
+
refList?: string;
|
|
11
|
+
/**标题 */
|
|
12
|
+
title: string;
|
|
13
|
+
/**二次确认 */
|
|
14
|
+
confirm?: boolean;
|
|
15
|
+
confirmText?: string;
|
|
16
|
+
/**内置事件 */
|
|
17
|
+
innerEvent?: boolean;
|
|
18
|
+
/**系统事件类型 */
|
|
19
|
+
sysMethedType?: operateSysEnums;
|
|
20
|
+
linkPage?: string;
|
|
21
|
+
/**事件名称 */
|
|
22
|
+
eventName?: string;
|
|
23
|
+
/**显示规则 */
|
|
24
|
+
icon: string;
|
|
25
|
+
iconColor: string;
|
|
26
|
+
size: ButtonSize;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
/**是否显示按钮名称 */
|
|
29
|
+
hasText: boolean;
|
|
30
|
+
/**是否显示图标 */
|
|
31
|
+
hasIcon: boolean;
|
|
32
|
+
/**按钮type */
|
|
33
|
+
type: string;
|
|
34
|
+
/**是否是危险类型 */
|
|
35
|
+
danger: boolean;
|
|
36
|
+
/**关联模型 */
|
|
37
|
+
model?: string;
|
|
38
|
+
i18nConfig?: string;
|
|
39
|
+
buttonStyle?: ButtonStyle;
|
|
40
|
+
enableCustomColor: boolean;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
fontColor?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const baseBtnProp: BaseButtonProps;
|
|
45
|
+
export declare const baseBtnEditor: LowCodeWidget.PropEditor[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ButtonStyle, ButtonType, ButtonSize, PropGroup } from '@gct-paas/core';
|
|
2
|
+
import { displayProps } from './display-editor-config.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const baseBtnProp = {
|
|
6
|
+
disabled: false,
|
|
7
|
+
icon: "icon-park:all-application",
|
|
8
|
+
iconColor: "",
|
|
9
|
+
/**标题 */
|
|
10
|
+
title: "${sys.pageDesigner.button}",
|
|
11
|
+
buttonStyle: ButtonStyle.ORDINARY,
|
|
12
|
+
/**二次确认 */
|
|
13
|
+
confirm: false,
|
|
14
|
+
confirmText: "",
|
|
15
|
+
// /**内置事件 */
|
|
16
|
+
// innerEvent: true,
|
|
17
|
+
/**系统事件类型 */
|
|
18
|
+
// sysMethedType: undefined,
|
|
19
|
+
// linkPage: '',
|
|
20
|
+
/**事件名称 */
|
|
21
|
+
// eventName: '',
|
|
22
|
+
hasIcon: false,
|
|
23
|
+
hasText: true,
|
|
24
|
+
type: ButtonType.PRIMARY,
|
|
25
|
+
danger: false,
|
|
26
|
+
size: ButtonSize.DEFAULT,
|
|
27
|
+
enableCustomColor: false,
|
|
28
|
+
backgroundColor: "",
|
|
29
|
+
fontColor: "",
|
|
30
|
+
...displayProps
|
|
31
|
+
};
|
|
32
|
+
const baseBtnEditor = [
|
|
33
|
+
{
|
|
34
|
+
component: "text-editor",
|
|
35
|
+
name: "title",
|
|
36
|
+
label: "sys.pageDesigner.buttonName",
|
|
37
|
+
group: PropGroup.BASIC,
|
|
38
|
+
_config: {
|
|
39
|
+
i18n: true,
|
|
40
|
+
showCount: true,
|
|
41
|
+
maxlength: 32
|
|
42
|
+
},
|
|
43
|
+
changeCallback: (widget, val) => {
|
|
44
|
+
widget.alias = val;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
component: "button-type-editor",
|
|
49
|
+
name: {
|
|
50
|
+
type: "type",
|
|
51
|
+
danger: "danger",
|
|
52
|
+
icon: "icon",
|
|
53
|
+
label: "label",
|
|
54
|
+
hasText: "hasText",
|
|
55
|
+
hasIcon: "hasIcon"
|
|
56
|
+
},
|
|
57
|
+
label: "sys.pageDesigner.buttonType",
|
|
58
|
+
group: PropGroup.BUTTON
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
component: "icon-editor",
|
|
62
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
63
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
64
|
+
group: PropGroup.BUTTON,
|
|
65
|
+
// _config: {
|
|
66
|
+
// showColor: true,
|
|
67
|
+
// },
|
|
68
|
+
hidden: (widget) => {
|
|
69
|
+
return !widget.props.hasIcon;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
component: "radio-bgc-editor",
|
|
74
|
+
name: "size",
|
|
75
|
+
label: "sys.pageDesigner.buttonSize",
|
|
76
|
+
group: PropGroup.BUTTON,
|
|
77
|
+
_config: {
|
|
78
|
+
options: Object.values(ButtonSize).map((i) => {
|
|
79
|
+
return { value: i, label: "sys.pageDesigner." + i };
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export { baseBtnEditor, baseBtnProp };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ButtonColorType, ButtonColorTheme, ButtonStyle, LowCodeWidget } from '@gct-paas/core';
|
|
2
|
+
export declare const buttonProps: {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
buttonTheme: ButtonColorTheme;
|
|
5
|
+
buttonType: ButtonColorType;
|
|
6
|
+
icon: string;
|
|
7
|
+
iconColor: string;
|
|
8
|
+
buttonStyle: ButtonStyle;
|
|
9
|
+
enableCustomColor: boolean;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
fontColor: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const buttonEditor: LowCodeWidget.PropEditor[];
|
|
14
|
+
export declare const buttonStyleEditor: LowCodeWidget.StyleEditor[];
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ButtonColorTheme, ButtonColorType, ButtonStyle, PropGroup, ButtonSize, StyleGroup } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const buttonProps = {
|
|
6
|
+
disabled: false,
|
|
7
|
+
buttonTheme: ButtonColorTheme.DEFAULT,
|
|
8
|
+
buttonType: ButtonColorType.DEFAULT,
|
|
9
|
+
icon: "",
|
|
10
|
+
iconColor: "",
|
|
11
|
+
buttonStyle: ButtonStyle.ORDINARY,
|
|
12
|
+
enableCustomColor: false,
|
|
13
|
+
backgroundColor: "",
|
|
14
|
+
fontColor: ""
|
|
15
|
+
};
|
|
16
|
+
const buttonEditor = [
|
|
17
|
+
{
|
|
18
|
+
component: "button-type-editor",
|
|
19
|
+
name: {
|
|
20
|
+
type: "type",
|
|
21
|
+
danger: "danger",
|
|
22
|
+
icon: "icon",
|
|
23
|
+
label: "label",
|
|
24
|
+
hasText: "hasText",
|
|
25
|
+
hasIcon: "hasIcon"
|
|
26
|
+
},
|
|
27
|
+
label: "sys.pageDesigner.buttonType",
|
|
28
|
+
group: PropGroup.ButtonStyle,
|
|
29
|
+
hidden: (widget) => {
|
|
30
|
+
return hiddenButtonProps(widget);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
component: "icon-editor",
|
|
35
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
36
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
37
|
+
group: PropGroup.ButtonStyle,
|
|
38
|
+
hidden: (widget) => {
|
|
39
|
+
return !widget.props.hasIcon || hiddenButtonProps(widget);
|
|
40
|
+
},
|
|
41
|
+
_config: {
|
|
42
|
+
clearable: false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
component: "switch-editor",
|
|
47
|
+
name: "enableCustomColor",
|
|
48
|
+
label: "sys.pageDesigner.customBtnColor",
|
|
49
|
+
group: PropGroup.ButtonStyle,
|
|
50
|
+
hidden: (widget) => {
|
|
51
|
+
return hiddenButtonProps(widget);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
component: "button-color-editor",
|
|
56
|
+
name: "fontColor",
|
|
57
|
+
label: "sys.pageDesigner.buttonNameColor",
|
|
58
|
+
group: PropGroup.ButtonStyle,
|
|
59
|
+
_config: {
|
|
60
|
+
isInRow: true
|
|
61
|
+
},
|
|
62
|
+
hidden: (widget) => {
|
|
63
|
+
return !widget.props.enableCustomColor;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
component: "button-color-editor",
|
|
68
|
+
name: "backgroundColor",
|
|
69
|
+
label: "sys.pageDesigner.buttonStyleColor",
|
|
70
|
+
group: PropGroup.ButtonStyle,
|
|
71
|
+
_config: {
|
|
72
|
+
isInRow: true
|
|
73
|
+
},
|
|
74
|
+
hidden: (widget) => {
|
|
75
|
+
return !widget.props.enableCustomColor || widget.props.type === "link";
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
component: "radio-bgc-editor",
|
|
80
|
+
name: "size",
|
|
81
|
+
label: "sys.pageDesigner.buttonSize",
|
|
82
|
+
group: PropGroup.ButtonStyle,
|
|
83
|
+
hidden: (widget) => {
|
|
84
|
+
return !!widget;
|
|
85
|
+
},
|
|
86
|
+
_config: {
|
|
87
|
+
options: Object.values(ButtonSize).map((i) => {
|
|
88
|
+
return { value: i, label: "sys.pageDesigner." + i };
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
component: "switch-editor",
|
|
94
|
+
name: "confirm",
|
|
95
|
+
label: "sys.pageDesigner.confirm",
|
|
96
|
+
group: PropGroup.ButtonStyle,
|
|
97
|
+
hidden: (widget) => {
|
|
98
|
+
return hiddenButtonProps(widget);
|
|
99
|
+
},
|
|
100
|
+
_config: {
|
|
101
|
+
tooltip: "sys.pageDesigner.buttonConfirm"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
component: "texteare-editor",
|
|
106
|
+
name: "confirmText",
|
|
107
|
+
label: "sys.pageDesigner.regHint",
|
|
108
|
+
group: PropGroup.ButtonStyle,
|
|
109
|
+
_config: {
|
|
110
|
+
i18n: true,
|
|
111
|
+
placeholder: "sys.pageDesigner.confirmTodo"
|
|
112
|
+
},
|
|
113
|
+
hidden: (widget) => {
|
|
114
|
+
return !widget.props.confirm || hiddenButtonProps(widget);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
const buttonStyleEditor = [
|
|
119
|
+
{
|
|
120
|
+
component: "position-editor",
|
|
121
|
+
name: "position",
|
|
122
|
+
label: "sys.pageDesigner.position",
|
|
123
|
+
group: StyleGroup.LAYOUT,
|
|
124
|
+
// 按钮容器中的按钮不需要样式属性
|
|
125
|
+
hidden: (widget) => {
|
|
126
|
+
return !!widget.props.parentWidgetId || !!widget.preLocation;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
component: "margin-editor",
|
|
131
|
+
group: StyleGroup.MARGIN,
|
|
132
|
+
// 按钮容器中的按钮不需要样式属性
|
|
133
|
+
hidden: (widget) => {
|
|
134
|
+
return !!widget.props.parentWidgetId || !!widget.preLocation;
|
|
135
|
+
},
|
|
136
|
+
_config: {
|
|
137
|
+
hiddenMarginOrPadding: "padding"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
export { buttonEditor, buttonProps, buttonStyleEditor };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function hiddenButtonProps(widget) {
|
|
3
|
+
if (Object.prototype.hasOwnProperty.call(widget.props, "model")) {
|
|
4
|
+
return !widget.props.model;
|
|
5
|
+
}
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(widget.props, "refForm")) {
|
|
7
|
+
return !widget.props.refForm;
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { hiddenButtonProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PropGroup, fixedAlignENUM } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const fixedAlignEditor = [
|
|
5
|
+
{
|
|
6
|
+
component: "radio-icon-editor",
|
|
7
|
+
name: "fixedAlign",
|
|
8
|
+
label: "sys.pageDesigner.columnFixed",
|
|
9
|
+
group: PropGroup.SHOW,
|
|
10
|
+
_config: {
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
label: "sys.pageDesigner.left",
|
|
14
|
+
value: fixedAlignENUM.LEFT
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "sys.pageDesigner.none",
|
|
18
|
+
value: fixedAlignENUM.NONE
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "sys.pageDesigner.right",
|
|
22
|
+
value: fixedAlignENUM.RIGHT
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
export { fixedAlignEditor };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { TextDecoration, TagTypeEnum, BorderStyle } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const style = {
|
|
5
|
+
position: "",
|
|
6
|
+
top: "",
|
|
7
|
+
left: "",
|
|
8
|
+
right: "",
|
|
9
|
+
bottom: "",
|
|
10
|
+
width: "",
|
|
11
|
+
height: "",
|
|
12
|
+
backgroundColor: "",
|
|
13
|
+
marginAll: "",
|
|
14
|
+
marginTop: "",
|
|
15
|
+
marginRight: "",
|
|
16
|
+
marginBottom: "",
|
|
17
|
+
marginLeft: "",
|
|
18
|
+
paddingAll: "",
|
|
19
|
+
paddingTop: "",
|
|
20
|
+
paddingRight: "",
|
|
21
|
+
paddingBottom: "",
|
|
22
|
+
paddingLeft: "",
|
|
23
|
+
labelFont: {
|
|
24
|
+
align: "left",
|
|
25
|
+
fontSize: "",
|
|
26
|
+
bold: false,
|
|
27
|
+
italic: false,
|
|
28
|
+
textDecoration: TextDecoration.NONE,
|
|
29
|
+
color: ""
|
|
30
|
+
},
|
|
31
|
+
contentFont: {
|
|
32
|
+
align: "left",
|
|
33
|
+
fontSize: "",
|
|
34
|
+
bold: false,
|
|
35
|
+
italic: false,
|
|
36
|
+
textDecoration: TextDecoration.NONE,
|
|
37
|
+
color: ""
|
|
38
|
+
},
|
|
39
|
+
tagStyle: {
|
|
40
|
+
color: "",
|
|
41
|
+
tagType: TagTypeEnum.RADIUS
|
|
42
|
+
},
|
|
43
|
+
tagStyleOpen: false,
|
|
44
|
+
borderAll: {
|
|
45
|
+
borderStyle: BorderStyle.NONE,
|
|
46
|
+
borderColor: "#F0F0F0",
|
|
47
|
+
borderWidth: "1"
|
|
48
|
+
},
|
|
49
|
+
borderLeft: {
|
|
50
|
+
borderStyle: BorderStyle.NONE,
|
|
51
|
+
borderColor: "#F0F0F0",
|
|
52
|
+
borderWidth: "1"
|
|
53
|
+
},
|
|
54
|
+
borderRight: {
|
|
55
|
+
borderStyle: BorderStyle.NONE,
|
|
56
|
+
borderColor: "#F0F0F0",
|
|
57
|
+
borderWidth: "1"
|
|
58
|
+
},
|
|
59
|
+
borderBottom: {
|
|
60
|
+
borderStyle: BorderStyle.NONE,
|
|
61
|
+
borderColor: "#F0F0F0",
|
|
62
|
+
borderWidth: "1"
|
|
63
|
+
},
|
|
64
|
+
borderTop: {
|
|
65
|
+
borderStyle: BorderStyle.NONE,
|
|
66
|
+
borderColor: "#F0F0F0",
|
|
67
|
+
borderWidth: "1"
|
|
68
|
+
},
|
|
69
|
+
borderTopRightRadius: "0",
|
|
70
|
+
borderTopLeftRadius: "0",
|
|
71
|
+
borderBottomRightRadius: "0",
|
|
72
|
+
borderBottomLeftRadius: "0",
|
|
73
|
+
borderAllRadius: "0"
|
|
74
|
+
};
|
|
75
|
+
const notNeedPxStyle = [
|
|
76
|
+
"position",
|
|
77
|
+
"backgroundColor",
|
|
78
|
+
"bold",
|
|
79
|
+
"italic",
|
|
80
|
+
"textDecoration",
|
|
81
|
+
"color",
|
|
82
|
+
"borderStyle",
|
|
83
|
+
"borderColor"
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
export { notNeedPxStyle, style };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Dependency_ENUM, ASSIGNMENTSTRATEGY_ENUM, PropGroup, MaterialEnum, FormComponents, FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const displayProps = {
|
|
6
|
+
////显隐配置start
|
|
7
|
+
hidden: false,
|
|
8
|
+
// displayType: DisplayType.CONFIG,
|
|
9
|
+
// displayRule: '',
|
|
10
|
+
componentDependency: {
|
|
11
|
+
sortDependency: [],
|
|
12
|
+
configDependency: {
|
|
13
|
+
/**隐藏 */
|
|
14
|
+
[Dependency_ENUM.HIDDEN]: {
|
|
15
|
+
expression: ""
|
|
16
|
+
},
|
|
17
|
+
/**只读 */
|
|
18
|
+
[Dependency_ENUM.READONLY]: {
|
|
19
|
+
expression: ""
|
|
20
|
+
},
|
|
21
|
+
/**禁用 */
|
|
22
|
+
[Dependency_ENUM.DISABLED]: {
|
|
23
|
+
expression: ""
|
|
24
|
+
},
|
|
25
|
+
/**必填 */
|
|
26
|
+
[Dependency_ENUM.REQUIRED]: {
|
|
27
|
+
expression: ""
|
|
28
|
+
},
|
|
29
|
+
[Dependency_ENUM.ASSIGNMENT]: {
|
|
30
|
+
expression: "",
|
|
31
|
+
strategy: ASSIGNMENTSTRATEGY_ENUM.alwaysCover
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const displayEditor = [
|
|
37
|
+
{
|
|
38
|
+
component: "dependency-editor",
|
|
39
|
+
name: "componentDependency",
|
|
40
|
+
label: "",
|
|
41
|
+
group: PropGroup.COMPONENTDEPENDENCY,
|
|
42
|
+
hidden: (widget) => {
|
|
43
|
+
if (widget.materialType === MaterialEnum.MaterialEmbedTableField) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (widget.type === FormComponents.Form && widget.preLocation) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return hiddenButtonProps(widget);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
component: "switch-editor",
|
|
54
|
+
name: "notSubmitInHide",
|
|
55
|
+
label: "sys.pageDesigner.submitWhenHidden",
|
|
56
|
+
group: PropGroup.FIELD_CONFIG,
|
|
57
|
+
hidden(widget) {
|
|
58
|
+
return !widget.isField || !widget.props.field || !!widget.props.bindFieldKey || !!widget.props.fieldReadonly || widget.materialType === MaterialEnum.cardListFormField || [
|
|
59
|
+
FIELD_TYPE.EXPRESSION_CONDITION,
|
|
60
|
+
FIELD_TYPE.SERIALRULE,
|
|
61
|
+
FIELD_TYPE.LABEL_TEMPLATE
|
|
62
|
+
].includes(widget.props.fieldType);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
export { displayEditor, displayProps };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PropGroup, Platform } from '@gct-paas/core';
|
|
2
|
+
import { displayProps, displayEditor } from './display-editor-config.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const formItemProps = {
|
|
6
|
+
field: "",
|
|
7
|
+
fieldId: "",
|
|
8
|
+
label: "",
|
|
9
|
+
modelKey: "",
|
|
10
|
+
fieldType: void 0,
|
|
11
|
+
bindModelKey: void 0,
|
|
12
|
+
disabled: false,
|
|
13
|
+
explain: "",
|
|
14
|
+
showExplain: false,
|
|
15
|
+
displayLabelText: true,
|
|
16
|
+
readonly: false,
|
|
17
|
+
fieldReadonly: false,
|
|
18
|
+
notSubmitInHide: true,
|
|
19
|
+
...displayProps
|
|
20
|
+
};
|
|
21
|
+
const formItemDisplayEditor = [
|
|
22
|
+
{
|
|
23
|
+
component: "switch-editor",
|
|
24
|
+
name: "showExplain",
|
|
25
|
+
label: "sys.pageDesigner.explain",
|
|
26
|
+
group: PropGroup.BASIC,
|
|
27
|
+
hidden: (widget) => {
|
|
28
|
+
return widget.platform === Platform.MOBILE;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
component: "texteare-editor",
|
|
33
|
+
name: "explain",
|
|
34
|
+
label: "",
|
|
35
|
+
group: PropGroup.BASIC,
|
|
36
|
+
hidden: (widget) => {
|
|
37
|
+
return !widget.props.showExplain;
|
|
38
|
+
},
|
|
39
|
+
_config: {
|
|
40
|
+
i18n: true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
component: "switch-editor",
|
|
45
|
+
name: "displayLabelText",
|
|
46
|
+
label: "sys.pageDesigner.displayLabelText",
|
|
47
|
+
group: PropGroup.ADVANCED
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
component: "switch-editor",
|
|
51
|
+
name: "disabled",
|
|
52
|
+
label: "sys.pageDesigner.disabled",
|
|
53
|
+
group: PropGroup.ADVANCED
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
component: "switch-editor",
|
|
57
|
+
name: "readonly",
|
|
58
|
+
label: "sys.pageDesigner.readonly",
|
|
59
|
+
group: PropGroup.ADVANCED
|
|
60
|
+
},
|
|
61
|
+
...displayEditor
|
|
62
|
+
// {
|
|
63
|
+
// component: 'switch-editor',
|
|
64
|
+
// name: 'notSubmitInHide',
|
|
65
|
+
// label: 'sys.pageDesigner.notSubmitInHide',
|
|
66
|
+
// group: PropGroup.DISPLAY,
|
|
67
|
+
// },
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
export { formItemDisplayEditor, formItemProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropGroup } from '@gct-paas/core';
|
|
2
|
+
import { hiddenButtonProps } from './button-props-func.mjs';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const permissionEditor = [
|
|
6
|
+
{
|
|
7
|
+
component: "permission-editor",
|
|
8
|
+
label: "",
|
|
9
|
+
group: PropGroup.PERMISSION,
|
|
10
|
+
hidden: (widget) => {
|
|
11
|
+
return hiddenButtonProps(widget);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export { permissionEditor };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { getAutofillEditor } from './common-config/autofill-editor-config';
|
|
2
|
+
export { baseBtnEditor, baseBtnProp } from './common-config/base-button-config';
|
|
3
|
+
export { buttonEditor, buttonProps, buttonStyleEditor, } from './common-config/button-editor-config';
|
|
4
|
+
export { hiddenButtonProps } from './common-config/button-props-func';
|
|
5
|
+
export { fixedAlignEditor } from './common-config/column-editor-config';
|
|
6
|
+
export { style, notNeedPxStyle } from './common-config/common-style';
|
|
7
|
+
export { displayEditor, displayProps, } from './common-config/display-editor-config';
|
|
8
|
+
export { formItemProps, formItemDisplayEditor, } from './common-config/formItem-editor-config';
|
|
9
|
+
export { permissionEditor } from './common-config/permission-editor-config';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { getAutofillEditor } from './common-config/autofill-editor-config.mjs';
|
|
2
|
+
export { baseBtnEditor, baseBtnProp } from './common-config/base-button-config.mjs';
|
|
3
|
+
export { buttonEditor, buttonProps, buttonStyleEditor } from './common-config/button-editor-config.mjs';
|
|
4
|
+
export { hiddenButtonProps } from './common-config/button-props-func.mjs';
|
|
5
|
+
export { fixedAlignEditor } from './common-config/column-editor-config.mjs';
|
|
6
|
+
export { notNeedPxStyle, style } from './common-config/common-style.mjs';
|
|
7
|
+
export { displayEditor, displayProps } from './common-config/display-editor-config.mjs';
|
|
8
|
+
export { formItemDisplayEditor, formItemProps } from './common-config/formItem-editor-config.mjs';
|
|
9
|
+
export { permissionEditor } from './common-config/permission-editor-config.mjs';
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import '@gct-paas/core/es/types';
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
type PartialByKeys<T, K extends keyof T> = {
|
|
5
|
+
[P in K]?: T[P];
|
|
6
|
+
} & Pick<T, Exclude<keyof T, K>>;
|
|
7
|
+
|
|
8
|
+
type RequiredByKeys<T, K extends keyof T> = {
|
|
9
|
+
[P in K]: T[P];
|
|
10
|
+
} & Pick<T, Exclude<keyof T, K>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// declare module '@gct-paas/core' {
|
|
14
|
+
// interface GctGlobal {
|
|
15
|
+
// register: {
|
|
16
|
+
// designer: {
|
|
17
|
+
// mobile: DesignerRegister;
|
|
18
|
+
// web: DesignerRegister;
|
|
19
|
+
// };
|
|
20
|
+
// render: {
|
|
21
|
+
// mobile: RenderRegister;
|
|
22
|
+
// web: RenderRegister;
|
|
23
|
+
// };
|
|
24
|
+
// };
|
|
25
|
+
// }
|
|
26
|
+
// }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"dev": "rollup -c -w --environment=NODE_ENV:development",
|
|
35
35
|
"build": "npm run lint && rollup -c --environment=NODE_ENV:production && vite build --mode production --config vite.config.ts",
|
|
36
|
-
"lint": "eslint src/",
|
|
36
|
+
"lint": "eslint src/schema --fix",
|
|
37
37
|
"publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
|
|
38
38
|
"publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
|
|
39
39
|
"publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
|
|
@@ -41,8 +41,13 @@
|
|
|
41
41
|
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@gct-paas/cli": "0.0.1-dev.
|
|
45
|
-
"@gct-paas/core": "0.0.1-dev.
|
|
44
|
+
"@gct-paas/cli": "0.0.1-dev.7",
|
|
45
|
+
"@gct-paas/core": "0.0.1-dev.7",
|
|
46
|
+
"qx-util": "^0.4.8",
|
|
47
|
+
"vue": "^3.5.13"
|
|
46
48
|
},
|
|
47
|
-
"
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"vue": "^3.x"
|
|
51
|
+
},
|
|
52
|
+
"gitHead": "b467be0657258b6b09979789977bcb3f141bdb9c"
|
|
48
53
|
}
|