@corvina/web-components-library 0.1.7 → 0.2.0

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 (33) hide show
  1. package/README.md +15 -0
  2. package/components/AnimatedButton.vue.d.ts +197 -0
  3. package/components/AutocompleteFilter.vue.d.ts +144 -0
  4. package/components/CorvinaBreadcrumb.ce.vue.d.ts +105 -0
  5. package/components/CorvinaBreadcrumbDivider.ce.vue.d.ts +2 -0
  6. package/components/CorvinaButton.ce.vue.d.ts +84 -0
  7. package/components/CorvinaIcon.ce.vue.d.ts +35 -0
  8. package/components/CorvinaIconInternal.vue.d.ts +39 -0
  9. package/components/CorvinaSelect.ce.vue.d.ts +56 -0
  10. package/components/CorvinaTable.ce.vue.d.ts +176 -0
  11. package/components/CustomRenderer.vue.d.ts +15 -0
  12. package/components/InfiniteLoaderAutocomplete.vue.d.ts +21 -0
  13. package/components/Searchbar.vue.d.ts +105 -0
  14. package/components/Slots.d.ts +10 -0
  15. package/components/TableHeader.vue.d.ts +51 -0
  16. package/index.d.ts +253 -0
  17. package/package.json +3 -7
  18. package/plugins/vuetify.d.ts +3 -0
  19. package/theme/blueprint.d.ts +3 -0
  20. package/theme/ecciconset.d.ts +5 -0
  21. package/theme/icons-list.d.ts +1 -0
  22. package/utils/webfontloader.d.ts +1 -0
  23. package/vscode.html-custom-data.json +603 -0
  24. package/vue-components.d.ts +25 -0
  25. package/web-components-library.cjs.js +9 -9
  26. package/web-components-library.es.d.ts +2 -0
  27. package/web-components-library.es.js +2402 -2399
  28. package/web-components-library.umd.js +11 -11
  29. package/web-components.d.ts +7 -0
  30. package/webcomponent-utils/external-styles.d.ts +1 -0
  31. package/webcomponent-utils/utils.d.ts +2 -0
  32. package/webcomponent-utils/web-component-creator.d.ts +24 -0
  33. package/webcomponent-utils/web-components.d.ts +4 -0
