-
Notifications
You must be signed in to change notification settings - Fork 0
/
6784.20c319f8.iframe.bundle.js
1 lines (1 loc) · 18.2 KB
/
6784.20c319f8.iframe.bundle.js
1
(self.webpackChunk_freud_ds_web=self.webpackChunk_freud_ds_web||[]).push([[6784],{"./stories/icons/all-icons/all-icons.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{x:()=>AllIconsComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var all_icons_componentngResource=__webpack_require__("./stories/icons/all-icons/all-icons.component.scss?ngResource"),all_icons_componentngResource_default=__webpack_require__.n(all_icons_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ngx_clipboard=__webpack_require__("./node_modules/ngx-clipboard/fesm2020/ngx-clipboard.mjs");const icons=["accessible","adjustments-horizontal","adjustments","alert-circle","alert-octagon","align-center","align-justify","align-left","align-right","angle-double-down","angle-double-left","angle-double-right","angle-double-up","apps","archive","arrow-circle-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-down-circle","arrow-down-left-circle","arrow-down-left","arrow-down-right-circle","arrow-down-right","arrow-down","arrow-left","arrow-right-arrow-left","arrow-right","arrow-up-circle","arrow-up-left-circle","arrow-up-left","arrow-up-right-circle","arrow-up-right","arrow-up","arrows-alt","arrows-h","arrows-right-left","arrows-v","at","award","backward","ballon","ban","bandage","barcode","bars","beach","bell-off","bell-ringing","bell","bitcoin","bolt","book","bookmark-fill","bookmark-off","bookmark","box","brand-android","brand-apple","brand-facebook","brand-figma","brand-github","brand-google-drive","brand-google-play","brand-instagram","brand-linkedin","brand-netflix","brand-twitter","brand-whatsapp","brand-youtube","briefcase","browser","building-bank","building-castle","building-church","building-community","building-cottage","building-factory","building-fortress","building-hospital","building-pavilon","building-skyscraper","building-store","building-warehouse","building","bulb","businessplan","calculator","calendar-event","calendar-minus","calendar-plus","calendar-time","calendar-times","calendar","camera-off","camera","car","caret-down","caret-left","caret-right","caret-up","cart-plus","certificate","chart-bar-2","chart-bar","chart-line","chart-pie-2","chart-pie","check-circle","check-square","check","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","circle-check","circle-fill","circle-minus","circle-plus","circle-x","circle","clipboard-check","clipboard-list","clipboard-x","clock","clone","close","cloud-download","cloud-rain","cloud-storm","cloud-upload","cloud","code","coffee","cog","coin","comment","comments","compass","copy","credit-card","currency-dollar","database","delete-left","desktop","device-desktop","device-laptop","device-mobile","device-tablet","device-tv","device-watch","devices-2","devices-pc","devices","diamond","directions-alt","directions","disabled","discount-2","discount","dollar","dots-vertical","dots","download","edit","eject","ellipsis-h","ellipsis-v","envelope","eraser","euro","exclamation-circle","exclamation-triangle","external-link","eye-off","eye-slash","eye","face-id","fast-backward","fast-forward","file-certificate","file-edit","file-excel","file-export","file-import","file-o","file-pdf","file-text","file-word","file","filter-fill","filter-off","filter-slash","filter","fingerprint","flag-fill","flag","folder-open","folder","folders","forward","ghost","gift","globe","grid-dots","hand-rock","hashtag","headphones-off","headphones","heart-fill","heart","help","history","home","hourglass","id-card","image","images","inbox","infinity","info-circle","info","instagram","key","language","layout-grid-add","layout-grid","layout-sidebar","license","link","list-check","list-search","list","live-view","loader","location","lock-off","lock-open","lock","login","logout","mail-opened","mail","map-marker","map-pin-off","map-pin","map","meditation","megaphone","menu","message-circle-off","message-circle","messages","microphone-off","microphone","minus-circle","minus","mobile","money-bill","mood-confuzed","mood-crazy-happy","mood-empty","mood-happy","mood-sad","mood-smile","mood-suprised","mood-tongue","moon","motorbike","movie","mug","music","palette","paperclip","pause fill","pause","peace","pencil","percentage","phone-off","phone","photo","pill","pills","pin","pinned-off","pinned","pizza","plane","plant-2","plant","play fill","play","player-pause","player-play","playlist","plus-circle","plus","pound","power-off","power","print","puzzle","qrcode","question-circle","question","receipt-2","receipt-off","receipt","refresh-2","refresh","replay","reply","report-money","report","rocket","rotate-clockwise","save","school","search-minus","search-plus","search","send","server","settings","share-alt","share","shield-check","shield","shopping-bag","shopping-cart","sign-in","sign-out","sitemap","sliders-h","sliders-v","snowflake","sort-alpha-alt-down","sort-alpha-alt-up","sort-alpha-down","sort-alpha-up","sort-alt-slash","sort-alt","sort-amount-down-alt","sort-amount-down","sort-amount-up-alt","sort-amount-up","sort-down","sort-numeric-alt-down","sort-numeric-alt-up","sort-numeric-down","sort-numeric-up","sort-up","sort","speakerphone","spinner","stack","star-fill","star-half","star-off","star","step-backward-alt","step-backward","step-forward-alt","step-forward","stop-circle","stop","stopwatch","sun","switch-vertical","sync","table","tablet","tag","tags","th-large","thumb-down","thumb-up","thumbs-down-fill","thumbs-down","thumbs-up-fill","thumbs-up","ticket","times-circle","times","trash-off","trash","trophy","truck","undo","unlink","unlock","upload","urgent","user-circle","user-edit","user-minus","user-plus","user","users","vaccine","verificated","video-off","video","volume-2","volume-3","volume-down","volume-off","volume-up","volume","wallet","whatsapp","wifi-off","wifi","window-maximize","window-minimize","world","wrench","x","yin-yang"];let AllIconsComponent=class AllIconsComponent{constructor(clipboardService){this.clipboardService=clipboardService,this.iconNames=[],this.fullIconNames=[],this.baseMessage="Copied to clipboard",this.message=this.baseMessage,this.searchText="",this.copyMode="class"}ngOnInit(){this.fullIconNames=[...icons],this.filterIcons()}clipboard(iconName){if("class"===this.copyMode){const freudClass=`freud-icon freud-icon-${iconName}`;this.clipboardService.copyFromContent(freudClass)}else if("component"===this.copyMode){const freudComponent=`<freud-icon icon="${iconName}"></freud-icon>`;this.clipboardService.copyFromContent(freudComponent)}this.toast(iconName)}filterIcons($event){$event&&(this.searchText=$event.srcElement.value.toLowerCase()),this.searchText?this.iconNames=this.fullIconNames.filter((iconName=>iconName.includes(this.searchText))):this.iconNames=[...icons]}toast(iconName){this.message=`"${iconName}" ${this.baseMessage}!`}static#_=this.ctorParameters=()=>[{type:ngx_clipboard.Yv}];static#_2=this.propDecorators={copyMode:[{type:core.Input}]}};AllIconsComponent=(0,tslib_es6.gn)([(0,core.Component)({selector:"all-icons",template:'<div\n class="all-icons-container"\n freud-typography\n [fontType]="\'smallRegular1-5\'"\n>\n <freud-input-text\n [(ngModel)]="searchText"\n placeholder="Digite o nome do ícone"\n rightIcon="freud-icon freud-icon-filter"\n (keyup)="filterIcons($event)"\n ></freud-input-text>\n <ng-container *ngFor="let iconName of iconNames">\n <div\n class="icon-item"\n (click)="clipboard(iconName)"\n title="Send to clipboard"\n >\n <i class="freud-icon freud-icon-{{ iconName }}"></i>\n <span>{{ iconName }}</span>\n </div>\n </ng-container>\n</div>\n',styles:[all_icons_componentngResource_default()]})],AllIconsComponent)},"./stories/icons/all-icons/all-icons.module.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>AllIconsModule});var tslib__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ngx_clipboard__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/ngx-clipboard/fesm2020/ngx-clipboard.mjs"),_all_icons_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./stories/icons/all-icons/all-icons.component.ts"),_freud_ds_web_components__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./projects/web-components/src/public-api.ts"),_angular_forms__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),_angular_common__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs");let AllIconsModule=class AllIconsModule{};AllIconsModule=(0,tslib__WEBPACK_IMPORTED_MODULE_2__.gn)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_3__.NgModule)({declarations:[_all_icons_component__WEBPACK_IMPORTED_MODULE_0__.x],imports:[_angular_common__WEBPACK_IMPORTED_MODULE_4__.CommonModule,ngx_clipboard__WEBPACK_IMPORTED_MODULE_5__.Iq,_freud_ds_web_components__WEBPACK_IMPORTED_MODULE_1__.Jw,_freud_ds_web_components__WEBPACK_IMPORTED_MODULE_1__.My,_angular_forms__WEBPACK_IMPORTED_MODULE_6__.u5],exports:[_all_icons_component__WEBPACK_IMPORTED_MODULE_0__.x]})],AllIconsModule)},"./node_modules/ngx-clipboard/fesm2020/ngx-clipboard.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Iq:()=>ClipboardModule,Yv:()=>ClipboardService});var common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");const WINDOW=new core.InjectionToken("WindowToken","undefined"!=typeof window&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Subject=__webpack_require__("./node_modules/rxjs/_esm5/internal/Subject.js");class ClipboardService{constructor(ngZone,document,window){this.ngZone=ngZone,this.document=document,this.window=window,this.copySubject=new Subject.xQ,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(config){this.config=config}copy(content){if(!this.isSupported||!content)return this.pushCopyResponse({isSuccess:!1,content});const copyResult=this.copyFromContent(content);return copyResult?this.pushCopyResponse({content,isSuccess:copyResult}):this.pushCopyResponse({isSuccess:!1,content})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(element){if(element instanceof HTMLInputElement||element instanceof HTMLTextAreaElement){if(element.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(targetElm,isFocus=!0){try{this.selectTarget(targetElm);const re=this.copyText();return this.clearSelection(isFocus?targetElm:void 0,this.window),re&&this.isCopySuccessInIE11()}catch(error){return!1}}isCopySuccessInIE11(){const clipboardData=this.window.clipboardData;return!(clipboardData&&clipboardData.getData&&!clipboardData.getData("Text"))}copyFromContent(content,container=this.document.body){if(this.tempTextArea&&!container.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{container.appendChild(this.tempTextArea)}catch(error){throw new Error("Container should be a Dom element")}}this.tempTextArea.value=content;const toReturn=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),toReturn}destroy(container=this.document.body){this.tempTextArea&&(container.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(inputElement){return inputElement.select(),inputElement.setSelectionRange(0,inputElement.value.length),inputElement.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(inputElement,window){inputElement&&inputElement.focus(),window.getSelection()?.removeAllRanges()}createTempTextArea(doc,window){const isRTL="rtl"===doc.documentElement.getAttribute("dir");let ta;ta=doc.createElement("textarea"),ta.style.fontSize="12pt",ta.style.border="0",ta.style.padding="0",ta.style.margin="0",ta.style.position="absolute",ta.style[isRTL?"right":"left"]="-9999px";const yPosition=window.pageYOffset||doc.documentElement.scrollTop;return ta.style.top=yPosition+"px",ta.setAttribute("readonly",""),ta}pushCopyResponse(response){this.copySubject.observers.length>0&&this.ngZone.run((()=>{this.copySubject.next(response)}))}pushCopyReponse(response){this.pushCopyResponse(response)}}ClipboardService.ɵfac=function ClipboardService_Factory(t){return new(t||ClipboardService)(core["ɵɵinject"](core.NgZone),core["ɵɵinject"](common.DOCUMENT),core["ɵɵinject"](WINDOW,8))},ClipboardService.ɵprov=core["ɵɵdefineInjectable"]({token:ClipboardService,factory:ClipboardService.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&core["ɵsetClassMetadata"](ClipboardService,[{type:core.Injectable,args:[{providedIn:"root"}]}],(function(){return[{type:core.NgZone},{type:void 0,decorators:[{type:core.Inject,args:[common.DOCUMENT]}]},{type:void 0,decorators:[{type:core.Optional},{type:core.Inject,args:[WINDOW]}]}]}),null);class ClipboardDirective{constructor(ngZone,host,renderer,clipboardSrv){this.ngZone=ngZone,this.host=host,this.renderer=renderer,this.clipboardSrv=clipboardSrv,this.cbOnSuccess=new core.EventEmitter,this.cbOnError=new core.EventEmitter,this.onClick=event=>{this.clipboardSrv.isSupported?this.targetElm&&this.clipboardSrv.isTargetValid(this.targetElm)?this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm),this.targetElm.value,event):this.cbContent&&this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent,this.container),this.cbContent,event):this.handleResult(!1,void 0,event)}}ngOnInit(){this.ngZone.runOutsideAngular((()=>{this.clickListener=this.renderer.listen(this.host.nativeElement,"click",this.onClick)}))}ngOnDestroy(){this.clickListener&&this.clickListener(),this.clipboardSrv.destroy(this.container)}handleResult(succeeded,copiedContent,event){let response={isSuccess:succeeded,content:copiedContent,successMessage:this.cbSuccessMsg,event};succeeded?this.cbOnSuccess.observed&&this.ngZone.run((()=>{this.cbOnSuccess.emit(response)})):this.cbOnError.observed&&this.ngZone.run((()=>{this.cbOnError.emit(response)})),this.clipboardSrv.pushCopyResponse(response)}}ClipboardDirective.ɵfac=function ClipboardDirective_Factory(t){return new(t||ClipboardDirective)(core["ɵɵdirectiveInject"](core.NgZone),core["ɵɵdirectiveInject"](core.ElementRef),core["ɵɵdirectiveInject"](core.Renderer2),core["ɵɵdirectiveInject"](ClipboardService))},ClipboardDirective.ɵdir=core["ɵɵdefineDirective"]({type:ClipboardDirective,selectors:[["","ngxClipboard",""]],inputs:{targetElm:["ngxClipboard","targetElm"],container:"container",cbContent:"cbContent",cbSuccessMsg:"cbSuccessMsg"},outputs:{cbOnSuccess:"cbOnSuccess",cbOnError:"cbOnError"}}),("undefined"==typeof ngDevMode||ngDevMode)&&core["ɵsetClassMetadata"](ClipboardDirective,[{type:core.Directive,args:[{selector:"[ngxClipboard]"}]}],(function(){return[{type:core.NgZone},{type:core.ElementRef},{type:core.Renderer2},{type:ClipboardService}]}),{targetElm:[{type:core.Input,args:["ngxClipboard"]}],container:[{type:core.Input}],cbContent:[{type:core.Input}],cbSuccessMsg:[{type:core.Input}],cbOnSuccess:[{type:core.Output}],cbOnError:[{type:core.Output}]});class ClipboardIfSupportedDirective{constructor(_clipboardService,_viewContainerRef,_templateRef){this._clipboardService=_clipboardService,this._viewContainerRef=_viewContainerRef,this._templateRef=_templateRef}ngOnInit(){this._clipboardService.isSupported&&this._viewContainerRef.createEmbeddedView(this._templateRef)}}ClipboardIfSupportedDirective.ɵfac=function ClipboardIfSupportedDirective_Factory(t){return new(t||ClipboardIfSupportedDirective)(core["ɵɵdirectiveInject"](ClipboardService),core["ɵɵdirectiveInject"](core.ViewContainerRef),core["ɵɵdirectiveInject"](core.TemplateRef))},ClipboardIfSupportedDirective.ɵdir=core["ɵɵdefineDirective"]({type:ClipboardIfSupportedDirective,selectors:[["","ngxClipboardIfSupported",""]]}),("undefined"==typeof ngDevMode||ngDevMode)&&core["ɵsetClassMetadata"](ClipboardIfSupportedDirective,[{type:core.Directive,args:[{selector:"[ngxClipboardIfSupported]"}]}],(function(){return[{type:ClipboardService},{type:core.ViewContainerRef},{type:core.TemplateRef}]}),null);class ClipboardModule{}ClipboardModule.ɵfac=function ClipboardModule_Factory(t){return new(t||ClipboardModule)},ClipboardModule.ɵmod=core["ɵɵdefineNgModule"]({type:ClipboardModule,declarations:[ClipboardDirective,ClipboardIfSupportedDirective],imports:[common.CommonModule],exports:[ClipboardDirective,ClipboardIfSupportedDirective]}),ClipboardModule.ɵinj=core["ɵɵdefineInjector"]({imports:[common.CommonModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&core["ɵsetClassMetadata"](ClipboardModule,[{type:core.NgModule,args:[{imports:[common.CommonModule],declarations:[ClipboardDirective,ClipboardIfSupportedDirective],exports:[ClipboardDirective,ClipboardIfSupportedDirective]}]}],null,null)},"./stories/icons/all-icons/all-icons.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".all-icons-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n}\n.all-icons-container freud-input-text {\n width: 100%;\n margin-bottom: 16px;\n}\n.all-icons-container .icon-item {\n cursor: pointer;\n width: 143.5px;\n margin: 8px;\n padding: 8px;\n border: 1px solid #ddd;\n border-radius: 5px;\n display: flex;\n flex-flow: column;\n align-items: center;\n}\n.all-icons-container .icon-item .freud-icon {\n font-size: 24px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);