@fewangsit/wangsvue-gsts 2.0.0-alpha.3 → 2.0.0-alpha.30

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.
Files changed (76) hide show
  1. package/assets/scanner.worker-DQsz7oT_.js.map +1 -0
  2. package/badge/Badge.fm.md +32 -0
  3. package/basetree/index.d.ts +31 -0
  4. package/breadcrumb/Breadcrumb.fm.md +23 -0
  5. package/button/Button.fm.md +53 -0
  6. package/buttonbulkaction/ButtonBulkAction-MenuItem.fm.md +18 -0
  7. package/buttonbulkaction/ButtonBulkAction.fm.md +25 -0
  8. package/buttondownload/ButtonDownload.fm.md +22 -0
  9. package/buttonfilter/ButtonFilter.fm.md +19 -0
  10. package/buttonscan/index.d.ts +6 -0
  11. package/buttonsearch/ButtonSearch.fm.md +19 -0
  12. package/buttonsearchbyscan/ButtonSearchByScan.fm.md +25 -0
  13. package/buttonselecttree/ButtonSelectTree.fm.md +40 -0
  14. package/buttonselecttree/index.d.ts +18 -0
  15. package/calendar/Calendar.fm.md +34 -0
  16. package/calendar/index.d.ts +41 -0
  17. package/changelogpage/index.d.ts +1 -1
  18. package/components.fm.md +56 -0
  19. package/customcolumn/index.d.ts +5 -5
  20. package/datatable/DataTable-MenuItem.fm.md +22 -0
  21. package/datatable/DataTable-TableColumn.fm.md +52 -0
  22. package/datatable/DataTable.fm.md +40 -0
  23. package/datatable/index.d.ts +10 -2
  24. package/dialog/index.d.ts +5 -0
  25. package/dialogconfirm/DialogConfirm.fm.md +29 -0
  26. package/dialogconfirm/index.d.ts +1 -0
  27. package/dialogform/DialogForm.fm.md +57 -0
  28. package/dialogform/index.d.ts +1 -1
  29. package/dialogselecttree/DialogSelectTree.fm.md +42 -0
  30. package/dialogselecttree/index.d.ts +25 -1
  31. package/dropdown/Dropdown.fm.md +34 -0
  32. package/fieldwrapper/index.d.ts +5 -0
  33. package/fileupload/FileUpload.fm.md +31 -0
  34. package/fileupload/index.d.ts +7 -1
  35. package/icon/index.d.ts +80 -67
  36. package/imagecompressor/ImageCompressor.fm.md +44 -0
  37. package/imagecompressor/index.d.ts +1 -1
  38. package/inputbadge/InputBadge.fm.md +34 -0
  39. package/inputbadge/index.d.ts +4 -0
  40. package/inputcurrency/index.d.ts +14 -0
  41. package/inputnumber/InputNumber.fm.md +39 -0
  42. package/inputpassword/InputPassword.fm.md +28 -0
  43. package/inputpassword/index.d.ts +4 -0
  44. package/inputphonenumber/InputPhoneNumber.fm.md +34 -0
  45. package/inputrangenumber/InputRangeNumber.fm.md +31 -0
  46. package/inputtext/InputText.fm.md +34 -0
  47. package/mcp/components.json +44 -35
  48. package/mcp/components.summary.txt +7 -4
  49. package/mcp/main.js +1276 -1152
  50. package/mcp/package.json +6 -6
  51. package/mcp/skills/api-service-generator/SKILL.md +93 -93
  52. package/mcp/skills/committing-changes/SKILL.md +38 -38
  53. package/mcp/skills/figma-datatable-generator/SKILL.md +93 -93
  54. package/mcp/skills/figma-to-code/SKILL.md +118 -117
  55. package/mcp/skills/import-validator/SKILL.md +54 -54
  56. package/mcp/skills/wangsvue-code-review/SKILL.md +72 -70
  57. package/mcp/skills/wangsvue-workflow/SKILL.md +92 -91
  58. package/menu/index.d.ts +4 -0
  59. package/multiselect/MultiSelect.fm.md +34 -0
  60. package/overlaypanel/index.d.ts +4 -0
  61. package/package.json +1 -1
  62. package/plugins/WangsVue.d.ts +4 -1
  63. package/stats.html +1 -1
  64. package/style.css +2 -2
  65. package/tabmenu/TabMenu.fm.md +28 -0
  66. package/tagtype/index.d.ts +1 -1
  67. package/textarea/TextArea.fm.md +34 -0
  68. package/toast/index.d.ts +13 -0
  69. package/tree/index.d.ts +34 -0
  70. package/utils/baseToast.util.d.ts +1 -24
  71. package/utils/toast.util.d.ts +1 -3
  72. package/wangsvue-gsts.es.js +21496 -21174
  73. package/wangsvue-gsts.es.js.map +1 -1
  74. package/wangsvue-gsts.system.js +62 -62
  75. package/wangsvue-gsts.system.js.map +1 -1
  76. package/assets/scanner.worker-CqQNqzoU.js.map +0 -1
