@gct-paas/design 0.1.4-dev.1 → 0.1.4-dev.3
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/package.json +4 -4
package/dist/index.min.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("ant-design-vue"),d=require("vue"),t=require("@gct-paas/core"),r=require("lodash-es");class F{info(o,n){return new Promise(i=>{s.message.info(o,n,()=>{i()})})}success(o,n){return new Promise(i=>{s.message.success(o,n,()=>{i()})})}warning(o,n){return new Promise(i=>{s.message.warning(o,n,()=>{i()})})}error(o,n){return new Promise(i=>{s.message.error(o,n,()=>{i()})})}}const O={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"},C=["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"];function _(e){return e+"px"}const a={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:e=>e?700:400},italic:{attr:"fontStyle",callback:e=>e?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:e=>e?_(e):""},align:{attr:"textAlign"}},font(e){if(!e)return{};const o={};return Object.assign(o,r.pick(e,a.fontAttrs)),typeof a.mapAttrs=="object"&&Object.keys(a.mapAttrs).forEach(n=>{const{attr:i,callback:l}=a.mapAttrs[n];o[i]=typeof l=="function"?l(e[n]):e[n]}),o}};function G(e){const{style:o={},ignoringStyle:n=[]}=e||{},i=d.computed(()=>M(o)),l=d.computed(()=>{var m,g,b,y,f,E,h,T,D,S,x,R;const c={position:r.isEmpty(o.position)?"":o.position+" !important",top:r.isEmpty(o.top)?"":o.top+"px !important",left:r.isEmpty(o.left)?"":o.left+"px !important",right:r.isEmpty(o.right)?"":o.right+"px !important",bottom:r.isEmpty(o.bottom)?"":o.bottom+"px !important",width:r.isEmpty(o.width)?"":o.width+"px !important",height:r.isEmpty(o.height)?"":o.height+"px !important",backgroundColor:r.isEmpty(o.backgroundColor)?"":o.backgroundColor+" !important",marginTop:r.isEmpty(o.marginTop)?"":o.marginTop+"px !important",marginRight:r.isEmpty(o.marginRight)?"":o.marginRight+"px !important",marginBottom:r.isEmpty(o.marginBottom)?"":o.marginBottom+"px !important",marginLeft:r.isEmpty(o.marginLeft)?"":o.marginLeft+"px !important",paddingTop:r.isEmpty(o.paddingTop)?"":o.paddingTop+"px !important",paddingRight:r.isEmpty(o.paddingRight)?"":o.paddingRight+"px !important",paddingBottom:r.isEmpty(o.paddingBottom)?"":o.paddingBottom+"px !important",paddingLeft:r.isEmpty(o.paddingLeft)?"":o.paddingLeft+"px !important",borderLeft:`${(m=o.borderLeft)==null?void 0:m.borderWidth}px ${(g=o.borderLeft)==null?void 0:g.borderStyle} ${(b=o.borderLeft)==null?void 0:b.borderColor} !important`,borderRight:`${(y=o.borderRight)==null?void 0:y.borderWidth}px ${(f=o.borderRight)==null?void 0:f.borderStyle} ${(E=o.borderRight)==null?void 0:E.borderColor} !important`,borderBottom:`${(h=o.borderBottom)==null?void 0:h.borderWidth}px ${(T=o.borderBottom)==null?void 0:T.borderStyle} ${(D=o.borderBottom)==null?void 0:D.borderColor} !important`,borderTop:`${(S=o.borderTop)==null?void 0:S.borderWidth}px ${(x=o.borderTop)==null?void 0:x.borderStyle} ${(R=o.borderTop)==null?void 0:R.borderColor} !important`,borderTopRightRadius:r.isEmpty(o.borderTopRightRadius)?"":o.borderTopRightRadius+"px !important",borderTopLeftRadius:r.isEmpty(o.borderTopLeftRadius)?"":o.borderTopLeftRadius+"px !important",borderBottomRightRadius:r.isEmpty(o.borderBottomRightRadius)?"":o.borderBottomRightRadius+"px !important",borderBottomLeftRadius:r.isEmpty(o.borderBottomLeftRadius)?"":o.borderBottomLeftRadius+"px !important"};return n.forEach(A=>{c[A]=void 0}),c}),L=d.computed(()=>a.font(o.labelFont)),I=d.computed(()=>a.font(o.contentFont));return{wrapperStyle:l,wStyle:i,labelFont:L,contentFont:I}}function M(e={}){const o={};for(const n in e)o[n]=U(n,e[n]);return o}function U(e,o){return r.isNil(o)||r.isEmpty(o)?"":C.includes(e)?o+" !important":o+"px !important"}const B=[t.FIELD_TYPE.REF,t.FIELD_TYPE.USER,t.FIELD_TYPE.ORG,t.FIELD_TYPE.RDO_REF,t.FIELD_TYPE.ATTACHMENT],k=({groupName:e})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!B.includes(o.props.fieldType)||o.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!B.includes(o.props.fieldType)||o.props.enableAutofill===!1||o.props.multiple}];function p(e){return Object.prototype.hasOwnProperty.call(e.props,"model")?!e.props.model:Object.prototype.hasOwnProperty.call(e.props,"refForm")?!e.props.refForm:!1}const u={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}}}},P=[{component:"dependency-editor",name:"componentDependency",label:"",group:t.PropGroup.COMPONENTDEPENDENCY,hidden:e=>e.materialType===t.MaterialEnum.MaterialEmbedTableField||e.type===t.FormComponents.Form&&e.preLocation?!0:p(e)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:t.PropGroup.FIELD_CONFIG,hidden(e){return!e.isField||!e.props.field||!!e.props.bindFieldKey||!!e.props.fieldReadonly||e.materialType===t.MaterialEnum.cardListFormField||[t.FIELD_TYPE.EXPRESSION_CONDITION,t.FIELD_TYPE.SERIALRULE,t.FIELD_TYPE.LABEL_TEMPLATE].includes(e.props.fieldType)}}],W={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:"",...u},Y=[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:t.PropGroup.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(e,o)=>{e.alias=o}},{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:e=>!e.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.BUTTON,_config:{options:Object.values(t.ButtonSize).map(e=>({value:e,label:"sys.pageDesigner."+e}))}}],w={disabled:!1,buttonTheme:t.ButtonColorTheme.DEFAULT,buttonType:t.ButtonColorType.DEFAULT,icon:"",iconColor:"",buttonStyle:t.ButtonStyle.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""},z=[{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:e=>p(e)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:t.PropGroup.ButtonStyle,hidden:e=>!e.props.hasIcon||p(e),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:t.PropGroup.ButtonStyle,hidden:e=>p(e)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor||e.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.ButtonStyle,hidden:e=>!!e,_config:{options:Object.values(t.ButtonSize).map(e=>({value:e,label:"sys.pageDesigner."+e}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:t.PropGroup.ButtonStyle,hidden:e=>p(e),_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:e=>!e.props.confirm||p(e)}],$=[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:t.StyleGroup.LAYOUT,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation},{component:"margin-editor",group:t.StyleGroup.MARGIN,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation,_config:{hiddenMarginOrPadding:"padding"}}],v=[{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,...u},j=[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:t.PropGroup.BASIC,hidden:e=>e.platform===t.Platform.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:t.PropGroup.BASIC,hidden:e=>!e.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},...P],K=[{component:"permission-editor",label:"",group:t.PropGroup.PERMISSION,hidden:e=>p(e)}];function N(){if(!window._gct){console.error("未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}window._gct.message=new F}exports.baseBtnEditor=Y;exports.baseBtnProp=W;exports.buttonEditor=z;exports.buttonProps=w;exports.buttonStyleEditor=$;exports.default=N;exports.displayEditor=P;exports.displayProps=u;exports.fixedAlignEditor=v;exports.formItemDisplayEditor=j;exports.formItemProps=H;exports.getAutofillEditor=k;exports.hiddenButtonProps=p;exports.install=N;exports.notNeedPxStyle=C;exports.permissionEditor=K;exports.style=O;exports.useStyle=G;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("ant-design-vue"),d=require("vue"),t=require("@gct-paas/core"),r=require("lodash-es");class T{info(o,n){return new Promise(i=>{s.message.info(o,n,()=>{i()})})}success(o,n){return new Promise(i=>{s.message.success(o,n,()=>{i()})})}warning(o,n){return new Promise(i=>{s.message.warning(o,n,()=>{i()})})}error(o,n){return new Promise(i=>{s.message.error(o,n,()=>{i()})})}}const D={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"},g=["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"];function S(e){return e+"px"}const a={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:e=>e?700:400},italic:{attr:"fontStyle",callback:e=>e?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:e=>e?S(e):""},align:{attr:"textAlign"}},font(e){if(!e)return{};const o={};return Object.assign(o,r.pick(e,a.fontAttrs)),typeof a.mapAttrs=="object"&&Object.keys(a.mapAttrs).forEach(n=>{const{attr:i,callback:l}=a.mapAttrs[n];o[i]=typeof l=="function"?l(e[n]):e[n]}),o}};function x(e){const{style:o={},ignoringStyle:n=[]}=e||{},i=d.computed(()=>R(o)),l=d.computed(()=>{const c={position:r.isEmpty(o.position)?"":o.position+" !important",top:r.isEmpty(o.top)?"":o.top+"px !important",left:r.isEmpty(o.left)?"":o.left+"px !important",right:r.isEmpty(o.right)?"":o.right+"px !important",bottom:r.isEmpty(o.bottom)?"":o.bottom+"px !important",width:r.isEmpty(o.width)?"":o.width+"px !important",height:r.isEmpty(o.height)?"":o.height+"px !important",backgroundColor:r.isEmpty(o.backgroundColor)?"":o.backgroundColor+" !important",marginTop:r.isEmpty(o.marginTop)?"":o.marginTop+"px !important",marginRight:r.isEmpty(o.marginRight)?"":o.marginRight+"px !important",marginBottom:r.isEmpty(o.marginBottom)?"":o.marginBottom+"px !important",marginLeft:r.isEmpty(o.marginLeft)?"":o.marginLeft+"px !important",paddingTop:r.isEmpty(o.paddingTop)?"":o.paddingTop+"px !important",paddingRight:r.isEmpty(o.paddingRight)?"":o.paddingRight+"px !important",paddingBottom:r.isEmpty(o.paddingBottom)?"":o.paddingBottom+"px !important",paddingLeft:r.isEmpty(o.paddingLeft)?"":o.paddingLeft+"px !important",borderLeft:`${o.borderLeft?.borderWidth}px ${o.borderLeft?.borderStyle} ${o.borderLeft?.borderColor} !important`,borderRight:`${o.borderRight?.borderWidth}px ${o.borderRight?.borderStyle} ${o.borderRight?.borderColor} !important`,borderBottom:`${o.borderBottom?.borderWidth}px ${o.borderBottom?.borderStyle} ${o.borderBottom?.borderColor} !important`,borderTop:`${o.borderTop?.borderWidth}px ${o.borderTop?.borderStyle} ${o.borderTop?.borderColor} !important`,borderTopRightRadius:r.isEmpty(o.borderTopRightRadius)?"":o.borderTopRightRadius+"px !important",borderTopLeftRadius:r.isEmpty(o.borderTopLeftRadius)?"":o.borderTopLeftRadius+"px !important",borderBottomRightRadius:r.isEmpty(o.borderBottomRightRadius)?"":o.borderBottomRightRadius+"px !important",borderBottomLeftRadius:r.isEmpty(o.borderBottomLeftRadius)?"":o.borderBottomLeftRadius+"px !important"};return n.forEach(h=>{c[h]=void 0}),c}),f=d.computed(()=>a.font(o.labelFont)),E=d.computed(()=>a.font(o.contentFont));return{wrapperStyle:l,wStyle:i,labelFont:f,contentFont:E}}function R(e={}){const o={};for(const n in e)o[n]=B(n,e[n]);return o}function B(e,o){return r.isNil(o)||r.isEmpty(o)?"":g.includes(e)?o+" !important":o+"px !important"}const m=[t.FIELD_TYPE.REF,t.FIELD_TYPE.USER,t.FIELD_TYPE.ORG,t.FIELD_TYPE.RDO_REF,t.FIELD_TYPE.ATTACHMENT],C=({groupName:e})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!m.includes(o.props.fieldType)||o.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!m.includes(o.props.fieldType)||o.props.enableAutofill===!1||o.props.multiple}];function p(e){return Object.prototype.hasOwnProperty.call(e.props,"model")?!e.props.model:Object.prototype.hasOwnProperty.call(e.props,"refForm")?!e.props.refForm:!1}const u={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}}}},b=[{component:"dependency-editor",name:"componentDependency",label:"",group:t.PropGroup.COMPONENTDEPENDENCY,hidden:e=>e.materialType===t.MaterialEnum.MaterialEmbedTableField||e.type===t.FormComponents.Form&&e.preLocation?!0:p(e)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:t.PropGroup.FIELD_CONFIG,hidden(e){return!e.isField||!e.props.field||!!e.props.bindFieldKey||!!e.props.fieldReadonly||e.materialType===t.MaterialEnum.cardListFormField||[t.FIELD_TYPE.EXPRESSION_CONDITION,t.FIELD_TYPE.SERIALRULE,t.FIELD_TYPE.LABEL_TEMPLATE].includes(e.props.fieldType)}}],P={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:"",...u},N=[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:t.PropGroup.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(e,o)=>{e.alias=o}},{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:e=>!e.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.BUTTON,_config:{options:Object.values(t.ButtonSize).map(e=>({value:e,label:"sys.pageDesigner."+e}))}}],L={disabled:!1,buttonTheme:t.ButtonColorTheme.DEFAULT,buttonType:t.ButtonColorType.DEFAULT,icon:"",iconColor:"",buttonStyle:t.ButtonStyle.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""},I=[{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:e=>p(e)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:t.PropGroup.ButtonStyle,hidden:e=>!e.props.hasIcon||p(e),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:t.PropGroup.ButtonStyle,hidden:e=>p(e)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:t.PropGroup.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor||e.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:t.PropGroup.ButtonStyle,hidden:e=>!!e,_config:{options:Object.values(t.ButtonSize).map(e=>({value:e,label:"sys.pageDesigner."+e}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:t.PropGroup.ButtonStyle,hidden:e=>p(e),_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:e=>!e.props.confirm||p(e)}],A=[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:t.StyleGroup.LAYOUT,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation},{component:"margin-editor",group:t.StyleGroup.MARGIN,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation,_config:{hiddenMarginOrPadding:"padding"}}],F=[{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}]}}],O={field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...u},_=[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:t.PropGroup.BASIC,hidden:e=>e.platform===t.Platform.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:t.PropGroup.BASIC,hidden:e=>!e.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},...b],G=[{component:"permission-editor",label:"",group:t.PropGroup.PERMISSION,hidden:e=>p(e)}];function y(){if(!window._gct){console.error("未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}window._gct.message=new T}exports.baseBtnEditor=N;exports.baseBtnProp=P;exports.buttonEditor=I;exports.buttonProps=L;exports.buttonStyleEditor=A;exports.default=y;exports.displayEditor=b;exports.displayProps=u;exports.fixedAlignEditor=F;exports.formItemDisplayEditor=_;exports.formItemProps=O;exports.getAutofillEditor=C;exports.hiddenButtonProps=p;exports.install=y;exports.notNeedPxStyle=g;exports.permissionEditor=G;exports.style=D;exports.useStyle=x;
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["ant-design-vue","vue","@gct-paas/core","lodash-es"],(function(a,to){"use strict";var u,b,d,D,h,l,c,R,r,T,C,m,B,E,x,N,S,f,A,n,I,L;return{setters:[t=>{u=t.message},t=>{b=t.computed},t=>{d=t.BorderStyle,D=t.TagTypeEnum,h=t.TextDecoration,l=t.FIELD_TYPE,c=t.Dependency_ENUM,R=t.ASSIGNMENTSTRATEGY_ENUM,r=t.PropGroup,T=t.MaterialEnum,C=t.FormComponents,m=t.ButtonSize,B=t.ButtonType,E=t.ButtonStyle,x=t.ButtonColorType,N=t.ButtonColorTheme,S=t.StyleGroup,f=t.fixedAlignENUM,A=t.Platform},t=>{n=t.isEmpty,I=t.pick,L=t.isNil}],execute:(function(){a({default:P,hiddenButtonProps:s,install:P,useStyle:Q});class t{info(o,i){return new Promise(p=>{u.info(o,i,()=>{p()})})}success(o,i){return new Promise(p=>{u.success(o,i,()=>{p()})})}warning(o,i){return new Promise(p=>{u.warning(o,i,()=>{p()})})}error(o,i){return new Promise(p=>{u.error(o,i,()=>{p()})})}}const ro=a("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:h.NONE,color:""},contentFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:h.NONE,color:""},tagStyle:{color:"",tagType:D.RADIUS},tagStyleOpen:!1,borderAll:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderLeft:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderRight:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderBottom:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTop:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTopRightRadius:"0",borderTopLeftRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderAllRadius:"0"}),K=a("notNeedPxStyle",["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"]);function V(e){return e+"px"}const g={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:e=>e?700:400},italic:{attr:"fontStyle",callback:e=>e?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:e=>e?V(e):""},align:{attr:"textAlign"}},font(e){if(!e)return{};const o={};return Object.assign(o,I(e,g.fontAttrs)),typeof g.mapAttrs=="object"&&Object.keys(g.mapAttrs).forEach(i=>{const{attr:p,callback:y}=g.mapAttrs[i];o[p]=typeof y=="function"?y(e[i]):e[i]}),o}};function Q(e){const{style:o={},ignoringStyle:i=[]}=e||{},p=b(()=>X(o)),y=b(()=>{var M,U,k,W,w,G,$,z,Y,v,H,j;const _={position:n(o.position)?"":o.position+" !important",top:n(o.top)?"":o.top+"px !important",left:n(o.left)?"":o.left+"px !important",right:n(o.right)?"":o.right+"px !important",bottom:n(o.bottom)?"":o.bottom+"px !important",width:n(o.width)?"":o.width+"px !important",height:n(o.height)?"":o.height+"px !important",backgroundColor:n(o.backgroundColor)?"":o.backgroundColor+" !important",marginTop:n(o.marginTop)?"":o.marginTop+"px !important",marginRight:n(o.marginRight)?"":o.marginRight+"px !important",marginBottom:n(o.marginBottom)?"":o.marginBottom+"px !important",marginLeft:n(o.marginLeft)?"":o.marginLeft+"px !important",paddingTop:n(o.paddingTop)?"":o.paddingTop+"px !important",paddingRight:n(o.paddingRight)?"":o.paddingRight+"px !important",paddingBottom:n(o.paddingBottom)?"":o.paddingBottom+"px !important",paddingLeft:n(o.paddingLeft)?"":o.paddingLeft+"px !important",borderLeft:`${(M=o.borderLeft)==null?void 0:M.borderWidth}px ${(U=o.borderLeft)==null?void 0:U.borderStyle} ${(k=o.borderLeft)==null?void 0:k.borderColor} !important`,borderRight:`${(W=o.borderRight)==null?void 0:W.borderWidth}px ${(w=o.borderRight)==null?void 0:w.borderStyle} ${(G=o.borderRight)==null?void 0:G.borderColor} !important`,borderBottom:`${($=o.borderBottom)==null?void 0:$.borderWidth}px ${(z=o.borderBottom)==null?void 0:z.borderStyle} ${(Y=o.borderBottom)==null?void 0:Y.borderColor} !important`,borderTop:`${(v=o.borderTop)==null?void 0:v.borderWidth}px ${(H=o.borderTop)==null?void 0:H.borderStyle} ${(j=o.borderTop)==null?void 0:j.borderColor} !important`,borderTopRightRadius:n(o.borderTopRightRadius)?"":o.borderTopRightRadius+"px !important",borderTopLeftRadius:n(o.borderTopLeftRadius)?"":o.borderTopLeftRadius+"px !important",borderBottomRightRadius:n(o.borderBottomRightRadius)?"":o.borderBottomRightRadius+"px !important",borderBottomLeftRadius:n(o.borderBottomLeftRadius)?"":o.borderBottomLeftRadius+"px !important"};return i.forEach(eo=>{_[eo]=void 0}),_}),Z=b(()=>g.font(o.labelFont)),oo=b(()=>g.font(o.contentFont));return{wrapperStyle:y,wStyle:p,labelFont:Z,contentFont:oo}}function X(e={}){const o={};for(const i in e)o[i]=q(i,e[i]);return o}function q(e,o){return L(o)||n(o)?"":K.includes(e)?o+" !important":o+"px !important"}const F=[l.REF,l.USER,l.ORG,l.RDO_REF,l.ATTACHMENT],no=a("getAutofillEditor",({groupName:e})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!F.includes(o.props.fieldType)||o.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!F.includes(o.props.fieldType)||o.props.enableAutofill===!1||o.props.multiple}]);function s(e){return Object.prototype.hasOwnProperty.call(e.props,"model")?!e.props.model:Object.prototype.hasOwnProperty.call(e.props,"refForm")?!e.props.refForm:!1}const O=a("displayProps",{hidden:!1,componentDependency:{sortDependency:[],configDependency:{[c.HIDDEN]:{expression:""},[c.READONLY]:{expression:""},[c.DISABLED]:{expression:""},[c.REQUIRED]:{expression:""},[c.ASSIGNMENT]:{expression:"",strategy:R.alwaysCover}}}}),J=a("displayEditor",[{component:"dependency-editor",name:"componentDependency",label:"",group:r.COMPONENTDEPENDENCY,hidden:e=>e.materialType===T.MaterialEmbedTableField||e.type===C.Form&&e.preLocation?!0:s(e)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:r.FIELD_CONFIG,hidden(e){return!e.isField||!e.props.field||!!e.props.bindFieldKey||!!e.props.fieldReadonly||e.materialType===T.cardListFormField||[l.EXPRESSION_CONDITION,l.SERIALRULE,l.LABEL_TEMPLATE].includes(e.props.fieldType)}}]),io=a("baseBtnProp",{disabled:!1,icon:"icon-park:all-application",iconColor:"",title:"${sys.pageDesigner.button}",buttonStyle:E.ORDINARY,confirm:!1,confirmText:"",hasIcon:!1,hasText:!0,type:B.PRIMARY,danger:!1,size:m.DEFAULT,enableCustomColor:!1,backgroundColor:"",fontColor:"",...O}),ao=a("baseBtnEditor",[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:r.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(e,o)=>{e.alias=o}},{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:e=>!e.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.BUTTON,_config:{options:Object.values(m).map(e=>({value:e,label:"sys.pageDesigner."+e}))}}]),po=a("buttonProps",{disabled:!1,buttonTheme:N.DEFAULT,buttonType:x.DEFAULT,icon:"",iconColor:"",buttonStyle:E.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""}),lo=a("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:e=>s(e)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:r.ButtonStyle,hidden:e=>!e.props.hasIcon||s(e),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:r.ButtonStyle,hidden:e=>s(e)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor||e.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.ButtonStyle,hidden:e=>!!e,_config:{options:Object.values(m).map(e=>({value:e,label:"sys.pageDesigner."+e}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:r.ButtonStyle,hidden:e=>s(e),_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:e=>!e.props.confirm||s(e)}]),so=a("buttonStyleEditor",[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:S.LAYOUT,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation},{component:"margin-editor",group:S.MARGIN,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation,_config:{hiddenMarginOrPadding:"padding"}}]),co=a("fixedAlignEditor",[{component:"radio-icon-editor",name:"fixedAlign",label:"sys.pageDesigner.columnFixed",group:r.SHOW,_config:{options:[{label:"sys.pageDesigner.left",value:f.LEFT},{label:"sys.pageDesigner.none",value:f.NONE},{label:"sys.pageDesigner.right",value:f.RIGHT}]}}]),go=a("formItemProps",{field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...O}),uo=a("formItemDisplayEditor",[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:r.BASIC,hidden:e=>e.platform===A.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:r.BASIC,hidden:e=>!e.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},...J]),bo=a("permissionEditor",[{component:"permission-editor",label:"",group:r.PERMISSION,hidden:e=>s(e)}]);function P(){if(!window._gct){console.error("未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}window._gct.message=new t}})}}));
|
|
1
|
+
System.register(["ant-design-vue","vue","@gct-paas/core","lodash-es"],(function(a,v){"use strict";var u,b,d,D,h,l,c,R,r,T,C,m,B,E,x,N,S,f,A,n,I,L;return{setters:[t=>{u=t.message},t=>{b=t.computed},t=>{d=t.BorderStyle,D=t.TagTypeEnum,h=t.TextDecoration,l=t.FIELD_TYPE,c=t.Dependency_ENUM,R=t.ASSIGNMENTSTRATEGY_ENUM,r=t.PropGroup,T=t.MaterialEnum,C=t.FormComponents,m=t.ButtonSize,B=t.ButtonType,E=t.ButtonStyle,x=t.ButtonColorType,N=t.ButtonColorTheme,S=t.StyleGroup,f=t.fixedAlignENUM,A=t.Platform},t=>{n=t.isEmpty,I=t.pick,L=t.isNil}],execute:(function(){a({default:P,hiddenButtonProps:s,install:P,useStyle:k});class t{info(o,i){return new Promise(p=>{u.info(o,i,()=>{p()})})}success(o,i){return new Promise(p=>{u.success(o,i,()=>{p()})})}warning(o,i){return new Promise(p=>{u.warning(o,i,()=>{p()})})}error(o,i){return new Promise(p=>{u.error(o,i,()=>{p()})})}}const H=a("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:h.NONE,color:""},contentFont:{align:"left",fontSize:"",bold:!1,italic:!1,textDecoration:h.NONE,color:""},tagStyle:{color:"",tagType:D.RADIUS},tagStyleOpen:!1,borderAll:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderLeft:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderRight:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderBottom:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTop:{borderStyle:d.NONE,borderColor:"#F0F0F0",borderWidth:"1"},borderTopRightRadius:"0",borderTopLeftRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",borderAllRadius:"0"}),M=a("notNeedPxStyle",["position","backgroundColor","bold","italic","textDecoration","color","borderStyle","borderColor"]);function U(e){return e+"px"}const g={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:e=>e?700:400},italic:{attr:"fontStyle",callback:e=>e?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:e=>e?U(e):""},align:{attr:"textAlign"}},font(e){if(!e)return{};const o={};return Object.assign(o,I(e,g.fontAttrs)),typeof g.mapAttrs=="object"&&Object.keys(g.mapAttrs).forEach(i=>{const{attr:p,callback:y}=g.mapAttrs[i];o[p]=typeof y=="function"?y(e[i]):e[i]}),o}};function k(e){const{style:o={},ignoringStyle:i=[]}=e||{},p=b(()=>W(o)),y=b(()=>{const _={position:n(o.position)?"":o.position+" !important",top:n(o.top)?"":o.top+"px !important",left:n(o.left)?"":o.left+"px !important",right:n(o.right)?"":o.right+"px !important",bottom:n(o.bottom)?"":o.bottom+"px !important",width:n(o.width)?"":o.width+"px !important",height:n(o.height)?"":o.height+"px !important",backgroundColor:n(o.backgroundColor)?"":o.backgroundColor+" !important",marginTop:n(o.marginTop)?"":o.marginTop+"px !important",marginRight:n(o.marginRight)?"":o.marginRight+"px !important",marginBottom:n(o.marginBottom)?"":o.marginBottom+"px !important",marginLeft:n(o.marginLeft)?"":o.marginLeft+"px !important",paddingTop:n(o.paddingTop)?"":o.paddingTop+"px !important",paddingRight:n(o.paddingRight)?"":o.paddingRight+"px !important",paddingBottom:n(o.paddingBottom)?"":o.paddingBottom+"px !important",paddingLeft:n(o.paddingLeft)?"":o.paddingLeft+"px !important",borderLeft:`${o.borderLeft?.borderWidth}px ${o.borderLeft?.borderStyle} ${o.borderLeft?.borderColor} !important`,borderRight:`${o.borderRight?.borderWidth}px ${o.borderRight?.borderStyle} ${o.borderRight?.borderColor} !important`,borderBottom:`${o.borderBottom?.borderWidth}px ${o.borderBottom?.borderStyle} ${o.borderBottom?.borderColor} !important`,borderTop:`${o.borderTop?.borderWidth}px ${o.borderTop?.borderStyle} ${o.borderTop?.borderColor} !important`,borderTopRightRadius:n(o.borderTopRightRadius)?"":o.borderTopRightRadius+"px !important",borderTopLeftRadius:n(o.borderTopLeftRadius)?"":o.borderTopLeftRadius+"px !important",borderBottomRightRadius:n(o.borderBottomRightRadius)?"":o.borderBottomRightRadius+"px !important",borderBottomLeftRadius:n(o.borderBottomLeftRadius)?"":o.borderBottomLeftRadius+"px !important"};return i.forEach(Y=>{_[Y]=void 0}),_}),$=b(()=>g.font(o.labelFont)),z=b(()=>g.font(o.contentFont));return{wrapperStyle:y,wStyle:p,labelFont:$,contentFont:z}}function W(e={}){const o={};for(const i in e)o[i]=w(i,e[i]);return o}function w(e,o){return L(o)||n(o)?"":M.includes(e)?o+" !important":o+"px !important"}const F=[l.REF,l.USER,l.ORG,l.RDO_REF,l.ATTACHMENT],j=a("getAutofillEditor",({groupName:e})=>[{component:"switch-editor",name:"enableAutofill",label:"sys.pageDesigner.autofill",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!F.includes(o.props.fieldType)||o.props.multiple},{component:"autofill-editor",name:"autofillRules",label:"",group:e,hidden:o=>o.props.bindFieldKey||o.props.fieldReadonly?!0:!F.includes(o.props.fieldType)||o.props.enableAutofill===!1||o.props.multiple}]);function s(e){return Object.prototype.hasOwnProperty.call(e.props,"model")?!e.props.model:Object.prototype.hasOwnProperty.call(e.props,"refForm")?!e.props.refForm:!1}const O=a("displayProps",{hidden:!1,componentDependency:{sortDependency:[],configDependency:{[c.HIDDEN]:{expression:""},[c.READONLY]:{expression:""},[c.DISABLED]:{expression:""},[c.REQUIRED]:{expression:""},[c.ASSIGNMENT]:{expression:"",strategy:R.alwaysCover}}}}),G=a("displayEditor",[{component:"dependency-editor",name:"componentDependency",label:"",group:r.COMPONENTDEPENDENCY,hidden:e=>e.materialType===T.MaterialEmbedTableField||e.type===C.Form&&e.preLocation?!0:s(e)},{component:"switch-editor",name:"notSubmitInHide",label:"sys.pageDesigner.submitWhenHidden",group:r.FIELD_CONFIG,hidden(e){return!e.isField||!e.props.field||!!e.props.bindFieldKey||!!e.props.fieldReadonly||e.materialType===T.cardListFormField||[l.EXPRESSION_CONDITION,l.SERIALRULE,l.LABEL_TEMPLATE].includes(e.props.fieldType)}}]),K=a("baseBtnProp",{disabled:!1,icon:"icon-park:all-application",iconColor:"",title:"${sys.pageDesigner.button}",buttonStyle:E.ORDINARY,confirm:!1,confirmText:"",hasIcon:!1,hasText:!0,type:B.PRIMARY,danger:!1,size:m.DEFAULT,enableCustomColor:!1,backgroundColor:"",fontColor:"",...O}),V=a("baseBtnEditor",[{component:"text-editor",name:"title",label:"sys.pageDesigner.buttonName",group:r.BASIC,_config:{i18n:!0,showCount:!0,maxlength:32},changeCallback:(e,o)=>{e.alias=o}},{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:e=>!e.props.hasIcon},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.BUTTON,_config:{options:Object.values(m).map(e=>({value:e,label:"sys.pageDesigner."+e}))}}]),Q=a("buttonProps",{disabled:!1,buttonTheme:N.DEFAULT,buttonType:x.DEFAULT,icon:"",iconColor:"",buttonStyle:E.ORDINARY,enableCustomColor:!1,backgroundColor:"",fontColor:""}),X=a("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:e=>s(e)},{component:"icon-editor",name:{icon:"icon",iconColor:"iconColor"},label:"sys.pageDesigner.buttonIcon",group:r.ButtonStyle,hidden:e=>!e.props.hasIcon||s(e),_config:{clearable:!1}},{component:"switch-editor",name:"enableCustomColor",label:"sys.pageDesigner.customBtnColor",group:r.ButtonStyle,hidden:e=>s(e)},{component:"button-color-editor",name:"fontColor",label:"sys.pageDesigner.buttonNameColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor},{component:"button-color-editor",name:"backgroundColor",label:"sys.pageDesigner.buttonStyleColor",group:r.ButtonStyle,_config:{isInRow:!0},hidden:e=>!e.props.enableCustomColor||e.props.type==="link"},{component:"radio-bgc-editor",name:"size",label:"sys.pageDesigner.buttonSize",group:r.ButtonStyle,hidden:e=>!!e,_config:{options:Object.values(m).map(e=>({value:e,label:"sys.pageDesigner."+e}))}},{component:"switch-editor",name:"confirm",label:"sys.pageDesigner.confirm",group:r.ButtonStyle,hidden:e=>s(e),_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:e=>!e.props.confirm||s(e)}]),q=a("buttonStyleEditor",[{component:"position-editor",name:"position",label:"sys.pageDesigner.position",group:S.LAYOUT,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation},{component:"margin-editor",group:S.MARGIN,hidden:e=>!!e.props.parentWidgetId||!!e.preLocation,_config:{hiddenMarginOrPadding:"padding"}}]),J=a("fixedAlignEditor",[{component:"radio-icon-editor",name:"fixedAlign",label:"sys.pageDesigner.columnFixed",group:r.SHOW,_config:{options:[{label:"sys.pageDesigner.left",value:f.LEFT},{label:"sys.pageDesigner.none",value:f.NONE},{label:"sys.pageDesigner.right",value:f.RIGHT}]}}]),Z=a("formItemProps",{field:"",fieldId:"",label:"",modelKey:"",fieldType:void 0,bindModelKey:void 0,disabled:!1,explain:"",showExplain:!1,displayLabelText:!0,readonly:!1,fieldReadonly:!1,notSubmitInHide:!0,...O}),oo=a("formItemDisplayEditor",[{component:"switch-editor",name:"showExplain",label:"sys.pageDesigner.explain",group:r.BASIC,hidden:e=>e.platform===A.MOBILE},{component:"texteare-editor",name:"explain",label:"",group:r.BASIC,hidden:e=>!e.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},...G]),eo=a("permissionEditor",[{component:"permission-editor",label:"",group:r.PERMISSION,hidden:e=>s(e)}]);function P(){if(!window._gct){console.error("未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!");return}window._gct.message=new t}})}}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.1.4-dev.
|
|
3
|
+
"version": "0.1.4-dev.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@gct-paas/build": "0.1.4-dev.
|
|
45
|
-
"@gct-paas/core": "0.1.4-dev.
|
|
44
|
+
"@gct-paas/build": "0.1.4-dev.3",
|
|
45
|
+
"@gct-paas/core": "0.1.4-dev.3",
|
|
46
46
|
"ant-design-vue": "3.2.20",
|
|
47
47
|
"lodash-es": "^4.17.21",
|
|
48
48
|
"lokijs": "^1.5.12",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/lokijs": "^1.5.14"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "caa65b07a6bbfb27d41911da2f5459567db38b1d"
|
|
59
59
|
}
|