@ -1858,12 +1858,13 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ } ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js" ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__ . n ( _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! vue-property-decorator */ "./node_modules/vue-property-decorator/lib/vue-property-decorator.js" ) ;
/* harmony import */ var _TextBox_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! ./TextBox.vue */ "./resources/js/components/Regex/TextBox.vue" ) ;
/* harmony import */ var _PatternBox_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__ ( /*! ./PatternBox.vue */ "./resources/js/components/Regex/PatternBox.vue" ) ;
/* harmony import */ var _Flags_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__ ( /*! ./Flags.vue */ "./resources/js/components/Regex/Flags.vue" ) ;
/* harmony import */ var _SideBar_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__ ( /*! ./SideBar.vue */ "./resources/js/components/Regex/SideBar.vue" ) ;
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__ ( /*! @/app */ "./resources/js/app.ts" ) ;
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
@ -1899,6 +1900,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
var Create = /*#__PURE__*/ function ( _Vue ) {
_inherits ( Create , _Vue ) ;
@ -1977,23 +1979,62 @@ var Create = /*#__PURE__*/function (_Vue) {
return save ;
} ( )
} , {
key : "changeRoute" ,
value : function ( ) {
var _changeRoute = _asyncToGenerator ( /*#__PURE__*/ _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . mark ( function _callee2 ( url ) {
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . wrap ( function _callee2$ ( _context2 ) {
while ( 1 ) {
switch ( _context2 . prev = _context2 . next ) {
case 0 :
if ( ! ( this . pattern !== '' && this . pattern !== undefined ) ) {
_context2 . next = 4 ;
break ;
}
if ( this . name === '' || this . name === undefined ) {
this . name = 'Unnamed regex - ' + Date . now ( ) ;
}
_context2 . next = 4 ;
return this . save ( ) ;
case 4 :
window . location . href = url ;
case 5 :
case "end" :
return _context2 . stop ( ) ;
}
}
} , _callee2 , this ) ;
} ) ) ;
function changeRoute ( _x ) {
return _changeRoute . apply ( this , arguments ) ;
}
return changeRoute ;
} ( )
} , {
key : "created" ,
value : function created ( ) {
if ( this . regex ) {
this . pattern = this . regex ;
}
_app__WEBPACK_IMPORTED_MODULE_6__ . eventBus . $on ( 'changeRoute' , this . changeRoute ) ;
}
} ] ) ;
return Create ;
} ( vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Vue ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_6__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_7 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
default : ''
} ) ] , Create . prototype , "regex" , void 0 ) ;
Create = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_6__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Component ) ( {
Create = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_7 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Component ) ( {
name : 'RegexCreate' ,
components : {
TextBox : _TextBox_vue__WEBPACK_IMPORTED_MODULE_2__ . default ,
@ -2376,10 +2417,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ } ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js" ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__ . n ( _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! vue-property-decorator */ "./node_modules/vue-property-decorator/lib/vue-property-decorator.js" ) ;
/* harmony import */ var _AddBox_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! ./AddBox.vue */ "./resources/js/components/Searchers/AddBox.vue" ) ;
/* harmony import */ var _Show_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__ ( /*! ./Show.vue */ "./resources/js/components/Searchers/Show.vue" ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! @/app */ "./resources/js/app.ts" ) ;
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! vue-property-decorator */ "./node_modules/vue-property-decorator/lib/vue-property-decorator.js" ) ;
/* harmony import */ var _AddBox_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__ ( /*! ./AddBox.vue */ "./resources/js/components/Searchers/AddBox.vue" ) ;
/* harmony import */ var _Show_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__ ( /*! ./Show.vue */ "./resources/js/components/Searchers/Show.vue" ) ;
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
@ -2413,6 +2455,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
var Create = /*#__PURE__*/ function ( _Vue ) {
_inherits ( Create , _Vue ) ;
@ -2634,6 +2677,64 @@ var Create = /*#__PURE__*/function (_Vue) {
this . rows . splice ( rowIndex , 1 ) ;
}
}
} , {
key : "changeRoute" ,
value : function ( ) {
var _changeRoute = _asyncToGenerator ( /*#__PURE__*/ _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . mark ( function _callee5 ( url ) {
var searcher ;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . wrap ( function _callee5$ ( _context5 ) {
while ( 1 ) {
switch ( _context5 . prev = _context5 . next ) {
case 0 :
if ( ! ( this . rows . length > 0 ) ) {
_context5 . next = 12 ;
break ;
}
if ( this . name === '' || this . name === undefined ) {
this . name = 'Unnamed searcher - ' + Date . now ( ) ;
}
if ( ! this . id ) {
_context5 . next = 8 ;
break ;
}
_context5 . next = 5 ;
return this . update ( ) ;
case 5 :
_context5 . t0 = _context5 . sent ;
_context5 . next = 11 ;
break ;
case 8 :
_context5 . next = 10 ;
return this . create ( ) ;
case 10 :
_context5 . t0 = _context5 . sent ;
case 11 :
searcher = _context5 . t0 ;
case 12 :
window . location . href = url ;
case 13 :
case "end" :
return _context5 . stop ( ) ;
}
}
} , _callee5 , this ) ;
} ) ) ;
function changeRoute ( _x3 ) {
return _changeRoute . apply ( this , arguments ) ;
}
return changeRoute ;
} ( )
} , {
key : "created" ,
value : function created ( ) {
@ -2643,13 +2744,15 @@ var Create = /*#__PURE__*/function (_Vue) {
this . rows = this . searcher . rows ;
this . name = this . searcher . name ;
}
_app__WEBPACK_IMPORTED_MODULE_1__ . eventBus . $on ( 'changeRoute' , this . changeRoute ) ;
}
} ] ) ;
return Create ;
} ( vue_property_decorator__WEBPACK_IMPORTED_MODULE_1 __ . Vue ) ;
} ( vue_property_decorator__WEBPACK_IMPORTED_MODULE_2 __ . Vue ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1 __ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_5 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2 __ . Prop ) ( {
default : function _default ( ) {
return {
id : '' ,
@ -2659,15 +2762,15 @@ var Create = /*#__PURE__*/function (_Vue) {
}
} ) ] , Create . prototype , "searcher" , void 0 ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1 __ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_5 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2 __ . Prop ) ( {
default : true
} ) ] , Create . prototype , "standalone" , void 0 ) ;
Create = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1 __ . Component ) ( {
Create = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_5 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2 __ . Component ) ( {
name : 'SearcherCreate' ,
components : {
AddBox : _AddBox_vue__WEBPACK_IMPORTED_MODULE_2 __ . default ,
SearcherShow : _Show_vue__WEBPACK_IMPORTED_MODULE_3 __ . default
AddBox : _AddBox_vue__WEBPACK_IMPORTED_MODULE_3 __ . default ,
SearcherShow : _Show_vue__WEBPACK_IMPORTED_MODULE_4 __ . default
}
} ) ] , Create ) ;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ( Create ) ;
@ -2688,8 +2791,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ } ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js" ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__ . n ( _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! vue-property-decorator */ "./node_modules/vue-property-decorator/lib/vue-property-decorator.js" ) ;
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! @/app */ "./resources/js/app.ts" ) ;
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
@ -2721,6 +2825,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
var Index = /*#__PURE__*/ function ( _Vue ) {
_inherits ( Index , _Vue ) ;
@ -2783,8 +2888,56 @@ var Index = /*#__PURE__*/function (_Vue) {
} , {
key : "onOpen" ,
value : function onOpen ( id ) {
window . open ( this . getURL ( id ) , '_blank ' ) ;
window . open ( this . getURL ( id ) , '_self ' ) ;
}
} , {
key : "onEdit" ,
value : function onEdit ( id ) {
window . open ( this . getURL ( id ) + '/edit' , '_self' ) ;
}
} , {
key : "onDelete" ,
value : function ( ) {
var _onDelete = _asyncToGenerator ( /*#__PURE__*/ _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . mark ( function _callee2 ( id ) {
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . wrap ( function _callee2$ ( _context2 ) {
while ( 1 ) {
switch ( _context2 . prev = _context2 . next ) {
case 0 :
_context2 . prev = 0 ;
_context2 . next = 3 ;
return window . axios . delete ( "/searchers/" . concat ( id ) ) ;
case 3 :
this . $toast . add ( {
severity : 'success' ,
summary : 'Searcher deleted.' ,
life : 3000
} ) ;
this . searchers = this . searchers . filter ( function ( x ) {
return x . id !== id ;
} ) ;
_context2 . next = 10 ;
break ;
case 7 :
_context2 . prev = 7 ;
_context2 . t0 = _context2 [ "catch" ] ( 0 ) ;
console . log ( _context2 . t0 ) ;
case 10 :
case "end" :
return _context2 . stop ( ) ;
}
}
} , _callee2 , this , [ [ 0 , 7 ] ] ) ;
} ) ) ;
function onDelete ( _x ) {
return _onDelete . apply ( this , arguments ) ;
}
return onDelete ;
} ( )
} , {
key : "getURL" ,
value : function getURL ( id ) {
@ -2795,29 +2948,59 @@ var Index = /*#__PURE__*/function (_Vue) {
value : function selectedSearcherIdChanged ( value ) {
this . $emit ( 'selected' , value ) ;
}
} , {
key : "changeRoute" ,
value : function ( ) {
var _changeRoute = _asyncToGenerator ( /*#__PURE__*/ _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . mark ( function _callee3 ( url ) {
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . wrap ( function _callee3$ ( _context3 ) {
while ( 1 ) {
switch ( _context3 . prev = _context3 . next ) {
case 0 :
window . location . href = url ;
case 1 :
case "end" :
return _context3 . stop ( ) ;
}
}
} , _callee3 ) ;
} ) ) ;
function changeRoute ( _x2 ) {
return _changeRoute . apply ( this , arguments ) ;
}
return changeRoute ;
} ( )
} , {
key : "createSearcher" ,
value : function createSearcher ( ) {
window . location . href = '/searchers/create' ;
}
} , {
key : "created" ,
value : function created ( ) {
this . boot ( ) ;
_app__WEBPACK_IMPORTED_MODULE_2__ . eventBus . $on ( 'changeRoute' , this . changeRoute ) ;
}
} ] ) ;
return Index ;
} ( vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Vue ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_2__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
default : false
} ) ] , Index . prototype , "allowSelect" , void 0 ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_2__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
default : function _default ( ) {
return [ ] ;
}
} ) ] , Index . prototype , "ignoreSearcherIds" , void 0 ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_2__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Watch ) ( 'selectedSearcher' ) ] , Index . prototype , "selectedSearcherIdChanged" , null ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Watch ) ( 'selectedSearcher' ) ] , Index . prototype , "selectedSearcherIdChanged" , null ) ;
Index = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_2__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Component ) ( { } ) ] , Index ) ;
Index = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Component ) ( { } ) ] , Index ) ;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ( Index ) ;
;
@ -3082,9 +3265,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__ . d ( __webpack_exports__ , {
/* harmony export */ "default" : ( ) => ( __WEBPACK_DEFAULT_EXPORT__ )
/* harmony export */ } ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! vue */ "./node_modules/vue/dist/vue.esm.js" ) ;
/* harmony import */ var vue_class_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! vue-class-component */ "./node_modules/vue-class-component/dist/vue-class-component.esm.js" ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! @/app */ "./resources/js/app.ts" ) ;
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! vue */ "./node_modules/vue/dist/vue.esm.js" ) ;
/* harmony import */ var vue_class_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__ ( /*! vue-class-component */ "./node_modules/vue-class-component/dist/vue-class-component.esm.js" ) ;
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
@ -3111,6 +3295,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
var AppHeader = /*#__PURE__*/ function ( _Vue ) {
_inherits ( AppHeader , _Vue ) ;
@ -3123,36 +3308,22 @@ var AppHeader = /*#__PURE__*/function (_Vue) {
}
_createClass ( AppHeader , [ {
key : "onHomeButtonClick" ,
value : function onHomeButtonClick ( ) {
window . location . href = '/' ;
}
} , {
key : "onRouteChange" ,
value : function onRouteChange ( url ) {
var el = document . body ;
setTimeout ( function ( ) {
el . classList . remove ( 'p-overflow-hidden' ) ;
} , 10 ) ;
this . $confirm . require ( {
message : 'You will lose any progress on the current uploaded document. Are you sure you want to proceed?' ,
header : 'Confirmation' ,
icon : 'pi pi-exclamation-triangle' ,
blockScroll : false ,
accept : function accept ( ) {
window . location . href = url ;
} ,
reject : function reject ( ) { // TODO: Show a message to the user that the action was cancelled.
}
} ) ;
value :
/ * *
* Called when we want to change the route
*
* @ param { string } url The url to the new route
* /
function onRouteChange ( url ) {
_app__WEBPACK_IMPORTED_MODULE_0__ . eventBus . $emit ( 'changeRoute' , url ) ;
}
} ] ) ;
return AppHeader ;
} ( vue__WEBPACK_IMPORTED_MODULE_0 __ . default ) ;
} ( vue__WEBPACK_IMPORTED_MODULE_1__ . default ) ;
AppHeader = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_1 __ . __decorate ) ( [ vue_class_component__WEBPACK_IMPORTED_MODULE_2 __ . default ] , AppHeader ) ;
AppHeader = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_2__ . __decorate ) ( [ vue_class_component__WEBPACK_IMPORTED_MODULE_3__ . default ] , AppHeader ) ;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ( AppHeader ) ;
/***/ } ) ,
@ -3165,6 +3336,9 @@ AppHeader = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__decorate)([vue_class_compone
"use strict" ;
__webpack_require__ . r ( __webpack_exports__ ) ;
/* harmony export */ __webpack_require__ . d ( __webpack_exports__ , {
/* harmony export */ "eventBus" : ( ) => ( /* binding */ eventBus )
/* harmony export */ } ) ;
/* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! ./bootstrap */ "./resources/js/bootstrap.ts" ) ;
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__ ( /*! vue */ "./node_modules/vue/dist/vue.esm.js" ) ;
/* harmony import */ var primevue_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! primevue/config */ "./node_modules/primevue/config/index.js" ) ;
@ -3302,6 +3476,7 @@ vue__WEBPACK_IMPORTED_MODULE_41__.default.component('searchers-index', _componen
vue__WEBPACK_IMPORTED_MODULE_41__ . default . component ( 'process-file' , _components_ProcessFile_ProcessFile_vue__WEBPACK_IMPORTED_MODULE_40__ . default ) ;
vue__WEBPACK_IMPORTED_MODULE_41__ . default . component ( 'app-header' , _components_layout_Header_vue__WEBPACK_IMPORTED_MODULE_32__ . default ) ;
vue__WEBPACK_IMPORTED_MODULE_41__ . default . component ( 'app-footer' , _components_layout_Footer_vue__WEBPACK_IMPORTED_MODULE_33__ . default ) ;
var eventBus = new vue__WEBPACK_IMPORTED_MODULE_41__ . default ( ) ;
new vue__WEBPACK_IMPORTED_MODULE_41__ . default ( {
el : '#app'
} ) ;
@ -3361,8 +3536,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ } ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js" ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__ . n ( _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! vue-property-decorator */ "./node_modules/vue-property-decorator/lib/vue-property-decorator.js" ) ;
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! @/app */ "./resources/js/app.ts" ) ;
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
@ -3394,6 +3570,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
var Home = /*#__PURE__*/ function ( _Vue ) {
_inherits ( Home , _Vue ) ;
@ -3419,7 +3596,7 @@ var Home = /*#__PURE__*/function (_Vue) {
_createClass ( Home , [ {
key : "mounted" ,
value : function mounted ( ) {
console . log ( 'SEARCHERS: ', this . searchers ) ;
_app__WEBPACK_IMPORTED_MODULE_2__ . eventBus . $on ( 'changeRoute ', this . changeRoute ) ;
}
/ * *
* A method which uploads the files to the server for processing
@ -3519,16 +3696,23 @@ var Home = /*#__PURE__*/function (_Vue) {
value : function onError ( error ) {
this . error = error ;
}
} , {
key : "changeRoute" ,
value : function changeRoute ( url ) {
if ( ! this . fileUploaded ) {
window . location . href = url ;
}
}
} ] ) ;
return Home ;
} ( vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Vue ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_2__ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Prop ) ( {
default : [ ]
} ) ] , Home . prototype , "searchers" , void 0 ) ;
Home = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_2 __ . __decorate ) ( [ vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Component ] , Home ) ;
Home = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ vue_property_decorator__WEBPACK_IMPORTED_MODULE_1__ . Component ] , Home ) ;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ( Home ) ;
/***/ } ) ,
@ -3546,10 +3730,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ } ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js" ) ;
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__ . n ( _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4 __ = __webpack_require__ ( /*! tslib */ "./node_modules/tslib/tslib.es6.js" ) ;
/* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! marked */ "./node_modules/marked/lib/marked.js" ) ;
/* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__ . n ( marked__WEBPACK_IMPORTED_MODULE_1__ ) ;
/* harmony import */ var vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! vue-property-decorator */ "./node_modules/vue-property-decorator/lib/vue-property-decorator.js" ) ;
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__ ( /*! @/app */ "./resources/js/app.ts" ) ;
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
function _createForOfIteratorHelper ( o , allowArrayLike ) { var it = typeof Symbol !== "undefined" && o [ Symbol . iterator ] || o [ "@@iterator" ] ; if ( ! it ) { if ( Array . isArray ( o ) || ( it = _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = it . call ( o ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it . return != null ) it . return ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
@ -3588,6 +3773,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
var ProcessFile = /*#__PURE__*/ function ( _Vue ) {
_inherits ( ProcessFile , _Vue ) ;
@ -3638,6 +3824,19 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
value : function created ( ) {
var _this2 = this ;
var storedSearchers = localStorage . getItem ( 'searchers' ) ;
if ( storedSearchers !== null ) {
this . selectedSearchers = JSON . parse ( storedSearchers ) ;
localStorage . removeItem ( 'searchers' ) ;
var searchersOptions = localStorage . getItem ( 'searchersOptions' ) ;
if ( searchersOptions !== null ) {
this . searchersOptions = JSON . parse ( searchersOptions ) ;
localStorage . removeItem ( 'searchersOptions' ) ;
}
}
this . intervalId = setInterval ( this . waitForFile , 3000 ) ;
window . addEventListener ( 'beforeunload' , /*#__PURE__*/ function ( ) {
var _ref = _asyncToGenerator ( /*#__PURE__*/ _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default ( ) . mark ( function _callee ( event ) {
@ -3667,6 +3866,7 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
return _ref . apply ( this , arguments ) ;
} ;
} ( ) ) ;
_app__WEBPACK_IMPORTED_MODULE_3__ . eventBus . $on ( 'changeRoute' , this . changeRoute ) ;
}
/ * *
* MD - to - HTML compiled file content
@ -3695,6 +3895,26 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
get : function get ( ) {
return marked__WEBPACK_IMPORTED_MODULE_1___default ( ) ( this . processedFileContentPreview ) ;
}
} , {
key : "changeRoute" ,
value : function changeRoute ( url ) {
var el = document . body ;
setTimeout ( function ( ) {
el . classList . remove ( 'p-overflow-hidden' ) ;
} , 10 ) ;
this . $confirm . require ( {
message : 'You will lose any progress on the current uploaded document. Are you sure you want to proceed?' ,
header : 'Confirmation' ,
icon : 'pi pi-exclamation-triangle' ,
blockScroll : false ,
accept : function accept ( ) {
window . location . href = url ;
} ,
reject : function reject ( ) { // TODO: Show a message to the user that the action was cancelled.
}
} ) ;
}
/ * *
* Toggle the sidebar containing the searchers
* /
@ -3753,7 +3973,7 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
if ( typeof newValue !== 'undefined' ) {
this . uploadDialogVisible = newValue ;
} else {
this . uploadDialogVisible = ! this . searchers DialogVisible;
this . uploadDialogVisible = ! this . upload DialogVisible;
}
}
/ * *
@ -3772,6 +3992,9 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
while ( 1 ) {
switch ( _context2 . prev = _context2 . next ) {
case 0 :
localStorage . setItem ( 'searchers' , JSON . stringify ( this . selectedSearchers ) ) ;
localStorage . setItem ( 'searchersOptions' , JSON . stringify ( this . searchersOptions ) ) ;
this . $confirm . require ( {
message : 'You will lose any progress on the current uploaded document. Are you sure you want to proceed?' ,
header : 'Confirmation' ,
@ -3790,7 +4013,7 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
}
} ) ;
case 1 :
case 3 :
case "end" :
return _context2 . stop ( ) ;
}
@ -4052,7 +4275,7 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
return ProcessFile ;
} ( vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Vue ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Prop ) ( {
default : {
id : - 1 ,
file : '' ,
@ -4060,13 +4283,13 @@ var ProcessFile = /*#__PURE__*/function (_Vue) {
}
} ) ] , ProcessFile . prototype , "file" , void 0 ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Prop ) ( {
( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Prop ) ( {
default : [ ]
} ) ] , ProcessFile . prototype , "searchers" , void 0 ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Watch ) ( 'showDiffHighlight' ) ] , ProcessFile . prototype , "onDiffHighlightChanged" , null ) ;
( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ ( 0 , vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Watch ) ( 'showDiffHighlight' ) ] , ProcessFile . prototype , "onDiffHighlightChanged" , null ) ;
ProcessFile = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_3 __ . __decorate ) ( [ vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Component ] , ProcessFile ) ;
ProcessFile = ( 0 , tslib__WEBPACK_IMPORTED_MODULE_4 __ . __decorate ) ( [ vue_property_decorator__WEBPACK_IMPORTED_MODULE_2__ . Component ] , ProcessFile ) ;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ( ProcessFile ) ;
/***/ } ) ,
@ -29412,7 +29635,10 @@ var render = function() {
_c ( "Button" , {
staticClass :
"p-button-info p-button-icon-only sidebar-toggle-button" ,
attrs : { icon : "pi pi-list" } ,
attrs : {
icon : "pi pi-list" ,
disabled : _vm . searchersDialogVisible === true
} ,
on : {
click : function ( $event ) {
return _vm . toggleSearchersSidebar ( )
@ -29707,6 +29933,7 @@ var render = function() {
visible : _vm . uploadDialogVisible ,
maximizable : true ,
contentStyle : { overflow : "visible" } ,
baseZIndex : 2014 ,
id : "upload_dialog"
} ,
on : {
@ -29762,53 +29989,55 @@ var render = function() {
var _h = _vm . $createElement
var _c = _vm . _self . _c || _h
return _c ( "div" , { attrs : { id : "regex-create" } } , [
_c (
"div" ,
{ staticClass : "regex-header" } ,
[
! _vm . regex
? [
_c ( "h1" , [ _vm . _v ( " New regex searcher " ) ] ) ,
_vm . _v ( " " ) ,
_c ( "div" , { staticClass : "p-field" } , [
_c (
"span" ,
{ staticClass : "p-float-label" } ,
[
_c ( "InputText" , {
staticClass : "p-inputtext-sm" ,
attrs : { type : "text" , name : "name" , id : "name" } ,
model : {
value : _vm . name ,
callback : function ( $$v ) {
_vm . name = $$v
} ,
expression : "name"
}
} )
] ,
1
)
] ) ,
_vm . _v ( " " ) ,
_c ( "label" , { attrs : { for : "name" } } , [
_vm . _v ( "Enter searcher name" )
] )
]
: _vm . _e ( ) ,
_vm . _v ( " " ) ,
_c ( "div" , { staticClass : "regex-header" } , [
! _vm . regex ? _c ( "h1" , [ _vm . _v ( " New regex searcher " ) ] ) : _vm . _e ( ) ,
_vm . _v ( " " ) ,
_c ( "div" , { staticClass : "p-d-flex p-jc-center" } , [
_c (
"Button" ,
{
staticClass : "p-button-sm p-button-raised" ,
attrs : { disabled : ( ! _vm . name && ! _vm . regex ) || ! _vm . pattern } ,
on : { click : _vm . onSave }
} ,
[ _vm . _v ( "\n Save\n " ) ]
"div" ,
{ staticClass : "p-formgroup-inline" } ,
[
! _vm . regex
? _c ( "div" , { staticClass : "p-field" } , [
_c (
"span" ,
{ staticClass : "p-float-label" } ,
[
_c ( "InputText" , {
staticClass : "p-inputtext-sm" ,
attrs : { type : "text" , name : "name" , id : "name" } ,
model : {
value : _vm . name ,
callback : function ( $$v ) {
_vm . name = $$v
} ,
expression : "name"
}
} ) ,
_vm . _v ( " " ) ,
_c ( "label" , { attrs : { for : "name" } } , [
_vm . _v ( "Enter searcher name" )
] )
] ,
1
)
] )
: _vm . _e ( ) ,
_vm . _v ( " " ) ,
_c (
"Button" ,
{
staticClass : "p-button-sm p-button-raised" ,
attrs : { disabled : ( ! _vm . name && ! _vm . regex ) || ! _vm . pattern } ,
on : { click : _vm . onSave }
} ,
[ _vm . _v ( "\n Save\n " ) ]
)
] ,
1
)
] ,
2
) ,
] )
] ) ,
_vm . _v ( " " ) ,
_c ( "div" , { staticClass : "regex-box" } , [
_c (
@ -30689,18 +30918,22 @@ var render = function() {
_c ( "h1" , [ _vm . _v ( " Searchers " ) ] ) ,
_vm . _v ( " " ) ,
! _vm . allowSelect
? _c ( "div" , { staticStyle : { "margin-bottom" : "1rem" } } , [
_c (
"a" ,
{ attrs : { href : "/searchers/create" } } ,
[
_c ( "Button" , { staticClass : "fc-button p-button-success" } , [
_vm . _v ( "\n Add searcher\n " )
] )
] ,
1
)
] )
? _c (
"div" ,
{ staticStyle : { "margin-bottom" : "1rem" } } ,
[
_c ( "Button" , {
staticClass : "fc-button p-button-success" ,
attrs : { label : "Add searcher" } ,
on : {
click : function ( $event ) {
return _vm . createSearcher ( )
}
}
} )
] ,
1
)
: _vm . _e ( ) ,
_vm . _v ( " " ) ,
_c (
@ -30742,29 +30975,82 @@ var render = function() {
_vm . _v ( " " ) ,
_c ( "Column" , {
attrs : { header : "Name" , sortable : "" } ,
scopedSlots : _vm . _u ( [
{
key : "body" ,
fn : function ( slotProps ) {
return [
_vm . _v (
"\n " +
_vm . _s ( slotProps . data . name ) +
"\n "
)
]
}
}
] )
} ) ,
_vm . _v ( " " ) ,
_c ( "Column" , {
attrs : { header : "Actions" , headerStyle : "text-align: right" } ,
scopedSlots : _vm . _u ( [
{
key : "body" ,
fn : function ( slotProps ) {
return [
_c (
"a" ,
"div " ,
{
staticClass : "searcher-link" ,
on : {
click : function ( $event ) {
$event . stopPropagation ( )
return _vm . onOpen ( slotProps . data . id )
}
}
staticClass : "action-buttons" ,
staticStyle : { "text-align" : "right" }
} ,
[
_vm . _v (
"\n " +
_vm . _s ( slotProps . data . name ) +
"\n "
)
]
_c ( "Button" , {
staticClass : "p-button-sm" ,
attrs : {
disabled : slotProps . data . type !== "custom" ,
label : "Open" ,
icon : "pi pi-folder-open"
} ,
on : {
click : function ( $event ) {
$event . stopPropagation ( )
return _vm . onOpen ( slotProps . data . id )
}
}
} ) ,
_vm . _v ( " " ) ,
_c ( "Button" , {
staticClass : "p-button-sm p-button-success" ,
attrs : {
disabled : slotProps . data . type !== "custom" ,
label : "Edit" ,
icon : "pi pi-pencil"
} ,
on : {
click : function ( $event ) {
$event . stopPropagation ( )
return _vm . onEdit ( slotProps . data . id )
}
}
} ) ,
_vm . _v ( " " ) ,
_c ( "Button" , {
staticClass : "p-button-sm p-button-danger" ,
attrs : {
disabled : slotProps . data . type !== "custom" ,
label : "Delete" ,
icon : "pi pi-times"
} ,
on : {
click : function ( $event ) {
$event . stopPropagation ( )
return _vm . onDelete ( slotProps . data . id )
}
}
} )
] ,
1
)
]
}