@viamedici-spc/configurator-framer-bundle 0.1.0-alpha0003 → 0.1.0-alpha0004

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.cjs CHANGED
@@ -202,7 +202,7 @@ ${JSON.stringify(t,null,2)}`)}var da=(t=>(t.ConfigurationEngineRestApiUnauthoriz
202
202
  height: 100% !important;
203
203
  }
204
204
  }
205
- `;function Bg(t){const{hcaBaseUrl:e,sessionCreation:n,accessToken:r,sessionCreateUrl:i,sessionDeleteUrl:o,deploymentName:a,channel:u,children:s,style:c}=t,l=X.jsx(DR,{style:c,className:bO(t.overrideChildrenSize&&"override-children-size"),children:s});if(_o())return l;const d=R.useMemo(()=>xR({hcaEngineBaseUrl:$R(e,"api","engine"),sessionHandler:H(n).with("client-side",()=>({accessToken:r})).with("server-side",()=>({sessionCreateUrl:i,sessionDeleteUrl:o})).exhaustive()}),[e,n,r,i,o]);return X.jsx(c1,{configuratorClient:d,configurationModelSource:{type:Lr.Channel,channel:u,deploymentName:a},children:X.jsx(R.Suspense,{children:X.jsx(f1,{children:l})})})}pt.addPropertyControls(Bg,{children:{title:"Children",type:pt.ControlType.ComponentInstance},channel:{type:pt.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:pt.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:pt.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:pt.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:pt.ControlType.String,obscured:!0,hidden:t=>t.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:pt.ControlType.String,hidden:t=>t.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:pt.ControlType.String,hidden:t=>t.sessionCreation!=="server-side"},overrideChildrenSize:{type:pt.ControlType.Boolean,title:"Override Children Size",defaultValue:!0}});const OR={attributeId:{title:"Attribute Id",type:pt.ControlType.String,defaultValue:"Engine"},componentPath:{title:"Component Path",type:pt.ControlType.String},sharedConfigurationModel:{title:"Shared Configuration Model",type:pt.ControlType.String}},Vg={padding:{type:pt.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}},NR=t=>({paddingTop:t.isMixedPadding?t.paddingTop:t.padding,paddingRight:t.isMixedPadding?t.paddingRight:t.padding,paddingBottom:t.isMixedPadding?t.paddingBottom:t.padding,paddingLeft:t.isMixedPadding?t.paddingLeft:t.padding}),PR={radius:{title:"Radius",type:pt.ControlType.Number,defaultValue:6},...Vg,border:{title:"Border",type:pt.ControlType.Object,controls:{color:{type:pt.ControlType.Color,title:"Color"},width:{type:pt.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}}}},MR=t=>{var e,n,r,i,o,a,u,s,c,l,d,f,h;return{borderRadius:t.radius,borderColor:(e=t.border)==null?void 0:e.color,borderTopWidth:(n=t.border)!=null&&n.isMixedWidth?(r=t.border)==null?void 0:r.widthTop:(i=t.border)==null?void 0:i.width,borderRightWidth:(o=t.border)!=null&&o.isMixedWidth?(a=t.border)==null?void 0:a.widthRight:(u=t.border)==null?void 0:u.width,borderBottomWidth:(s=t.border)!=null&&s.isMixedWidth?(c=t.border)==null?void 0:c.widthBottom:(l=t.border)==null?void 0:l.width,borderLeftWidth:(d=t.border)!=null&&d.isMixedWidth?(f=t.border)==null?void 0:f.widthLeft:(h=t.border)==null?void 0:h.width}},RR={fill:{title:"Fill",type:pt.ControlType.Color,defaultValue:"#EBEBEB"},...Vg,...PR},_R=t=>({...NR(t),...MR(t),backgroundColor:t.fill}),jR={color:{title:"Color",type:pt.ControlType.Color,defaultValue:"black"},fontSize:{title:"Font size",type:pt.ControlType.Number,defaultValue:16}},qR=t=>({color:t.color,fontSize:t.fontSize}),np={type:pt.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:pt.ControlType.Color,optional:!0},color:{title:"Color",type:pt.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:pt.ControlType.Color,optional:!0}}},Fg={...OR,...jR,...RR,implicitLabelPrefix:{title:"Implicit Label Prefix",type:pt.ControlType.String,defaultValue:"Implicit: "},unsatisfiedColors:{...np,title:"Unsatisfied Colors"},implicitSelectedColors:{...np,title:"Implicit Selected Colors"}},Kl=(t,e,n)=>{var r,i,o,a,u,s;const c=_R(t),l=qR(t);return{...c,...l,backgroundColor:H({isSatisfied:e,isImplicitSelected:n,unsatisfiedFill:(r=t.unsatisfiedColors)==null?void 0:r.fill,implicitSelectedFill:(i=t.implicitSelectedColors)==null?void 0:i.fill}).with({isSatisfied:!1,unsatisfiedFill:Mt.string.minLength(1)},d=>d.unsatisfiedFill).with({isImplicitSelected:!0,implicitSelectedFill:Mt.string.minLength(1)},d=>d.implicitSelectedFill).otherwise(()=>c.backgroundColor),borderColor:H({isSatisfied:e,isImplicitSelected:n,unsatisfiedBorderColor:(o=t.unsatisfiedColors)==null?void 0:o.borderColor,implicitSelectedBorderColor:(a=t.implicitSelectedColors)==null?void 0:a.borderColor}).with({isSatisfied:!1,unsatisfiedBorderColor:Mt.string.minLength(1)},d=>d.unsatisfiedBorderColor).with({isImplicitSelected:!0,implicitSelectedBorderColor:Mt.string.minLength(1)},d=>d.implicitSelectedBorderColor).otherwise(()=>c.borderColor),color:H({isSatisfied:e,isImplicitSelected:n,unsatisfiedColor:(u=t.unsatisfiedColors)==null?void 0:u.color,implicitSelectedColor:(s=t.implicitSelectedColors)==null?void 0:s.color}).with({isSatisfied:!1,unsatisfiedColor:Mt.string.minLength(1)},d=>d.unsatisfiedColor).with({isImplicitSelected:!0,implicitSelectedColor:Mt.string.minLength(1)},d=>d.implicitSelectedColor).otherwise(()=>l.color),...t.style}},cd={...Fg,resetLabel:{title:"Reset Label",type:pt.ControlType.String,defaultValue:"Reset"}},fo=(t,e,n)=>Kl(t,e,n);function cc(t){var e;return{localId:t.attributeId,componentPath:t.componentPath===""?[]:((e=t.componentPath)==null?void 0:e.split(" -> "))??[],sharedConfigurationModelId:t.sharedConfigurationModel===""?null:t.sharedConfigurationModel}}const rp=No.select`
205
+ `;function Bg(t){const{hcaBaseUrl:e,sessionCreation:n,accessToken:r,sessionCreateUrl:i,sessionDeleteUrl:o,deploymentName:a,channel:u,children:s,style:c}=t,l=X.jsx(DR,{style:c,className:bO(t.overrideChildrenSize&&"override-children-size"),children:s});if(_o())return l;const d=R.useMemo(()=>xR({hcaEngineBaseUrl:$R(e,"api","engine"),sessionHandler:H(n).with("client-side",()=>({accessToken:r})).with("server-side",()=>({sessionCreateUrl:i,sessionDeleteUrl:o})).exhaustive()}),[e,n,r,i,o]);return X.jsx(c1,{configuratorClient:d,configurationModelSource:{type:Lr.Channel,channel:u,deploymentName:a},children:X.jsx(R.Suspense,{children:X.jsx(f1,{children:l})})})}pt.addPropertyControls(Bg,{children:{title:"Children",type:pt.ControlType.ComponentInstance},channel:{type:pt.ControlType.String,title:"Channel",defaultValue:"release"},deploymentName:{type:pt.ControlType.String,title:"Deployment Name"},hcaBaseUrl:{title:"HCA Base URL",type:pt.ControlType.String,defaultValue:"https://spc.cloud.ceventis.de/hca"},sessionCreation:{title:"Session Creation",type:pt.ControlType.Enum,displaySegmentedControl:!0,segmentedControlDirection:"horizontal",defaultValue:"client-side",options:["client-side","server-side"]},accessToken:{title:"HCA Access Token",type:pt.ControlType.String,obscured:!0,hidden:t=>t.sessionCreation!=="client-side"},sessionCreateUrl:{title:"Create Session URl",type:pt.ControlType.String,hidden:t=>t.sessionCreation!=="server-side"},sessionDeleteUrl:{title:"Close Session URl",type:pt.ControlType.String,hidden:t=>t.sessionCreation!=="server-side"},overrideChildrenSize:{type:pt.ControlType.Boolean,title:"Override Children Size",defaultValue:!0}});const OR={attributeId:{title:"Attribute Id",type:pt.ControlType.String},componentPath:{title:"Component Path",type:pt.ControlType.String},sharedConfigurationModel:{title:"Shared Configuration Model",type:pt.ControlType.String}},Vg={padding:{type:pt.ControlType.FusedNumber,title:"Padding",toggleKey:"isMixedPadding",toggleTitles:["Padding","Padding per Side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}},NR=t=>({paddingTop:t.isMixedPadding?t.paddingTop:t.padding,paddingRight:t.isMixedPadding?t.paddingRight:t.padding,paddingBottom:t.isMixedPadding?t.paddingBottom:t.padding,paddingLeft:t.isMixedPadding?t.paddingLeft:t.padding}),PR={radius:{title:"Radius",type:pt.ControlType.Number,defaultValue:6},...Vg,border:{title:"Border",type:pt.ControlType.Object,controls:{color:{type:pt.ControlType.Color,title:"Color"},width:{type:pt.ControlType.FusedNumber,title:"Width",toggleKey:"isMixedWidth",toggleTitles:["Width","Width per Side"],valueKeys:["widthTop","widthRight","widthBottom","widthLeft"],valueLabels:["Top","Right","Bottom","Left"],min:0,defaultValue:0}}}},MR=t=>{var e,n,r,i,o,a,u,s,c,l,d,f,h;return{borderRadius:t.radius,borderColor:(e=t.border)==null?void 0:e.color,borderTopWidth:(n=t.border)!=null&&n.isMixedWidth?(r=t.border)==null?void 0:r.widthTop:(i=t.border)==null?void 0:i.width,borderRightWidth:(o=t.border)!=null&&o.isMixedWidth?(a=t.border)==null?void 0:a.widthRight:(u=t.border)==null?void 0:u.width,borderBottomWidth:(s=t.border)!=null&&s.isMixedWidth?(c=t.border)==null?void 0:c.widthBottom:(l=t.border)==null?void 0:l.width,borderLeftWidth:(d=t.border)!=null&&d.isMixedWidth?(f=t.border)==null?void 0:f.widthLeft:(h=t.border)==null?void 0:h.width}},RR={fill:{title:"Fill",type:pt.ControlType.Color,defaultValue:"#EBEBEB"},...Vg,...PR},_R=t=>({...NR(t),...MR(t),backgroundColor:t.fill}),jR={color:{title:"Color",type:pt.ControlType.Color,defaultValue:"black"},fontSize:{title:"Font size",type:pt.ControlType.Number,defaultValue:16}},qR=t=>({color:t.color,fontSize:t.fontSize}),np={type:pt.ControlType.Object,optional:!0,controls:{fill:{title:"Fill",type:pt.ControlType.Color,optional:!0},color:{title:"Color",type:pt.ControlType.Color,optional:!0},borderColor:{title:"Border Color",type:pt.ControlType.Color,optional:!0}}},Fg={...OR,...jR,...RR,implicitLabelPrefix:{title:"Implicit Label Prefix",type:pt.ControlType.String,defaultValue:"Implicit: "},unsatisfiedColors:{...np,title:"Unsatisfied Colors"},implicitSelectedColors:{...np,title:"Implicit Selected Colors"}},Kl=(t,e,n)=>{var r,i,o,a,u,s;const c=_R(t),l=qR(t);return{...c,...l,backgroundColor:H({isSatisfied:e,isImplicitSelected:n,unsatisfiedFill:(r=t.unsatisfiedColors)==null?void 0:r.fill,implicitSelectedFill:(i=t.implicitSelectedColors)==null?void 0:i.fill}).with({isSatisfied:!1,unsatisfiedFill:Mt.string.minLength(1)},d=>d.unsatisfiedFill).with({isImplicitSelected:!0,implicitSelectedFill:Mt.string.minLength(1)},d=>d.implicitSelectedFill).otherwise(()=>c.backgroundColor),borderColor:H({isSatisfied:e,isImplicitSelected:n,unsatisfiedBorderColor:(o=t.unsatisfiedColors)==null?void 0:o.borderColor,implicitSelectedBorderColor:(a=t.implicitSelectedColors)==null?void 0:a.borderColor}).with({isSatisfied:!1,unsatisfiedBorderColor:Mt.string.minLength(1)},d=>d.unsatisfiedBorderColor).with({isImplicitSelected:!0,implicitSelectedBorderColor:Mt.string.minLength(1)},d=>d.implicitSelectedBorderColor).otherwise(()=>c.borderColor),color:H({isSatisfied:e,isImplicitSelected:n,unsatisfiedColor:(u=t.unsatisfiedColors)==null?void 0:u.color,implicitSelectedColor:(s=t.implicitSelectedColors)==null?void 0:s.color}).with({isSatisfied:!1,unsatisfiedColor:Mt.string.minLength(1)},d=>d.unsatisfiedColor).with({isImplicitSelected:!0,implicitSelectedColor:Mt.string.minLength(1)},d=>d.implicitSelectedColor).otherwise(()=>l.color),...t.style}},cd={...Fg,resetLabel:{title:"Reset Label",type:pt.ControlType.String,defaultValue:"Reset"}},fo=(t,e,n)=>Kl(t,e,n);function cc(t){var e;return{localId:t.attributeId,componentPath:t.componentPath===""?[]:((e=t.componentPath)==null?void 0:e.split(" -> "))??[],sharedConfigurationModelId:t.sharedConfigurationModel===""?null:t.sharedConfigurationModel}}const rp=No.select`
206
206
  color: inherit;
207
207
  `,ip="<reset>",op="<nothing>";function Lg(t){return X.jsx(Xu,{fallbackRender:()=>X.jsx("span",{children:"Component crashed"}),children:X.jsx(kR,{...t})})}function kR(t){if(_o()){const S=fo(t,!0,!1);return X.jsx(rp,{style:S})}const e=cc(t),n=YD(e);if(!n)return X.jsx("span",{children:"Choice Attribute not found"});const{attribute:r,makeDecision:i}=n,o=oa.getAllowedChoiceValues(r),a=oa.getBlockedChoiceValues(r),u=oa.isMultiSelect(r),s=oa.getSelectedChoiceValues(r),c=s.map(S=>S.id),l=c[0]??op,d=s.some(S=>{var C;return((C=S.decision)==null?void 0:C.kind)===be.Explicit}),f=c.length>=1,h=s.some(S=>{var C;return((C=S.decision)==null?void 0:C.kind)===be.Implicit}),v=async S=>{if(S===ip)c.length===1&&await i(l,void 0);else if(o.some(C=>C.id===S)){const C=c.some(w=>w===S)?void 0:Gr.Included;await i(S,C)}else alert("Explain is not supported yet.")},p=fo(t,r.isSatisfied,h);return X.jsxs(rp,{value:u?c:l,multiple:u,onChange:S=>v(S.currentTarget.value),style:p,children:[!f&&X.jsx("option",{value:op}),d&&X.jsx("option",{value:ip,children:t.resetLabel}),o.map(S=>{var C;return X.jsxs("option",{value:S.id,children:[((C=S.decision)==null?void 0:C.kind)===be.Implicit?t.implicitLabelPrefix:"",S.id]},S.id)}),a.length>0&&X.jsx("optgroup",{label:"Blocked",children:a.map(S=>X.jsx("option",{value:S.id,children:S.id},S.id))})]})}const UR={...cd};pt.addPropertyControls(Lg,UR);const ap=No.select`
208
208
  color: inherit;
package/dist/index.js CHANGED
@@ -22498,8 +22498,7 @@ qa(tb, {
22498
22498
  const GM = {
22499
22499
  attributeId: {
22500
22500
  title: "Attribute Id",
22501
- type: Ct.String,
22502
- defaultValue: "Engine"
22501
+ type: Ct.String
22503
22502
  },
22504
22503
  componentPath: {
22505
22504
  title: "Component Path",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamedici-spc/configurator-framer-bundle",
3
- "version": "0.1.0-alpha0003",
3
+ "version": "0.1.0-alpha0004",
4
4
  "description": "Component library to build configurator apps with Framer based on Viamedici SPC. All dependencies are bundled together.",
5
5
  "repository": {
6
6
  "type": "git",