com.mware.web.product.map.dist.actions-impl.js.map Maven / Gradle / Ivy
The newest version!
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 00cf0e367db65cd08da5","webpack:///actions-impl.js","webpack:///./worker/actions-impl.js","webpack:///external {\"amd\":\"data/web-worker/store/actions\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"data/web-worker/store/product/actions-impl\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"data/web-worker/store/product/selectors\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"data/web-worker/store/element/selectors\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"data/web-worker/store/element/actions-impl\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"data/web-worker/store/selection/actions-impl\",\"commonjs2\":false,\"commonjs\":false}","webpack:///external {\"amd\":\"data/web-worker/util/ajax\",\"commonjs2\":false,\"commonjs\":false}"],"names":["root","factory","exports","module","require","define","amd","undefined","self","this","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","__WEBPACK_EXTERNAL_MODULE_4__","__WEBPACK_EXTERNAL_MODULE_5__","__WEBPACK_EXTERNAL_MODULE_6__","__WEBPACK_EXTERNAL_MODULE_7__","__webpack_require__","moduleId","installedModules","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_toConsumableArray","arr","Array","isArray","arr2","length","from","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_extends","assign","target","arguments","source","key","actions","productActions","productSelectors","elementSelectors","elementActions","selectionActions","ajax","protectFromMain","api","dropElements","productId","elements","undoable","dispatch","getState","state","workspaceId","workspace","currentId","vertexIds","edgeIds","fetchEdgeIds","edgeVertexIds","forEach","edgeId","edge","element","edges","push","inVertexId","outVertexId","then","_","flatten","map","e","concat","Promise","resolve","result","product","getProductsById","existing","extendedData","keys","vertices","combined","without","uniq","pluck","undoPayload","undoScope","undo","redo","type","payload","updates","id","select","redoDropElements","productElements","getElements","validElements","authorizedElements","mapObject","eles","pick","productEle","setElementData","removeElements","byId","editable","remove","selection","setLayerOrder","layerOrder","workspaces","products","layerExtendedData","updateExtendedData","value"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,EAAQG,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,IACxG,kBAAXC,SAAyBA,OAAOC,IAC9CD,QAAQ,gCAAiC,6CAA8C,0CAA2C,0CAA2C,6CAA8C,+CAAgD,6BAA8BJ,GAC/Q,gBAAZC,SACdA,QAAQ,gBAAkBD,EAAQG,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,GAAQA,SAAQ,IAE1IJ,EAAK,gBAAkBC,EAAQD,MAAKO,IAAYP,MAAKO,IAAYP,MAAKO,IAAYP,MAAKO,IAAYP,MAAKO,IAAYP,MAAKO,IAAYP,MAAKO,MACzH,mBAATC,MAAuBA,KAAOC,KAAM,SAASC,EAA+BC,EAA+BC,EAA+BC,EAA+BC,EAA+BC,EAA+BC,GACjP,M,aCNE,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUhB,OAGnC,IAAIC,GAASgB,EAAiBD,IAC7BE,EAAGF,EACHG,GAAG,EACHnB,WAUD,OANAoB,GAAQJ,GAAUK,KAAKpB,EAAOD,QAASC,EAAQA,EAAOD,QAASe,GAG/Dd,EAAOkB,GAAI,EAGJlB,EAAOD,QAvBf,GAAIiB,KA4DJ,OAhCAF,GAAoBO,EAAIF,EAGxBL,EAAoBQ,EAAIN,EAGxBF,EAAoB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AAWR,EAASQ,eAK1FuD,cAAe,eAAGhE,GAAH,EAAGA,UAAWiE,EAAd,EAAcA,UAAd,OAA+B,UAAC9D,EAAUC,GACrD,GAAMC,GAAQD,IACRE,EAAcD,EAAME,UAAUC,UAC9BD,EAAYF,EAAME,UAAUqD,KAAKtD,GACjCwB,EAAUzB,EAAMyB,QAAQoC,WAAW5D,GAAa6D,SAASnE,GAEzDoE,EAAoBtC,EAAQG,cAAgBH,EAAQG,aAAa,4BAGnE1B,GAAUsD,UACV1D,EAASZ,EAAe8E,oBACpBhF,IAAK,4BACLiF,WAAYF,GAAmBH,eAC/BjE,iBAMhB,OAAOF,IAvMX,4BD4SM,SAAU/D,EAAQD,GEhVxBC,EAAOD,QAAUQ,GFsVX,SAAUP,EAAQD,GGtVxBC,EAAOD,QAAUS,GH4VX,SAAUR,EAAQD,GI5VxBC,EAAOD,QAAUU,GJkWX,SAAUT,EAAQD,GKlWxBC,EAAOD,QAAUW,GLwWX,SAAUV,EAAQD,GMxWxBC,EAAOD,QAAUY,GN8WX,SAAUX,EAAQD,GO9WxBC,EAAOD,QAAUa,GPoXX,SAAUZ,EAAQD,GQpXxBC,EAAOD,QAAUc","file":"actions-impl.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(false), require(false), require(false), require(false), require(false), require(false), require(false));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"data/web-worker/store/actions\", \"data/web-worker/store/product/actions-impl\", \"data/web-worker/store/product/selectors\", \"data/web-worker/store/element/selectors\", \"data/web-worker/store/element/actions-impl\", \"data/web-worker/store/selection/actions-impl\", \"data/web-worker/util/ajax\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"actions-impl\"] = factory(require(false), require(false), require(false), require(false), require(false), require(false), require(false));\n\telse\n\t\troot[\"actions-impl\"] = factory(root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 00cf0e367db65cd08da5","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(false), require(false), require(false), require(false), require(false), require(false), require(false));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"data/web-worker/store/actions\", \"data/web-worker/store/product/actions-impl\", \"data/web-worker/store/product/selectors\", \"data/web-worker/store/element/selectors\", \"data/web-worker/store/element/actions-impl\", \"data/web-worker/store/selection/actions-impl\", \"data/web-worker/util/ajax\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"actions-impl\"] = factory(require(false), require(false), require(false), require(false), require(false), require(false), require(false));\n\telse\n\t\troot[\"actions-impl\"] = factory(root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined], root[undefined]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _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); } }\n\n/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(2), __webpack_require__(3), __webpack_require__(4), __webpack_require__(5), __webpack_require__(6), __webpack_require__(7)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (actions, productActions, productSelectors, elementSelectors, elementActions, selectionActions, ajax) {\n\n actions.protectFromMain();\n\n var api = {\n dropElements: function dropElements(_ref) {\n var productId = _ref.productId,\n elements = _ref.elements,\n undoable = _ref.undoable;\n return function (dispatch, getState) {\n var state = getState();\n var workspaceId = state.workspace.currentId;\n var vertexIds = elements.vertexIds,\n edgeIds = elements.edgeIds;\n\n var fetchEdgeIds = [];\n var edgeVertexIds = [];\n\n if (edgeIds && edgeIds.length) {\n edgeIds.forEach(function (edgeId) {\n var edge = state.element[workspaceId].edges[edgeId];\n if (edge) {\n edgeVertexIds.push(edge.inVertexId, edge.outVertexId);\n } else {\n fetchEdgeIds.push(edgeId);\n }\n });\n }\n\n var edges = fetchEdgeIds.length ? ajax('POST', '/edge/multiple', { edgeIds: fetchEdgeIds }).then(function (_ref2) {\n var edges = _ref2.edges;\n\n return _.flatten(edges.map(function (e) {\n return [e.inVertexId, e.outVertexId];\n })).concat(edgeVertexIds);\n }) : Promise.resolve([]);\n\n edges.then(function (result) {\n var _ref3;\n\n var product = productSelectors.getProductsById(getState())[productId];\n var existing = product.extendedData ? Object.keys(product.extendedData.vertices) : [];\n var combined = (_ref3 = _).without.apply(_ref3, [_.uniq(result.concat(edgeVertexIds, vertexIds))].concat(_toConsumableArray(_.pluck(existing, 'id'))));\n\n if (!combined.length) return;\n\n var undoPayload = {};\n if (undoable) {\n undoPayload = {\n undoScope: productId,\n undo: {\n productId: productId,\n elements: { vertexIds: combined }\n },\n redo: {\n productId: productId,\n elements: elements\n }\n };\n }\n\n dispatch({\n type: 'PRODUCT_MAP_ADD_ELEMENTS',\n payload: _extends({\n workspaceId: workspaceId,\n productId: productId,\n vertexIds: combined\n }, undoPayload)\n });\n\n ajax('POST', '/product/map/vertices/update', {\n productId: productId,\n updates: _.object(combined.map(function (id) {\n return [id, {}];\n }))\n }).then(function () {\n dispatch(elementActions.get({ workspaceId: workspaceId, vertexIds: combined }));\n });\n dispatch(productActions.select({ productId: productId }));\n });\n };\n },\n\n redoDropElements: function redoDropElements(_ref4) {\n var productId = _ref4.productId,\n productElements = _ref4.elements;\n return function (dispatch, getState) {\n var state = getState();\n var elements = elementSelectors.getElements(state);\n var validElements = void 0;\n var authorizedElements = _.mapObject(productElements, function (eles, type) {\n return _.pick(eles[type], function (productEle, id) {\n if (elements[type][id]) {\n validElements = true;\n return true;\n } else {\n return false;\n }\n });\n });\n\n if (validElements) {\n return api.dropElements({ productId: productId, authorizedElements: authorizedElements });\n }\n };\n },\n\n setElementData: function setElementData(_ref5) {\n var productId = _ref5.productId,\n elements = _ref5.elements,\n undoable = _ref5.undoable;\n return function (dispatch, getState) {\n var _ref6;\n\n var state = getState();\n var workspaceId = state.workspace.currentId;\n var product = productSelectors.getProductsById(state)[productId];\n var existing = product.extendedData ? Object.keys(product.extendedData.vertices) : [];\n var combined = (_ref6 = _).without.apply(_ref6, [elements.vertexIds].concat(_toConsumableArray(_.pluck(existing, 'id'))));\n\n var undoPayload = {};\n if (undoable) {\n undoPayload = {\n undoScope: productId,\n undo: {\n productId: productId,\n elements: { vertexIds: combined }\n },\n redo: {\n productId: productId,\n elements: elements\n }\n };\n }\n\n dispatch({\n type: 'PRODUCT_MAP_ADD_ELEMENTS',\n payload: _extends({\n workspaceId: workspaceId,\n productId: productId,\n elements: elements\n }, undoPayload)\n });\n };\n },\n\n removeElements: function removeElements(_ref7) {\n var productId = _ref7.productId,\n elements = _ref7.elements,\n undoable = _ref7.undoable;\n return function (dispatch, getState) {\n var state = getState();\n var workspaceId = state.workspace.currentId;\n var workspace = state.workspace.byId[workspaceId];\n if (workspace.editable && elements && elements.vertexIds && elements.vertexIds.length) {\n var undoPayload = {};\n if (undoable) {\n undoPayload = {\n undoScope: productId,\n undo: {\n productId: productId,\n elements: elements\n },\n redo: {\n productId: productId,\n elements: elements\n }\n };\n }\n\n dispatch({\n type: 'PRODUCT_MAP_REMOVE_ELEMENTS',\n payload: _extends({\n elements: elements,\n productId: productId,\n workspaceId: workspaceId\n }, undoPayload)\n });\n dispatch(selectionActions.remove({\n selection: { vertices: elements.vertexIds }\n }));\n\n if (elements.vertexIds.length) {\n ajax('POST', '/product/map/vertices/remove', { productId: productId, vertexIds: elements.vertexIds });\n }\n }\n };\n },\n\n setLayerOrder: function setLayerOrder(_ref8) {\n var productId = _ref8.productId,\n layerOrder = _ref8.layerOrder;\n return function (dispatch, getState) {\n var state = getState();\n var workspaceId = state.workspace.currentId;\n var workspace = state.workspace.byId[workspaceId];\n var product = state.product.workspaces[workspaceId].products[productId];\n\n var layerExtendedData = product.extendedData && product.extendedData['org-bigconnect-map-layers'];\n\n if (workspace.editable) {\n dispatch(productActions.updateExtendedData({\n key: 'org-bigconnect-map-layers',\n value: _extends({}, layerExtendedData, { layerOrder: layerOrder }),\n productId: productId\n }));\n }\n };\n }\n };\n\n return api;\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_6__;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// actions-impl.js","/*\n * This file is part of the BigConnect project.\n *\n * Copyright (c) 2013-2020 MWARE SOLUTIONS SRL\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License version 3\n * as published by the Free Software Foundation with the addition of the\n * following permission added to Section 15 as permitted in Section 7(a):\n * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY\n * MWARE SOLUTIONS SRL, MWARE SOLUTIONS SRL DISCLAIMS THE WARRANTY OF\n * NON INFRINGEMENT OF THIRD PARTY RIGHTS\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE.\n * See the GNU Affero General Public License for more details.\n * You should have received a copy of the GNU Affero General Public License\n * along with this program; if not, see http://www.gnu.org/licenses or write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA, 02110-1301 USA, or download the license from the following URL:\n * https://www.gnu.org/licenses/agpl-3.0.txt\n *\n * The interactive user interfaces in modified source and object code versions\n * of this program must display Appropriate Legal Notices, as required under\n * Section 5 of the GNU Affero General Public License.\n *\n * You can be released from the requirements of the license by purchasing\n * a commercial license. Buying such a license is mandatory as soon as you\n * develop commercial activities involving the BigConnect software without\n * disclosing the source code of your own applications.\n *\n * These activities include: offering paid services to customers as an ASP,\n * embedding the product in a web application, shipping BigConnect with a\n * closed source product.\n */\ndefine([\n 'data/web-worker/store/actions',\n 'data/web-worker/store/product/actions-impl',\n 'data/web-worker/store/product/selectors',\n 'data/web-worker/store/element/selectors',\n 'data/web-worker/store/element/actions-impl',\n 'data/web-worker/store/selection/actions-impl',\n 'data/web-worker/util/ajax'\n], function(\n actions,\n productActions,\n productSelectors,\n elementSelectors,\n elementActions,\n selectionActions,\n ajax) {\n\n actions.protectFromMain();\n\n const api = {\n dropElements: ({ productId, elements, undoable }) => (dispatch, getState) => {\n const state = getState();\n const workspaceId = state.workspace.currentId;\n const { vertexIds, edgeIds } = elements;\n const fetchEdgeIds = [];\n const edgeVertexIds = [];\n\n if (edgeIds && edgeIds.length) {\n edgeIds.forEach(edgeId => {\n const edge = state.element[workspaceId].edges[edgeId];\n if (edge) {\n edgeVertexIds.push(edge.inVertexId, edge.outVertexId);\n } else {\n fetchEdgeIds.push(edgeId);\n }\n });\n }\n\n var edges = fetchEdgeIds.length ? (\n ajax('POST', '/edge/multiple', { edgeIds: fetchEdgeIds })\n .then(({ edges }) => {\n return _.flatten(edges.map(e => [e.inVertexId, e.outVertexId])).concat(edgeVertexIds);\n })\n ) : Promise.resolve([]);\n\n edges.then((result) => {\n const product = productSelectors.getProductsById(getState())[productId];\n const existing = product.extendedData ? Object.keys(product.extendedData.vertices) : [];\n const combined = _.without(_.uniq(result.concat(edgeVertexIds, vertexIds)), ..._.pluck(existing, 'id'));\n\n if (!combined.length) return;\n\n let undoPayload = {};\n if (undoable) {\n undoPayload = {\n undoScope: productId,\n undo: {\n productId,\n elements: { vertexIds: combined }\n },\n redo: {\n productId,\n elements\n }\n };\n }\n\n dispatch({\n type: 'PRODUCT_MAP_ADD_ELEMENTS',\n payload: {\n workspaceId,\n productId,\n vertexIds: combined,\n ...undoPayload\n }\n });\n\n ajax('POST', '/product/map/vertices/update', {\n productId,\n updates: _.object(combined.map(id => [id, {}]))\n }).then(() => {\n dispatch(elementActions.get({ workspaceId, vertexIds: combined }));\n })\n dispatch(productActions.select({ productId }));\n })\n },\n\n redoDropElements: ({ productId, elements: productElements }) => (dispatch, getState) => {\n const state = getState();\n const elements = elementSelectors.getElements(state);\n let validElements;\n const authorizedElements = _.mapObject(productElements, (eles, type) => (\n _.pick(eles[type], (productEle, id) => {\n if (elements[type][id]) {\n validElements = true;\n return true;\n } else {\n return false;\n }\n })\n ));\n\n if (validElements) {\n return api.dropElements({ productId, authorizedElements })\n }\n\n },\n\n setElementData: ({ productId, elements, undoable }) => (dispatch, getState) => {\n const state = getState();\n const workspaceId = state.workspace.currentId;\n const product = productSelectors.getProductsById(state)[productId];\n const existing = product.extendedData ? Object.keys(product.extendedData.vertices) : [];\n const combined = _.without(elements.vertexIds, ..._.pluck(existing, 'id'));\n\n let undoPayload = {};\n if (undoable) {\n undoPayload = {\n undoScope: productId,\n undo: {\n productId,\n elements: { vertexIds: combined }\n },\n redo: {\n productId,\n elements\n }\n };\n }\n\n dispatch({\n type: 'PRODUCT_MAP_ADD_ELEMENTS',\n payload: {\n workspaceId,\n productId,\n elements,\n ...undoPayload\n }\n });\n },\n\n removeElements: ({ productId, elements, undoable }) => (dispatch, getState) => {\n const state = getState();\n const workspaceId = state.workspace.currentId;\n const workspace = state.workspace.byId[workspaceId];\n if (workspace.editable && elements && elements.vertexIds && elements.vertexIds.length) {\n let undoPayload = {};\n if (undoable) {\n undoPayload = {\n undoScope: productId,\n undo: {\n productId,\n elements\n },\n redo: {\n productId,\n elements\n }\n };\n }\n\n dispatch({\n type: 'PRODUCT_MAP_REMOVE_ELEMENTS',\n payload: {\n elements,\n productId,\n workspaceId,\n ...undoPayload\n }\n });\n dispatch(selectionActions.remove({\n selection: { vertices: elements.vertexIds }\n }));\n\n if (elements.vertexIds.length) {\n ajax('POST', '/product/map/vertices/remove', { productId, vertexIds: elements.vertexIds })\n }\n }\n },\n\n setLayerOrder: ({ productId, layerOrder }) => (dispatch, getState) => {\n const state = getState();\n const workspaceId = state.workspace.currentId;\n const workspace = state.workspace.byId[workspaceId];\n const product = state.product.workspaces[workspaceId].products[productId];\n\n const layerExtendedData = product.extendedData && product.extendedData['org-bigconnect-map-layers'];\n\n\n if (workspace.editable) {\n dispatch(productActions.updateExtendedData({\n key: 'org-bigconnect-map-layers',\n value: { ...layerExtendedData, layerOrder },\n productId\n }));\n }\n }\n };\n\n return api;\n})\n\n\n\n\n// WEBPACK FOOTER //\n// ./worker/actions-impl.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/store/actions\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 1\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/store/product/actions-impl\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 2\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/store/product/selectors\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 3\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/store/element/selectors\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 4\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/store/element/actions-impl\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 5\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_6__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/store/selection/actions-impl\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 6\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_7__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"data/web-worker/util/ajax\",\"commonjs2\":false,\"commonjs\":false}\n// module id = 7\n// module chunks = 0"],"sourceRoot":""}