From ec3c592f170780edc43ea84d076d2c6172fff305 Mon Sep 17 00:00:00 2001 From: Romans Malinovskis Date: Mon, 16 Oct 2017 19:14:09 +0100 Subject: [PATCH] Build release 1.2.3 --- public/.gitignore | 5 + public/agileui.css | 1 + public/agileui.css.map | 1 + public/agileui.min.js | 1 + public/atk4JS.js | 1283 ++++++++++++++++++++++++++++++++++++++++ public/atk4JS.min.js | 1 + 6 files changed, 1292 insertions(+) create mode 100644 public/agileui.css create mode 100644 public/agileui.css.map create mode 100644 public/agileui.min.js create mode 100644 public/atk4JS.js create mode 100644 public/atk4JS.min.js diff --git a/public/.gitignore b/public/.gitignore index a79ae128ba..b74834dd04 100644 --- a/public/.gitignore +++ b/public/.gitignore @@ -3,3 +3,8 @@ !agileui.js !agileui.less !.gitignore +!agileui.css +!agileui.css.map +!agileui.min.js +!atk4JS.js +!atk4JS.min.js diff --git a/public/agileui.css b/public/agileui.css new file mode 100644 index 0000000000..a56349cc8a --- /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-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}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}.ui.table.atk-overflow-auto{overflow:auto}.ui.table.atk-overflow-auto>.ui.table{border:none}.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..fc45dea9a7 --- /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,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,EAGG,8BAAa,8BACd,OAAA,EAMI,iBACN,QAAA,IACK,yCACH,QAAA,KACA,SAAA,MACA,MAAA,EACA,IAAA,EACA,QAAA,IACC,gDACC,YAAA,YAWG,4BACP,SAAA,KACI,sCACF,YAGJ,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/atk4JS.js b/public/atk4JS.js new file mode 100644 index 0000000000..5c86168200 --- /dev/null +++ b/public/atk4JS.js @@ -0,0 +1,1283 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("jQuery")); + else if(typeof define === 'function' && define.amd) + define("atk4JS", ["jQuery"], factory); + else if(typeof exports === 'object') + exports["atk4JS"] = factory(require("jQuery")); + else + root["atk4JS"] = factory(root["jQuery"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 12); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Base implementation of jQuery plugin in Agile Toolkit. + * + */ + +var atkPlugin = function () { + + /** + * Default plugin constructor + * @param element + * @param options + * @returns {atkPlugin} + */ + function atkPlugin(element, options) { + _classCallCheck(this, atkPlugin); + + this.$el = (0, _jquery2.default)(element); + this.settings = options; + this.main(); + } + + /** + * The main plugin method. This is the method call by default + * when invoking the plugin on a jQuery element. + * $(selector).pluginName({}); + * The plugin should normally override this class. + */ + + + _createClass(atkPlugin, [{ + key: 'main', + value: function main() {} + + /** + * Call a plugin method via the initializer function. + * Simply call the method like: $(selector).pluginName('method', [arg1, arg2]) + * + * @param fn : string representing the method name to execute. + * @param args : array of arguments need for the method to execute. + * @returns {*} + */ + + }, { + key: 'call', + value: function call(fn, args) { + return this[fn].apply(this, _toConsumableArray(args)); + } + }]); + + return atkPlugin; +}(); + +exports.default = atkPlugin; +module.exports = exports['default']; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +var _ApiService = __webpack_require__(10); + +var _ApiService2 = _interopRequireDefault(_ApiService); + +var _ModalService = __webpack_require__(11); + +var _ModalService2 = _interopRequireDefault(_ModalService); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// setup app service for semantic-ui +_ApiService2.default.setService(_jquery2.default.fn.api.settings); +_ModalService2.default.setModals(_jquery2.default.fn.modal.settings); + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// Add atk namespace to jQuery global space. + +(function ($) { + if (!$.atk) { + $.atk = new Object(); + }; + + $.atk['addParams'] = function (url, data) { + if (!$.isEmptyObject(data)) { + url += (url.indexOf('?') >= 0 ? '&' : '?') + $.param(data); + } + + return url; + }; +})(jQuery); + +exports.default = function ($) { + $.atkAddParams = $.atk.addParams; +}(jQuery); + +module.exports = exports['default']; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.default = plugin; + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Generate a jQuery plugin + * @param name [string] Plugin name + * @param className [object] Class of the plugin + * @param shortHand [bool] Generate a shorthand as $.pluginName + * + * @example + * import plugin from 'plugin'; + * + * class MyPlugin { + * constructor(element, options) { + * // ... + * } + * } + * + * MyPlugin.DEFAULTS = {}; + * + * plugin('myPlugin', MyPlugin); + * + * credit : https://gist.github.com/monkeymonk/c08cb040431f89f99928132ca221d647 + * + * import $ from 'jquery' will bind '$' var to jQuery var without '$' var conflicting with other library + * in final webpack output. + */ + +function plugin(name, className) { + var shortHand = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + // Add atk namespace to jQuery global space. + if (!_jquery2.default.atk) { + _jquery2.default.atk = new Object(); + }; + + var pluginName = 'atk' + name; + var dataName = '__' + pluginName; + var old = _jquery2.default.fn[pluginName]; + + // add plugin to atk namespace. + _jquery2.default.atk[name] = className; + + // register plugin to jQuery fn prototype. + _jquery2.default.fn[pluginName] = function () { + var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + + // Check if we are calling a plugin specific function: $(element).plugin('function',[arg1, arg2]); + if (typeof option === 'string') { + if (this.data(dataName) && typeof this.data(dataName)[option] === 'function') { + return this.data(dataName)['call'](option, args); + } + } + + return this.each(function () { + var options = _jquery2.default.extend({}, className.DEFAULTS, (typeof option === 'undefined' ? 'undefined' : _typeof(option)) === 'object' && option); + // create plugin using the constructor function store in atk namespace object + // and add a reference of it to this jQuery object data. + (0, _jquery2.default)(this).data(dataName, new _jquery2.default.atk[name](this, options)); + }); + }; + + // - Short hand + if (shortHand) { + _jquery2.default[pluginName] = function (options) { + return (0, _jquery2.default)({})[pluginName](options); + }; + } + // - No conflict + _jquery2.default.fn[pluginName].noConflict = function () { + return _jquery2.default.fn[pluginName] = old; + }; +} +module.exports = exports['default']; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _atkPlugin2 = __webpack_require__(1); + +var _atkPlugin3 = _interopRequireDefault(_atkPlugin2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var ajaxec = function (_atkPlugin) { + _inherits(ajaxec, _atkPlugin); + + function ajaxec() { + _classCallCheck(this, ajaxec); + + return _possibleConstructorReturn(this, (ajaxec.__proto__ || Object.getPrototypeOf(ajaxec)).apply(this, arguments)); + } + + _createClass(ajaxec, [{ + key: 'main', + value: function main() { + //Allow user to confirm if available. + if (this.settings.confirm) { + if (confirm(this.settings.confirm)) { + this.doExecute(); + } + } else { + this.doExecute(); + } + } + }, { + key: 'doExecute', + value: function doExecute() { + this.$el.api({ + on: 'now', + url: this.settings.uri, + data: this.settings.uri_options, + method: 'POST', + obj: this.$el + }); + } + }]); + + return ajaxec; +}(_atkPlugin3.default); + +exports.default = ajaxec; + + +ajaxec.DEFAULTS = { + uri: null, + uri_options: {}, + confirm: null +}; +module.exports = exports['default']; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _atkPlugin2 = __webpack_require__(1); + +var _atkPlugin3 = _interopRequireDefault(_atkPlugin2); + +var _jquery = __webpack_require__(0); + +var _jquery2 = _interopRequireDefault(_jquery); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var createModal = function (_atkPlugin) { + _inherits(createModal, _atkPlugin); + + function createModal() { + _classCallCheck(this, createModal); + + return _possibleConstructorReturn(this, (createModal.__proto__ || Object.getPrototypeOf(createModal)).apply(this, arguments)); + } + + _createClass(createModal, [{ + key: 'main', + value: function main() { + var options = this.settings; + // make sure we have an object when no option is passed + if (_jquery2.default.isArray(options.uri_options)) { + options.uri_options = {}; + } + // create modal and add it to the DOM + var $m = (0, _jquery2.default)('