{"version":3,"sources":["webpack:///./src/components/shared/core/menu/popover/ImportFilePopoverMenu.vue","webpack:///src/components/shared/core/menu/popover/ImportFilePopoverMenu.vue","webpack:///./src/components/shared/core/menu/popover/ImportFilePopoverMenu.vue?072f","webpack:///./src/components/shared/core/menu/popover/ImportFilePopoverMenu.vue?a50c","webpack:///./src/mixins/shared/alertable/alertableMixin.js","webpack:///./src/mixins/shared/base/popover/popoverMenuMixin.js"],"names":["render","_vm","this","_c","_self","_g","_b","attrs","scopedSlots","_u","key","fn","_v","_s","menuTitle","proxy","menuIcon","on","closePopoverMenu","iconClose","closePopoverTooltip","isAlertDismissible","currentAlertType","model","value","showAlert","callback","$$v","expression","domProps","alertMessage","hasPages","checkInFileOptions","defaultCheckInFileOption","uploadFileProgress","inputType","isSignedCheckin","onFileInputChange","onCheckInOptionChange","directives","name","rawName","isDocumentViewer","hasUploadOptions","uploadOptionsList","isSmallDevice","staticClass","checkInOption","uploadFileInput","onOkay","menuOkCommandLabel","$attrs","$listeners","staticRenderFns","inheritAttrs","mixins","popoverMenuMixin","fileCheckInMixin","components","LayoutPopoverMenu","BaseButton","BaseTooltipButton","CheckInFile","CheckInOption","ExpansionPanelsLayout","CoreChipGroup","props","currentRecord","undefined","type","Boolean","default","progress","Number","required","importEvent","Function","isDocumentOpened","data","iconImport","currentSelectedOption","createCheckInOption","computed","isViewer","record","_this$currentRecord","operation","findImageOperation","imageOperation","Import","operationLabel","_this$operation","label","_this$operation2","icon","_this$operation3","closePopoverLabel","action","_this$record","recordType","fullRecordVersionName","$vuetify","breakpoint","smOnly","xsOnly","recordExtension","_ref","_localFileFirstOrDefa","_this$record2","localFileFirstOrDefaultExtension","extension","isFilePdf","methods","file","ext","toLowerCaseSafe","getImportedFileExtension","console","log","isDocumentViewerSupportingFileExtension","extensionName","pdf","clearAlert","internalAlert","createAlertWarning","formatAlertError","e","error","checkInFileOption","result","isInsertFile","isInsertFileAtBeginning","actionResultType","success","autoCloseMenu","message","createAlertError","watch","handler","updateSelectedOptionList","deep","component","alertableMixin","BaseAlert","alertTypeName","alertType","get","visibleAlert","set","$emit","eventNames","alertVisibilityChanged","_this$internalAlert","isEmpty","_this$internalAlert2","info","_this$internalAlert3","_this$internalAlert$d","_this$internalAlert4","dismissible","createAlert","warning","createAlertInfo","createAlertSuccess","okPopoverLabel","commandNames","ok","cancelPopoverLabel","cancel","close","delay","timeOut","Promise","resolve","setTimeout"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,sBAAsBF,EAAII,GAAGJ,EAAIK,GAAG,CAACC,MAAM,CAAC,uBAAsB,GAAOC,YAAYP,EAAIQ,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACV,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAIa,WAAW,OAAOC,OAAM,GAAM,CAACL,IAAI,eAAeC,GAAG,WAAW,MAAO,CAACV,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAIe,aAAaD,OAAM,GAAM,CAACL,IAAI,kBAAkBC,GAAG,WAAW,MAAO,CAACV,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAIe,UAAU,OAAOD,OAAM,GAAM,CAACL,IAAI,eAAeC,GAAG,WAAW,MAAO,CAACV,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAIa,WAAW,OAAOC,OAAM,GAAM,CAACL,IAAI,gBAAgBC,GAAG,WAAW,MAAO,CAACR,EAAG,sBAAsB,CAACc,GAAG,CAAC,MAAQhB,EAAIiB,kBAAkBV,YAAYP,EAAIQ,GAAG,CAAC,CAACC,IAAI,YAAYC,GAAG,WAAW,MAAO,CAACV,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAIkB,WAAW,OAAOJ,OAAM,GAAM,CAACL,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACV,EAAIW,GAAG,IAAIX,EAAIY,GAAGZ,EAAImB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Ac,GACxC,OAAOC,eAAYf,OAAUgB,QAAS1B,EAASwB,IASjDG,gBAAgB3B,EAASwB,GAAc,GACrC,OAAOC,eAAYf,OAAUU,KAAMpB,EAASwB,IAS9CI,mBAAmB5B,EAASwB,GAAc,GACxC,OAAOC,eAAYf,OAAUZ,QAASE,EAASwB,IASjDlC,iBAAiB5B,EAAQ8B,GACvB,OAAOF,eAAiB5B,EAAQ8B,IAMlCL,aACExH,KAAKyH,mBAAgBvD,M,oCCnJ3B,0EAOO,MAAMZ,EAAmB,CAC9BD,OAAQ,CAACuF,QACT5D,SAAU,CAKRkF,iBACE,OAAOC,OAAaC,IAOtBC,qBACE,OAAOF,OAAaG,QAOtBxE,oBACE,OAAOqE,OAAaI,QAGxBzD,QAAS,CAKP,oBAAoBuB,GAClB,IACErI,KAAKyH,cAAgBzH,KAAK8J,YACxB9J,KAAK8I,cAAcX,QACnBE,SAEIrI,KAAKwK,QACXxK,KAAKgB,mBACL,MAAO4G,GACPT,QAAQU,MAAMD,KAIlB5G,mBACEhB,KAAKyH,mBAAgBvD,EACrBlE,KAAKmJ,MAAMC,OAAWmB,QAQxB,YAAYE,EAAU,MACpB,OAAO,IAAIC,QAAQC,GAAWC,WAAWD,EAASF","file":"js/chunk-a84c630a.97435739.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('layout-popover-menu',_vm._g(_vm._b({attrs:{\"is-activator-button\":false},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.menuTitle)+\" \")]},proxy:true},{key:\"menuIconName\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.menuIcon))]},proxy:true},{key:\"popoverIconName\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.menuIcon)+\" \")]},proxy:true},{key:\"popoverTitle\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.menuTitle)+\" \")]},proxy:true},{key:\"iconCrossName\",fn:function(){return [_c('base-tooltip-button',{on:{\"click\":_vm.closePopoverMenu},scopedSlots:_vm._u([{key:\"icon-name\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.iconClose)+\" \")]},proxy:true},{key:\"toolTip\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.closePopoverTooltip)+\" \")]},proxy:true}])})]},proxy:true},{key:\"popoverContext\",fn:function(){return [_c('base-alert',{attrs:{\"dismissible\":_vm.isAlertDismissible,\"type\":_vm.currentAlertType},model:{value:(_vm.showAlert),callback:function ($$v) {_vm.showAlert=$$v},expression:\"showAlert\"}},[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.alertMessage)}})]),_c('check-in-file',{attrs:{\"options\":_vm.hasPages ? _vm.checkInFileOptions : [],\"select-option\":_vm.defaultCheckInFileOption,\"progress\":_vm.uploadFileProgress,\"input-type\":_vm.inputType,\"is-signed-checkin\":_vm.isSignedCheckin},on:{\"fileInputChange\":_vm.onFileInputChange,\"checkInOptionChange\":_vm.onCheckInOptionChange}}),_c('expansion-panels-layout',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isDocumentViewer),expression:\"!isDocumentViewer\"}],attrs:{\"inset\":true},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._v(\" Upload Options   \"),_c('core-chip-group',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.hasUploadOptions),expression:\"hasUploadOptions\"}],attrs:{\"items\":_vm.uploadOptionsList,\"column\":true,\"chip-small\":_vm.isSmallDevice,\"show-arrows\":true}})]},proxy:true},{key:\"content\",fn:function(){return [_c('check-in-option',{staticClass:\"mt-4\",attrs:{\"check-in-option\":_vm.checkInOption}})]},proxy:true}])})]},proxy:true},{key:\"popoverActions\",fn:function(){return [_c('base-button',{attrs:{\"disabled\":!_vm.uploadFileInput},on:{\"click\":_vm.onOkay}},[_vm._v(_vm._s(_vm.menuOkCommandLabel))]),_c('base-button',{on:{\"click\":_vm.closePopoverMenu}},[_vm._v(\"Close\")])]},proxy:true}])},'layout-popover-menu',_vm.$attrs,false),_vm.$listeners))\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImportFilePopoverMenu.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ImportFilePopoverMenu.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ImportFilePopoverMenu.vue?vue&type=template&id=636fa830&scoped=true\"\nimport script from \"./ImportFilePopoverMenu.vue?vue&type=script&lang=js\"\nexport * from \"./ImportFilePopoverMenu.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"636fa830\",\n null\n \n)\n\nexport default component.exports","// design\r\nimport {\r\n alertType,\r\n createAlert,\r\n formatAlertError\r\n} from \"@/design/components/alert/alertModel\";\r\n\r\n// utils\r\nimport { isEmpty } from \"@/utils\";\r\n\r\n// model\r\nimport { eventNames } from \"@/model/common/events/eventConst\";\r\n\r\nexport const alertableMixin = {\r\n components: {\r\n BaseAlert: () => import(\"@/components/shared/base/BaseAlert\")\r\n },\r\n data() {\r\n return {\r\n /**\r\n * internal alert to be displayed\r\n * @type {{type: string, message: string, dismissible : boolean}}\r\n */\r\n internalAlert: undefined,\r\n\r\n /**\r\n * alert Type name enum\r\n * @type {{success: string, warning: string, error: string, info: string}}\r\n */\r\n alertTypeName: alertType\r\n };\r\n },\r\n computed: {\r\n showAlert: {\r\n get() {\r\n return this.visibleAlert;\r\n },\r\n set(value) {\r\n if (!value) {\r\n if (this.internalAlert) {\r\n this.internalAlert.message = undefined;\r\n }\r\n }\r\n this.$emit(eventNames.alertVisibilityChanged, value);\r\n }\r\n },\r\n\r\n /**\r\n * determines whether alert should be visible\r\n * @return {boolean} true if alert should be visible\r\n */\r\n visibleAlert() {\r\n return !isEmpty(this.internalAlert?.message);\r\n },\r\n\r\n /**\r\n * current Alert Type\r\n * @return {string|undefined} current Alert Type\r\n */\r\n currentAlertType() {\r\n return isEmpty(this.internalAlert?.message)\r\n ? alertType.info\r\n : this.internalAlert.type;\r\n },\r\n\r\n /**\r\n * alert Message\r\n * @return {string|undefined}\r\n */\r\n alertMessage() {\r\n return this.internalAlert?.message;\r\n },\r\n\r\n /**\r\n * compute whether Alert should be Dismissible\r\n * @return {boolean} if true Alert should be Dismissible\r\n */\r\n isAlertDismissible() {\r\n return this.internalAlert?.dismissible ?? false;\r\n }\r\n },\r\n methods: {\r\n /**\r\n * create Alert\r\n * @param {string} type Alert type\r\n * @param {string} message Alert message\r\n * @param {boolean} dismissible Alert dismissible\r\n * @return {{type: string, message: string, dismissible: boolean}}\r\n */\r\n createAlert(type, message, dismissible = false) {\r\n return createAlert(type, message, dismissible);\r\n },\r\n\r\n /**\r\n * create Error type Alert\r\n * @param {string} message Error Alert message\r\n * @param {boolean} dismissible Error Alert dismissible\r\n * @return {{type: string, message: string, dismissible: boolean}}\r\n */\r\n createAlertError(message, dismissible = false) {\r\n return createAlert(alertType.error, message, dismissible);\r\n },\r\n\r\n /**\r\n * create Warning type Alert\r\n * @param {string} message Warning Alert message\r\n * @param {boolean} dismissible Warning Alert dismissible\r\n * @return {{type: string, message: string, dismissible: boolean}}\r\n */\r\n createAlertWarning(message, dismissible = false) {\r\n return createAlert(alertType.warning, message, dismissible);\r\n },\r\n\r\n /**\r\n * create Info type Alert\r\n * @param {string} message Info Alert message\r\n * @param {boolean} dismissible Info Alert dismissible\r\n * @return {{type: string, message: string, dismissible: boolean}}\r\n */\r\n createAlertInfo(message, dismissible = false) {\r\n return createAlert(alertType.info, message, dismissible);\r\n },\r\n\r\n /**\r\n * create Success type Alert\r\n * @param {string} message Success Alert message\r\n * @param {boolean} dismissible Success Alert dismissible\r\n * @return {{type: string, message: string, dismissible: boolean}}\r\n */\r\n createAlertSuccess(message, dismissible = false) {\r\n return createAlert(alertType.success, message, dismissible);\r\n },\r\n\r\n /**\r\n * format Alert Error\r\n * @param {String} action\r\n * @param {String} error\r\n * @return {string} formatted Alert Error\r\n */\r\n formatAlertError(action, error) {\r\n return formatAlertError(action, error);\r\n },\r\n\r\n /**\r\n * clear current Alert\r\n */\r\n clearAlert() {\r\n this.internalAlert = undefined;\r\n }\r\n }\r\n};\r\n","import { eventNames } from \"@/model/common/events/eventConst\";\r\nimport { commandNames } from \"@/model/common/commands/commandModel\";\r\nimport { alertableMixin } from \"@/mixins/shared/alertable/alertableMixin\";\r\n\r\n/**\r\n * popoverMenuMixin encapsulate popover Menu functionality\r\n */\r\nexport const popoverMenuMixin = {\r\n mixins: [alertableMixin],\r\n computed: {\r\n /**\r\n * ok Dialog Label\r\n * @return {string} ok Dialog Label\r\n */\r\n okPopoverLabel() {\r\n return commandNames.ok;\r\n },\r\n\r\n /**\r\n * cancel Dialog Label\r\n * @return {string} cancel Dialog Label\r\n */\r\n cancelPopoverLabel() {\r\n return commandNames.cancel;\r\n },\r\n\r\n /**\r\n * close Dialog Label\r\n * @return {string} close Dialog Label\r\n */\r\n closePopoverLabel() {\r\n return commandNames.close;\r\n }\r\n },\r\n methods: {\r\n /**\r\n * Auto Close Menu\r\n * @return {Promise}\r\n */\r\n async autoCloseMenu(message) {\r\n try {\r\n this.internalAlert = this.createAlert(\r\n this.alertTypeName.success,\r\n message\r\n );\r\n await this.delay();\r\n this.closePopoverMenu();\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n },\r\n\r\n closePopoverMenu() {\r\n this.internalAlert = undefined;\r\n this.$emit(eventNames.close);\r\n },\r\n\r\n /**\r\n * wait before the specified function or code is executed.\r\n * @param {number} timeOut The time, in milliseconds that the timer should wait before the specified function or code is executed\r\n * @return {Promise}\r\n */\r\n async delay(timeOut = 1500) {\r\n return new Promise(resolve => setTimeout(resolve, timeOut));\r\n }\r\n }\r\n};\r\n"],"sourceRoot":""}