@ansible/ansible-ui-framework 2.4.2607 → 2.4.2608

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -41016,7 +41016,7 @@ function Tye(e) {
41016
41016
  return g.current.editor = b, () => {
41017
41017
  setTimeout(() => {
41018
41018
  b.dispose();
41019
- }, 1e3);
41019
+ }, 10 * 1e3);
41020
41020
  };
41021
41021
  }
41022
41022
  }, [e.lineNumbers]), be(() => {
package/index.umd.cjs CHANGED
@@ -474,7 +474,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Au]+=1);const Du=Pe.button`
474
474
  `,e.length-i>t&&a>i?l+=e.slice(i,a)+`
475
475
  `+e.slice(a+1):l+=e.slice(i),l.slice(1)}function jme(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Uc(e,i),r=yn[n],!r&&Vc(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||Cme(n);return t}function Mme(e,t,n){var r="",i=e.tag,o,a,s;for(o=0,a=n.length;o<a;o+=1)s=n[o],e.replacer&&(s=e.replacer.call(n,String(o),s)),(Ui(e,t,s,!1,!1)||typeof s>"u"&&Ui(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function zT(e,t,n,r){var i="",o=e.tag,a,s,l;for(a=0,s=n.length;a<s;a+=1)l=n[a],e.replacer&&(l=e.replacer.call(n,String(a),l)),(Ui(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ui(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=Jy(e,t)),e.dump&&Rc===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function Ime(e,t,n){var r="",i=e.tag,o=Object.keys(n),a,s,l,c,u;for(a=0,s=o.length;a<s;a+=1)u="",r!==""&&(u+=", "),e.condenseFlow&&(u+='"'),l=o[a],c=n[l],e.replacer&&(c=e.replacer.call(n,l,c)),Ui(e,t,l,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ui(e,t,c,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump="{"+r+"}"}function $me(e,t,n,r){var i="",o=e.tag,a=Object.keys(n),s,l,c,u,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new kn("sortKeys must be a boolean or a function");for(s=0,l=a.length;s<l;s+=1)f="",(!r||i!=="")&&(f+=Jy(e,t)),c=a[s],u=n[c],e.replacer&&(u=e.replacer.call(n,c,u)),Ui(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Rc===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=Jy(e,t)),Ui(e,t+1,u,!0,d)&&(e.dump&&Rc===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function VT(e,t,n){var r,i,o,a,s,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o<a;o+=1)if(s=i[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,ET.call(s.represent)==="[object Function]")r=s.represent(t,l);else if(OT.call(s.represent,l))r=s.represent[l](t,l);else throw new kn("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function Ui(e,t,n,r,i,o,a){e.tag=null,e.dump=n,VT(e,n,!1)||VT(e,n,!0);var s=ET.call(e.dump),l=r,c;r&&(r=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?($me(e,t,e.dump,i),f&&(e.dump="&ref_"+d+e.dump)):(Ime(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?zT(e,t-1,e.dump,i):zT(e,t,e.dump,i),f&&(e.dump="&ref_"+d+e.dump)):(Mme(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&Dme(e,e.dump,t,o,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new kn("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function Lme(e,t){var n=[],r=[],i,o;for(ev(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function ev(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)ev(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)ev(e[r[i]],t,n)}function Fme(e,t){t=t||{};var n=new Eme(t);n.noRefs||Lme(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Ui(n,0,r,!0,!0)?n.dump+`
476
476
  `:""}var Nme=Fme,Bme={dump:Nme};function tv(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Wme=cn,Rme=Hk,zme=Kk,Vme=eT,Ume=tT,Hme=Gy,Gme=wT.load,qme=wT.loadAll,Yme=Bme.dump,nv=kn,Kme={binary:aT,float:Qk,map:Yk,null:Zk,pairs:lT,set:cT,timestamp:iT,bool:Xk,int:Jk,merge:oT,omap:sT,seq:qk,str:Gk},Zme=tv("safeLoad","load"),Xme=tv("safeLoadAll","loadAll"),Jme=tv("safeDump","dump"),UT={Type:Wme,Schema:Rme,FAILSAFE_SCHEMA:zme,JSON_SCHEMA:Vme,CORE_SCHEMA:Ume,DEFAULT_SCHEMA:Hme,load:Gme,loadAll:qme,dump:Yme,YAMLException:nv,types:Kme,safeLoad:Zme,safeLoadAll:Xme,safeDump:Jme};function Qme(e){const t=yi(e),{onFocus:n,onBlur:r,language:i,value:o,onChange:a,setError:s,isReadOnly:l}=e,[c,u]=v.useState(!1),d=v.useRef(null),f=v.useRef(null),h=v.useCallback(x=>{if(!d.current)return;d.current.style.minHeight=`${HT+YT}px`;const S=x.split(`
477
- `).length;d.current.style.height=`${S*HT+YT}px`},[]),g=v.useRef({});v.useEffect(()=>{if(f.current){const x=Zi.editor.create(f.current,{lineNumbers:e.lineNumbers?"on":"off",lineDecorationsWidth:e.lineNumbers?void 0:0,theme:"data-editor-dark",padding:{top:GT,bottom:qT},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0,scrollbar:{alwaysConsumeMouseWheel:!1}});return g.current.editor=x,()=>{setTimeout(()=>{x.dispose()},1e3)}}},[e.lineNumbers]),v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&(x.onDidFocusEditorText(()=>n==null?void 0:n()),x.onDidBlurEditorText(()=>r==null?void 0:r()))},[n,r]),v.useEffect(()=>{var _;const x=(_=g==null?void 0:g.current)==null?void 0:_.editor;if(!x)return;const S=x.getModel();if(!S)return;const C=S.onDidChangeContent(()=>{const w=x.getValue()??"";a(w),h(w)});return()=>C.dispose()},[a,h]),v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&x.getValue()!==o&&(x.setValue(o),h(o))},[o,h]),v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&x.updateOptions({readOnly:l})},[l]);const[p,y]=v.useState(!1);v.useEffect(()=>{var _;const x=(_=g==null?void 0:g.current)==null?void 0:_.editor;if(!x)return;const S=x.getModel();if(!S)return;Zi.editor.setModelLanguage(S,i);const C=Zi.editor.onDidChangeMarkers(()=>{const w=Zi.editor.getModelMarkers({owner:S.getLanguageId(),resource:S.uri});y(w.length>0),s(w.length>0?w.map(k=>k.message).join(`
477
+ `).length;d.current.style.height=`${S*HT+YT}px`},[]),g=v.useRef({});v.useEffect(()=>{if(f.current){const x=Zi.editor.create(f.current,{lineNumbers:e.lineNumbers?"on":"off",lineDecorationsWidth:e.lineNumbers?void 0:0,theme:"data-editor-dark",padding:{top:GT,bottom:qT},fontSize:14,fontFamily:"RedHatMono",scrollBeyondLastLine:!1,minimap:{enabled:!1},renderLineHighlightOnlyWhenFocus:!0,scrollbar:{alwaysConsumeMouseWheel:!1}});return g.current.editor=x,()=>{setTimeout(()=>{x.dispose()},10*1e3)}}},[e.lineNumbers]),v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&(x.onDidFocusEditorText(()=>n==null?void 0:n()),x.onDidBlurEditorText(()=>r==null?void 0:r()))},[n,r]),v.useEffect(()=>{var _;const x=(_=g==null?void 0:g.current)==null?void 0:_.editor;if(!x)return;const S=x.getModel();if(!S)return;const C=S.onDidChangeContent(()=>{const w=x.getValue()??"";a(w),h(w)});return()=>C.dispose()},[a,h]),v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&x.getValue()!==o&&(x.setValue(o),h(o))},[o,h]),v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&x.updateOptions({readOnly:l})},[l]);const[p,y]=v.useState(!1);v.useEffect(()=>{var _;const x=(_=g==null?void 0:g.current)==null?void 0:_.editor;if(!x)return;const S=x.getModel();if(!S)return;Zi.editor.setModelLanguage(S,i);const C=Zi.editor.onDidChangeMarkers(()=>{const w=Zi.editor.getModelMarkers({owner:S.getLanguageId(),resource:S.uri});y(w.length>0),s(w.length>0?w.map(k=>k.message).join(`
478
478
  `):void 0)});return()=>C.dispose()},[i,s]),Fa(f,()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&(x.layout(),u(!0))});const b=Yo();return v.useEffect(()=>{var S;const x=(S=g==null?void 0:g.current)==null?void 0:S.editor;x&&x.updateOptions({theme:b.activeTheme==="dark"?"data-editor-dark":"data-editor-light"})},[b.activeTheme]),m.jsx(ege,{className:e.className,"aria-invalid":p?"true":void 0,ref:d,children:m.jsx(tge,{id:t,"data-cy":t,ref:f,className:"data-editor","aria-disabled":c?"false":"true"})})}const ege=Pe.div`
479
479
  position: relative;
480
480
  min-height: 33px;
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.2607",
4
+ "version": "2.4.2608",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",