vi-grid-builder 2.0.3 → 2.0.4

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,6 +1,33 @@
1
1
 
2
2
  # Grid builder plugin for Vue 3
3
3
 
4
+ The grid builder component dynamically generates tables based on the provided `rows` data and a JSON `columns` configuration.
5
+
6
+ ## Key Features
7
+
8
+ ### 1. Column Types
9
+ - **Predefined Types**:
10
+ - `text`: Displays plain text.
11
+ - `image`: Renders an image.
12
+ - `link`: Displays hyperlinks (with customizable text and URL behavior).
13
+ - `badge`: Displays styled labels or badges.
14
+ - `date`: Formats and displays dates.
15
+ - `actions`: Includes buttons or action elements.
16
+ - **Custom Types**:
17
+ - Register custom field types for unique cell content rendering.
18
+
19
+ ### 2. Data Handling
20
+ - Accepts data in the `rows` prop to populate the table.
21
+ - Supports cell-level customization for data formatting.
22
+
23
+ ### 3. Pagination
24
+ - Built-in pagination for handling large datasets.
25
+ - Configurable to match specific requirements (e.g., rows per page).
26
+
27
+ ### 4. Customizable Styles
28
+ - Provides options to style the table (e.g., striped rows, borders).
29
+ - Supports global configs and per-instance overrides.
30
+
4
31
 
5
32
  ## Installation
6
33
 
@@ -18,6 +45,15 @@ import App from './App.vue'
18
45
  const app = createApp(App).use(ViGridBuilder)
19
46
  ```
20
47
 
48
+ ## Examples
49
+ If you want to see usage examples download the project and run
50
+ ```sh
51
+ cd playgorund
52
+ ```
53
+ ```sh
54
+ npm run dev
55
+ ```
56
+
21
57
  ## Table options
22
58
 
23
59
  | option | type | description | default value |
@@ -63,7 +99,7 @@ const app = createApp(App).use(ViGridBuilder)
63
99
  | align | centre, left, right | How to align the content in the cells for this column | / |
64
100
  | sort | Function | Compare function for sorting data in this column | / |
65
101
 
66
- ##Aditional columsn options for sepcific fields
102
+ ## Aditional columsn options for sepcific fields
67
103
 
68
104
  field type| option | type | description | default value |
69
105
  |------------|------------|-----------------------------|--------------------------------------------------------|---------------|
@@ -75,7 +111,7 @@ field type| option | type | description
75
111
 
76
112
 
77
113
 
78
- ## Example config for columns
114
+ ## Example config for columns
79
115
 
80
116
  ```js
81
117
  columns: [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vi-grid-builder",
3
3
  "main": "ViGridBuilderPlugin",
4
- "version": "2.0.3",
4
+ "version": "2.0.4",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -6,5 +6,8 @@
6
6
  line-height: 1;
7
7
  //font-weight: 600;
8
8
  text-transform: uppercase;
9
+ background-color: var(--vi-grid-primary-color);
10
+ color: var(--vi-grid-primary-text-color);
11
+ padding: 5px;
9
12
 
10
13
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="vi-grid-badge" v-bind="$attrs">
2
+ <div class="vi-grid-badge" v-bind="$attrs" :class="value">
3
3
  {{value}}
4
4
  </div>
5
5
  </template>