Skip to content

Commit 93b12f6

Browse files
authored
Merge pull request #64 from kirschbaum-development/feature/nova-4-migration
NOVA 4 update
2 parents 519fe14 + 47dc15b commit 93b12f6

22 files changed

+35684
-237
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on: push
2+
name: CI
3+
4+
jobs:
5+
phpunit:
6+
runs-on: ubuntu-latest
7+
container:
8+
image: kirschbaumdevelopment/laravel-test-runner:8.0
9+
10+
services:
11+
mysql:
12+
image: mysql:5.7
13+
env:
14+
MYSQL_ROOT_PASSWORD: password
15+
MYSQL_DATABASE: test
16+
ports:
17+
- 33306:3306
18+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
19+
20+
steps:
21+
- uses: actions/checkout@v1
22+
with:
23+
fetch-depth: 1
24+
25+
- name: Configure composer for Nova
26+
run: composer config 'http-basic.nova.laravel.com' '${{ secrets.NOVA_USERNAME }}' '${{ secrets.NOVA_LICENSE_KEY }}'
27+
28+
- name: Install composer dependencies
29+
run: |
30+
composer install --prefer-dist --no-interaction --no-scripts
31+
32+
- name: Run Testsuite
33+
run: vendor/bin/phpunit tests/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ phpunit.xml
88
.phpunit.result.cache
99
.DS_Store
1010
Thumbs.db
11+
auth.json
12+

