diff --git a/public/.gitignore b/public/.gitignore index a79ae128ba..6cf346eba5 100644 --- a/public/.gitignore +++ b/public/.gitignore @@ -3,3 +3,8 @@ !agileui.js !agileui.less !.gitignore +!agileui.css +!agileui.css.map +!agileui.min.js +!atkjs-ui.js +!atkjs-ui.min.js diff --git a/public/agileui.css b/public/agileui.css new file mode 100644 index 0000000000..6c00d9ef8d --- /dev/null +++ b/public/agileui.css @@ -0,0 +1 @@ +.ui.visible.left.sidebar~header.atk-topMenu.ui.menu.fixed{width:calc(100% - 260px)}.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:260px}.atk-dialog-content{min-height:100px}.atk-layout{display:flex;min-height:100vh;flex-direction:column}.atk-topMenuGhost.ui.menu{display:none;margin:0;pointer-events:none;visibility:hidden}header.atk-topMenu.ui.fixed.menu~.atk-topMenuGhost{display:block}header.atk-topMenu.ui.menu .item>.label{margin-left:0}.atk-mainContainer{flex:1}.atk-mainContainer .atk-mainContainerWrapper{padding:3em}footer.atk-footer .ui.divider,footer.atk-footer .ui.segment{margin:0}.ui.left.sidebar{z-index:103}.ui.left.sidebar .item.atk-leftMenuClose{display:none;position:fixed;right:0;top:0;z-index:999}.ui.left.sidebar .item.atk-leftMenuClose i.icon{margin-left:0!important}.atk-table-dropdown{display:inline;float:right}.atk-table-dropdown i{opacity:.3;vertical-align:bottom}.atk-overflow-auto{overflow:auto;border:1px solid rgba(34,36,38,.15);margin-bottom:1em}.atk-overflow-auto>.ui.table{margin-top:0}.atk-cell-expanded{min-width:320px;max-width:640px;white-space:normal}.atk-overlay.pushable{height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:102}.atk-overlay.pushable .pusher:after{height:100%;opacity:1;width:100%}@media (max-width:991px){.ui.left.sidebar~header.atk-topMenu.ui.menu.fixed{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);width:100%!important}.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:0}.ui.left.sidebar{opacity:0;pointer-events:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:visible}body.atk-leftMenu-visible:after{left:0;position:fixed;top:0}body.atk-leftMenu-visible .ui.left.sidebar{opacity:1;pointer-events:auto}body.atk-leftMenu-visible .ui.left.sidebar .atk-leftMenuClose{display:block}}@media (min-width:768px) and (max-width:991px){body.atk-leftMenu-visible .atk-overlay.pushable{opacity:1}}@media (max-width:767px){body.atk-leftMenu-visible{overflow:hidden}.ui.left.sidebar{width:100%}}@media print{.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:0}.atk-topMenu,.atk-topMenuGhost,.ui.left.sidebar{display:none!important}}/*# sourceMappingURL=agileui.css.map */ \ No newline at end of file diff --git a/public/agileui.css.map b/public/agileui.css.map new file mode 100644 index 0000000000..7bcdb4a91b --- /dev/null +++ b/public/agileui.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["agileui.less"],"names":[],"mappings":"AASqD,0DACnD,MAAA,mBAEuB,4CACQ,2CAC/B,aAAA,MAGF,oBACE,WAAA,MAGF,YACE,QAAA,KACA,WAAA,MACA,eAAA,OAEkB,0BAClB,QAAA,KACA,OAAA,EACA,eAAA,KACA,WAAA,OAE+B,mDAC/B,QAAA,MAE+B,wCAC/B,YAAA,EAEF,mBACE,KAAA,EACA,6CACE,QAAA,IAIC,8BAAa,8BACd,OAAA,EAMI,iBACN,QAAA,IACK,yCACH,QAAA,KACA,SAAA,MACA,MAAA,EACA,IAAA,EACA,QAAA,IACC,gDACC,YAAA,YASN,oBACE,QAAA,OACA,MAAA,MAGkB,sBAClB,QAAA,GACA,eAAA,OAMF,mBACE,SAAA,KACA,OAAA,IAAA,MAAA,mBACA,cAAA,IACK,6BACH,WAAA,EAIJ,mBACE,UAAA,MACA,UAAA,MACA,YAAA,OAEU,sBACV,OAAA,KACA,KAAA,EACA,QAAA,EACA,eAAA,KACA,SAAA,MACA,IAAA,EACA,MAAA,KACA,QAAA,IAEG,oCACC,OAAA,KACA,QAAA,EACA,MAAA,KAQoC,yBACK,kDAC3C,kBAAmB,mBACnB,UAAW,mBACX,MAAA,eAEuB,4CACQ,2CAC/B,aAAA,EAEM,iBACN,QAAA,EACA,eAAA,KACA,kBAAmB,mBACnB,UAAW,mBACX,WAAA,QAGC,gCACC,KAAA,EACA,SAAA,MACA,IAAA,EAEM,2CACN,QAAA,EACA,eAAA,KACA,8DACE,QAAA,OAKgE,+CAChC,gDACpC,QAAA,GAGqC,yBACnC,0BACF,SAAA,OAEM,iBACN,MAAA,MAOJ,aAC2B,4CACQ,2CAC/B,aAAA,EAEgB,aAAc,kBAAxB,iBACN,QAAA"} \ No newline at end of file diff --git a/public/agileui.min.js b/public/agileui.min.js new file mode 100644 index 0000000000..7367a578d1 --- /dev/null +++ b/public/agileui.min.js @@ -0,0 +1 @@ +$(function(){$(".ui.left.sidebar").prepend(''),$(".atk-leftMenuClose").click(function(){$("body").removeClass("atk-leftMenu-visible")}),$(".atk-leftMenuTrigger").click(function(ev){ev.preventDefault(),ev.stopPropagation(),$(".ui.left.sidebar").toggleClass("visible"),$("body").toggleClass("atk-leftMenu-visible")})}); diff --git a/public/atkjs-ui.min.js b/public/atkjs-ui.min.js new file mode 100644 index 0000000000..59b6a6d41f --- /dev/null +++ b/public/atkjs-ui.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jQuery"),require("Draggable")):"function"==typeof define&&define.amd?define("atk",["jQuery","Draggable"],e):"object"==typeof exports?exports.atk=e(require("jQuery"),require("Draggable")):t.atk=e(t.jQuery,t.Draggable)}(window,function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__5__){return function(n){var i={};function o(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=n,o.c=i,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=6)}([function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(module,__webpack_exports__,__webpack_require__){"use strict";var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n/g,""),jQuery),0]*>[\s\S]*<\/body>/gi);e?apiService.showErrorModal(e):apiService.showErrorModal(t)}}},{key:"showErrorModal",value:function(t){var e=jquery__WEBPACK_IMPORTED_MODULE_0___default()("
").appendTo("body").addClass("ui scrolling modal").css("padding","1em").html(t);e.modal({duration:100,allowMultiple:!1,onHide:function(){return e.children().remove(),!0}}).modal("show").modal("refresh")}},{key:"showErrorWindow",value:function(t){jquery__WEBPACK_IMPORTED_MODULE_0___default()('
').css({padding:"8px","background-color":"rgba(0, 0, 0, 0.5)",margin:"auto",width:"100%",height:"100%",position:"fixed",top:0,bottom:0,"z-index":"100000","overflow-y":"scroll"}).html(jquery__WEBPACK_IMPORTED_MODULE_0___default()("
").css({width:"70%","margin-top":"4%","margin-bottom":"4%","margin-left":"auto","margin-right":"auto",background:"white",padding:"4px","overflow-x":"scroll"}).html(t).prepend(jquery__WEBPACK_IMPORTED_MODULE_0___default()('').css("float","right").click(function(){var t=jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).parents(".atk-exception");t.hide(),t.remove()}))).appendTo("body")}},{key:"getErrorHtml",value:function(t){return'
\n \n
\n
Javascript Error
\n
'.concat(t,"
\n
\n
")}}]),ApiService}(),apiService=new ApiService;Object.freeze(apiService),__webpack_exports__.a=apiService},function(t,e){function n(e,n,i){var o,r,a,s,l;function u(){var t=Date.now()-s;t>>0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o,r=n(0),a=(i=r)&&i.__esModule?i:{default:i},l=(o=0,function(){return o++}),s=function t(e){var n=1 tbody > tr > td, .grip-resizable > tbody > tr > th{overflow:hidden} .grip-padding > tbody > tr > td, .grip-padding > tbody > tr > th{padding-left:0!important; padding-right:0!important;} .grip-container{ height:0px; position:relative;} .grip-handle{margin-left:-5px; position:absolute; z-index:5; } .grip-handle .grip-resizable{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;cursor: col-resize;top:0px} .grip-lastgrip{position:absolute; width:1px; } .grip-drag{ border-left:1px dotted black;\t} .grip-flex{width:auto!important;} .grip-handle.grip-disabledgrip .grip-resizable{cursor:default; display:none;}"),t.hoverCursor&&"col-resize"!==t.hoverCursor){var o=".grip-handle .grip-resizable:hover{cursor:"+t.hoverCursor+"!important}";p.createStyle(i,o)}e.setAttribute(p.ID,n);var r=e.opt;e.opt=p.extendOptions(t);var a=p.getTableHeaders(e);if(p.extendTable(a),t.remoteTable&&t.remoteTable.matches("table")){var s=p.getTableHeaders(e.opt.remoteTable);a.length===s.length?p.extendRemoteTable(e.opt.remoteTable,s,e):console.warn("column count for remote table did not match")}return r},this.applyBounds=function(){var t=p.tb,n=t.columns.map(function(t){return window.getComputedStyle(t).width});t.style.width=window.getComputedStyle(t).width,t.tableWidth=Number(t.style.width.replace(/px/,"")).valueOf(),t.classList.remove(p.FLEX),t.columns.forEach(function(t,e){t.style.width=n[e],t.w=Number(n[e].replace(/px/,"")).valueOf()}),t.classList.add(p.FLEX)},this.serializeStore=function(){var t=p.store,e=p.tb;t[e.getAttribute(p.ID)]="";for(var n=0,i=0;ithead>tr:nth-of-type(1)>th"));return(n=n.concat(Array.from(t.querySelectorAll(e+">thead>tr:nth-of-type(1)>td")))).length||(n=(n=(n=(n=Array.from(t.querySelectorAll(e+">tbody>tr:nth-of-type(1)>th"))).concat(Array.from(t.querySelectorAll(e+">tr:nth-of-type(1)>th")))).concat(Array.from(t.querySelectorAll(e+">tbody>tr:nth-of-type(1)>td")))).concat(Array.from(t.querySelectorAll(e+">tr:nth-of-type(1)>td")))),p.filterInvisible(n,!1)},this.filterInvisible=function(t,i){return t.filter(function(t){var e=i?-1:t.offsetWidth,n=i?-1:t.offsetHeight;return!(0===e&&0===n||t.style&&t.style.display&&"none"===window.getComputedStyle(t).display)})},this.extendTable=function(t){var e=p.tb;e.opt.removePadding&&e.classList.add("grip-padding"),e.classList.add(p.RESIZABLE),e.insertAdjacentHTML("beforebegin",'
'),e.grips=[],e.columns=[],e.tableWidth=Number(window.getComputedStyle(e).width.replace(/px/,"")).valueOf(),e.gripContainer=e.previousElementSibling,e.opt.marginLeft&&(e.gripContainer.style.marginLeft=e.opt.marginLeft),e.opt.marginRight&&(e.gripContainer.style.marginRight=e.opt.marginRight),e.cellSpace=parseInt(p.legacyIE?e.cellSpacing||e.currentStyle.borderSpacing:window.getComputedStyle(e).borderSpacing.split(" ")[0].replace(/px/,""))||2,e.borderSpace=parseInt(p.legacyIE?e.border||e.currentStyle.borderLeftWidth:window.getComputedStyle(e).borderLeftWidth.replace(/px/,""))||1,e.extended=!0,p.createGrips(t)},this.extendRemoteTable=function(i,o,r){r.opt.removePadding&&i.classList.add("grip-padding"),i.classList.add(p.RESIZABLE),i.getAttribute(p.ID)||i.setAttribute(p.ID,r.getAttribute(p.ID)+"remote"),i.columns=[],o.forEach(function(t,e){var n=o[e];n.w=r.columns[e].w,n.style.width=n.w+p.PX,n.removeAttribute("width"),i.columns.push(n)}),i.tableWidth=r.tableWidth,i.cellSpace=r.cellSpace,i.borderSpace=r.borderSpace;var t=Array.from(i.querySelectorAll("col"));i.columnGrp=p.filterInvisible(t,!0),i.columnGrp.forEach(function(t,e){t.removeAttribute("width"),t.style.width=r.columnGrp[e].style.width}),r.remote=i},this.createGrips=function(r){var a=p.tb;a.columnGrp=p.filterInvisible(Array.from(a.querySelectorAll("col")),!0),a.columnGrp.forEach(function(t){t.removeAttribute("width")}),a.columnCnt=r.length,p.store[a.getAttribute(p.ID)]&&p.deserializeStore(r),a.opt.widths||(a.opt.widths=[]),r.forEach(function(t,e){var n=r[e],i=-1!==a.opt.disabledColumns.indexOf(e);p.createDiv(a.gripContainer,"grip-handle");var o=a.gripContainer.lastChild;!i&&a.opt.gripInnerHtml&&(o.innerHTML=a.opt.gripInnerHtml),p.createDiv(o,p.RESIZABLE),e===a.columnCnt-1&&(o.classList.add("grip-lastgrip"),a.opt.fixed&&(o.innerHTML="")),o.addEventListener("touchstart",p.onGripMouseDown,{capture:!0,passive:!0}),o.addEventListener("mousedown",p.onGripMouseDown,!0),i?o.classList.add("grip-disabledgrip"):(o.classList.remove("grip-disabledgrip"),o.addEventListener("touchstart",p.onGripMouseDown,{capture:!0,passive:!0}),o.addEventListener("mousedown",p.onGripMouseDown,!0)),o.t=a,o.i=e,a.opt.widths[e]?n.w=a.opt.widths[e]:(n.w=Number(window.getComputedStyle(n).width.replace(/px/,"")).valueOf(),a.opt.widths[e]=n.w),n.style.width=n.w+p.PX,n.removeAttribute("width"),o.data={i:e,t:a.getAttribute(p.ID),last:e===a.columnCnt-1},a.grips.push(o),a.columns.push(n)});var t=Array.from(a.querySelectorAll("td"));t.concat(Array.from(a.querySelectorAll("th"))),(t=(t=t.filter(function(t){for(var e=0;e\n
'.concat(t,"
")}}]),t}());Object.freeze(s);var l=s;function c(t,e){for(var n=0;n\n
'}}]),t}());Object.freeze(w);var S=w;function _(t,e){for(var n=0;n
',baseLoaderMarkup:'
'};var q=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),G(this,H(e).apply(this,arguments))}var n,i,o;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&U(t,e)}(e,T),n=e,(i=[{key:"main",value:function(){var e=this.$el,n=this.settings.showLoader;if("undefined"!=typeof EventSource){var i=new EventSource("".concat(this.settings.uri,"&event=").concat(this.settings.event));n&&e.addClass("loading"),i.onmessage=function(t){r.a.atkSuccessTest(JSON.parse(t.data))},i.onerror=function(t){t.eventPhase===EventSource.CLOSED&&(n&&e.removeClass("loading"),i.close())},i.addEventListener("jsAction",function(t){r.a.atkSuccessTest(JSON.parse(t.data))},!1)}else this.$el.atkReloadView({uri:this.settings.uri})}}])&&W(n.prototype,i),o&&W(n,o),e}();function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function B(t,e){for(var n=0;n').appendTo("body").html(this.getDialogHtml(t.title));e.data({uri:t.uri,type:t.mode,args:t.uri_options,needRemove:!0,needCloseTrigger:!0,label:t.label}),e.modal(t.modal).modal("show")}},{key:"getDialogHtml",value:function(t){return'\n
').concat(t,'
\n
\n
\n
')}}])&&ot(n.prototype,i),o&&ot(n,o),e}();function ut(t){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ct(t,e){for(var n=0;n \n
\n \n
\n \n ').concat(t.content,"\n
\n
\n
")}},{key:"removeNotifier",value:function(t){var e=t.data.self;clearTimeout(e.timer),e.notify.transition(e.settings.closeTransition),e.notify.remove()}},{key:"getClasses",value:function(t){return{base:{position:"body"===t?"fixed":"absolute","z-index":9999}}}},{key:"getPosition",value:function(t){return{topLeft:{top:"0px",left:"0px"},topCenter:{margin:"auto",top:"0px",left:"0px",right:"0px"},topRight:{top:"0px",right:"0px"},bottomLeft:{bottom:"0px",left:"0px"},bottomCenter:{margin:"auto",bottom:"0px",left:"0px",right:"0px"},bottomRight:{bottom:"0px",right:"0px"},center:{margin:"auto",top:"0px",left:"0px",bottom:"0px",right:"0px","max-height":"1%"}}[t]}}])&&ct(n.prototype,i),o&&ct(n,o),e}();function yt(t){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gt(t,e){for(var n=0;n'}}])&>(n.prototype,i),o&>(n,o),e}();wt.DEFAULTS={uri:null,file:{id:null,name:null},uri_options:{},hasFocus:!0,action:null,completeLabel:"100%",submit:null};var St=n(2),_t=n.n(St);function kt(t){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ot(t,e){for(var n=0;n'+t+"")}}])&&Pt(n.prototype,i),o&&Pt(n,o),e}();function $t(t){return($t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mt(t,e){for(var n=0;n=this.$inner.outerHeight()&&this.loadContent()}},{key:"hasScrollbar",value:function(){var t=this.isWindow?Math.ceil(this.$el.height()):Math.ceil(this.$inner.height());return Math.ceil(this.$scroll.height())
'))}},{key:"removeLoader",value:function(){u()("#atkScrollLoader").remove()}}])&&Kt(n.prototype,i),o&&Kt(n,o),e}();function ee(t){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ne(n,i){var t=2