@ansible/ansible-ui-framework 2.4.1285 → 2.4.1287

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.
@@ -5,4 +5,5 @@ export declare function PageDetail(props: {
5
5
  children?: ReactNode;
6
6
  helpText?: string | ReactNode;
7
7
  isEmpty?: boolean;
8
+ fullWidth?: boolean;
8
9
  }): import("react/jsx-runtime").JSX.Element;
package/index.js CHANGED
@@ -34724,7 +34724,7 @@ function d_e(e) {
34724
34724
  }
34725
34725
  function gc(e) {
34726
34726
  const t = aa(e), { label: n, children: r, helpText: i, isEmpty: a } = e;
34727
- return r === null || typeof r > "u" || r === "" ? /* @__PURE__ */ m.jsx(m.Fragment, {}) : a ? /* @__PURE__ */ m.jsx(m.Fragment, {}) : /* @__PURE__ */ m.jsxs(cs, { children: [
34727
+ return r === null || typeof r > "u" || r === "" ? /* @__PURE__ */ m.jsx(m.Fragment, {}) : a ? /* @__PURE__ */ m.jsx(m.Fragment, {}) : /* @__PURE__ */ m.jsxs(cs, { style: { gridColumn: e.fullWidth ? "span 3" : void 0 }, children: [
34728
34728
  n && /* @__PURE__ */ m.jsxs(Jm, { children: [
34729
34729
  n,
34730
34730
  i ? /* @__PURE__ */ m.jsx(d_e, { header: n, content: i }) : null
package/index.umd.cjs CHANGED
@@ -382,7 +382,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
382
382
  font-size: var(--pf-v5-global--FontSize--sm);
383
383
  --pf-v5-c-form__group-label-help--Color: var(--pf-v5-global--Color--200);
384
384
  --pf-v5-c-form__group-label-help--hover--Color: var(--pf-v5-global--Color--100);
385
- `;function uye(e){const{ariaLabel:t="",content:n,header:r,id:i="",maxWidth:a="",...o}=e,[s]=Pt();return n?m.jsx(k.Popover,{bodyContent:n,headerContent:r,hideOnOutsideClick:!0,id:i,"data-cy":i,maxWidth:a,...o,children:m.jsx(cye,{"aria-label":t??s.moreInformation,"aria-haspopup":"true",className:"pf-v5-c-form__group-label-help",onClick:l=>l.preventDefault(),type:"button",children:m.jsx(ve.HelpIcon,{})})}):null}function Ns(e){const t=bi(e),{label:n,children:r,helpText:i,isEmpty:a}=e;return r===null||typeof r>"u"||r===""?m.jsx(m.Fragment,{}):a?m.jsx(m.Fragment,{}):m.jsxs(k.DescriptionListGroup,{children:[n&&m.jsxs(k.DescriptionListTerm,{children:[n,i?m.jsx(uye,{header:n,content:i}):null]}),m.jsx(k.DescriptionListDescription,{id:t,"data-cy":t,children:r})]})}function NP(e){const{disablePadding:t,alertPrompts:n}=e,r=Ua(),i=e.labelOrientation??r.formLayout,a=e.numberOfColumns?e.numberOfColumns:r.formColumns,o=e.isCompact;let s=m.jsxs(fye,{variant:"light",padding:{default:"noPadding"},children:[n&&n.length>0&&n.map((l,c)=>m.jsx(k.Alert,{style:{margin:12},isInline:!0,title:l,variant:"warning","data-cy":l},c)),m.jsx(k.DescriptionList,{orientation:{sm:i,md:i,lg:i,xl:i,"2xl":i},columnModifier:a==="multiple"?{default:"1Col",sm:"1Col",md:"2Col",lg:"2Col",xl:"3Col","2xl":"3Col"}:void 0,style:{maxWidth:1200,padding:t?void 0:24},isCompact:o,children:e.children})]});return e.disableScroll||(s=m.jsx(Pr,{children:s})),s}const fye=Ee(k.PageSection)`
385
+ `;function uye(e){const{ariaLabel:t="",content:n,header:r,id:i="",maxWidth:a="",...o}=e,[s]=Pt();return n?m.jsx(k.Popover,{bodyContent:n,headerContent:r,hideOnOutsideClick:!0,id:i,"data-cy":i,maxWidth:a,...o,children:m.jsx(cye,{"aria-label":t??s.moreInformation,"aria-haspopup":"true",className:"pf-v5-c-form__group-label-help",onClick:l=>l.preventDefault(),type:"button",children:m.jsx(ve.HelpIcon,{})})}):null}function Ns(e){const t=bi(e),{label:n,children:r,helpText:i,isEmpty:a}=e;return r===null||typeof r>"u"||r===""?m.jsx(m.Fragment,{}):a?m.jsx(m.Fragment,{}):m.jsxs(k.DescriptionListGroup,{style:{gridColumn:e.fullWidth?"span 3":void 0},children:[n&&m.jsxs(k.DescriptionListTerm,{children:[n,i?m.jsx(uye,{header:n,content:i}):null]}),m.jsx(k.DescriptionListDescription,{id:t,"data-cy":t,children:r})]})}function NP(e){const{disablePadding:t,alertPrompts:n}=e,r=Ua(),i=e.labelOrientation??r.formLayout,a=e.numberOfColumns?e.numberOfColumns:r.formColumns,o=e.isCompact;let s=m.jsxs(fye,{variant:"light",padding:{default:"noPadding"},children:[n&&n.length>0&&n.map((l,c)=>m.jsx(k.Alert,{style:{margin:12},isInline:!0,title:l,variant:"warning","data-cy":l},c)),m.jsx(k.DescriptionList,{orientation:{sm:i,md:i,lg:i,xl:i,"2xl":i},columnModifier:a==="multiple"?{default:"1Col",sm:"1Col",md:"2Col",lg:"2Col",xl:"3Col","2xl":"3Col"}:void 0,style:{maxWidth:1200,padding:t?void 0:24},isCompact:o,children:e.children})]});return e.disableScroll||(s=m.jsx(Pr,{children:s})),s}const fye=Ee(k.PageSection)`
386
386
  background-color: transparent;
387
387
  `;var et=(e=>(e.Table="table",e.List="list",e.Cards="cards",e))(et||{}),xa=(e=>(e.description="description",e.expanded="expanded",e.hidden="hidden",e))(xa||{}),FP=(e=>(e.name="name",e.subtitle="subtitle",e.description="description",e.hidden="hidden",e.primary="primary",e.secondary="secondary",e))(FP||{}),RP=(e=>(e.name="name",e.subtitle="subtitle",e.description="description",e.hidden="hidden",e))(RP||{}),WP=(e=>(e.hidden="hidden",e))(WP||{}),BP=(e=>(e.hidden="hidden",e))(BP||{}),Jh=(e=>(e.last="last",e))(Jh||{});function Qt(e){var r;const{item:t,column:n}=e;if(!n)return m.jsx(m.Fragment,{});switch(n.type){case"text":return m.jsx(Ew,{text:n.value(t),to:(r=n.to)==null?void 0:r.call(n,t)});case"description":return m.jsx("div",{style:{minWidth:200,whiteSpace:"normal"},children:n.value(t)});case"datetime":return m.jsx(_w,{value:n.value(t)});case"count":return m.jsx(m.Fragment,{children:n.value(t)??"-"});case"labels":return m.jsx(ww,{labels:n.value(t)??[]});default:return m.jsx(m.Fragment,{children:n.cell(t)})}}function _b(e){return x.useMemo(()=>e.filter(t=>!(t.table==="hidden"||t.table==="description"||t.table==="expanded")),[e])}function zP(e){return x.useMemo(()=>e.filter(t=>t.list!=="hidden"),[e])}function VP(e){return x.useMemo(()=>e.filter(t=>t.card!=="hidden"),[e])}function Qh(e){return x.useMemo(()=>e.filter(t=>t.modal!=="hidden"),[e])}function dye(e){return e=x.useMemo(()=>e.filter(t=>t.dashboard!=="hidden"),[e]),e=GP(e),e=qP(e),e}function hye(e,t){const n=_b(e),r=zP(e),i=VP(e);switch(t){case et.Table:return n;case et.List:return r;case et.Cards:return i}}function UP(e){return x.useMemo(()=>e.filter(t=>t.table==="hidden"?!1:t.table==="description"),[e])}function HP(e){return x.useMemo(()=>e.filter(t=>t.table==="hidden"?!1:t.table==="expanded"),[e])}function GP(e){return x.useMemo(()=>e.map(t=>({...t,sort:void 0})),[e])}function qP(e){return x.useMemo(()=>e.map(t=>({...t,table:t.table==="expanded"?void 0:t.table})),[e])}function YP(e){const{item:t,columns:n,children:r}=e,i=x.useMemo(()=>n.filter(s=>{if(!t)return!1;if("value"in s&&s.value){const l=s.value(t);if(l==null||typeof l=="string"&&l.trim().length===0)return!1}return!0}),[n,t]),a=x.useMemo(()=>i.filter(s=>s.priority!==Jh.last),[i]),o=x.useMemo(()=>i.filter(s=>s.priority===Jh.last),[i]);return!t||!i.length?null:m.jsxs(m.Fragment,{children:[a.map(s=>m.jsx(Ns,{label:s.header,children:m.jsx(Qt,{column:s,item:t})},s.id??s.header)),r||null,o.map(s=>m.jsx(Ns,{label:s.header,children:m.jsx(Qt,{column:s,item:t})},s.id??s.header))]})}class pye{constructor(t){fi(this,"value");fi(this,"next");this.value=t}}class gye{constructor(){zp(this,ui,void 0);zp(this,Co,void 0);zp(this,Eo,void 0);this.clear()}enqueue(t){const n=new pye(t);Ea(this,ui)?(Ea(this,Co).next=n,Xi(this,Co,n)):(Xi(this,ui,n),Xi(this,Co,n)),z1(this,Eo)._++}dequeue(){const t=Ea(this,ui);if(t)return Xi(this,ui,Ea(this,ui).next),z1(this,Eo)._--,t.value}clear(){Xi(this,ui,void 0),Xi(this,Co,void 0),Xi(this,Eo,0)}get size(){return Ea(this,Eo)}*[Symbol.iterator](){let t=Ea(this,ui);for(;t;)yield t.value,t=t.next}}ui=new WeakMap,Co=new WeakMap,Eo=new WeakMap;const mye={bind(e,t,n){return e.bind(n)}};function vye(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new gye;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},a=(s,l,c)=>{t.enqueue(mye.bind(i.bind(void 0,s,l,c))),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},o=(s,...l)=>new Promise(c=>{a(s,c,l)});return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value(){t.clear()}}}),o}function yye(){const e=x.useRef(new AbortController);return x.useEffect(()=>{const t=e.current;return()=>t.abort()},[]),e.current}const wb=Symbol.for("yaml.alias"),bye=Symbol.for("yaml.document"),vo=Symbol.for("yaml.map"),KP=Symbol.for("yaml.pair"),Sb=Symbol.for("yaml.scalar"),jc=Symbol.for("yaml.seq"),ai=Symbol.for("yaml.node.type"),Fs=e=>!!e&&typeof e=="object"&&e[ai]===wb,ep=e=>!!e&&typeof e=="object"&&e[ai]===bye,XP=e=>!!e&&typeof e=="object"&&e[ai]===vo,nn=e=>!!e&&typeof e=="object"&&e[ai]===KP,qt=e=>!!e&&typeof e=="object"&&e[ai]===Sb,Ob=e=>!!e&&typeof e=="object"&&e[ai]===jc;function qn(e){if(e&&typeof e=="object")switch(e[ai]){case vo:case jc:return!0}return!1}function Mn(e){if(e&&typeof e=="object")switch(e[ai]){case wb:case vo:case Sb:case jc:return!0}return!1}const xye=e=>(qt(e)||qn(e))&&!!e.anchor,yo=Symbol("break visit"),_ye=Symbol("skip children"),$c=Symbol("remove node");function Dc(e,t){const n=wye(t);ep(e)?Rs(null,e.contents,n,Object.freeze([e]))===$c&&(e.contents=null):Rs(null,e,n,Object.freeze([]))}Dc.BREAK=yo,Dc.SKIP=_ye,Dc.REMOVE=$c;function Rs(e,t,n,r){const i=Sye(e,t,n,r);if(Mn(i)||nn(i))return Oye(e,r,i),Rs(e,i,n,r);if(typeof i!="symbol"){if(qn(t)){r=Object.freeze(r.concat(t));for(let a=0;a<t.items.length;++a){const o=Rs(a,t.items[a],n,r);if(typeof o=="number")a=o-1;else{if(o===yo)return yo;o===$c&&(t.items.splice(a,1),a-=1)}}}else if(nn(t)){r=Object.freeze(r.concat(t));const a=Rs("key",t.key,n,r);if(a===yo)return yo;a===$c&&(t.key=null);const o=Rs("value",t.value,n,r);if(o===yo)return yo;o===$c&&(t.value=null)}}return i}function wye(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Sye(e,t,n,r){var i,a,o,s,l;if(typeof n=="function")return n(e,t,r);if(XP(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(Ob(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(nn(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(qt(t))return(s=n.Scalar)==null?void 0:s.call(n,e,t,r);if(Fs(t))return(l=n.Alias)==null?void 0:l.call(n,e,t,r)}function Oye(e,t,n){const r=t[t.length-1];if(qn(r))r.items[e]=n;else if(nn(r))e==="key"?r.key=n:r.value=n;else if(ep(r))r.contents=n;else{const i=Fs(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}function ZP(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Mc(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,a=r.length;i<a;++i){const o=r[i],s=Mc(e,r,String(i),o);s===void 0?delete r[i]:s!==o&&(r[i]=s)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const a=r.get(i),o=Mc(e,r,i,a);o===void 0?r.delete(i):o!==a&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const a=Mc(e,r,i,i);a===void 0?r.delete(i):a!==i&&(r.delete(i),r.add(a))}else for(const[i,a]of Object.entries(r)){const o=Mc(e,r,i,a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}return e.call(t,n,r)}function Nr(e,t,n){if(Array.isArray(e))return e.map((r,i)=>Nr(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!xye(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=a=>{r.res=a,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Cb{constructor(t){Object.defineProperty(this,ai,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){if(!ep(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},s=Nr(this,"",o);if(typeof i=="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof a=="function"?Mc(a,{"":s},"",s):s}}class Cye extends Cb{constructor(t){super(wb),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Dc(t,{Node:(r,i)=>{if(i===this)return Dc.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:a}=n,o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let s=r.get(o);if(s||(Nr(o,null,n),s=r.get(o)),!s||s.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=tp(i,o,r)),s.count*s.aliasCount>a)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return s.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(ZP(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(t.implicitKey)return`${i} `}return i}}function tp(e,t,n){if(Fs(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(qn(t)){let r=0;for(const i of t.items){const a=tp(e,i,n);a>r&&(r=a)}return r}else if(nn(t)){const r=tp(e,t.key,n),i=tp(e,t.value,n);return Math.max(r,i)}return 1}const JP=e=>!e||typeof e!="function"&&typeof e!="object";class Nt extends Cb{constructor(t){super(Sb),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Nr(this.value,t,n)}toString(){return String(this.value)}}Nt.BLOCK_FOLDED="BLOCK_FOLDED",Nt.BLOCK_LITERAL="BLOCK_LITERAL",Nt.PLAIN="PLAIN",Nt.QUOTE_DOUBLE="QUOTE_DOUBLE",Nt.QUOTE_SINGLE="QUOTE_SINGLE";const Eye="tag:yaml.org,2002:";function kye(e,t,n){if(t){const r=n.filter(a=>a.tag===t),i=r.find(a=>!a.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function np(e,t,n){var f,d,h;if(ep(e)&&(e=e.contents),Mn(e))return e;if(nn(e)){const p=(d=(f=n.schema[vo]).createNode)==null?void 0:d.call(f,n.schema,null,n);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n;let l;if(r&&e&&typeof e=="object"){if(l=s.get(e),l)return l.anchor||(l.anchor=i(e)),new Cye(l.anchor);l={anchor:null,node:null},s.set(e,l)}t!=null&&t.startsWith("!!")&&(t=Eye+t.slice(2));let c=kye(e,t,o.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const p=new Nt(e);return l&&(l.node=p),p}c=e instanceof Map?o[vo]:Symbol.iterator in Object(e)?o[jc]:o[vo]}a&&(a(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,e,n):typeof((h=c==null?void 0:c.nodeClass)==null?void 0:h.from)=="function"?c.nodeClass.from(n.schema,e,n):new Nt(e);return t?u.tag=t:c.default||(u.tag=c.tag),l&&(l.node=u),u}function QP(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const a=t[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const o=[];o[a]=r,r=o}else r=new Map([[a,r]])}return np(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Tye=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Eb extends Cb{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Mn(r)||nn(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Tye(t))this.add(n);else{const[r,...i]=t,a=this.get(r,!0);if(qn(a))a.addIn(i,n);else if(a===void 0&&this.schema)this.set(r,QP(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(qn(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,a=this.get(r,!0);return i.length===0?!n&&qt(a)?a.value:a:qn(a)?a.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!nn(n))return!1;const r=n.value;return r==null||t&&qt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return qn(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const a=this.get(r,!0);if(qn(a))a.setIn(i,n);else if(a===void 0&&this.schema)this.set(r,QP(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}Eb.maxFlowStringSingleLineLength=60;const Aye=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ic(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const bo=(e,t,n)=>e.endsWith(`
388
388
  `)?Ic(n,t):n.includes(`
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.1285",
4
+ "version": "2.4.1287",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",