@ansible/ansible-ui-framework 2.4.369 → 2.4.371

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,7 @@ export declare function PageForm<T extends object>(props: {
16
16
  disableScrolling?: boolean;
17
17
  disableBody?: boolean;
18
18
  disablePadding?: boolean;
19
+ autoComplete?: string;
19
20
  }): import("react/jsx-runtime").JSX.Element;
20
21
  export declare function PageFormGrid(props: {
21
22
  children?: ReactNode;
package/index.js CHANGED
@@ -114359,6 +114359,7 @@ function qyt(n) {
114359
114359
  }
114360
114360
  ),
114361
114361
  isHorizontal: h,
114362
+ autoComplete: (n == null ? void 0 : n.autoComplete) || "on",
114362
114363
  style: {
114363
114364
  display: "flex",
114364
114365
  flexDirection: "column",
package/index.umd.cjs CHANGED
@@ -1137,7 +1137,7 @@ ${l}${m}`:`
1137
1137
  `))&&(d=!0),f.push(y),h=f.length}let g;const{start:m,end:p}=i;if(f.length===0)g=m+p;else if(d||(d=f.reduce((_,b)=>_+b.length+2,2)>qk.maxFlowStringSingleLineLength),d){g=m;for(const v of f)g+=v?`
1138
1138
  ${a}${s}${v}`:`
1139
1139
  `;g+=`
1140
- ${s}${p}`}else g=`${m}${l}${f.join(" ")}${l}${p}`;return n&&(g+=ug(g,s,c(n)),o&&o()),g}function Jk({indent:n,options:{commentString:e}},t,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){const o=ay(e(i),n);t.push(o.trimStart())}}function dg(n,e){const t=dr(e)?e.value:e;for(const i of n)if(Rr(i)&&(i.key===e||i.key===t||dr(i.key)&&i.key.value===t))return i}class k0 extends qk{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(lg,e),this.items=[]}static from(e,t,i){const{keepUndefined:r,replacer:o}=i,s=new this(e),a=(l,c)=>{if(typeof o=="function")c=o.call(t,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||r)&&s.items.push(m7(l,c,i))};if(t instanceof Map)for(const[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(const l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,t){var s;let i;Rr(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new vu(e,e==null?void 0:e.value):i=new vu(e.key,e.value);const r=dg(this.items,i.key),o=(s=this.schema)==null?void 0:s.sortMapEntries;if(r){if(!t)throw new Error(`Key ${i.key} already set`);dr(r.value)&&Qre(i.value)?r.value.value=i.value:r.value=i.value}else if(o){const a=this.items.findIndex(l=>o(i,l)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(e){const t=dg(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const i=dg(this.items,e),r=i==null?void 0:i.value;return(!t&&dr(r)?r.value:r)??void 0}has(e){return!!dg(this.items,e)}set(e,t){this.add(new vu(e,t),!0)}toJSON(e,t,i){const r=i?new i:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(r);for(const o of this.items)ioe(t,r,o);return r}toString(e,t,i){if(!e)return JSON.stringify(this);for(const r of this.items)if(!Rr(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),roe(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}}class ooe extends qk{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(iy,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=eD(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const i=eD(e);if(typeof i!="number")return;const r=this.items[i];return!t&&dr(r)?r.value:r}has(e){const t=eD(e);return typeof t=="number"&&t<this.items.length}set(e,t){const i=eD(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[i];dr(r)&&Qre(t)?r.value=t:this.items[i]=t}toJSON(e,t){const i=[];t!=null&&t.onCreate&&t.onCreate(i);let r=0;for(const o of this.items)i.push(Qa(o,String(r++),t));return i}toString(e,t,i){return e?roe(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){const{replacer:r}=i,o=new this(e);if(t&&Symbol.iterator in Object(t)){let s=0;for(let a of t){if(typeof r=="function"){const l=t instanceof Set?a:String(s++);a=r.call(t,l,a)}o.items.push(Uk(a,void 0,i))}}return o}}function eD(n){let e=dr(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function vft(n,e,t){const{replacer:i}=t,r=new ooe(n);r.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof i=="function"&&(s=i.call(e,String(o++),s));let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const c=Object.keys(s);if(c.length===1)a=c[0],l=s[a];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else a=s;r.items.push(m7(a,l,t))}return r}class p7 extends ooe{constructor(){super(),this.add=k0.prototype.add.bind(this),this.delete=k0.prototype.delete.bind(this),this.get=k0.prototype.get.bind(this),this.has=k0.prototype.has.bind(this),this.set=k0.prototype.set.bind(this),this.tag=p7.tag}toJSON(e,t){if(!t)return super.toJSON(e);const i=new Map;t!=null&&t.onCreate&&t.onCreate(i);for(const r of this.items){let o,s;if(Rr(r)?(o=Qa(r.key,"",t),s=Qa(r.value,o,t)):o=Qa(r,"",t),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(e,t,i){const r=vft(e,t,i),o=new this;return o.items=r.items,o}}p7.tag="tag:yaml.org,2002:omap";class _7 extends k0{constructor(e){super(e),this.tag=_7.tag}add(e){let t;Rr(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new vu(e.key,null):t=new vu(e,null),dg(this.items,t.key)||this.items.push(t)}get(e,t){const i=dg(this.items,e);return!t&&Rr(i)?dr(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const i=dg(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new vu(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){const{replacer:r}=i,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let s of t)typeof r=="function"&&(s=r.call(t,s,s)),o.items.push(m7(s,null,i));return o}}_7.tag="tag:yaml.org,2002:set";class tD extends Error{constructor(e,t,i,r,o){super(e),this.details=t,this.statusCode=i,this.body=r,this.json=o,Object.setPrototypeOf(this,tD.prototype),this.name="RequestError"}}function bft(n){const{defaultValue:e,disableBody:t,disablePadding:i}=n,r=E$e({defaultValues:e??{}}),[o]=Ci(),{handleSubmit:s,setError:a}=r,[l,c]=E.useState(null),u=Do("md"),[d]=E.useContext(Eg),h=n.isVertical?!1:d.formLayout==="horizontal",g=(n.singleColumn?!1:d.formColumns==="multiple")?1600:h?960:800,m=v=>{if(v instanceof Error?c(v):c(new Error("Unknown error")),typeof v=="object"&&v!==null&&"json"in v&&typeof v.json=="object"&&v.json!==null)for(const _ in v.json){let b=v.json[_];typeof b=="string"?a(_,{message:b}):Array.isArray(b)&&(b=b[0],typeof b=="string"&&a(_,{message:b}))}};let p=x.jsx(g$e,{...r,children:x.jsxs(P.Form,{onSubmit:s(async(v,_)=>{var y,C;c(null);let b=!1;_!==void 0&&((y=_==null?void 0:_.nativeEvent)!=null&&y.submitter)&&(b=((C=_.nativeEvent.submitter)==null?void 0:C.innerHTML)===n.additionalActionText);try{await n.onSubmit(v,k=>c(new Error(k)),a,b?r:void 0)}catch(k){m(k)}}),isHorizontal:h,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:n.disableScrolling?void 0:"hidden",gap:0},children:[n.disableScrolling?x.jsx("div",{style:{maxWidth:g,padding:i?void 0:24},children:x.jsx(v7,{isVertical:n.isVertical,singleColumn:n.singleColumn,children:n.children})}):x.jsx("div",{style:{height:"100%",flexGrow:1,overflow:"auto"},children:x.jsx("div",{style:{maxWidth:g,padding:i?void 0:24},children:x.jsx(v7,{isVertical:n.isVertical,singleColumn:n.singleColumn,children:n.children})})}),l&&x.jsx(P.Alert,{variant:"danger",title:l.message??"",isInline:!0,style:{paddingLeft:u&&n.onCancel?190:void 0},isExpandable:l instanceof tD?!!l.details:!1,children:l instanceof tD?l.details:void 0}),n.onCancel?x.jsx("div",{className:"dark-2 border-top",style:{padding:i?void 0:24},children:x.jsxs(P.ActionGroup,{style:{marginTop:0},children:[x.jsx(b7,{children:n.submitText}),n.additionalActionText?x.jsx(P.Button,{"aria-label":n.additionalActionText,type:"submit",variant:"secondary",children:n.additionalActionText}):null,n.onCancel&&x.jsx(soe,{onCancel:n.onCancel,children:n.cancelText??o.cancelText})]})}):x.jsx(b7,{style:{marginTop:48},children:n.submitText})]})});return t||(p=x.jsx(CD,{children:p})),p}function v7(n){const[e]=E.useContext(Eg),t=n.isVertical?!1:e.formLayout==="horizontal",i=n.singleColumn?!1:e.formColumns==="multiple",r=12,o=i?t?12:6:12,s=i?6:12,a=i?6:12,l=i?4:12;return x.jsx(P.Grid,{hasGutter:!0,span:12,sm:r,md:o,lg:s,xl:a,xl2:l,children:n.children})}function b7(n){const{isSubmitting:e,errors:t}=Wq(),{t:i}=$r(),r=t&&Object.keys(t).length>0;return x.jsx(P.Tooltip,{content:i("Please fix errors"),trigger:r?void 0:"manual",children:x.jsx(P.Button,{type:"submit",isDisabled:e,isLoading:e,isDanger:r,variant:r?"secondary":void 0,style:n.style,children:n.children})})}function soe(n){return x.jsx(P.Button,{type:"button",variant:"link",onClick:n.onCancel,children:n.children})}const Bvt="",y7=E.createContext({isOpen:!1,setState:()=>({})});function nD(){return E.useContext(y7)}function aoe(n){const e=Do("xl"),[t,i]=E.useState(()=>e),r=E.useCallback(o=>{o.isOpen!==void 0&&i(o.isOpen)},[]);return E.useEffect(()=>r({isOpen:e}),[e,r]),x.jsx(y7.Provider,{value:{isOpen:t,setState:r},children:n.children})}function yft(){const n=Wy(),e=Do("xl"),t=nD();return E.useCallback(r=>{n(r),e||t.setState({isOpen:!t.isOpen})},[n,e,t])}function wft(n){return x.jsx(aR,{children:x.jsx(_R,{children:x.jsx(pR,{children:x.jsx(fR,{children:x.jsx(Z8,{callback:n.navigate,children:x.jsx(aoe,{children:n.children})})})})})})}function Cft(n){const e=Wy();return n.breadcrumbs?x.jsx(P.Breadcrumb,{style:n.style,children:n.breadcrumbs.map((t,i)=>t.label?x.jsx(P.BreadcrumbItem,{id:t.id,component:t.component,isActive:t.to===void 0,children:t.to?x.jsx("a",{href:t.to,onClick:r=>{r.preventDefault(),e(t.to)},children:t.label}):t.label},t.id??t.label??i):x.jsx(E.Fragment,{},i))}):x.jsx(E.Fragment,{})}function Sft(n){const{breadcrumbs:e,title:t,description:i,controls:r,headerActions:o,footer:s}=n,a=Do("lg"),l=Do("xl"),c=Do("md"),d=nD().isOpen&&l?void 0:n.navigation,[h]=Ci();return x.jsxs(x.Fragment,{children:[d&&x.jsx(P.PageSection,{variant:P.PageSectionVariants.light,className:"border-top dark-1",style:{paddingLeft:0,paddingTop:0,paddingBottom:0},children:x.jsx(P.Flex,{direction:{default:"row"},flexWrap:{default:"nowrap"},style:{maxWidth:"100%"},children:x.jsx(P.PageNavigation,{style:{paddingTop:0,flexShrink:1,flexGrow:1},children:d})})}),x.jsx(P.PageSection,{variant:P.PageSectionVariants.light,className:"border-top border-bottom dark-3",style:{paddingTop:l?16:12,paddingBottom:l?16:12},children:x.jsxs(P.Stack,{hasGutter:!0,children:[x.jsxs(P.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[x.jsxs(P.FlexItem,{grow:{default:"grow"},children:[e&&x.jsx(Cft,{breadcrumbs:e,style:{paddingBottom:a?6:4}}),t?n.titleHelp?x.jsx(P.Popover,{headerContent:n.titleHelpTitle,bodyContent:x.jsxs(P.Stack,{hasGutter:!0,children:[typeof n.titleHelp=="string"?x.jsx(P.StackItem,{children:n.titleHelp}):n.titleHelp.map((f,g)=>x.jsx(P.StackItem,{children:f},g)),n.titleDocLink&&x.jsx(P.StackItem,{children:x.jsx(P.Button,{icon:x.jsx(Ct.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(n.titleDocLink,"_blank"),isInline:!0,children:h.documentation})})]}),position:"bottom-start",removeFindDomNode:!0,children:x.jsxs(P.Title,{headingLevel:"h1",children:[t,x.jsx(P.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:x.jsx(Ct.OutlinedQuestionCircleIcon,{})})]})}):x.jsx(P.Title,{headingLevel:"h1",children:t}):x.jsx(P.Title,{headingLevel:"h1",children:x.jsx(P.Skeleton,{width:"160px"})}),c&&i&&x.jsx(P.Text,{component:"p",style:{paddingTop:l?4:2,opacity:.8},children:typeof i=="string"?x.jsx(P.Truncate,{content:i}):x.jsx(P.Stack,{children:i.map(f=>x.jsx(P.StackItem,{children:f},f))})})]}),t&&(o||r)&&x.jsxs(P.Flex,{direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[r&&x.jsx(P.FlexItem,{grow:{default:"grow"},children:r}),o&&x.jsx(P.FlexItem,{children:o})]})]}),s]})})]})}function xft(n){const[e]=Ci();return x.jsx(gR,{message:e.errorText,children:x.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:n.children})})}const Lft=un.div`
1140
+ ${s}${p}`}else g=`${m}${l}${f.join(" ")}${l}${p}`;return n&&(g+=ug(g,s,c(n)),o&&o()),g}function Jk({indent:n,options:{commentString:e}},t,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){const o=ay(e(i),n);t.push(o.trimStart())}}function dg(n,e){const t=dr(e)?e.value:e;for(const i of n)if(Rr(i)&&(i.key===e||i.key===t||dr(i.key)&&i.key.value===t))return i}class k0 extends qk{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(lg,e),this.items=[]}static from(e,t,i){const{keepUndefined:r,replacer:o}=i,s=new this(e),a=(l,c)=>{if(typeof o=="function")c=o.call(t,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||r)&&s.items.push(m7(l,c,i))};if(t instanceof Map)for(const[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(const l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,t){var s;let i;Rr(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new vu(e,e==null?void 0:e.value):i=new vu(e.key,e.value);const r=dg(this.items,i.key),o=(s=this.schema)==null?void 0:s.sortMapEntries;if(r){if(!t)throw new Error(`Key ${i.key} already set`);dr(r.value)&&Qre(i.value)?r.value.value=i.value:r.value=i.value}else if(o){const a=this.items.findIndex(l=>o(i,l)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(e){const t=dg(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const i=dg(this.items,e),r=i==null?void 0:i.value;return(!t&&dr(r)?r.value:r)??void 0}has(e){return!!dg(this.items,e)}set(e,t){this.add(new vu(e,t),!0)}toJSON(e,t,i){const r=i?new i:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(r);for(const o of this.items)ioe(t,r,o);return r}toString(e,t,i){if(!e)return JSON.stringify(this);for(const r of this.items)if(!Rr(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),roe(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}}class ooe extends qk{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(iy,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=eD(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const i=eD(e);if(typeof i!="number")return;const r=this.items[i];return!t&&dr(r)?r.value:r}has(e){const t=eD(e);return typeof t=="number"&&t<this.items.length}set(e,t){const i=eD(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[i];dr(r)&&Qre(t)?r.value=t:this.items[i]=t}toJSON(e,t){const i=[];t!=null&&t.onCreate&&t.onCreate(i);let r=0;for(const o of this.items)i.push(Qa(o,String(r++),t));return i}toString(e,t,i){return e?roe(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){const{replacer:r}=i,o=new this(e);if(t&&Symbol.iterator in Object(t)){let s=0;for(let a of t){if(typeof r=="function"){const l=t instanceof Set?a:String(s++);a=r.call(t,l,a)}o.items.push(Uk(a,void 0,i))}}return o}}function eD(n){let e=dr(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function vft(n,e,t){const{replacer:i}=t,r=new ooe(n);r.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof i=="function"&&(s=i.call(e,String(o++),s));let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const c=Object.keys(s);if(c.length===1)a=c[0],l=s[a];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else a=s;r.items.push(m7(a,l,t))}return r}class p7 extends ooe{constructor(){super(),this.add=k0.prototype.add.bind(this),this.delete=k0.prototype.delete.bind(this),this.get=k0.prototype.get.bind(this),this.has=k0.prototype.has.bind(this),this.set=k0.prototype.set.bind(this),this.tag=p7.tag}toJSON(e,t){if(!t)return super.toJSON(e);const i=new Map;t!=null&&t.onCreate&&t.onCreate(i);for(const r of this.items){let o,s;if(Rr(r)?(o=Qa(r.key,"",t),s=Qa(r.value,o,t)):o=Qa(r,"",t),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,s)}return i}static from(e,t,i){const r=vft(e,t,i),o=new this;return o.items=r.items,o}}p7.tag="tag:yaml.org,2002:omap";class _7 extends k0{constructor(e){super(e),this.tag=_7.tag}add(e){let t;Rr(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new vu(e.key,null):t=new vu(e,null),dg(this.items,t.key)||this.items.push(t)}get(e,t){const i=dg(this.items,e);return!t&&Rr(i)?dr(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const i=dg(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new vu(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){const{replacer:r}=i,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let s of t)typeof r=="function"&&(s=r.call(t,s,s)),o.items.push(m7(s,null,i));return o}}_7.tag="tag:yaml.org,2002:set";class tD extends Error{constructor(e,t,i,r,o){super(e),this.details=t,this.statusCode=i,this.body=r,this.json=o,Object.setPrototypeOf(this,tD.prototype),this.name="RequestError"}}function bft(n){const{defaultValue:e,disableBody:t,disablePadding:i}=n,r=E$e({defaultValues:e??{}}),[o]=Ci(),{handleSubmit:s,setError:a}=r,[l,c]=E.useState(null),u=Do("md"),[d]=E.useContext(Eg),h=n.isVertical?!1:d.formLayout==="horizontal",g=(n.singleColumn?!1:d.formColumns==="multiple")?1600:h?960:800,m=v=>{if(v instanceof Error?c(v):c(new Error("Unknown error")),typeof v=="object"&&v!==null&&"json"in v&&typeof v.json=="object"&&v.json!==null)for(const _ in v.json){let b=v.json[_];typeof b=="string"?a(_,{message:b}):Array.isArray(b)&&(b=b[0],typeof b=="string"&&a(_,{message:b}))}};let p=x.jsx(g$e,{...r,children:x.jsxs(P.Form,{onSubmit:s(async(v,_)=>{var y,C;c(null);let b=!1;_!==void 0&&((y=_==null?void 0:_.nativeEvent)!=null&&y.submitter)&&(b=((C=_.nativeEvent.submitter)==null?void 0:C.innerHTML)===n.additionalActionText);try{await n.onSubmit(v,k=>c(new Error(k)),a,b?r:void 0)}catch(k){m(k)}}),isHorizontal:h,autoComplete:(n==null?void 0:n.autoComplete)||"on",style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:n.disableScrolling?void 0:"hidden",gap:0},children:[n.disableScrolling?x.jsx("div",{style:{maxWidth:g,padding:i?void 0:24},children:x.jsx(v7,{isVertical:n.isVertical,singleColumn:n.singleColumn,children:n.children})}):x.jsx("div",{style:{height:"100%",flexGrow:1,overflow:"auto"},children:x.jsx("div",{style:{maxWidth:g,padding:i?void 0:24},children:x.jsx(v7,{isVertical:n.isVertical,singleColumn:n.singleColumn,children:n.children})})}),l&&x.jsx(P.Alert,{variant:"danger",title:l.message??"",isInline:!0,style:{paddingLeft:u&&n.onCancel?190:void 0},isExpandable:l instanceof tD?!!l.details:!1,children:l instanceof tD?l.details:void 0}),n.onCancel?x.jsx("div",{className:"dark-2 border-top",style:{padding:i?void 0:24},children:x.jsxs(P.ActionGroup,{style:{marginTop:0},children:[x.jsx(b7,{children:n.submitText}),n.additionalActionText?x.jsx(P.Button,{"aria-label":n.additionalActionText,type:"submit",variant:"secondary",children:n.additionalActionText}):null,n.onCancel&&x.jsx(soe,{onCancel:n.onCancel,children:n.cancelText??o.cancelText})]})}):x.jsx(b7,{style:{marginTop:48},children:n.submitText})]})});return t||(p=x.jsx(CD,{children:p})),p}function v7(n){const[e]=E.useContext(Eg),t=n.isVertical?!1:e.formLayout==="horizontal",i=n.singleColumn?!1:e.formColumns==="multiple",r=12,o=i?t?12:6:12,s=i?6:12,a=i?6:12,l=i?4:12;return x.jsx(P.Grid,{hasGutter:!0,span:12,sm:r,md:o,lg:s,xl:a,xl2:l,children:n.children})}function b7(n){const{isSubmitting:e,errors:t}=Wq(),{t:i}=$r(),r=t&&Object.keys(t).length>0;return x.jsx(P.Tooltip,{content:i("Please fix errors"),trigger:r?void 0:"manual",children:x.jsx(P.Button,{type:"submit",isDisabled:e,isLoading:e,isDanger:r,variant:r?"secondary":void 0,style:n.style,children:n.children})})}function soe(n){return x.jsx(P.Button,{type:"button",variant:"link",onClick:n.onCancel,children:n.children})}const Bvt="",y7=E.createContext({isOpen:!1,setState:()=>({})});function nD(){return E.useContext(y7)}function aoe(n){const e=Do("xl"),[t,i]=E.useState(()=>e),r=E.useCallback(o=>{o.isOpen!==void 0&&i(o.isOpen)},[]);return E.useEffect(()=>r({isOpen:e}),[e,r]),x.jsx(y7.Provider,{value:{isOpen:t,setState:r},children:n.children})}function yft(){const n=Wy(),e=Do("xl"),t=nD();return E.useCallback(r=>{n(r),e||t.setState({isOpen:!t.isOpen})},[n,e,t])}function wft(n){return x.jsx(aR,{children:x.jsx(_R,{children:x.jsx(pR,{children:x.jsx(fR,{children:x.jsx(Z8,{callback:n.navigate,children:x.jsx(aoe,{children:n.children})})})})})})}function Cft(n){const e=Wy();return n.breadcrumbs?x.jsx(P.Breadcrumb,{style:n.style,children:n.breadcrumbs.map((t,i)=>t.label?x.jsx(P.BreadcrumbItem,{id:t.id,component:t.component,isActive:t.to===void 0,children:t.to?x.jsx("a",{href:t.to,onClick:r=>{r.preventDefault(),e(t.to)},children:t.label}):t.label},t.id??t.label??i):x.jsx(E.Fragment,{},i))}):x.jsx(E.Fragment,{})}function Sft(n){const{breadcrumbs:e,title:t,description:i,controls:r,headerActions:o,footer:s}=n,a=Do("lg"),l=Do("xl"),c=Do("md"),d=nD().isOpen&&l?void 0:n.navigation,[h]=Ci();return x.jsxs(x.Fragment,{children:[d&&x.jsx(P.PageSection,{variant:P.PageSectionVariants.light,className:"border-top dark-1",style:{paddingLeft:0,paddingTop:0,paddingBottom:0},children:x.jsx(P.Flex,{direction:{default:"row"},flexWrap:{default:"nowrap"},style:{maxWidth:"100%"},children:x.jsx(P.PageNavigation,{style:{paddingTop:0,flexShrink:1,flexGrow:1},children:d})})}),x.jsx(P.PageSection,{variant:P.PageSectionVariants.light,className:"border-top border-bottom dark-3",style:{paddingTop:l?16:12,paddingBottom:l?16:12},children:x.jsxs(P.Stack,{hasGutter:!0,children:[x.jsxs(P.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[x.jsxs(P.FlexItem,{grow:{default:"grow"},children:[e&&x.jsx(Cft,{breadcrumbs:e,style:{paddingBottom:a?6:4}}),t?n.titleHelp?x.jsx(P.Popover,{headerContent:n.titleHelpTitle,bodyContent:x.jsxs(P.Stack,{hasGutter:!0,children:[typeof n.titleHelp=="string"?x.jsx(P.StackItem,{children:n.titleHelp}):n.titleHelp.map((f,g)=>x.jsx(P.StackItem,{children:f},g)),n.titleDocLink&&x.jsx(P.StackItem,{children:x.jsx(P.Button,{icon:x.jsx(Ct.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(n.titleDocLink,"_blank"),isInline:!0,children:h.documentation})})]}),position:"bottom-start",removeFindDomNode:!0,children:x.jsxs(P.Title,{headingLevel:"h1",children:[t,x.jsx(P.Button,{variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"},children:x.jsx(Ct.OutlinedQuestionCircleIcon,{})})]})}):x.jsx(P.Title,{headingLevel:"h1",children:t}):x.jsx(P.Title,{headingLevel:"h1",children:x.jsx(P.Skeleton,{width:"160px"})}),c&&i&&x.jsx(P.Text,{component:"p",style:{paddingTop:l?4:2,opacity:.8},children:typeof i=="string"?x.jsx(P.Truncate,{content:i}):x.jsx(P.Stack,{children:i.map(f=>x.jsx(P.StackItem,{children:f},f))})})]}),t&&(o||r)&&x.jsxs(P.Flex,{direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[r&&x.jsx(P.FlexItem,{grow:{default:"grow"},children:r}),o&&x.jsx(P.FlexItem,{children:o})]})]}),s]})})]})}function xft(n){const[e]=Ci();return x.jsx(gR,{message:e.errorText,children:x.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%",maxHeight:"100%"},children:n.children})})}const Lft=un.div`
1141
1141
  flex-grow: 1;
1142
1142
  `,kft=un(P.Toolbar)`
1143
1143
  padding: 0px;
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.369",
4
+ "version": "2.4.371",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",