tsv2-library 0.2.99 → 0.3.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.
@@ -111,6 +111,15 @@ export interface Asset {
111
111
  firstImageBig?: string;
112
112
  }
113
113
 
114
+ export type QueryParams = {
115
+ [key: string]: unknown;
116
+ };
117
+
118
+ export type FetchResponse = {
119
+ data: Data[];
120
+ totalRecords: number;
121
+ };
122
+
114
123
  /**
115
124
  * Props for DialogSelectAsset component
116
125
  */
@@ -207,6 +216,12 @@ export interface DialogSelectAssetProps {
207
216
  * Tooltip information about the button dialog.
208
217
  */
209
218
  btnTooltipInfo?: string;
219
+ /**
220
+ * The function to fetch data on DataTable mounted and on queryParams dependencies updated.
221
+ *
222
+ * @param params this is required
223
+ */
224
+ fetchFunction?: (params: QueryParams) => Promise<FetchResponse | undefined>;
210
225
  }
211
226
 
212
227
  /**
@@ -62916,7 +62916,8 @@ const Hg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI1IiBoZWlnaHQ9IjEyNSIgdm
62916
62916
  scanType: {},
62917
62917
  tooltipInfo: {},
62918
62918
  disabled: { type: Boolean },
62919
- btnTooltipInfo: {}
62919
+ btnTooltipInfo: {},
62920
+ fetchFunction: {}
62920
62921
  },
62921
62922
  emits: ["select"],
62922
62923
  setup(e, { emit: t }) {
@@ -63373,7 +63374,7 @@ const Hg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI1IiBoZWlnaHQ9IjEyNSIgdm
63373
63374
  "selected-data": d.value,
63374
63375
  "onUpdate:selectedData": ye[4] || (ye[4] = (ie) => d.value = ie),
63375
63376
  columns: v.value,
63376
- "fetch-function": F,
63377
+ "fetch-function": n.fetchFunction ?? F,
63377
63378
  filters: p.value,
63378
63379
  rows: 10,
63379
63380
  search: h.value,
@@ -63384,7 +63385,7 @@ const Hg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI1IiBoZWlnaHQ9IjEyNSIgdm
63384
63385
  lazy: "",
63385
63386
  "scroll-height": "50vh",
63386
63387
  "use-paginator": ""
63387
- }, null, 8, ["selected-data", "columns", "filters", "search", "table-name"]))
63388
+ }, null, 8, ["selected-data", "columns", "fetch-function", "filters", "search", "table-name"]))
63388
63389
  ]),
63389
63390
  _: 3
63390
63391
  }, 8, ["visible", "header", "pt"])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsv2-library",
3
- "version": "0.2.99",
3
+ "version": "0.3.00",
4
4
  "author": "fixedassetv2-fe",
5
5
  "license": "ISC",
6
6
  "homepage": "https://github.com/fixedassetv2-fe/tsv2-library#readme",
@@ -111,6 +111,15 @@ export interface Asset {
111
111
  firstImageBig?: string;
112
112
  }
113
113
 
114
+ export type QueryParams = {
115
+ [key: string]: unknown;
116
+ };
117
+
118
+ export type FetchResponse = {
119
+ data: Data[];
120
+ totalRecords: number;
121
+ };
122
+
114
123
  /**
115
124
  * Props for DialogSelectAsset component
116
125
  */
@@ -207,6 +216,12 @@ export interface DialogSelectAssetProps {
207
216
  * Tooltip information about the button dialog.
208
217
  */
209
218
  btnTooltipInfo?: string;
219
+ /**
220
+ * The function to fetch data on DataTable mounted and on queryParams dependencies updated.
221
+ *
222
+ * @param params this is required
223
+ */
224
+ fetchFunction?: (params: QueryParams) => Promise<FetchResponse | undefined>;
210
225
  }
211
226
 
212
227
  /**