package/mcp/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-gsts-mcp",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.29",
4
4
  "description": "MCP Server for @fewangsit/wangsvue-gsts",
5
5
  "main": "main.js",
6
6
  "type": "module",
@@ -10,18 +10,18 @@
10
10
  "buildContext": {
11
11
  "package": {
12
12
  "name": "@fewangsit/wangsvue-gsts",
13
- "version": "2.0.0-alpha.2",
13
+ "version": "2.0.0-alpha.29",
14
14
  "description": "Global Settings Tagsamurai VueJS Component Library",
15
15
  "repository": "https://github.com/fewangsit/wangsvue",
16
16
  "workspace": "wangsvue-gsts"
17
17
  },
18
18
  "build": {
19
- "timestamp": "2026-02-09T18:17:30.351Z",
19
+ "timestamp": "2026-07-01T09:29:38.903Z",
20
20
  "gitInfo": {
21
- "head": "225c9551f2f71c7c5f9ce394cc07a9d6d8b2560e",
21
+ "head": "857c300043feadf849a5134c5e433ea43b1cda8b",
22
22
  "branch": "dev",
23
- "repository": "https://github.com/fewangsit/wangsvue.git",
24
- "timestamp": "2026-02-09T18:17:30.132Z"
23
+ "repository": "git@github.com:fewangsit/wangsvue.git",
24
+ "timestamp": "2026-07-01T09:29:37.924Z"
25
25
  }
26
26
  }
27
27
  }
