Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check existence of computed value before display #416

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions dist/js/field.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
*/

/*!
* vuex v4.0.2
* (c) 2021 Evan You
* @license MIT
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*! *****************************************************************************
Expand All @@ -25,6 +26,15 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

/**!
* Sortable 1.14.0
* @author RubaXa <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@vue/compiler-sfc": "^3.2.33",
"cross-env": "^5.0.0",
"laravel-mix": "^6.0",
"laravel-nova": "^1.12.3",
"object-to-formdata": "^1.5.2",
"resolve-url-loader": "2.3.1",
"sass": "^1.19.0",
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/fields/IndexField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<span v-if="field.multiple">
{{ field.value.map(({ file_name }) => file_name).join(', ') }}
</span>
<span v-else>{{ field.value[0].file_name }}</span>
<span v-else-if="value">{{ field.value[0].file_name }}</span>
<span v-else>&mdash;</span>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mix.setPublicPath('dist')
}
})
.alias({
'laravel-nova': path.join(__dirname, '../../laravel/nova/resources/js/mixins/packages.js'),
// 'laravel-nova': path.join(__dirname, '../../laravel/nova/resources/js/mixins/packages.js'),
'axios': path.join(__dirname, 'node_modules/axios'),
'lodash': path.join(__dirname, 'node_modules/lodash'),
'form-backend-validation': path.join(__dirname, 'node_modules/form-backend-validation'),
Expand Down
21 changes: 20 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,11 @@ babel-plugin-polyfill-regenerator@^0.3.0:
dependencies:
"@babel/helper-define-polyfill-provider" "^0.3.1"

babel-plugin-syntax-jsx@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
integrity sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==

balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
Expand Down Expand Up @@ -2791,7 +2796,7 @@ follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.8:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==

form-backend-validation@^2.4.0:
form-backend-validation@^2.3.3, form-backend-validation@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/form-backend-validation/-/form-backend-validation-2.4.0.tgz#9ef53d1dc5a25738adffb622ebdd22ea0f9edb66"
integrity sha512-/AUVPYEqgWarqmMx/oe3AipthX18VzA7APZwvyweXDMvdZvKv4ClGakwLLz0NqeWweyhyiPg6et92Fepv2KTNA==
Expand Down Expand Up @@ -3166,6 +3171,11 @@ import-local@^3.0.2:
pkg-dir "^4.2.0"
resolve-cwd "^3.0.0"

inflector-js@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/inflector-js/-/inflector-js-1.0.1.tgz#8f2b8dae06ba8c1a846e40a196a5e132721be0e0"
integrity sha512-GYvCqr8mGKPoYH+08e76PV8JoIygIVC9Jxw2jA5QjBm/mK+mJqGdzEcs3L5nugnvP03yHajXpBRMRgHx0e770A==

inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
Expand Down Expand Up @@ -3430,6 +3440,15 @@ laravel-mix@^6.0:
webpackbar "^5.0.0-3"
yargs "^17.2.1"

laravel-nova@^1.12.3:
version "1.12.3"
resolved "https://registry.yarnpkg.com/laravel-nova/-/laravel-nova-1.12.3.tgz#01a24339dcbc674738c686dfa2b6c8108e2fb540"
integrity sha512-mK0z8pGmMCc6AYpvB7hBJM1VCgQo4t0w4LsLXkEyk6dsngGdgtSJPE/TpieiEStzg1pve9AShsUWwKTjSl6Ygw==
dependencies:
babel-plugin-syntax-jsx "^6.18.0"
form-backend-validation "^2.3.3"
inflector-js "^1.0.1"

laravel-vapor@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/laravel-vapor/-/laravel-vapor-0.4.2.tgz#78bf3512d624f32a4a96efc14adf5331e2e9dd53"
Expand Down