grantthomas-nuxt 1.0.15 → 1.0.17

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grantthomas/nuxt",
3
3
  "configKey": "grantThomasNuxt",
4
- "version": "1.0.15",
4
+ "version": "1.0.17",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -84,7 +84,6 @@ const onCancel = () => {
84
84
  <template #item="slot">
85
85
  <v-list-item :value="slot.props.title[endpointResponseKey]">
86
86
  <slot name="dialogListTitle" :item="slot.props.title">
87
- {{slot.props.title[endpointResponseKey]}}
88
87
  {{ slot.props.title[endpointDisplayKey] }}
89
88
  </slot>
90
89
  </v-list-item>
@@ -17,6 +17,8 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
17
17
  hideFilters: boolean;
18
18
  fullScreenDialog: boolean;
19
19
  contentClasses: string;
20
+ showPerPageSelector: boolean;
21
+ perPageOptions: unknown[];
20
22
  title?: string | undefined;
21
23
  loaderKey?: string | undefined;
22
24
  initialItem?: Record<string, any> | undefined;
@@ -115,6 +115,16 @@ const props = defineProps({
115
115
  type: String,
116
116
  required: false,
117
117
  default: ""
118
+ },
119
+ showPerPageSelector: {
120
+ type: Boolean,
121
+ required: false,
122
+ default: true
123
+ },
124
+ perPageOptions: {
125
+ type: Array,
126
+ required: false,
127
+ default: () => [10, 25, 50, 100, 250, 500, 1e3]
118
128
  }
119
129
  });
120
130
  const {
@@ -216,6 +226,11 @@ watch(filterValues, (newVal, oldValue) => {
216
226
  console.error("FILTERS CHANGED");
217
227
  onQueryChange(1);
218
228
  }, { deep: true });
229
+ watch(perPage, () => {
230
+ currentPage.value = 1;
231
+ onQueryChange(1);
232
+ debouncedGet();
233
+ });
219
234
  watch(() => page, () => {
220
235
  console.error("ROUTE CHANGED");
221
236
  debouncedGet();
@@ -377,11 +392,24 @@ const exportAction = async () => {
377
392
  </div>
378
393
  <div v-if="totalItems > 0 && totalPages > 1" class="pa-3">
379
394
  <span class="d-none d-md-block pa-3">Page {{ currentPage }} of {{ totalPages }} pages with {{ totalItems }} items</span>
380
- <v-pagination
381
- v-model="currentPage"
382
- :disabled="listPending"
383
- :length="totalPages"
384
- @input="getItems()"></v-pagination>
395
+ <div class="d-flex align-center justify-center ga-4 flex-wrap">
396
+ <v-pagination
397
+ v-model="currentPage"
398
+ :disabled="listPending"
399
+ :length="totalPages"
400
+ @input="getItems()"></v-pagination>
401
+ <v-select
402
+ v-if="showPerPageSelector"
403
+ v-model="perPage"
404
+ :items="perPageOptions"
405
+ :disabled="listPending"
406
+ label="Per page"
407
+ density="compact"
408
+ variant="outlined"
409
+ hide-details
410
+ style="max-width: 120px;"
411
+ ></v-select>
412
+ </div>
385
413
  </div>
386
414
  </v-col>
387
415
  </v-row>
@@ -17,6 +17,8 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
17
17
  hideFilters: boolean;
18
18
  fullScreenDialog: boolean;
19
19
  contentClasses: string;
20
+ showPerPageSelector: boolean;
21
+ perPageOptions: unknown[];
20
22
  title?: string | undefined;
21
23
  loaderKey?: string | undefined;
22
24
  initialItem?: Record<string, any> | undefined;
@@ -17,6 +17,7 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
17
17
  isPublic: boolean;
18
18
  additionalPostData: Record<string, any>;
19
19
  mimeTypes: unknown[];
20
+ clearable: boolean;
20
21
  title?: any;
21
22
  $props: any;
22
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -64,6 +64,10 @@ const props = defineProps({
64
64
  mimeTypes: {
65
65
  type: Array,
66
66
  default: null
67
+ },
68
+ clearable: {
69
+ type: Boolean,
70
+ default: true
67
71
  }
68
72
  });
69
73
  const model = defineModel();
@@ -421,6 +425,7 @@ watch(() => fileToUpload.value, (newVal, oldVal) => {
421
425
  <div class="d-flex align-center justify-space-between mb-2">
422
426
  <h4 class="mb-0">Selected:</h4>
423
427
  <v-btn
428
+ v-if="clearable"
424
429
  size="small"
425
430
  color="error"
426
431
  variant="text"
@@ -17,6 +17,7 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
17
17
  isPublic: boolean;
18
18
  additionalPostData: Record<string, any>;
19
19
  mimeTypes: unknown[];
20
+ clearable: boolean;
20
21
  title?: any;
21
22
  $props: any;
22
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grantthomas-nuxt",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Crud module for Nuxt 3 interacting with sibling .net project",
5
5
  "repository": "Tap-Leagues/GrantThomas.Nuxt",
6
6
  "license": "MIT",