hoodcms 5.0.14 → 6.0.1
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/dist/css/login.css +1 -1
- package/dist/js/admin/ContentController.d.ts +30 -0
- package/dist/js/admin/ContentController.js +188 -0
- package/dist/js/admin/ContentTypeController.d.ts +15 -0
- package/dist/js/admin/ContentTypeController.js +140 -0
- package/dist/js/admin/HomeController.d.ts +17 -0
- package/dist/js/admin/HomeController.js +111 -0
- package/dist/js/admin/LogsController.d.ts +6 -0
- package/dist/js/admin/LogsController.js +14 -0
- package/dist/js/admin/MediaController.d.ts +7 -0
- package/dist/js/admin/MediaController.js +29 -0
- package/dist/js/admin/PropertyController.d.ts +18 -0
- package/dist/js/admin/PropertyController.js +118 -0
- package/dist/js/admin/PropertyImporter.d.ts +31 -0
- package/dist/js/admin/PropertyImporter.js +95 -0
- package/dist/js/admin/ThemesController.d.ts +8 -0
- package/dist/js/admin/ThemesController.js +37 -0
- package/dist/js/admin/UsersController.d.ts +17 -0
- package/dist/js/admin/UsersController.js +176 -0
- package/dist/js/admin.js +23 -5
- package/dist/js/app/PropertyService.d.ts +46 -0
- package/{src/ts/app/PropertyController.ts → dist/js/app/PropertyService.js} +44 -76
- package/dist/js/app.js +23 -5
- package/dist/js/app.property.js +24 -0
- package/dist/js/core/DataList.js +25 -3
- package/dist/js/core/HoodApi.d.ts +17 -7
- package/dist/js/core/HoodApi.js +71 -10
- package/dist/js/core/Validator.js +1 -1
- package/dist/js/index.d.ts +10 -1
- package/dist/js/index.js +12 -1
- package/dist/js/login.js +1 -1
- package/images/hood-small.png +0 -0
- package/images/hood.png +0 -0
- package/package.json +108 -108
- package/src/css/admin.css +0 -3
- package/src/css/admin.css.map +1 -1
- package/src/css/app.css +0 -3
- package/src/css/app.css.map +1 -1
- package/src/css/login.css +165 -0
- package/src/css/login.css.map +1 -1
- package/src/html/auth0/login.html +100 -0
- package/src/html/auth0/passwordless-email.html +184 -0
- package/src/js/admin.js +43455 -1820
- package/src/js/admin.js.map +1 -1
- package/src/js/app.js +41910 -906
- package/src/js/app.js.map +1 -1
- package/src/js/app.property.js +1169 -0
- package/src/js/app.property.js.map +1 -0
- package/src/js/login.js +1 -1
- package/src/scss/core/_images.scss +48 -48
- package/src/scss/login.scss +1 -0
- package/src/ts/admin.ts +3 -0
- package/src/ts/app/PropertyService.ts +202 -0
- package/src/ts/app.property.ts +20 -0
- package/src/ts/app.ts +3 -81
- package/src/ts/core/DataList.ts +27 -4
- package/src/ts/core/HoodApi.ts +96 -14
- package/src/ts/core/Validator.ts +1 -1
- package/src/ts/index.ts +14 -1
- package/temp.txt +1 -0
- package/dist/js/core/BaseSite.d.ts +0 -6
- package/dist/js/core/BaseSite.js +0 -14
- package/src/ts/core/BaseSite.ts +0 -21
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* hoodcms v6.0.1
|
|
3
|
+
* A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
|
|
4
|
+
* Written by George Whysall, 2022
|
|
5
|
+
* Released under the GPL-3.0 License.
|
|
6
|
+
*/
|
|
7
|
+
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('sweetalert2'),require('@simonwep/pickr'),require('tinymce/tinymce'),require('bootstrap'),require('chart.js')):typeof define==='function'&&define.amd?define(['exports','sweetalert2','@simonwep/pickr','tinymce/tinymce','bootstrap','chart.js'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.hood={},g.swal));})(this,(function(exports,swal){'use strict';function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var swal__default=/*#__PURE__*/_interopDefaultLegacy(swal);/*! *****************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
var extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);},extendStatics(t,e)};function __extends(t,e){function r(){this.constructor=t;}extendStatics(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r);}var __assign=function(){return __assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},__assign.apply(this,arguments)};"function"!=typeof Object.create&&(Object.create=function(t){function o(){}return o.prototype=t,new o}),function(t,o,i,s){var n={_positionClasses:["bottom-left","bottom-right","top-right","top-left","bottom-center","top-center","mid-center"],_defaultIcons:["success","error","info","warning"],init:function(o,i){this.prepareOptions(o,t.toast.options),this.process();},prepareOptions:function(o,i){var s={};"string"==typeof o||o instanceof Array?s.text=o:s=o,this.options=t.extend({},i,s);},process:function(){this.setup(),this.addToDom(),this.position(),this.bindToast(),this.animate();},setup:function(){var o="";if(this._toastEl=this._toastEl||t("<div></div>",{class:"jq-toast-single"}),o+='<span class="jq-toast-loader"></span>',this.options.allowToastClose&&(o+='<span class="close-jq-toast-single">×</span>'),this.options.text instanceof Array){this.options.heading&&(o+='<h2 class="jq-toast-heading">'+this.options.heading+"</h2>"),o+='<ul class="jq-toast-ul">';for(var i=0;i<this.options.text.length;i++)o+='<li class="jq-toast-li" id="jq-toast-item-'+i+'">'+this.options.text[i]+"</li>";o+="</ul>";}else this.options.heading&&(o+='<h2 class="jq-toast-heading">'+this.options.heading+"</h2>"),o+=this.options.text;this._toastEl.html(o),!1!==this.options.bgColor&&this._toastEl.css("background-color",this.options.bgColor),!1!==this.options.textColor&&this._toastEl.css("color",this.options.textColor),this.options.textAlign&&this._toastEl.css("text-align",this.options.textAlign),!1!==this.options.icon&&(this._toastEl.addClass("jq-has-icon"),-1!==t.inArray(this.options.icon,this._defaultIcons)&&this._toastEl.addClass("jq-icon-"+this.options.icon)),!1!==this.options.class&&this._toastEl.addClass(this.options.class);},position:function(){"string"==typeof this.options.position&&-1!==t.inArray(this.options.position,this._positionClasses)?"bottom-center"===this.options.position?this._container.css({left:t(o).outerWidth()/2-this._container.outerWidth()/2,bottom:20}):"top-center"===this.options.position?this._container.css({left:t(o).outerWidth()/2-this._container.outerWidth()/2,top:20}):"mid-center"===this.options.position?this._container.css({left:t(o).outerWidth()/2-this._container.outerWidth()/2,top:t(o).outerHeight()/2-this._container.outerHeight()/2}):this._container.addClass(this.options.position):"object"==typeof this.options.position?this._container.css({top:this.options.position.top?this.options.position.top:"auto",bottom:this.options.position.bottom?this.options.position.bottom:"auto",left:this.options.position.left?this.options.position.left:"auto",right:this.options.position.right?this.options.position.right:"auto"}):this._container.addClass("bottom-left");},bindToast:function(){var t=this;this._toastEl.on("afterShown",(function(){t.processLoader();})),this._toastEl.find(".close-jq-toast-single").on("click",(function(o){o.preventDefault(),"fade"===t.options.showHideTransition?(t._toastEl.trigger("beforeHide"),t._toastEl.fadeOut((function(){t._toastEl.trigger("afterHidden");}))):"slide"===t.options.showHideTransition?(t._toastEl.trigger("beforeHide"),t._toastEl.slideUp((function(){t._toastEl.trigger("afterHidden");}))):(t._toastEl.trigger("beforeHide"),t._toastEl.hide((function(){t._toastEl.trigger("afterHidden");})));})),"function"==typeof this.options.beforeShow&&this._toastEl.on("beforeShow",(function(){t.options.beforeShow();})),"function"==typeof this.options.afterShown&&this._toastEl.on("afterShown",(function(){t.options.afterShown();})),"function"==typeof this.options.beforeHide&&this._toastEl.on("beforeHide",(function(){t.options.beforeHide();})),"function"==typeof this.options.afterHidden&&this._toastEl.on("afterHidden",(function(){t.options.afterHidden();}));},addToDom:function(){var o=t(".jq-toast-wrap");if(0===o.length?(o=t("<div></div>",{class:"jq-toast-wrap"}),t("body").append(o)):(!this.options.stack||isNaN(parseInt(this.options.stack,10)))&&o.empty(),o.find(".jq-toast-single:hidden").remove(),o.append(this._toastEl),this.options.stack&&!isNaN(parseInt(this.options.stack),10)){var i=o.find(".jq-toast-single").length-this.options.stack;i>0&&t(".jq-toast-wrap").find(".jq-toast-single").slice(0,i).remove();}this._container=o;},canAutoHide:function(){return !1!==this.options.hideAfter&&!isNaN(parseInt(this.options.hideAfter,10))},processLoader:function(){if(!this.canAutoHide()||!1===this.options.loader)return !1;var t=this._toastEl.find(".jq-toast-loader"),o=(this.options.hideAfter-400)/1e3+"s",i=this.options.loaderBg,s=t.attr("style")||"";s=s.substring(0,s.indexOf("-webkit-transition")),s+="-webkit-transition: width "+o+" ease-in; -o-transition: width "+o+" ease-in; transition: width "+o+" ease-in; background-color: "+i+";",t.attr("style",s).addClass("jq-toast-loaded");},animate:function(){var t=this;if(this._toastEl.hide(),this._toastEl.trigger("beforeShow"),"fade"===this.options.showHideTransition.toLowerCase()?this._toastEl.fadeIn((function(){t._toastEl.trigger("afterShown");})):"slide"===this.options.showHideTransition.toLowerCase()?this._toastEl.slideDown((function(){t._toastEl.trigger("afterShown");})):this._toastEl.show((function(){t._toastEl.trigger("afterShown");})),this.canAutoHide()){t=this;o.setTimeout((function(){"fade"===t.options.showHideTransition.toLowerCase()?(t._toastEl.trigger("beforeHide"),t._toastEl.fadeOut((function(){t._toastEl.trigger("afterHidden");}))):"slide"===t.options.showHideTransition.toLowerCase()?(t._toastEl.trigger("beforeHide"),t._toastEl.slideUp((function(){t._toastEl.trigger("afterHidden");}))):(t._toastEl.trigger("beforeHide"),t._toastEl.hide((function(){t._toastEl.trigger("afterHidden");})));}),this.options.hideAfter);}},reset:function(o){"all"===o?t(".jq-toast-wrap").remove():this._toastEl.remove();},update:function(t){this.prepareOptions(t,this.options),this.setup(),this.bindToast();}};t.toast=function(t){var o=Object.create(n);return o.init(t,this),{reset:function(t){o.reset(t);},update:function(t){o.update(t);}}},t.toast.options={text:"",heading:"",showHideTransition:"fade",allowToastClose:!0,hideAfter:3e3,loader:!0,loaderBg:"#9EC600",stack:5,position:"bottom-left",bgColor:!1,textColor:!1,textAlign:"left",icon:!1,beforeShow:function(){},afterShown:function(){},beforeHide:function(){},afterHidden:function(){}};}(jQuery,window);var BootstrapSwal=swal__default["default"].mixin({customClass:{confirmButton:"btn btn-success m-1 px-3",cancelButton:"btn btn-danger m-1 px-3"},buttonsStyling:!1}),Alerts=function(){function o(){}return o.log=function(o,t){if(void 0===t&&(t="message"),document.body.classList.contains("dev-mode"))switch(t){case"error":console.error(o);break;case"message":console.log(o);break;case"warning":console.warn(o);break;case"info":console.info(o);}},o.error=function(o,t,e){void 0===t&&(t=null),void 0===e&&(e=null),$.toast({heading:t,text:o,icon:"error",position:"bottom-left",loader:!1,bgColor:"#d0100b",textColor:"white",hideAfter:e});},o.warning=function(o,t,e){void 0===t&&(t=null),void 0===e&&(e=null),$.toast({heading:t,text:o,icon:"error",position:"bottom-left",loader:!1,bgColor:"#ef9007",textColor:"white",hideAfter:e});},o.message=function(o,t,e){void 0===t&&(t=null),void 0===e&&(e=null),$.toast({heading:t,text:o,icon:"error",position:"bottom-left",loader:!1,bgColor:"#222222",textColor:"white",hideAfter:e});},o.success=function(o,t,e){void 0===t&&(t=null),void 0===e&&(e=null),$.toast({heading:t,text:o,icon:"error",position:"bottom-left",loader:!1,bgColor:"#28a745",textColor:"white",hideAfter:e});},o.alert=function(t,e,n,i){switch(void 0===e&&(e=null),void 0===n&&(n="info"),void 0===i&&(i=1e4),n){case"error":o.error(t,e,i);break;case"warning":o.warning(t,e,i);break;case"info":o.message(t,e,i);break;case"success":o.success(t,e,i);}},o.sweetAlert=function(o,t){BootstrapSwal.fire(o).then((function(o){t(o);}));},o.confirm=function(t,e){o.sweetAlert(__assign(__assign({},{showCancelButton:!0,footer:null,title:"Are you sure?",html:"Are you sure you want to do this?",confirmButtonText:"Ok",cancelButtonText:"Cancel"}),t),e);},o.prompt=function(t,e){o.sweetAlert(__assign(__assign({},{input:"text",inputAttributes:{autocapitalize:"off"},showCancelButton:!0,icon:"info",footer:'<span class="text-warning"><i class="fa fa-exclamation-triangle"></i> This cannot be undone.</span>',confirmButtonText:"Ok",cancelButtonText:"Cancel"}),t),e);},o.prototype.log=function(t,e){void 0===e&&(e="message"),o.log(t,e);},o.prototype.error=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),o.error(t,e,n);},o.prototype.warning=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),o.warning(t,e,n);},o.prototype.message=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),o.message(t,e,n);},o.prototype.success=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),o.success(t,e,n);},o.prototype.alert=function(t,e,n,i){void 0===n&&(n="info"),void 0===i&&(i=1e4),o.alert(t,t,n,i);},o.prototype.sweetAlert=function(t,e){o.sweetAlert(t,e);},o.prototype.confirm=function(t,e){o.confirm(t,e);},o.prototype.prompt=function(t,e){o.prompt(t,e);},o}();var Inline=function(){function o(){}return o.load=function(n,r){var t,e=$(n);e.addClass("loading"),r.onLoad&&r.onLoad(n);var l=e.data("url");$.get(l,(function(o){r.onRender&&(o=r.onRender(o,n)),e.html(o),e.removeClass("loading"),r.onComplete&&r.onComplete(o,n);})).fail(null!==(t=r.onError)&&void 0!==t?t:o.handleError);},o.task=function(n,r,t,e){void 0===t&&(t=null),void 0===e&&(e=null),r&&r.classList.add("loading"),$.get(n,(function(o){r&&r.classList.remove("loading"),t&&t(o,r);})).fail(null!=e?e:o.handleError);},o.post=function(n,r,t,e){void 0===t&&(t=null),void 0===e&&(e=null),r&&r.classList.add("loading"),$.post(n,(function(o){r&&r.classList.remove("loading"),t&&t(o,r);})).fail(null!=e?e:o.handleError);},o.handleError=function(o,n,r){500===o.status?Alerts.error("There was an error processing the content, please contact an administrator if this continues.","Error "+o.status,1e4):404===o.status?Alerts.error("The content could not be found.","Error "+o.status,1e4):401===o.status&&(Alerts.error("You are not allowed to view this resource, are you logged in correctly?","Error "+o.status,1e4),window.location=window.location);},o}();var DataList=function(){function e(e,t){if(this.element=e,this.element.hoodDataList=this,void 0!==e&&null!=e){if(this.options=__assign(__assign({},this.options),t),$(this.element).hasClass("query")){var a=null;if(a=new RegExp("^(?:[a-z]+:)?//","i").test(this.element.dataset.url)?new URL(this.element.dataset.url):new URL(window.location.origin+this.element.dataset.url),"URLSearchParams"in window){var n=new URLSearchParams(window.location.search),i=new URLSearchParams(a.search);n.forEach((function(e,t,a){i.set(t,e);})),"0"==i.get("page")&&i.set("page","1"),a.search=i.toString();}else a.search=window.location.search;var r=a.pathname+a.search;$(this.element).attr("data-url",r),$(this.element).data("url",r);}if(!$(this.element).hasClass("refresh-only")){var s=document.createElement("a");s.href=$(this.element).data("url"),this.reload(new URL(s.href));}$(this.element).on("click",".pagination a, a.hood-inline-list-target",function(e){e.preventDefault();var t=document.createElement("a");t.href=e.currentTarget.href;var a=document.createElement("a");a.href=$(this.element).data("url"),a.search=t.search,this.reload(new URL(a.href));}.bind(this)),$("body").on("submit",'form.inline[data-target="#'.concat(this.element.id,'"]'),function(e){e.preventDefault();var t=$(e.currentTarget),a=document.createElement("a");a.href=$(this.element).data("url"),a.search="?"+t.serialize(),this.reload(new URL(a.href));}.bind(this));}else Alerts.log("Could not DataList to element, element does not exist.","error");}return e.prototype.reload=function(e){if(void 0===e&&(e=null),e){if(history.pushState&&$(this.element).hasClass("query")){var t=window.location.protocol+"//"+window.location.host+window.location.pathname+(e.href.contains("?")?"?"+e.href.substring(e.href.indexOf("?")+1):"");window.history.pushState({path:t},"",t);}$(this.element).data("url",e);}Inline.load(this.element,__assign({},this.options));},e}();
|
|
22
|
+
var Validator=function(){function t(t,i){if(this.options={errorAlert:"There are errors on the form, please check your answers and try again.",useAjax:!0},this.element=t,this.element){this.options.serializationFunction=function(){return $(this.element).serialize()}.bind(this),this.options=__assign(__assign({},this.options),i),this.element.addEventListener("submit",function(t){t.preventDefault(),t.stopImmediatePropagation(),this.submitForm();}.bind(this));var e='[data-submit="#'+this.element.id+'"]',n=$(e);n&&n.on("click",function(t){t.preventDefault(),t.stopImmediatePropagation(),$(t.currentTarget).data("exit")&&($(this.element).find("input#exit").remove(),$("<input id='exit' />").attr("type","hidden").attr("name","exit").attr("value","true").appendTo(this.element)),this.submitForm();}.bind(this));}}return t.prototype.submitForm=function(){var t;if(this.element.classList.add("was-validated"),this.element.checkValidity()){this.element.classList.add("loading");var i=this.element.querySelector("input[type=checkbox]");if(i&&Array.prototype.slice.call(i).forEach((function(t){$(this).is(":checked")&&$(this).val("true");})),this.options.onSubmit&&this.options.onSubmit(this),this.options.useAjax){var e=this.options.serializationFunction();$.post(this.element.action,e,function(t){this.options.onComplete&&this.options.onComplete(t,this);}.bind(this)).fail(null!==(t=this.options.onError)&&void 0!==t?t:Inline.handleError);}else this.element.submit();}else this.options.errorAlert&&Alerts.error(this.options.errorAlert,null,5e3);},t}();var Handlers=function(){function t(){}return t.prototype.initDefaultHandlers=function(){this.checkboxToCsvInput(),this.iconSelector(),this.initSelectValues(),this.scrollHandlers(),this.selectText(),this.setValueOnClick(),this.submitOnChange();},t.prototype.initSelectValues=function(t){void 0===t&&(t="body"),$(t).find("select[data-selected]").each(this.initSelectValuesHandler);},t.prototype.initSelectValuesHandler=function(t,e){var o=$(this).data("selected");if("undefined"!==o&&""!==o){var a=String(o);$(this).val(a);}},t.prototype.iconSelector=function(t){void 0===t&&(t="body"),$(t).find("[data-hood-icon]").each(this.iconSelectorHandler);},t.prototype.iconSelectorHandler=function(t,e){var o=$(this),a=o.find("input[data-hood-icon-input]"),n=o.find("[data-hood-icon-display]"),i=o.find(".collapse");o.find("[data-hood-icon-key][data-hood-icon-value]").on("click",(function(){o.find("[data-hood-icon-key][data-hood-icon-value]").removeClass("active"),$(this).addClass("active");var t=$(this).data("hoodIconKey"),e=$(this).data("hoodIconValue");$(this),n.html(e),a.val(t),i&&i.removeClass("show");}));},t.prototype.selectText=function(t){void 0===t&&(t="body"),$(t).on("click",".select-text",this.selectTextHandler);},t.prototype.selectTextHandler=function(){var t=$(this);t.select(),t.mouseup((function(){return t.unbind("mouseup"),!1}));},t.prototype.scrollHandlers=function(t){void 0===t&&(t="body"),$(t).on("click",".scroll-top, .scroll-to-top",this.scrollTop),$(t).on("click",".scroll-target, .scroll-to-target",this.scrollTarget),$(t).on("click",".scroll-target-direct, .scroll-to-target-direct",this.scrollTargetDirect);},t.prototype.scrollTop=function(t){return t&&t.preventDefault(),$("html, body").animate({scrollTop:0},800),!1},t.prototype.scrollTarget=function(t){t&&t.preventDefault();var e=$(this).attr("href").split("#")[0];if(e===window.location.pathname||""===e){var o=this.hash,a=$(o),n=$("header.header"),i=0;n&&(i=n.height()),$(this).data("offset")?$("html, body").stop().animate({scrollTop:a.offset().top-$(this).data("offset")},900,"swing"):$("html, body").stop().animate({scrollTop:a.offset().top-i},900,"swing");}},t.prototype.scrollTargetDirect=function(){var t=$("body").scrollTop(),e=$($(this).attr("href")).offset().top;return $("html, body").animate({scrollTop:e},Math.abs(e-t)),!1},t.prototype.checkboxToCsvInput=function(t){void 0===t&&(t="body"),$(t).on("change","input[type=checkbox][data-hood-csv-input]",this.checkboxToCsvInputHandler);},t.prototype.checkboxToCsvInputHandler=function(t){t&&t.preventDefault();var e=new Array;$('input[data-hood-csv-input="'+$(this).data("hoodCsvInput")+'"]').each((function(){$(this).is(":checked")&&e.push($(this).val());}));var o="#"+$(this).data("input"),a=JSON.stringify(e);$(o).val(a);},t.prototype.submitOnChange=function(t){void 0===t&&(t="body"),$(t).on("change",".submit-on-change",this.submitOnChangeHandler);},t.prototype.submitOnChangeHandler=function(t){t&&t.preventDefault(),$(this).parents("form").submit();},t.prototype.setValueOnClick=function(t){void 0===t&&(t="body"),$(t).on("click",".click-select[data-target][data-value]",this.setValueOnClickHandler);},t.prototype.setValueOnClickHandler=function(){var t=$(this),e="#"+t.data("target");$(e).val(t.data("value")),$(e).trigger("change"),$('.click-select.clean[data-target="'+t.data("target")+'"]').each((function(){$(this).removeClass("active");})),$('.click-select.clean[data-target="'+t.data("target")+'"][data-value="'+t.data("value")+'"]').each((function(){$(this).addClass("active");}));},t}();var Uploader=function(){function e(){($(".image-uploader").length||$(".gallery-uploader").length)&&($(".upload-progress-bar").hide(),$(".image-uploader").each(this.singleImage),$(".gallery-uploader").each(this.gallery));}return e.prototype.refreshImage=function(e,r){$(e.data("preview")).css({"background-image":"url("+r.media.smallUrl+")"}),$(e.data("preview")).find("img").attr("src",r.media.smallUrl);},e.prototype.singleImage=function(){var e="#"+$(this).attr("id"),r=$(e),a="#"+$(this).attr("json"),l=null;r.dropzone({url:r.data("url"),maxFiles:1,paramName:"file",parallelUploads:1,acceptedFiles:r.data("types")||".png,.jpg,.jpeg,.gif",autoProcessQueue:!0,previewsContainer:!1,clickable:e,init:function(){l=this;}}),l.on("addedfile",(function(){})),l.on("totaluploadprogress",(function(r){$(".upload-progress-bar."+e.replace("#","")+" .progress-bar").css({width:r+"%"});})),l.on("sending",(function(a){$(".upload-progress-bar."+e.replace("#","")).show(),$(r.data("preview")).addClass("loading");})),l.on("queuecomplete",(function(r){$(".upload-progress-bar."+e.replace("#","")).hide();})),l.on("success",(function(e,o){o.success?(o.media&&($(a).val(JSON.stringify(o.media)),$(r.data("preview")).css({"background-image":"url("+o.media.smallUrl+")"}),$(r.data("preview")).find("img").attr("src",o.media.smallUrl)),Alerts.success("New image added!")):Alerts.error("There was a problem adding the image: "+o.error),l.removeFile(e),$(r.data("preview")).removeClass("loading");}));},e.prototype.gallery=function(){var e="#"+$(this).attr("id"),r=$(e),a=document.querySelector(e+"-template");a.id="";var l=a.parentNode.innerHTML;a.parentNode.removeChild(a);var o=null;r.dropzone({url:r.data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:l,paramName:"files",acceptedFiles:r.data("types")||".png,.jpg,.jpeg,.gif",autoProcessQueue:!0,previewsContainer:"#previews",clickable:".fileinput-button",init:function(){o=this;}}),$(e+" .cancel").hide(),o.on("addedfile",(function(r){$(r.previewElement.querySelector(".complete")).hide(),$(r.previewElement.querySelector(".cancel")).show(),$(e+" .cancel").show();})),o.on("totaluploadprogress",(function(e,r,a){document.querySelector("#total-progress .progress-bar").style.width=e+"%";})),o.on("sending",(function(e){document.querySelector("#total-progress").style.opacity="1";})),o.on("complete",(function(e){$(e.previewElement.querySelector(".cancel")).hide(),$(e.previewElement.querySelector(".progress")).hide(),$(e.previewElement.querySelector(".complete")).show(),console.error("Uploader.Gallery.Dropzone.OnComplete - Inline.Refresh('.gallery') is not implemented.");})),o.on("queuecomplete",(function(r){document.querySelector("#total-progress").style.opacity="0",$(e+" .cancel").hide();})),o.on("success",(function(e,r){console.error("Uploader.Gallery.Dropzone.OnSuccess - Inline.Refresh('.gallery') is not implemented."),r.success?Alerts.success("New images added!"):Alerts.error("There was a problem adding the profile image: "+r.error);})),$(".actions .cancel").click((function(){o.removeAllFiles(!0);}));},e}();var HoodApi=function(){function t(){this.alerts=new Alerts,this.handlers=new Handlers,this.uploader=new Uploader;}return t.prototype.initialise=function(){this.setupLoaders(),this.handlers.initDefaultHandlers(),this.initContactForms();},t.prototype.setupLoaders=function(){$("body").on("loader-show",(function(){document.body.classList.add("loading");})),$("body").on("loader-hide",(function(){document.body.classList.remove("loading");}));},t.prototype.initGoogleMaps=function(t){void 0===t&&(t=".google-map"),$(t).each((function(){var t=new google.maps.LatLng($(this).data("lat"),$(this).data("long"));console.log("Loading map at: "+$(this).data("lat")+", "+$(this).data("long"));var o=new google.maps.Map(this,{zoom:$(this).data("zoom")||15,center:t,scrollwheel:!1});new google.maps.Marker({position:t,map:o,title:$(this).data("marker")});$(window).on("resize",(function(){google.maps.event.trigger(o,"resize");})),google.maps.event.trigger(o,"resize");}));},t.prototype.initContactForms=function(t){void 0===t&&(t=".contact-form");var o=$(t);o.find(".thank-you").hide(),o.find(".form-content").show();var e=$(t)[0];new Validator(e,{onComplete:function(t){t.success?(o.attr("data-redirect")&&(window.location.href=o.attr("data-redirect")),o.attr("data-alert-message")&&Alerts.success(o.attr("data-alert-message")),o.find(".form").hide(),o.find(".thank-you").show()):o.attr("data-alert-error")?Alerts.error(o.attr("data-alert-error")):(console.error(t.errors),Alerts.error("There are errors on the form, please check your answers and try again."));}.bind(this)});},t}();var Loader=function(){function e(){new CustomEvent("loader-show"),new CustomEvent("loader-hide");}return e.show=function(){$("body").trigger("loader-show");},e.hide=function(){$("body").trigger("loader-hide");},e}();new Loader;$.fn.exists=function(){return $(this).length},$.fn.restrictToSlug=function(t){void 0===t&&(t=/[^0-9a-zA-Z]*/g);var n=$(this),e=function(){var n=$(this).val(),e=n.replace(t,"");n!==e&&$(this).val(e);};n.on("keyup",e),n.on("paste",e),n.on("change",e);},$.fn.restrictToPageSlug=function(t){void 0===t&&(t=/[^0-9a-zA-Z-//]*/g);var n=$(this),e=function(){var n=$(this).val(),e=n.replace(t,"");if((e.match(new RegExp("/","g"))||[]).length>4){var a=e.lastIndexOf("/");e=e.substring(0,a)+e.substring(a+1),Alerts.warning("You can only have up to 4 '/' characters in a url slug.");}n!==e&&$(this).val(e);};n.on("keyup",e),n.on("paste",e),n.on("change",e);},$.fn.restrictToMetaSlug=function(t){void 0===t&&(t=/[^0-9a-zA-Z.]*/g);var n=$(this),e=function(){var n=$(this).val(),e=n.replace(t,"");if((e.match(new RegExp(".","g"))||[]).length>1){var a=e.lastIndexOf(".");e=e.substring(0,a)+e.substring(a+1),Alerts.warning("You can only have up to 1 '.' characters in a meta slug.");}n!==e&&$(this).val(e);};n.on("keyup",e),n.on("paste",e),n.on("change",e);},$.fn.characterCounter=function(){var t=$(this),n=function(){var t=$(this).data("counter"),n=Number($(this).attr("maxlength")),e=$(this).val().length;$(t).text(n-e);var a="text-success";n-e<n/10&&(a="text-danger"),$(t).parent().removeClass("text-success").removeClass("text-danger").addClass(a);};t.on("keyup",n),t.on("paste",n),t.on("change",n);},$.fn.warningAlert=function(){$(this).on("click",(function(t){t.preventDefault();return Alerts.confirm({title:$(t.currentTarget).data("title"),html:$(t.currentTarget).data("warning"),footer:$(t.currentTarget).data("footer"),icon:"warning"},(function(n){if(n.isConfirmed){var e=$(t.currentTarget).attr("href");window.location.href=e;}})),!1}));};
|
|
23
|
+
Number.prototype.formatCurrency=function(t){return t+" "+this.toFixed(2).replace(/./g,(function(t,e,r){return e>0&&"."!==t&&(r.length-e)%3==0?","+t:t}))},Number.prototype.formatKilobytes=function(){return (this/1024).toFixed(0).replace(/./g,(function(t,e,r){return e>0&&"."!==t&&(r.length-e)%3==0?","+t:t}))+"Kb"},Number.prototype.formatMegabytes=function(){var t=this/1024;return (t/=1024).toFixed(0).replace(/./g,(function(t,e,r){return e>0&&"."!==t&&(r.length-e)%3==0?","+t:t}))+"Mb"};String.prototype.htmlEncode=function(){return $("<div/>").text(this).html()},String.prototype.htmlDecode=function(){return $("<div/>").html(this).text()},String.prototype.contains=function(t){return -1!==this.indexOf(t)},String.prototype.pick=function(t,r){var o,n="";o=void 0===r?t:t+Math.floor(Math.random()*(r-t));for(var e=0;e<o;e++)n+=this.charAt(Math.floor(Math.random()*this.length));return n},String.prototype.shuffle=function(){var t,r,o=this.split(""),n=o.length;if(n)for(;--n;)t=o[r=Math.floor(Math.random()*(n+1))],o[r]=o[n],o[n]=t;return o.join("")},String.prototype.toSeoUrl=function(){var t=this.replace(/[^a-zA-Z0-9]/g," ").replace(/\s+/g,"-").toLowerCase();"-"===t.charAt(0)&&(t=t.substring(1));var r=t.length-1;return "-"===t.charAt(r)&&(t=t.substring(0,r)),t};var PropertyService=function(){function t(t){this.options={listElementId:"property-list",mapListElementId:"property-map-list",mapElementId:"property-map"},this.map=null,this.center={lat:30,lng:-110},this.options=__assign(__assign({},this.options),t),this.initList();}return t.prototype.initList=function(){this.element=document.getElementById(this.options.listElementId),this.element&&(this.list=new DataList(this.element,{onLoad:function(t){void 0===t&&(t=null),this.options.onListLoad&&this.options.onListLoad(t);}.bind(this),onComplete:function(t,i){void 0===i&&(i=null),this.options.onListRender&&this.options.onListRender(t,i),Alerts.log("Finished loading property list.","info");}.bind(this)}));},t.prototype.initMapList=function(){this.mapListElement=document.getElementById(this.options.mapListElementId),this.mapElement&&(this.mapList=new DataList(this.mapListElement,{onComplete:function(t,i){void 0===i&&(i=null),this.options.onMapLoad&&this.options.onMapLoad(t,i),Alerts.log("Finished loading map list.","info"),this.reloadMarkers();}.bind(this)}));},t.prototype.initMap=function(){this.mapElement=document.getElementById(this.options.mapElementId),this.mapElement&&(this.center={lat:+this.mapElement.dataset.lat,lng:+this.mapElement.dataset.long},this.map=new google.maps.Map(this.mapElement,{zoom:+this.mapElement.dataset.zoom||15,center:this.center,scrollwheel:!1}),$(window).resize(function(){google.maps.event.trigger(this.map,"resize");}.bind(this)),google.maps.event.trigger(this.map,"resize"),this.initMapList());},t.prototype.reloadMarkers=function(){var t=null;if(this.mapElement){var i=this.map;if(this.markers)for(var e=0;e<this.markers.length;e++)this.markers[e].setMap(null);this.markers=[],$("#property-map-locations").data("locations").map(function(e,n){var o=new google.maps.Marker({position:new google.maps.LatLng(+e.Latitude,+e.Longitude),map:this.map,optimized:!0});this.mapElement.dataset.marker&&o.setIcon(this.mapElement.dataset.marker),o.info='<div class="card border-0" style="max-width:300px">\n <div style="background-image:url('.concat(e.ImageUrl,')" class="rounded img-full img img-wide"></div>\n <div class="card-body border-0">\n <p style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">\n <strong>').concat(e.Address1,", ").concat(e.Postcode,"</strong>\n </p>\n <p>").concat(e.Description,'</p>\n <a href="').concat(e.MarkerUrl,'" class="btn btn-block btn-primary">Find out more...</a>\n </div>\n</div>'),o.addListener("click",(function(){t&&t.close(),(t=new google.maps.InfoWindow({content:o.info})).open({anchor:o,map:i,shouldFocus:!1});})),this.markers.push(o);}.bind(this)),this.options.onMapRender&&this.options.onMapRender();}},t}();var App=function(r){function e(){var e=r.call(this)||this;return e.initialise(),e.property=new PropertyService,e}return __extends(e,r),e}(HoodApi);window.hood=new App;exports.App=App;Object.defineProperty(exports,'__esModule',{value:true});}));
|
|
24
|
+
if (typeof this !== 'undefined' && this.hood){ this.hoodCMS = this.Hood = this.hoodCMS = this.HoodCMS = this.hood }
|
package/dist/js/core/DataList.js
CHANGED
|
@@ -16,9 +16,31 @@ export class DataList {
|
|
|
16
16
|
}
|
|
17
17
|
this.options = Object.assign(Object.assign({}, this.options), options);
|
|
18
18
|
if ($(this.element).hasClass('query')) {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
let r = new RegExp('^(?:[a-z]+:)?//', 'i');
|
|
20
|
+
let pageUrl = null;
|
|
21
|
+
if (r.test(this.element.dataset.url)) {
|
|
22
|
+
pageUrl = new URL(this.element.dataset.url);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
pageUrl = new URL(window.location.origin + this.element.dataset.url);
|
|
26
|
+
}
|
|
27
|
+
if ('URLSearchParams' in window) {
|
|
28
|
+
var searchParams = new URLSearchParams(window.location.search);
|
|
29
|
+
var urlParams = new URLSearchParams(pageUrl.search);
|
|
30
|
+
searchParams.forEach((value, key, parent) => {
|
|
31
|
+
urlParams.set(key, value);
|
|
32
|
+
});
|
|
33
|
+
if (urlParams.get("page") == "0") {
|
|
34
|
+
urlParams.set("page", "1");
|
|
35
|
+
}
|
|
36
|
+
pageUrl.search = urlParams.toString();
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
pageUrl.search = window.location.search;
|
|
40
|
+
}
|
|
41
|
+
let url = pageUrl.pathname + pageUrl.search;
|
|
42
|
+
$(this.element).attr('data-url', url);
|
|
43
|
+
$(this.element).data('url', url);
|
|
22
44
|
}
|
|
23
45
|
if (!$(this.element).hasClass('refresh-only')) {
|
|
24
46
|
var listUrl = document.createElement('a');
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Alerts } from "./Alerts";
|
|
2
|
-
import { ColorPickers } from "./ColorPicker";
|
|
3
|
-
import { Editors } from "./Editors";
|
|
4
2
|
import { Handlers } from "./Handlers";
|
|
5
3
|
import { Uploader } from "./Uploader";
|
|
6
4
|
declare global {
|
|
@@ -13,13 +11,25 @@ declare global {
|
|
|
13
11
|
hood: Hood;
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Base class for extending a Hood CMS website, ensure you call HoodApi.initialise() to setup loaders and contact form defaults.
|
|
16
|
+
*/
|
|
17
|
+
export declare class HoodApi {
|
|
17
18
|
alerts: Alerts;
|
|
18
|
-
uploader: Uploader;
|
|
19
19
|
handlers: Handlers;
|
|
20
|
-
|
|
21
|
-
colorPickers: ColorPickers;
|
|
22
|
-
private mediaModal;
|
|
20
|
+
uploader: Uploader;
|
|
23
21
|
constructor();
|
|
22
|
+
initialise(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Default Hood CMS loaders, can be used however, this simply adds a "loading" class to the body tag on show/hide.
|
|
25
|
+
*/
|
|
24
26
|
setupLoaders(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Default initialisation function for Google Maps, should be called as the callback from the Google Maps API script tag.
|
|
29
|
+
*/
|
|
30
|
+
initGoogleMaps(tag?: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Initialisation function for contact forms on the site, will add validator, and submit/functionality to any forms matching the given tag selector string.
|
|
33
|
+
*/
|
|
34
|
+
initContactForms(tag?: string): void;
|
|
25
35
|
}
|
package/dist/js/core/HoodApi.js
CHANGED
|
@@ -1,22 +1,83 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import { Validator } from "..";
|
|
1
3
|
import { Alerts } from "./Alerts";
|
|
2
|
-
import { ColorPickers } from "./ColorPicker";
|
|
3
|
-
import { Editors } from "./Editors";
|
|
4
4
|
import { Handlers } from "./Handlers";
|
|
5
|
-
import { MediaModal } from "./Media";
|
|
6
5
|
import { Uploader } from "./Uploader";
|
|
6
|
+
/**
|
|
7
|
+
* Base class for extending a Hood CMS website, ensure you call HoodApi.initialise() to setup loaders and contact form defaults.
|
|
8
|
+
*/
|
|
7
9
|
export class HoodApi {
|
|
8
10
|
constructor() {
|
|
9
11
|
this.alerts = new Alerts();
|
|
10
|
-
this.uploader = new Uploader();
|
|
11
12
|
this.handlers = new Handlers();
|
|
12
|
-
this.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
this.uploader = new Uploader();
|
|
14
|
+
}
|
|
15
|
+
// Initialise Hood CMS site defaults, can be overridden or individual setup items can be called instead of the initialise function.
|
|
16
|
+
initialise() {
|
|
17
|
+
// Initialise loaders (default, adds loading to body tag)
|
|
16
18
|
this.setupLoaders();
|
|
19
|
+
// Hook up default handlers.
|
|
20
|
+
this.handlers.initDefaultHandlers();
|
|
21
|
+
// Init hood contact forms.
|
|
22
|
+
this.initContactForms();
|
|
17
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Default Hood CMS loaders, can be used however, this simply adds a "loading" class to the body tag on show/hide.
|
|
26
|
+
*/
|
|
18
27
|
setupLoaders() {
|
|
19
|
-
$('body').on('loader-show', function () {
|
|
20
|
-
$('body').on('loader-hide', function () {
|
|
28
|
+
$('body').on('loader-show', function () { document.body.classList.add('loading'); });
|
|
29
|
+
$('body').on('loader-hide', function () { document.body.classList.remove('loading'); });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Default initialisation function for Google Maps, should be called as the callback from the Google Maps API script tag.
|
|
33
|
+
*/
|
|
34
|
+
initGoogleMaps(tag = '.google-map') {
|
|
35
|
+
$(tag).each(function () {
|
|
36
|
+
var myLatLng = new google.maps.LatLng($(this).data('lat'), $(this).data('long'));
|
|
37
|
+
console.log('Loading map at: ' + $(this).data('lat') + ', ' + $(this).data('long'));
|
|
38
|
+
var map = new google.maps.Map(this, {
|
|
39
|
+
zoom: $(this).data('zoom') || 15,
|
|
40
|
+
center: myLatLng,
|
|
41
|
+
scrollwheel: false
|
|
42
|
+
});
|
|
43
|
+
var marker = new google.maps.Marker({
|
|
44
|
+
position: myLatLng,
|
|
45
|
+
map: map,
|
|
46
|
+
title: $(this).data('marker')
|
|
47
|
+
});
|
|
48
|
+
$(window).on('resize', function () {
|
|
49
|
+
google.maps.event.trigger(map, 'resize');
|
|
50
|
+
});
|
|
51
|
+
google.maps.event.trigger(map, 'resize');
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Initialisation function for contact forms on the site, will add validator, and submit/functionality to any forms matching the given tag selector string.
|
|
56
|
+
*/
|
|
57
|
+
initContactForms(tag = '.contact-form') {
|
|
58
|
+
let $form = $(tag);
|
|
59
|
+
$form.find('.thank-you').hide();
|
|
60
|
+
$form.find('.form-content').show();
|
|
61
|
+
let form = $(tag)[0];
|
|
62
|
+
new Validator(form, {
|
|
63
|
+
onComplete: function (response) {
|
|
64
|
+
if (response.success) {
|
|
65
|
+
if ($form.attr('data-redirect'))
|
|
66
|
+
window.location.href = $form.attr('data-redirect');
|
|
67
|
+
if ($form.attr('data-alert-message'))
|
|
68
|
+
Alerts.success($form.attr('data-alert-message'));
|
|
69
|
+
$form.find('.form').hide();
|
|
70
|
+
$form.find('.thank-you').show();
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
if ($form.attr('data-alert-error'))
|
|
74
|
+
Alerts.error($form.attr('data-alert-error'));
|
|
75
|
+
else {
|
|
76
|
+
console.error(response.errors);
|
|
77
|
+
Alerts.error("There are errors on the form, please check your answers and try again.");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}.bind(this)
|
|
81
|
+
});
|
|
21
82
|
}
|
|
22
83
|
}
|
|
@@ -6,7 +6,7 @@ export class Validator {
|
|
|
6
6
|
*/
|
|
7
7
|
constructor(element, options) {
|
|
8
8
|
this.options = {
|
|
9
|
-
errorAlert: 'There are errors, please check
|
|
9
|
+
errorAlert: 'There are errors on the form, please check your answers and try again.',
|
|
10
10
|
useAjax: true
|
|
11
11
|
};
|
|
12
12
|
this.element = element;
|
package/dist/js/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './models/Content';
|
|
|
3
3
|
export * from './models/Property';
|
|
4
4
|
export * from './models/Users';
|
|
5
5
|
export * from './core/Alerts';
|
|
6
|
-
export * from './core/BaseSite';
|
|
7
6
|
export * from './core/ColorPicker';
|
|
8
7
|
export * from './core/DataList';
|
|
9
8
|
export * from './core/Editors';
|
|
@@ -21,3 +20,13 @@ export * from './core/Validator';
|
|
|
21
20
|
export * from './extensions/jqueryExtensions';
|
|
22
21
|
export * from './extensions/numberExtensions';
|
|
23
22
|
export * from './extensions/stringExtensions';
|
|
23
|
+
export * from './admin/ContentController';
|
|
24
|
+
export * from './admin/ContentTypeController';
|
|
25
|
+
export * from './admin/HomeController';
|
|
26
|
+
export * from './admin/LogsController';
|
|
27
|
+
export * from './admin/MediaController';
|
|
28
|
+
export * from './admin/PropertyController';
|
|
29
|
+
export * from './admin/PropertyImporter';
|
|
30
|
+
export * from './admin/ThemesController';
|
|
31
|
+
export * from './admin/UsersController';
|
|
32
|
+
export * from './app/PropertyService';
|
package/dist/js/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export * from './models/Content';
|
|
|
3
3
|
export * from './models/Property';
|
|
4
4
|
export * from './models/Users';
|
|
5
5
|
export * from './core/Alerts';
|
|
6
|
-
export * from './core/BaseSite';
|
|
7
6
|
export * from './core/ColorPicker';
|
|
8
7
|
export * from './core/DataList';
|
|
9
8
|
export * from './core/Editors';
|
|
@@ -21,3 +20,15 @@ export * from './core/Validator';
|
|
|
21
20
|
export * from './extensions/jqueryExtensions';
|
|
22
21
|
export * from './extensions/numberExtensions';
|
|
23
22
|
export * from './extensions/stringExtensions';
|
|
23
|
+
// Extendables for admin area
|
|
24
|
+
export * from './admin/ContentController';
|
|
25
|
+
export * from './admin/ContentTypeController';
|
|
26
|
+
export * from './admin/HomeController';
|
|
27
|
+
export * from './admin/LogsController';
|
|
28
|
+
export * from './admin/MediaController';
|
|
29
|
+
export * from './admin/PropertyController';
|
|
30
|
+
export * from './admin/PropertyImporter';
|
|
31
|
+
export * from './admin/ThemesController';
|
|
32
|
+
export * from './admin/UsersController';
|
|
33
|
+
// Extendables for app
|
|
34
|
+
export * from './app/PropertyService';
|
package/dist/js/login.js
CHANGED
|
Binary file
|
package/images/hood.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
"name": "hoodcms",
|
|
3
|
+
"version": "6.0.1",
|
|
4
|
+
"description": "A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"hood",
|
|
7
|
+
"hoodcms",
|
|
8
|
+
"visual-studio",
|
|
9
|
+
"netcore",
|
|
10
|
+
"net5.0",
|
|
11
|
+
"efcore",
|
|
12
|
+
"ef",
|
|
13
|
+
"dotnet",
|
|
14
|
+
"js",
|
|
15
|
+
"ts",
|
|
16
|
+
"scss"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://github.com/HoodDigital/Hood#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/HoodDigital/Hood/issues"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/HoodDigital/hoodcms.git"
|
|
25
|
+
},
|
|
26
|
+
"license": "GPL-3.0",
|
|
27
|
+
"author": "George Whysall",
|
|
28
|
+
"main": "./dist/js/index.js",
|
|
29
|
+
"types": "./dist/js/index.d.ts",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "npm-run-all scss tsc",
|
|
32
|
+
"build-production": "npm-run-all scss cssnano tsc tsc-production",
|
|
33
|
+
"clean": "gulp clean",
|
|
34
|
+
"copy": "gulp copy",
|
|
35
|
+
"cssnano": "gulp cssnano",
|
|
36
|
+
"package": "npm-run-all clean build-production copy views",
|
|
37
|
+
"scss": "gulp scss",
|
|
38
|
+
"scss-lint": "stylelint src/scss/ --fix",
|
|
39
|
+
"tsc": "tsc && npm-run-all tsc-rollup",
|
|
40
|
+
"tsc-production": "tsc --project tsconfig.production.json && npm-run-all tsc-rollup-production",
|
|
41
|
+
"tsc-recaptcha": "tsc --project tsconfig.recaptcha.json",
|
|
42
|
+
"tsc-rollup": "rollup --config --debug",
|
|
43
|
+
"tsc-rollup-production": "rollup --config",
|
|
44
|
+
"views": "gulp views",
|
|
45
|
+
"watch-scss": "npm-watch scss",
|
|
46
|
+
"watch-tsc": "npm-watch tsc"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@popperjs/core": "^2.11.2",
|
|
50
|
+
"@simonwep/pickr": "^1.8.2",
|
|
51
|
+
"@types/bootstrap": "^5.1.9",
|
|
52
|
+
"@types/dropzone": "^5.7.4",
|
|
53
|
+
"@types/google.maps": "^3.47.4",
|
|
54
|
+
"@types/jquery": "^3.5.13",
|
|
55
|
+
"@types/jquery-toast-plugin": "^1.3.3",
|
|
56
|
+
"@types/jquery.slimscroll": "^1.3.31",
|
|
57
|
+
"@types/jquery.validation": "^1.16.7",
|
|
58
|
+
"bootstrap": "^5.1.3",
|
|
59
|
+
"chart.js": "^3.7.0",
|
|
60
|
+
"dropzone": "^5.9.3",
|
|
61
|
+
"jquery": "^3.6.0",
|
|
62
|
+
"jquery-slimscroll": "^1.3.8",
|
|
63
|
+
"jquery-toast-plugin": "^1.3.2",
|
|
64
|
+
"jquery-validation": "^1.19.3",
|
|
65
|
+
"sweetalert2": "^11.4.0",
|
|
66
|
+
"tinymce": "^5.10.3"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@lopatnov/rollup-plugin-uglify": "^2.1.2",
|
|
70
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
71
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
72
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
73
|
+
"cssnano": "^5.0.17",
|
|
74
|
+
"eslint": "^8.8.0",
|
|
75
|
+
"gulp": "^4.0.2",
|
|
76
|
+
"gulp-autoprefixer": "^8.0.0",
|
|
77
|
+
"gulp-concat": "^2.6.1",
|
|
78
|
+
"gulp-cssnano": "^2.1.3",
|
|
79
|
+
"gulp-dart-sass": "^1.0.2",
|
|
80
|
+
"gulp-imagemin": "^7.1.0",
|
|
81
|
+
"gulp-less": "^4.0.1",
|
|
82
|
+
"gulp-rename": "^2.0.0",
|
|
83
|
+
"gulp-rimraf": "^1.0.0",
|
|
84
|
+
"gulp-sourcemaps": "^3.0.0",
|
|
85
|
+
"node-sass-tilde-importer": "^1.0.2",
|
|
86
|
+
"npm-run-all": "^4.1.5",
|
|
87
|
+
"npm-watch": "^0.11.0",
|
|
88
|
+
"postcss": "^8.4.6",
|
|
89
|
+
"rollup": "^2.67.1",
|
|
90
|
+
"rollup-pluginutils": "^2.8.2",
|
|
91
|
+
"sass": "^1.49.7",
|
|
92
|
+
"stylelint": "^14.4.0",
|
|
93
|
+
"terser": "^5.10.0",
|
|
94
|
+
"typescript": "^4.5.5"
|
|
95
|
+
},
|
|
96
|
+
"watch": {
|
|
97
|
+
"scss": {
|
|
98
|
+
"patterns": [
|
|
99
|
+
"src"
|
|
100
|
+
],
|
|
101
|
+
"extensions": "scss",
|
|
102
|
+
"quiet": false
|
|
21
103
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"main": "./dist/js/index.js",
|
|
29
|
-
"types": "./dist/js/index.d.ts",
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "npm-run-all scss tsc",
|
|
32
|
-
"build-production": "npm-run-all scss cssnano tsc tsc-production",
|
|
33
|
-
"clean": "gulp clean",
|
|
34
|
-
"copy": "gulp copy",
|
|
35
|
-
"cssnano": "gulp cssnano",
|
|
36
|
-
"package": "npm-run-all clean build-production copy views",
|
|
37
|
-
"scss": "gulp scss",
|
|
38
|
-
"scss-lint": "stylelint src/scss/ --fix",
|
|
39
|
-
"tsc": "tsc && npm-run-all tsc-rollup",
|
|
40
|
-
"tsc-production": "tsc --project tsconfig.production.json && npm-run-all tsc-rollup-production",
|
|
41
|
-
"tsc-recaptcha": "tsc --project tsconfig.recaptcha.json",
|
|
42
|
-
"tsc-rollup": "rollup --config --debug",
|
|
43
|
-
"tsc-rollup-production": "rollup --config",
|
|
44
|
-
"views": "gulp views",
|
|
45
|
-
"watch-scss": "npm-watch scss",
|
|
46
|
-
"watch-tsc": "npm-watch tsc"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@popperjs/core": "^2.9.2",
|
|
50
|
-
"@simonwep/pickr": "^1.8.0",
|
|
51
|
-
"@types/bootstrap": "^5.0.13",
|
|
52
|
-
"@types/dropzone": "^5.7.3",
|
|
53
|
-
"@types/google.maps": "^3.45.2",
|
|
54
|
-
"@types/jquery": "^3.5.5",
|
|
55
|
-
"@types/jquery-toast-plugin": "^1.3.2",
|
|
56
|
-
"@types/jquery.slimscroll": "^1.3.31",
|
|
57
|
-
"@types/jquery.validation": "^1.16.6",
|
|
58
|
-
"bootstrap": "^5.0.2",
|
|
59
|
-
"chart.js": "^3.2.1",
|
|
60
|
-
"dropzone": "^5.9.2",
|
|
61
|
-
"jquery": "^3.6.0",
|
|
62
|
-
"jquery-slimscroll": "^1.3.8",
|
|
63
|
-
"jquery-toast-plugin": "^1.3.2",
|
|
64
|
-
"jquery-validation": "^1.19.3",
|
|
65
|
-
"sweetalert2": "^11.0.18",
|
|
66
|
-
"tinymce": "^5.8.0"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@lopatnov/rollup-plugin-uglify": "^2.1.2",
|
|
70
|
-
"@rollup/plugin-commonjs": "^21.0.1",
|
|
71
|
-
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
72
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
73
|
-
"cssnano": "^5.0.11",
|
|
74
|
-
"eslint": "^8.3.0",
|
|
75
|
-
"gulp": "^4.0.2",
|
|
76
|
-
"gulp-autoprefixer": "^8.0.0",
|
|
77
|
-
"gulp-concat": "^2.6.1",
|
|
78
|
-
"gulp-cssnano": "^2.1.3",
|
|
79
|
-
"gulp-dart-sass": "^1.0.2",
|
|
80
|
-
"gulp-imagemin": "^7.1.0",
|
|
81
|
-
"gulp-less": "^4.0.1",
|
|
82
|
-
"gulp-rename": "^2.0.0",
|
|
83
|
-
"gulp-rimraf": "^1.0.0",
|
|
84
|
-
"gulp-sourcemaps": "^3.0.0",
|
|
85
|
-
"node-sass-tilde-importer": "^1.0.2",
|
|
86
|
-
"npm-run-all": "^4.1.5",
|
|
87
|
-
"npm-watch": "^0.11.0",
|
|
88
|
-
"postcss": "^8.4.4",
|
|
89
|
-
"rollup": "^2.60.1",
|
|
90
|
-
"rollup-pluginutils": "^2.8.2",
|
|
91
|
-
"sass": "^1.43.5",
|
|
92
|
-
"stylelint": "^14.1.0",
|
|
93
|
-
"terser": "^5.10.0",
|
|
94
|
-
"typescript": "^4.5.2"
|
|
95
|
-
},
|
|
96
|
-
"watch": {
|
|
97
|
-
"scss": {
|
|
98
|
-
"patterns": [
|
|
99
|
-
"src"
|
|
100
|
-
],
|
|
101
|
-
"extensions": "scss",
|
|
102
|
-
"quiet": false
|
|
103
|
-
},
|
|
104
|
-
"tsc": {
|
|
105
|
-
"patterns": [
|
|
106
|
-
"src"
|
|
107
|
-
],
|
|
108
|
-
"extensions": "ts",
|
|
109
|
-
"quiet": false
|
|
110
|
-
}
|
|
104
|
+
"tsc": {
|
|
105
|
+
"patterns": [
|
|
106
|
+
"src"
|
|
107
|
+
],
|
|
108
|
+
"extensions": "ts",
|
|
109
|
+
"quiet": false
|
|
111
110
|
}
|
|
111
|
+
}
|
|
112
112
|
}
|
package/src/css/admin.css
CHANGED
|
@@ -11728,9 +11728,6 @@ a.full-box-link {
|
|
|
11728
11728
|
position: absolute;
|
|
11729
11729
|
top: 50%;
|
|
11730
11730
|
transform: translateY(-50%);
|
|
11731
|
-
transform: translateY(-50%);
|
|
11732
|
-
transform: translateY(-50%);
|
|
11733
|
-
transform: translateY(-50%);
|
|
11734
11731
|
}
|
|
11735
11732
|
.hood-image.loading::before,
|
|
11736
11733
|
.img.loading::before {
|