@xosen/vuetify-grid 0.0.1 → 0.0.2
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/README.test.md +133 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +46 -46
- package/dist/index.mjs +5186 -4917
- package/dist/vuetify-grid.css +1 -1
- package/package.json +9 -1
- package/dist/packages/vuetify-grid/tsconfig.tsbuildinfo +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -252,25 +252,6 @@ export declare interface ActionConfig {
|
|
|
252
252
|
|
|
253
253
|
export declare type ActionsConfig = Record<string, ActionConfig>;
|
|
254
254
|
|
|
255
|
-
export declare interface CrudGridOptions {
|
|
256
|
-
onLoad?: (params: LoadParams) => Promise<CrudGridResponse> | CrudGridResponse;
|
|
257
|
-
onError?: (error: Error) => void;
|
|
258
|
-
useRouter?: boolean;
|
|
259
|
-
filterPersistent?: boolean;
|
|
260
|
-
requiredFilters?: string[];
|
|
261
|
-
itemsPerPageOptions?: number[];
|
|
262
|
-
initialItemsPerPage?: number;
|
|
263
|
-
initialFilter?: Record<string, any>;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export declare interface CrudGridResponse {
|
|
267
|
-
data: any[];
|
|
268
|
-
meta: {
|
|
269
|
-
total: number;
|
|
270
|
-
[key: string]: any;
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
|
|
274
255
|
/**
|
|
275
256
|
* Get all default translations
|
|
276
257
|
* Useful for integrating with vue-i18n
|
|
@@ -365,15 +346,6 @@ export declare interface ListSchema<TItem = any> {
|
|
|
365
346
|
listOptions?: Record<string, any>;
|
|
366
347
|
}
|
|
367
348
|
|
|
368
|
-
export declare interface LoadParams {
|
|
369
|
-
page: number;
|
|
370
|
-
limit: number;
|
|
371
|
-
sortBy?: string;
|
|
372
|
-
sortDesc?: boolean;
|
|
373
|
-
search?: string;
|
|
374
|
-
[key: string]: any;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
349
|
declare interface Props {
|
|
378
350
|
title?: string;
|
|
379
351
|
hideToolbar?: boolean;
|
|
@@ -500,24 +472,6 @@ export declare interface UseActionsOptions {
|
|
|
500
472
|
defaultHandler?: (item?: any, action?: ActionConfig) => Promise<any> | any;
|
|
501
473
|
}
|
|
502
474
|
|
|
503
|
-
export declare function useCrudGrid(options?: CrudGridOptions): {
|
|
504
|
-
loading: Ref<boolean, boolean>;
|
|
505
|
-
page: Ref<number, number>;
|
|
506
|
-
limit: Ref<number, number>;
|
|
507
|
-
sortBy: Ref<any[], any[]>;
|
|
508
|
-
sortDesc: Ref<boolean, boolean>;
|
|
509
|
-
searchValue: Ref<string, string>;
|
|
510
|
-
filterValue: Ref<Record<string, any>, Record<string, any>>;
|
|
511
|
-
items: Ref<any[], any[]>;
|
|
512
|
-
total: Ref<number, number>;
|
|
513
|
-
pageCount: ComputedRef<number>;
|
|
514
|
-
loadParams: ComputedRef<LoadParams>;
|
|
515
|
-
itemsPerPageOptions: number[];
|
|
516
|
-
loadData: () => Promise<void>;
|
|
517
|
-
reload: () => void;
|
|
518
|
-
goToFirstPageAndLoad: () => void;
|
|
519
|
-
};
|
|
520
|
-
|
|
521
475
|
export declare function useSearch(props: {
|
|
522
476
|
search?: string;
|
|
523
477
|
}, emit: (event: 'update:search', value: string) => void): {
|
|
@@ -548,6 +502,24 @@ export declare function useTranslation(): {
|
|
|
548
502
|
getLocale: () => string;
|
|
549
503
|
};
|
|
550
504
|
|
|
505
|
+
export declare function useXGrid(options?: XGridOptions): {
|
|
506
|
+
loading: Ref<boolean, boolean>;
|
|
507
|
+
page: Ref<number, number>;
|
|
508
|
+
limit: Ref<number, number>;
|
|
509
|
+
sortBy: Ref<any[], any[]>;
|
|
510
|
+
sortDesc: Ref<boolean, boolean>;
|
|
511
|
+
searchValue: Ref<string, string>;
|
|
512
|
+
filterValue: Ref<Record<string, any>, Record<string, any>>;
|
|
513
|
+
items: Ref<any[], any[]>;
|
|
514
|
+
total: Ref<number, number>;
|
|
515
|
+
pageCount: ComputedRef<number>;
|
|
516
|
+
loadParams: ComputedRef<XGridLoadParams>;
|
|
517
|
+
itemsPerPageOptions: number[];
|
|
518
|
+
loadData: () => Promise<void>;
|
|
519
|
+
reload: () => void;
|
|
520
|
+
goToFirstPageAndLoad: () => void;
|
|
521
|
+
};
|
|
522
|
+
|
|
551
523
|
export declare const version = "0.0.1";
|
|
552
524
|
|
|
553
525
|
export declare const XActions: DefineComponent<Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -569,6 +541,34 @@ export declare const XActions: DefineComponent<Props_3, {}, {}, {}, {}, Componen
|
|
|
569
541
|
|
|
570
542
|
export declare const XGrid: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
571
543
|
|
|
544
|
+
export declare interface XGridLoadParams {
|
|
545
|
+
page: number;
|
|
546
|
+
limit: number;
|
|
547
|
+
sortBy?: string;
|
|
548
|
+
sortDesc?: boolean;
|
|
549
|
+
search?: string;
|
|
550
|
+
[key: string]: any;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export declare interface XGridOptions {
|
|
554
|
+
onLoad?: (params: XGridLoadParams) => Promise<XGridResponse> | XGridResponse;
|
|
555
|
+
onError?: (error: Error) => void;
|
|
556
|
+
useRouter?: boolean;
|
|
557
|
+
filterPersistent?: boolean;
|
|
558
|
+
requiredFilters?: string[];
|
|
559
|
+
itemsPerPageOptions?: number[];
|
|
560
|
+
initialItemsPerPage?: number;
|
|
561
|
+
initialFilter?: Record<string, any>;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export declare interface XGridResponse {
|
|
565
|
+
data: any[];
|
|
566
|
+
meta: {
|
|
567
|
+
total: number;
|
|
568
|
+
[key: string]: any;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
|
|
572
572
|
export declare const XGridToolbar: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
573
573
|
|
|
574
574
|
export declare const XList: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
|