@corvina/vue-components-library 0.0.4 → 0.0.6

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.
@@ -19,6 +19,7 @@
19
19
  font-variant: normal;
20
20
  text-transform: none;
21
21
  line-height: 1;
22
+ vertical-align: top;
22
23
 
23
24
  /* Enable Ligatures ================ */
24
25
  letter-spacing: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvina/vue-components-library",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "private": false,
5
5
  "main": "vue-components-library.es.js",
6
6
  "module": "vue-components-library.es.js",
package/src/index.d.ts CHANGED
@@ -88,6 +88,12 @@ export declare namespace CORVINA {
88
88
  }
89
89
  }
90
90
  export namespace TABLE {
91
+ enum HEADER_CELL_TYPE {
92
+ /** You need to set `customHeaderGeneratorFunction` */
93
+ CUSTOM = "Custom",
94
+ /** You need to set `headerVueComponent`. Vue only. */
95
+ VUE_COMPONENT = "VueComponent"
96
+ }
91
97
  enum CELL_TYPE {
92
98
  /** You need to set `propString`, `propStringTooltip` */
93
99
  STRING = "String",
@@ -137,6 +143,13 @@ export declare namespace CORVINA {
137
143
  /** Name of the prop that will contain the row item */
138
144
  itemPropName?: string;
139
145
  }
146
+ /** Use it with `HEADER_CELL_TYPE.VUE_COMPONENT` */
147
+ interface HeaderVueComponent {
148
+ /** Name of the Vue component or Vue component definition */
149
+ component: string | Component;
150
+ /** Vue component's props */
151
+ props?: Record<string, any>;
152
+ }
140
153
  /**
141
154
  * Interface representing a table header entry.
142
155
  */
@@ -156,14 +169,26 @@ export declare namespace CORVINA {
156
169
  /** Indicates if the column is sortable */
157
170
  sortable?: boolean;
158
171
  /** Additional class to assign to the column header */
159
- propColClass?: string;
160
- /** Type of the cell */
161
- type: CELL_TYPE;
172
+ colClass?: string;
173
+ /** Additional attributes to add to the column header (th) */
174
+ colAttributes?: Record<string, string>;
175
+ /** Menu action is disabled in the header*/
176
+ menuActionDisabled?: boolean;
162
177
  /** Array of menu entries to be displayed in the header */
163
178
  menuActions?: MenuPropEntries;
179
+ /** Icon name for the menu activator in the header */
180
+ menuActionIcon?: string;
181
+ /** Type of header cell */
182
+ headerCellType?: HEADER_CELL_TYPE;
183
+ /** Function that generates the header cell virtual dom */
184
+ customHeaderCellGeneratorFunction?: () => HTMLElement;
185
+ /** The `HeaderVueComponent` describing the vuejs component to use */
186
+ headerVueComponent?: HeaderVueComponent;
187
+ /** Type of the row cells */
188
+ type: CELL_TYPE;
164
189
  /** Function that generates the cell virtual dom */
165
190
  customCellGeneratorFunction?: (item: any, header: TableHeaderEntry) => HTMLElement;
166
- /** Name of the property of the item object containing containing the `VueComponent` data */
191
+ /** Name of the property of the item object containing the `VueComponent` data */
167
192
  propVueComponent?: string;
168
193
  /** Additional class to assign to the cell */
169
194
  propCellClass?: string;
@@ -177,10 +202,8 @@ export declare namespace CORVINA {
177
202
  propButton?: string;
178
203
  /** Name of the property of the item object containing an array of objects with text properties for the menu item name */
179
204
  propMenu?: string;
180
- /** Icon name for the menu activator */
181
- menuActionIcon?: string;
182
- /** Menu action is disabled */
183
- menuActionDisabled?: boolean;
205
+ /** Name of the property of the item object containing an object with additional attributes to add to the cell (td) */
206
+ propCellAttributes?: Record<string, any>;
184
207
  /** Name of the property of the item object entry */
185
208
  alignTooltip?: Anchor;
186
209
  }