composer.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,21 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": ">=7.1.0"
11+
"php": "^8.0"
1212
},
13+
"repositories": [
14+
{
15+
"type": "composer",
16+
"url": "https://nova.laravel.com"
17+
}
18+
],
1319
"require-dev": {
1420
"doctrine/dbal": "^2.12",
21+
"laravel/legacy-factories": "^1.3",
22+
"laravel/nova": "^4.2",
1523
"mockery/mockery": "^1.1",
16-
"orchestra/testbench": "^3.8",
17-
"phpunit/phpunit": "^7.5"
24+
"orchestra/testbench": "^7.4",
25+
"phpunit/phpunit": "^9.5.10"
1826
},
1927
"autoload": {
2028
"psr-4": {

dist/css/field.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fieldset[disabled] .multiselect{pointer-events:none}.multiselect__spinner{position:absolute;right:1px;top:1px;width:48px;height:35px;background:#fff;display:block}.multiselect__spinner:after,.multiselect__spinner:before{position:absolute;content:"";top:50%;left:50%;margin:-8px 0 0 -8px;width:16px;height:16px;border-radius:100%;border:2px solid transparent;border-top-color:#41b883;-webkit-box-shadow:0 0 0 1px transparent;box-shadow:0 0 0 1px transparent}.multiselect__spinner:before{-webkit-animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);animation:spinning 2.4s cubic-bezier(.41,.26,.2,.62);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__spinner:after{-webkit-animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);animation:spinning 2.4s cubic-bezier(.51,.09,.21,.8);-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.multiselect__loading-enter-active,.multiselect__loading-leave-active{-webkit-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out;opacity:1}.multiselect__loading-enter,.multiselect__loading-leave-active{opacity:0}.multiselect,.multiselect__input,.multiselect__single{font-family:inherit;font-size:16px;-ms-touch-action:manipulation;touch-action:manipulation}.multiselect{-webkit-box-sizing:content-box;box-sizing:content-box;display:block;position:relative;width:100%;min-height:40px;text-align:left;color:#35495e}.multiselect *{-webkit-box-sizing:border-box;box-sizing:border-box}.multiselect:focus{outline:none}.multiselect--disabled{background:#ededed;pointer-events:none;opacity:.6}.multiselect--active{z-index:50}.multiselect--active:not(.multiselect--above) .multiselect__current,.multiselect--active:not(.multiselect--above) .multiselect__input,.multiselect--active:not(.multiselect--above) .multiselect__tags{border-bottom-left-radius:0;border-bottom-right-radius:0}.multiselect--active .multiselect__select{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.multiselect--above.multiselect--active .multiselect__current,.multiselect--above.multiselect--active .multiselect__input,.multiselect--above.multiselect--active .multiselect__tags{border-top-left-radius:0;border-top-right-radius:0}.multiselect__input,.multiselect__single{position:relative;display:inline-block;min-height:20px;line-height:20px;border:none;border-radius:5px;background:#fff;padding:0 0 0 5px;width:100%;-webkit-transition:border .1s ease;transition:border .1s ease;-webkit-box-sizing:border-box;box-sizing:border-box;margin-bottom:8px;vertical-align:top}.multiselect__input:-ms-input-placeholder{color:#35495e}.multiselect__input::-webkit-input-placeholder{color:#35495e}.multiselect__input::-moz-placeholder{color:#35495e}.multiselect__input::-ms-input-placeholder{color:#35495e}.multiselect__input::placeholder{color:#35495e}.multiselect__tag~.multiselect__input,.multiselect__tag~.multiselect__single{width:auto}.multiselect__input:hover,.multiselect__single:hover{border-color:#cfcfcf}.multiselect__input:focus,.multiselect__single:focus{border-color:#a8a8a8;outline:none}.multiselect__single{padding-left:5px;margin-bottom:8px}.multiselect__tags-wrap{display:inline}.multiselect__tags{min-height:40px;display:block;padding:8px 40px 0 8px;border-radius:5px;border:1px solid #e8e8e8;background:#fff;font-size:14px}.multiselect__tag{position:relative;display:inline-block;padding:4px 26px 4px 10px;border-radius:5px;margin-right:10px;color:#fff;line-height:1;background:#41b883;margin-bottom:5px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}.multiselect__tag-icon{cursor:pointer;margin-left:7px;position:absolute;right:0;top:0;bottom:0;font-weight:700;font-style:normal;width:22px;text-align:center;line-height:22px;-webkit-transition:all .2s ease;transition:all .2s ease;border-radius:5px}.multiselect__tag-icon:after{content:"\D7";color:#266d4d;font-size:14px}.multiselect__tag-icon:focus,.multiselect__tag-icon:hover{background:#369a6e}.multiselect__tag-icon:focus:after,.multiselect__tag-icon:hover:after{color:#fff}.multiselect__current{min-height:40px;overflow:hidden;padding:8px 30px 0 12px;white-space:nowrap;border-radius:5px;border:1px solid #e8e8e8}.multiselect__current,.multiselect__select{line-height:16px;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;margin:0;text-decoration:none;cursor:pointer}.multiselect__select{position:absolute;width:40px;height:38px;right:1px;top:1px;padding:4px 8px;text-align:center;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.multiselect__select:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 0;content:""}.multiselect__placeholder{color:#adadad;display:inline-block;margin-bottom:10px;padding-top:2px}.multiselect--active .multiselect__placeholder{display:none}.multiselect__content-wrapper{position:absolute;display:block;background:#fff;width:100%;max-height:240px;overflow:auto;border:1px solid #e8e8e8;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;z-index:50;-webkit-overflow-scrolling:touch}.multiselect__content{list-style:none;display:inline-block;padding:0;margin:0;min-width:100%;vertical-align:top}.multiselect--above .multiselect__content-wrapper{bottom:100%;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom:none;border-top:1px solid #e8e8e8}.multiselect__content::webkit-scrollbar{display:none}.multiselect__element{display:block}.multiselect__option{display:block;padding:12px;min-height:40px;line-height:16px;text-decoration:none;text-transform:none;vertical-align:middle;position:relative;cursor:pointer;white-space:nowrap}.multiselect__option:after{top:0;right:0;position:absolute;line-height:40px;padding-right:12px;padding-left:20px;font-size:13px}.multiselect__option--highlight{background:#41b883;outline:none;color:#fff}.multiselect__option--highlight:after{content:attr(data-select);background:#41b883;color:#fff}.multiselect__option--selected{background:#f3f3f3;color:#35495e;font-weight:700}.multiselect__option--selected:after{content:attr(data-selected);color:silver}.multiselect__option--selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect--disabled .multiselect__current,.multiselect--disabled .multiselect__select{background:#ededed;color:#a6a6a6}.multiselect__option--disabled{background:#ededed!important;color:#a6a6a6!important;cursor:text;pointer-events:none}.multiselect__option--group{background:#ededed;color:#35495e}.multiselect__option--group.multiselect__option--highlight{background:#35495e;color:#fff}.multiselect__option--group.multiselect__option--highlight:after{background:#35495e}.multiselect__option--disabled.multiselect__option--highlight{background:#dedede}.multiselect__option--group-selected.multiselect__option--highlight{background:#ff6a6a;color:#fff}.multiselect__option--group-selected.multiselect__option--highlight:after{background:#ff6a6a;content:attr(data-deselect);color:#fff}.multiselect-enter-active,.multiselect-leave-active{-webkit-transition:all .15s ease;transition:all .15s ease}.multiselect-enter,.multiselect-leave-active{opacity:0}.multiselect__strong{margin-bottom:8px;line-height:20px;display:inline-block;vertical-align:top}[dir=rtl] .multiselect{text-align:right}[dir=rtl] .multiselect__select{right:auto;left:1px}[dir=rtl] .multiselect__tags{padding:8px 8px 0 40px}[dir=rtl] .multiselect__content{text-align:right}[dir=rtl] .multiselect__option:after{right:auto;left:0}[dir=rtl] .multiselect__clear{right:auto;left:12px}[dir=rtl] .multiselect__spinner{right:auto;left:1px}@-webkit-keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}@keyframes spinning{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(2turn);transform:rotate(2turn)}}
1+

dist/js/field.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/field.js.LICENSE.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*!
2+
* @kurkle/color v0.2.1
3+
* https://github.com/kurkle/color#readme
4+
* (c) 2022 Jukka Kurkela
5+
* Released under the MIT License
6+
*/
7+
8+
/*!
9+
* Chart.js v3.9.1
10+
* https://www.chartjs.org
11+
* (c) 2022 Chart.js Contributors
12+
* Released under the MIT License
13+
*/
14+
15+
/*!
16+
* The buffer module from node.js, for the browser.
17+
*
18+
* @author Feross Aboukhadijeh <http://feross.org>
19+
* @license MIT
20+
*/
21+
22+
/*!
23+
* vuex v4.1.0
24+
* (c) 2022 Evan You
25+
* @license MIT
26+
*/
27+
28+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
29+
30+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

dist/js/field.mjs

Lines changed: 35243 additions & 0 deletions
Large diffs are not rendered by default.

dist/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"/js/field.js": "/js/field.js",
33
"/css/field.css": "/css/field.css"
4-
}
4+
}

mix.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
const mix = require("laravel-mix");
2+
const webpack = require("webpack");
3+
const path = require("path");
4+
5+
class NovaExtension {
6+
name() {
7+
return "nova-extension";
8+
}
9+
10+
register(name) {
11+
this.name = name;
12+
}
13+
14+
webpackPlugins() {
15+
return new webpack.ProvidePlugin({
16+
_: "lodash",
17+
Errors: "form-backend-validation",
18+
});
19+
}
20+
21+
webpackConfig(webpackConfig) {
22+
webpackConfig.externals = {
23+
vue: "Vue",
24+
};
25+
26+
webpackConfig.resolve.alias = {
27+
...(webpackConfig.resolve.alias || {}),
28+
"laravel-nova": path.join(
29+
__dirname,
30+
"../../vendor/laravel/nova/resources/js/mixins/packages.js"
31+
),
32+
};
33+
34+
webpackConfig.output = {
35+
uniqueName: this.name,
36+
};
37+
}
38+
}
39+
40+
mix.extend("nova", new NovaExtension());

package.json

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@
22
"private": true,
33
"scripts": {
44
"dev": "npm run development",
5-
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6-
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7-
"watch-poll": "npm run watch -- --watch-poll",
8-
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
5+
"development": "mix",
6+
"watch": "mix watch",
7+
"watch-poll": "mix watch -- --watch-options-poll=1000",
8+
"hot": "mix watch --hot",
99
"prod": "npm run production",
10-
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
10+
"production": "mix --production"
1111
},
1212
"devDependencies": {
13-
"cross-env": "^5.0.0",
14-
"laravel-mix": "^1.0",
15-
"laravel-nova": "^1.0"
13+
"@inertiajs/inertia": "^0.11.0",
14+
"@vue/babel-plugin-jsx": "^1.1.0",
15+
"@vue/compiler-sfc": "^3.2.22",
16+
"form-backend-validation": "^2.3.3",
17+
"inflector-js": "^1.0.1",
18+
"laravel-mix": "^6.0.41",
19+
"lodash": "^4.17.21",
20+
"postcss": "^8.3.11",
21+
"vue-loader": "^16.8.3",
22+
"vuex": "^4.0.2"
1623
},
1724
"dependencies": {
18-
"vue": "^2.5.0",
19-
"chart.js": "^2.8.0",
20-
"vue-chartjs": "^3.4.2",
21-
"vue-multiselect": "^2.1.6"
25+
"chart.js": "^3.7.0",
26+
"vue": "^3.2.47",
27+
"vue-chartjs": "^4",
28+
"vue-multiselect": "^3.0.0-beta.1"
2229
}
2330
}

0 commit comments

Comments
 (0)