@znap/components-vue2 1.1.2 → 1.1.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/dist/index.common.js +234 -175
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +236 -177
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +14 -14
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/components/views/BaseCrudView.vue.d.ts +1 -11
- package/dist/types/components/views/BaseViewLayout.vue.d.ts +2 -5
- package/dist/types/utils/views/generateCrudViewConfigs.d.ts +13 -20
- package/dist/types/utils/views/types.d.ts +5 -1
- package/package.json +1 -1
|
@@ -89,11 +89,6 @@ declare var _default: import("vue").DefineComponent<{
|
|
|
89
89
|
type: ObjectConstructor;
|
|
90
90
|
required: true;
|
|
91
91
|
};
|
|
92
|
-
cardSubtractHeigth: {
|
|
93
|
-
type: NumberConstructor;
|
|
94
|
-
required: false;
|
|
95
|
-
default: number;
|
|
96
|
-
};
|
|
97
92
|
"update:rows-changed": {
|
|
98
93
|
type: FunctionConstructor;
|
|
99
94
|
required: false;
|
|
@@ -115,6 +110,7 @@ declare var _default: import("vue").DefineComponent<{
|
|
|
115
110
|
tableMaxHeigth: number;
|
|
116
111
|
alreadySetTableHeigth: boolean;
|
|
117
112
|
primaryFilterTab: number;
|
|
113
|
+
isComponentMounted: boolean;
|
|
118
114
|
}, {
|
|
119
115
|
paginationOptions: {
|
|
120
116
|
get(): any;
|
|
@@ -267,11 +263,6 @@ declare var _default: import("vue").DefineComponent<{
|
|
|
267
263
|
type: ObjectConstructor;
|
|
268
264
|
required: true;
|
|
269
265
|
};
|
|
270
|
-
cardSubtractHeigth: {
|
|
271
|
-
type: NumberConstructor;
|
|
272
|
-
required: false;
|
|
273
|
-
default: number;
|
|
274
|
-
};
|
|
275
266
|
"update:rows-changed": {
|
|
276
267
|
type: FunctionConstructor;
|
|
277
268
|
required: false;
|
|
@@ -286,6 +277,5 @@ declare var _default: import("vue").DefineComponent<{
|
|
|
286
277
|
apiData: unknown[];
|
|
287
278
|
useServerSidePagination: boolean;
|
|
288
279
|
useServerSideSearch: boolean;
|
|
289
|
-
cardSubtractHeigth: number;
|
|
290
280
|
}>;
|
|
291
281
|
export default _default;
|
|
@@ -24,13 +24,10 @@ declare var _default: import("vue").DefineComponent<{
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
}, {}, {
|
|
27
|
-
|
|
28
|
-
defaultContainerSize: {
|
|
29
|
-
heigth: number;
|
|
30
|
-
width: number;
|
|
31
|
-
};
|
|
27
|
+
isComponentMounted: boolean;
|
|
32
28
|
}, {}, {
|
|
33
29
|
closeTable(): void;
|
|
30
|
+
adjustComponentLayout(): void;
|
|
34
31
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "closeTable"[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
35
32
|
tableIcon: {
|
|
36
33
|
required: true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Column, CrudViewConfigsParams, CurrentFiltersOptions, Endpoint, Filter, FiltersOptions, FilterTab, FormOption, FormSettings, Header, PaginationSettings, TableOption } from "./types";
|
|
1
|
+
import { Column, CreateFilterTab, CrudViewConfigsParams, CurrentFiltersOptions, Endpoint, Filter, FiltersOptions, FilterTab, FormHooks, FormOption, FormSettings, Header, PaginationSettings, TableOption } from "./types";
|
|
2
2
|
export declare class CrudViewConfigs {
|
|
3
3
|
tableName: string;
|
|
4
4
|
tableIcon: string;
|
|
@@ -48,10 +48,10 @@ export declare class CrudViewConfigs {
|
|
|
48
48
|
hasFetch: boolean;
|
|
49
49
|
};
|
|
50
50
|
get viewMethods(): {
|
|
51
|
-
getFilters: (filters: FiltersOptions, searchColums:
|
|
51
|
+
getFilters: (filters: FiltersOptions, searchColums: string[]) => any[];
|
|
52
52
|
getDisplayFilters: (filters: FiltersOptions) => [string, number | boolean][];
|
|
53
|
-
fetchTableOptionsData: (tableOptions:
|
|
54
|
-
fetchFormOptionsData: (formOptions:
|
|
53
|
+
fetchTableOptionsData: (tableOptions: TableOption[], httpFetcher: any) => Promise<void>;
|
|
54
|
+
fetchFormOptionsData: (formOptions: FormOption[], httpFetcher: any) => Promise<void>;
|
|
55
55
|
fetchFiltersData: (filters: FiltersOptions, httpFetcher: any) => Promise<void>;
|
|
56
56
|
setCurrentFilters: (filters: FiltersOptions) => CurrentFiltersOptions;
|
|
57
57
|
validateFiltersKeyHaveChange: (filters: FiltersOptions, currentFilters: CurrentFiltersOptions, keysToValidate?: string[]) => boolean;
|
|
@@ -61,7 +61,10 @@ export declare class CrudViewConfigs {
|
|
|
61
61
|
private getFilters;
|
|
62
62
|
private getDisplayFilters;
|
|
63
63
|
private setCurrentFilters;
|
|
64
|
+
getCurrentFilters(filters: FiltersOptions): CurrentFiltersOptions;
|
|
65
|
+
fetchTableOption(tableOption: TableOption, httpFetcher: any): Promise<void>;
|
|
64
66
|
private fetchTableOptionsData;
|
|
67
|
+
fetchFormOption(formOption: FormOption, httpFetcher: any): Promise<void>;
|
|
65
68
|
private fetchFormOptionsData;
|
|
66
69
|
fetchFilter(filter: Filter, httpFetcher: any): Promise<void>;
|
|
67
70
|
private fetchFiltersData;
|
|
@@ -71,10 +74,7 @@ export declare class CrudViewConfigs {
|
|
|
71
74
|
private isValidEndpoint;
|
|
72
75
|
private isValidColumn;
|
|
73
76
|
private isValidItemsArray;
|
|
74
|
-
createFilterTab(title: string):
|
|
75
|
-
addFilter: (filterData: Filter) => any;
|
|
76
|
-
build: () => FilterTab;
|
|
77
|
-
};
|
|
77
|
+
createFilterTab(title: string): CreateFilterTab;
|
|
78
78
|
addNewPrimaryFilterTab(tab: FilterTab): this;
|
|
79
79
|
addPrimaryFilter(filterData: Filter): this;
|
|
80
80
|
addNewSecondaryFilterTab(tab: FilterTab): this;
|
|
@@ -96,19 +96,12 @@ export declare class CrudViewConfigs {
|
|
|
96
96
|
ignoreOnFetchFunction: boolean;
|
|
97
97
|
type: import("./types").AvalibleFilterTypes;
|
|
98
98
|
};
|
|
99
|
-
setTableOptions(tableOptions?:
|
|
99
|
+
setTableOptions(tableOptions?: TableOption[]): this;
|
|
100
100
|
addTableOption({ column, items, endpoint, formatter, filterFunction, ignoreOnFetchFunction, }: TableOption): this;
|
|
101
101
|
setFormSettings({ baseModel, formOptions, hooks, loading, }: FormSettings): this;
|
|
102
|
-
setFormModel(model
|
|
103
|
-
setFormOptions(formOptions
|
|
102
|
+
setFormModel(model: Record<PropertyKey, any>): this;
|
|
103
|
+
setFormOptions(formOptions: FormOption[]): this;
|
|
104
104
|
addFormOption({ column, items, dependsOn, endpoint, hooks, ignoreOnFetchFunction, componentProps, component, loading, }: FormOption): this;
|
|
105
|
-
setFormHooks(hooks?:
|
|
106
|
-
setPaginationSettings({ page, itemsPerPage,
|
|
107
|
-
page?: number | undefined;
|
|
108
|
-
itemsPerPage?: number | undefined;
|
|
109
|
-
itemsPerPageOption?: never[] | undefined;
|
|
110
|
-
serverItemsLength?: number | undefined;
|
|
111
|
-
sortBy?: never[] | undefined;
|
|
112
|
-
sortDesc?: never[] | undefined;
|
|
113
|
-
}): this;
|
|
105
|
+
setFormHooks(hooks?: FormHooks): this;
|
|
106
|
+
setPaginationSettings({ page, itemsPerPage, itemsPerPageOptions, serverItemsLength, sortBy, sortDesc, }: PaginationSettings): this;
|
|
114
107
|
}
|
|
@@ -102,7 +102,7 @@ export interface FormHooks {
|
|
|
102
102
|
afterSetItem?: (item: any) => any;
|
|
103
103
|
}
|
|
104
104
|
export interface FormSettings {
|
|
105
|
-
baseModel: Record<
|
|
105
|
+
baseModel: Record<PropertyKey, any>;
|
|
106
106
|
formOptions: FormOption[];
|
|
107
107
|
hooks: FormHooks;
|
|
108
108
|
loading: boolean;
|
|
@@ -115,3 +115,7 @@ export interface PaginationSettings {
|
|
|
115
115
|
sortDesc: any[];
|
|
116
116
|
itemsPerPageOptions: number[];
|
|
117
117
|
}
|
|
118
|
+
export interface CreateFilterTab {
|
|
119
|
+
addFilter: (filterData: Filter) => CreateFilterTab;
|
|
120
|
+
build: () => FilterTab;
|
|
121
|
+
}
|