Files
server/opt/psa/admin/htdocs/modules/notifier/js/sitejet-promo.js
2026-01-07 20:52:11 +01:00

1 line
11 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
define(["plesk-ui-library"],e=>(()=>{"use strict";var t={280:t=>{t.exports=e}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};r.r(a),r.d(a,{default:()=>v});var o=r(280);const l=function(){return(0,o.createElement)(o.Section,{className:"Section"},(0,o.createElement)("style",null,"\n .List .pul-icon {\n height: 16px;\n }\n .Intro {\n text-align: center;\n margin-bottom: 44px\n }\n "),(0,o.createElement)(o.Paragraph,{className:"Intro"},(0,o.createElement)(o.Text,null,(0,o.createElement)(o.Translate,{content:"infoDialog.description"})),(0,o.createElement)("br",null),(0,o.createElement)(o.Text,null,(0,o.createElement)(o.Translate,{content:"infoDialog.description2"}))),(0,o.createElement)(o.Grid,{md:2,gap:"md"},(0,o.createElement)(o.GridCol,null,(0,o.createElement)(o.Item,{view:"card",className:"List"},(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.dnd"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.websites"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.sections"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.responsive"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.seo"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.dynamic"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.ecommerce"}),(0,o.createElement)("br",null))),(0,o.createElement)(o.GridCol,null,(0,o.createElement)(o.Item,{view:"card",className:"List"},(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.multilang"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.stock"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.image"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.backups"}),(0,o.createElement)("br",null),(0,o.createElement)(o.Icon,{name:"check-mark",size:"12"})," ",(0,o.createElement)(o.Translate,{content:"infoDialog.features.design"}),(0,o.createElement)("br",null),(0,o.createElement)("br",null),(0,o.createElement)(o.Translate,{content:"infoDialog.features.more"}),(0,o.createElement)("br",null)))))};const c=function(e){var t=e.isOpen,n=e.onClose;return(0,o.createElement)(o.Dialog,{isOpen:t,title:(0,o.createElement)(o.Translate,{content:"infoDialog.title"}),size:"md",onClose:n,cancelButton:!1},(0,o.createElement)("style",null,"\n .Content {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n align-items: center;\n max-width: 1475px;\n }\n .Header_image {\n width: 100%;\n max-width: 1475px;\n }\n .Grid_image {\n max-width: 100%;\n margin-bottom: 16px;\n }\n .Section {\n width: 100%;\n max-width: 1000px;\n margin-top: 24px;\n }\n .Section .pul-section__title {\n width: 100%;\n }\n .Section .pul-section__title span {\n width: 100%;\n text-align: center;\n }\n "),(0,o.createElement)("div",{className:"Content"},(0,o.createElement)(o.Section,null,(0,o.createElement)("img",{alt:"",className:"Header_image",src:"/modules/notifier/images/sitejet-promo/dialog/Website-Builder.png"})),(0,o.createElement)(l,{className:"Section"}),(0,o.createElement)(o.Section,{className:"Section"},(0,o.createElement)(o.Grid,{gap:"md",md:3},[3,2,1].map(function(e){return(0,o.createElement)(o.GridCol,null,(0,o.createElement)("img",{alt:"",className:"Grid_image",src:"/modules/notifier/images/sitejet-promo/dialog/screenshots/".concat(e,".png")}))})))))};var i=function(e,t){Jsw.UAT&&Jsw.UAT.dispatchAction(e,t)};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function u(e,t,n){return t=p(t),function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function E(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==m(t)?t:t+""}var g="plesk-ext-notifier-sitejet-promo";const y=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),E(n=u(this,t,[e]),"onBtnClose",function(){i("CLOSE-SJ-BANNER");var e=n.props.data,t=e.clientId,r=e.closeUrl;new Ajax.Request(r,{method:"post",parameters:{id:"sitejetPromo",clientId:t}}),document.getElementById("sitejetPromo").hide()}),E(n,"createWebsite",function(){window.location.replace("/smb/web/add-domain")}),E(n,"openSitejetTemplate",function(e){var t=0===e.domId?e.siteId:e.domId;window.location.replace("/modules/plesk-sitejet/index.php/edit?dom_id=".concat(t,"&site_id=").concat(e.siteId))}),n.state={num:0,dialogIsOpen:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(r=[{key:"tick",value:function(){this.setState(function(e){return{num:(e.num+1)%4}})}},{key:"componentDidMount",value:function(){var e=this;i("SHOW-SJ-BANNER"),this.interval=setInterval(function(){return e.tick()},2500)}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"dialogLearnMore",value:function(){var e=this;return(0,o.createElement)(c,{isOpen:this.state.dialogIsOpen,onClose:function(){return e.setState(function(){return{dialogIsOpen:!1}})}})}},{key:"uatCreateWebsiteButton",value:function(){i("CLICK-SJ-CREATE")}},{key:"render",value:function(){var e=this,t=this.props.data,n=t.canCreateDomains,r=t.domains,a=(0,o.createElement)(o.Menu,null,n?(0,o.createElement)(o.MenuItem,{onClick:this.createWebsite},(0,o.createElement)(o.Translate,{content:"newDomain"})):null,n&&r.length>0?(0,o.createElement)(o.MenuHeader,null,(0,o.createElement)(o.Translate,{content:"menuSplit"})):null,r.map(function(t){return(0,o.createElement)(o.MenuItem,{onClick:function(){return e.openSitejetTemplate(t)}},t.name)}));return(0,o.createElement)(o.Alert,{onClose:this.onBtnClose,className:"".concat(g,"-alert")},(0,o.createElement)(o.Media,{title:(0,o.createElement)(o.Translate,{component:o.Heading,level:2,content:"title"}),image:(0,o.createElement)("img",{alt:"",src:"/modules/notifier/images/sitejet-promo/img".concat(this.state.num,".png"),width:"214",height:"120"})},(0,o.createElement)(o.Paragraph,{className:"".concat(g,"-description")},(0,o.createElement)(o.Translate,{component:o.Heading,level:4,content:"body".concat(this.state.num)})),(0,o.createElement)(o.Columns,{gap:"lg"},(0,o.createElement)(o.Column,null,(0,o.createElement)(o.Dropdown,{menu:a,caret:!1,onClick:this.uatCreateWebsiteButton},(0,o.createElement)(o.Button,{className:"".concat(g,"-button-cta")},(0,o.createElement)(o.Translate,{content:"cta"})))),(0,o.createElement)(o.Column,null,(0,o.createElement)(o.Button,{ghost:!0,className:"".concat(g,"-learn-more"),onClick:function(){return e.setState(function(){return{dialogIsOpen:!0}})}},(0,o.createElement)(o.Translate,{content:"learnMore.button"})),this.dialogLearnMore()))))}}])&&s(n.prototype,r),a&&s(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a}(o.Component);var h=["locale"];const v=function(e,t){var n=e.locale,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,h),a=(0,o.createRoot)(t);return a.render((0,o.createElement)(o.LocaleProvider,{messages:n},(0,o.createElement)(y,r))),a};return a})());