{ "name": "opinionate-primevue", "version": "0.8.1", "type": "module", "license": "MIT", "author": "Tim Merrison ", "config": { "gql_api": { "prefix": "http://", "hostname": "localhost", "port": 5000, "path": "/graphql" }, "language": null, "currency": null, "defaultPrimaryLabel": "_id_", "defaultMeta": { "templates": [ "${['_id_','nodeId'].includes(item.name) ? '' : 'switchboard\", \"list'+(item.type && item.type.kind=='LIST' ? '' : '\", \"crud')}" ], "label": "${camel2proper(item.name)}", "readonly": "${(isEntity(item) && item.fields[0].name!=='nodeId') || (!isEntity(item) && !isField(item)) || (item.type && item.type.kind=='LIST') || ['nodeId'].includes(item.name) || (item.name.endsWith('Id') && item.name==parent.fields[1].name && !parent.fields[2].name.endsWith('Id'))}", "plural": "${!isEntity(item) ? 'null' : plural(item.name)}", "menu": "${!isEntity(item) ? 'null' : 'Entities'}", "primaryKey": "${!isEntity(item) ? 'null' : item.fields[1].name}", "primaryLabel": "${!isEntity(item) ? 'null' : item.fields.filter(e => e.name=='_id_').map(e => e.name).includes('_id_') ? '_id_' : item.fields[1].name}", "sType": "${isEntity(item) ? 'null' : getType(item)}", "format": "${isEntity(item) ? 'null' : item.type.kind=='ENUM' ? 'enum' : ['money','money!'].includes(getType(item)) ? 'currency' : ['Boolean','Boolean!'].includes(getType(item)) ? 'boolean' : ['Date','Date!'].includes(getType(item)) ? 'date' : ['Datetime','Datetime!'].includes(getType(item)) ? 'datetime' : !isField(item) || ['Int','Int!','BigInt','BigInt!','Float','Float!','BigFloat','BigFloat!','Year','Year!'].includes(getType(item)) ? 'number' : 'string'}", "maxDP": "${isEntity(item) ? 'null' : ['money','money!'].includes(getType(item)) ? '2' : ['Float','Float!','BigFloat','BigFloat!'].includes(getType(item)) ? '4' : 'null'}", "required": "${isEntity(item) ? 'null' : (item.type && item.type.kind=='NON_NULL' ? 'true' : 'false')}", "array": "${isEntity(item) ? 'null' : (item.type && item.type.kind=='LIST' ? 'true' : 'false')}", "align": "${isEntity(item) ? 'null' : !isField(item) || ['money','money!','Date','Date!','Datetime','Datetime!','Int','Int!','BigInt','BigInt!','Float','FLoat!','BigFloat','BigFLoat!','Year','Year!'].includes(getType(item)) ? 'right' : ['Boolean','Boolean!'].includes(getType(item)) ? 'center' : 'left'}", "default": "${isEntity(item) ? 'null' : ['Boolean','Boolean!'].includes(getType(item)) ? 'false' : ''}", "linkEntity": "${isEntity(item) ? 'null' : getType(item)==false ? to1UpperCase(singular(item.name.split('By')[0])) : !isField(item) || !parent.fields.find(link => getType(link)==null && link.name.toLowerCase().endsWith('by'+item.name.toLowerCase())) ? 'null' : to1UpperCase(parent.fields.find(link => getType(link)==null && link.name.toLowerCase().endsWith('by'+item.name.toLowerCase())).name.toString().split('By')[0])}", "linkFields": "${isEntity(item) ? 'null' : getType(item)==false ? to1LowerCase(item.name.split('By')[1]) : 'null'}", "linkFieldsFrom": "${isEntity(item) ? 'null' : getType(item)==false ? parent.fields[1].name : !isField(item) ? 'null' : !parent.fields.find(link => getType(link)==null && link.name.toLowerCase().endsWith('by'+item.name.toLowerCase())) ? 'null' : types.filter(e => isEntity(e) && e.name==to1UpperCase(parent.fields.find(link => getType(link)==null && link.name.toLowerCase().endsWith('by'+item.name.toLowerCase())).name.toString().split('By')[0])).map(e => e.fields[1].name)}" } }, "scripts": { "backend": "postgraphile -c postgres://test:testpass@/pagila -s public --cors --enhance-graphiql -n localhost -p 5000 -q /graphql", "preinstall": "npx only-allow pnpm", "gen-json": "postgraphile -c postgres://test:testpass@/pagila -s public -X --export-schema-json models/schema.json", "gen-gql": "postgraphile -c postgres://test:testpass@/pagila -s public -X --export-schema-graphql models/schema.gql", "gen-ts": "graphql-codegen --config node_modules/opinionate/models/codegen.yml", "gen-overlay": "opinionate meta --overlay-out models/overlayOut.json", "gen-code": "opinionate gen --template node_modules/opinionate/templates/primevue -o models/overlayOut.json", "gen": "pnpm install && pnpm gen-json && pnpm gen-gql && pnpm gen-ts && pnpm gen-overlay && pnpm gen-code", "build": "vue-tsc && vite build", "watch-build": "chokidar 'src/**/*' -c 'pnpm run build'", "dev": "vite --host", "genDev": "pnpm gen && pnpm build && pnpm dev", "preview": "vite preview", "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src" }, "dependencies": { "@primevue/themes": "^4.4.1", "graphql": "^16.12.0", "graphql-tag": "^2.12.6", "primeicons": "^7.0.0", "primelocale": "^2.2.2", "primevue": "^4.4.1", "vee-validate": "^4.15.1", "villus": "^3.5.2", "vue": "^3.5.24", "vue-router": "^4.6.3" }, "devDependencies": { "@graphql-codegen/cli": "^6.1.1", "@graphql-codegen/typescript": "^5.0.7", "@vitejs/plugin-vue": "^6.0.2", "@vue/tsconfig": "^0.8.1", "opinionate": "github:tjme/opinionate#master", "typescript": "^5.9.3", "vite": "^7.2.4", "vue-tsc": "^3.1.2" } }