@dasidev/dasi-ui 1.0.20 → 1.0.22

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/README.md CHANGED
@@ -1,402 +1,5 @@
1
- # @dasidev/dasi-ui
1
+ # Vue 3 + TypeScript + Vite
2
2
 
3
- A starter Vue 3 + TypeScript framework for building configurable, enterprise-ready web apps. It ships with a configuration-driven architecture, unified components, and type-safe development. Forms are powered by Vueform, which serves as the built-in form builder across the project.
3
+ This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
4
 
5
- ## 🚀 Quick Start
6
-
7
- Make sure you guys use node v20 or above
8
-
9
- ### Create New Project
10
-
11
- ```sh
12
- # Using npm (recommended)
13
- npx @dasidev/dasi-ui create my-admin-app
14
-
15
- # Using yarn
16
- yarn create @dasidev/dasi-ui my-admin-app
17
-
18
- # Using pnpm
19
- pnpm create @dasidev/dasi-ui my-admin-app
20
- ```
21
-
22
- ### Install as Library
23
-
24
- ```sh
25
- # Using npm
26
- npm install @dasidev/dasi-ui
27
-
28
- # Using yarn
29
- yarn add @dasidev/dasi-ui
30
-
31
- # Using pnpm
32
- pnpm add @dasidev/dasi-ui
33
- ```
34
-
35
- ### Requirements
36
- - Node.js: v20 or above
37
- -Package Manager: npm v10+, yarn, or pnpm
38
-
39
- ## 📦 Usage
40
-
41
- ```sh
42
- # Create new project with interactive setup
43
- npx @dasidev/dasi-ui create my-admin-app
44
-
45
- # Follow the prompts to configure:
46
- # - Project title and description
47
- # - Template (default/minimal/full)
48
- # - Features (auth, charts, maps, forms)
49
- # - Package manager
50
- # - TypeScript support
51
- # - API configuration
52
- # - Dark mode
53
-
54
- # Navigate to project directory
55
- cd my-admin-app
56
-
57
- # Install dependencies
58
- npm install
59
-
60
- # Run development server
61
- npm run dev
62
- ```
63
-
64
- ### As Component Library
65
- ``` typescript
66
- <template>
67
- <DasiApp>
68
- <PageActivity endpoint="/users" />
69
- </DasiApp>
70
- </template>
71
-
72
- <script setup>
73
- import { DasiApp, PageActivity } from '@dasidev/dasi-ui'
74
- import '@dasidev/dasi-ui/style.css'
75
- </script>
76
- ```
77
-
78
- ## 🏗️ Architecture Overview
79
-
80
- This framework follows a **configuration-driven architecture** where pages are defined through schemas and configurations, making it highly reusable and maintainable.
81
-
82
- ### Core Flow
83
-
84
- ```
85
- Route → PageActivity → Schema → Table → DataTableCell
86
- ↓ ↓ ↓ ↓ ↓
87
- Config → PageConfig → Columns → Render → Display
88
- ```
89
-
90
- ### Key Components
91
-
92
- - **PageActivity.vue** - Main page container
93
- - **DataTable.vue** - Unified table component
94
- - **DataTableCell.vue** - Smart cell renderer
95
- - **BaseSelector.vue** - Unified selector component
96
- - **DateSelectorElement.vue** - Unified date picker
97
-
98
- ## 📋 Configuration System
99
-
100
- ### 1. Application Configuration
101
-
102
- Create your app configuration in `src/config/my-app.config.ts`:
103
-
104
- ```typescript
105
- export default {
106
- app: {
107
- name: "My Application",
108
- version: "1.0.2"
109
- },
110
- api: {
111
- baseUrl: process.env.VITE_API_URL || "http://localhost:3000/api",
112
- timeout: 10000
113
- },
114
- branding: {
115
- companyName: "My Company",
116
- logo: "/logo.svg"
117
- }
118
- }
119
- ```
120
-
121
- ### 2. Page Configuration
122
-
123
- Create page-specific configs in `src/vueform/config/{endpoint}.ts`:
124
-
125
- ```typescript
126
- export default {
127
- endpoint: "/users",
128
- title: "User Management",
129
- columns: [
130
- { key: "name", header: "Name", visible: true },
131
- { key: "email", header: "Email", visible: true }
132
- ]
133
- }
134
- ```
135
-
136
- ### 3. Form Schema
137
-
138
- Define your form schemas in `src/vueform/schemas/{pageCode}/{schema}.ts`:
139
-
140
- ```typescript
141
- export default {
142
- schema: {
143
- name: {
144
- type: "text",
145
- label: "Full Name",
146
- rules: ["required"],
147
- showInTable: true
148
- },
149
- organizationId: {
150
- type: "selector",
151
- endpoint: "/organizations",
152
- label: "Organization",
153
- showAvatar: true,
154
- condition: { levels: "admin" },
155
- showInTable: true
156
- },
157
- birthDate: {
158
- type: "date_selector",
159
- label: "Birth Date",
160
- pickerType: "date",
161
- showInTable: true
162
- }
163
- }
164
- }
165
- ```
166
-
167
- ## 🎯 Unified Components
168
-
169
- ### BaseSelector
170
-
171
- A unified selector component that handles all selection needs:
172
-
173
- ```typescript
174
- // Single selection
175
- {
176
- type: "selector",
177
- endpoint: "/users",
178
- showAvatar: true,
179
- nameField: "name"
180
- }
181
-
182
- // Multiple selection
183
- {
184
- type: "selector",
185
- endpoint: "/users",
186
- multiple: true,
187
- showAvatar: true,
188
- returnObject: true
189
- }
190
-
191
- // With conditions and sorting
192
- {
193
- type: "selector",
194
- endpoint: "/organizations",
195
- condition: { levels: "admin" },
196
- orderBy: "name",
197
- sort: "asc"
198
- }
199
- ```
200
-
201
- ### DateSelectorElement
202
-
203
- A unified date picker supporting all date types:
204
-
205
- ```typescript
206
- // Single date
207
- {
208
- type: "date_selector",
209
- pickerType: "date",
210
- label: "Select Date"
211
- }
212
-
213
- // Date range
214
- {
215
- type: "date_selector",
216
- pickerType: "date",
217
- range: true,
218
- label: "Select Date Range"
219
- }
220
-
221
- // DateTime with time picker
222
- {
223
- type: "date_selector",
224
- pickerType: "datetime",
225
- enableTimePicker: true,
226
- label: "Select Date & Time"
227
- }
228
-
229
- // Month picker
230
- {
231
- type: "date_selector",
232
- pickerType: "month",
233
- label: "Select Month"
234
- }
235
-
236
- // Year picker
237
- {
238
- type: "date_selector",
239
- pickerType: "year",
240
- yearRange: [2020, 2030],
241
- label: "Select Year"
242
- }
243
- ```
244
-
245
- ## 📊 Table System
246
-
247
- ### Automatic Column Generation
248
-
249
- The framework automatically generates table columns from your form schema:
250
-
251
- ```typescript
252
- // Schema definition
253
- {
254
- name: {
255
- type: "text",
256
- label: "Name",
257
- showInTable: true,
258
- textAlign: "left"
259
- },
260
- organizationId: {
261
- type: "selector",
262
- endpoint: "/organizations",
263
- showAvatar: true,
264
- showInTable: true
265
- }
266
- }
267
-
268
- // Automatically becomes table columns
269
- // - Name (text column)
270
- // - Organization (selector with avatar)
271
- ```
272
-
273
- ### Cell Types
274
-
275
- The `DataTableCell.vue` component automatically handles different cell types:
276
-
277
- - **`text`** - Plain text display
278
- - **`selector`** - Selector with avatar support
279
- - **`date_selector`** - Date picker with all variants
280
- - **`toggle`** - Boolean toggle display
281
- - **`checkboxgroup`** - Checkbox group display
282
- - **`radiogroup`** - Radio group display
283
- - **`select`** - Select dropdown display
284
-
285
- ## 🔧 Development Workflow
286
-
287
- ### 1. Create New Page
288
-
289
- 1. **Add Route**: Define route in `src/router/index.ts`
290
- 2. **Create Schema**: Add schema in `src/vueform/schemas/{pageCode}/`
291
- 3. **Create Config**: Add page config in `src/vueform/config/`
292
- 4. **Test**: The page will automatically work with the framework
293
-
294
- ### 2. Add New Field
295
-
296
- 1. **Define in Schema**: Add field to your form schema
297
- 2. **Set Properties**: Configure `showInTable`, `cellType`, etc.
298
- 3. **Test**: Field automatically appears in both form and table
299
-
300
- ### 3. Custom Cell Rendering
301
-
302
- ```typescript
303
- // Custom cell renderer
304
- {
305
- name: {
306
- type: "text",
307
- cellRender: (i: number, row: any) => {
308
- return `<strong>${row.name}</strong>`;
309
- }
310
- }
311
- }
312
- ```
313
-
314
- ## 🎨 Styling & Theming
315
-
316
- ### Tailwind CSS
317
-
318
- The framework uses Tailwind CSS with custom configuration:
319
-
320
- - **Dark Mode**: Automatic dark mode support
321
- - **Custom Colors**: Brand-specific color schemes
322
- - **Responsive**: Mobile-first responsive design
323
-
324
- ### Component Styling
325
-
326
- Components are styled with Tailwind classes and support:
327
-
328
- - **Hover States**: Interactive hover effects
329
- - **Focus States**: Keyboard navigation support
330
- - **Disabled States**: Proper disabled styling
331
- - **Loading States**: Loading indicators
332
-
333
- ## 🎯 CLI Features
334
-
335
- The CLI provides interactive setup with:
336
- - Template Selection: Default, Minimal, or Full-featured
337
- - Feature Toggles: Authentication, Charts, Maps, Forms
338
- - Package Manager: npm, yarn, or pnpm
339
- - TypeScript: Optional TypeScript support
340
- - API Configuration: Custom API endpoints
341
- - Theming: Dark mode support
342
-
343
- Available Templates
344
- - Default - Complete admin dashboard with all core features
345
- - Minimal - Basic admin setup with essential components
346
- - Full - All features including charts, maps, and advanced forms
347
-
348
- ## 📚 Key Libraries
349
-
350
- - **Vue 3** - Main framework with Composition API
351
- - **TypeScript** - Type safety and better DX
352
- - **Tailwind CSS** - Utility-first CSS framework
353
- - **Shadcn-vue** - Component library
354
- - **Lucide Vue** - Icon library
355
- - **Vueform** - Form handling
356
- - **Pinia** - State management
357
- - **Vue Router** - Client-side routing
358
- - **Axios** - HTTP client
359
- - **Moment.js** - Date manipulation
360
-
361
- ## 🤝 Contribution
362
-
363
- 1. **Clone** the repository
364
- 2. **Create** a new branch for your feature: `git checkout -b feature-name`
365
- 3. **Develop** your feature following the framework patterns
366
- 4. **Test** your changes thoroughly
367
- 5. **Create** a pull request to the `dev` branch
368
-
369
- ### Branch Naming
370
-
371
- Use descriptive branch names:
372
- - `feature/user-management`
373
- - `fix/date-picker-bug`
374
- - `enhancement/table-performance`
375
-
376
- ## 📖 Documentation
377
-
378
- - **Framework Guide**: See `FRAMEWORK_GUIDE.md` for detailed documentation
379
- - **Quick Start**: See `QUICK_START.md` for getting started
380
- - **API Reference**: Check component documentation in code
381
-
382
- ## 🔧 Customization
383
-
384
- ### Environment Variables
385
-
386
- Create `.env.local`:
387
-
388
- ```env
389
- VITE_API_URL=http://localhost:3000/api
390
- VITE_APP_NAME=My Application
391
- VITE_COMPANY_NAME=My Company
392
- ```
393
-
394
- 🚀 Ready to build your next admin dashboard? Start with npx @dasidev/dasi-ui create my-app!
395
-
396
- ### Vite Configuration
397
-
398
- See [Vite Configuration Reference](https://vitejs.dev/config/) for advanced configuration options.
399
-
400
- ---
401
-
402
- **Built with ❤️ using Vue 3, TypeScript, and modern web technologies.**
5
+ Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
package/package.json CHANGED
@@ -1,84 +1,99 @@
1
1
  {
2
2
  "name": "@dasidev/dasi-ui",
3
- "version": "1.0.20",
4
- "description": "Complete Vue 3 Admin Template Generator",
5
- "private": false,
3
+ "version": "1.0.22",
6
4
  "type": "module",
7
- "main": "dist/index.js",
8
- "module": "dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "main": "./dist/dasi-ui.umd.js",
7
+ "module": "./dist/dasi-ui.es.js",
9
8
  "exports": {
10
9
  ".": {
11
- "import": "./dist/index.js",
12
- "require": "./dist/index.cjs"
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/dasi-ui.es.js",
12
+ "require": "./dist/dasi-ui.umd.js"
13
13
  },
14
- "./style.css": "./dist/style.css"
14
+ "./style.css": "./dist/dasi-ui.css"
15
15
  },
16
- "bin": {
17
- "dasi-ui": "./bin/dasi-cli.cjs"
16
+ "scripts": {
17
+ "build": "vite build && cp src/index.d.ts dist/index.d.ts",
18
+ "build:type-check": "vite build && vue-tsc -p tsconfig.build.json",
19
+ "type-check": "vue-tsc -p tsconfig.build.json"
18
20
  },
19
21
  "files": [
20
- "dist/",
21
- "bin/",
22
- "README.md"
22
+ "dist"
23
23
  ],
24
- "scripts": {
25
- "dev": "vite",
26
- "build": "vite build",
27
- "build-lib": "vite build --config vite.lib.config.ts",
28
- "preview": "vite preview",
29
- "test": "vitest",
30
- "test:unit": "vitest",
31
- "test:run": "vitest run",
32
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
33
- "format": "prettier --write \"src/**/*.{vue,js,ts,jsx,tsx,json,md}\"",
34
- "cli": "node bin/dasi-cli.cjs",
35
- "release": "npm version patch && npm publish --access public"
24
+ "peerDependencies": {
25
+ "@vee-validate/zod": "^4.12.6",
26
+ "@vueuse/core": "^10.9.0",
27
+ "pinia": "^3.0.4",
28
+ "vee-validate": "^4.12.6",
29
+ "vue": "^3.4.0",
30
+ "vue-router": "^5.0.2"
36
31
  },
37
32
  "dependencies": {
38
- "commander": "^14.0.2",
39
- "inquirer": "^8.2.7",
40
- "chalk": "^4.1.2",
41
- "ora": "^5.4.1",
42
- "fs-extra": "^11.3.3"
33
+ "@passwordless-id/webauthn": "^1.6.1",
34
+ "@radix-icons/vue": "^1.0.0",
35
+ "@vueform/plugin-mask": "^1.0.7",
36
+ "@vuepic/vue-datepicker": "^11.0.3",
37
+ "axios": "^1.6.0",
38
+ "class-variance-authority": "^0.7.0",
39
+ "clsx": "^2.1.0",
40
+ "curl-generator": "^0.4.1",
41
+ "date-fns": "^3.6.0",
42
+ "file-saver": "^2.0.5",
43
+ "flowbite": "^2.3.0",
44
+ "flowbite-vue": "^0.1.4",
45
+ "go-captcha-vue": "^2.0.6",
46
+ "highlight.js": "^11.9.0",
47
+ "jspdf": "^4.1.0",
48
+ "jspdf-autotable": "^5.0.2",
49
+ "lucide-vue-next": "^0.563.0",
50
+ "marked": "^13.0.3",
51
+ "moment": "^2.30.1",
52
+ "nanoid": "^5.0.9",
53
+ "pdfjs-dist": "^5.3.31",
54
+ "peerjs": "^1.5.2",
55
+ "radix-vue": "^1.5.1",
56
+ "sortablejs": "^1.15.6",
57
+ "tailwind-merge": "^2.2.1",
58
+ "tailwindcss-animate": "^1.0.7",
59
+ "v-calendar": "^3.1.2",
60
+ "v3-infinite-loading": "^1.3.1",
61
+ "vue-final-modal": "^4.5.4",
62
+ "vue-loading-overlay": "^6.0.4",
63
+ "vue-pdf-embed": "^2.1.0",
64
+ "vue-sonner": "^2.0.9",
65
+ "vue3-perfect-scrollbar": "^2.0.0",
66
+ "vuedraggable": "^4.1.0",
67
+ "xlsx": "^0.18.5",
68
+ "zod": "^3.22.4"
43
69
  },
44
70
  "devDependencies": {
45
71
  "@rushstack/eslint-patch": "^1.3.3",
46
72
  "@tsconfig/node20": "^20.1.2",
47
- "@types/fs-extra": "^11.0.4",
48
- "@types/inquirer": "^8.2.10",
73
+ "@types/file-saver": "^2.0.7",
74
+ "@types/jsdom": "^21.1.6",
75
+ "@types/jspdf": "^1.3.3",
49
76
  "@types/node": "^20.11.25",
50
- "@vitejs/plugin-vue": "^5.0.3",
51
- "@vitejs/plugin-vue-jsx": "^3.1.0",
77
+ "@vitejs/plugin-vue": "^5.2.4",
78
+ "@vitejs/plugin-vue-jsx": "^5.1.4",
52
79
  "@vue/eslint-config-prettier": "^8.0.0",
53
80
  "@vue/eslint-config-typescript": "^12.0.0",
54
81
  "@vue/test-utils": "^2.4.4",
55
- "@vue/tsconfig": "^0.5.1",
82
+ "@vue/tsconfig": "^0.8.1",
83
+ "autoprefixer": "^10.4.24",
56
84
  "eslint": "^8.49.0",
57
85
  "eslint-plugin-vue": "^9.17.0",
86
+ "jsdom": "^24.0.0",
87
+ "npm-run-all2": "^6.1.1",
58
88
  "prettier": "^3.2.5",
59
89
  "prettier-plugin-tailwindcss": "^0.5.12",
60
90
  "sass": "^1.71.1",
61
- "tailwindcss": "^3.4.1",
62
- "typescript": "~5.3.0",
63
- "vite": "^5.0.11",
64
- "vitest": "^1.2.2",
65
- "vue-tsc": "^1.8.27"
66
- },
67
- "keywords": [
68
- "vue3",
69
- "admin",
70
- "template",
71
- "dashboard",
72
- "typescript",
73
- "tailwindcss",
74
- "framework",
75
- "enterprise",
76
- "configuration-driven"
77
- ],
78
- "repository": {
79
- "type": "git",
80
- "url": "https://github.com/dasi-developer/framework-web-app.git"
81
- },
82
- "author": "DASI Developer",
83
- "license": "MIT"
91
+ "tailwindcss": "^3.4.19",
92
+ "typescript": "^5.9.3",
93
+ "vite": "^6.4.1",
94
+ "vite-plugin-dts": "^4.5.4",
95
+ "vite-raw-plugin": "^1.0.2",
96
+ "vitest": "^4.0.18",
97
+ "vue-tsc": "^3.2.4"
98
+ }
84
99
  }