@@ -1,93 +1,93 @@
1
- ---
2
- name: 'api-service-generator'
3
- description: 'Generates production-ready API Services, DTOs, and Response Types from OpenAPI specifications. Invoke when user provides an OpenAPI spec or asks to create API services.'
4
- ---
5
-
6
- # API Service Generator
7
-
8
- This skill automates the creation of API services, request DTOs, and response types based on an OpenAPI (Swagger) specification, following the project's architectural standards.
9
-
10
- ## When to Use
11
-
12
- - Invoke when the user provides an OpenAPI specification (YAML or JSON).
13
- - Invoke when the user asks to "create API services" or "implement endpoints" from a spec.
14
- - Invoke when updating existing services based on a new API version.
15
-
16
- ## Standards & Patterns
17
-
18
- ### 1. File Structure
19
-
20
- - **Services**: `src/services/<serviceName>.service.ts`
21
- - **Request DTOs**: `src/dto/<serviceName>.dto.ts`
22
- - **Response Types**: `src/types/<serviceName>.type.ts`
23
-
24
- ### 2. Service Object
25
-
26
- - Use **PascalCase** for the service object name (e.g., `AuthService`).
27
- - Use **camelCase** for methods (e.g., `postLogin`).
28
- - Methods should follow the naming: `[httpMethod][ActionName]` (e.g., `getDetail`, `postCreate`).
29
- - Return type: `Promise<AxiosResponse<ResponseType>>`.
30
- - Single line spacing between methods.
31
-
32
- ### 3. Instance Creation
33
-
34
- ```typescript
35
- import { AxiosResponse } from 'axios';
36
- import createAxiosInstance from './createInstance';
37
-
38
- const API = createAxiosInstance({
39
- env: 'VITE_API_BASE_URL',
40
- prefix: '/v2/iam',
41
- });
42
- ```
43
-
44
- ### 4. DTOs & Types
45
-
46
- - **DTOs**: Interfaces for request bodies and query params.
47
- - **Types**: Interfaces for response bodies.
48
- - Use clear, descriptive noun-based names (e.g., `LoginBody`, `LoginResponse`).
49
- - Use `UserProfileResponse` instead of `GetUserProfileResponse`.
50
-
51
- ## Workflow
52
-
53
- 1. **Parse the Spec**: Identify paths, methods, request schemas, and response schemas.
54
- 2. **Group by Module**: Group endpoints by their primary path segment (e.g., `/auth/*` -> `AuthService`).
55
- 3. **Generate Interfaces**:
56
- - Create `src/dto/<module>.dto.ts` for all request-related interfaces.
57
- - Create `src/types/<module>.type.ts` for all response-related interfaces.
58
- 4. **Generate Service**:
59
- - Create `src/services/<module>.service.ts`.
60
- - Implement methods for each endpoint in the group.
61
- 5. **Register Service**:
62
- - Export the service from `src/main.ts` for global availability.
63
-
64
- ## Example Transformation
65
-
66
- **Input (OpenAPI):**
67
-
68
- ```yaml
69
- /auth/login:
70
- post:
71
- summary: Login
72
- requestBody:
73
- content:
74
- application/json:
75
- schema:
76
- $ref: '#/components/schemas/LoginRequest'
77
- responses:
78
- '200':
79
- content:
80
- application/json:
81
- schema:
82
- $ref: '#/components/schemas/LoginResponse'
83
- ```
84
-
85
- **Output (Service):**
86
-
87
- ```typescript
88
- const AuthService = {
89
- postLogin: (body: LoginRequest): Promise<AxiosResponse<LoginResponse>> => {
90
- return API.post('/auth/login', body);
91
- },
92
- };
93
- ```
1
+ ---
2
+ name: 'api-service-generator'
3
+ description: 'Generates production-ready API Services, DTOs, and Response Types from OpenAPI specifications. Invoke when user provides an OpenAPI spec or asks to create API services.'
4
+ ---
5
+
6
+ # API Service Generator
7
+
8
+ This skill automates the creation of API services, request DTOs, and response types based on an OpenAPI (Swagger) specification, following the project's architectural standards.
9
+
10
+ ## When to Use
11
+
12
+ - Invoke when the user provides an OpenAPI specification (YAML or JSON).
13
+ - Invoke when the user asks to "create API services" or "implement endpoints" from a spec.
14
+ - Invoke when updating existing services based on a new API version.
15
+
16
+ ## Standards & Patterns
17
+
18
+ ### 1. File Structure
19
+
20
+ - **Services**: `src/services/<serviceName>.service.ts`
21
+ - **Request DTOs**: `src/dto/<serviceName>.dto.ts`
22
+ - **Response Types**: `src/types/<serviceName>.type.ts`
23
+
24
+ ### 2. Service Object
25
+
26
+ - Use **PascalCase** for the service object name (e.g., `AuthService`).
27
+ - Use **camelCase** for methods (e.g., `postLogin`).
28
+ - Methods should follow the naming: `[httpMethod][ActionName]` (e.g., `getDetail`, `postCreate`).
29
+ - Return type: `Promise<AxiosResponse<ResponseType>>`.
30
+ - Single line spacing between methods.
31
+
32
+ ### 3. Instance Creation
33
+
34
+ ```typescript
35
+ import { AxiosResponse } from 'axios';
36
+ import createAxiosInstance from './createInstance';
37
+
38
+ const API = createAxiosInstance({
39
+ env: 'VITE_API_BASE_URL',
40
+ prefix: '/v2/iam',
41
+ });
42
+ ```
43
+
44
+ ### 4. DTOs & Types
45
+
46
+ - **DTOs**: Interfaces for request bodies and query params.
47
+ - **Types**: Interfaces for response bodies.
48
+ - Use clear, descriptive noun-based names (e.g., `LoginBody`, `LoginResponse`).
49
+ - Use `UserProfileResponse` instead of `GetUserProfileResponse`.
50
+
51
+ ## Workflow
52
+
53
+ 1. **Parse the Spec**: Identify paths, methods, request schemas, and response schemas.
54
+ 2. **Group by Module**: Group endpoints by their primary path segment (e.g., `/auth/*` -> `AuthService`).
55
+ 3. **Generate Interfaces**:
56
+ - Create `src/dto/<module>.dto.ts` for all request-related interfaces.
57
+ - Create `src/types/<module>.type.ts` for all response-related interfaces.
58
+ 4. **Generate Service**:
59
+ - Create `src/services/<module>.service.ts`.
60
+ - Implement methods for each endpoint in the group.
61
+ 5. **Register Service**:
62
+ - Export the service from `src/main.ts` for global availability.
63
+
64
+ ## Example Transformation
65
+
66
+ **Input (OpenAPI):**
67
+
68
+ ```yaml
69
+ /auth/login:
70
+ post:
71
+ summary: Login
72
+ requestBody:
73
+ content:
74
+ application/json:
75
+ schema:
76
+ $ref: '#/components/schemas/LoginRequest'
77
+ responses:
78
+ '200':
79
+ content:
80
+ application/json:
81
+ schema:
82
+ $ref: '#/components/schemas/LoginResponse'
83
+ ```
84
+
85
+ **Output (Service):**
86
+
87
+ ```typescript
88
+ const AuthService = {
89
+ postLogin: (body: LoginRequest): Promise<AxiosResponse<LoginResponse>> => {
90
+ return API.post('/auth/login', body);
91
+ },
92
+ };
93
+ ```
@@ -1,38 +1,38 @@
1
- ---
2
- name: 'committing-changes'
3
- description: 'Guidelines for Git Conventional Commits. Invoke when user asks for commit message rules or when committing code.'
4
- ---
5
-
6
- # Committing Changes
7
-
8
- When making commits, follow these guidelines for clear communication about the nature of the changes.
9
-
10
- ## Commit Types
11
-
12
- - **fix**: Resolve an error or bug.
13
- - **feat**: Add a new feature.
14
- - **docs**: Documentation-related changes.
15
- - **chore**: Changes related to project configurations.
16
- - **refactor**: Restructure the code.
17
- - **ci**: Changes related to continuous integration scripts/files.
18
- - **test**: Changes related to testing.
19
- - **style**: Changes related to design, such as background color.
20
-
21
- ## Commit Format
22
-
23
- ```bash
24
- <type>(Commit Scope): <short description>
25
-
26
- [Optional Commit Body]
27
-
28
- [Optional Footer or Breaking Change Note]
29
- ```
30
-
31
- ## Example
32
-
33
- ```bash
34
- fix(datatable): bulk action not properly works
35
-
36
- - Bulk action should applying the selected action on Apply button clicked.
37
- - The label should be back into 'Bulk Action' on Apply button clicked.
38
- ```
1
+ ---
2
+ name: 'committing-changes'
3
+ description: 'Guidelines for Git Conventional Commits. Invoke when user asks for commit message rules or when committing code.'
4
+ ---
5
+
6
+ # Committing Changes
7
+
8
+ When making commits, follow these guidelines for clear communication about the nature of the changes.
9
+
10
+ ## Commit Types
11
+
12
+ - **fix**: Resolve an error or bug.
13
+ - **feat**: Add a new feature.
14
+ - **docs**: Documentation-related changes.
15
+ - **chore**: Changes related to project configurations.
16
+ - **refactor**: Restructure the code.
17
+ - **ci**: Changes related to continuous integration scripts/files.
18
+ - **test**: Changes related to testing.
19
+ - **style**: Changes related to design, such as background color.
20
+
21
+ ## Commit Format
22
+
23
+ ```bash
24
+ <type>(Commit Scope): <short description>
25
+
26
+ [Optional Commit Body]
27
+
28
+ [Optional Footer or Breaking Change Note]
29
+ ```
30
+
31
+ ## Example
32
+
33
+ ```bash
34
+ fix(datatable): bulk action not properly works
35
+
36
+ - Bulk action should applying the selected action on Apply button clicked.
37
+ - The label should be back into 'Bulk Action' on Apply button clicked.
38
+ ```
@@ -1,93 +1,93 @@
1
- ---
2
- name: 'figma-datatable-generator'
3
- description: 'Generates Wangsvue DataTables from Figma, including toolbars, bulk actions, search, filter, and pagination. Invoke when converting complex table designs from Figma.'
4
- ---
5
-
6
- # Figma DataTable Generator
7
-
8
- This skill specializes in converting Figma design into feature-rich Wangsvue `DataTable` modules. It handles toolbar button integration, bulk actions, and server-side table configurations.
9
-
10
- ## 🚨 Mandatory Architectural Principles
11
-
12
- - **Business Logic Placement**: All table logic (columns, fetch functions, state) MUST be in `components/modules/`.
13
- - **Component Exclusivity**: ONLY use WangsVue components.
14
-
15
- ## 🛠️ Figma Metadata Interpretation
16
-
17
- ### 1. Toolbar Generation
18
-
19
- When frames contain lists of buttons/instances (e.g., `Button Search`, `Button Filter`, `Button View Log`):
20
-
21
- #### Toolbar Layout (Right Side)
22
-
23
- Group the buttons identified in the Figma context in a flex container on the right side. These buttons are **optional** and should only be generated if they exist in the metadata:
24
-
25
- - **Search**: `<ButtonSearch :table-name="tableName" />` (Invoke if `Button Search` or `Input Search` instance is found).
26
- - **Filter**: `<ButtonFilter :table-name="tableName" />` (Invoke if `Button Filter` instance is found).
27
- - **Download**: `<ButtonDownload :table-name="tableName" file-name="[EntityName]" />` (Invoke if `Button Download` or `Export` instance is found).
28
- - **View Log**: `<ButtonViewLog />` (Invoke if `Button View Log` instance is found).
29
- - **Primary Action**: A generic `<Button />` (e.g., "Add", "Create"). Map the `label`, `icon`, and `severity` based on the Figma instance properties (e.g., `severity="primary"` for main actions).
30
-
31
- #### Toolbar Layout (Left Side) - ButtonBulkAction
32
-
33
- Include `<ButtonBulkAction />` on the left side of the toolbar if:
34
-
35
- 1. A frame named **"Bulk action"** or similar exists in the metadata.
36
- 2. **OR** the first column of the table contains a checkbox selection (TH with checkbox or Table Data with checkbox).
37
-
38
- ### 2. DataTable Configuration
39
-
40
- Identify all table headers by finding instances named **"TH"** in the Figma metadata. For each "TH" instance, invoke `get_design_context` to extract precise configuration:
41
-
42
- - **Column Mapping**:
43
-
44
- - `header`: The text content found within the `<p>` tag (e.g., "Device Name").
45
- - `field`: camelCase version of the `header` text (e.g., `deviceName`).
46
- - `sortable`: Set to `true` if the `get_design_context` code contains an element with `data-name="arrow-up-down-line"`. Otherwise, set to `false` or omit.
47
- - `dateFormatOptions`: For columns containing date/time values, provide this object. Set `showDate: true` to display the date and `showTime: true` if time values are present in the design. Omit for non-date columns.
48
- - `bodyComponent`:
49
- - Use `BadgeGroup` if a column contains multiple `Badge` instances or text like `+% more`. Reference the `template` section in `DataTable` documentation via `mcp_wangsvue-docs` and `BadgeGroup` for correct implementation.
50
- - Use `Badge` if a column contains a single `Badge` instance. Especially for Badge contains Statuses value, set the `format` to `nowrap`.
51
- - Use `Image` if a column contains an image. Provide the src from the specified field, e.g., `:src="item.imageUrl"` and set the `size` to `small`.
52
-
53
- - **Table Props**:
54
- - `lazy`: Always `true` for table with pagination, unless the user specifies otherwise.
55
- - `use-paginator`: Set to `true` if the Figma metadata contains a pagination component (e.g., `Pagination`). Otherwise, set to `false`.
56
- - `v-model:selected-data`: Required if `ButtonBulkAction` is present.
57
- - `fetch-function`: Map to a service method from the API services package (e.g., `@fewangsit/api-services-template` or as provided by the user in the prompt).
58
- - `data-key`: Use `_id` by default.
59
- - `use-option`: Set to `false` if you DO NOT find an element with `data-name="more-line"` or an ellipsis button in the Figma context. If found, leave as default (`true`) and provide the `:options` prop bound to a computed property or variable initialized with an empty array `[]`.
60
-
61
- ## 📋 Implementation Checklist
62
-
63
- 1. **Service Integration**: Import the relevant service and DTOs from the API services package (e.g., `@fewangsit/api-services-template` or as specified).
64
- 2. **State Management**:
65
- - `tableName`: Unique string (e.g., `entity-table`).
66
- - `selectedData`: Ref for bulk selection.
67
- - `columns`: Typed as `TableColumn<T>[]`.
68
- 3. **Template Structure**:
69
- ```html
70
- <div class="flex flex-col gap-4" data-wv-name="[module-name]">
71
- <div class="flex items-center justify-between gap-2">
72
- <ButtonBulkAction ... />
73
- <!-- Left Side -->
74
- <div class="flex items-center gap-2 ml-auto">
75
- <!-- Right Side Buttons -->
76
- <ButtonSearch ... />
77
- <ButtonFilter ... />
78
- <ButtonDownload ... />
79
- <ButtonViewLog ... />
80
- <button ... />
81
- </div>
82
- </div>
83
- <DataTable ... />
84
- </div>
85
- ```
86
-
87
- ## 🔍 Discovery Protocol
88
-
89
- 1. **Call `get_metadata`** to identify the overall structure and find all instances named **"TH"**.
90
- 2. **Call `get_design_context`** for each identified **"TH"** node ID to extract the header text and sortable state.
91
- 3. **Call `list_all_components`** to verify toolbar components.
92
- 4. **Call `analyze_component`** for `datatable` and toolbar buttons to check prop requirements.
93
- 5. **Call `resolve_type_definition`** for DTOs and item types from the API service package.
1
+ ---
2
+ name: 'figma-datatable-generator'
3
+ description: 'Generates Wangsvue DataTables from Figma, including toolbars, bulk actions, search, filter, and pagination. Invoke when converting complex table designs from Figma.'
4
+ ---
5
+
6
+ # Figma DataTable Generator
7
+
8
+ This skill specializes in converting Figma design into feature-rich Wangsvue `DataTable` modules. It handles toolbar button integration, bulk actions, and server-side table configurations.
9
+
10
+ ## 🚨 Mandatory Architectural Principles
11
+
12
+ - **Business Logic Placement**: All table logic (columns, fetch functions, state) MUST be in `components/modules/`.
13
+ - **Component Exclusivity**: ONLY use WangsVue components.
14
+
15
+ ## 🛠️ Figma Metadata Interpretation
16
+
17
+ ### 1. Toolbar Generation
18
+
19
+ When frames contain lists of buttons/instances (e.g., `Button Search`, `Button Filter`, `Button View Log`):
20
+
21
+ #### Toolbar Layout (Right Side)
22
+
23
+ Group the buttons identified in the Figma context in a flex container on the right side. These buttons are **optional** and should only be generated if they exist in the metadata:
24
+
25
+ - **Search**: `<ButtonSearch :table-name="tableName" />` (Invoke if `Button Search` or `Input Search` instance is found).
26
+ - **Filter**: `<ButtonFilter :table-name="tableName" />` (Invoke if `Button Filter` instance is found).
27
+ - **Download**: `<ButtonDownload :table-name="tableName" file-name="[EntityName]" />` (Invoke if `Button Download` or `Export` instance is found).
28
+ - **View Log**: `<ButtonViewLog />` (Invoke if `Button View Log` instance is found).
29
+ - **Primary Action**: A generic `<Button />` (e.g., "Add", "Create"). Map the `label`, `icon`, and `severity` based on the Figma instance properties (e.g., `severity="primary"` for main actions).
30
+
31
+ #### Toolbar Layout (Left Side) - ButtonBulkAction
32
+
33
+ Include `<ButtonBulkAction />` on the left side of the toolbar if:
34
+
35
+ 1. A frame named **"Bulk action"** or similar exists in the metadata.
36
+ 2. **OR** the first column of the table contains a checkbox selection (TH with checkbox or Table Data with checkbox).
37
+
38
+ ### 2. DataTable Configuration
39
+
40
+ Identify all table headers by finding instances named **"TH"** in the Figma metadata. For each "TH" instance, invoke `get_design_context` to extract precise configuration:
41
+
42
+ - **Column Mapping**:
43
+
44
+ - `header`: The text content found within the `<p>` tag (e.g., "Device Name").
45
+ - `field`: camelCase version of the `header` text (e.g., `deviceName`).
46
+ - `sortable`: Set to `true` if the `get_design_context` code contains an element with `data-name="arrow-up-down-line"`. Otherwise, set to `false` or omit.
47
+ - `dateFormatOptions`: For columns containing date/time values, provide this object. Set `showDate: true` to display the date and `showTime: true` if time values are present in the design. Omit for non-date columns.
48
+ - `bodyComponent`:
49
+ - Use `BadgeGroup` if a column contains multiple `Badge` instances or text like `+% more`. Reference the `template` section in `DataTable` documentation via `mcp_wangsvue-docs` and `BadgeGroup` for correct implementation.
50
+ - Use `Badge` if a column contains a single `Badge` instance. Especially for Badge contains Statuses value, set the `format` to `nowrap`.
51
+ - Use `Image` if a column contains an image. Provide the src from the specified field, e.g., `:src="item.imageUrl"` and set the `size` to `small`.
52
+
53
+ - **Table Props**:
54
+ - `lazy`: Always `true` for table with pagination, unless the user specifies otherwise.
55
+ - `use-paginator`: Set to `true` if the Figma metadata contains a pagination component (e.g., `Pagination`). Otherwise, set to `false`.
56
+ - `v-model:selected-data`: Required if `ButtonBulkAction` is present.
57
+ - `fetch-function`: Map to a service method from the API services package (e.g., `@fewangsit/api-services-template` or as provided by the user in the prompt).
58
+ - `data-key`: Use `_id` by default.
59
+ - `use-option`: Set to `false` if you DO NOT find an element with `data-name="more-line"` or an ellipsis button in the Figma context. If found, leave as default (`true`) and provide the `:options` prop bound to a computed property or variable initialized with an empty array `[]`.
60
+
61
+ ## 📋 Implementation Checklist
62
+
63
+ 1. **Service Integration**: Import the relevant service and DTOs from the API services package (e.g., `@fewangsit/api-services-template` or as specified).
64
+ 2. **State Management**:
65
+ - `tableName`: Unique string (e.g., `entity-table`).
66
+ - `selectedData`: Ref for bulk selection.
67
+ - `columns`: Typed as `TableColumn<T>[]`.
68
+ 3. **Template Structure**:
69
+ ```html
70
+ <div class="flex flex-col gap-4" data-wv-name="[module-name]">
71
+ <div class="flex items-center justify-between gap-2">
72
+ <ButtonBulkAction ... />
73
+ <!-- Left Side -->
74
+ <div class="flex items-center gap-2 ml-auto">
75
+ <!-- Right Side Buttons -->
76
+ <ButtonSearch ... />
77
+ <ButtonFilter ... />
78
+ <ButtonDownload ... />
79
+ <ButtonViewLog ... />
80
+ <button ... />
81
+ </div>
82
+ </div>
83
+ <DataTable ... />
84
+ </div>
85
+ ```
86
+
87
+ ## 🔍 Discovery Protocol
88
+
89
+ 1. **Call `get_metadata`** to identify the overall structure and find all instances named **"TH"**.
90
+ 2. **Call `get_design_context`** for each identified **"TH"** node ID to extract the header text and sortable state.
91
+ 3. **Call `list_all_components`** to verify toolbar components.
92
+ 4. **Call `analyze_component`** for `datatable` and toolbar buttons to check prop requirements.
93
+ 5. **Call `resolve_type_definition`** for DTOs and item types from the API service package.