@@ -0,0 +1,176 @@
1
+ import { CORVINA } from '../index';
2
+
3
+ interface Props {
4
+ headers: CORVINA.TABLE.TableHeaderEntries;
5
+ items: any[];
6
+ infiniteScroll?: boolean;
7
+ pagination?: boolean;
8
+ itemsPerPageOptions?: Array<{
9
+ value: number;
10
+ title: string;
11
+ }>;
12
+ itemsPerPage: number;
13
+ currentPage: number;
14
+ itemsLength: number;
15
+ loadingBar?: boolean;
16
+ rowClass?: string;
17
+ sortDesc?: boolean;
18
+ sortBy?: string;
19
+ isExpandable?: boolean;
20
+ propIsExpandable?: string;
21
+ expandedRowIndex?: number;
22
+ fixedHeader?: boolean;
23
+ showSearchBar?: boolean;
24
+ showFilterChips?: boolean;
25
+ searchPlaceholder?: string;
26
+ searchModel?: string;
27
+ filterChipsKeyPlaceholder?: string;
28
+ filterChipsValuePlaceholder?: string;
29
+ filterChipsLoadingText?: string;
30
+ filterChipsNoDataText?: string;
31
+ allowedFilters?: Array<CORVINA.BREADCRUMB.FILTER_BY>;
32
+ filters?: Array<CORVINA.BREADCRUMB.FILTER>;
33
+ filtersCustomComponent?: CORVINA.BREADCRUMB.CUSTOM_VUE_COMPONENT;
34
+ }
35
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
36
+ showSearchBar: boolean;
37
+ showFilterChips: boolean;
38
+ searchPlaceholder: string;
39
+ searchModel: string;
40
+ filterChipsKeyPlaceholder: string;
41
+ filterChipsValuePlaceholder: string;
42
+ filterChipsLoadingText: string;
43
+ filterChipsNoDataText: string;
44
+ allowedFilters: () => never[];
45
+ filters: () => never[];
46
+ filtersCustomComponent: () => CORVINA.BREADCRUMB.CUSTOM_VUE_COMPONENT;
47
+ headers: () => never[];
48
+ items: () => never[];
49
+ infiniteScroll: () => false;
50
+ pagination: () => true;
51
+ itemsPerPage: () => 5;
52
+ itemsPerPageOptions: () => {
53
+ value: number;
54
+ title: string;
55
+ }[];
56
+ currentPage: () => 1;
57
+ itemsLength: () => 0;
58
+ loadingBar: () => false;
59
+ rowClass: () => "";
60
+ sortDesc: () => false;
61
+ sortBy: () => "";
62
+ isExpandable: () => false;
63
+ propIsExpandable: () => "";
64
+ expandedRowIndex: () => -1;
65
+ fixedHeader: () => false;
66
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
67
+ currentPageChanged: (value: number) => void;
68
+ currentItemsPerPageChanged: (value: number) => void;
69
+ handleSorting: (value: CORVINA.TABLE.TableHeaderEntry) => void;
70
+ rowClicked: (index: number, item: any) => void;
71
+ rowExpanded: (index: number) => void;
72
+ "update:searchModel": (value: string) => void;
73
+ "update:filters": (value: CORVINA.BREADCRUMB.FILTER[]) => void;
74
+ "update:filterBy": (value: CORVINA.BREADCRUMB.FILTER_BY) => void;
75
+ loadMore: (cb: CORVINA.TABLE.LoadMoreCallback) => void;
76
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
77
+ showSearchBar: boolean;
78
+ showFilterChips: boolean;
79
+ searchPlaceholder: string;
80
+ searchModel: string;
81
+ filterChipsKeyPlaceholder: string;
82
+ filterChipsValuePlaceholder: string;
83
+ filterChipsLoadingText: string;
84
+ filterChipsNoDataText: string;
85
+ allowedFilters: () => never[];
86
+ filters: () => never[];
87
+ filtersCustomComponent: () => CORVINA.BREADCRUMB.CUSTOM_VUE_COMPONENT;
88
+ headers: () => never[];
89
+ items: () => never[];
90
+ infiniteScroll: () => false;
91
+ pagination: () => true;
92
+ itemsPerPage: () => 5;
93
+ itemsPerPageOptions: () => {
94
+ value: number;
95
+ title: string;
96
+ }[];
97
+ currentPage: () => 1;
98
+ itemsLength: () => 0;
99
+ loadingBar: () => false;
100
+ rowClass: () => "";
101
+ sortDesc: () => false;
102
+ sortBy: () => "";
103
+ isExpandable: () => false;
104
+ propIsExpandable: () => "";
105
+ expandedRowIndex: () => -1;
106
+ fixedHeader: () => false;
107
+ }>>> & Readonly<{
108
+ "onUpdate:searchModel"?: ((value: string) => any) | undefined;
109
+ "onUpdate:filters"?: ((value: CORVINA.BREADCRUMB.FILTER[]) => any) | undefined;
110
+ "onUpdate:filterBy"?: ((value: CORVINA.BREADCRUMB.FILTER_BY) => any) | undefined;
111
+ onHandleSorting?: ((value: CORVINA.TABLE.TableHeaderEntry) => any) | undefined;
112
+ onCurrentPageChanged?: ((value: number) => any) | undefined;
113
+ onCurrentItemsPerPageChanged?: ((value: number) => any) | undefined;
114
+ onRowExpanded?: ((index: number) => any) | undefined;
115
+ onLoadMore?: ((cb: CORVINA.TABLE.LoadMoreCallback) => any) | undefined;
116
+ onRowClicked?: ((index: number, item: any) => any) | undefined;
117
+ }>, {
118
+ filters: Array<CORVINA.BREADCRUMB.FILTER>;
119
+ items: any[];
120
+ searchPlaceholder: string;
121
+ searchModel: string;
122
+ showSearchBar: boolean;
123
+ showFilterChips: boolean;
124
+ filterChipsKeyPlaceholder: string;
125
+ filterChipsValuePlaceholder: string;
126
+ filterChipsLoadingText: string;
127
+ filterChipsNoDataText: string;
128
+ allowedFilters: Array<CORVINA.BREADCRUMB.FILTER_BY>;
129
+ filtersCustomComponent: CORVINA.BREADCRUMB.CUSTOM_VUE_COMPONENT;
130
+ sortDesc: boolean;
131
+ sortBy: string;
132
+ isExpandable: boolean;
133
+ infiniteScroll: boolean;
134
+ pagination: boolean;
135
+ headers: CORVINA.TABLE.TableHeaderEntries;
136
+ itemsPerPageOptions: Array<{
137
+ value: number;
138
+ title: string;
139
+ }>;
140
+ itemsPerPage: number;
141
+ currentPage: number;
142
+ itemsLength: number;
143
+ loadingBar: boolean;
144
+ rowClass: string;
145
+ propIsExpandable: string;
146
+ expandedRowIndex: number;
147
+ fixedHeader: boolean;
148
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
149
+ default?(_: {
150
+ item: any;
151
+ index: number;
152
+ }): any;
153
+ }>;
154
+ export default _default;
155
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
156
+ type __VLS_TypePropsToRuntimeProps<T> = {
157
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
158
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
159
+ } : {
160
+ type: import('vue').PropType<T[K]>;
161
+ required: true;
162
+ };
163
+ };
164
+ type __VLS_WithDefaults<P, D> = {
165
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
166
+ default: D[K];
167
+ }> : P[K];
168
+ };
169
+ type __VLS_Prettify<T> = {
170
+ [K in keyof T]: T[K];
171
+ } & {};
172
+ type __VLS_WithTemplateSlots<T, S> = T & {
173
+ new (): {
174
+ $slots: S;
175
+ };
176
+ };
@@ -0,0 +1,15 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ element: HTMLElement | null;
3
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ element: HTMLElement | null;
5
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
7
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
+ type __VLS_TypePropsToRuntimeProps<T> = {
9
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
10
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
+ } : {
12
+ type: import('vue').PropType<T[K]>;
13
+ required: true;
14
+ };
15
+ };
@@ -0,0 +1,21 @@
1
+ import { StateHandler } from 'v3-infinite-loading/lib/types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ identifier: number;
5
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ handler: ($state: StateHandler) => void;
7
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
8
+ identifier: number;
9
+ }>>> & Readonly<{
10
+ onHandler?: (($state: StateHandler) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToRuntimeProps<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
@@ -0,0 +1,105 @@
1
+ import { AUTOCOMPLETE_FILTER_FETCH_OPTIONS } from './AutocompleteFilter.vue';
2
+
3
+ interface SearchProps {
4
+ searchPlaceholder?: string;
5
+ clearable?: boolean;
6
+ highlightOnSearchActive?: boolean;
7
+ clearOnConfirm?: boolean;
8
+ confirmEnabled?: boolean;
9
+ background?: string;
10
+ icon?: string;
11
+ iconEnabled?: boolean;
12
+ searchModel?: string;
13
+ isFilterActive?: boolean;
14
+ isAutocomplete?: boolean;
15
+ autocompleteItems?: Array<any>;
16
+ itemsTitleKey?: string;
17
+ itemsIdKey?: string;
18
+ loading?: boolean;
19
+ useInfiniteLoader?: boolean;
20
+ loadingText?: string;
21
+ noDataText?: string;
22
+ }
23
+ declare function resetSearch(): void;
24
+ declare function clear(): void;
25
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SearchProps>, {
26
+ background: string;
27
+ clearable: boolean;
28
+ confirmEnabled: boolean;
29
+ clearOnConfirm: boolean;
30
+ icon: string;
31
+ iconEnabled: boolean;
32
+ searchModel: string;
33
+ searchPlaceholder: string;
34
+ highlightOnSearchActive: boolean;
35
+ isFilterActive: boolean;
36
+ isAutocomplete: boolean;
37
+ autocompleteItems: () => never[];
38
+ itemsTitleKey: string;
39
+ itemsIdKey: string;
40
+ loading: boolean;
41
+ useInfiniteLoader: boolean;
42
+ }>>, {
43
+ clear: typeof clear;
44
+ resetSearch: typeof resetSearch;
45
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
46
+ onInputChange: (value: string) => void;
47
+ confirm: (value: string) => void;
48
+ fetchData: (options: AUTOCOMPLETE_FILTER_FETCH_OPTIONS) => void;
49
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SearchProps>, {
50
+ background: string;
51
+ clearable: boolean;
52
+ confirmEnabled: boolean;
53
+ clearOnConfirm: boolean;
54
+ icon: string;
55
+ iconEnabled: boolean;
56
+ searchModel: string;
57
+ searchPlaceholder: string;
58
+ highlightOnSearchActive: boolean;
59
+ isFilterActive: boolean;
60
+ isAutocomplete: boolean;
61
+ autocompleteItems: () => never[];
62
+ itemsTitleKey: string;
63
+ itemsIdKey: string;
64
+ loading: boolean;
65
+ useInfiniteLoader: boolean;
66
+ }>>> & Readonly<{
67
+ onFetchData?: ((options: AUTOCOMPLETE_FILTER_FETCH_OPTIONS) => any) | undefined;
68
+ onOnInputChange?: ((value: string) => any) | undefined;
69
+ onConfirm?: ((value: string) => any) | undefined;
70
+ }>, {
71
+ loading: boolean;
72
+ icon: string;
73
+ itemsTitleKey: string;
74
+ itemsIdKey: string;
75
+ useInfiniteLoader: boolean;
76
+ clearable: boolean;
77
+ searchPlaceholder: string;
78
+ highlightOnSearchActive: boolean;
79
+ clearOnConfirm: boolean;
80
+ confirmEnabled: boolean;
81
+ background: string;
82
+ iconEnabled: boolean;
83
+ searchModel: string;
84
+ isFilterActive: boolean;
85
+ isAutocomplete: boolean;
86
+ autocompleteItems: Array<any>;
87
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
88
+ export default _default;
89
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
90
+ type __VLS_TypePropsToRuntimeProps<T> = {
91
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
92
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
93
+ } : {
94
+ type: import('vue').PropType<T[K]>;
95
+ required: true;
96
+ };
97
+ };
98
+ type __VLS_WithDefaults<P, D> = {
99
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
100
+ default: D[K];
101
+ }> : P[K];
102
+ };
103
+ type __VLS_Prettify<T> = {
104
+ [K in keyof T]: T[K];
105
+ } & {};
@@ -0,0 +1,10 @@
1
+ export declare const CorvinaTableSlots: {
2
+ default: () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
3
+ [key: string]: any;
4
+ }>;
5
+ };
6
+ export declare const CorvinaBreadcrumbSlots: {
7
+ default: () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
8
+ [key: string]: any;
9
+ }>;
10
+ };
@@ -0,0 +1,51 @@
1
+ import { CORVINA } from '../index';
2
+
3
+ interface Props {
4
+ columns: CORVINA.TABLE.TableHeaderEntries;
5
+ sortDesc: boolean;
6
+ sortBy: string;
7
+ isExpandable?: boolean;
8
+ }
9
+ export declare const expansionColumnHeader: CORVINA.TABLE.TableHeaderEntry;
10
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
+ columns: () => never[];
12
+ sortDesc: boolean;
13
+ sortBy: string;
14
+ isExpandable: () => false;
15
+ infiniteScroll: () => false;
16
+ pagination: () => true;
17
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ handleSorting: (...args: any[]) => void;
19
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
20
+ columns: () => never[];
21
+ sortDesc: boolean;
22
+ sortBy: string;
23
+ isExpandable: () => false;
24
+ infiniteScroll: () => false;
25
+ pagination: () => true;
26
+ }>>> & Readonly<{
27
+ onHandleSorting?: ((...args: any[]) => any) | undefined;
28
+ }>, {
29
+ columns: CORVINA.TABLE.TableHeaderEntries;
30
+ sortDesc: boolean;
31
+ sortBy: string;
32
+ isExpandable: boolean;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
34
+ export default _default;
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
package/index.d.ts ADDED
@@ -0,0 +1,253 @@
1
+ import { Component } from 'vue';
2
+
3
+ export declare namespace CORVINA {
4
+ const block: readonly ["top", "bottom"];
5
+ const inline: readonly ["start", "end", "left", "right"];
6
+ type Tblock = typeof block[number];
7
+ type Tinline = typeof inline[number];
8
+ export type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
9
+ export enum TOOLTIP_LOCATION {
10
+ START = "start",
11
+ END = "end",
12
+ TOP = "top",
13
+ BOTTOM = "bottom"
14
+ }
15
+ export enum COLOR {
16
+ WT = "wt",
17
+ G1 = "g1",
18
+ G2 = "g2",
19
+ G3 = "g3",
20
+ G4 = "g4",
21
+ DK = "dk",
22
+ PRIMARY = "primary",
23
+ PRIMARY_DK1 = "primary-dk1",
24
+ PRIMARY_DK2 = "primary-dk2",
25
+ HIGHLIGHT = "highlight",
26
+ ALERT = "alert",
27
+ WARNING_SERIOUS = "warning-serious",
28
+ WARNING_MILD = "warning-mild",
29
+ GOOD = "good"
30
+ }
31
+ export namespace BREADCRUMB {
32
+ enum ACTIVE_CONTROL {
33
+ /** The breadcrumb show a free search */
34
+ SEARCH = "search",
35
+ /** The breadcrumb show a structured key-value filter with chips */
36
+ FILTER_CHIPS = "filter_chips"
37
+ }
38
+ enum FILTER_BY_ENUM {
39
+ /** The filter is a free text input */
40
+ FREE_TEXT = "free_text",
41
+ /** The filter is an autocomplete input */
42
+ AUTOCOMPLETE = "autocomplete"
43
+ }
44
+ enum CUSTOM_COMPONENT_POSITION {
45
+ PREPEND = "prepend",
46
+ APPEND = "append"
47
+ }
48
+ /** An array of this structure defines what the user can filter by. */
49
+ interface FILTER_BY {
50
+ /** Unique key for the filter */
51
+ key: string;
52
+ /** Title to display in the filter */
53
+ title: string;
54
+ /** Type of the filter */
55
+ type: FILTER_BY_ENUM;
56
+ /** This asynchronous function is called to populate the list of values for this filter.
57
+ * The user expects a list of options matching `search`.
58
+ * When the user scrolls the options additional pages of data can be requested: `page` starts from 0.
59
+ * Return an empty array to tell there is no more data.
60
+ * Required if type is FILTER_BY_ENUM.AUTOCOMPLETE.
61
+ */
62
+ searchFunction?: (search: string, page: number) => Array<any> | Promise<Array<any>>;
63
+ /** Property on the items returned by the `searchFunction` that contains the title. Required if type is FILTER_BY_ENUM.AUTOCOMPLETE. */
64
+ itemsTitleKey?: string;
65
+ /** Property on the items returned by the `searchFunction` that contains the identifier. Required if type is FILTER_BY_ENUM.AUTOCOMPLETE. */
66
+ itemsIdKey?: string;
67
+ /** Placeholder to display in the filter value input. */
68
+ filterValuePlaceholder?: string;
69
+ }
70
+ /** The filters entered by the user are saved as an array FILTER. */
71
+ interface FILTER {
72
+ /** Unique key for the filter */
73
+ key: string;
74
+ /** Value of the filter */
75
+ value: string;
76
+ }
77
+ interface CUSTOM_VUE_COMPONENT {
78
+ /** Name of the Vue component or Vue component definition */
79
+ component: string | Component;
80
+ /** Vue component's props */
81
+ props?: Record<string, any>;
82
+ /** Name of the prop that will contain the row item */
83
+ itemPropName?: string;
84
+ /** Name of the prop that indicates where the component should be positioned */
85
+ position?: CUSTOM_COMPONENT_POSITION;
86
+ }
87
+ }
88
+ export namespace BUTTON {
89
+ enum VARIANT {
90
+ FREE = "FREE",
91
+ LED = "LED",
92
+ FILLED = "FILLED",
93
+ OUTLINED = "OUTLINED"
94
+ }
95
+ }
96
+ export namespace ICON {
97
+ enum SIZE {
98
+ X_SMALL = "x-small",
99
+ SMALL = "small",
100
+ DEFAULT = "default",
101
+ LARGE = "large",
102
+ X_LARGE = "x-large"
103
+ }
104
+ }
105
+ export namespace TABLE {
106
+ /** Horizontal alignment of a column (applied as `text-*` and `justify-*` classes) */
107
+ enum ALIGN {
108
+ START = "start",
109
+ END = "end",
110
+ CENTER = "center"
111
+ }
112
+ /** Status to pass to `done` in the `loadMore` event when `infiniteScroll` is enabled */
113
+ enum INFINITE_SCROLL_STATUS {
114
+ /** More items were loaded: the table keeps listening for scroll */
115
+ OK = "ok",
116
+ /** There are no more items: the table stops requesting them */
117
+ EMPTY = "empty",
118
+ /** Items are still loading */
119
+ LOADING = "loading",
120
+ /** Loading failed */
121
+ ERROR = "error"
122
+ }
123
+ /** Argument of the `loadMore` event: call `done` when the new items have been loaded */
124
+ interface LoadMoreCallback {
125
+ done: (status: INFINITE_SCROLL_STATUS | `${INFINITE_SCROLL_STATUS}`) => void;
126
+ }
127
+ enum HEADER_CELL_TYPE {
128
+ /** You need to set `customHeaderGeneratorFunction` */
129
+ CUSTOM = "Custom",
130
+ /** You need to set `headerVueComponent`. Vue only. */
131
+ VUE_COMPONENT = "VueComponent"
132
+ }
133
+ enum CELL_TYPE {
134
+ /** You need to set `propString`, `propStringTooltip` */
135
+ STRING = "String",
136
+ /** You need to set `propMenu` */
137
+ MENU = "Menu",
138
+ /** You need to set `propIcon` */
139
+ ICON = "Icon",
140
+ /** You need to set `propButton` */
141
+ BUTTON = "Button",
142
+ /** You need to set `customCellGeneratorFunction` */
143
+ CUSTOM = "Custom",
144
+ /** You need to set `propVueComponent`. Vue only. */
145
+ VUE_COMPONENT = "VueComponent",
146
+ /** Reserved for internal usage. Do not used for user columns */
147
+ EXPAND = "Expand",
148
+ /** Empty column */
149
+ EMPTY = "Empty"
150
+ }
151
+ interface PropIconEntry {
152
+ icon: string;
153
+ tooltip?: string;
154
+ color?: COLOR;
155
+ }
156
+ type PropIconEntries = PropIconEntry[];
157
+ interface PropButtonEntry {
158
+ label?: string;
159
+ tooltip?: string;
160
+ icon?: string;
161
+ function: (item: any) => void;
162
+ }
163
+ type PropButtonEntries = PropButtonEntry[];
164
+ interface MenuPropEntry {
165
+ title: string;
166
+ icon?: string;
167
+ disabled?: boolean;
168
+ tooltip?: string;
169
+ alignTooltip?: TOOLTIP_LOCATION;
170
+ function: (item: any) => void;
171
+ }
172
+ type MenuPropEntries = MenuPropEntry[];
173
+ /** Use it with `CELL_TYPE.VUE_COMPONENT` */
174
+ interface VueComponent {
175
+ /** Name of the Vue component or Vue component definition */
176
+ component: string | Component;
177
+ /** Vue component's props */
178
+ props?: Record<string, any>;
179
+ /** Name of the prop that will contain the row item */
180
+ itemPropName?: string;
181
+ }
182
+ /** Use it with `HEADER_CELL_TYPE.VUE_COMPONENT` */
183
+ interface HeaderVueComponent {
184
+ /** Name of the Vue component or Vue component definition */
185
+ component: string | Component;
186
+ /** Vue component's props */
187
+ props?: Record<string, any>;
188
+ }
189
+ /**
190
+ * Interface representing a table header entry.
191
+ */
192
+ interface TableHeaderEntry {
193
+ /** Key for this column. Must be unique. Used for sorting. */
194
+ key: string;
195
+ /** Title to display in the column header */
196
+ title?: string;
197
+ /** Tooltip text to display in the column header */
198
+ tooltip?: string;
199
+ /** Icon to display in the column header */
200
+ icon?: string;
201
+ /** Alignment of the column text */
202
+ align?: ALIGN | `${ALIGN}`;
203
+ /** Width of the column */
204
+ width?: number | string;
205
+ /** Indicates if the column is sortable */
206
+ sortable?: boolean;
207
+ /** Additional class to assign to the column header */
208
+ colClass?: string;
209
+ /** Additional attributes to add to the column header (th) */
210
+ colAttributes?: Record<string, string>;
211
+ /** Menu action is disabled in the header*/
212
+ menuActionDisabled?: boolean;
213
+ /** Array of menu entries to be displayed in the header */
214
+ menuActions?: MenuPropEntries;
215
+ /** Icon name for the menu activator in the header */
216
+ menuActionIcon?: string;
217
+ /** Type of header cell */
218
+ headerCellType?: HEADER_CELL_TYPE;
219
+ /** Function that generates the header cell virtual dom */
220
+ customHeaderCellGeneratorFunction?: () => HTMLElement;
221
+ /** The `HeaderVueComponent` describing the vuejs component to use */
222
+ headerVueComponent?: HeaderVueComponent;
223
+ /** Type of the row cells */
224
+ type: CELL_TYPE;
225
+ /** Function that generates the cell virtual dom */
226
+ customCellGeneratorFunction?: (item: any, header: TableHeaderEntry) => HTMLElement;
227
+ /** Name of the property of the item object containing the `VueComponent` data */
228
+ propVueComponent?: string;
229
+ /** Additional class to assign to the cell */
230
+ propCellClass?: string;
231
+ /** Name of the property of the item object containing the text string to display */
232
+ propString?: string;
233
+ /** Name of the property of the item object containing the text string to display as a tooltip */
234
+ propStringTooltip?: string;
235
+ /** Name of the property of the item object containing an array of objects with icon properties */
236
+ propIcon?: string;
237
+ /** Name of the property of the item object containing a PropButtonEntries array */
238
+ propButton?: string;
239
+ /** Name of the property of the item object containing an array of objects with text properties for the menu item name */
240
+ propMenu?: string;
241
+ /** Name of the property of the item object containing an object with additional attributes to add to the cell (td) */
242
+ propCellAttributes?: string;
243
+ /** Name of the property of the item object containing an integer that will be used as colspan for the cell */
244
+ propColspan?: string;
245
+ /** Name of the property of the item object containing an anchor for tooltip alignment */
246
+ alignTooltip?: Anchor;
247
+ /** Name of the property of the item object containing an anchor for header tooltip alignment */
248
+ alignHeaderTooltip?: Anchor;
249
+ }
250
+ type TableHeaderEntries = TableHeaderEntry[];
251
+ }
252
+ export {};
253
+ }
package/package.json CHANGED
@@ -1,22 +1,18 @@
1
1
  {
2
2
  "name": "@corvina/web-components-library",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "main": "web-components-library.umd.js",
6
6
  "module": "web-components-library.es.js",
7
- "types": "web-components-library.d.ts",
7
+ "types": "web-components-library.es.d.ts",
8
8
  "files": [
9
9
  "*",
10
10
  "**/*"
11
11
  ],
12
12
  "dependencies": {
13
- "@vue/compiler-sfc": "^3.5.12",
14
- "lit": "^3.1.4",
15
- "lodash.debounce": "^4.0.8",
16
13
  "v3-infinite-loading": "^1.3.2",
17
14
  "vue": "^3.4.21",
18
- "vuetify": "^3.7.5",
19
- "webfontloader": "^1.0.0"
15
+ "vuetify": "^3.7.5"
20
16
  },
21
17
  "packageManager": "pnpm@9.1.1+sha1.09ada6cd05003e0ced25fb716f9fda4063ec2e3b"
22
18
  }
@@ -0,0 +1,3 @@
1
+ import { VuetifyOptions } from 'vuetify';
2
+
3
+ export declare function buildVuetifyOptions(locale?: string, shouldLoadTheme?: boolean, components?: Record<string, any>): VuetifyOptions;
@@ -0,0 +1,3 @@
1
+ import { Blueprint } from 'vuetify';
2
+
3
+ export declare const bp_cc2: Blueprint;
@@ -0,0 +1,5 @@
1
+ import { IconSet, IconAliases } from 'vuetify';
2
+
3
+ declare const aliases: IconAliases | undefined;
4
+ declare const ecc: IconSet;
5
+ export { aliases, ecc };
@@ -0,0 +1 @@
1
+ export declare const icons: string[];