@corvina/vue-components-library 0.0.3 → 0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corvina/vue-components-library",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "main": "vue-components-library.es.js",
6
6
  "module": "vue-components-library.es.js",
@@ -26,4 +26,4 @@
26
26
  "webfontloader": "^1.0.0"
27
27
  },
28
28
  "packageManager": "pnpm@9.1.1+sha1.09ada6cd05003e0ced25fb716f9fda4063ec2e3b"
29
- }
29
+ }
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Component } from 'vue';
1
2
  export declare namespace CORVINA {
2
3
  const block: readonly ["top", "bottom"];
3
4
  const inline: readonly ["start", "end", "left", "right"];
@@ -98,6 +99,8 @@ export declare namespace CORVINA {
98
99
  BUTTON = "Button",
99
100
  /** You need to set `customCellGeneratorFunction` */
100
101
  CUSTOM = "Custom",
102
+ /** You need to set `propVueComponent`. Vue only. */
103
+ VUE_COMPONENT = "VueComponent",
101
104
  /** Reserved for internal usage. Do not used for user columns */
102
105
  EXPAND = "Expand",
103
106
  /** Empty column */
@@ -125,6 +128,15 @@ export declare namespace CORVINA {
125
128
  function: (item: any) => void;
126
129
  }
127
130
  type MenuPropEntries = MenuPropEntry[];
131
+ /** Use it with `CELL_TYPE.VUE_COMPONENT` */
132
+ interface VueComponent {
133
+ /** Name of the Vue component or Vue component definition */
134
+ component: string | Component;
135
+ /** Vue component's props */
136
+ props?: Record<string, any>;
137
+ /** Name of the prop that will contain the row item */
138
+ itemPropName?: string;
139
+ }
128
140
  /**
129
141
  * Interface representing a table header entry.
130
142
  */
@@ -151,6 +163,8 @@ export declare namespace CORVINA {
151
163
  menuActions?: MenuPropEntries;
152
164
  /** Function that generates the cell virtual dom */
153
165
  customCellGeneratorFunction?: (item: any, header: TableHeaderEntry) => HTMLElement;
166
+ /** Name of the property of the item object containing containing the `VueComponent` data */
167
+ propVueComponent?: string;
154
168
  /** Additional class to assign to the cell */
155
169
  propCellClass?: string;
156
170
  /** Name of the property of the item object containing the text string to display */