initial
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
|
||||
(()=>{"use strict";var s={n:e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},d:(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},o:(s,e)=>Object.prototype.hasOwnProperty.call(s,e),r:s=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}},e={};s.r(e),s.d(e,{AnalysisList:()=>_,AnalysisResult:()=>w,ContentAnalysis:()=>S,SiteSEOReport:()=>j,renderRatingToColor:()=>I});const t=window.wp.i18n,o=window.yoast.styleGuide,r=window.lodash.noop;var n=s.n(r);const i=window.yoast.propTypes;var l=s.n(i);const a=window.React;var u=s.n(a);const d=window.yoast.styledComponents;var p=s.n(d);const g=window.yoast.componentsNew,c=window.yoast.helpers,m=window.lodash,h=window.ReactJSXRuntime,{stripTagsFromHtmlString:k}=c.strings,B=["a","b","strong","em","i"],b=p().div`
|
||||
display: grid;
|
||||
grid-template-rows: 1fr;
|
||||
max-width: 32px;
|
||||
// This gap value is half the gap value between assessment result list items, which is 12px.
|
||||
gap: 6px;
|
||||
`,C=p().li`
|
||||
// This is the height of the IconButtonToggle.
|
||||
min-height: 24px;
|
||||
margin-bottom: 12px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
gap: 12px;
|
||||
`,x=p()(g.SvgIcon)`
|
||||
margin: 3px 0 0 0;
|
||||
`,y=p().p`
|
||||
margin: 0;
|
||||
flex: 1 1 auto;
|
||||
color: ${s=>s.suppressedText?"rgba(30,30,30,0.5)":"inherit"};
|
||||
`,R=({ariaLabel:s,id:e,className:t,status:o,onClick:r,isPressed:n})=>(0,h.jsx)(g.IconButtonToggle,{marksButtonStatus:o,className:t,onClick:r,id:e,icon:"eye",pressed:n,ariaLabel:s}),f=({ariaLabelMarks:s,ariaLabelEdit:e="",bulletColor:t,buttonIdMarks:o,buttonIdEdit:r="",editButtonClassName:n="",hasAIFixes:i=!1,hasBetaBadgeLabel:l=!1,hasEditButton:u=!1,hasMarksButton:d,id:p="",isPremium:c=!1,marker:f=m.noop,markButtonFactory:w=null,marksButtonStatus:v="enabled",marksButtonClassName:I="",onButtonClickMarks:_,onButtonClickEdit:N=m.noop,onResultChange:A=m.noop,pressed:M,renderHighlightingUpsell:S=m.noop,renderAIOptimizeButton:H=m.noop,shouldUpsellHighlighting:E=!1,suppressedText:T=!1,text:j})=>{const[L,O]=(0,a.useState)(!1),P=(0,a.useCallback)(()=>O(!1),[]),U=(0,a.useCallback)(()=>O(!0),[]);w=w||R;let F=null;return function(s,e){return!s||"hidden"===e}(d,v)||(F=w({onClick:E?U:_,status:v,className:I,id:o,isPressed:M,ariaLabel:s})),(0,a.useEffect)(()=>{A(p,f,d)},[p,f,d]),(0,h.jsxs)(C,{children:[(0,h.jsx)(x,{icon:"circle",color:t,size:"13px"}),(0,h.jsxs)(y,{suppressedText:T,children:[l&&(0,h.jsx)(g.BetaBadge,{}),(0,h.jsx)("span",{dangerouslySetInnerHTML:{__html:k(j,B)}})]}),(0,h.jsxs)(b,{children:[F,S(L,P),u&&c&&(0,h.jsx)(g.IconCTAEditButton,{className:n,onClick:N,id:r,icon:"edit",ariaLabel:e}),H(i,p)]})]})};f.propTypes={text:l().string.isRequired,suppressedText:l().bool,bulletColor:l().string.isRequired,hasMarksButton:l().bool.isRequired,hasEditButton:l().bool,hasAIFixes:l().bool,buttonIdMarks:l().string.isRequired,buttonIdEdit:l().string,pressed:l().bool.isRequired,ariaLabelMarks:l().string.isRequired,ariaLabelEdit:l().string,onButtonClickMarks:l().func.isRequired,onButtonClickEdit:l().func,marksButtonStatus:l().string,marksButtonClassName:l().string,markButtonFactory:l().func,editButtonClassName:l().string,hasBetaBadgeLabel:l().bool,isPremium:l().bool,onResultChange:l().func,id:l().string,marker:l().oneOfType([l().func,l().array]),shouldUpsellHighlighting:l().bool,renderHighlightingUpsell:l().func,renderAIOptimizeButton:l().func};const w=f,v=p().ul`
|
||||
margin: 8px 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
`;function I(s){switch(s){case"good":return o.colors.$color_good;case"OK":return o.colors.$color_ok;case"bad":return o.colors.$color_bad;default:return o.colors.$color_score_icon}}function _({results:s,marksButtonActivatedResult:e="",marksButtonStatus:o="enabled",marksButtonClassName:r="",editButtonClassName:i="",markButtonFactory:l=null,onMarksButtonClick:a=n(),onEditButtonClick:u=n(),isPremium:d=!1,onResultChange:p=n(),shouldUpsellHighlighting:g=!1,renderHighlightingUpsell:c=n(),renderAIOptimizeButton:m=n()}){return(0,h.jsx)(v,{role:"list",children:s.map(s=>{const n=I(s.rating),k=s.markerId===e,B=s.editFieldName,b=s.id+"Mark",C=B+"Edit";let x="";x="disabled"===o?(0,t.__)("Highlighting is currently disabled","wordpress-seo"):k?(0,t.__)("Remove highlight from the text","wordpress-seo"):(0,t.__)("Highlight this result in the text","wordpress-seo");const y=s.editFieldAriaLabel;return(0,h.jsx)(w,{id:s.id,text:s.text,marker:s.marker,bulletColor:n,hasMarksButton:s.hasMarks,hasEditButton:s.hasJumps,hasAIFixes:s.hasAIFixes,ariaLabelMarks:x,ariaLabelEdit:y,pressed:k,suppressedText:"upsell"===s.rating,buttonIdMarks:b,buttonIdEdit:C,onButtonClickMarks:()=>a(s.id,s.marker),onButtonClickEdit:s=>u(B,s),marksButtonClassName:r,editButtonClassName:i,marksButtonStatus:o,hasBetaBadgeLabel:s.hasBetaBadge,isPremium:d,onResultChange:p,markButtonFactory:l,shouldUpsellHighlighting:g,renderAIOptimizeButton:m,renderHighlightingUpsell:c},s.id)})})}_.propTypes={results:l().array.isRequired,marksButtonActivatedResult:l().string,marksButtonStatus:l().string,marksButtonClassName:l().string,editButtonClassName:l().string,markButtonFactory:l().func,onMarksButtonClick:l().func,onEditButtonClick:l().func,isPremium:l().bool,onResultChange:l().func,shouldUpsellHighlighting:l().bool,renderHighlightingUpsell:l().func,renderAIOptimizeButton:l().func};const N=p().div`
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
border-bottom: 1px solid transparent; // Avoid parent and child margin collapsing.
|
||||
`,A=p()(g.Collapsible)`
|
||||
margin-bottom: 8px;
|
||||
|
||||
${g.StyledIconsButton} {
|
||||
padding: 8px 0;
|
||||
color: ${o.colors.$color_blue};
|
||||
margin: -2px 8px 0 -2px; // Compensate icon size set to 18px.
|
||||
}
|
||||
`;class M extends u().Component{renderCollapsible(s,e,t,r=null){return(0,h.jsx)(A,{id:r?`${r}-collapsible`:null,initialIsOpen:!0,title:`${s} (${t.length})`,prefixIcon:{icon:"angle-up",color:o.colors.$color_grey_dark,size:"18px"},prefixIconCollapsed:{icon:"angle-down",color:o.colors.$color_grey_dark,size:"18px"},suffixIcon:null,suffixIconCollapsed:null,headingProps:{level:e,fontSize:"13px",fontWeight:"500",color:"#1e1e1e"},children:(0,h.jsx)(_,{results:t,marksButtonActivatedResult:this.props.activeMarker,marksButtonStatus:this.props.marksButtonStatus,marksButtonClassName:this.props.marksButtonClassName,editButtonClassName:this.props.editButtonClassName,markButtonFactory:this.props.markButtonFactory,onMarksButtonClick:this.props.onMarkButtonClick,onEditButtonClick:this.props.onEditButtonClick,renderAIOptimizeButton:this.props.renderAIOptimizeButton,isPremium:this.props.isPremium,onResultChange:this.props.onResultChange,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderHighlightingUpsell:this.props.renderHighlightingUpsell})})}render(){const{problemsResults:s,improvementsResults:e,goodResults:o,considerationsResults:r,errorsResults:n,upsellResults:i,headingLevel:l,resultCategoryLabels:a,id:u}=this.props,d=n.length,p=s.length,g=e.length,c=r.length,m=o.length,k=i.length,B={errors:(0,t.__)("Errors","wordpress-seo"),problems:(0,t.__)("Problems","wordpress-seo"),improvements:(0,t.__)("Improvements","wordpress-seo"),considerations:(0,t.__)("Considerations","wordpress-seo"),goodResults:(0,t.__)("Good results","wordpress-seo")},b=Object.assign(B,a);return(0,h.jsxs)(N,{children:[d>0&&this.renderCollapsible(b.errors,l,n),p+k>0&&this.renderCollapsible(b.problems,l,[...i,...s],u?`${u}-problems`:null),g>0&&this.renderCollapsible(b.improvements,l,e),c>0&&this.renderCollapsible(b.considerations,l,r),m>0&&this.renderCollapsible(b.goodResults,l,o)]})}}M.propTypes={onMarkButtonClick:l().func,onEditButtonClick:l().func,problemsResults:l().array,improvementsResults:l().array,goodResults:l().array,considerationsResults:l().array,errorsResults:l().array,upsellResults:l().array,headingLevel:l().number,marksButtonStatus:l().string,marksButtonClassName:l().string,markButtonFactory:l().func,editButtonClassName:l().string,activeMarker:l().string,isPremium:l().bool,resultCategoryLabels:l().shape({errors:l().string,problems:l().string,improvements:l().string,considerations:l().string,goodResults:l().string}),onResultChange:l().func,shouldUpsellHighlighting:l().bool,renderHighlightingUpsell:l().func,renderAIOptimizeButton:l().func,id:l().string},M.defaultProps={onMarkButtonClick:()=>{},onEditButtonClick:()=>{},problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[],errorsResults:[],upsellResults:[],headingLevel:4,marksButtonStatus:"enabled",marksButtonClassName:"",markButtonFactory:null,editButtonClassName:"",activeMarker:"",isPremium:!1,resultCategoryLabels:{},onResultChange:()=>{},shouldUpsellHighlighting:!1,renderHighlightingUpsell:()=>{},renderAIOptimizeButton:()=>{},id:""};const S=M,H=p().div`
|
||||
`,E=p().p`
|
||||
font-size: 14px;
|
||||
`,T=({className:s="seo-assessment",seoAssessmentText:e="SEO Assessment",seoAssessmentItems:t=null,barHeight:o="24px"})=>(0,h.jsxs)(H,{className:s,children:[(0,h.jsx)(E,{className:`${s}__text`,children:e}),(0,h.jsx)(g.StackedProgressBar,{className:"progress",items:t,barHeight:o}),(0,h.jsx)(g.ScoreAssessments,{className:"assessments",items:t})]});T.propTypes={className:l().string,seoAssessmentText:l().string,seoAssessmentItems:l().arrayOf(l().shape({html:l().string.isRequired,value:l().number.isRequired,color:l().string.isRequired})),barHeight:l().string};const j=T;(window.yoast=window.yoast||{}).analysisReport=e})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(()=>{"use strict";var e,s={};e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.isFeatureEnabled=e.enabledFeatures=e.enableFeatures=void 0,e.isFeatureEnabled=function(e){return!!self.wpseoFeatureFlags&&self.wpseoFeatureFlags.includes(e)},e.enableFeatures=function(e){self.wpseoFeatureFlags||(self.wpseoFeatureFlags=[]),e.forEach(e=>{self.wpseoFeatureFlags.includes(e)||self.wpseoFeatureFlags.push(e)})},e.enabledFeatures=function(){return self.wpseoFeatureFlags||[]},(window.yoast=window.yoast||{}).featureFlag=s})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(()=>{var e={2694(e,r,t){"use strict";var o=t(6925);function n(){}function p(){}p.resetWarningCache=n,e.exports=function(){function e(e,r,t,n,p,s){if(s!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:p,resetWarningCache:n};return t.PropTypes=t,t}},5556(e,r,t){e.exports=t(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},r={},t=function t(o){var n=r[o];if(void 0!==n)return n.exports;var p=r[o]={exports:{}};return e[o](p,p.exports,t),p.exports}(5556);(window.yoast=window.yoast||{}).propTypes=t})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
+86
File diff suppressed because one or more lines are too long
+293
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user