{"version":3,"sources":["components/linked-modals/LinkedModals.vue.js"],"names":["define","Vue","Modal","Object","prototype","hasOwnProperty","call","ExtensionObject","name","components","modal","props","modals","Array","methods","buttonClick","event","setTimeout","target","$","data","parent","modalTitle","id","match","this","find","title","mounted","global","self","window","_loop_1","one","load","selerix","applicationRoot","url","_i","_a","length","__vue_render__","_vm","_h","$createElement","_c","_self","_l","attrs","theme","scopedSlots","_u","key","fn","proxy","buttons","staticClass","button","bIndex","href","data-dismiss","data-target","on","click","domProps","textContent","_s","_v","_e","type","__vue_script__","extend","_withStripped","template","style","script","scopeId","isFunctionalTemplate","moduleIdentifier","shadowMode","createInjector","createInjectorSSR","createInjectorShadow","hook","options","render","staticRenderFns","_compiled","functional","_scopeId","context","$vnode","ssrContext","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","originalRender_1","h","existing","beforeCreate","concat","normalizeComponent","undefined"],"mappings":"AAAAA,OAAO,gEAAiE,CAAC,MAAO,kDAAmD,SAAUC,EAAKC,GAC9I,aACAD,EAAMA,GAAOE,OAAOC,UAAUC,eAAeC,KAAKL,EAAK,WAAaA,EAAa,QAAIA,EAErF,IAAIM,EAAkB,CAClBC,KAAM,gBACNC,WAAY,CACRC,MAJRR,EAAQA,GAASC,OAAOC,UAAUC,eAAeC,KAAKJ,EAAO,WAAaA,EAAe,QAAIA,GAMzFS,MAAO,CACHC,OAAQC,OAEZC,QAAS,CACLC,YAAa,SAAUC,GACnBC,WAAW,WACP,IAAIC,EAASC,EAAEH,EAAME,QAAQE,KAAK,WAAaD,EAAEH,EAAME,QAAQG,SAASD,KAAK,UAC7ED,EAAE,IAAMD,GAAQR,MAAM,SACvB,MAEPY,WAAY,SAAUC,GAClB,IAAIC,EAAQC,KAAKb,OAAOc,KAAK,SAAUhB,GAAS,OAAOA,EAAMa,KAAOA,IACpE,OAAQC,GAASA,EAAMG,OAAUJ,IAGzCK,QAAS,WAOL,IANA,IAAIC,EAASC,MAAQC,OACjB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AAQ5C,EAAgB6C,gBANvC,SAEFoB,EAI4GpC,OAHjHoC,GAEc,OADLA,GAEqM,OAAOA,OAAWA,OAAWA","file":"LinkedModals.vue.min.js","sourcesContent":["define('selerix_common/vues/components/linked-modals/LinkedModals.vue', ['vue', 'selerix_common/vues/components/modal/Modal.vue'], function (Vue, Modal) {\n 'use strict';\n Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue;\n Modal = Modal && Object.prototype.hasOwnProperty.call(Modal, 'default') ? Modal['default'] : Modal;\n var ExtensionObject = {\n name: 'linked-modals',\n components: {\n 'modal': Modal\n },\n props: {\n modals: Array\n },\n methods: {\n buttonClick: function (event) {\n setTimeout(function buttonClickTimeout() {\n var target = $(event.target).data('target') || $(event.target).parent().data('target');\n $('#' + target).modal('show');\n }, 500);\n },\n modalTitle: function (id) {\n var match = this.modals.find(function (modal) { return modal.id === id; });\n return (match && match.title) || id;\n }\n },\n mounted: function () {\n var global = self || window;\n var _loop_1 = function (modal) {\n $('#' + modal.id).one('show.bs.modal', function () {\n $('#' + modal.id + ' .modal-body').load(global.selerix.applicationRoot + modal.url);\n });\n };\n for (var _i = 0, _a = this.modals; _i < _a.length; _i++) {\n var modal = _a[_i];\n _loop_1(modal);\n }\n }\n };\n var script = Vue.extend(ExtensionObject);\n function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\n if (typeof shadowMode !== 'boolean') {\n createInjectorSSR = createInjector;\n createInjector = shadowMode;\n shadowMode = false;\n }\n var options = typeof script === 'function' ? script.options : script;\n if (template && template.render) {\n options.render = template.render;\n options.staticRenderFns = template.staticRenderFns;\n options._compiled = true;\n if (isFunctionalTemplate) {\n options.functional = true;\n }\n }\n if (scopeId) {\n options._scopeId = scopeId;\n }\n var hook;\n if (moduleIdentifier) {\n hook = function (context) {\n context =\n context ||\n (this.$vnode && this.$vnode.ssrContext) ||\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext);\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__;\n }\n if (style) {\n style.call(this, createInjectorSSR(context));\n }\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier);\n }\n };\n options._ssrRegister = hook;\n }\n else if (style) {\n hook = shadowMode\n ? function (context) {\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\n }\n : function (context) {\n style.call(this, createInjector(context));\n };\n }\n if (hook) {\n if (options.functional) {\n var originalRender_1 = options.render;\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context);\n return originalRender_1(h, context);\n };\n }\n else {\n var existing = options.beforeCreate;\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\n }\n }\n return script;\n }\n var __vue_script__ = script;\n var __vue_render__ = function () {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"div\", _vm._l(_vm.modals, function (modal) {\n return _c(\"div\", [\n _c(\"modal\", {\n attrs: { title: modal.title, theme: modal.theme, id: modal.id },\n scopedSlots: _vm._u([\n {\n key: \"body\",\n fn: function () {\n return [_c(\"div\")];\n },\n proxy: true\n },\n {\n key: \"buttons\",\n fn: function (buttons) {\n return [\n _c(\"div\", { staticClass: \"pull-left\" }, _vm._l(modal.buttons, function (button, bIndex) {\n return _c(\"span\", [\n _c(\"a\", {\n attrs: {\n href: \"#\",\n \"data-dismiss\": \"modal\",\n \"data-target\": button\n },\n on: { click: _vm.buttonClick }\n }, [\n _c(\"u\", {\n domProps: {\n textContent: _vm._s(_vm.modalTitle(button))\n }\n })\n ]),\n _vm._v(\" \"),\n bIndex < modal.buttons.length - 1\n ? _c(\"span\", [_vm._v(\" | \")])\n : _vm._e()\n ]);\n }), 0),\n _vm._v(\" \"),\n _c(\"button\", {\n staticClass: \"btn btn-sm btn-default\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" }\n }, [_vm._v(\"OK\")])\n ];\n }\n }\n ], null, true)\n })\n ], 1);\n }), 0);\n };\n var __vue_staticRenderFns__ = [];\n __vue_render__._withStripped = true;\n var __vue_inject_styles__ = undefined;\n var __vue_scope_id__ = undefined;\n var __vue_module_identifier__ = undefined;\n var __vue_is_functional_template__ = false;\n var __vue_component__ = normalizeComponent({ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);\n return __vue_component__;\n});\n"]}