PageSourceSearch

https://www.debugbear.com/cdn/chunk-bulk-edit.3300d4cd3034c05b0107.js

js debugbear.com collected 2026-09-24 08:55:26 UTC 12,547 bytes, 1 lines download raw bytes

1"use strict";(("undefined"==typeof window?self:window).webpackChunkdebugbear_gae=("undefined"==typeof window?self:window).webpackChunkdebugbear_gae||[]).push([[9148],{21758(e,t,n){n.r(t),n.d(t,{BulkEditUI:()=>Y}),n(62953);var a=n(44952),s=n(64997),l=n(73074),i=n(92268),d=n(24101),r=n(93925),o=n(74848);const c=e=>{let t=e.value,n=e.knownAdvancedSettings,a=e.onChange;const s=n.map(e=>({value:e.id,label:e.name})),l=t.map(e=>({value:e.id,label:e.name}));return(0,o.jsx)(i.l,{options:s,isMulti:!0,value:l,onChange:e=>{a((e||[]).map(e=>n.find(t=>t.id===e.value)))},placeholder:"Add advanced settings…",styles:{menu:e=>({...e,zIndex:10}),...r.d},theme:d.D})},u=e=>{let t=e.value,n=e.onChange;return(0,o.jsx)(i.l,{options:[],isMulti:!0,value:t.map(e=>({value:e.id,label:e.name})),onChange:e=>{n(e||[])},placeholder:"No advanced settings to remove…",components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null},isClearable:!1,menuIsOpen:!1,isSearchable:!1,styles:{menu:e=>({...e,zIndex:10}),...r.d},theme:d.D})};var h=n(39280),g=n(74334),m=n(47490),p=n(19158),v=n(89512),j=n(23568),f=n(67707),b=n(67303),x=n(63059),y=n(58233),S=n(2543),w=n(96540),C=n(76213),A=n(85072),k=n.n(A),N=n(97825),T=n.n(N),P=n(77659),U=n.n(P),I=n(55056),O=n.n(I),F=n(10540),M=n.n(F),L=n(41113),_=n.n(L),D=n(70913),q={};q.styleTagTransform=_(),q.setAttributes=O(),q.insert=U().bind(null,"head"),q.domAPI=T(),q.insertStyleElement=M(),k()(D.A,q),D.A&&D.A.locals&&D.A.locals;var E=n(67122),V=n(90317),Q=n(20966),z=n(65363);function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,s,l,i,d=[],r=!0,o=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;r=!1}else for(;!(r=(a=l.call(n)).done)&&(d.push(a.value),d.length!==t);r=!0);}catch(e){o=!0,s=e}finally{try{if(!r&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(o)throw s}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return J(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function R(e){var t;let n=e.pages,s=e.onClose,l=e.onTransferred;const i=(0,E.A)(e=>e.userProjects),c=B(w.useState(null),2),u=c[0],h=c[1],g=B(w.useState(null),2),p=g[0],v=g[1],j=i.map(e=>({value:e.id,label:e.name}));return(0,o.jsxs)(Q.a,{isOpen:!0,onClose:s,contentStyle:{zIndex:9999,overflow:"show"},shouldCloseOnOverlayClick:!0,children:[u&&(0,o.jsxs)("div",{className:"text-center",children:[(0,o.jsxs)("div",{className:"d-flex align-items-center justify-content-center mb-3",children:[(0,o.jsx)(V.P,{fill:"green"}),(0,o.jsxs)("p",{className:"scale-5 ml-2 mb-0",children:["Your pages have been transferred to"," ",(0,o.jsx)(C.N_,{to:`/project/${p}/`,children:null===(t=i.find(e=>e.id==p))||void 0===t?void 0:t.name})]})]}),(0,o.jsx)("button",{onClick:s,className:"btn btn-primary",style:{minWidth:150,textAlign:"center"},children:"OK"})]}),null==u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h2",{children:"Transfer Pages to another Project"}),(0,o.jsx)("p",{children:"The following pages will be transferred:"}),(0,o.jsxs)("ul",{children:[n.slice(0,2).map(e=>(0,o.jsx)("li",{children:e.name},e.id)),n.length>2&&(0,o.jsxs)("li",{children:["And ",n.length-2," other page(s)..."]})]}),(0,o.jsx)("p",{children:"To the project:"}),(0,o.jsx)(y.l1,{initialValues:{project:null},onSubmit:async()=>{(await a.FH.transferPagesToProject(n.map(e=>e.id),p)).success&&(h(!0),l())},children:e=>{let t=e.handleSubmit,a=e.isSubmitting;return(0,o.jsxs)("form",{onSubmit:t,style:{maxWidth:"none"},children:[(0,o.jsx)(z.A,{options:j,name:"project",placeholder:"Select destination project",onChange:e=>{var t;return v(null!==(t=null==e?void 0:e.value)&&void 0!==t?t:null)},styles:{menu:e=>({...e,zIndex:10}),...r.d},theme:d.D,classNamePrefix:"react-select",className:"react-select-container"}),(0,o.jsx)(m.J,{title:`Transfer ${n.length} Pages`,isSubmitting:a,disabled:!p})]})}})]})]})}n(16491);const $=[{title:"Frequency",value:"frequency"},{title:"Region",value:"region"},{title:"Tags",value:"tags"},{title:"Advanced Settings",value:"advancedSettings"},{title:"Title",value:"title"},{title:"URL",value:"url"}];class Y extends w.Component{constructor(){var e,t,n;
1super(...arguments),e=this,n={analysisQuotaAndPredictedUsage:null,showTransferModal:!1,editField:"frequency"},(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="state"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}componentDidMount(){a.FH.getBillingCustomerAnalysisQuotaAndPredictedUsage(this.props.project.id).then(e=>{this.setState({analysisQuotaAndPredictedUsage:e})})}render(){const e=this.props,t=e.bulkUpdatePageLoads,n=e.project,a=e.proposedChanges,d=e.onClickBulkDelete,r=e.onUpdateProposedChanges,c=e.isSaving,u=e.saveChanges,h=e.onClickCancel,x=e.onTransferredPages,w=this.state.analysisQuotaAndPredictedUsage,A=w?(0,b.FV)({predictedScheduledMonthlyAnalyses:w.predictedUsage,project:this.props.project,projectPageLoads:n.pageLoads,newOrUpdatedPageLoads:t.map(e=>(e={...e},a.testScheduleIds&&(e.pageTestSchedules=a.testScheduleIds.map(t=>({pageId:e.id,testScheduleId:t,testSchedule:n.testSchedules.find(e=>e.id===t)}))),e))}):{project:0,account:0},k=!!w&&A.account>w.quota,N=!!n.analysisQuota&&A.project>n.analysisQuota,T=N||k,P=function(e,t){let n=[];for(const s of e){var a;let e={id:s.id};const l=t.testScheduleIds[0];void 0!==l&&l!==(null===(a=s.pageTestSchedules[0])||void 0===a?void 0:a.id)&&(e.testScheduleIds=[l]);let i=[...s.tags];for(const e of t.addedTags)s.tags.includes(e)||i.push(e);i=i.filter(e=>!t.removedTags.includes(e)),i=(0,S.sortBy)(i,e=>e),JSON.stringify(i)!==JSON.stringify((0,S.sortBy)(s.tags,e=>e))&&(e.tags=i);const d=s.pageAdvancedSettings.map(e=>e.advancedSetting);let r=[...d];for(const e of t.addedAdvancedSettings)d.find(t=>t.id===e.id)||r.push(e);r=r.filter(e=>!t.removedAdvancedSettings.find(t=>t.id===e.id)).filter(e=>e),JSON.stringify(r)!==JSON.stringify(d)&&(e.advancedSettingIds=r.map(e=>e.id)),t.url&&t.url!==s.url&&(e.url=t.url),t.name&&t.name!==s.name&&(e.name=t.name),t.region&&t.region!==s.region&&(e.region=t.region),Object.keys(e).length>1&&n.push(e)}return n}(t,a),U=(0,o.jsx)(H,{onUpdateProposedChanges:r,proposedChanges:a,bulkUpdatePageLoads:t,project:n}),I=(0,o.jsx)(W,{onUpdateProposedChanges:r,proposedChanges:a,bulkUpdatePageLoads:t,project:n});return(0,o.jsxs)("div",{className:"bulk-edit-ui__form-container top-section-border-bottom",children:[(0,o.jsx)(y.l1,{initialValues:{url:""},onSubmit:async(e,t)=>{let n=t.resetForm;await u(P),n()},children:e=>{let u=e.handleSubmit,b=e.setFieldValue;return(0,o.jsxs)("form",{onSubmit:u,className:"special-form extra-special-form",children:[(0,o.jsx)(l.A,{}),(0,o.jsxs)("div",{className:"bulk-edit-ui__form-header",children:[(0,o.jsxs)("h2",{style:{fontSize:16,display:"inline-block"},children:["Bulk Edit"," "]}),(0,o.jsxs)("div",{children:[n.canManageUsers&&(0,o.jsx)("button",{className:"btn btn-sm mr-2",disabled:0==t.length,onClick:()=>this.setState({showTransferModal:!0}),children:"Transfer Pages"}),(0,o.jsxs)("button",{className:"btn btn-danger btn-sm",disabled:0==t.length||c,onClick:d,onMouseEnter:()=>{r({...a,maybeDelete:!0})},onMouseLeave:()=>{r({...a,maybeDelete:!1})},type:"button","data-test-bulk-delete-pages":!0,children:["Delete ",t.length," ",t.length>1?"Pages":"Page"]})]})]}),N&&(0,o.jsxs)("div",{className:"alert alert-warning",style:{marginTop:10},children:["Your project quota is set to ",n.analysisQuota," tests a month and you're projected to use"," ",A.project,"."," ",(0,o.jsx)(C.N_,{to:"/account/projects",children:"Adjust your project settings."})]}),k&&w&&(0,o.jsxs)("div",{className:"alert alert-warning",style:{marginTop:10},children:["Your current plan allows up to"," ",w.quota," tests a month and you're projected to use ",A.account,"."]}),(0,o.jsx)("div",{className:"mb-3","data-test-bulk-edit-field":!0,children:(0,o.jsx)(p.L,{options:$,optionValue:this.state.editField,onSelectOption:e=>this.setState({editField:e})})}),"title"===this.state.editField&&(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-md-6",children:(0,o.jsx)(g.u,{name:"name",label:"Title",style:{width:"100%"},showValidationMessage:!0,onChange:e=>{b("name",e.target.value),r({...a,name:e.target.value})}})})}),"url"===this.state.editField&&(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-md-6",children:(0,o.jsx)(g.u,{name:"url",label:"URL",style:{width:"100%"},showValidationMessage:!0,validate:f.qo,onChange:e=>{b("url",e.target.value),r({...a,url:e.target.value})}})})}),"frequency"===this.state.editField&&(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-md-6",children:(0,o.jsx)(s.D,{onSelectTestSchedules:e=>{r({...a,testScheduleIds:e})}})})}),"region"===this.state.editField&&(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col-md-6",children:[(0,o.jsx)("label",{children:"Region"}),(0,o.jsx)("div",{"data-test-bulk-region":!0,children:(0,o.jsx)(i.l,{options:j.T8,getOptionLabel:e=>e.name,getOptionValue:e=>e.value,value:j.T8.find(e=>e.value===a.region)||null,components:v.XL,menuPortalTarget:document.body,styles:{menuPortal:e=>({...e,zIndex:9999})},onChange:e=>{r({...a,region:null==e?void 0:e.value})}})})]})}),"tags"===this.state.editField&&U,"advancedSettings"===this.state.editField&&I,(0,o.jsx)("div",{style:{marginTop:10},children:(0,o.jsx)(m.J,{disabled:0===P.length||T,title:0===P.length?"No changes to save":`Update ${P.length} Page${P.length>
11?"s":""}`,isSubmitting:c,testName:"save-bulk-changes",children:(0,o.jsx)("button",{type:"button",className:"btn btn-text btn-link",onClick:h,style:{padding:0},children:"Cancel"})})})]})}}),this.state.showTransferModal&&(0,o.jsx)(R,{pages:t,onTransferred:x,onClose:()=>this.setState({showTransferModal:!1})})]})}}function H(e){let t=e.onUpdateProposedChanges,n=e.bulkUpdatePageLoads,a=e.proposedChanges,s=e.project;const l=(0,x.M)(n),i=l.filter(e=>!a.removedTags.includes(e)),d=(0,x.M)(s.pageLoads);return(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"col-md-6",children:[(0,o.jsx)("label",{children:"Remove Tags"}),(0,o.jsx)("div",{"data-test-bulk-remove-tags":!0,children:(0,o.jsx)(h.G,{value:i,onChange:e=>t({...a,removedTags:l.filter(t=>!e.includes(t))})})})]}),(0,o.jsxs)("div",{className:"col-md-6",children:[(0,o.jsx)("label",{children:"Add Tags"}),(0,o.jsx)("div",{"data-test-bulk-add-tags":!0,children:(0,o.jsx)(h.C,{value:a.addedTags,knownTags:d,onChange:e=>{t({...a,addedTags:e})}})})]})]})}function W(e){let t=e.onUpdateProposedChanges,n=e.bulkUpdatePageLoads,a=e.proposedChanges,s=e.project;const l=function(e){const t=[];return e.forEach(e=>{e.pageAdvancedSettings.map(e=>e.advancedSetting).forEach(e=>{e&&!t.find(t=>t.id===e.id)&&t.push(e)})}),t}(n),i=l.filter(e=>!a.removedAdvancedSettings.find(t=>t.id===e.id));return(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"col-md-6",children:[(0,o.jsx)("label",{children:"Remove Advanced Settings"}),(0,o.jsx)("div",{"data-test-bulk-remove-tags":!0,children:(0,o.jsx)(u,{value:i,onChange:e=>{const n=l.filter(t=>!e.find(e=>e.value===t.id));t({...a,removedAdvancedSettings:n})}})})]}),(0,o.jsxs)("div",{className:"col-md-6",children:[(0,o.jsx)("label",{children:"Add Advanced Settings"}),(0,o.jsx)("div",{"data-test-bulk-add-tags":!0,children:(0,o.jsx)(c,{value:a.addedAdvancedSettings,knownAdvancedSettings:s.advancedSettings,onChange:e=>{t({...a,addedAdvancedSettings:e})}})})]})]})}},70913(e,t,n){var a=n(31601),s=n.n(a),l=n(76314),i=n.n(l)()(s());i.push([e.id,".bulk-edit-ui__form-header{align-items:center;display:flex;justify-content:space-between}.bulk-edit-ui__form-header h2{margin:0}.bulk-edit-ui__form-container{padding:15px;margin-bottom:15px;border-radius:4px}",""]);const d=i;n.d(t,["A",0,d])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.