@ansible/ansible-ui-framework 2.4.448 → 2.4.449

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -31,54 +31,43 @@ UI projects for [Ansible](https://www.ansible.com).
31
31
 
32
32
  ## Environment Variables
33
33
 
34
- | Environment Variable | Description |
35
- | ------------------------------: | ------------------------------------------------------- |
36
- | `AWX_PROTOCOL` | The AWX server protocol (http) or (https). |
37
- | `AWX_HOST` | The AWX server address with port. |
38
- | `CYPRESS_AWX_SERVER` | The AWX server URL. |
39
- | `CYPRESS_AWX_USERNAME` | The AWX server username. |
40
- | `CYPRESS_AWX_PASSWORD` | The AWX server password. |
41
- | | |
42
- | `HUB_PROTOCOL` | The HUB server protocol (http) or (https). |
43
- | `HUB_HOST` | The HUB server address with port. |
44
- | `CYPRESS_HUB_SERVER` | The HUB server URL. |
45
- | `CYPRESS_HUB_USERNAME` | The HUB server username. |
46
- | `CYPRESS_HUB_PASSWORD` | The HUB server password. |
47
- | `CYPRESS_HUB_API_PREFIX` | The HUB API prefix (eg. `/api/automation-hub/`). |
48
- | `CYPRESS_HUB_GALAXYKIT_COMMAND` | The galaxykit command (eg. `galaxykit --ignore-certs`). |
49
- | | |
50
- | `EDA_PROTOCOL` | The EDA server protocol (http) or (https). |
51
- | `EDA_HOST` | The EDA server address with port. |
52
- | `CYPRESS_EDA_SERVER` | The EDA server URL. |
53
- | `CYPRESS_EDA_USERNAME` | The EDA server username. |
54
- | `CYPRESS_EDA_PASSWORD` | The EDA server password. |
34
+ | Environment Variable | Description |
35
+ | ----------------------: | --------------------------------------------------- |
36
+ | `AWX_SERVER` | The AWX server (protocol://host:port). |
37
+ | `AWX_USERNAME` | The AWX server username. (only used by Cypress) |
38
+ | `AWX_PASSWORD` | The AWX server password. (only used by Cypress) |
39
+ | `AWX_API_PREFIX` | The AWX server API prefix. (`/api/v2`) |
40
+ | `AWX_ROUTE_PREFIX` | The AWX UI route prefix. (`/awx`) |
41
+ | | |
42
+ | `EDA_SERVER` | The EDA server (protocol://host:port). |
43
+ | `EDA_USERNAME` | The EDA server username. (only used by Cypress) |
44
+ | `EDA_PASSWORD` | The EDA server password. (only used by Cypress) |
45
+ | `EDA_API_PREFIX` | The EDA server API prefix. (`/api/eda/v1`) |
46
+ | `EDA_ROUTE_PREFIX` | The EDA UI route prefix. (`/eda`) |
47
+ | | |
48
+ | `HUB_SERVER` | The HUB server (protocol://host:port). |
49
+ | `HUB_USERNAME` | The HUB server username. (only used by Cypress) |
50
+ | `HUB_PASSWORD` | The HUB server password. (only used by Cypress) |
51
+ | `HUB_API_PREFIX` | The HUB server API prefix. (`/api/automation-hub/`) |
52
+ | `HUB_ROUTE_PREFIX` | The HUB UI route prefix. (`/hub`) |
53
+ | `HUB_GALAXYKIT_COMMAND` | The galaxykit command. (`galaxykit --ignore-certs`) |
55
54
 
56
55
  ```zsh
57
- export AWX_PROTOCOL=http
58
- export AWX_HOST=localhost:8043
59
- export CYPRESS_AWX_SERVER=$AWX_PROTOCOL://$AWX_HOST
60
- export CYPRESS_AWX_USERNAME='my-user'
61
- export CYPRESS_AWX_PASSWORD='my-password'
62
-
63
- export HUB_PROTOCOL=http
64
- export HUB_HOST=localhost:8000
65
- export CYPRESS_HUB_SERVER=$HUB_PROTOCOL://$HUB_HOST
66
- export CYPRESS_HUB_USERNAME='my-user'
67
- export CYPRESS_HUB_PASSWORD='my-password'
68
- export CYPRESS_HUB_API_PREFIX='/api/automation-hub/'
69
- export CYPRESS_HUB_GALAXYKIT_COMMAND='galaxykit --ignore-certs'
70
- # For integration tests: Check that the Ansible binary was correctly installed
71
- # under the Python directory. Add it to the PATH variable. This is needed for
72
- # the galaxykit commands that create hub resources for tests.
73
-
74
-
75
- export EDA_PROTOCOL=http
76
- export EDA_HOST=localhost:5001
77
- export CYPRESS_EDA_SERVER=$EDA_PROTOCOL://$EDA_HOST
78
- export CYPRESS_EDA_USERNAME='my-user'
79
- export CYPRESS_EDA_PASSWORD='my-password'
56
+ export AWX_SERVER=http://localhost:8043
57
+ export AWX_USERNAME='my-user'
58
+ export AWX_PASSWORD='my-password'
59
+
60
+ export EDA_SERVER=http://localhost:5001
61
+ export EDA_USERNAME='my-user'
62
+ export EDA_PASSWORD='my-password'
63
+
64
+ export HUB_SERVER=http://localhost:8000
65
+ export HUB_USERNAME='my-user'
66
+ export HUB_PASSWORD='my-password'
80
67
  ```
81
68
 
69
+ > Note: For Hub integration tests: Check that the Ansible binary was correctly installed under the Python directory. Add it to the PATH variable. This is needed for the galaxykit commands that create hub resources for tests.
70
+
82
71
  ## NPM Scripts
83
72
 
84
73
  | NPM Script | Description |
package/index.js CHANGED
@@ -43763,10 +43763,16 @@ function JAe(e) {
43763
43763
  /* @__PURE__ */ p.jsx(UCe, {}),
43764
43764
  /* @__PURE__ */ p.jsx(A$, { children: /* @__PURE__ */ p.jsx(T$, { children: e.icon }) }),
43765
43765
  /* @__PURE__ */ p.jsx(E$, { style: { marginLeft: 0 }, children: /* @__PURE__ */ p.jsx(i0, { id: "toolbar", inset: { default: "insetNone" }, children: /* @__PURE__ */ p.jsxs(rO, { children: [
43766
- t && /* @__PURE__ */ p.jsx(Dn, { children: /* @__PURE__ */ p.jsxs(mn, { style: { color: "white", cursor: "default" }, children: [
43767
- e.brand && /* @__PURE__ */ p.jsx(ga, { children: /* @__PURE__ */ p.jsx(Lo, { content: e.brand, style: { minWidth: 0 } }) }),
43768
- /* @__PURE__ */ p.jsx(_r, { headingLevel: "h1", style: { lineHeight: 1 }, children: /* @__PURE__ */ p.jsx(Lo, { content: e.title, style: { minWidth: 0 } }) })
43769
- ] }) }),
43766
+ t && /* @__PURE__ */ p.jsx(Dn, { children: /* @__PURE__ */ p.jsxs(
43767
+ mn,
43768
+ {
43769
+ style: { color: "white", cursor: "default", marginTop: -2, marginBottom: -2 },
43770
+ children: [
43771
+ e.brand && /* @__PURE__ */ p.jsx(ga, { style: { marginTop: -6 }, children: /* @__PURE__ */ p.jsx(Lo, { content: e.brand, style: { minWidth: 0 } }) }),
43772
+ /* @__PURE__ */ p.jsx(_r, { headingLevel: "h1", style: { lineHeight: 1 }, children: /* @__PURE__ */ p.jsx(Lo, { content: e.title, style: { minWidth: 0 } }) })
43773
+ ]
43774
+ }
43775
+ ) }),
43770
43776
  e.children
43771
43777
  ] }) }) })
43772
43778
  ] });
package/index.umd.cjs CHANGED
@@ -529,7 +529,7 @@ ${s}${p}`:`
529
529
  `))&&(f=!0),h.push(O),d=h.length}let g;const{start:p,end:y}=r;if(h.length===0)g=p+y;else if(f||(f=h.reduce((b,S)=>b+S.length+2,2)>Ud.maxFlowStringSingleLineLength),f){g=p;for(const _ of h)g+=_?`
530
530
  ${l}${o}${_}`:`
531
531
  `;g+=`
532
- ${o}${y}`}else g=`${p}${s}${h.join(" ")}${s}${y}`;return e&&(g+=$a(g,o,u(e)),a&&a()),g}function Xd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const a=Js(t(r),e);n.push(a.trimStart())}}function La(e,t){const n=It(t)?t.value:t;for(const r of e)if(Ut(r)&&(r.key===t||r.key===n||It(r.key)&&r.key.value===n))return r}class tl extends Ud{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Da,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:a}=r,o=new this(t),l=(s,u)=>{if(typeof a=="function")u=a.call(n,s,u);else if(Array.isArray(a)&&!a.includes(s))return;(u!==void 0||i)&&o.items.push(Ay(s,u,r))};if(n instanceof Map)for(const[s,u]of n)l(s,u);else if(n&&typeof n=="object")for(const s of Object.keys(n))l(s,n[s]);return typeof t.sortMapEntries=="function"&&o.items.sort(t.sortMapEntries),o}add(t,n){var o;let r;Ut(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new gi(t,t==null?void 0:t.value):r=new gi(t.key,t.value);const i=La(this.items,r.key),a=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);It(i.value)&&tP(r.value)?i.value.value=r.value:i.value=r.value}else if(a){const l=this.items.findIndex(s=>a(r,s)<0);l===-1?this.items.push(r):this.items.splice(l,0,r)}else this.items.push(r)}delete(t){const n=La(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=La(this.items,t),i=r==null?void 0:r.value;return(!n&&It(i)?i.value:i)??void 0}has(t){return!!La(this.items,t)}set(t,n){this.add(new gi(t,n),!0)}toJSON(t,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const a of this.items)oP(n,i,a);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!Ut(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),lP(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}class sP extends Ud{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Ys,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Jd(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Jd(t);if(typeof r!="number")return;const i=this.items[r];return!n&&It(i)?i.value:i}has(t){const n=Jd(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Jd(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];It(i)&&tP(n)?i.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let i=0;for(const a of this.items)r.push(pr(a,String(i++),n));return r}toString(t,n,r){return t?lP(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:i}=r,a=new this(t);if(n&&Symbol.iterator in Object(n)){let o=0;for(let l of n){if(typeof i=="function"){const s=n instanceof Set?l:String(o++);l=i.call(n,s,l)}a.items.push(Vd(l,void 0,r))}}return a}}function Jd(e){let t=It(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}function Exe(e,t,n){const{replacer:r}=n,i=new sP(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let o of t){typeof r=="function"&&(o=r.call(t,String(a++),o));let l,s;if(Array.isArray(o))if(o.length===2)l=o[0],s=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)l=u[0],s=o[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=o;i.items.push(Ay(l,s,n))}return i}class Ty extends sP{constructor(){super(),this.add=tl.prototype.add.bind(this),this.delete=tl.prototype.delete.bind(this),this.get=tl.prototype.get.bind(this),this.has=tl.prototype.has.bind(this),this.set=tl.prototype.set.bind(this),this.tag=Ty.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let a,o;if(Ut(i)?(a=pr(i.key,"",n),o=pr(i.value,a,n)):a=pr(i,"",n),r.has(a))throw new Error("Ordered maps must not include duplicate keys");r.set(a,o)}return r}static from(t,n,r){const i=Exe(t,n,r),a=new this;return a.items=i.items,a}}Ty.tag="tag:yaml.org,2002:omap";class ky extends tl{constructor(t){super(t),this.tag=ky.tag}add(t){let n;Ut(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new gi(t.key,null):n=new gi(t,null),La(this.items,n.key)||this.items.push(n)}get(t,n){const r=La(this.items,t);return!n&&Ut(r)?It(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=La(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new gi(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:i}=r,a=new this(t);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),a.items.push(Ay(o,null,r));return a}}ky.tag="tag:yaml.org,2002:set";class Qd extends Error{constructor(t,n,r,i,a){super(t),this.details=n,this.statusCode=r,this.body=i,this.json=a,Object.setPrototypeOf(this,Qd.prototype),this.name="RequestError"}}function Pxe(e){const{defaultValue:t,disableBody:n,disablePadding:r}=e,i=Xpe({defaultValues:t??{}}),[a]=gt(),{handleSubmit:o,setError:l}=i,[s,u]=x.useState(null),c=un("md"),[f]=x.useContext(qa),d=e.isVertical?!1:f.formLayout==="horizontal",g=(e.singleColumn?!1:f.formColumns==="multiple")?1600:d?960:800,p=_=>{if(_ instanceof Error?u(_):u(new Error("Unknown error")),typeof _=="object"&&_!==null&&"json"in _&&typeof _.json=="object"&&_.json!==null)for(const b in _.json){let S=_.json[b];typeof S=="string"?l(b,{message:S}):Array.isArray(S)&&(S=S[0],typeof S=="string"&&l(b,{message:S}))}};let y=v.jsx(Fpe,{...i,children:v.jsxs(C.Form,{onSubmit:o(async(_,b)=>{var O,w;u(null);let S=!1;b!==void 0&&((O=b==null?void 0:b.nativeEvent)!=null&&O.submitter)&&(S=((w=b.nativeEvent.submitter)==null?void 0:w.innerHTML)===e.additionalActionText);try{await e.onSubmit(_,A=>u(new Error(A)),l,S?i:void 0)}catch(A){p(A)}}),isHorizontal:d,autoComplete:"off",style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:e.disableScrolling?void 0:"hidden",gap:0},children:[e.disableScrolling?v.jsx("div",{style:{maxWidth:g,padding:r?void 0:24},children:v.jsx(Ey,{isVertical:e.isVertical,singleColumn:e.singleColumn,children:e.children})}):v.jsx("div",{style:{height:"100%",flexGrow:1,overflow:"auto"},children:v.jsx("div",{style:{maxWidth:g,padding:r?void 0:24},children:v.jsx(Ey,{isVertical:e.isVertical,singleColumn:e.singleColumn,children:e.children})})}),s&&v.jsx(C.Alert,{variant:"danger",title:s.message??"",isInline:!0,style:{paddingLeft:c&&e.onCancel?190:void 0},isExpandable:s instanceof Qd?!!s.details:!1,children:s instanceof Qd?s.details:void 0}),e.onCancel?v.jsx("div",{className:"dark-2 border-top",style:{padding:r?void 0:24},children:v.jsxs(C.ActionGroup,{style:{marginTop:0},children:[v.jsx(Py,{children:e.submitText}),e.additionalActionText?v.jsx(C.Button,{"aria-label":e.additionalActionText,type:"submit",variant:"secondary",children:e.additionalActionText}):null,e.onCancel&&v.jsx(uP,{onCancel:e.onCancel,children:e.cancelText??a.cancelText})]})}):v.jsx(Py,{style:{marginTop:48},children:e.submitText})]})});return n||(y=v.jsx(Ob,{children:y})),y}function Ey(e){const[t]=x.useContext(qa),n=e.isVertical?!1:t.formLayout==="horizontal",r=e.singleColumn?!1:t.formColumns==="multiple",i=12,a=r?n?12:6:12,o=r?6:12,l=r?6:12,s=r?4:12;return v.jsx(C.Grid,{hasGutter:!0,span:12,sm:i,md:a,lg:o,xl:l,xl2:s,children:e.children})}function Py(e){const{isSubmitting:t,errors:n}=n6(),{t:r}=yt(),i=n&&Object.keys(n).length>0;return v.jsx(C.Tooltip,{content:r("Please fix errors"),trigger:i?void 0:"manual",children:v.jsx(C.Button,{type:"submit",isDisabled:t,isLoading:t,isDanger:i,variant:i?"secondary":void 0,style:e.style,children:e.children})})}function uP(e){return v.jsx(C.Button,{type:"button",variant:"link",onClick:e.onCancel,children:e.children})}const nOe="",jy=x.createContext({isOpen:!1,setState:()=>({})});function eu(){return x.useContext(jy)}function cP(e){const t=un("xl"),[n,r]=x.useState(()=>t),i=x.useCallback(a=>{a.isOpen!==void 0&&r(a.isOpen)},[]);return x.useEffect(()=>i({isOpen:t}),[t,i]),v.jsx(jy.Provider,{value:{isOpen:n,setState:i},children:e.children})}function fP(){const e=Rt.useNavigate(),t=un("xl"),n=eu();return x.useCallback(i=>{e(i),t||n.setState({isOpen:!n.isOpen})},[e,t,n])}function dP(e){return v.jsx(vb,{children:v.jsx(Tb,{children:v.jsx(Ab,{children:v.jsx(Sb,{children:v.jsx(cP,{children:e.children})})})})})}function jxe(e){const t=Rt.useNavigate();return e.breadcrumbs?v.jsx(C.Breadcrumb,{style:e.style,children:e.breadcrumbs.map((n,r)=>n.label?v.jsx(C.BreadcrumbItem,{id:n.id,component:n.component,isActive:n.to===void 0,children:n.to?v.jsx("a",{href:n.to,onClick:i=>{i.preventDefault(),n.to&&t(n.to)},children:n.label}):n.label},n.id??n.label??r):v.jsx(x.Fragment,{},r))}):v.jsx(x.Fragment,{})}function Mxe(e){const{breadcrumbs:t,title:n,description:r,controls:i,headerActions:a,footer:o}=e,l=un("lg"),s=un("xl"),u=un("md"),f=eu().isOpen&&s?void 0:e.navigation,[d]=gt();return v.jsxs(v.Fragment,{children:[f&&v.jsx(C.PageSection,{variant:C.PageSectionVariants.light,className:"border-top dark-1",style:{paddingLeft:0,paddingTop:0,paddingBottom:0},children:v.jsx(C.Flex,{direction:{default:"row"},flexWrap:{default:"nowrap"},style:{maxWidth:"100%"},children:v.jsx(C.PageNavigation,{style:{paddingTop:0,flexShrink:1,flexGrow:1},children:f})})}),v.jsx(C.PageSection,{variant:C.PageSectionVariants.light,className:"border-top border-bottom dark-3",style:{paddingTop:s?16:12,paddingBottom:s?16:12},children:v.jsxs(C.Stack,{hasGutter:!0,children:[v.jsxs(C.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[v.jsxs(C.FlexItem,{grow:{default:"grow"},children:[t&&v.jsx(jxe,{breadcrumbs:t,style:{paddingBottom:l?6:4}}),n?e.titleHelp?v.jsx(C.Popover,{headerContent:e.titleHelpTitle,bodyContent:v.jsxs(C.Stack,{hasGutter:!0,children:[typeof e.titleHelp=="string"?v.jsx(C.StackItem,{children:e.titleHelp}):e.titleHelp.map((h,g)=>v.jsx(C.StackItem,{children:h},g)),e.titleDocLink&&v.jsx(C.StackItem,{children:v.jsx(C.Button,{icon:v.jsx(Ce.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(e.titleDocLink,"_blank"),isInline:!0,children:d.documentation})})]}),position:"bottom-start",removeFindDomNode:!0,children:v.jsxs(C.Title,{headingLevel:"h1",children:[n,v.jsx(C.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:v.jsx(Ce.OutlinedQuestionCircleIcon,{})})]})}):v.jsx(C.Title,{headingLevel:"h1",children:n}):v.jsx(C.Title,{headingLevel:"h1",children:v.jsx(C.Skeleton,{width:"160px"})}),u&&r&&v.jsx(C.Text,{component:"p",style:{paddingTop:s?4:2,opacity:.8},children:typeof r=="string"?v.jsx(C.Truncate,{content:r}):v.jsx(C.Stack,{children:r.map(h=>v.jsx(C.StackItem,{children:h},h))})})]}),n&&(a||i)&&v.jsxs(C.Flex,{direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[i&&v.jsx(C.FlexItem,{grow:{default:"grow"},children:i}),a&&v.jsx(C.FlexItem,{children:a})]})]}),o]})})]})}function hP(e){const[t]=gt();return v.jsx(wb,{message:t.errorText,children:v.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:e.children})})}function Dxe(e){const t=un("sm");return v.jsxs(C.Masthead,{display:{default:"inline"},children:[v.jsx(mP,{}),v.jsx(C.MastheadMain,{children:v.jsx(C.MastheadBrand,{children:e.icon})}),v.jsx(C.MastheadContent,{style:{marginLeft:0},children:v.jsx(C.Toolbar,{id:"toolbar",inset:{default:"insetNone"},children:v.jsxs(C.ToolbarContent,{children:[t&&v.jsx(C.ToolbarItem,{children:v.jsxs(C.Stack,{style:{color:"white",cursor:"default"},children:[e.brand&&v.jsx(C.Text,{children:v.jsx(C.Truncate,{content:e.brand,style:{minWidth:0}})}),v.jsx(C.Title,{headingLevel:"h1",style:{lineHeight:1},children:v.jsx(C.Truncate,{content:e.title,style:{minWidth:0}})})]})}),e.children]})})})]})}function mP(){const e=eu();return v.jsx(C.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:v.jsx(C.PageToggleButton,{variant:"plain","aria-label":"Global navigation",children:v.jsx(Ce.BarsIcon,{})})})}function Ixe(e){const{t}=yt(),n=Rt.useNavigate(),{dashboardUrl:r}=e;return React.createElement(C.Page,null,React.createElement(C.EmptyState,{variant:C.EmptyStateVariant.small,style:{paddingTop:48}},React.createElement(C.EmptyStateIcon,{icon:Ce.ExclamationCircleIcon}),React.createElement(C.Title,{headingLevel:"h2",size:"lg"},t("We could not find that page")),React.createElement(C.EmptyStateSecondaryActions,null,React.createElement(C.Stack,{hasGutter:!0},React.createElement(C.Button,{onClick:()=>n(-1)},t("Return to previous page")),React.createElement(C.Button,{component:i=>React.createElement(Rt.Link,{to:r,...i})},t("Return to dashboard"))))))}function gP(e){const{navigation:t}=e,n=eu();return v.jsx(C.PageSidebar,{isNavOpen:n.isOpen,nav:v.jsx(C.Nav,{children:v.jsx(C.NavList,{children:v.jsx(eh,{baseRoute:"",items:t})})})})}function eh(e){return v.jsx(v.Fragment,{children:e.items.map((t,n)=>v.jsx($xe,{item:t,baseRoute:e.baseRoute},n))})}function $xe(e){let t;if("id"in e.item)t=e.item.id;else if("children"in e.item){const a=e.item.children.find(o=>o.path==="");a&&"id"in a&&(t=a.id)}const n=fP(),{item:r}=e;let i=e.baseRoute+"/"+r.path;return i=i.replace("//","/"),r.path==="/"&&"children"in r?v.jsx(eh,{items:r.children,baseRoute:""}):"children"in r&&r.children.find(a=>a.label!==void 0)!==void 0?r.label===void 0?v.jsx(v.Fragment,{}):r.label===""?v.jsx(eh,{items:r.children,baseRoute:i}):v.jsx(C.NavExpandable,{title:r.label,isActive:location.pathname.startsWith(i),isExpanded:!0,children:v.jsx(eh,{items:r.children,baseRoute:i})}):"label"in r?v.jsx(C.NavItem,{id:t,isActive:location.pathname.startsWith(i),onClick:()=>n(i),"data-cy":t,children:r.label}):v.jsx(v.Fragment,{})}const pP=x.createContext({});function Lxe(){return x.useContext(pP)}function Fxe(e){const t=x.useMemo(()=>vP("",e.navigation),[e.navigation]);return v.jsx(pP.Provider,{value:t,children:e.children})}function vP(e,t){const n={};return t.forEach(r=>{const i=(e+"/"+r.path).replace("//","/");"id"in r&&typeof r.id=="string"&&(n[r.id]=i),"children"in r&&Object.assign(n,vP(i,r.children))}),n}function Nxe(e){const{navigation:t,basename:n,masthead:r}=e,i=x.useMemo(()=>[{path:"",element:v.jsx(dP,{children:v.jsx(Rt.Outlet,{})}),children:[{path:"login",element:e.login},{path:"",element:e.root??v.jsx(v.Fragment,{}),children:[{path:"",element:v.jsx(C.Page,{header:r,sidebar:v.jsx(gP,{navigation:t}),children:v.jsx(hP,{children:v.jsx(Rt.Outlet,{})})}),children:t}]},{path:"*",element:v.jsx(Ixe,{})}]}],[r,t,e.login,e.root]),a=x.useMemo(()=>Rt.createBrowserRouter(i,{basename:n}),[n,i]);return v.jsx(Fxe,{navigation:t,children:v.jsx(Rt.RouterProvider,{router:a})})}function Bxe(e){return e.replace(/^\//,"")}function yP(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=yP(n.children,t);if(r)return r}}}function bP(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const i=bP(r.children,t);if(i)return i}}}function _P(e,t,n){for(const r of e)if("id"in r&&r.id===t){const i=r;"children"in r||(i.children=[]),i.children.push(n);return}else"children"in r&&_P(r.children,t,n)}function xP(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r+1,0,n);return}else"children"in i&&xP(i.children,t,n)}}function SP(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r,0,n);return}else"children"in i&&SP(i.children,t,n)}}function wP(){const e=Lxe();return(t,n)=>{let r=e[t]??"";const i=n==null?void 0:n.params,a=n==null?void 0:n.query;return r?(i&&(r=Object.keys(i).reduce((o,l)=>{let s=i[l];return s===void 0?o:(s=encodeURIComponent(s.toString()),o.replace(`:${l}`,s))},r)),a&&(r=`${r}?${Object.keys(a).map(o=>{let l=a[o];return l===void 0?"":(l=encodeURIComponent(l.toString()),`${o}=${l}`)}).join("&").replace("/&&/g","&")}`)):console.error(`Page id ${t} not found`),r}}function Rxe(){const e=Rt.useNavigate(),t=wP();return(n,r)=>{const i=t(n,r);i&&e(i)}}function OP(e){const{loading:t}=e,[n,r]=x.useState((e==null?void 0:e.initialTabIndex)??0),i=x.useCallback((s,u)=>r(u),[r]),a=x.Children.toArray(e.children),o=a.map((s,u)=>{if(x.isValidElement(s)&&s.type===My){const c=s.props.label;return v.jsx(C.Tab,{title:c||v.jsx(C.Skeleton,{width:"60px"}),eventKey:u},c??u)}return s}),l=a[n];return t?v.jsx(OP,{children:v.jsx(My,{children:v.jsx(C.PageSection,{variant:"light",children:v.jsx(C.Skeleton,{})})})}):v.jsxs(v.Fragment,{children:[v.jsx(C.PageSection,{type:C.PageSectionTypes.tabs,className:"border-bottom",children:v.jsxs(C.Flex,{spaceItems:{default:"spaceItemsNone"},children:[e.preComponents&&v.jsxs(v.Fragment,{children:[v.jsx(C.FlexItem,{children:e.preComponents}),v.jsx(C.Divider,{orientation:{default:"vertical"},component:"div"})]}),v.jsx(C.FlexItem,{grow:{default:"grow"},children:v.jsx(C.Tabs,{activeKey:n,onSelect:i,inset:e.preComponents?void 0:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm","2xl":"insetSm"},hasBorderBottom:!1,children:o})}),e.postComponents&&v.jsxs(v.Fragment,{children:[v.jsx(C.Divider,{orientation:{default:"vertical"}}),v.jsx(C.FlexItem,{style:{paddingRight:16},children:e.postComponents})]})]})}),l]})}function My(e){return v.jsx(v.Fragment,{children:e.children})}function Wxe(e){const{activeKey:t,setActiveKey:n}=e,r=x.useCallback((i,a)=>n(a),[n]);return v.jsx(C.PageSection,{type:C.PageSectionTypes.tabs,style:{flexGrow:1},children:v.jsx(C.Tabs,{activeKey:t,onSelect:r,inset:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm","2xl":"insetSm"},children:e.children})})}const zxe=U3`
532
+ ${o}${y}`}else g=`${p}${s}${h.join(" ")}${s}${y}`;return e&&(g+=$a(g,o,u(e)),a&&a()),g}function Xd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const a=Js(t(r),e);n.push(a.trimStart())}}function La(e,t){const n=It(t)?t.value:t;for(const r of e)if(Ut(r)&&(r.key===t||r.key===n||It(r.key)&&r.key.value===n))return r}class tl extends Ud{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Da,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:a}=r,o=new this(t),l=(s,u)=>{if(typeof a=="function")u=a.call(n,s,u);else if(Array.isArray(a)&&!a.includes(s))return;(u!==void 0||i)&&o.items.push(Ay(s,u,r))};if(n instanceof Map)for(const[s,u]of n)l(s,u);else if(n&&typeof n=="object")for(const s of Object.keys(n))l(s,n[s]);return typeof t.sortMapEntries=="function"&&o.items.sort(t.sortMapEntries),o}add(t,n){var o;let r;Ut(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new gi(t,t==null?void 0:t.value):r=new gi(t.key,t.value);const i=La(this.items,r.key),a=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);It(i.value)&&tP(r.value)?i.value.value=r.value:i.value=r.value}else if(a){const l=this.items.findIndex(s=>a(r,s)<0);l===-1?this.items.push(r):this.items.splice(l,0,r)}else this.items.push(r)}delete(t){const n=La(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=La(this.items,t),i=r==null?void 0:r.value;return(!n&&It(i)?i.value:i)??void 0}has(t){return!!La(this.items,t)}set(t,n){this.add(new gi(t,n),!0)}toJSON(t,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const a of this.items)oP(n,i,a);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!Ut(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),lP(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}class sP extends Ud{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Ys,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Jd(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Jd(t);if(typeof r!="number")return;const i=this.items[r];return!n&&It(i)?i.value:i}has(t){const n=Jd(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Jd(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];It(i)&&tP(n)?i.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let i=0;for(const a of this.items)r.push(pr(a,String(i++),n));return r}toString(t,n,r){return t?lP(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:i}=r,a=new this(t);if(n&&Symbol.iterator in Object(n)){let o=0;for(let l of n){if(typeof i=="function"){const s=n instanceof Set?l:String(o++);l=i.call(n,s,l)}a.items.push(Vd(l,void 0,r))}}return a}}function Jd(e){let t=It(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}function Exe(e,t,n){const{replacer:r}=n,i=new sP(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let o of t){typeof r=="function"&&(o=r.call(t,String(a++),o));let l,s;if(Array.isArray(o))if(o.length===2)l=o[0],s=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)l=u[0],s=o[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=o;i.items.push(Ay(l,s,n))}return i}class Ty extends sP{constructor(){super(),this.add=tl.prototype.add.bind(this),this.delete=tl.prototype.delete.bind(this),this.get=tl.prototype.get.bind(this),this.has=tl.prototype.has.bind(this),this.set=tl.prototype.set.bind(this),this.tag=Ty.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let a,o;if(Ut(i)?(a=pr(i.key,"",n),o=pr(i.value,a,n)):a=pr(i,"",n),r.has(a))throw new Error("Ordered maps must not include duplicate keys");r.set(a,o)}return r}static from(t,n,r){const i=Exe(t,n,r),a=new this;return a.items=i.items,a}}Ty.tag="tag:yaml.org,2002:omap";class ky extends tl{constructor(t){super(t),this.tag=ky.tag}add(t){let n;Ut(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new gi(t.key,null):n=new gi(t,null),La(this.items,n.key)||this.items.push(n)}get(t,n){const r=La(this.items,t);return!n&&Ut(r)?It(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=La(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new gi(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:i}=r,a=new this(t);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i=="function"&&(o=i.call(n,o,o)),a.items.push(Ay(o,null,r));return a}}ky.tag="tag:yaml.org,2002:set";class Qd extends Error{constructor(t,n,r,i,a){super(t),this.details=n,this.statusCode=r,this.body=i,this.json=a,Object.setPrototypeOf(this,Qd.prototype),this.name="RequestError"}}function Pxe(e){const{defaultValue:t,disableBody:n,disablePadding:r}=e,i=Xpe({defaultValues:t??{}}),[a]=gt(),{handleSubmit:o,setError:l}=i,[s,u]=x.useState(null),c=un("md"),[f]=x.useContext(qa),d=e.isVertical?!1:f.formLayout==="horizontal",g=(e.singleColumn?!1:f.formColumns==="multiple")?1600:d?960:800,p=_=>{if(_ instanceof Error?u(_):u(new Error("Unknown error")),typeof _=="object"&&_!==null&&"json"in _&&typeof _.json=="object"&&_.json!==null)for(const b in _.json){let S=_.json[b];typeof S=="string"?l(b,{message:S}):Array.isArray(S)&&(S=S[0],typeof S=="string"&&l(b,{message:S}))}};let y=v.jsx(Fpe,{...i,children:v.jsxs(C.Form,{onSubmit:o(async(_,b)=>{var O,w;u(null);let S=!1;b!==void 0&&((O=b==null?void 0:b.nativeEvent)!=null&&O.submitter)&&(S=((w=b.nativeEvent.submitter)==null?void 0:w.innerHTML)===e.additionalActionText);try{await e.onSubmit(_,A=>u(new Error(A)),l,S?i:void 0)}catch(A){p(A)}}),isHorizontal:d,autoComplete:"off",style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:e.disableScrolling?void 0:"hidden",gap:0},children:[e.disableScrolling?v.jsx("div",{style:{maxWidth:g,padding:r?void 0:24},children:v.jsx(Ey,{isVertical:e.isVertical,singleColumn:e.singleColumn,children:e.children})}):v.jsx("div",{style:{height:"100%",flexGrow:1,overflow:"auto"},children:v.jsx("div",{style:{maxWidth:g,padding:r?void 0:24},children:v.jsx(Ey,{isVertical:e.isVertical,singleColumn:e.singleColumn,children:e.children})})}),s&&v.jsx(C.Alert,{variant:"danger",title:s.message??"",isInline:!0,style:{paddingLeft:c&&e.onCancel?190:void 0},isExpandable:s instanceof Qd?!!s.details:!1,children:s instanceof Qd?s.details:void 0}),e.onCancel?v.jsx("div",{className:"dark-2 border-top",style:{padding:r?void 0:24},children:v.jsxs(C.ActionGroup,{style:{marginTop:0},children:[v.jsx(Py,{children:e.submitText}),e.additionalActionText?v.jsx(C.Button,{"aria-label":e.additionalActionText,type:"submit",variant:"secondary",children:e.additionalActionText}):null,e.onCancel&&v.jsx(uP,{onCancel:e.onCancel,children:e.cancelText??a.cancelText})]})}):v.jsx(Py,{style:{marginTop:48},children:e.submitText})]})});return n||(y=v.jsx(Ob,{children:y})),y}function Ey(e){const[t]=x.useContext(qa),n=e.isVertical?!1:t.formLayout==="horizontal",r=e.singleColumn?!1:t.formColumns==="multiple",i=12,a=r?n?12:6:12,o=r?6:12,l=r?6:12,s=r?4:12;return v.jsx(C.Grid,{hasGutter:!0,span:12,sm:i,md:a,lg:o,xl:l,xl2:s,children:e.children})}function Py(e){const{isSubmitting:t,errors:n}=n6(),{t:r}=yt(),i=n&&Object.keys(n).length>0;return v.jsx(C.Tooltip,{content:r("Please fix errors"),trigger:i?void 0:"manual",children:v.jsx(C.Button,{type:"submit",isDisabled:t,isLoading:t,isDanger:i,variant:i?"secondary":void 0,style:e.style,children:e.children})})}function uP(e){return v.jsx(C.Button,{type:"button",variant:"link",onClick:e.onCancel,children:e.children})}const nOe="",jy=x.createContext({isOpen:!1,setState:()=>({})});function eu(){return x.useContext(jy)}function cP(e){const t=un("xl"),[n,r]=x.useState(()=>t),i=x.useCallback(a=>{a.isOpen!==void 0&&r(a.isOpen)},[]);return x.useEffect(()=>i({isOpen:t}),[t,i]),v.jsx(jy.Provider,{value:{isOpen:n,setState:i},children:e.children})}function fP(){const e=Rt.useNavigate(),t=un("xl"),n=eu();return x.useCallback(i=>{e(i),t||n.setState({isOpen:!n.isOpen})},[e,t,n])}function dP(e){return v.jsx(vb,{children:v.jsx(Tb,{children:v.jsx(Ab,{children:v.jsx(Sb,{children:v.jsx(cP,{children:e.children})})})})})}function jxe(e){const t=Rt.useNavigate();return e.breadcrumbs?v.jsx(C.Breadcrumb,{style:e.style,children:e.breadcrumbs.map((n,r)=>n.label?v.jsx(C.BreadcrumbItem,{id:n.id,component:n.component,isActive:n.to===void 0,children:n.to?v.jsx("a",{href:n.to,onClick:i=>{i.preventDefault(),n.to&&t(n.to)},children:n.label}):n.label},n.id??n.label??r):v.jsx(x.Fragment,{},r))}):v.jsx(x.Fragment,{})}function Mxe(e){const{breadcrumbs:t,title:n,description:r,controls:i,headerActions:a,footer:o}=e,l=un("lg"),s=un("xl"),u=un("md"),f=eu().isOpen&&s?void 0:e.navigation,[d]=gt();return v.jsxs(v.Fragment,{children:[f&&v.jsx(C.PageSection,{variant:C.PageSectionVariants.light,className:"border-top dark-1",style:{paddingLeft:0,paddingTop:0,paddingBottom:0},children:v.jsx(C.Flex,{direction:{default:"row"},flexWrap:{default:"nowrap"},style:{maxWidth:"100%"},children:v.jsx(C.PageNavigation,{style:{paddingTop:0,flexShrink:1,flexGrow:1},children:f})})}),v.jsx(C.PageSection,{variant:C.PageSectionVariants.light,className:"border-top border-bottom dark-3",style:{paddingTop:s?16:12,paddingBottom:s?16:12},children:v.jsxs(C.Stack,{hasGutter:!0,children:[v.jsxs(C.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[v.jsxs(C.FlexItem,{grow:{default:"grow"},children:[t&&v.jsx(jxe,{breadcrumbs:t,style:{paddingBottom:l?6:4}}),n?e.titleHelp?v.jsx(C.Popover,{headerContent:e.titleHelpTitle,bodyContent:v.jsxs(C.Stack,{hasGutter:!0,children:[typeof e.titleHelp=="string"?v.jsx(C.StackItem,{children:e.titleHelp}):e.titleHelp.map((h,g)=>v.jsx(C.StackItem,{children:h},g)),e.titleDocLink&&v.jsx(C.StackItem,{children:v.jsx(C.Button,{icon:v.jsx(Ce.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(e.titleDocLink,"_blank"),isInline:!0,children:d.documentation})})]}),position:"bottom-start",removeFindDomNode:!0,children:v.jsxs(C.Title,{headingLevel:"h1",children:[n,v.jsx(C.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:v.jsx(Ce.OutlinedQuestionCircleIcon,{})})]})}):v.jsx(C.Title,{headingLevel:"h1",children:n}):v.jsx(C.Title,{headingLevel:"h1",children:v.jsx(C.Skeleton,{width:"160px"})}),u&&r&&v.jsx(C.Text,{component:"p",style:{paddingTop:s?4:2,opacity:.8},children:typeof r=="string"?v.jsx(C.Truncate,{content:r}):v.jsx(C.Stack,{children:r.map(h=>v.jsx(C.StackItem,{children:h},h))})})]}),n&&(a||i)&&v.jsxs(C.Flex,{direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[i&&v.jsx(C.FlexItem,{grow:{default:"grow"},children:i}),a&&v.jsx(C.FlexItem,{children:a})]})]}),o]})})]})}function hP(e){const[t]=gt();return v.jsx(wb,{message:t.errorText,children:v.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:e.children})})}function Dxe(e){const t=un("sm");return v.jsxs(C.Masthead,{display:{default:"inline"},children:[v.jsx(mP,{}),v.jsx(C.MastheadMain,{children:v.jsx(C.MastheadBrand,{children:e.icon})}),v.jsx(C.MastheadContent,{style:{marginLeft:0},children:v.jsx(C.Toolbar,{id:"toolbar",inset:{default:"insetNone"},children:v.jsxs(C.ToolbarContent,{children:[t&&v.jsx(C.ToolbarItem,{children:v.jsxs(C.Stack,{style:{color:"white",cursor:"default",marginTop:-2,marginBottom:-2},children:[e.brand&&v.jsx(C.Text,{style:{marginTop:-6},children:v.jsx(C.Truncate,{content:e.brand,style:{minWidth:0}})}),v.jsx(C.Title,{headingLevel:"h1",style:{lineHeight:1},children:v.jsx(C.Truncate,{content:e.title,style:{minWidth:0}})})]})}),e.children]})})})]})}function mP(){const e=eu();return v.jsx(C.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:v.jsx(C.PageToggleButton,{variant:"plain","aria-label":"Global navigation",children:v.jsx(Ce.BarsIcon,{})})})}function Ixe(e){const{t}=yt(),n=Rt.useNavigate(),{dashboardUrl:r}=e;return React.createElement(C.Page,null,React.createElement(C.EmptyState,{variant:C.EmptyStateVariant.small,style:{paddingTop:48}},React.createElement(C.EmptyStateIcon,{icon:Ce.ExclamationCircleIcon}),React.createElement(C.Title,{headingLevel:"h2",size:"lg"},t("We could not find that page")),React.createElement(C.EmptyStateSecondaryActions,null,React.createElement(C.Stack,{hasGutter:!0},React.createElement(C.Button,{onClick:()=>n(-1)},t("Return to previous page")),React.createElement(C.Button,{component:i=>React.createElement(Rt.Link,{to:r,...i})},t("Return to dashboard"))))))}function gP(e){const{navigation:t}=e,n=eu();return v.jsx(C.PageSidebar,{isNavOpen:n.isOpen,nav:v.jsx(C.Nav,{children:v.jsx(C.NavList,{children:v.jsx(eh,{baseRoute:"",items:t})})})})}function eh(e){return v.jsx(v.Fragment,{children:e.items.map((t,n)=>v.jsx($xe,{item:t,baseRoute:e.baseRoute},n))})}function $xe(e){let t;if("id"in e.item)t=e.item.id;else if("children"in e.item){const a=e.item.children.find(o=>o.path==="");a&&"id"in a&&(t=a.id)}const n=fP(),{item:r}=e;let i=e.baseRoute+"/"+r.path;return i=i.replace("//","/"),r.path==="/"&&"children"in r?v.jsx(eh,{items:r.children,baseRoute:""}):"children"in r&&r.children.find(a=>a.label!==void 0)!==void 0?r.label===void 0?v.jsx(v.Fragment,{}):r.label===""?v.jsx(eh,{items:r.children,baseRoute:i}):v.jsx(C.NavExpandable,{title:r.label,isActive:location.pathname.startsWith(i),isExpanded:!0,children:v.jsx(eh,{items:r.children,baseRoute:i})}):"label"in r?v.jsx(C.NavItem,{id:t,isActive:location.pathname.startsWith(i),onClick:()=>n(i),"data-cy":t,children:r.label}):v.jsx(v.Fragment,{})}const pP=x.createContext({});function Lxe(){return x.useContext(pP)}function Fxe(e){const t=x.useMemo(()=>vP("",e.navigation),[e.navigation]);return v.jsx(pP.Provider,{value:t,children:e.children})}function vP(e,t){const n={};return t.forEach(r=>{const i=(e+"/"+r.path).replace("//","/");"id"in r&&typeof r.id=="string"&&(n[r.id]=i),"children"in r&&Object.assign(n,vP(i,r.children))}),n}function Nxe(e){const{navigation:t,basename:n,masthead:r}=e,i=x.useMemo(()=>[{path:"",element:v.jsx(dP,{children:v.jsx(Rt.Outlet,{})}),children:[{path:"login",element:e.login},{path:"",element:e.root??v.jsx(v.Fragment,{}),children:[{path:"",element:v.jsx(C.Page,{header:r,sidebar:v.jsx(gP,{navigation:t}),children:v.jsx(hP,{children:v.jsx(Rt.Outlet,{})})}),children:t}]},{path:"*",element:v.jsx(Ixe,{})}]}],[r,t,e.login,e.root]),a=x.useMemo(()=>Rt.createBrowserRouter(i,{basename:n}),[n,i]);return v.jsx(Fxe,{navigation:t,children:v.jsx(Rt.RouterProvider,{router:a})})}function Bxe(e){return e.replace(/^\//,"")}function yP(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=yP(n.children,t);if(r)return r}}}function bP(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const i=bP(r.children,t);if(i)return i}}}function _P(e,t,n){for(const r of e)if("id"in r&&r.id===t){const i=r;"children"in r||(i.children=[]),i.children.push(n);return}else"children"in r&&_P(r.children,t,n)}function xP(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r+1,0,n);return}else"children"in i&&xP(i.children,t,n)}}function SP(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];if("id"in i&&i.id===t){e.splice(r,0,n);return}else"children"in i&&SP(i.children,t,n)}}function wP(){const e=Lxe();return(t,n)=>{let r=e[t]??"";const i=n==null?void 0:n.params,a=n==null?void 0:n.query;return r?(i&&(r=Object.keys(i).reduce((o,l)=>{let s=i[l];return s===void 0?o:(s=encodeURIComponent(s.toString()),o.replace(`:${l}`,s))},r)),a&&(r=`${r}?${Object.keys(a).map(o=>{let l=a[o];return l===void 0?"":(l=encodeURIComponent(l.toString()),`${o}=${l}`)}).join("&").replace("/&&/g","&")}`)):console.error(`Page id ${t} not found`),r}}function Rxe(){const e=Rt.useNavigate(),t=wP();return(n,r)=>{const i=t(n,r);i&&e(i)}}function OP(e){const{loading:t}=e,[n,r]=x.useState((e==null?void 0:e.initialTabIndex)??0),i=x.useCallback((s,u)=>r(u),[r]),a=x.Children.toArray(e.children),o=a.map((s,u)=>{if(x.isValidElement(s)&&s.type===My){const c=s.props.label;return v.jsx(C.Tab,{title:c||v.jsx(C.Skeleton,{width:"60px"}),eventKey:u},c??u)}return s}),l=a[n];return t?v.jsx(OP,{children:v.jsx(My,{children:v.jsx(C.PageSection,{variant:"light",children:v.jsx(C.Skeleton,{})})})}):v.jsxs(v.Fragment,{children:[v.jsx(C.PageSection,{type:C.PageSectionTypes.tabs,className:"border-bottom",children:v.jsxs(C.Flex,{spaceItems:{default:"spaceItemsNone"},children:[e.preComponents&&v.jsxs(v.Fragment,{children:[v.jsx(C.FlexItem,{children:e.preComponents}),v.jsx(C.Divider,{orientation:{default:"vertical"},component:"div"})]}),v.jsx(C.FlexItem,{grow:{default:"grow"},children:v.jsx(C.Tabs,{activeKey:n,onSelect:i,inset:e.preComponents?void 0:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm","2xl":"insetSm"},hasBorderBottom:!1,children:o})}),e.postComponents&&v.jsxs(v.Fragment,{children:[v.jsx(C.Divider,{orientation:{default:"vertical"}}),v.jsx(C.FlexItem,{style:{paddingRight:16},children:e.postComponents})]})]})}),l]})}function My(e){return v.jsx(v.Fragment,{children:e.children})}function Wxe(e){const{activeKey:t,setActiveKey:n}=e,r=x.useCallback((i,a)=>n(a),[n]);return v.jsx(C.PageSection,{type:C.PageSectionTypes.tabs,style:{flexGrow:1},children:v.jsx(C.Tabs,{activeKey:t,onSelect:r,inset:{default:"insetNone",sm:"insetNone",md:"insetNone",lg:"insetNone",xl:"insetSm","2xl":"insetSm"},children:e.children})})}const zxe=U3`
533
533
  from {
534
534
  transform: rotate(0);
535
535
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "2.4.448",
4
+ "version": "2.4.449",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",