{"version":3,"sources":["webpack://[name]/webpack/bootstrap","webpack://[name]/./Scripts/EditableTextParser.ts"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;ACjFA,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;IACd,IAAI,kBAAkB,EAAE,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH;IAQI;QAAA,iBAEC;QARQ,gBAAW,GAAG,KAAK,CAAC;QAIrB,mCAA8B,GAAG,KAAK,CAAC;QAMvC,SAAI,GAAG;YACX,IAAI,CAAC,KAAI,CAAC,WAAW,EAAE;gBACnB,KAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC1B,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC;aAC3B;QACL,CAAC;QAEO,uBAAkB,GAAG;YAEzB,IAAI,IAAI,GAAG,KAAI,CAAC;YAEhB,2EAA2E;YAC3E,IAAI,mBAAmB,GAAG,CAAC,CAAC,6CAA6C,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAC;YAC5H,IAAI,mBAAmB,GAAG,CAAC,CAAC,4CAA4C,CAAC,CAAC,GAAG,CAAC,CAA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oBAClD,qGAAqG;oBACrG,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;iBAC3G;YACL,CAAC,CAAC,CAAC;SACN;aACI,IAAI,OAAO,KAAK,MAAM,EAAE;YAEzB,sFAAsF;YACtF,IAAM,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,uBAAuB,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;YAClE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,2BAA2B,CAAC,CAAC;YAEpE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC;YACpD,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;YAEhC,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE;gBAEjC,IAAI;oBACA,YAAY,GAAG,CAAC,CAAC,gCAAgC,CAAC,CAAC,GAAG,EAAE,CAAC;iBAC5D;wBACO;oBACJ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;oBAClD,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;iBACzG;YACL,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IACL,yBAAC;AAAD,CAAC;AA1MY,gDAAkB","file":"editableTextParser.bundle.js","sourcesContent":[" \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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","\r\n$(document).ready(function () {\r\n new EditableTextParser();\r\n});\r\n\r\nexport class EditableTextParser {\r\n\r\n private initialised = false;\r\n private _modalEditorContainer: JQuery; \r\n private _modalEditorTarget: JQuery;\r\n private _toggleEditorButton: JQuery;\r\n private _textEditorPlaceholderIsLoaded = false;\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n private init = (): void => {\r\n if (!this.initialised) {\r\n this.parseEditableTexts();\r\n this.initialised = true;\r\n }\r\n }\r\n\r\n private parseEditableTexts = (): void => {\r\n\r\n let self = this;\r\n\r\n // the edit buttons may alternatively be anchors (if using the 'TM' option)\r\n let editableTextButtons = $(\"button[data-editable-supportshtml|='false']\").add($(\"a[data-editable-supportshtml|='false']\"));\r\n let editableHtmlButtons = $(\"button[data-editable-supportshtml|='true']\").add($(\"a[data-editable-supportshtml|='true']\"));\r\n\r\n // hack a placeholder into the DOM that will be where the modal editor gets loaded\r\n // (since users won't want to know about having to place that into their views themselves)\r\n let placeholderdiv = document.createElement(\"div\");\r\n placeholderdiv.setAttribute(\"id\", \"TextEditorPlaceholder\");\r\n $(\"body\").append(placeholderdiv);\r\n\r\n // each edit button has an action to invoke the editor with a model\r\n // derived from its own data properties\r\n editableTextButtons.each((i, elem) => {\r\n\r\n // load placeholder partial view - just a container for a modal editor, to be loaded later\r\n // but is needs to be tenant-aware, hence is computed on the taghelper and passed across to here\r\n self.loadTextEditorPlaceholder(elem.dataset.editablePlaceholderroute);\r\n\r\n elem.onclick = function () {\r\n\r\n // $(this) is the identifier of the button that got clicked on, \r\n // which is given data attributes by the taghelper 'EditableTextPackElement'\r\n self.loadTextpackEditor($(this)[0].dataset.editableClassname,\r\n $(this)[0].dataset.editableElementname,\r\n $(this)[0].dataset.editableScopetype,\r\n $(this)[0].dataset.editableIdentifier,\r\n $(this)[0].dataset.editableTextvalue,\r\n $(this)[0].dataset.editableEditorroute, // passing a tenant-aware controller route here for the editor partial view\r\n false\r\n );\r\n };\r\n\r\n // flag to say it's been done\r\n elem.setAttribute(\"EditableTextParsed\", \"true\");\r\n })\r\n\r\n editableHtmlButtons.each((i, elem) => {\r\n\r\n self.loadTextEditorPlaceholder(elem.dataset.editablePlaceholderroute);\r\n\r\n elem.onclick = function () {\r\n\r\n // $(this) is the identifier of the button that got clicked on, \r\n // which is given data attributes by the taghelper 'EditableTextPackElement'\r\n self.loadTextpackHtmlEditor($(this)[0].dataset.editableClassname,\r\n $(this)[0].dataset.editableElementname,\r\n $(this)[0].dataset.editableScopetype,\r\n $(this)[0].dataset.editableIdentifier,\r\n $(this)[0].dataset.editableTextvalue,\r\n $(this)[0].dataset.editableEditorroute\r\n );\r\n };\r\n\r\n // flag to say it's been done\r\n elem.setAttribute(\"EditableTextParsed\", \"true\");\r\n })\r\n }\r\n\r\n // controller loads placeholder partial view for editing modal\r\n private loadTextEditorPlaceholder = (controllerPath) => {\r\n let self = this;\r\n if (self._textEditorPlaceholderIsLoaded === false) {\r\n $(\"#TextEditorPlaceholder\").load(controllerPath);\r\n self._textEditorPlaceholderIsLoaded = true;\r\n }\r\n }\r\n\r\n private loadTextpackEditor = (className, elementName, scopeType, identifier, textValue, editorRoute, supportsHtml): void => {\r\n\r\n let self = this;\r\n\r\n // alert(editorRoute);\r\n\r\n self._modalEditorTarget = $(\"#TextpackEditorTarget\");\r\n self._modalEditorContainer = $('#TextpackEditorContainer').modal({ show: false });\r\n\r\n let model = {\r\n \"ClassName\" : className,\r\n \"KeyName\" : elementName,\r\n \"ScopeType\" : scopeType,\r\n \"Identifier\": identifier,\r\n \"NewValue\" : textValue\r\n }\r\n\r\n // get the editing partial view and load it into the placeholder in the modal\r\n // Note that this passes a model and hence is POSTing to get the partial view.\r\n self._modalEditorTarget.load(editorRoute, model, function () {\r\n\r\n self._modalEditorContainer.modal('show');\r\n\r\n // a button on the shown modal may need to be hooked up to toggle to html editor\r\n if (supportsHtml === true) {\r\n self.toggleEditorButton(className, elementName, scopeType, identifier, textValue, editorRoute, 'html')\r\n }\r\n });\r\n }\r\n\r\n private loadTextpackHtmlEditor = (className, elementName, scopeType, identifier, textValue, editorRoute): void => {\r\n \r\n let self = this;\r\n\r\n // alert(editorRoute);\r\n\r\n self._modalEditorTarget = $(\"#TextpackEditorTarget\");\r\n self._modalEditorContainer = $('#TextpackEditorContainer').modal({ show: false });\r\n\r\n let model = {\r\n \"ClassName\": className,\r\n \"KeyName\": elementName,\r\n \"ScopeType\": scopeType,\r\n \"Identifier\": identifier,\r\n \"NewValue\": textValue\r\n }\r\n\r\n // get the editing partial view and load it into the placeholder in the modal\r\n // Note that this passes a model and hence is POSTing to get the partial view.\r\n self._modalEditorTarget.load(editorRoute, model, function () {\r\n\r\n self._modalEditorContainer.modal('show');\r\n\r\n // a button on the shown modal needs to be hooked up to toggle to plain editor\r\n self.toggleEditorButton(className, elementName, scopeType, identifier, textValue, editorRoute, 'plain')\r\n });\r\n }\r\n\r\n\r\n // not used at the moment, but I've a feeling I'll be back here - jk\r\n private htmlDecode(input) {\r\n let doc = new DOMParser().parseFromString(input, \"text/html\");\r\n return doc.documentElement.textContent;\r\n }\r\n\r\n\r\n private toggleEditorButton(className, elementName, scopeType, identifier, textValue, editorRoute, goingTo) {\r\n\r\n let self = this;\r\n let modifiedText = textValue;\r\n\r\n if (goingTo === 'plain')\r\n {\r\n // change the controller route to the other editor type using case insensitive replace\r\n const reg = new RegExp('(' + 'TextPackHtmlElementEditor' + ')', 'gi');\r\n editorRoute = editorRoute.replace(reg, \"TextPackElementEditor\");\r\n\r\n self._toggleEditorButton = $(\"#ToggleToPlainEditor\");\r\n\r\n self._toggleEditorButton.on(\"click\", function () {\r\n\r\n try {\r\n modifiedText = window[\"CKEDITOR\"].instances.NewValue.getData();\r\n }\r\n finally {\r\n self._modalEditorContainer.modal({ show: false });\r\n // since we are coming from html, then 'true' to enable UI button in plain Modal, to get back to Html\r\n self.loadTextpackEditor(className, elementName, scopeType, identifier, modifiedText, editorRoute, true);\r\n }\r\n });\r\n }\r\n else if (goingTo === 'html') {\r\n\r\n // change the controller route to the other editor type using case insensitive replace\r\n const reg = new RegExp('(' + 'TextPackElementEditor' + ')', 'gi');\r\n editorRoute = editorRoute.replace(reg, \"TextPackHtmlElementEditor\");\r\n\r\n self._toggleEditorButton = $(\"#ToggleToHtmlEditor\");\r\n self._toggleEditorButton.show();\r\n\r\n self._toggleEditorButton.on(\"click\", function () {\r\n\r\n try {\r\n modifiedText = $(\"textarea#NewValue.form-control\").val();\r\n }\r\n finally {\r\n self._modalEditorContainer.modal({ show: false });\r\n self.loadTextpackHtmlEditor(className, elementName, scopeType, identifier, modifiedText, editorRoute);\r\n }\r\n });\r\n }\r\n }\r\n}"],"sourceRoot":""}