diff --git a/src/coalesce-vue-vuetify3/package-lock.json b/src/coalesce-vue-vuetify3/package-lock.json index d1030ed25..1b64759e8 100644 --- a/src/coalesce-vue-vuetify3/package-lock.json +++ b/src/coalesce-vue-vuetify3/package-lock.json @@ -32,7 +32,7 @@ "vitest": "^2.0.3", "vue": "^3.4.6", "vue-router": "^4.4.1", - "vue-tsc": "^2.1.4", + "vue-tsc": "^2.1.10", "vuetify": "^3.7.1" }, "optionalDependencies": { @@ -64,7 +64,7 @@ "cross-blob": "^1.2.1", "jsdom": "^23.0.1", "lodash": "^4.17.15", - "typescript": "4.9.3", + "typescript": "5.6.3", "vite": "^5.4.6", "vitest": "^1.1.1", "vue": "2.7.8", @@ -377,18 +377,18 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -432,10 +432,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", - "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -527,14 +530,13 @@ } }, "node_modules/@babel/types": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", - "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1813,27 +1815,27 @@ } }, "node_modules/@volar/language-core": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.2.tgz", - "integrity": "sha512-sONt5RLvLL1SlBdhyUSthZzuKePbJ7DwFFB9zT0eyWpDl+v7GXGh/RkPxxWaR22bIhYtTzp4Ka1MWatl/53Riw==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.10.tgz", + "integrity": "sha512-hG3Z13+nJmGaT+fnQzAkS0hjJRa2FCeqZt6Bd+oGNhUkQ+mTFsDETg5rqUTxyzIh5pSOGY7FHCWUS8G82AzLCA==", "dev": true, "dependencies": { - "@volar/source-map": "2.4.2" + "@volar/source-map": "2.4.10" } }, "node_modules/@volar/source-map": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.2.tgz", - "integrity": "sha512-qiGfGgeZ5DEarPX3S+HcFktFCjfDrFPCXKeXNbrlB7v8cvtPRm8YVwoXOdGG1NhaL5rMlv5BZPVQyu4EdWWIvA==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.10.tgz", + "integrity": "sha512-OCV+b5ihV0RF3A7vEvNyHPi4G4kFa6ukPmyVocmqm5QzOd8r5yAtiNvaPEjl8dNvgC/lj4JPryeeHLdXd62rWA==", "dev": true }, "node_modules/@volar/typescript": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.2.tgz", - "integrity": "sha512-m2uZduhaHO1SZuagi30OsjI/X1gwkaEAC+9wT/nCNAtJ5FqXEkKvUncHmffG7ESDZPlFFUBK4vJ0D9Hfr+f2EA==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.10.tgz", + "integrity": "sha512-F8ZtBMhSXyYKuBfGpYwqA5rsONnOwAVvjyE7KPYJ7wgZqo2roASqNWUnianOomJX5u1cxeRooHV59N0PhvEOgw==", "dev": true, "dependencies": { - "@volar/language-core": "2.4.2", + "@volar/language-core": "2.4.10", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" } @@ -2002,16 +2004,16 @@ } }, "node_modules/@vue/language-core": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.1.4.tgz", - "integrity": "sha512-i8pfAgNjTNjabBX1xRsuV6aRw2E8bdQXwd5H8m3cUkTVJju3QN5nfdoXET0uK+yXsuloNJPzo6PXFujRRPNmMA==", + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.1.10.tgz", + "integrity": "sha512-DAI289d0K3AB5TUG3xDp9OuQ71CnrujQwJrQnfuZDwo6eGNf0UoRlPuaVNO+Zrn65PC3j0oB2i7mNmVPggeGeQ==", "dev": true, "dependencies": { - "@volar/language-core": "~2.4.1", - "@vue/compiler-dom": "^3.4.0", + "@volar/language-core": "~2.4.8", + "@vue/compiler-dom": "^3.5.0", "@vue/compiler-vue2": "^2.7.16", - "@vue/shared": "^3.4.0", - "computeds": "^0.0.1", + "@vue/shared": "^3.5.0", + "alien-signals": "^0.2.0", "minimatch": "^9.0.3", "muggle-string": "^0.4.1", "path-browserify": "^1.0.1" @@ -2025,6 +2027,35 @@ } } }, + "node_modules/@vue/language-core/node_modules/@vue/compiler-core": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz", + "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.13", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/language-core/node_modules/@vue/compiler-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz", + "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==", + "dev": true, + "dependencies": { + "@vue/compiler-core": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/language-core/node_modules/@vue/shared": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz", + "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", + "dev": true + }, "node_modules/@vue/reactivity": { "version": "3.4.32", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.32.tgz", @@ -2143,6 +2174,12 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/alien-signals": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-0.2.2.tgz", + "integrity": "sha512-cZIRkbERILsBOXTQmMrxc9hgpxglstn69zm+F1ARf4aPAzdAFYd6sBq87ErO0Fj3DV94tglcyHG5kQz9nDC/8A==", + "dev": true + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2497,12 +2534,6 @@ "node": ">=14" } }, - "node_modules/computeds": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/computeds/-/computeds-0.0.1.tgz", - "integrity": "sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -5067,15 +5098,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5527,13 +5549,13 @@ } }, "node_modules/vue-tsc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.1.4.tgz", - "integrity": "sha512-XTzMXQcsixAvNbpou/9qngEsZawaiJRZH3Ja+lfgRfv2A1TJv9vnZ/Kyv7XxPqv/TaZVFSnjGpM87VbWIg6yQg==", + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.1.10.tgz", + "integrity": "sha512-RBNSfaaRHcN5uqVqJSZh++Gy/YUzryuv9u1aFWhsammDJXNtUiJMNoJ747lZcQ68wUQFx6E73y4FY3D8E7FGMA==", "dev": true, "dependencies": { - "@volar/typescript": "~2.4.1", - "@vue/language-core": "2.1.4", + "@volar/typescript": "~2.4.8", + "@vue/language-core": "2.1.10", "semver": "^7.5.4" }, "bin": { diff --git a/src/coalesce-vue-vuetify3/package.json b/src/coalesce-vue-vuetify3/package.json index ac59a798a..56f2ba7e8 100644 --- a/src/coalesce-vue-vuetify3/package.json +++ b/src/coalesce-vue-vuetify3/package.json @@ -67,7 +67,7 @@ "vitest": "^2.0.3", "vue": "^3.4.6", "vue-router": "^4.4.1", - "vue-tsc": "^2.1.4", + "vue-tsc": "^2.1.10", "vuetify": "^3.7.1" }, "postcss": { diff --git a/src/coalesce-vue-vuetify3/src/components/admin/c-admin-display.vue b/src/coalesce-vue-vuetify3/src/components/admin/c-admin-display.vue index cb79d46d2..fe052ecd0 100644 --- a/src/coalesce-vue-vuetify3/src/components/admin/c-admin-display.vue +++ b/src/coalesce-vue-vuetify3/src/components/admin/c-admin-display.vue @@ -109,7 +109,7 @@ function render() { } } - return h(CDisplay, { ...props }); + return h(CDisplay, { ...props }); } diff --git a/src/coalesce-vue-vuetify3/src/components/input/c-input.vue b/src/coalesce-vue-vuetify3/src/components/input/c-input.vue index 0ec1b541c..62a6391e1 100644 --- a/src/coalesce-vue-vuetify3/src/components/input/c-input.vue +++ b/src/coalesce-vue-vuetify3/src/components/input/c-input.vue @@ -32,6 +32,45 @@ function addHandler(data: any, eventName: string, handler: Function) { oldValue.push(handler); } } + +type _ValueType< + TModel extends Model | DataSource | AnyArgCaller | undefined, + TFor extends ForSpec +> = TFor extends string & keyof ModelTypeLookup + ? ModelTypeLookup[TFor] + : TFor extends ModelReferenceNavigationProperty | ModelValue + ? TFor["typeDef"]["name"] extends keyof ModelTypeLookup + ? ModelTypeLookup[TFor["typeDef"]["name"]] + : any + : TFor extends ForeignKeyProperty + ? TFor["principalType"]["name"] extends keyof ModelTypeLookup + ? ModelTypeLookup[TFor["principalType"]["name"]] + : any + : TModel extends ApiStateTypeWithArgs + ? TFor extends keyof TArgsObj + ? TArgsObj[TFor] + : any + : TModel extends Model + ? TFor extends PropNames + ? TModel["$metadata"]["props"][TFor] extends + | ModelReferenceNavigationProperty + | ModelValue + ? TModel["$metadata"]["props"][TFor]["typeDef"]["name"] extends keyof ModelTypeLookup + ? ModelTypeLookup[TModel["$metadata"]["props"][TFor]["typeDef"]["name"]] + : any + : TModel["$metadata"]["props"][TFor] extends ForeignKeyProperty + ? TModel["$metadata"]["props"][TFor]["principalType"]["name"] extends keyof ModelTypeLookup + ? ModelTypeLookup[TModel["$metadata"]["props"][TFor]["principalType"]["name"]] + : any + : TModel["$metadata"]["props"][TFor] extends CollectionProperty + ? Array< + TypeDiscriminatorToType< + TModel["$metadata"]["props"][TFor]["itemType"]["type"] + > + > + : TypeDiscriminatorToType + : any + : Model; +