lib/assets/javascripts/scrivito.js in scrivito_sdk-1.11.0 vs lib/assets/javascripts/scrivito.js in scrivito_sdk-1.12.0.rc1

- old
+ new

@@ -1,161 +2 @@ -/******/ (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 = 1143); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 1143: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _install_rails_api_fallback = __webpack_require__(213); - -var _install_rails_api_fallback2 = _interopRequireDefault(_install_rails_api_fallback); - -var _connect_to_ui = __webpack_require__(79); - -var _connect_to_ui2 = _interopRequireDefault(_connect_to_ui); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/* - * This is the webpack entry file used by Rails-only application (without JS SDK) - */ -var ui = (0, _connect_to_ui2.default)(); - -if (ui) { - ui.installRailsApi(); -} else { - (0, _install_rails_api_fallback2.default)(); -} - -/***/ }), - -/***/ 213: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = installRailsApiFallback; -function installRailsApiFallback() { - // If the SDK is completely missing, the custom callbacks should nevertheless run. - if (!window.scrivito) { - window.scrivito = {}; - } - - if (!window.scrivito.on) { - window.scrivito.on = function (eventName, callback) { - if (eventName === 'content') { - document.addEventListener('DOMContentLoaded', function () { - return callback(window.document); - }); - } - }; - } - - if (!window.scrivito.in_editable_view) { - window.scrivito.in_editable_view = function () { - return false; - }; - } -} - -/***/ }), - -/***/ 79: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = connectToUi; -// checks whether the UI is present -// if so, returns an instance of UiConnection -function connectToUi() { - // check if there's a parent frame - if (window.parent === window) { - return; - } - - var connectAppDocument = window.parent.connectAppDocument; - if (connectAppDocument) { - return connectAppDocument(window.document); - } -} - -/***/ }) - -/******/ }); +!function(n){function t(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=619)}({137:function(n,t,e){"use strict";function o(){if(window.parent!==window){var n=window.parent.connectAppDocument;return n?n(window.document):void 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},257:function(n,t,e){"use strict";function o(){window.scrivito||(window.scrivito={}),window.scrivito.on||(window.scrivito.on=function(n,t){"content"===n&&document.addEventListener("DOMContentLoaded",function(){return t(window.document)})}),window.scrivito.in_editable_view||(window.scrivito.in_editable_view=function(){return!1})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},619:function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{default:n}}var i=e(257),r=o(i),u=e(137),c=o(u),d=(0,c.default)();d?d.installRailsApi():(0,r.default)()}}); \ No newline at end of file