@sap-ux/ui-components 2.1.10 → 2.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/storybook/{722.cab24dc6.iframe.bundle.js → 303.27ab8dbf.iframe.bundle.js} +3 -3
- package/storybook/{401.2a170b9f.iframe.bundle.js → 401.af8180c1.iframe.bundle.js} +1 -1
- package/storybook/{UITooltip-story.029b6314.iframe.bundle.js → UITooltip-story.8a47915d.iframe.bundle.js} +1 -1
- package/storybook/iframe.html +2 -2
- package/storybook/{main.6fc4eb72.iframe.bundle.js → main.f1843cbf.iframe.bundle.js} +1 -1
- package/storybook/project.json +1 -1
- package/storybook/{runtime~main.a1ac3662.iframe.bundle.js → runtime~main.cefb891f.iframe.bundle.js} +1 -1
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
${this.props.hiddenSmallScreen?"hidden-xs":""}
|
|
3
3
|
${this.props.showSmallScreen?"show-xs":""}
|
|
4
4
|
${this.props.hiddenMediumScreen?"hidden-md":""}
|
|
5
|
-
${this.props.showMediumScreen?"show-md":""}`})}}t.UIToolbarDivider=s},"./src/components/UIToolbar/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UIToolbar/UIToolbar.tsx"),t),a(e("./src/components/UIToolbar/UIToolbarColumn.tsx"),t),a(e("./src/components/UIToolbar/UIToolbarDivider.tsx"),t)},"./src/components/UITooltip/UITooltip.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UITooltip=t.UITooltipDelay=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(t,"UITooltipDelay",{enumerable:!0,get:function(){return i.TooltipDelay}});const o=e("./src/components/UICallout/index.tsx");class s extends a.default.Component{constructor(l){super(l)}render(){var g;const l=(g=this.props.maxWidth)!=null?g:200,y=()=>P({root:{display:"inline-block"},content:{backgroundColor:o.CALLOUT_STYLES.background,color:o.CALLOUT_STYLES.text}},this.props.styles),p={beakWidth:10,styles:()=>(0,o.getCalloutStyle)({calloutMinWidth:0,styles:{root:{display:"inline-block"},calloutMain:{padding:10,maxWidth:l}}})},f=a.default.createElement(i.TooltipHost,D(P({},this.props),{styles:y,calloutProps:P(P({},p),this.props.calloutProps)}));return this.props.showOnFocus?f:a.default.createElement("div",{onFocusCapture:d=>{var b;(b=d.target.parentElement)!=null&&b.classList.contains("ms-TooltipHost")&&d.stopPropagation()}},f)}}t.UITooltip=s},"./src/components/UITooltip/UITooltipUtils.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UITooltipUtils=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=w(e("../../node_modules/.pnpm/sanitize-html@2.17.2/node_modules/sanitize-html/index.js")),o=e("./src/components/UICallout/index.tsx");class s{static getStyles(){return{root:{},content:{background:o.CALLOUT_STYLES.background,color:o.CALLOUT_STYLES.text},subText:{}}}static renderContent(l){return{onRenderContent:()=>a.default.createElement("span",null,l!=null?l:""),styles:s.getStyles()}}static renderHTMLContent(l){const y=(0,i.default)(l);return{onRenderContent:()=>a.default.createElement("span",{dangerouslySetInnerHTML:{__html:y}}),styles:s.getStyles()}}}t.UITooltipUtils=s},"./src/components/UITooltip/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UITooltip/UITooltip.tsx"),t),a(e("./src/components/UITooltip/UITooltipUtils.tsx"),t)},"./src/components/UITranslationInput/UIFormattedText.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseText=void 0,t.formatTextGeneric=l,t.formatText=y,t.UIFormattedText=r;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i="{{{",o="}}}",s=(p,f)=>{const g=[];for(const d in f){const b=`${i}${d}${o}`,n=new RegExp(b,"gi");let u=null;do u=n.exec(p),u&&g.push(u);while(u)}return g},_=(p,f)=>{const g={texts:[],bolds:[]};if(p){const d=s(p,f);d.sort((n,u)=>n.index-u.index);let b=0;if(d.length)for(let n=0;n<d.length;n++){const u=d[n];if(u.index===void 0)continue;const m=u[0],c=f[m.replace(i,"").replace(o,"")];g.texts.push(p.substring(b,u.index)),g.bolds.push(c),b=u.index+m.length,n===d.length-1&&g.texts.push(p.substring(b,p.length))}else g.texts.push(p)}return g};t.parseText=_;function l(p,f,g){const d=(0,t.parseText)(p,f),b=[];for(let n=0;n<d.texts.length;n++)!d.texts[n]&&!d.bolds[n]||b.push(g(n,d.texts[n],d.bolds[n]));return b}function y(p,f){return l(p,f,(d,b,n)=>n?b+n:b).join("")}function r(p){const{children:f,values:g={},className:d}=p,b=l(f,g,(n,u,m)=>a.default.createElement(a.default.Fragment,{key:`anchor-${n}`},u,m&&a.default.createElement("b",null,m)));return a.default.createElement("div",{className:d},b)}},"./src/components/UITranslationInput/UILoadButton.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UILoadButton=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("./src/components/UIButton/index.tsx"),o=e("./src/components/UILoader/index.tsx");e("./src/components/UITranslationInput/UILoadButton.scss");class s extends a.default.Component{constructor(l){super(l),this.minLoaderTimer=void 0,this.state=this.getBusyState(l,{})||{}}componentDidUpdate(l){if(l.busy===this.props.busy)return;const y=this.getBusyState(this.props,this.state);y&&this.setState(y)}componentWillUnmount(){this.minLoaderTimer&&window.clearTimeout(this.minLoaderTimer)}handleMinWaitingTime(){this.minLoaderTimer=void 0,this.props.busy||this.setState({busy:!1})}getBusyState(l,y){let r;return l.busy!==y.busy&&(!l.busy&&!this.minLoaderTimer?r={busy:!1}:l.busy&&(r={busy:!0},window.clearTimeout(this.minLoaderTimer),l.useMinWaitingTime&&(this.minLoaderTimer=window.setTimeout(this.handleMinWaitingTime.bind(this),this.getMinimalWaitingTime())))),r}getMinimalWaitingTime(){const{useMinWaitingTime:l}=this.props;return!l||typeof l=="boolean"?500:l}render(){const{children:l}=this.props,{busy:y}=this.state;let{className:r=""}=this.props;const p=y?a.default.createElement(o.UILoader,{className:"uiLoaderXSmall",labelPosition:"right"}):l;if(y){const f="loading-button";r=r?`${r} ${f}`:f}return a.default.createElement(i.UIIconButton,D(P({},this.props),{onClick:y?void 0:this.props.onClick,className:r}),p)}}t.UILoadButton=s},"./src/components/UITranslationInput/UITranslationButton.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(d,b,n,u){u===void 0&&(u=n);var m=Object.getOwnPropertyDescriptor(b,n);(!m||("get"in m?!b.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return b[n]}}),Object.defineProperty(d,u,m)}):(function(d,b,n,u){u===void 0&&(u=n),d[u]=b[n]})),a=this&&this.__setModuleDefault||(Object.create?(function(d,b){Object.defineProperty(d,"default",{enumerable:!0,value:b})}):function(d,b){d.default=b}),i=this&&this.__importStar||(function(){var d=function(b){return d=Object.getOwnPropertyNames||function(n){var u=[];for(var m in n)Object.prototype.hasOwnProperty.call(n,m)&&(u[u.length]=m);return u},d(b)};return function(b){if(b&&b.__esModule)return b;var n={};if(b!=null)for(var u=d(b),m=0;m<u.length;m++)u[m]!=="default"&&w(n,b,u[m]);return a(n,b),n}})();Object.defineProperty(t,"__esModule",{value:!0}),t.UITranslationButton=void 0;const o=i(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),s=e("./src/components/UIButton/index.tsx"),_=e("./src/components/UICallout/index.tsx"),l=e("./src/components/Icons.tsx"),y=e("./src/components/UITranslationInput/UITranslationButton.types.ts"),r=e("./src/components/UITranslationInput/UILoadButton.tsx");e("./src/components/UITranslationInput/UITranslationInput.scss");const p=(d,b)=>{var n;return(n=b==null?void 0:b[d])!=null?n:""},f=d=>{let b=" ui-translatable__callout";return d&&(b+=" ui-translatable__callout--inverted"),b},g=d=>{var j,R,B;const{id:b,strings:n,value:u,onCreateNewEntry:m,onUpdateValue:c,onShowExistingEntry:h,busy:v,suggestion:I,invertedCalloutTheme:x}=d,[S,T]=(0,o.useState)(!1),U=(0,o.useCallback)(()=>{var k;((k=I.suggest)==null?void 0:k.type)===y.SuggestValueType.Existing?(T(!1),h==null||h(I.suggest.entry)):T(!S)},[S,I]),O=(0,o.useCallback)(()=>{var k;I.suggest&&(I.suggest.type===y.SuggestValueType.New&&(m==null||m(I.suggest.entry)),u!==I.suggest.i18n&&(c==null||c((k=I.suggest.i18n)!=null?k:""))),T(!1)},[I,m,c,u]),C=(0,o.useCallback)(()=>{T(!1)},[]);return o.default.createElement("div",{className:"ui-translatable__button"},o.default.createElement(r.UILoadButton,{id:b,disabled:(j=d.disabled)!=null?j:!1,onClick:U,iconProps:{iconName:(B=(R=I.suggest)==null?void 0:R.icon)!=null?B:l.UiIcons.World},title:I.tooltip,busy:v==null?void 0:v.busy,useMinWaitingTime:v==null?void 0:v.useMinWaitingTime}),S&&o.default.createElement(_.UICallout,{target:`#${b}`,gapSpace:5,directionalHint:5,calloutWidth:250,calloutMinWidth:250,beakWidth:8,isBeakVisible:!1,setInitialFocus:!0,className:f(x),onDismiss:()=>U(),contentPadding:_.UICalloutContentPadding.Standard},o.default.createElement("div",{className:"ui-translatable__message"},I.message,o.default.createElement("div",{className:"ui-translatable__actions"},o.default.createElement(s.UIDefaultButton,{id:`${b}-button-action-confirm`,primary:!0,onClick:O},p("acceptButtonLabel",n)),o.default.createElement(s.UIDefaultButton,{id:`${b}-button-action-cancel`,onClick:C},p("cancelButtonLabel",n))))))};t.UITranslationButton=g},"./src/components/UITranslationInput/UITranslationButton.types.ts"(E,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestValueType=t.TranslationTextPattern=t.TranslationKeyGenerator=void 0;var e;(function(i){i.CamelCase="CamelCase",i.PascalCase="PascalCase"})(e||(t.TranslationKeyGenerator=e={}));var w;(function(i){i.DoubleBracketReplace="DoubleBracketReplace",i.SingleBracketBinding="SingleBracketBinding"})(w||(t.TranslationTextPattern=w={}));var a;(function(i){i.Existing="Existing",i.Update="Update",i.New="New"})(a||(t.SuggestValueType=a={}))},"./src/components/UITranslationInput/UITranslationInput.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(n,u,m,c){c===void 0&&(c=m);var h=Object.getOwnPropertyDescriptor(u,m);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[m]}}),Object.defineProperty(n,c,h)}):(function(n,u,m,c){c===void 0&&(c=m),n[c]=u[m]})),a=this&&this.__setModuleDefault||(Object.create?(function(n,u){Object.defineProperty(n,"default",{enumerable:!0,value:u})}):function(n,u){n.default=u}),i=this&&this.__importStar||(function(){var n=function(u){return n=Object.getOwnPropertyNames||function(m){var c=[];for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(c[c.length]=h);return c},n(u)};return function(u){if(u&&u.__esModule)return u;var m={};if(u!=null)for(var c=n(u),h=0;h<c.length;h++)c[h]!=="default"&&w(m,u,c[h]);return a(m,u),m}})();Object.defineProperty(t,"__esModule",{value:!0}),t.UITranslationInput=void 0;const o=i(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),s=e("./src/components/UIInput/index.tsx"),_=e("./src/components/Icons.tsx"),l=e("./src/components/UITranslationInput/UITranslationButton.tsx"),y=e("./src/components/UITranslationInput/UITranslationButton.types.ts"),r=e("./src/components/UITranslationInput/UITranslationUtils.ts"),p=e("./src/components/UITranslationInput/defaults.ts"),f=e("./src/components/UITranslationInput/UIFormattedText.tsx"),g=n=>{const{value:u="",allowedPatterns:m,entries:c,strings:h=p.defaultTranslationInputStrings,namingConvention:v=y.TranslationKeyGenerator.CamelCase,defaultPattern:I,i18nPrefix:x,allowedI18nPrefixes:S}=n,T=(0,r.extractI18nKey)(u,m,S||[x]);let U="",O="",C;if(T){const R=(0,r.getTranslationByKey)(c,T);R?(O=h.i18nEntryExistsTooltip,C={entry:R,type:y.SuggestValueType.Existing,icon:_.UiIcons.WorldArrow}):(U=h.i18nKeyMissingDescription,O=h.i18nKeyMissingTooltip,C={entry:{key:{value:T},value:{value:T}},type:y.SuggestValueType.New,icon:_.UiIcons.WorldWarning})}else{const R=(0,r.getTranslationByText)(c,u);R?(U=h.i18nReplaceWithExistingDescription,O=h.i18nReplaceWithExistingTooltip,C={entry:R,type:y.SuggestValueType.Update}):(U=h.i18nValueMissingDescription,O=h.i18nValueMissingTooltip,C={entry:{key:{value:(0,r.generateI18nKey)(u,v,c)},value:{value:u}},type:y.SuggestValueType.New})}C.i18n=(0,r.applyI18nPattern)(C.entry.key.value,I,x);const j={key:C.entry.key.value,value:C.entry.value.value,i18n:C.i18n};return O=(0,f.formatText)(O,j),{message:o.default.createElement(f.UIFormattedText,{values:j,className:"ui-translatable__message__text"},U),tooltip:O,suggest:C}},d=n=>{const{className:u,invertedCalloutTheme:m}=n;let c=" ui-translatable__input";return u&&(c+=` ${u}`),m&&(c+=" ui-translatable--inverted"),c},b=n=>{var H;const{id:u,onChange:m,value:c,allowedPatterns:h,defaultPattern:v,entries:I,busy:x,i18nPrefix:S,allowedI18nPrefixes:T,namingConvention:U,onCreateNewEntry:O,onShowExistingEntry:C,disabled:j,strings:R,invertedCalloutTheme:B}=n,k=g(n),W=d(n),K=(0,o.useCallback)(V=>{m==null||m({},V)},[m]);let F=`${u}-i18n`,N=n.title;((H=k.suggest)==null?void 0:H.type)===y.SuggestValueType.Existing&&(R!=null&&R.i18nEntryExistsInputTooltip)&&(F+="-navigate",N||(N=(0,f.formatText)(R.i18nEntryExistsInputTooltip,{value:c||"",translation:k.suggest.entry.value.value})));const z=(0,o.useCallback)(()=>o.default.createElement(l.UITranslationButton,{id:F,value:c,busy:x,onCreateNewEntry:O,onShowExistingEntry:C,onUpdateValue:K,disabled:j,strings:R,suggestion:k,invertedCalloutTheme:B}),[c,h,v,I,x,j,S,T,U,O,C,K]),$=(0,o.useCallback)((V,G)=>G?o.default.createElement("div",{className:"ui-translatable__field",title:N},G(D(P({},V),{title:void 0}))):null,[N]);return o.default.createElement(s.UITextInput,D(P({},n),{onRenderSuffix:c!=null&&c.trim()?z:void 0,className:W,onRenderInput:$}))};t.UITranslationInput=b,t.UITranslationInput.defaultProps={strings:p.defaultTranslationInputStrings}},"./src/components/UITranslationInput/UITranslationUtils.ts"(E,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTranslationByText=t.getTranslationByKey=t.applyI18nPattern=t.convertToPascalCase=t.convertToCamelCase=t.extractI18nKey=void 0,t.generateI18nKey=_;const w=e("./src/components/UITranslationInput/UITranslationButton.types.ts"),a=(p,f,g)=>{let d;for(const b of f)if(b===w.TranslationTextPattern.SingleBracketBinding)for(const n of g){const u=p.toString().match(`^{${n}>([^\\{}:]+)}$`);u!=null&&u[1]&&(d=u==null?void 0:u[1])}else b===w.TranslationTextPattern.DoubleBracketReplace&&p.match("^{{[^\\{}:]+}}$")&&(d=p.toString().substring(2,p.length-2));return d};t.extractI18nKey=a;const i=(p="",f=4)=>{let g="";const d=p.replace(/[^a-zA-Z0-9 ]/g,"").trim().split(" "),b=d.length>=f?f:d.length;for(let n=0;b>n;n++){const u=d[n];if(n===0)g+=u.toLowerCase();else{const m=u.charAt(0).toUpperCase(),c=u.substring(1).toLowerCase();g+=`${m}${c}`}}return g};t.convertToCamelCase=i;const o=(p,f=4)=>{let g="";const d=p.replace(/[^a-zA-Z0-9 ]/g,"").trim().split(" "),b=d.length>=f?f:d.length;for(let n=0;b>n;n++){const u=d[n],m=u.charAt(0).toUpperCase(),c=u.substring(1).toLowerCase();g+=`${m}${c}`}return g};t.convertToPascalCase=o;const s=(p,f,g=p,d=1)=>{const b=p;return f[p]!==void 0?(p=`${g}${d}`,d++,s(p,f,g,d)):b};function _(p,f,g){let d=f===w.TranslationKeyGenerator.CamelCase?(0,t.convertToCamelCase)(p):(0,t.convertToPascalCase)(p);return d===""&&(d=f===w.TranslationKeyGenerator.CamelCase?"key":"Key"),s(d,g)}const l=(p,f,g)=>f===w.TranslationTextPattern.DoubleBracketReplace?`{{${p}}}`:`{${g}>${p}}`;t.applyI18nPattern=l;const y=(p,f)=>{const g=p[f];if((g==null?void 0:g.length)>0)return g[0]};t.getTranslationByKey=y;const r=(p,f)=>{for(const g in p){const d=p[g];if(d.length){const b=d[0];if(b.value.value===f)return b}}};t.getTranslationByText=r},"./src/components/UITranslationInput/defaults.ts"(E,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTranslationInputStrings=void 0,t.defaultTranslationInputStrings={acceptButtonLabel:"Substitute",cancelButtonLabel:"Cancel",i18nKeyMissingTooltip:"Text key or value is not available in i18n file.",i18nKeyMissingDescription:"Generate a text key {{{key}}} with value {{{value}}} in i18n file.",i18nValueMissingTooltip:"Text key or value for {{{value}}} is not available in i18n file.",i18nValueMissingDescription:"Generate a text key {{{key}}} in i18n file and substitute {{{value}}} with {{{i18n}}}.",i18nReplaceWithExistingTooltip:`Text key {{{key}}} for value {{{value}}} is available in i18n file.
|
|
5
|
+
${this.props.showMediumScreen?"show-md":""}`})}}t.UIToolbarDivider=s},"./src/components/UIToolbar/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UIToolbar/UIToolbar.tsx"),t),a(e("./src/components/UIToolbar/UIToolbarColumn.tsx"),t),a(e("./src/components/UIToolbar/UIToolbarDivider.tsx"),t)},"./src/components/UITooltip/UITooltip.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UITooltip=t.UITooltipDelay=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(t,"UITooltipDelay",{enumerable:!0,get:function(){return i.TooltipDelay}});const o=e("./src/components/UICallout/index.tsx");class s extends a.default.Component{constructor(l){super(l)}render(){var g;const l=(g=this.props.maxWidth)!=null?g:200,y=()=>P({root:{display:"inline-block"},content:{backgroundColor:o.CALLOUT_STYLES.background,color:o.CALLOUT_STYLES.text}},this.props.styles),p={beakWidth:10,styles:()=>(0,o.getCalloutStyle)({calloutMinWidth:0,styles:{root:{display:"inline-block"},calloutMain:{padding:10,maxWidth:l}}})},f=a.default.createElement(i.TooltipHost,D(P({},this.props),{styles:y,calloutProps:P(P({},p),this.props.calloutProps)}));return this.props.showOnFocus?f:a.default.createElement("div",{onFocusCapture:d=>{var b;(b=d.target.parentElement)!=null&&b.classList.contains("ms-TooltipHost")&&d.stopPropagation()}},f)}}t.UITooltip=s},"./src/components/UITooltip/UITooltipUtils.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UITooltipUtils=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=w(e("../../node_modules/.pnpm/sanitize-html@2.17.3/node_modules/sanitize-html/index.js")),o=e("./src/components/UICallout/index.tsx");class s{static getStyles(){return{root:{},content:{background:o.CALLOUT_STYLES.background,color:o.CALLOUT_STYLES.text},subText:{}}}static renderContent(l){return{onRenderContent:()=>a.default.createElement("span",null,l!=null?l:""),styles:s.getStyles()}}static renderHTMLContent(l){const y=(0,i.default)(l);return{onRenderContent:()=>a.default.createElement("span",{dangerouslySetInnerHTML:{__html:y}}),styles:s.getStyles()}}}t.UITooltipUtils=s},"./src/components/UITooltip/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UITooltip/UITooltip.tsx"),t),a(e("./src/components/UITooltip/UITooltipUtils.tsx"),t)},"./src/components/UITranslationInput/UIFormattedText.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseText=void 0,t.formatTextGeneric=l,t.formatText=y,t.UIFormattedText=r;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i="{{{",o="}}}",s=(p,f)=>{const g=[];for(const d in f){const b=`${i}${d}${o}`,n=new RegExp(b,"gi");let u=null;do u=n.exec(p),u&&g.push(u);while(u)}return g},_=(p,f)=>{const g={texts:[],bolds:[]};if(p){const d=s(p,f);d.sort((n,u)=>n.index-u.index);let b=0;if(d.length)for(let n=0;n<d.length;n++){const u=d[n];if(u.index===void 0)continue;const m=u[0],c=f[m.replace(i,"").replace(o,"")];g.texts.push(p.substring(b,u.index)),g.bolds.push(c),b=u.index+m.length,n===d.length-1&&g.texts.push(p.substring(b,p.length))}else g.texts.push(p)}return g};t.parseText=_;function l(p,f,g){const d=(0,t.parseText)(p,f),b=[];for(let n=0;n<d.texts.length;n++)!d.texts[n]&&!d.bolds[n]||b.push(g(n,d.texts[n],d.bolds[n]));return b}function y(p,f){return l(p,f,(d,b,n)=>n?b+n:b).join("")}function r(p){const{children:f,values:g={},className:d}=p,b=l(f,g,(n,u,m)=>a.default.createElement(a.default.Fragment,{key:`anchor-${n}`},u,m&&a.default.createElement("b",null,m)));return a.default.createElement("div",{className:d},b)}},"./src/components/UITranslationInput/UILoadButton.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UILoadButton=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("./src/components/UIButton/index.tsx"),o=e("./src/components/UILoader/index.tsx");e("./src/components/UITranslationInput/UILoadButton.scss");class s extends a.default.Component{constructor(l){super(l),this.minLoaderTimer=void 0,this.state=this.getBusyState(l,{})||{}}componentDidUpdate(l){if(l.busy===this.props.busy)return;const y=this.getBusyState(this.props,this.state);y&&this.setState(y)}componentWillUnmount(){this.minLoaderTimer&&window.clearTimeout(this.minLoaderTimer)}handleMinWaitingTime(){this.minLoaderTimer=void 0,this.props.busy||this.setState({busy:!1})}getBusyState(l,y){let r;return l.busy!==y.busy&&(!l.busy&&!this.minLoaderTimer?r={busy:!1}:l.busy&&(r={busy:!0},window.clearTimeout(this.minLoaderTimer),l.useMinWaitingTime&&(this.minLoaderTimer=window.setTimeout(this.handleMinWaitingTime.bind(this),this.getMinimalWaitingTime())))),r}getMinimalWaitingTime(){const{useMinWaitingTime:l}=this.props;return!l||typeof l=="boolean"?500:l}render(){const{children:l}=this.props,{busy:y}=this.state;let{className:r=""}=this.props;const p=y?a.default.createElement(o.UILoader,{className:"uiLoaderXSmall",labelPosition:"right"}):l;if(y){const f="loading-button";r=r?`${r} ${f}`:f}return a.default.createElement(i.UIIconButton,D(P({},this.props),{onClick:y?void 0:this.props.onClick,className:r}),p)}}t.UILoadButton=s},"./src/components/UITranslationInput/UITranslationButton.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(d,b,n,u){u===void 0&&(u=n);var m=Object.getOwnPropertyDescriptor(b,n);(!m||("get"in m?!b.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return b[n]}}),Object.defineProperty(d,u,m)}):(function(d,b,n,u){u===void 0&&(u=n),d[u]=b[n]})),a=this&&this.__setModuleDefault||(Object.create?(function(d,b){Object.defineProperty(d,"default",{enumerable:!0,value:b})}):function(d,b){d.default=b}),i=this&&this.__importStar||(function(){var d=function(b){return d=Object.getOwnPropertyNames||function(n){var u=[];for(var m in n)Object.prototype.hasOwnProperty.call(n,m)&&(u[u.length]=m);return u},d(b)};return function(b){if(b&&b.__esModule)return b;var n={};if(b!=null)for(var u=d(b),m=0;m<u.length;m++)u[m]!=="default"&&w(n,b,u[m]);return a(n,b),n}})();Object.defineProperty(t,"__esModule",{value:!0}),t.UITranslationButton=void 0;const o=i(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),s=e("./src/components/UIButton/index.tsx"),_=e("./src/components/UICallout/index.tsx"),l=e("./src/components/Icons.tsx"),y=e("./src/components/UITranslationInput/UITranslationButton.types.ts"),r=e("./src/components/UITranslationInput/UILoadButton.tsx");e("./src/components/UITranslationInput/UITranslationInput.scss");const p=(d,b)=>{var n;return(n=b==null?void 0:b[d])!=null?n:""},f=d=>{let b=" ui-translatable__callout";return d&&(b+=" ui-translatable__callout--inverted"),b},g=d=>{var j,R,B;const{id:b,strings:n,value:u,onCreateNewEntry:m,onUpdateValue:c,onShowExistingEntry:h,busy:v,suggestion:I,invertedCalloutTheme:x}=d,[S,T]=(0,o.useState)(!1),U=(0,o.useCallback)(()=>{var k;((k=I.suggest)==null?void 0:k.type)===y.SuggestValueType.Existing?(T(!1),h==null||h(I.suggest.entry)):T(!S)},[S,I]),O=(0,o.useCallback)(()=>{var k;I.suggest&&(I.suggest.type===y.SuggestValueType.New&&(m==null||m(I.suggest.entry)),u!==I.suggest.i18n&&(c==null||c((k=I.suggest.i18n)!=null?k:""))),T(!1)},[I,m,c,u]),C=(0,o.useCallback)(()=>{T(!1)},[]);return o.default.createElement("div",{className:"ui-translatable__button"},o.default.createElement(r.UILoadButton,{id:b,disabled:(j=d.disabled)!=null?j:!1,onClick:U,iconProps:{iconName:(B=(R=I.suggest)==null?void 0:R.icon)!=null?B:l.UiIcons.World},title:I.tooltip,busy:v==null?void 0:v.busy,useMinWaitingTime:v==null?void 0:v.useMinWaitingTime}),S&&o.default.createElement(_.UICallout,{target:`#${b}`,gapSpace:5,directionalHint:5,calloutWidth:250,calloutMinWidth:250,beakWidth:8,isBeakVisible:!1,setInitialFocus:!0,className:f(x),onDismiss:()=>U(),contentPadding:_.UICalloutContentPadding.Standard},o.default.createElement("div",{className:"ui-translatable__message"},I.message,o.default.createElement("div",{className:"ui-translatable__actions"},o.default.createElement(s.UIDefaultButton,{id:`${b}-button-action-confirm`,primary:!0,onClick:O},p("acceptButtonLabel",n)),o.default.createElement(s.UIDefaultButton,{id:`${b}-button-action-cancel`,onClick:C},p("cancelButtonLabel",n))))))};t.UITranslationButton=g},"./src/components/UITranslationInput/UITranslationButton.types.ts"(E,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SuggestValueType=t.TranslationTextPattern=t.TranslationKeyGenerator=void 0;var e;(function(i){i.CamelCase="CamelCase",i.PascalCase="PascalCase"})(e||(t.TranslationKeyGenerator=e={}));var w;(function(i){i.DoubleBracketReplace="DoubleBracketReplace",i.SingleBracketBinding="SingleBracketBinding"})(w||(t.TranslationTextPattern=w={}));var a;(function(i){i.Existing="Existing",i.Update="Update",i.New="New"})(a||(t.SuggestValueType=a={}))},"./src/components/UITranslationInput/UITranslationInput.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(n,u,m,c){c===void 0&&(c=m);var h=Object.getOwnPropertyDescriptor(u,m);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[m]}}),Object.defineProperty(n,c,h)}):(function(n,u,m,c){c===void 0&&(c=m),n[c]=u[m]})),a=this&&this.__setModuleDefault||(Object.create?(function(n,u){Object.defineProperty(n,"default",{enumerable:!0,value:u})}):function(n,u){n.default=u}),i=this&&this.__importStar||(function(){var n=function(u){return n=Object.getOwnPropertyNames||function(m){var c=[];for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(c[c.length]=h);return c},n(u)};return function(u){if(u&&u.__esModule)return u;var m={};if(u!=null)for(var c=n(u),h=0;h<c.length;h++)c[h]!=="default"&&w(m,u,c[h]);return a(m,u),m}})();Object.defineProperty(t,"__esModule",{value:!0}),t.UITranslationInput=void 0;const o=i(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),s=e("./src/components/UIInput/index.tsx"),_=e("./src/components/Icons.tsx"),l=e("./src/components/UITranslationInput/UITranslationButton.tsx"),y=e("./src/components/UITranslationInput/UITranslationButton.types.ts"),r=e("./src/components/UITranslationInput/UITranslationUtils.ts"),p=e("./src/components/UITranslationInput/defaults.ts"),f=e("./src/components/UITranslationInput/UIFormattedText.tsx"),g=n=>{const{value:u="",allowedPatterns:m,entries:c,strings:h=p.defaultTranslationInputStrings,namingConvention:v=y.TranslationKeyGenerator.CamelCase,defaultPattern:I,i18nPrefix:x,allowedI18nPrefixes:S}=n,T=(0,r.extractI18nKey)(u,m,S||[x]);let U="",O="",C;if(T){const R=(0,r.getTranslationByKey)(c,T);R?(O=h.i18nEntryExistsTooltip,C={entry:R,type:y.SuggestValueType.Existing,icon:_.UiIcons.WorldArrow}):(U=h.i18nKeyMissingDescription,O=h.i18nKeyMissingTooltip,C={entry:{key:{value:T},value:{value:T}},type:y.SuggestValueType.New,icon:_.UiIcons.WorldWarning})}else{const R=(0,r.getTranslationByText)(c,u);R?(U=h.i18nReplaceWithExistingDescription,O=h.i18nReplaceWithExistingTooltip,C={entry:R,type:y.SuggestValueType.Update}):(U=h.i18nValueMissingDescription,O=h.i18nValueMissingTooltip,C={entry:{key:{value:(0,r.generateI18nKey)(u,v,c)},value:{value:u}},type:y.SuggestValueType.New})}C.i18n=(0,r.applyI18nPattern)(C.entry.key.value,I,x);const j={key:C.entry.key.value,value:C.entry.value.value,i18n:C.i18n};return O=(0,f.formatText)(O,j),{message:o.default.createElement(f.UIFormattedText,{values:j,className:"ui-translatable__message__text"},U),tooltip:O,suggest:C}},d=n=>{const{className:u,invertedCalloutTheme:m}=n;let c=" ui-translatable__input";return u&&(c+=` ${u}`),m&&(c+=" ui-translatable--inverted"),c},b=n=>{var H;const{id:u,onChange:m,value:c,allowedPatterns:h,defaultPattern:v,entries:I,busy:x,i18nPrefix:S,allowedI18nPrefixes:T,namingConvention:U,onCreateNewEntry:O,onShowExistingEntry:C,disabled:j,strings:R,invertedCalloutTheme:B}=n,k=g(n),W=d(n),K=(0,o.useCallback)(V=>{m==null||m({},V)},[m]);let F=`${u}-i18n`,N=n.title;((H=k.suggest)==null?void 0:H.type)===y.SuggestValueType.Existing&&(R!=null&&R.i18nEntryExistsInputTooltip)&&(F+="-navigate",N||(N=(0,f.formatText)(R.i18nEntryExistsInputTooltip,{value:c||"",translation:k.suggest.entry.value.value})));const z=(0,o.useCallback)(()=>o.default.createElement(l.UITranslationButton,{id:F,value:c,busy:x,onCreateNewEntry:O,onShowExistingEntry:C,onUpdateValue:K,disabled:j,strings:R,suggestion:k,invertedCalloutTheme:B}),[c,h,v,I,x,j,S,T,U,O,C,K]),$=(0,o.useCallback)((V,G)=>G?o.default.createElement("div",{className:"ui-translatable__field",title:N},G(D(P({},V),{title:void 0}))):null,[N]);return o.default.createElement(s.UITextInput,D(P({},n),{onRenderSuffix:c!=null&&c.trim()?z:void 0,className:W,onRenderInput:$}))};t.UITranslationInput=b,t.UITranslationInput.defaultProps={strings:p.defaultTranslationInputStrings}},"./src/components/UITranslationInput/UITranslationUtils.ts"(E,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTranslationByText=t.getTranslationByKey=t.applyI18nPattern=t.convertToPascalCase=t.convertToCamelCase=t.extractI18nKey=void 0,t.generateI18nKey=_;const w=e("./src/components/UITranslationInput/UITranslationButton.types.ts"),a=(p,f,g)=>{let d;for(const b of f)if(b===w.TranslationTextPattern.SingleBracketBinding)for(const n of g){const u=p.toString().match(`^{${n}>([^\\{}:]+)}$`);u!=null&&u[1]&&(d=u==null?void 0:u[1])}else b===w.TranslationTextPattern.DoubleBracketReplace&&p.match("^{{[^\\{}:]+}}$")&&(d=p.toString().substring(2,p.length-2));return d};t.extractI18nKey=a;const i=(p="",f=4)=>{let g="";const d=p.replace(/[^a-zA-Z0-9 ]/g,"").trim().split(" "),b=d.length>=f?f:d.length;for(let n=0;b>n;n++){const u=d[n];if(n===0)g+=u.toLowerCase();else{const m=u.charAt(0).toUpperCase(),c=u.substring(1).toLowerCase();g+=`${m}${c}`}}return g};t.convertToCamelCase=i;const o=(p,f=4)=>{let g="";const d=p.replace(/[^a-zA-Z0-9 ]/g,"").trim().split(" "),b=d.length>=f?f:d.length;for(let n=0;b>n;n++){const u=d[n],m=u.charAt(0).toUpperCase(),c=u.substring(1).toLowerCase();g+=`${m}${c}`}return g};t.convertToPascalCase=o;const s=(p,f,g=p,d=1)=>{const b=p;return f[p]!==void 0?(p=`${g}${d}`,d++,s(p,f,g,d)):b};function _(p,f,g){let d=f===w.TranslationKeyGenerator.CamelCase?(0,t.convertToCamelCase)(p):(0,t.convertToPascalCase)(p);return d===""&&(d=f===w.TranslationKeyGenerator.CamelCase?"key":"Key"),s(d,g)}const l=(p,f,g)=>f===w.TranslationTextPattern.DoubleBracketReplace?`{{${p}}}`:`{${g}>${p}}`;t.applyI18nPattern=l;const y=(p,f)=>{const g=p[f];if((g==null?void 0:g.length)>0)return g[0]};t.getTranslationByKey=y;const r=(p,f)=>{for(const g in p){const d=p[g];if(d.length){const b=d[0];if(b.value.value===f)return b}}};t.getTranslationByText=r},"./src/components/UITranslationInput/defaults.ts"(E,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTranslationInputStrings=void 0,t.defaultTranslationInputStrings={acceptButtonLabel:"Substitute",cancelButtonLabel:"Cancel",i18nKeyMissingTooltip:"Text key or value is not available in i18n file.",i18nKeyMissingDescription:"Generate a text key {{{key}}} with value {{{value}}} in i18n file.",i18nValueMissingTooltip:"Text key or value for {{{value}}} is not available in i18n file.",i18nValueMissingDescription:"Generate a text key {{{key}}} in i18n file and substitute {{{value}}} with {{{i18n}}}.",i18nReplaceWithExistingTooltip:`Text key {{{key}}} for value {{{value}}} is available in i18n file.
|
|
6
6
|
Consider substituting {{{value}}} with {{{i18n}}}.`,i18nReplaceWithExistingDescription:"Text key {{{key}}} for value {{{value}}} is available in i18n file. Substitute {{{value}}} with {{{i18n}}}?",i18nEntryExistsTooltip:"Edit in source file",i18nEntryExistsInputTooltip:`Value: '{{{value}}}'.
|
|
7
7
|
Translation: '{{{translation}}}'.`}},"./src/components/UITranslationInput/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UITranslationInput/UITranslationInput.tsx"),t),a(e("./src/components/UITranslationInput/UITranslationButton.types.ts"),t)},"./src/components/UIVerticalDivider/UIVerticalDivider.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0}),t.UIVerticalDivider=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js");class o extends a.default.Component{constructor(_){super(_),this.setStyle=()=>({wrapper:{},divider:{backgroundColor:"var(--vscode-editorWidget-border)"}})}render(){return a.default.createElement(i.VerticalDivider,D(P({},this.props),{styles:this.setStyle()}))}}t.UIVerticalDivider=o},"./src/components/UIVerticalDivider/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UIVerticalDivider/UIVerticalDivider.tsx"),t)},"./src/components/UIVirtualList/UIAutoSizer.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0}),t.UIAutoSizer=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("../../node_modules/.pnpm/react-virtualized@9.22.6_react-dom@16.14.0_react@16.14.0__react@16.14.0/node_modules/react-virtualized/dist/es/index.js");class o extends a.default.Component{constructor(_){super(_)}render(){return a.default.createElement(i.AutoSizer,P({},this.props),this.props.children)}}t.UIAutoSizer=o},"./src/components/UIVirtualList/UICellMeasurer.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UICellMeasurer=t.OnScrollParams=t.Index=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("../../node_modules/.pnpm/react-virtualized@9.22.6_react-dom@16.14.0_react@16.14.0__react@16.14.0/node_modules/react-virtualized/dist/es/index.js");var o=e("../../node_modules/.pnpm/react-virtualized@9.22.6_react-dom@16.14.0_react@16.14.0__react@16.14.0/node_modules/react-virtualized/dist/es/index.js");Object.defineProperty(t,"Index",{enumerable:!0,get:function(){return o.Index}}),Object.defineProperty(t,"OnScrollParams",{enumerable:!0,get:function(){return o.OnScrollParams}});class s extends a.default.Component{constructor(l){super(l)}render(){return a.default.createElement(i.CellMeasurer,P({},this.props),this.props.children)}}t.UICellMeasurer=s},"./src/components/UIVirtualList/UIVirtualList.tsx"(E,t,e){"use strict";var w=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualList=t.VisibleCellRange=t.GridCellRangeProps=t.defaultCellRangeRenderer=t.GridState=t.SectionRenderedParams=t.ListRowProps=t.CellMeasurerCache=void 0;const a=w(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),i=e("../../node_modules/.pnpm/react-virtualized@9.22.6_react-dom@16.14.0_react@16.14.0__react@16.14.0/node_modules/react-virtualized/dist/es/index.js");var o=e("../../node_modules/.pnpm/react-virtualized@9.22.6_react-dom@16.14.0_react@16.14.0__react@16.14.0/node_modules/react-virtualized/dist/es/index.js");Object.defineProperty(t,"CellMeasurerCache",{enumerable:!0,get:function(){return o.CellMeasurerCache}}),Object.defineProperty(t,"ListRowProps",{enumerable:!0,get:function(){return o.ListRowProps}}),Object.defineProperty(t,"SectionRenderedParams",{enumerable:!0,get:function(){return o.SectionRenderedParams}}),Object.defineProperty(t,"GridState",{enumerable:!0,get:function(){return o.GridState}}),Object.defineProperty(t,"defaultCellRangeRenderer",{enumerable:!0,get:function(){return o.defaultCellRangeRenderer}}),Object.defineProperty(t,"GridCellRangeProps",{enumerable:!0,get:function(){return o.GridCellRangeProps}}),Object.defineProperty(t,"VisibleCellRange",{enumerable:!0,get:function(){return o.VisibleCellRange}});class s extends a.default.Component{constructor(l){super(l),this.listRef=a.default.createRef()}forceListUpdate(){this.listRef.current&&this.listRef.current.forceUpdate()}scrollToRow(l){this.listRef.current&&this.listRef.current.scrollToRow(l)}recomputeRowHeights(l){this.listRef.current&&this.listRef.current.recomputeRowHeights(l)}isScrolling(){var l,y;return!!((y=(l=this.listRef.current)==null?void 0:l.Grid)!=null&&y.state.isScrolling)}render(){return a.default.createElement(i.List,P({ref:this.listRef},this.props),this.props.children)}}t.UIVirtualList=s},"./src/components/UIVirtualList/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(i,o,s,_){_===void 0&&(_=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,_,l)}):(function(i,o,s,_){_===void 0&&(_=s),i[_]=o[s]})),a=this&&this.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&w(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),a(e("./src/components/UIVirtualList/UIAutoSizer.tsx"),t),a(e("./src/components/UIVirtualList/UICellMeasurer.tsx"),t),a(e("./src/components/UIVirtualList/UIVirtualList.tsx"),t)},"./src/components/index.tsx"(E,t,e){"use strict";var w=this&&this.__createBinding||(Object.create?(function(o,s,_,l){l===void 0&&(l=_);var y=Object.getOwnPropertyDescriptor(s,_);(!y||("get"in y?!s.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return s[_]}}),Object.defineProperty(o,l,y)}):(function(o,s,_,l){l===void 0&&(l=_),o[l]=s[_]})),a=this&&this.__exportStar||function(o,s){for(var _ in o)_!=="default"&&!Object.prototype.hasOwnProperty.call(s,_)&&w(s,o,_)};Object.defineProperty(t,"__esModule",{value:!0}),t.UIStack=void 0;var i=e("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(t,"UIStack",{enumerable:!0,get:function(){return i.Stack}}),a(e("./src/components/Icons.tsx"),t),a(e("./src/components/UIButton/index.tsx"),t),a(e("./src/components/UIBreadcrumb/index.tsx"),t),a(e("./src/components/UICallout/index.tsx"),t),a(e("./src/components/UICheckbox/index.tsx"),t),a(e("./src/components/UIChoiceGroup/index.tsx"),t),a(e("./src/components/UIComboBox/index.tsx"),t),a(e("./src/components/UIContextualMenu/index.tsx"),t),a(e("./src/components/UICreateSelect/index.tsx"),t),a(e("./src/components/UIDialog/index.ts"),t),a(e("./src/components/UIDropdown/index.tsx"),t),a(e("./src/components/UIFlexibleTable/index.ts"),t),a(e("./src/components/UIFocusZone/index.tsx"),t),a(e("./src/components/UIIcon/index.tsx"),t),a(e("./src/components/UIInput/index.tsx"),t),a(e("./src/components/UILabel/index.tsx"),t),a(e("./src/components/UILink/index.tsx"),t),a(e("./src/components/UIList/index.tsx"),t),a(e("./src/components/UILoader/index.tsx"),t),a(e("./src/components/UIMessageBar/index.tsx"),t),a(e("./src/components/UIModal/index.tsx"),t),a(e("./src/components/UIOverlay/index.tsx"),t),a(e("./src/components/UIPersona/index.tsx"),t),a(e("./src/components/UIQuickNavigation/index.tsx"),t),a(e("./src/components/UISearchBox/index.tsx"),t),a(e("./src/components/UISeparator/index.tsx"),t),a(e("./src/components/UISection/index.tsx"),t),a(e("./src/components/UITable/index.tsx"),t),a(e("./src/components/UITabs/index.tsx"),t),a(e("./src/components/UIToggle/index.tsx"),t),a(e("./src/components/UIToggleGroup/index.ts"),t),a(e("./src/components/UITooltip/index.tsx"),t),a(e("./src/components/UIToolbar/index.tsx"),t),a(e("./src/components/UITranslationInput/index.tsx"),t),a(e("./src/components/UITreeDropdown/index.tsx"),t),a(e("./src/components/UIVerticalDivider/index.tsx"),t),a(e("./src/components/UIVirtualList/index.tsx"),t),a(e("./src/components/UIDatePicker/index.tsx"),t),a(e("./src/components/UIActionCallout/index.ts"),t)},"?eacb"(){},"?9bff"(){},"?3e29"(){},"?3536"(){},"?5786"(){}}]);})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(()=>{var E=Object.defineProperty,I=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var S=(i,s,_)=>s in i?E(i,s,{enumerable:!0,configurable:!0,writable:!0,value:_}):i[s]=_,b=(i,s)=>{for(var _ in s||(s={}))O.call(s,_)&&S(i,_,s[_]);if(v)for(var _ of v(s))P.call(s,_)&&S(i,_,s[_]);return i},g=(i,s)=>I(i,U(s));(self.webpackChunk_sap_ux_ui_components=self.webpackChunk_sap_ux_ui_components||[]).push([[406],{"../../node_modules/.pnpm/css-loader@7.1.4_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@16.0.7_sass-embedded@1.97.3_sass@1.98.0_webpack@5.105.0_@swc+core@1.15.18_@_31ae7bffeec4c4c96330dc3ad7603369/node_modules/sass-loader/dist/cjs.js!./src/styles/_shadows.scss"(i,s,_){var d=_("../../node_modules/.pnpm/css-loader@7.1.4_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/css-loader/dist/runtime/noSourceMaps.js"),n=_("../../node_modules/.pnpm/css-loader@7.1.4_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/css-loader/dist/runtime/api.js"),o=n(d);o.push([i.id,":root{--ui-box-shadow-small: 0 4px 8px 0 var(--vscode-widget-shadow);--ui-box-shadow-medium: 0 6px 12px 0 var(--vscode-widget-shadow);--ui-box-shadow-large: 0 10px 20px 0 var(--vscode-widget-shadow)}.ui-box-shadow-small{box-shadow:var(--ui-box-shadow-small)}.ui-box-shadow-medium{box-shadow:var(--ui-box-shadow-medium)}.ui-box-shadow-large{box-shadow:var(--ui-box-shadow-large)}",""]),i.exports=o},"../../node_modules/.pnpm/css-loader@7.1.4_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/css-loader/dist/runtime/api.js"(i){"use strict";i.exports=function(s){var _=[];return _.toString=function(){return this.map(function(n){var o="",t=typeof n[5]!="undefined";return n[4]&&(o+="@supports (".concat(n[4],") {")),n[2]&&(o+="@media ".concat(n[2]," {")),t&&(o+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),o+=s(n),t&&(o+="}"),n[2]&&(o+="}"),n[4]&&(o+="}"),o}).join("")},_.i=function(n,o,t,e,r){typeof n=="string"&&(n=[[null,n,void 0]]);var l={};if(t)for(var c=0;c<this.length;c++){var h=this[c][0];h!=null&&(l[h]=!0)}for(var u=0;u<n.length;u++){var a=[].concat(n[u]);t&&l[a[0]]||(typeof r!="undefined"&&(typeof a[5]=="undefined"||(a[1]="@layer".concat(a[5].length>0?" ".concat(a[5]):""," {").concat(a[1],"}")),a[5]=r),o&&(a[2]&&(a[1]="@media ".concat(a[2]," {").concat(a[1],"}")),a[2]=o),e&&(a[4]?(a[1]="@supports (".concat(a[4],") {").concat(a[1],"}"),a[4]=e):a[4]="".concat(e)),_.push(a))}},_}},"../../node_modules/.pnpm/css-loader@7.1.4_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/css-loader/dist/runtime/noSourceMaps.js"(i){"use strict";i.exports=function(s){return s[1]}},"./src/styles/_shadows.scss"(i,s,_){"use strict";_.r(s),_.d(s,{default:()=>C});var d=_("../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),n=_.n(d),o=_("../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/styleDomAPI.js"),t=_.n(o),e=_("../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/insertBySelector.js"),r=_.n(e),l=_("../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),c=_.n(l),h=_("../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/insertStyleElement.js"),u=_.n(h),a=_("../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/styleTagTransform.js"),m=_.n(a),f=_("../../node_modules/.pnpm/css-loader@7.1.4_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@16.0.7_sass-embedded@1.97.3_sass@1.98.0_webpack@5.105.0_@swc+core@1.15.18_@_31ae7bffeec4c4c96330dc3ad7603369/node_modules/sass-loader/dist/cjs.js!./src/styles/_shadows.scss"),p=_.n(f),T={};for(const w in f)w!=="default"&&(T[w]=()=>f[w]);_.d(s,T);var y={};y.styleTagTransform=m(),y.setAttributes=c(),y.insert=r().bind(null,"head"),y.domAPI=t(),y.insertStyleElement=u();var L=n()(p(),y);const C=p()&&p().locals?p().locals:void 0},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"(i){"use strict";var s=[];function _(o){for(var t=-1,e=0;e<s.length;e++)if(s[e].identifier===o){t=e;break}return t}function d(o,t){for(var e={},r=[],l=0;l<o.length;l++){var c=o[l],h=t.base?c[0]+t.base:c[0],u=e[h]||0,a="".concat(h," ").concat(u);e[h]=u+1;var m=_(a),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(m!==-1)s[m].references++,s[m].updater(f);else{var p=n(f,t);t.byIndex=l,s.splice(l,0,{identifier:a,updater:p,references:1})}r.push(a)}return r}function n(o,t){var e=t.domAPI(t);e.update(o);var r=function(c){if(c){if(c.css===o.css&&c.media===o.media&&c.sourceMap===o.sourceMap&&c.supports===o.supports&&c.layer===o.layer)return;e.update(o=c)}else e.remove()};return r}i.exports=function(o,t){t=t||{},o=o||[];var e=d(o,t);return function(l){l=l||[];for(var c=0;c<e.length;c++){var h=e[c],u=_(h);s[u].references--}for(var a=d(l,t),m=0;m<e.length;m++){var f=e[m],p=_(f);s[p].references===0&&(s[p].updater(),s.splice(p,1))}e=a}}},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/insertBySelector.js"(i){"use strict";var s={};function _(n){if(typeof s[n]=="undefined"){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}s[n]=o}return s[n]}function d(n,o){var t=_(n);if(!t)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");t.appendChild(o)}i.exports=d},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/insertStyleElement.js"(i){"use strict";function s(_){var d=document.createElement("style");return _.setAttributes(d,_.attributes),_.insert(d,_.options),d}i.exports=s},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"(i,s,_){"use strict";function d(n){var o=_.nc;o&&n.setAttribute("nonce",o)}i.exports=d},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/styleDomAPI.js"(i){"use strict";function s(n,o,t){var e="";t.supports&&(e+="@supports (".concat(t.supports,") {")),t.media&&(e+="@media ".concat(t.media," {"));var r=typeof t.layer!="undefined";r&&(e+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),e+=t.css,r&&(e+="}"),t.media&&(e+="}"),t.supports&&(e+="}");var l=t.sourceMap;l&&typeof btoa!="undefined"&&(e+=`
|
|
2
|
-
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),o.styleTagTransform(e,n,o.options)}function _(n){if(n.parentNode===null)return!1;n.parentNode.removeChild(n)}function d(n){if(typeof document=="undefined")return{update:function(){},remove:function(){}};var o=n.insertStyleElement(n);return{update:function(e){s(o,n,e)},remove:function(){_(o)}}}i.exports=d},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/styleTagTransform.js"(i){"use strict";function s(_,d){if(d.styleSheet)d.styleSheet.cssText=_;else{for(;d.firstChild;)d.removeChild(d.firstChild);d.appendChild(document.createTextNode(_))}}i.exports=s},"./src/components/UICallout/CalloutCollisionTransform.ts"(i,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.CalloutCollisionTransform=void 0;const _={target:".ms-Dialog-actions",container:".ms-Dialog-main",absolute:!0,minPagePadding:10},d=20;class n{constructor(t,e,r=_){this.originalStyle={},this.source=t,this.callout=e,this.props=r,this.applyTransformation=this.applyTransformation.bind(this),this.resetTransformation=this.resetTransformation.bind(this),this.preventDismissOnEvent=this.preventDismissOnEvent.bind(this)}createPlaceholder(t){const e=document.createElement("div");return e.classList.add("ts-Callout-transformation"),e.style.height=`${t}px`,e}getElements(){const t=this.source.current,e=t==null?void 0:t.closest(this.props.container);if(e&&t){const r=e==null?void 0:e.querySelector(this.props.target);if(r){const l={container:{dom:e,rect:e.getBoundingClientRect()},target:{dom:r,rect:r.getBoundingClientRect()},source:{dom:t,rect:t.getBoundingClientRect()}},c=this.callout.current;return c&&(l.callout={dom:c,rect:c.getBoundingClientRect()}),l}}}applyTransformation(){const t=this.getElements();if(!t)return;const{container:e,target:r,callout:l,source:c}=t;if(l){const h=window.innerHeight-_.minPagePadding,u=l.rect.height,a=c.rect.bottom;let m=a+u-r.rect.top,f=a+l.rect.height;if(m<=0||f>=h)return;if(f+=r.rect.height,f<=h&&(m+=d),this.props.absolute){const p=e.dom.style;this.originalStyle={transform:p.transform,position:p.position,top:p.top,left:p.left},p.transform="",p.position="absolute",p.top=`${e.rect.top}px`,p.left=`${e.rect.left}px`}this.placeholder=this.createPlaceholder(m),r.dom.prepend(this.placeholder)}}resetTransformation(){const t=this.getElements();if(!t)return;const{container:e}=t;for(const r in this.originalStyle){const l=this.originalStyle[r];typeof l=="string"&&(e.dom.style[r]=l)}this.originalStyle={},this.placeholder&&(this.placeholder.remove(),this.placeholder=void 0)}preventDismissOnEvent(t){const e=this.getElements();return!!(t.type==="focus"&&(e!=null&&e.target.dom.contains(t.target)))}}s.CalloutCollisionTransform=n},"./src/components/UICallout/UICallout.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(s,"__esModule",{value:!0}),s.UICallout=s.getCalloutStyle=s.UICalloutContentPadding=s.CALLOUT_STYLES=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=_("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js"),t=_("./src/utilities/index.ts");_("./src/styles/_shadows.scss"),s.CALLOUT_STYLES={background:"var(--vscode-editorWidget-background)",boxShadow:"var(--ui-box-shadow-small)",borderColor:"var(--vscode-editorWidget-border)",text:"var(--vscode-editorWidget-foreground)",borderRadius:4};var e;(function(u){u.None="None",u.Standard="Standard"})(e||(s.UICalloutContentPadding=e={}));const r=new Map([[e.Standard,8]]),l=(u,a)=>typeof u=="object"&&typeof u[a]=="object"?u[a]:{},c=u=>{var a,m;return{root:b({boxShadow:s.CALLOUT_STYLES.boxShadow,backgroundColor:s.CALLOUT_STYLES.background,borderRadius:s.CALLOUT_STYLES.borderRadius,border:`1px solid ${s.CALLOUT_STYLES.borderColor}`},l(u.styles,"root")),beak:b({backgroundColor:s.CALLOUT_STYLES.background,boxShadow:s.CALLOUT_STYLES.boxShadow},l(u.styles,"beak")),beakCurtain:b({backgroundColor:s.CALLOUT_STYLES.background,borderRadius:s.CALLOUT_STYLES.borderRadius},l(u.styles,"beakCurtain")),calloutMain:b({backgroundColor:"transparent",color:s.CALLOUT_STYLES.text,borderRadius:s.CALLOUT_STYLES.borderRadius,minWidth:(a=u.calloutMinWidth)!=null?a:300,boxSizing:"border-box",padding:r.get((m=u.contentPadding)!=null?m:e.None)},l(u.styles,"calloutMain")),container:l(u.styles,"container")}};s.getCalloutStyle=c;class h extends n.default.Component{constructor(a){super(a),this.onKeyDown=this.onKeyDown.bind(this)}onKeyDown(a){const{onKeyDown:m,focusTargetSiblingOnTabPress:f,target:p}=this.props;if(f&&a.key==="Tab"&&p){let T=null;if(typeof p=="string"){const y=(0,o.getDocument)();T=y==null?void 0:y.querySelector(p)}else"getBoundingClientRect"in p&&(0,t.isHTMLElement)(p)&&(T=p);T&&(0,t.focusToSibling)(T,!a.shiftKey)&&(a.stopPropagation(),a.preventDefault())}m==null||m(a)}render(){return n.default.createElement(o.Callout,g(b({},this.props),{onKeyDown:this.onKeyDown,styles:(0,s.getCalloutStyle)(this.props)}),this.props.children)}}s.UICallout=h},"./src/components/UICallout/index.tsx"(i,s,_){"use strict";var d=this&&this.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var l=Object.getOwnPropertyDescriptor(t,e);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,l)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),n=this&&this.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&d(t,o,e)};Object.defineProperty(s,"__esModule",{value:!0}),n(_("./src/components/UICallout/CalloutCollisionTransform.ts"),s),n(_("./src/components/UICallout/UICallout.tsx"),s)},"./src/components/UITooltip/UITooltip.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(s,"__esModule",{value:!0}),s.UITooltip=s.UITooltipDelay=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=_("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(s,"UITooltipDelay",{enumerable:!0,get:function(){return o.TooltipDelay}});const t=_("./src/components/UICallout/index.tsx");class e extends n.default.Component{constructor(l){super(l)}render(){var m;const l=(m=this.props.maxWidth)!=null?m:200,c=()=>b({root:{display:"inline-block"},content:{backgroundColor:t.CALLOUT_STYLES.background,color:t.CALLOUT_STYLES.text}},this.props.styles),u={beakWidth:10,styles:()=>(0,t.getCalloutStyle)({calloutMinWidth:0,styles:{root:{display:"inline-block"},calloutMain:{padding:10,maxWidth:l}}})},a=n.default.createElement(o.TooltipHost,g(b({},this.props),{styles:c,calloutProps:b(b({},u),this.props.calloutProps)}));return this.props.showOnFocus?a:n.default.createElement("div",{onFocusCapture:f=>{var p;(p=f.target.parentElement)!=null&&p.classList.contains("ms-TooltipHost")&&f.stopPropagation()}},a)}}s.UITooltip=e},"./src/components/UITooltip/UITooltipUtils.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(s,"__esModule",{value:!0}),s.UITooltipUtils=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=d(_("../../node_modules/.pnpm/sanitize-html@2.17.2/node_modules/sanitize-html/index.js")),t=_("./src/components/UICallout/index.tsx");class e{static getStyles(){return{root:{},content:{background:t.CALLOUT_STYLES.background,color:t.CALLOUT_STYLES.text},subText:{}}}static renderContent(l){return{onRenderContent:()=>n.default.createElement("span",null,l!=null?l:""),styles:e.getStyles()}}static renderHTMLContent(l){const c=(0,o.default)(l);return{onRenderContent:()=>n.default.createElement("span",{dangerouslySetInnerHTML:{__html:c}}),styles:e.getStyles()}}}s.UITooltipUtils=e},"./src/components/UITooltip/index.tsx"(i,s,_){"use strict";var d=this&&this.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var l=Object.getOwnPropertyDescriptor(t,e);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,l)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),n=this&&this.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&d(t,o,e)};Object.defineProperty(s,"__esModule",{value:!0}),n(_("./src/components/UITooltip/UITooltip.tsx"),s),n(_("./src/components/UITooltip/UITooltipUtils.tsx"),s)},"./stories/UITooltip.story.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(s,"__esModule",{value:!0}),s.Tooltips=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=_("./src/components/UITooltip/index.tsx"),t=_("./src/components/UIButton/index.tsx");s.default={title:"Dropdowns/Tooltip"};const e={name:"Hello, world!",html:"<span><strong>Tag:</strong> name</span>"},r=()=>n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{style:{margin:20}},n.default.createElement(o.UITooltip,{tooltipProps:o.UITooltipUtils.renderContent(e.name)},e.name)),n.default.createElement("div",{style:{margin:20}},n.default.createElement(o.UITooltip,{tooltipProps:o.UITooltipUtils.renderHTMLContent(e.html)},"render HTML content")),n.default.createElement("div",null,n.default.createElement(o.UITooltip,{content:"This is the tooltip"},n.default.createElement(t.UIDefaultButton,null,"Show tooltip on hover and ignore focus"))),n.default.createElement("div",null,n.default.createElement(o.UITooltip,{content:"This is the tooltip",showOnFocus:!0},n.default.createElement(t.UIDefaultButton,null,"Show tooltip on hover and on focus"))));s.Tooltips=r},"?eacb"(){},"?9bff"(){},"?3e29"(){},"?3536"(){},"?5786"(){}}]);})();
|
|
2
|
+
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),o.styleTagTransform(e,n,o.options)}function _(n){if(n.parentNode===null)return!1;n.parentNode.removeChild(n)}function d(n){if(typeof document=="undefined")return{update:function(){},remove:function(){}};var o=n.insertStyleElement(n);return{update:function(e){s(o,n,e)},remove:function(){_(o)}}}i.exports=d},"../../node_modules/.pnpm/style-loader@4.0.0_webpack@5.105.0_@swc+core@1.15.18_@swc+helpers@0.5.19__esbuild@0.27.4_/node_modules/style-loader/dist/runtime/styleTagTransform.js"(i){"use strict";function s(_,d){if(d.styleSheet)d.styleSheet.cssText=_;else{for(;d.firstChild;)d.removeChild(d.firstChild);d.appendChild(document.createTextNode(_))}}i.exports=s},"./src/components/UICallout/CalloutCollisionTransform.ts"(i,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.CalloutCollisionTransform=void 0;const _={target:".ms-Dialog-actions",container:".ms-Dialog-main",absolute:!0,minPagePadding:10},d=20;class n{constructor(t,e,r=_){this.originalStyle={},this.source=t,this.callout=e,this.props=r,this.applyTransformation=this.applyTransformation.bind(this),this.resetTransformation=this.resetTransformation.bind(this),this.preventDismissOnEvent=this.preventDismissOnEvent.bind(this)}createPlaceholder(t){const e=document.createElement("div");return e.classList.add("ts-Callout-transformation"),e.style.height=`${t}px`,e}getElements(){const t=this.source.current,e=t==null?void 0:t.closest(this.props.container);if(e&&t){const r=e==null?void 0:e.querySelector(this.props.target);if(r){const l={container:{dom:e,rect:e.getBoundingClientRect()},target:{dom:r,rect:r.getBoundingClientRect()},source:{dom:t,rect:t.getBoundingClientRect()}},c=this.callout.current;return c&&(l.callout={dom:c,rect:c.getBoundingClientRect()}),l}}}applyTransformation(){const t=this.getElements();if(!t)return;const{container:e,target:r,callout:l,source:c}=t;if(l){const h=window.innerHeight-_.minPagePadding,u=l.rect.height,a=c.rect.bottom;let m=a+u-r.rect.top,f=a+l.rect.height;if(m<=0||f>=h)return;if(f+=r.rect.height,f<=h&&(m+=d),this.props.absolute){const p=e.dom.style;this.originalStyle={transform:p.transform,position:p.position,top:p.top,left:p.left},p.transform="",p.position="absolute",p.top=`${e.rect.top}px`,p.left=`${e.rect.left}px`}this.placeholder=this.createPlaceholder(m),r.dom.prepend(this.placeholder)}}resetTransformation(){const t=this.getElements();if(!t)return;const{container:e}=t;for(const r in this.originalStyle){const l=this.originalStyle[r];typeof l=="string"&&(e.dom.style[r]=l)}this.originalStyle={},this.placeholder&&(this.placeholder.remove(),this.placeholder=void 0)}preventDismissOnEvent(t){const e=this.getElements();return!!(t.type==="focus"&&(e!=null&&e.target.dom.contains(t.target)))}}s.CalloutCollisionTransform=n},"./src/components/UICallout/UICallout.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(s,"__esModule",{value:!0}),s.UICallout=s.getCalloutStyle=s.UICalloutContentPadding=s.CALLOUT_STYLES=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=_("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js"),t=_("./src/utilities/index.ts");_("./src/styles/_shadows.scss"),s.CALLOUT_STYLES={background:"var(--vscode-editorWidget-background)",boxShadow:"var(--ui-box-shadow-small)",borderColor:"var(--vscode-editorWidget-border)",text:"var(--vscode-editorWidget-foreground)",borderRadius:4};var e;(function(u){u.None="None",u.Standard="Standard"})(e||(s.UICalloutContentPadding=e={}));const r=new Map([[e.Standard,8]]),l=(u,a)=>typeof u=="object"&&typeof u[a]=="object"?u[a]:{},c=u=>{var a,m;return{root:b({boxShadow:s.CALLOUT_STYLES.boxShadow,backgroundColor:s.CALLOUT_STYLES.background,borderRadius:s.CALLOUT_STYLES.borderRadius,border:`1px solid ${s.CALLOUT_STYLES.borderColor}`},l(u.styles,"root")),beak:b({backgroundColor:s.CALLOUT_STYLES.background,boxShadow:s.CALLOUT_STYLES.boxShadow},l(u.styles,"beak")),beakCurtain:b({backgroundColor:s.CALLOUT_STYLES.background,borderRadius:s.CALLOUT_STYLES.borderRadius},l(u.styles,"beakCurtain")),calloutMain:b({backgroundColor:"transparent",color:s.CALLOUT_STYLES.text,borderRadius:s.CALLOUT_STYLES.borderRadius,minWidth:(a=u.calloutMinWidth)!=null?a:300,boxSizing:"border-box",padding:r.get((m=u.contentPadding)!=null?m:e.None)},l(u.styles,"calloutMain")),container:l(u.styles,"container")}};s.getCalloutStyle=c;class h extends n.default.Component{constructor(a){super(a),this.onKeyDown=this.onKeyDown.bind(this)}onKeyDown(a){const{onKeyDown:m,focusTargetSiblingOnTabPress:f,target:p}=this.props;if(f&&a.key==="Tab"&&p){let T=null;if(typeof p=="string"){const y=(0,o.getDocument)();T=y==null?void 0:y.querySelector(p)}else"getBoundingClientRect"in p&&(0,t.isHTMLElement)(p)&&(T=p);T&&(0,t.focusToSibling)(T,!a.shiftKey)&&(a.stopPropagation(),a.preventDefault())}m==null||m(a)}render(){return n.default.createElement(o.Callout,g(b({},this.props),{onKeyDown:this.onKeyDown,styles:(0,s.getCalloutStyle)(this.props)}),this.props.children)}}s.UICallout=h},"./src/components/UICallout/index.tsx"(i,s,_){"use strict";var d=this&&this.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var l=Object.getOwnPropertyDescriptor(t,e);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,l)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),n=this&&this.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&d(t,o,e)};Object.defineProperty(s,"__esModule",{value:!0}),n(_("./src/components/UICallout/CalloutCollisionTransform.ts"),s),n(_("./src/components/UICallout/UICallout.tsx"),s)},"./src/components/UITooltip/UITooltip.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(s,"__esModule",{value:!0}),s.UITooltip=s.UITooltipDelay=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=_("../../node_modules/.pnpm/@fluentui+react@8.125.5_@types+react-dom@16.9.25_@types+react@16.14.69__@types+react@16_64874192b7cfaa3fe7ac389bc8c185b1/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(s,"UITooltipDelay",{enumerable:!0,get:function(){return o.TooltipDelay}});const t=_("./src/components/UICallout/index.tsx");class e extends n.default.Component{constructor(l){super(l)}render(){var m;const l=(m=this.props.maxWidth)!=null?m:200,c=()=>b({root:{display:"inline-block"},content:{backgroundColor:t.CALLOUT_STYLES.background,color:t.CALLOUT_STYLES.text}},this.props.styles),u={beakWidth:10,styles:()=>(0,t.getCalloutStyle)({calloutMinWidth:0,styles:{root:{display:"inline-block"},calloutMain:{padding:10,maxWidth:l}}})},a=n.default.createElement(o.TooltipHost,g(b({},this.props),{styles:c,calloutProps:b(b({},u),this.props.calloutProps)}));return this.props.showOnFocus?a:n.default.createElement("div",{onFocusCapture:f=>{var p;(p=f.target.parentElement)!=null&&p.classList.contains("ms-TooltipHost")&&f.stopPropagation()}},a)}}s.UITooltip=e},"./src/components/UITooltip/UITooltipUtils.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(s,"__esModule",{value:!0}),s.UITooltipUtils=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=d(_("../../node_modules/.pnpm/sanitize-html@2.17.3/node_modules/sanitize-html/index.js")),t=_("./src/components/UICallout/index.tsx");class e{static getStyles(){return{root:{},content:{background:t.CALLOUT_STYLES.background,color:t.CALLOUT_STYLES.text},subText:{}}}static renderContent(l){return{onRenderContent:()=>n.default.createElement("span",null,l!=null?l:""),styles:e.getStyles()}}static renderHTMLContent(l){const c=(0,o.default)(l);return{onRenderContent:()=>n.default.createElement("span",{dangerouslySetInnerHTML:{__html:c}}),styles:e.getStyles()}}}s.UITooltipUtils=e},"./src/components/UITooltip/index.tsx"(i,s,_){"use strict";var d=this&&this.__createBinding||(Object.create?(function(o,t,e,r){r===void 0&&(r=e);var l=Object.getOwnPropertyDescriptor(t,e);(!l||("get"in l?!t.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(o,r,l)}):(function(o,t,e,r){r===void 0&&(r=e),o[r]=t[e]})),n=this&&this.__exportStar||function(o,t){for(var e in o)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&d(t,o,e)};Object.defineProperty(s,"__esModule",{value:!0}),n(_("./src/components/UITooltip/UITooltip.tsx"),s),n(_("./src/components/UITooltip/UITooltipUtils.tsx"),s)},"./stories/UITooltip.story.tsx"(i,s,_){"use strict";var d=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(s,"__esModule",{value:!0}),s.Tooltips=void 0;const n=d(_("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),o=_("./src/components/UITooltip/index.tsx"),t=_("./src/components/UIButton/index.tsx");s.default={title:"Dropdowns/Tooltip"};const e={name:"Hello, world!",html:"<span><strong>Tag:</strong> name</span>"},r=()=>n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{style:{margin:20}},n.default.createElement(o.UITooltip,{tooltipProps:o.UITooltipUtils.renderContent(e.name)},e.name)),n.default.createElement("div",{style:{margin:20}},n.default.createElement(o.UITooltip,{tooltipProps:o.UITooltipUtils.renderHTMLContent(e.html)},"render HTML content")),n.default.createElement("div",null,n.default.createElement(o.UITooltip,{content:"This is the tooltip"},n.default.createElement(t.UIDefaultButton,null,"Show tooltip on hover and ignore focus"))),n.default.createElement("div",null,n.default.createElement(o.UITooltip,{content:"This is the tooltip",showOnFocus:!0},n.default.createElement(t.UIDefaultButton,null,"Show tooltip on hover and on focus"))));s.Tooltips=r},"?eacb"(){},"?9bff"(){},"?3e29"(){},"?3536"(){},"?5786"(){}}]);})();
|
package/storybook/iframe.html
CHANGED
|
@@ -520,8 +520,8 @@
|
|
|
520
520
|
window['TAGS_OPTIONS'] = {"dev-only":{"excludeFromDocsStories":true},"docs-only":{"excludeFromSidebar":true},"test-only":{"excludeFromSidebar":true,"excludeFromDocsStories":true}};</script><script type="module">import './sb-preview/runtime.js';
|
|
521
521
|
|
|
522
522
|
|
|
523
|
-
import './runtime~main.
|
|
523
|
+
import './runtime~main.cefb891f.iframe.bundle.js';
|
|
524
524
|
|
|
525
525
|
import './714.151a8a88.iframe.bundle.js';
|
|
526
526
|
|
|
527
|
-
import './main.
|
|
527
|
+
import './main.f1843cbf.iframe.bundle.js';</script></body></html>
|