@sap-ux/ui-components 1.27.6 → 1.27.8
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 +7 -7
- package/storybook/{113.2ed5a39a.iframe.bundle.js → 113.86052d99.iframe.bundle.js} +1 -1
- package/storybook/{236.ff5a9ad4.iframe.bundle.js → 236.fd2f9f38.iframe.bundle.js} +1 -1
- package/storybook/275.68b405ad.iframe.bundle.js +17 -0
- package/storybook/{716.0db4ba0b.iframe.bundle.js → 299.87eab481.iframe.bundle.js} +6 -6
- package/storybook/{368.8390c74e.iframe.bundle.js → 368.e54fc3f9.iframe.bundle.js} +1 -1
- package/storybook/441.ac29c9de.iframe.bundle.js +7 -0
- package/storybook/{460.2c9fba65.iframe.bundle.js → 460.f6d7f47b.iframe.bundle.js} +1 -1
- package/storybook/{514.2cdee17d.iframe.bundle.js → 514.7b97def1.iframe.bundle.js} +1 -1
- package/storybook/{623.88aaf0f1.iframe.bundle.js → 623.18990c1a.iframe.bundle.js} +1 -1
- package/storybook/{769.791688c7.iframe.bundle.js → 769.2fb98a19.iframe.bundle.js} +1 -1
- package/storybook/{875.dfaefbad.iframe.bundle.js → 875.7473ec4c.iframe.bundle.js} +1 -1
- package/storybook/938.5fe0a303.iframe.bundle.js +10 -0
- package/storybook/{UIActionCallout-story.771fe34d.iframe.bundle.js → UIActionCallout-story.a373962d.iframe.bundle.js} +1 -1
- package/storybook/{UIButton-story.07594ca6.iframe.bundle.js → UIButton-story.676e6fbe.iframe.bundle.js} +1 -1
- package/storybook/{UICallout-story.af71a034.iframe.bundle.js → UICallout-story.a5167b23.iframe.bundle.js} +1 -1
- package/storybook/{UICalloutCollisionTransform-story.2c9e5a9b.iframe.bundle.js → UICalloutCollisionTransform-story.303f5e45.iframe.bundle.js} +1 -1
- package/storybook/{UICheckbox-story.874b293e.iframe.bundle.js → UICheckbox-story.04795d23.iframe.bundle.js} +1 -1
- package/storybook/{UIChoiceGroup-story.f5f7e770.iframe.bundle.js → UIChoiceGroup-story.5164ad16.iframe.bundle.js} +1 -1
- package/storybook/{UICombobox-story.a3ec23bf.iframe.bundle.js → UICombobox-story.b8089d01.iframe.bundle.js} +1 -1
- package/storybook/{UIContextualMenu-story.a900805c.iframe.bundle.js → UIContextualMenu-story.e6b65667.iframe.bundle.js} +1 -1
- package/storybook/{UICreateSelect-story.da65729d.iframe.bundle.js → UICreateSelect-story.07f42e08.iframe.bundle.js} +1 -1
- package/storybook/{UIDatePicker-story.af195695.iframe.bundle.js → UIDatePicker-story.53e97cc6.iframe.bundle.js} +1 -1
- package/storybook/{UIDialog-story.a4c932c6.iframe.bundle.js → UIDialog-story.f395fac7.iframe.bundle.js} +1 -1
- package/storybook/{UIDropdown-story.dc4e9ffd.iframe.bundle.js → UIDropdown-story.aa45ccb5.iframe.bundle.js} +1 -1
- package/storybook/{UIIcon-story.9cf8afc2.iframe.bundle.js → UIIcon-story.cd2eb53e.iframe.bundle.js} +1 -1
- package/storybook/{UILabel-story.68a998ac.iframe.bundle.js → UILabel-story.b72e7eee.iframe.bundle.js} +1 -1
- package/storybook/{UILink-story.6ae036dc.iframe.bundle.js → UILink-story.a43342a0.iframe.bundle.js} +1 -1
- package/storybook/{UILoader-story.5a15bac7.iframe.bundle.js → UILoader-story.24a46a6d.iframe.bundle.js} +1 -1
- package/storybook/{UIMessageBar-story.2f09a4db.iframe.bundle.js → UIMessageBar-story.211efb09.iframe.bundle.js} +1 -1
- package/storybook/{UIPersona-story.3e53fb63.iframe.bundle.js → UIPersona-story.be0866bd.iframe.bundle.js} +1 -1
- package/storybook/{UISearchBox-story.cd76f6cd.iframe.bundle.js → UISearchBox-story.49983732.iframe.bundle.js} +1 -1
- package/storybook/{UISections-story.9be4cd7d.iframe.bundle.js → UISections-story.4bdae700.iframe.bundle.js} +1 -1
- package/storybook/{UISeparator-story.2dc5fbb5.iframe.bundle.js → UISeparator-story.41a66ccf.iframe.bundle.js} +1 -1
- package/storybook/{UITable-story.f6b5f4bd.iframe.bundle.js → UITable-story.9070437c.iframe.bundle.js} +1 -1
- package/storybook/{UITextInput-story.1c528e90.iframe.bundle.js → UITextInput-story.9b000936.iframe.bundle.js} +1 -1
- package/storybook/{UIToggle-story.c0e3f858.iframe.bundle.js → UIToggle-story.61025a5c.iframe.bundle.js} +1 -1
- package/storybook/{UIToggleGroup-story.9b0cdf62.iframe.bundle.js → UIToggleGroup-story.32bc9694.iframe.bundle.js} +1 -1
- package/storybook/{UITooltip-story.b37f3d3f.iframe.bundle.js → UITooltip-story.e421d7eb.iframe.bundle.js} +1 -1
- package/storybook/{UITranslationInput-story.7a69ac92.iframe.bundle.js → UITranslationInput-story.c7f60404.iframe.bundle.js} +1 -1
- package/storybook/{UITreedropdown-story.84d30e6c.iframe.bundle.js → UITreedropdown-story.2cc0adcd.iframe.bundle.js} +1 -1
- package/storybook/{Utilities-story.35abd890.iframe.bundle.js → Utilities-story.06c40764.iframe.bundle.js} +1 -1
- package/storybook/iframe.html +3 -3
- package/storybook/{main.9c9dd782.iframe.bundle.js → main.d20772d2.iframe.bundle.js} +1 -1
- package/storybook/project.json +1 -1
- package/storybook/{runtime~main.bdd1833e.iframe.bundle.js → runtime~main.1eb088e7.iframe.bundle.js} +2 -2
- package/storybook/390.6fa86783.iframe.bundle.js +0 -10
- package/storybook/441.f7312395.iframe.bundle.js +0 -7
- package/storybook/825.8912eb64.iframe.bundle.js +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var w=Object.defineProperty,C=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var v=(y,t,e)=>t in y?w(y,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):y[t]=e,b=(y,t)=>{for(var e in t||(t={}))I.call(t,e)&&v(y,e,t[e]);if(P)for(var e of P(t))M.call(t,e)&&v(y,e,t[e]);return y},O=(y,t)=>C(y,T(t));(self.webpackChunk_sap_ux_ui_components=self.webpackChunk_sap_ux_ui_components||[]).push([[368],{"../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/components/UIDropdown/UIDropdown.scss":((y,t,e)=>{var h=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/api.js"),a=i(h);a.push([y.id,'.ts-SelectBox .ms-Dropdown{background:var(--vscode-input-background)}.ts-SelectBox .ms-Dropdown .ms-Dropdown-title{background:rgba(0,0,0,0);height:26px;line-height:24px;border:1px solid rgba(0,0,0,0);padding:0px 26px 0 8px;font-size:var(--vscode-font-size);font-family:var(--vscode-font-family);font-weight:var(--vscode-font-weight)}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper{right:0;width:26px;background:rgba(0,0,0,0);height:100%;text-align:center}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper i{height:100%;fill:var(--vscode-foreground)}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper i svg{height:100%;width:16px}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper i{margin-top:-1px}.ts-SelectBox .ms-Dropdown .ms-Dropdown-title,.ts-SelectBox .ms-Dropdown:hover .ms-Dropdown-title{color:var(--vscode-foreground)}.ts-SelectBox .ms-Dropdown .ms-Dropdown-titleIsPlaceHolder{color:var(--vscode-input-placeholderForeground)}.ts-SelectBox .ms-Dropdown:after{pointer-events:none;content:"";position:absolute;box-sizing:border-box;top:0px;left:0px;width:100%;height:100%;border:1px solid var(--vscode-editorWidget-border);border-radius:2px}.ts-SelectBox .ms-Dropdown.is-open:after,.ts-SelectBox .ms-Dropdown:focus:after,.ts-SelectBox .ms-Dropdown:hover:after{border-color:var(--vscode-focusBorder)}.ts-SelectBox .ms-Dropdown:focus:after,.ts-SelectBox .ms-Dropdown.is-open:after{border-style:solid}.ts-SelectBox--readonly .ms-Dropdown.is-disabled{background-color:var(--vscode-editor-background);font-style:italic}.ts-SelectBox--readonly .ms-Dropdown.is-disabled:after{border-style:dashed}.ts-SelectBox--readonly.ts-SelectBox--empty .ms-Dropdown:hover:after{border-color:var(--vscode-editorWidget-border)}.ts-SelectBox--disabled .ms-Dropdown.is-disabled{opacity:.5;background-color:var(--vscode-editor-inactiveSelectionBackground)}.ts-SelectBox--disabled .ms-Dropdown.is-disabled:after{border-color:var(--vscode-editorWidget-border)}.ts-SelectBox--readonly .ms-Dropdown:focus:after,.ts-SelectBox--disabled .ms-Dropdown:focus:after{border-style:solid;border-color:var(--vscode-focusBorder) !important}.ts-SelectBox--error .ms-Dropdown:after,.ts-SelectBox--error .ms-Dropdown.is-open:after{border-color:var(--vscode-inputValidation-errorBorder)}.ts-SelectBox--warning .ms-Dropdown:after,.ts-SelectBox--warning .ms-Dropdown.is-open:after{border-color:var(--vscode-inputValidation-warningBorder)}.ts-SelectBox--info .ms-Dropdown:after,.ts-SelectBox--info .ms-Dropdown.is-open:after{border-color:var(--vscode-inputValidation-infoBorder)}.ts-dropdown-item-blocker{position:absolute;top:0;left:0;right:0;bottom:0}',""]),y.exports=a}),"../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/styles/_shadows.scss":((y,t,e)=>{var h=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/api.js"),a=i(h);a.push([y.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)}",""]),y.exports=a}),"./src/components/UIDropdown/UIDropdown.scss":((y,t,e)=>{"use strict";e.r(t),e.d(t,{default:()=>g});var h=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=e.n(h),a=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleDomAPI.js"),r=e.n(a),n=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertBySelector.js"),o=e.n(n),_=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),c=e.n(_),D=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertStyleElement.js"),l=e.n(D),m=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=e.n(m),u=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/components/UIDropdown/UIDropdown.scss"),s=e.n(u),d={};for(const E in u)E!=="default"&&(d[E]=()=>u[E]);e.d(t,d);var f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=o().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=l();var S=i()(s(),f);const g=s()&&s().locals?s().locals:void 0}),"./src/styles/_shadows.scss":((y,t,e)=>{"use strict";e.r(t),e.d(t,{default:()=>g});var h=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=e.n(h),a=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleDomAPI.js"),r=e.n(a),n=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertBySelector.js"),o=e.n(n),_=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),c=e.n(_),D=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertStyleElement.js"),l=e.n(D),m=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=e.n(m),u=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/styles/_shadows.scss"),s=e.n(u),d={};for(const E in u)E!=="default"&&(d[E]=()=>u[E]);e.d(t,d);var f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=o().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=l();var S=i()(s(),f);const g=s()&&s().locals?s().locals:void 0}),"./src/components/UICallout/CalloutCollisionTransform.ts":((y,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutCollisionTransform=void 0;const e={target:".ms-Dialog-actions",container:".ms-Dialog-main",absolute:!0,minPagePadding:10},h=20;class i{constructor(r,n,o=e){this.originalStyle={},this.source=r,this.callout=n,this.props=o,this.applyTransformation=this.applyTransformation.bind(this),this.resetTransformation=this.resetTransformation.bind(this),this.preventDismissOnEvent=this.preventDismissOnEvent.bind(this)}createPlaceholder(r){const n=document.createElement("div");return n.classList.add("ts-Callout-transformation"),n.style.height=`${r}px`,n}getElements(){const r=this.source.current,n=r==null?void 0:r.closest(this.props.container);if(n&&r){const o=n==null?void 0:n.querySelector(this.props.target);if(o){const _={container:{dom:n,rect:n.getBoundingClientRect()},target:{dom:o,rect:o.getBoundingClientRect()},source:{dom:r,rect:r.getBoundingClientRect()}},c=this.callout.current;return c&&(_.callout={dom:c,rect:c.getBoundingClientRect()}),_}}}applyTransformation(){const r=this.getElements();if(!r)return;const{container:n,target:o,callout:_,source:c}=r;if(_){const D=window.innerHeight-e.minPagePadding,l=_.rect.height,m=c.rect.bottom;let p=m+l-o.rect.top,u=m+_.rect.height;if(p<=0||u>=D)return;if(u+=o.rect.height,u<=D&&(p+=h),this.props.absolute){const s=n.dom.style;this.originalStyle={transform:s.transform,position:s.position,top:s.top,left:s.left},s.transform="",s.position="absolute",s.top=`${n.rect.top}px`,s.left=`${n.rect.left}px`}this.placeholder=this.createPlaceholder(p),o.dom.prepend(this.placeholder)}}resetTransformation(){const r=this.getElements();if(!r)return;const{container:n}=r;for(const o in this.originalStyle){const _=this.originalStyle[o];typeof _=="string"&&(n.dom.style[o]=_)}this.originalStyle={},this.placeholder&&(this.placeholder.remove(),this.placeholder=void 0)}preventDismissOnEvent(r){const n=this.getElements();return!!(r.type==="focus"&&(n!=null&&n.target.dom.contains(r.target)))}}t.CalloutCollisionTransform=i}),"./src/components/UICallout/UICallout.tsx":(function(y,t,e){"use strict";var h=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(t,"__esModule",{value:!0}),t.UICallout=t.getCalloutStyle=t.UICalloutContentPadding=t.CALLOUT_STYLES=void 0;const i=h(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),a=e("../../node_modules/.pnpm/@fluentui+react@8.120.5_@types+react-dom@16.9.24_@types+react@16.14.55_react-dom@16.14.0_react@16.14.0/node_modules/@fluentui/react/lib-commonjs/index.js"),r=e("./src/utilities/index.ts");e("./src/styles/_shadows.scss"),t.CALLOUT_STYLES={background:"var(--vscode-editorWidget-background)",boxShadow:"var(--ui-box-shadow-small)",borderColor:"var(--vscode-editorWidget-border)",text:"var(--vscode-editorWidget-foreground)",borderRadius:2};var n;(function(l){l.None="None",l.Standard="Standard"})(n||(t.UICalloutContentPadding=n={}));const o=new Map([[n.Standard,8]]),_=(l,m)=>typeof l=="object"&&typeof l[m]=="object"?l[m]:{},c=l=>{var m,p;return{root:b({boxShadow:t.CALLOUT_STYLES.boxShadow,backgroundColor:t.CALLOUT_STYLES.background,borderRadius:t.CALLOUT_STYLES.borderRadius,border:`1px solid ${t.CALLOUT_STYLES.borderColor}`},_(l.styles,"root")),beak:b({backgroundColor:t.CALLOUT_STYLES.background,boxShadow:t.CALLOUT_STYLES.boxShadow},_(l.styles,"beak")),beakCurtain:b({backgroundColor:t.CALLOUT_STYLES.background,borderRadius:t.CALLOUT_STYLES.borderRadius},_(l.styles,"beakCurtain")),calloutMain:b({backgroundColor:"transparent",color:t.CALLOUT_STYLES.text,borderRadius:t.CALLOUT_STYLES.borderRadius,minWidth:(m=l.calloutMinWidth)!=null?m:300,boxSizing:"border-box",padding:o.get((p=l.contentPadding)!=null?p:n.None)},_(l.styles,"calloutMain")),container:_(l.styles,"container")}};t.getCalloutStyle=c;class D extends i.default.Component{constructor(m){super(m),this.onKeyDown=this.onKeyDown.bind(this)}onKeyDown(m){const{onKeyDown:p,focusTargetSiblingOnTabPress:u,target:s}=this.props;if(u&&m.key==="Tab"&&s){let d=null;if(typeof s=="string"){const f=(0,a.getDocument)();d=f==null?void 0:f.querySelector(s)}else"getBoundingClientRect"in s&&(0,r.isHTMLElement)(s)&&(d=s);d&&(0,r.focusToSibling)(d,!m.shiftKey)&&(m.stopPropagation(),m.preventDefault())}p==null||p(m)}render(){return i.default.createElement(a.Callout,O(b({},this.props),{onKeyDown:this.onKeyDown,styles:(0,t.getCalloutStyle)(this.props)}),this.props.children)}}t.UICallout=D}),"./src/components/UICallout/index.tsx":(function(y,t,e){"use strict";var h=this&&this.__createBinding||(Object.create?(function(a,r,n,o){o===void 0&&(o=n);var _=Object.getOwnPropertyDescriptor(r,n);(!_||("get"in _?!r.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(a,o,_)}):(function(a,r,n,o){o===void 0&&(o=n),a[o]=r[n]})),i=this&&this.__exportStar||function(a,r){for(var n in a)n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n)&&h(r,a,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(e("./src/components/UICallout/CalloutCollisionTransform.ts"),t),i(e("./src/components/UICallout/UICallout.tsx"),t)}),"./src/components/UIDropdown/UIDropdown.tsx":(function(y,t,e){"use strict";var h=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(t,"__esModule",{value:!0}),t.UIDropdown=t.UIDropdownMenuItemType=t.UIDropdownOption=void 0;const i=h(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),a=e("../../node_modules/.pnpm/@fluentui+react@8.120.5_@types+react-dom@16.9.24_@types+react@16.14.55_react-dom@16.14.0_react@16.14.0/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(t,"UIDropdownMenuItemType",{enumerable:!0,get:function(){return a.DropdownMenuItemType}}),Object.defineProperty(t,"UIDropdownOption",{enumerable:!0,get:function(){return a.IDropdownOption}});const r=e("./src/components/UIIcon/index.tsx"),n=e("./src/helper/ValidationMessage/index.tsx"),o=e("./src/components/UILabel/index.tsx"),_=e("./src/components/UIDropdown/utils.ts"),c=e("./src/components/UICallout/index.tsx"),D=e("./src/components/types.ts");e("./src/components/UIDropdown/UIDropdown.scss");const l="var(--vscode-inputValidation-errorBorder)";class m extends i.default.Component{constructor(u){super(u),this.dropdownDomRef=i.default.createRef(),this.menuDomRef=i.default.createRef(),this.calloutCollisionTransform=new c.CalloutCollisionTransform(this.dropdownDomRef,this.menuDomRef),this.onRenderCaretDown=()=>i.default.createElement(r.UIIcon,{iconName:"ArrowDown",style:{height:"100%"}}),this.onRenderTitle=s=>{if(this.props.multiSelect&&this.props.onHandleRenderTitle)return this.props.onHandleRenderTitle(s);{const{multiSelectDelimiter:d=", "}=this.props;if(s){const f=s.map(S=>S.text).join(d);return i.default.createElement(i.default.Fragment,null,f)}else return i.default.createElement(i.default.Fragment,null,this.props.title)}},this.onClick=()=>{this.setState(s=>({isOpen:!s.isOpen}),()=>{this.props.multiSelect&&this.props.onHandleOpen&&this.state.isOpen&&(this.setState(s=>({isOpen:!s.isOpen})),this.props.onHandleOpen())})},this.onChange=(s,d,f)=>{this.props.multiSelect&&this.props.onHandleChange&&d&&f&&this.props.onHandleChange(d,f)},this.stopEventPropagation=s=>{s.stopPropagation()},this._onRenderOption=(s,d)=>i.default.createElement(i.default.Fragment,null,d==null?void 0:d(s),(s==null?void 0:s.itemType)!==a.DropdownMenuItemType.Header&&i.default.createElement("div",{onMouseEnter:this.stopEventPropagation.bind(this),onMouseLeave:this.stopEventPropagation.bind(this),onMouseMove:this.stopEventPropagation.bind(this),className:"ts-dropdown-item-blocker"})),this.onRenderOption=(s,d)=>this.props.onRenderOption?this.props.onRenderOption(s,this._onRenderOption.bind(this,s,d)):this._onRenderOption(s,d),this._onRenderItem=(s,d)=>d&&s?(s.title===void 0&&(s.title=s.text),d(s)):null,this.onRenderItem=(s,d)=>this.props.onRenderItem?this.props.onRenderItem(s,this._onRenderItem.bind(this,s,d)):this._onRenderItem(s,d),this.state={options:[],isOpen:!1}}getCalloutStylesForUseAsMinWidth(u){return{root:{minWidth:u.calloutWidth,width:"auto",maxWidth:"calc(100% - 10px)"}}}getClassNames(u){const{className:s,readOnly:d,disabled:f}=this.props,S=u.message?n.MESSAGE_TYPES_CLASSNAME_MAP.get(u.type):void 0;let g=`ts-SelectBox${u.message?" ts-SelectBox--"+S:""}`;return d&&!f&&(g+=" ts-SelectBox--readonly"),f&&(g+=" ts-SelectBox--disabled"),s&&(g+=` ${s}`),(0,_.isDropdownEmpty)(this.props)&&(g+=" ts-SelectBox--empty"),g}getAccessibilityProps(){const{readOnly:u,disabled:s}=this.props,d={};return u&&!s?(d.tabIndex=0,d["data-is-focusable"]=!0,d["aria-disabled"]=void 0,d["aria-readonly"]=!0):s&&(d.tabIndex=0,d["data-is-focusable"]=!0),d}render(){const u=(0,n.getMessageInfo)(this.props),s=this.getAccessibilityProps(),d=()=>({label:b(b(b({},o.labelGlobalStyle),this.props.disabled&&{opacity:"0.4"}),this.props.required&&{selectors:{"::after":{content:D.REQUIRED_LABEL_INDICATOR,color:l,paddingRight:12}}}),errorMessage:[u.style]});return i.default.createElement(a.Dropdown,O(b(b({ref:this.dropdownDomRef,onRenderCaretDown:this.onRenderCaretDown,onClick:this.onClick,onChange:this.onChange,onRenderTitle:this.onRenderTitle,responsiveMode:a.ResponsiveMode.xxxLarge,disabled:this.props.readOnly},s),this.props),{calloutProps:b(b({calloutMaxHeight:200,styles:this.props.useDropdownAsMenuMinWidth?this.getCalloutStylesForUseAsMinWidth:void 0,className:"ts-Callout ts-Callout-Dropdown",popupProps:{ref:this.menuDomRef}},this.props.calloutProps),(0,_.getCalloutCollisionTransformationPropsForDropdown)(this,this.calloutCollisionTransform)),onRenderOption:this.onRenderOption.bind(this),onRenderItem:this.onRenderItem.bind(this),styles:d,className:this.getClassNames(u),errorMessage:u.message}))}}t.UIDropdown=m}),"./src/components/UIDropdown/index.tsx":(function(y,t,e){"use strict";var h=this&&this.__createBinding||(Object.create?(function(a,r,n,o){o===void 0&&(o=n);var _=Object.getOwnPropertyDescriptor(r,n);(!_||("get"in _?!r.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(a,o,_)}):(function(a,r,n,o){o===void 0&&(o=n),a[o]=r[n]})),i=this&&this.__exportStar||function(a,r){for(var n in a)n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n)&&h(r,a,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(e("./src/components/UIDropdown/UIDropdown.tsx"),t),i(e("./src/components/UIDropdown/utils.ts"),t)}),"./src/components/UIDropdown/utils.ts":((y,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDropdownEmpty=e,t.getCalloutCollisionTransformationProps=h,t.getCalloutCollisionTransformationPropsForDropdown=n;function e(o){var c;const{selectedKey:_}=o;return Array.isArray(_)?_.length===0:"text"in o&&o.text||"selectedKeys"in o&&((c=o.selectedKeys)!=null&&c.length)?!1:!_}function h(o,_,c){if(_&&c)return{preventDismissOnEvent:o.preventDismissOnEvent,layerProps:{onLayerDidMount:o.applyTransformation,onLayerWillUnmount:o.resetTransformation}}}function i(o,_){return()=>{var D,l,m,p,u;const{layerProps:c}=(D=h(_,o.props.multiSelect,o.props.calloutCollisionTransformation))!=null?D:{};(m=(l=o.props.calloutProps)==null?void 0:l.layerProps)!=null&&m.onLayerDidMount&&((u=(p=o.props.calloutProps)==null?void 0:p.layerProps)==null||u.onLayerDidMount()),c!=null&&c.onLayerDidMount&&c.onLayerDidMount()}}function a(o,_){return()=>{var D,l,m,p,u;const{layerProps:c}=(D=h(_,o.props.multiSelect,o.props.calloutCollisionTransformation))!=null?D:{};(m=(l=o.props.calloutProps)==null?void 0:l.layerProps)!=null&&m.onLayerWillUnmount&&((u=(p=o.props.calloutProps)==null?void 0:p.layerProps)==null||u.onLayerWillUnmount()),c!=null&&c.onLayerWillUnmount&&c.onLayerWillUnmount()}}function r(o,_){return c=>{var l,m;let D=!1;if((l=o.props.calloutProps)!=null&&l.preventDismissOnEvent&&(D=o.props.calloutProps.preventDismissOnEvent(c)),!D){const{preventDismissOnEvent:p}=(m=h(_,o.props.multiSelect,o.props.calloutCollisionTransformation))!=null?m:{};if(p)return p(c)}return D}}function n(o,_){if(o.props.multiSelect&&o.props.calloutCollisionTransformation)return{preventDismissOnEvent:r(o,_),layerProps:{onLayerDidMount:i(o,_),onLayerWillUnmount:a(o,_)}}}})}]);})();
|
|
1
|
+
(()=>{var w=Object.defineProperty,C=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var v=(y,t,e)=>t in y?w(y,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):y[t]=e,b=(y,t)=>{for(var e in t||(t={}))I.call(t,e)&&v(y,e,t[e]);if(P)for(var e of P(t))M.call(t,e)&&v(y,e,t[e]);return y},O=(y,t)=>C(y,T(t));(self.webpackChunk_sap_ux_ui_components=self.webpackChunk_sap_ux_ui_components||[]).push([[368],{"../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/components/UIDropdown/UIDropdown.scss":((y,t,e)=>{var h=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/api.js"),a=i(h);a.push([y.id,'.ts-SelectBox .ms-Dropdown{background:var(--vscode-input-background)}.ts-SelectBox .ms-Dropdown .ms-Dropdown-title{background:rgba(0,0,0,0);height:26px;line-height:24px;border:1px solid rgba(0,0,0,0);padding:0px 26px 0 8px;font-size:var(--vscode-font-size);font-family:var(--vscode-font-family);font-weight:var(--vscode-font-weight)}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper{right:0;width:26px;background:rgba(0,0,0,0);height:100%;text-align:center}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper i{height:100%;fill:var(--vscode-foreground)}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper i svg{height:100%;width:16px}.ts-SelectBox .ms-Dropdown>.ms-Dropdown-caretDownWrapper i{margin-top:-1px}.ts-SelectBox .ms-Dropdown .ms-Dropdown-title,.ts-SelectBox .ms-Dropdown:hover .ms-Dropdown-title{color:var(--vscode-foreground)}.ts-SelectBox .ms-Dropdown .ms-Dropdown-titleIsPlaceHolder{color:var(--vscode-input-placeholderForeground)}.ts-SelectBox .ms-Dropdown:after{pointer-events:none;content:"";position:absolute;box-sizing:border-box;top:0px;left:0px;width:100%;height:100%;border:1px solid var(--vscode-editorWidget-border);border-radius:2px}.ts-SelectBox .ms-Dropdown.is-open:after,.ts-SelectBox .ms-Dropdown:focus:after,.ts-SelectBox .ms-Dropdown:hover:after{border-color:var(--vscode-focusBorder)}.ts-SelectBox .ms-Dropdown:focus:after,.ts-SelectBox .ms-Dropdown.is-open:after{border-style:solid}.ts-SelectBox--readonly .ms-Dropdown.is-disabled{background-color:var(--vscode-editor-background);font-style:italic}.ts-SelectBox--readonly .ms-Dropdown.is-disabled:after{border-style:dashed}.ts-SelectBox--readonly.ts-SelectBox--empty .ms-Dropdown:hover:after{border-color:var(--vscode-editorWidget-border)}.ts-SelectBox--disabled .ms-Dropdown.is-disabled{opacity:.5;background-color:var(--vscode-editor-inactiveSelectionBackground)}.ts-SelectBox--disabled .ms-Dropdown.is-disabled:after{border-color:var(--vscode-editorWidget-border)}.ts-SelectBox--readonly .ms-Dropdown:focus:after,.ts-SelectBox--disabled .ms-Dropdown:focus:after{border-style:solid;border-color:var(--vscode-focusBorder) !important}.ts-SelectBox--error .ms-Dropdown:after,.ts-SelectBox--error .ms-Dropdown.is-open:after{border-color:var(--vscode-inputValidation-errorBorder)}.ts-SelectBox--warning .ms-Dropdown:after,.ts-SelectBox--warning .ms-Dropdown.is-open:after{border-color:var(--vscode-inputValidation-warningBorder)}.ts-SelectBox--info .ms-Dropdown:after,.ts-SelectBox--info .ms-Dropdown.is-open:after{border-color:var(--vscode-inputValidation-infoBorder)}.ts-dropdown-item-blocker{position:absolute;top:0;left:0;right:0;bottom:0}',""]),y.exports=a}),"../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/styles/_shadows.scss":((y,t,e)=>{var h=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/runtime/api.js"),a=i(h);a.push([y.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)}",""]),y.exports=a}),"./src/components/UIDropdown/UIDropdown.scss":((y,t,e)=>{"use strict";e.r(t),e.d(t,{default:()=>g});var h=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=e.n(h),a=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleDomAPI.js"),r=e.n(a),n=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertBySelector.js"),o=e.n(n),_=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),c=e.n(_),D=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertStyleElement.js"),l=e.n(D),m=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=e.n(m),u=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/components/UIDropdown/UIDropdown.scss"),s=e.n(u),d={};for(const E in u)E!=="default"&&(d[E]=()=>u[E]);e.d(t,d);var f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=o().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=l();var S=i()(s(),f);const g=s()&&s().locals?s().locals:void 0}),"./src/styles/_shadows.scss":((y,t,e)=>{"use strict";e.r(t),e.d(t,{default:()=>g});var h=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=e.n(h),a=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleDomAPI.js"),r=e.n(a),n=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertBySelector.js"),o=e.n(n),_=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),c=e.n(_),D=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/insertStyleElement.js"),l=e.n(D),m=e("../../node_modules/.pnpm/style-loader@3.3.3_webpack@5.105.2/node_modules/style-loader/dist/runtime/styleTagTransform.js"),p=e.n(m),u=e("../../node_modules/.pnpm/css-loader@6.8.1_webpack@5.105.2/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[11].use[1]!../../node_modules/.pnpm/sass-loader@13.3.2_sass-embedded@1.97.3_sass@1.66.1_webpack@5.105.2/node_modules/sass-loader/dist/cjs.js!./src/styles/_shadows.scss"),s=e.n(u),d={};for(const E in u)E!=="default"&&(d[E]=()=>u[E]);e.d(t,d);var f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=o().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=l();var S=i()(s(),f);const g=s()&&s().locals?s().locals:void 0}),"./src/components/UICallout/CalloutCollisionTransform.ts":((y,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutCollisionTransform=void 0;const e={target:".ms-Dialog-actions",container:".ms-Dialog-main",absolute:!0,minPagePadding:10},h=20;class i{constructor(r,n,o=e){this.originalStyle={},this.source=r,this.callout=n,this.props=o,this.applyTransformation=this.applyTransformation.bind(this),this.resetTransformation=this.resetTransformation.bind(this),this.preventDismissOnEvent=this.preventDismissOnEvent.bind(this)}createPlaceholder(r){const n=document.createElement("div");return n.classList.add("ts-Callout-transformation"),n.style.height=`${r}px`,n}getElements(){const r=this.source.current,n=r==null?void 0:r.closest(this.props.container);if(n&&r){const o=n==null?void 0:n.querySelector(this.props.target);if(o){const _={container:{dom:n,rect:n.getBoundingClientRect()},target:{dom:o,rect:o.getBoundingClientRect()},source:{dom:r,rect:r.getBoundingClientRect()}},c=this.callout.current;return c&&(_.callout={dom:c,rect:c.getBoundingClientRect()}),_}}}applyTransformation(){const r=this.getElements();if(!r)return;const{container:n,target:o,callout:_,source:c}=r;if(_){const D=window.innerHeight-e.minPagePadding,l=_.rect.height,m=c.rect.bottom;let p=m+l-o.rect.top,u=m+_.rect.height;if(p<=0||u>=D)return;if(u+=o.rect.height,u<=D&&(p+=h),this.props.absolute){const s=n.dom.style;this.originalStyle={transform:s.transform,position:s.position,top:s.top,left:s.left},s.transform="",s.position="absolute",s.top=`${n.rect.top}px`,s.left=`${n.rect.left}px`}this.placeholder=this.createPlaceholder(p),o.dom.prepend(this.placeholder)}}resetTransformation(){const r=this.getElements();if(!r)return;const{container:n}=r;for(const o in this.originalStyle){const _=this.originalStyle[o];typeof _=="string"&&(n.dom.style[o]=_)}this.originalStyle={},this.placeholder&&(this.placeholder.remove(),this.placeholder=void 0)}preventDismissOnEvent(r){const n=this.getElements();return!!(r.type==="focus"&&(n!=null&&n.target.dom.contains(r.target)))}}t.CalloutCollisionTransform=i}),"./src/components/UICallout/UICallout.tsx":(function(y,t,e){"use strict";var h=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(t,"__esModule",{value:!0}),t.UICallout=t.getCalloutStyle=t.UICalloutContentPadding=t.CALLOUT_STYLES=void 0;const i=h(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),a=e("../../node_modules/.pnpm/@fluentui+react@8.120.5_@types+react-dom@16.9.25_@types+react@16.14.69_react-dom@16.14.0_react@16.14.0/node_modules/@fluentui/react/lib-commonjs/index.js"),r=e("./src/utilities/index.ts");e("./src/styles/_shadows.scss"),t.CALLOUT_STYLES={background:"var(--vscode-editorWidget-background)",boxShadow:"var(--ui-box-shadow-small)",borderColor:"var(--vscode-editorWidget-border)",text:"var(--vscode-editorWidget-foreground)",borderRadius:2};var n;(function(l){l.None="None",l.Standard="Standard"})(n||(t.UICalloutContentPadding=n={}));const o=new Map([[n.Standard,8]]),_=(l,m)=>typeof l=="object"&&typeof l[m]=="object"?l[m]:{},c=l=>{var m,p;return{root:b({boxShadow:t.CALLOUT_STYLES.boxShadow,backgroundColor:t.CALLOUT_STYLES.background,borderRadius:t.CALLOUT_STYLES.borderRadius,border:`1px solid ${t.CALLOUT_STYLES.borderColor}`},_(l.styles,"root")),beak:b({backgroundColor:t.CALLOUT_STYLES.background,boxShadow:t.CALLOUT_STYLES.boxShadow},_(l.styles,"beak")),beakCurtain:b({backgroundColor:t.CALLOUT_STYLES.background,borderRadius:t.CALLOUT_STYLES.borderRadius},_(l.styles,"beakCurtain")),calloutMain:b({backgroundColor:"transparent",color:t.CALLOUT_STYLES.text,borderRadius:t.CALLOUT_STYLES.borderRadius,minWidth:(m=l.calloutMinWidth)!=null?m:300,boxSizing:"border-box",padding:o.get((p=l.contentPadding)!=null?p:n.None)},_(l.styles,"calloutMain")),container:_(l.styles,"container")}};t.getCalloutStyle=c;class D extends i.default.Component{constructor(m){super(m),this.onKeyDown=this.onKeyDown.bind(this)}onKeyDown(m){const{onKeyDown:p,focusTargetSiblingOnTabPress:u,target:s}=this.props;if(u&&m.key==="Tab"&&s){let d=null;if(typeof s=="string"){const f=(0,a.getDocument)();d=f==null?void 0:f.querySelector(s)}else"getBoundingClientRect"in s&&(0,r.isHTMLElement)(s)&&(d=s);d&&(0,r.focusToSibling)(d,!m.shiftKey)&&(m.stopPropagation(),m.preventDefault())}p==null||p(m)}render(){return i.default.createElement(a.Callout,O(b({},this.props),{onKeyDown:this.onKeyDown,styles:(0,t.getCalloutStyle)(this.props)}),this.props.children)}}t.UICallout=D}),"./src/components/UICallout/index.tsx":(function(y,t,e){"use strict";var h=this&&this.__createBinding||(Object.create?(function(a,r,n,o){o===void 0&&(o=n);var _=Object.getOwnPropertyDescriptor(r,n);(!_||("get"in _?!r.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(a,o,_)}):(function(a,r,n,o){o===void 0&&(o=n),a[o]=r[n]})),i=this&&this.__exportStar||function(a,r){for(var n in a)n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n)&&h(r,a,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(e("./src/components/UICallout/CalloutCollisionTransform.ts"),t),i(e("./src/components/UICallout/UICallout.tsx"),t)}),"./src/components/UIDropdown/UIDropdown.tsx":(function(y,t,e){"use strict";var h=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(t,"__esModule",{value:!0}),t.UIDropdown=t.UIDropdownMenuItemType=t.UIDropdownOption=void 0;const i=h(e("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),a=e("../../node_modules/.pnpm/@fluentui+react@8.120.5_@types+react-dom@16.9.25_@types+react@16.14.69_react-dom@16.14.0_react@16.14.0/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(t,"UIDropdownMenuItemType",{enumerable:!0,get:function(){return a.DropdownMenuItemType}}),Object.defineProperty(t,"UIDropdownOption",{enumerable:!0,get:function(){return a.IDropdownOption}});const r=e("./src/components/UIIcon/index.tsx"),n=e("./src/helper/ValidationMessage/index.tsx"),o=e("./src/components/UILabel/index.tsx"),_=e("./src/components/UIDropdown/utils.ts"),c=e("./src/components/UICallout/index.tsx"),D=e("./src/components/types.ts");e("./src/components/UIDropdown/UIDropdown.scss");const l="var(--vscode-inputValidation-errorBorder)";class m extends i.default.Component{constructor(u){super(u),this.dropdownDomRef=i.default.createRef(),this.menuDomRef=i.default.createRef(),this.calloutCollisionTransform=new c.CalloutCollisionTransform(this.dropdownDomRef,this.menuDomRef),this.onRenderCaretDown=()=>i.default.createElement(r.UIIcon,{iconName:"ArrowDown",style:{height:"100%"}}),this.onRenderTitle=s=>{if(this.props.multiSelect&&this.props.onHandleRenderTitle)return this.props.onHandleRenderTitle(s);{const{multiSelectDelimiter:d=", "}=this.props;if(s){const f=s.map(S=>S.text).join(d);return i.default.createElement(i.default.Fragment,null,f)}else return i.default.createElement(i.default.Fragment,null,this.props.title)}},this.onClick=()=>{this.setState(s=>({isOpen:!s.isOpen}),()=>{this.props.multiSelect&&this.props.onHandleOpen&&this.state.isOpen&&(this.setState(s=>({isOpen:!s.isOpen})),this.props.onHandleOpen())})},this.onChange=(s,d,f)=>{this.props.multiSelect&&this.props.onHandleChange&&d&&f&&this.props.onHandleChange(d,f)},this.stopEventPropagation=s=>{s.stopPropagation()},this._onRenderOption=(s,d)=>i.default.createElement(i.default.Fragment,null,d==null?void 0:d(s),(s==null?void 0:s.itemType)!==a.DropdownMenuItemType.Header&&i.default.createElement("div",{onMouseEnter:this.stopEventPropagation.bind(this),onMouseLeave:this.stopEventPropagation.bind(this),onMouseMove:this.stopEventPropagation.bind(this),className:"ts-dropdown-item-blocker"})),this.onRenderOption=(s,d)=>this.props.onRenderOption?this.props.onRenderOption(s,this._onRenderOption.bind(this,s,d)):this._onRenderOption(s,d),this._onRenderItem=(s,d)=>d&&s?(s.title===void 0&&(s.title=s.text),d(s)):null,this.onRenderItem=(s,d)=>this.props.onRenderItem?this.props.onRenderItem(s,this._onRenderItem.bind(this,s,d)):this._onRenderItem(s,d),this.state={options:[],isOpen:!1}}getCalloutStylesForUseAsMinWidth(u){return{root:{minWidth:u.calloutWidth,width:"auto",maxWidth:"calc(100% - 10px)"}}}getClassNames(u){const{className:s,readOnly:d,disabled:f}=this.props,S=u.message?n.MESSAGE_TYPES_CLASSNAME_MAP.get(u.type):void 0;let g=`ts-SelectBox${u.message?" ts-SelectBox--"+S:""}`;return d&&!f&&(g+=" ts-SelectBox--readonly"),f&&(g+=" ts-SelectBox--disabled"),s&&(g+=` ${s}`),(0,_.isDropdownEmpty)(this.props)&&(g+=" ts-SelectBox--empty"),g}getAccessibilityProps(){const{readOnly:u,disabled:s}=this.props,d={};return u&&!s?(d.tabIndex=0,d["data-is-focusable"]=!0,d["aria-disabled"]=void 0,d["aria-readonly"]=!0):s&&(d.tabIndex=0,d["data-is-focusable"]=!0),d}render(){const u=(0,n.getMessageInfo)(this.props),s=this.getAccessibilityProps(),d=()=>({label:b(b(b({},o.labelGlobalStyle),this.props.disabled&&{opacity:"0.4"}),this.props.required&&{selectors:{"::after":{content:D.REQUIRED_LABEL_INDICATOR,color:l,paddingRight:12}}}),errorMessage:[u.style]});return i.default.createElement(a.Dropdown,O(b(b({ref:this.dropdownDomRef,onRenderCaretDown:this.onRenderCaretDown,onClick:this.onClick,onChange:this.onChange,onRenderTitle:this.onRenderTitle,responsiveMode:a.ResponsiveMode.xxxLarge,disabled:this.props.readOnly},s),this.props),{calloutProps:b(b({calloutMaxHeight:200,styles:this.props.useDropdownAsMenuMinWidth?this.getCalloutStylesForUseAsMinWidth:void 0,className:"ts-Callout ts-Callout-Dropdown",popupProps:{ref:this.menuDomRef}},this.props.calloutProps),(0,_.getCalloutCollisionTransformationPropsForDropdown)(this,this.calloutCollisionTransform)),onRenderOption:this.onRenderOption.bind(this),onRenderItem:this.onRenderItem.bind(this),styles:d,className:this.getClassNames(u),errorMessage:u.message}))}}t.UIDropdown=m}),"./src/components/UIDropdown/index.tsx":(function(y,t,e){"use strict";var h=this&&this.__createBinding||(Object.create?(function(a,r,n,o){o===void 0&&(o=n);var _=Object.getOwnPropertyDescriptor(r,n);(!_||("get"in _?!r.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return r[n]}}),Object.defineProperty(a,o,_)}):(function(a,r,n,o){o===void 0&&(o=n),a[o]=r[n]})),i=this&&this.__exportStar||function(a,r){for(var n in a)n!=="default"&&!Object.prototype.hasOwnProperty.call(r,n)&&h(r,a,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(e("./src/components/UIDropdown/UIDropdown.tsx"),t),i(e("./src/components/UIDropdown/utils.ts"),t)}),"./src/components/UIDropdown/utils.ts":((y,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDropdownEmpty=e,t.getCalloutCollisionTransformationProps=h,t.getCalloutCollisionTransformationPropsForDropdown=n;function e(o){var c;const{selectedKey:_}=o;return Array.isArray(_)?_.length===0:"text"in o&&o.text||"selectedKeys"in o&&((c=o.selectedKeys)!=null&&c.length)?!1:!_}function h(o,_,c){if(_&&c)return{preventDismissOnEvent:o.preventDismissOnEvent,layerProps:{onLayerDidMount:o.applyTransformation,onLayerWillUnmount:o.resetTransformation}}}function i(o,_){return()=>{var D,l,m,p,u;const{layerProps:c}=(D=h(_,o.props.multiSelect,o.props.calloutCollisionTransformation))!=null?D:{};(m=(l=o.props.calloutProps)==null?void 0:l.layerProps)!=null&&m.onLayerDidMount&&((u=(p=o.props.calloutProps)==null?void 0:p.layerProps)==null||u.onLayerDidMount()),c!=null&&c.onLayerDidMount&&c.onLayerDidMount()}}function a(o,_){return()=>{var D,l,m,p,u;const{layerProps:c}=(D=h(_,o.props.multiSelect,o.props.calloutCollisionTransformation))!=null?D:{};(m=(l=o.props.calloutProps)==null?void 0:l.layerProps)!=null&&m.onLayerWillUnmount&&((u=(p=o.props.calloutProps)==null?void 0:p.layerProps)==null||u.onLayerWillUnmount()),c!=null&&c.onLayerWillUnmount&&c.onLayerWillUnmount()}}function r(o,_){return c=>{var l,m;let D=!1;if((l=o.props.calloutProps)!=null&&l.preventDismissOnEvent&&(D=o.props.calloutProps.preventDismissOnEvent(c)),!D){const{preventDismissOnEvent:p}=(m=h(_,o.props.multiSelect,o.props.calloutCollisionTransformation))!=null?m:{};if(p)return p(c)}return D}}function n(o,_){if(o.props.multiSelect&&o.props.calloutCollisionTransformation)return{preventDismissOnEvent:r(o,_),layerProps:{onLayerDidMount:i(o,_),onLayerWillUnmount:a(o,_)}}}})}]);})();
|