Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f23af9e
vue 3 support
dimailn Nov 24, 2022
20300df
alpha version
dimailn Nov 29, 2022
99d5046
0.64.0-alpha.0
dimailn Nov 29, 2022
2478860
specs launching
dimailn Mar 29, 2023
02073d8
fix i18n
dimailn Apr 3, 2024
f8e1757
0.98.2-alpha
dimailn Apr 3, 2024
223a5b6
fix scoped slots
dimailn Apr 3, 2024
e79fdd7
0.98.2-alpha.1
dimailn Apr 3, 2024
ebf9b8e
0.98.2-alpha.2
dimailn Apr 3, 2024
727c439
remove empty v-slot
dimailn Apr 4, 2024
da2b211
0.98.2-alpha.3
dimailn Apr 4, 2024
01ab9d0
added emits
dimailn Apr 4, 2024
17bbe65
added default
dimailn Apr 4, 2024
1c10157
got rid of vpo
dimailn Apr 5, 2024
1f72081
remove vpo and update webpack
dimailn Apr 5, 2024
bd7541d
0.98.2-alpha.4
dimailn Apr 5, 2024
6d06e9b
update vue and fix computed api
dimailn Apr 5, 2024
51a1d8d
0.98.2-alpha.5
dimailn Apr 5, 2024
b39815c
fix listeners
dimailn Jul 31, 2024
8f867a7
0.98.2-alpha.6
dimailn Jul 31, 2024
2aa35d1
0.98.2-alpha.7
dimailn Jul 31, 2024
eebeeb5
fixes
dimailn Aug 13, 2024
ae9f3ac
0.98.2-alpha.8
dimailn Aug 13, 2024
5a28a1f
fix update resource
dimailn Oct 22, 2024
548cb40
0.98.2-alpha.9
dimailn Oct 22, 2024
0c38bf3
fix
dimailn Oct 22, 2024
1d2d077
0.98.2-alpha.10
dimailn Oct 22, 2024
5f73d5e
upgrade tsc
dimailn Oct 22, 2024
90f7b72
fix onLoad
dimailn Apr 18, 2025
6a7950e
0.98.2-alpha.11
dimailn Apr 18, 2025
8cb996a
fix vue 3 build
dimailn May 6, 2025
887cf3c
0.98.2-alpha.12
dimailn May 6, 2025
0b32d71
update modelValue
dimailn Aug 13, 2025
7e576e9
beforeDestroy -> beforeUnmount
dimailn Aug 13, 2025
21dae1b
0.98.2-alpha.13
dimailn Aug 13, 2025
67aaad1
0.98.2-alpha.14
dimailn Aug 13, 2025
508a902
remove
dimailn Sep 12, 2025
6f90b9c
0.98.2-alpha.15
dimailn Sep 12, 2025
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 .babelrc → babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
resolve: {
extensions: ['.js', '.vue', '.json', '.coffee', '.js', '.ts'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'vue': '@vue/runtime-dom',
'@': resolve('src'),
}
},
Expand Down
3 changes: 3 additions & 0 deletions build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const webpackConfig = merge(baseWebpackConfig, {
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js'),
libraryTarget: 'commonjs2'
},
externals: {
'vue': 'vue'
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
// new webpack.DefinePlugin({
Expand Down
32,533 changes: 16,532 additions & 16,001 deletions package-lock.json

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vrf",
"version": "0.98.2",
"version": "0.98.2-alpha.15",
"description": "",
"author": "Dmitry Sadovsky <dimailn9@gmail.com>",
"scripts": {
Expand All @@ -12,7 +12,7 @@
"test": "npm run unit",
"build": "node build/build.js && npm run build:types",
"build:types": "tsc ./src/index.ts --outDir dist/static -d --emitDeclarationOnly",
"pub": "npm run build && npm publish",
"pub": "npm run build && npm publish --tag next",
"analyze": "webpack --config build/webpack.prod.conf.js --json > stats.json",
"styleguide": "NODE_ENV=development vue-styleguidist server",
"styleguide:build": "NODE_ENV=production vue-styleguidist build"
Expand All @@ -29,25 +29,26 @@
"lodash.debounce": "^4.0.8",
"lodash.get": "^4.4.2",
"lodash.merge": "^4.6.2",
"pluralize": "^8.0.0",
"vue-provide-observable": "^3.0.2"
"pluralize": "^8.0.0"
},
"devDependencies": {
"@babel/core": "^7.13.15",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-transform-classes": "^7.13.0",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.13.15",
"@jest/core": "^28.1.3",
"@testing-library/jest-dom": "^5.16.5",
"@vue/test-utils": "^1.1.4",
"@vue/test-utils": "^2.3.2",
"@vue/vue3-jest": "^28.1.0",
"autoprefixer": "^7.1.2",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^27.1.0",
"babel-jest": "^28.1.3",
"babel-loader": "^8.2.2",
"bdd-lazy-var": "^2.6.1",
"chalk": "^2.0.1",
"chromedriver": "^2.27.2",
"coffee-jest": "0.0.1",
"coffee-jest": "0.1.0",
"coffee-loader": "^0.9.0",
"coffeescript": "^2.5.1",
"copy-webpack-plugin": "^4.0.1",
Expand All @@ -57,10 +58,12 @@
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^4.5.2",
"jest": "^24.0.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^29.5.0",
"jest-jasmine2": "^29.5.0",
"jest-serializer-vue": "^0.3.0",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"node-notifier": "^8.0.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
Expand All @@ -73,20 +76,18 @@
"selenium-server": "^3.0.1",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"ts-jest": "^24.3.0",
"ts-jest": "^28.0.8",
"ts-loader": "^8.3.0",
"typescript": "^4.4.4",
"typescript": "^5.6.3",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue": "^2.6.11",
"vue-jest": "^3.0.7",
"vue-loader": "^15.9.8",
"vue": "^3.4.21",
"vue-loader": "^17.0.1",
"vue-router": "^3.0.1",
"vue-style-loader": "^3.0.1",
"vue-styleguidist": "^4.41.1",
"vue-template-compiler": "^2.6.11",
"vuex": "^3.6.2",
"webpack": "^4.46.0",
"vuex": "^4.1.0",
"webpack": "^4.47.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^4.0.0",
Expand Down
12 changes: 5 additions & 7 deletions playground/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import Vue from 'vue'
import {createApp} from 'vue'
import App from './App'
import Vrf from '../src'
import sources from './sources'

Vue.config.productionTip = false
// Vue.config.productionTip = false
const translate = (propertyName) => propertyName
Vue.use(Vrf, {sources, translate})

new Vue({
el: '#app',
render: (h) => h(App)
})
createApp(App)
.use(Vrf, {sources, translate})
.mount("#app")
6 changes: 3 additions & 3 deletions src/components/descriptors/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export default {
},
$on() {
return {
click: this.onClick
onClick: this.onClick
}
}
},
render: function(h) {
if (this.$scopedSlots.activator) {
const nodes = this.$scopedSlots['activator']({
if (this.$slots.activator) {
const nodes = this.$slots['activator']({
humanName: this.$label,
label: this.$label,
on: this.$on,
Expand Down
11 changes: 4 additions & 7 deletions src/components/descriptors/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default {
document.addEventListener('click', this.handleDocumentClick)
},

beforeDestroy(){
beforeUnmount(){
document.removeEventListener('click', this.handleDocumentClick)
},
created() {
Expand Down Expand Up @@ -241,10 +241,10 @@ export default {
return this.$templates[this.type] && this.$templates[this.type].item
},
hasItemsSlot() {
return !!this.$scopedSlots.items
return !!this.$slots.items
},
hasItemSlot() {
return !!this.$scopedSlots.item
return !!this.$slots.item
},
$idKey() {
return this.idKey || this.titleKey
Expand All @@ -261,10 +261,7 @@ export default {
return this.type.setup
}

const vue = Object.getPrototypeOf(this.$root).constructor

const provider = vue.prototype.VueResourceForm.autocompletes?.find((provider) => provider.name === this.type)

const provider = this.VueResourceForm.autocompletes?.find((provider) => provider.name === this.type)

if (!provider) {
throw `[vrf] Autocomplete provider for ${this.type} not found`;
Expand Down
14 changes: 10 additions & 4 deletions src/components/descriptors/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import set from '@/utils/set'
import Translate from '@/mixins/translate';

export default {
props: {
modelValue: [Number, String, Object],
disabled: Boolean,
readonly: Boolean
},
mixins: [Resource, Translate],
methods: {
onBlur: function(e) {
Expand All @@ -32,19 +37,20 @@ export default {
return this.name
},
$valuePropSpecified() {
return this.value !== undefined
return this.modelValue !== undefined
},
$originalValue: {
get() {
if(this.$valuePropSpecified){
return this.value
return this.modelValue
}

return get(this.$resource, this.$fieldName);
},
set(value) {
if(this.$valuePropSpecified){
this.$emit('input', value)
this.$emit('update:modelValue', value)

return
}
Expand All @@ -57,7 +63,7 @@ export default {


if (this.$vuex) {
const store = this.$store || this.VueResourceForm.store;
const store = this.$store || this.config.globalProperties.VueResourceForm.store;
if (!store) {
return console.warn("Store for VueResourceForm is not defined");
}
Expand All @@ -67,7 +73,7 @@ export default {
value
});
} else {
set(this.$resource, this.$fieldName, value, this.$set);
set(this.$resource, this.$fieldName, value);
}
}
},
Expand Down
Loading
Loading