adonis-atlas 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/build/chunk-7QVYU63E.js +7 -0
- package/build/chunk-7QVYU63E.js.map +1 -0
- package/build/client/app.js +20 -0
- package/build/client/app.js.map +1 -0
- package/build/client/boot.js +23 -0
- package/build/client/boot.js.map +1 -0
- package/build/client/resources/components/DataTable.vue +103 -0
- package/build/client/resources/components/FormField.vue +40 -0
- package/build/client/resources/components/Layout.vue +68 -0
- package/build/client/resources/components/Pagination.vue +60 -0
- package/build/client/resources/components/SearchBar.vue +41 -0
- package/build/client/resources/components/fields/BooleanField.vue +26 -0
- package/build/client/resources/components/fields/DateTimeField.vue +26 -0
- package/build/client/resources/components/fields/EmailField.vue +27 -0
- package/build/client/resources/components/fields/NumberField.vue +27 -0
- package/build/client/resources/components/fields/PasswordField.vue +28 -0
- package/build/client/resources/components/fields/TextField.vue +27 -0
- package/build/client/resources/css/atlas.css +662 -0
- package/build/client/resources/pages/atlas/Create.vue +132 -0
- package/build/client/resources/pages/atlas/Edit.vue +145 -0
- package/build/client/resources/pages/atlas/Index.vue +138 -0
- package/build/commands/main.js +9 -0
- package/build/commands/main.js.map +1 -0
- package/build/commands/make_resource.js +42 -0
- package/build/commands/make_resource.js.map +1 -0
- package/build/configure.js +17 -0
- package/build/configure.js.map +1 -0
- package/build/index.js +29 -0
- package/build/index.js.map +1 -0
- package/build/providers/atlas_provider.js +56 -0
- package/build/providers/atlas_provider.js.map +1 -0
- package/build/stubs/config.stub +18 -0
- package/build/stubs/resource.stub +25 -0
- package/package.json +81 -0
- package/stubs/config.stub +18 -0
- package/stubs/main.ts +3 -0
- package/stubs/resource.stub +25 -0
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "adonis-atlas",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Adonis Atlas - Admin Panel for AdonisJS",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./build/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"build",
|
|
9
|
+
"stubs"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./build/index.js",
|
|
13
|
+
"./atlas_provider": "./build/providers/atlas_provider.js",
|
|
14
|
+
"./commands": "./build/commands/main.js",
|
|
15
|
+
"./configure": "./build/configure.js",
|
|
16
|
+
"./client": "./build/client/app.js",
|
|
17
|
+
"./boot": "./build/client/boot.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup && npm run assets:copy",
|
|
21
|
+
"assets:copy": "copyfiles -u 0 \"stubs/**/*.stub\" build && copyfiles -u 1 \"src/client/resources/**/*\" build",
|
|
22
|
+
"dev": "tsup --watch",
|
|
23
|
+
"test": "tsx bin/test.ts",
|
|
24
|
+
"typecheck": "tsc --noEmit",
|
|
25
|
+
"prepublishOnly": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"adonisjs",
|
|
29
|
+
"admin",
|
|
30
|
+
"panel",
|
|
31
|
+
"crud",
|
|
32
|
+
"resource-management"
|
|
33
|
+
],
|
|
34
|
+
"author": "Fachri Hawari",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"homepage": "https://github.com/fachrihawari/adonis-atlas#readme",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/fachrihawari/adonis-atlas.git",
|
|
40
|
+
"directory": "packages/adonis-atlas"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/fachrihawari/adonis-atlas/issues"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@adonisjs/core": "^6.18.0",
|
|
47
|
+
"@adonisjs/lucid": "^21.0.0",
|
|
48
|
+
"@adonisjs/tsconfig": "^1.4.0",
|
|
49
|
+
"@inertiajs/vue3": "^2.0.0",
|
|
50
|
+
"@japa/assert": "^4.0.0",
|
|
51
|
+
"@japa/runner": "^4.0.0",
|
|
52
|
+
"@types/node": "^22.0.0",
|
|
53
|
+
"copyfiles": "^2.4.1",
|
|
54
|
+
"tsup": "^8.0.0",
|
|
55
|
+
"tsx": "^4.0.0",
|
|
56
|
+
"typescript": "^5.0.0",
|
|
57
|
+
"vue": "^3.5.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@adonisjs/core": "^6.0.0",
|
|
61
|
+
"@adonisjs/lucid": "^20.0.0 || ^21.0.0",
|
|
62
|
+
"@adonisjs/vite": "^3.0.0 || ^4.0.0",
|
|
63
|
+
"@inertiajs/vue3": "^1.0.0 || ^2.0.0",
|
|
64
|
+
"vue": "^3.4.0 || ^3.5.0"
|
|
65
|
+
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=20.6.0"
|
|
68
|
+
},
|
|
69
|
+
"adonisjs": {
|
|
70
|
+
"providers": [
|
|
71
|
+
"adonis-atlas/atlas_provider"
|
|
72
|
+
],
|
|
73
|
+
"commands": [
|
|
74
|
+
"adonis-atlas/commands"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"access": "public",
|
|
79
|
+
"tag": "latest"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{{{
|
|
2
|
+
exports({
|
|
3
|
+
to: app.configPath('atlas.ts')
|
|
4
|
+
})
|
|
5
|
+
}}}
|
|
6
|
+
import { defineConfig } from 'adonis-atlas'
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
/**
|
|
10
|
+
* The prefix for Atlas routes
|
|
11
|
+
*/
|
|
12
|
+
prefix: '/atlas',
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Whether to automatically mount routes
|
|
16
|
+
*/
|
|
17
|
+
mountRoutes: true,
|
|
18
|
+
})
|
package/stubs/main.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{{{
|
|
2
|
+
exports({
|
|
3
|
+
to: app.makePath('app/atlas/resources', string(name).snakeCase() + '_resource.ts')
|
|
4
|
+
})
|
|
5
|
+
}}}
|
|
6
|
+
import { Resource } from 'adonis-atlas'
|
|
7
|
+
import { TextField, DateTimeField } from 'adonis-atlas'
|
|
8
|
+
import {{ name }} from '#models/{{ string(name).snakeCase() }}'
|
|
9
|
+
|
|
10
|
+
export default class {{ name }}Resource extends Resource {
|
|
11
|
+
static model = {{ name }}
|
|
12
|
+
static title = '{{ string(name).plural() }}'
|
|
13
|
+
|
|
14
|
+
fields() {
|
|
15
|
+
return [
|
|
16
|
+
TextField.make('id').sortable(),
|
|
17
|
+
|
|
18
|
+
// TODO: Add your fields here
|
|
19
|
+
|
|
20
|
+
DateTimeField.make('createdAt')
|
|
21
|
+
.label('Created At')
|
|
22
|
+
.sortable(),
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|