@corvina/web-components-library 0.1.4 → 0.1.7

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.
@@ -1,54 +0,0 @@
1
- import type { PropType as __PropType } from 'vue';
2
- import { CORVINA } from '../index';
3
- export declare const expansionColumnHeader: CORVINA.TABLE.TableHeaderEntry;
4
- declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- columns: {
6
- type: __PropType<CORVINA.TABLE.TableHeaderEntries>;
7
- required: true;
8
- default: () => any[];
9
- };
10
- sortDesc: {
11
- type: __PropType<boolean>;
12
- required: true;
13
- default: boolean;
14
- };
15
- sortBy: {
16
- type: __PropType<string>;
17
- required: true;
18
- default: string;
19
- };
20
- isExpandable: {
21
- type: __PropType<boolean>;
22
- required: false;
23
- default: () => boolean;
24
- };
25
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "handleSorting"[], "handleSorting", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
- columns: {
27
- type: __PropType<CORVINA.TABLE.TableHeaderEntries>;
28
- required: true;
29
- default: () => any[];
30
- };
31
- sortDesc: {
32
- type: __PropType<boolean>;
33
- required: true;
34
- default: boolean;
35
- };
36
- sortBy: {
37
- type: __PropType<string>;
38
- required: true;
39
- default: string;
40
- };
41
- isExpandable: {
42
- type: __PropType<boolean>;
43
- required: false;
44
- default: () => boolean;
45
- };
46
- }>> & Readonly<{
47
- onHandleSorting?: (...args: any[]) => any;
48
- }>, {
49
- sortDesc: boolean;
50
- sortBy: string;
51
- isExpandable: boolean;
52
- columns: CORVINA.TABLE.TableHeaderEntries;
53
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
54
- export default _sfc_main;
package/src/index.d.ts DELETED
@@ -1,215 +0,0 @@
1
- import { Component } from 'vue';
2
- export declare namespace CORVINA {
3
- const block: readonly ["top", "bottom"];
4
- const inline: readonly ["start", "end", "left", "right"];
5
- type Tblock = typeof block[number];
6
- type Tinline = typeof inline[number];
7
- export type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
8
- export enum TOOLTIP_LOCATION {
9
- START = "start",
10
- END = "end",
11
- TOP = "top",
12
- BOTTOM = "bottom"
13
- }
14
- export enum COLOR {
15
- WT = "wt",
16
- G1 = "g1",
17
- G2 = "g2",
18
- G3 = "g3",
19
- G4 = "g4",
20
- DK = "dk",
21
- PRIMARY = "primary",
22
- PRIMARY_DK1 = "primary-dk1",
23
- PRIMARY_DK2 = "primary-dk2",
24
- HIGHLIGHT = "highlight",
25
- ALERT = "alert",
26
- WARNING_SERIOUS = "warning-serious",
27
- WARNING_MILD = "warning-mild",
28
- GOOD = "good"
29
- }
30
- export namespace BREADCRUMB {
31
- enum ACTIVE_CONTROL {
32
- /** The breadcrumb show a free search */
33
- SEARCH = "search",
34
- /** The breadcrumb show a structured key-value filter with chips */
35
- FILTER_CHIPS = "filter_chips"
36
- }
37
- enum FILTER_BY_ENUM {
38
- /** The filter is a free text input */
39
- FREE_TEXT = "free_text",
40
- /** The filter is an autocomplete input */
41
- AUTOCOMPLETE = "autocomplete"
42
- }
43
- /** An array of this structure defines what the user can filter by. */
44
- interface FILTER_BY {
45
- /** Unique key for the filter */
46
- key: string;
47
- /** Title to display in the filter */
48
- title: string;
49
- /** Type of the filter */
50
- type: FILTER_BY_ENUM;
51
- /** This asynchronous function is called to populate the list of values for this filter.
52
- * The user expects a list of options matching `search`.
53
- * When the user scrolls the options additional pages of data can be requested: `page` starts from 0.
54
- * Return an empty array to tell there is no more data.
55
- * Required if type is FILTER_BY_ENUM.AUTOCOMPLETE.
56
- */
57
- searchFunction?: (search: string, page: number) => Array<any> | Promise<Array<any>>;
58
- /** Property on the items returned by the `searchFunction` that contains the title. Required if type is FILTER_BY_ENUM.AUTOCOMPLETE. */
59
- itemsTitleKey?: string;
60
- /** Property on the items returned by the `searchFunction` that contains the identifier. Required if type is FILTER_BY_ENUM.AUTOCOMPLETE. */
61
- itemsIdKey?: string;
62
- /** Placeholder to display in the filter value input. */
63
- filterValuePlaceholder?: string;
64
- }
65
- /** The filters entered by the user are saved as an array FILTER. */
66
- interface FILTER {
67
- /** Unique key for the filter */
68
- key: string;
69
- /** Value of the filter */
70
- value: string;
71
- }
72
- }
73
- export namespace BUTTON {
74
- enum VARIANT {
75
- FREE = "FREE",
76
- LED = "LED",
77
- FILLED = "FILLED",
78
- OUTLINED = "OUTLINED"
79
- }
80
- }
81
- export namespace ICON {
82
- enum SIZE {
83
- X_SMALL = "x-small",
84
- SMALL = "small",
85
- DEFAULT = "default",
86
- LARGE = "large",
87
- X_LARGE = "x-large"
88
- }
89
- }
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
- }
97
- enum CELL_TYPE {
98
- /** You need to set `propString`, `propStringTooltip` */
99
- STRING = "String",
100
- /** You need to set `propMenu` */
101
- MENU = "Menu",
102
- /** You need to set `propIcon` */
103
- ICON = "Icon",
104
- /** You need to set `propButton` */
105
- BUTTON = "Button",
106
- /** You need to set `customCellGeneratorFunction` */
107
- CUSTOM = "Custom",
108
- /** You need to set `propVueComponent`. Vue only. */
109
- VUE_COMPONENT = "VueComponent",
110
- /** Reserved for internal usage. Do not used for user columns */
111
- EXPAND = "Expand",
112
- /** Empty column */
113
- EMPTY = "Empty"
114
- }
115
- interface PropIconEntry {
116
- icon: string;
117
- tooltip?: string;
118
- color?: COLOR;
119
- }
120
- type PropIconEntries = PropIconEntry[];
121
- interface PropButtonEntry {
122
- label?: string;
123
- tooltip?: string;
124
- icon?: string;
125
- function: (item: any) => void;
126
- }
127
- type PropButtonEntries = PropButtonEntry[];
128
- interface MenuPropEntry {
129
- title: string;
130
- icon?: string;
131
- disabled?: boolean;
132
- tooltip?: string;
133
- alignTooltip?: TOOLTIP_LOCATION;
134
- function: (item: any) => void;
135
- }
136
- type MenuPropEntries = MenuPropEntry[];
137
- /** Use it with `CELL_TYPE.VUE_COMPONENT` */
138
- interface VueComponent {
139
- /** Name of the Vue component or Vue component definition */
140
- component: string | Component;
141
- /** Vue component's props */
142
- props?: Record<string, any>;
143
- /** Name of the prop that will contain the row item */
144
- itemPropName?: string;
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
- }
153
- /**
154
- * Interface representing a table header entry.
155
- */
156
- interface TableHeaderEntry {
157
- /** Key for this column. Must be unique. Used for sorting. */
158
- key: string;
159
- /** Title to display in the column header */
160
- title?: string;
161
- /** Tooltip text to display in the column header */
162
- tooltip?: string;
163
- /** Icon to display in the column header */
164
- icon?: string;
165
- /** Alignment of the column text */
166
- align?: 'start' | 'end' | 'center';
167
- /** Width of the column */
168
- width?: number | string;
169
- /** Indicates if the column is sortable */
170
- sortable?: boolean;
171
- /** Additional class to assign to the column header */
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;
177
- /** Array of menu entries to be displayed in the header */
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;
189
- /** Function that generates the cell virtual dom */
190
- customCellGeneratorFunction?: (item: any, header: TableHeaderEntry) => HTMLElement;
191
- /** Name of the property of the item object containing the `VueComponent` data */
192
- propVueComponent?: string;
193
- /** Additional class to assign to the cell */
194
- propCellClass?: string;
195
- /** Name of the property of the item object containing the text string to display */
196
- propString?: string;
197
- /** Name of the property of the item object containing the text string to display as a tooltip */
198
- propStringTooltip?: string;
199
- /** Name of the property of the item object containing an array of objects with icon properties */
200
- propIcon?: string;
201
- /** Name of the property of the item object containing a PropButtonEntries array */
202
- propButton?: string;
203
- /** Name of the property of the item object containing an array of objects with text properties for the menu item name */
204
- propMenu?: string;
205
- /** Name of the property of the item object containing an object with additional attributes to add to the cell (td) */
206
- propCellAttributes?: string;
207
- /** Name of the property of the item object containing an integer that will be used as colspan for the cell */
208
- propColspan?: string;
209
- /** Name of the property of the item object entry */
210
- alignTooltip?: Anchor;
211
- }
212
- type TableHeaderEntries = TableHeaderEntry[];
213
- }
214
- export {};
215
- }
@@ -1,2 +0,0 @@
1
- import type { VuetifyOptions } from 'vuetify';
2
- export declare function buildVuetifyOptions(locale?: string, shouldLoadTheme?: boolean, components?: Record<string, any>): VuetifyOptions;
@@ -1,2 +0,0 @@
1
- import type { Blueprint } from 'vuetify/lib/framework.mjs';
2
- export declare const bp_cc2: Blueprint;
@@ -1,4 +0,0 @@
1
- import { type IconSet, type IconAliases } from 'vuetify';
2
- declare const aliases: IconAliases | undefined;
3
- declare const ecc: IconSet;
4
- export { aliases, ecc };
@@ -1 +0,0 @@
1
- export declare function loadFonts(): Promise<void>;
@@ -1,6 +0,0 @@
1
- declare namespace CorvinaComponents {
2
- function initCorvinaComponents(locale?: string, shouldLoadTheme?: boolean, shouldLoadFonts?: boolean): void;
3
- function initFonts(): void;
4
- }
5
- export default CorvinaComponents;
6
- export * from './index';
@@ -1,24 +0,0 @@
1
- import type { VNode } from 'vue';
2
- import type { Component } from 'vue';
3
- type VueComponent = Component & {
4
- styles?: string[];
5
- } & {
6
- components?: {
7
- [name: string]: VueComponent;
8
- };
9
- };
10
- interface IArgs {
11
- component: VueComponent;
12
- props?: any;
13
- styles?: string[];
14
- emits?: string[];
15
- slots: {
16
- [name: string]: () => VNode;
17
- };
18
- locale: string;
19
- shouldLoadTheme: boolean;
20
- }
21
- export declare const createCustomElement: ({ component, props, styles, emits, slots, locale, shouldLoadTheme }: IArgs) => import("vue").VueElementConstructor<{
22
- [x: `on${Capitalize<string>}`]: (...args: any[]) => any;
23
- }>;
24
- export {};
@@ -1,4 +0,0 @@
1
- declare function buildComponents(locale: string, shouldLoadTheme: boolean): {
2
- [name: string]: any;
3
- };
4
- export { buildComponents };