Orzu Ionut
3 years ago
46 changed files with 18501 additions and 18977 deletions
-
5.env.example
-
1.gitignore
-
31.vscode/launch.json
-
3README.md
-
34app/Http/Controllers/FileController.php
-
4app/Http/Controllers/HomeController.php
-
3app/Http/Controllers/RegexController.php
-
2app/Http/Controllers/SearchAndDisplaceController.php
-
78app/Http/Controllers/SearcherController.php
-
24app/SearchDisplace/Documents/DocumentFile.php
-
2app/SearchDisplace/Regex/RegexFactory.php
-
24app/SearchDisplace/Searchers/Mapper.php
-
8app/SearchDisplace/Searchers/Searcher.php
-
66app/SearchDisplace/Searchers/SearcherCreator.php
-
2app/SearchDisplace/Searchers/SearcherFactory.php
-
54app/SearchDisplace/Searchers/SearchersCollection.php
-
17app/SearchDisplace/Searchers/SearchersStorage.php
-
9175package-lock.json
-
5package.json
-
5116public/css/app.css
-
11785public/js/app.js
-
5resources/js/app.ts
-
21resources/js/components/Home/Home.ts
-
2resources/js/components/Home/Home.vue
-
5resources/js/components/ProcessFile/ProcessFile.scss
-
43resources/js/components/ProcessFile/ProcessFile.ts
-
86resources/js/components/ProcessFile/ProcessFile.vue
-
52resources/js/components/Regex/Create.vue
-
5resources/js/components/Regex/PatternBox.vue
-
6resources/js/components/Regex/TextBox.vue
-
12resources/js/components/Searchers/AddBox.vue
-
149resources/js/components/Searchers/Create.vue
-
87resources/js/components/Searchers/Index.vue
-
191resources/js/components/Searchers/Show.vue
-
19resources/js/components/layout/Header.vue
-
5resources/js/interfaces/Searcher.ts
-
5resources/js/interfaces/responses/FileUploadResponse.ts
-
24resources/js/services/ApiService.ts
-
21resources/sass/app.sass
-
7resources/sass/components/regex/create/_index.sass
-
6resources/views/app.blade.php
-
10resources/views/pages/home.blade.php
-
7resources/views/pages/searchers/edit.blade.php
-
7resources/views/pages/searchers/index.blade.php
-
3routes/web.php
-
10261yarn.lock
@ -1,31 +0,0 @@ |
|||
{ |
|||
// Use IntelliSense to learn about possible attributes. |
|||
// Hover to view descriptions of existing attributes. |
|||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
|||
"version": "0.2.0", |
|||
"configurations": [ |
|||
|
|||
{ |
|||
"name": "Listen for Xdebug", |
|||
"type": "php", |
|||
"request": "launch", |
|||
"port": 9003, |
|||
"stopOnEntry": false, |
|||
"log": true, |
|||
"pathMappings": { |
|||
"/home/vagrant/sandd-core": "/mnt/Multimedia/Projects/Web/sandd/searchanddisplace-core", |
|||
} |
|||
}, |
|||
{ |
|||
"name": "Launch currently open script", |
|||
"type": "php", |
|||
"request": "launch", |
|||
"program": "${file}", |
|||
"cwd": "${fileDirname}", |
|||
"port": 9003, |
|||
"pathMappings": { |
|||
"/home/vagrant/sandd-core": "/mnt/Multimedia/Projects/Web/sandd/searchanddisplace-core", |
|||
} |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,54 @@ |
|||
<?php |
|||
|
|||
namespace App\SearchDisplace\Searchers; |
|||
|
|||
class SearchersCollection |
|||
{ |
|||
public function all() |
|||
{ |
|||
$collection = []; |
|||
|
|||
foreach ((new SearchersStorage())->all() as $item) { |
|||
$collection[] = array_merge($item, [ |
|||
'type' => 'custom', |
|||
]); |
|||
} |
|||
|
|||
foreach ((new Mapper)->all() as $item) { |
|||
$collection[] = array_merge($item, [ |
|||
'type' => 'duckling', |
|||
]); |
|||
} |
|||
|
|||
return $collection; |
|||
} |
|||
|
|||
public function get($id) |
|||
{ |
|||
$searcherStorage = new SearchersStorage(); |
|||
|
|||
if ($searcherStorage->has($id)) { |
|||
return array_merge($searcherStorage->get($id), [ |
|||
'type' => 'custom', |
|||
]); |
|||
} |
|||
|
|||
$ducklingMapper = new Mapper(); |
|||
|
|||
if ($ducklingMapper->has($id)) { |
|||
return array_merge($ducklingMapper->get($id), [ |
|||
'type' => 'duckling', |
|||
]); |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
|
|||
public function has($id) |
|||
{ |
|||
$searcherStorage = new SearchersStorage(); |
|||
$ducklingMapper = new Mapper(); |
|||
|
|||
return $searcherStorage->has($id) || $ducklingMapper->has($id); |
|||
} |
|||
} |
9175
package-lock.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
5116
public/css/app.css
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
11785
public/js/app.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,5 @@ |
|||
export interface Searcher { |
|||
id: string; |
|||
name: string, |
|||
description: string, |
|||
} |
@ -1,6 +1,5 @@ |
|||
export default interface FileUploadResponse |
|||
{ |
|||
id: string; |
|||
file: string; |
|||
path: string; |
|||
} |
|||
file_name: string; |
|||
} |
@ -1,13 +1,5 @@ |
|||
@extends('app') |
|||
|
|||
@section('content') |
|||
<div class="page-wrapper"> |
|||
<app-header></app-header> |
|||
|
|||
<div class="content"> |
|||
<home :searchers="{{ json_encode($searchers) }}"></home> |
|||
</div> |
|||
</div> |
|||
|
|||
<app-footer></app-footer> |
|||
<home :searchers="{{ json_encode($searchers) }}"></home> |
|||
@endsection |
@ -0,0 +1,7 @@ |
|||
@extends('app') |
|||
|
|||
@section('content') |
|||
|
|||
<searchers-create :searcher="{{ json_encode($searcher) }}"></searchers-create> |
|||
|
|||
@endsection |
@ -0,0 +1,7 @@ |
|||
@extends('app') |
|||
|
|||
@section('content') |
|||
|
|||
<searchers-index></searchers-index> |
|||
|
|||
@endsection |
10261
yarn.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue