@winchsa/ui 0.1.39 → 0.1.40

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.
@@ -20,21 +20,21 @@ type __VLS_ModelProps = {
20
20
  modelValue?: string[];
21
21
  };
22
22
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_19: {}, __VLS_27: {}, __VLS_59: {}, __VLS_101: string | number, __VLS_102: any, __VLS_115: {
23
+ declare var __VLS_8: {}, __VLS_16: {}, __VLS_48: {}, __VLS_90: string | number, __VLS_91: any, __VLS_104: {
24
24
  totals: {
25
25
  [key: string]: number;
26
26
  } | undefined;
27
27
  };
28
28
  type __VLS_Slots = {} & {
29
- [K in NonNullable<typeof __VLS_101>]?: (props: typeof __VLS_102) => any;
29
+ [K in NonNullable<typeof __VLS_90>]?: (props: typeof __VLS_91) => any;
30
30
  } & {
31
- buttons?: (props: typeof __VLS_19) => any;
31
+ buttons?: (props: typeof __VLS_8) => any;
32
32
  } & {
33
- filters?: (props: typeof __VLS_27) => any;
33
+ filters?: (props: typeof __VLS_16) => any;
34
34
  } & {
35
- 'action-buttons'?: (props: typeof __VLS_59) => any;
35
+ 'action-buttons'?: (props: typeof __VLS_48) => any;
36
36
  } & {
37
- 'inside-bottom'?: (props: typeof __VLS_115) => any;
37
+ 'inside-bottom'?: (props: typeof __VLS_104) => any;
38
38
  };
39
39
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
40
40
  filterQueryString: import("vue").ComputedRef<string>;
@@ -134,142 +134,133 @@ defineExpose({
134
134
  </script>
135
135
 
136
136
  <template>
137
- <section>
138
- <VRow>
139
- <VCol cols="12">
140
- <AppCard
141
- :style="{
142
- overflow: useIsMobile().value ? 'auto !important' : 'inherit !important'
143
- }"
144
- style="z-index: unset !important;"
145
- :is-loading="isLoading && secondaryStyle"
146
- >
147
- <template v-if="enableButtons" #append>
148
- <slot name="buttons" />
149
- </template>
150
- <!-- filters -->
151
- <VCardText v-if="hasFilters" class="pt-0">
152
- <slot name="filters">
153
- <FilterGenerator
154
- v-model="filters"
155
- :forms="processedFormFilters"
156
- :errors="errors.data"
157
- />
158
- </slot>
159
- </VCardText>
137
+ <AppCard
138
+ style="z-index: unset !important;"
139
+ :is-loading="isLoading && secondaryStyle"
140
+ >
141
+ <template v-if="enableButtons" #append>
142
+ <slot name="buttons" />
143
+ </template>
144
+ <!-- filters -->
145
+ <VCardText v-if="hasFilters">
146
+ <slot name="filters">
147
+ <FilterGenerator
148
+ v-model="filters"
149
+ :forms="processedFormFilters"
150
+ :errors="errors.data"
151
+ />
152
+ </slot>
153
+ </VCardText>
160
154
 
161
- <VDivider v-if="hasFilters" />
155
+ <VDivider v-if="hasFilters" />
162
156
 
163
- <!-- options and buttons -->
164
- <VCardText
165
- v-if="enablePageSizeOptions || enableActionButtons"
166
- :class="['d-flex flex-wrap py-4 gap-4', {
157
+ <!-- options and buttons -->
158
+ <VCardText
159
+ v-if="enablePageSizeOptions || enableActionButtons"
160
+ :class="['d-flex flex-wrap py-4 gap-4', {
167
161
  'sticky-actions': stickyActions
168
162
  }]"
169
- >
170
- <!-- Page Size options -->
171
- <div v-if="enablePageSizeOptions" class="me-3 d-flex gap-3">
172
- <AppSelect
173
- hide-details
174
- :model-value="itemsPerPage"
175
- :items="pageSizeOptions"
176
- style="width: 6.25rem"
177
- @update:model-value="val => itemsPerPage = Number(val)"
178
- />
179
- </div>
163
+ >
164
+ <!-- Page Size options -->
165
+ <div v-if="enablePageSizeOptions" class="me-3 d-flex gap-3">
166
+ <AppSelect
167
+ hide-details
168
+ :model-value="itemsPerPage"
169
+ :items="pageSizeOptions"
170
+ style="width: 6.25rem"
171
+ @update:model-value="val => itemsPerPage = Number(val)"
172
+ />
173
+ </div>
180
174
 
181
- <VSpacer />
175
+ <VSpacer />
182
176
 
183
- <!-- buttons -->
184
- <div v-if="enableActionButtons" class="d-flex align-center table-buttons">
185
- <slot name="action-buttons" />
177
+ <!-- buttons -->
178
+ <div v-if="enableActionButtons" class="d-flex align-center table-buttons">
179
+ <slot name="action-buttons" />
186
180
 
187
- <template v-if="enableBaseButtons">
188
- <BaseButton
189
- size="38"
190
- color="secondary"
191
- class="ms-2"
192
- @click="reset"
193
- >
194
- <VIcon
195
- icon="tabler-filter-x"
196
- size="22"
197
- />
198
- </BaseButton>
181
+ <template v-if="enableBaseButtons">
182
+ <BaseButton
183
+ size="38"
184
+ color="secondary"
185
+ class="ms-2"
186
+ @click="reset"
187
+ >
188
+ <VIcon
189
+ icon="tabler-filter-x"
190
+ size="22"
191
+ />
192
+ </BaseButton>
199
193
 
200
- <BaseButton
201
- size="38"
202
- color="secondary"
203
- class="ms-2"
204
- @click="refresh"
205
- >
206
- <VIcon
207
- icon="tabler-refresh"
208
- size="22"
209
- />
210
- </BaseButton>
211
- </template>
212
- </div>
213
- </VCardText>
194
+ <BaseButton
195
+ size="38"
196
+ color="secondary"
197
+ class="ms-2"
198
+ @click="refresh"
199
+ >
200
+ <VIcon
201
+ icon="tabler-refresh"
202
+ size="22"
203
+ />
204
+ </BaseButton>
205
+ </template>
206
+ </div>
207
+ </VCardText>
214
208
 
215
- <VDivider v-if="enableButtonsFilter" :class="{
209
+ <VDivider v-if="enableButtonsFilter" :class="{
216
210
  'sticky-divider': stickyActions
217
211
  }" />
218
212
 
219
- <div :class="[!useIsMobile().value || 'overflow-auto app-h-fit', {
213
+ <div :class="[!useIsMobile().value || 'overflow-auto app-h-fit', {
220
214
  'secondary-table': secondaryStyle,
221
215
  'responsive-table': useIsMobile().value
222
216
  }]">
223
- <!-- table -->
224
- <VDataTableServer
225
- v-model="modelValue"
226
- :class="{
217
+ <!-- table -->
218
+ <VDataTableServer
219
+ v-model="modelValue"
220
+ :class="{
227
221
  'mt-5 px-5': secondaryStyle
228
222
  }"
229
- :items="data?.rows"
230
- :items-length="data?.pagination.total ?? 0"
231
- :headers="headers"
232
- :loading="isLoading"
233
- :no-data-text="t('no_data')"
234
- :fixed-header="useIsMobile().value"
235
- :show-select="showSelect"
236
- :return-object="returnObject"
237
- >
238
- <!-- columns -->
239
- <template v-for="(_, name) in $slots" #[name]="slotProps">
240
- <slot :name="name" v-bind="slotProps || {}" />
241
- </template>
223
+ :items="data?.rows"
224
+ :items-length="data?.pagination.total ?? 0"
225
+ :headers="headers"
226
+ :loading="isLoading"
227
+ :no-data-text="t('no_data')"
228
+ :fixed-header="useIsMobile().value"
229
+ :show-select="showSelect"
230
+ :return-object="returnObject"
231
+ >
232
+ <!-- columns -->
233
+ <template v-for="(_, name) in $slots" #[name]="slotProps">
234
+ <slot :name="name" v-bind="slotProps || {}" />
235
+ </template>
242
236
 
243
- <template #item.index="{ index }">
244
- {{ (data?.pagination.total ?? 0) - index - (data?.pagination.from ?? 0) + 1 }}
245
- </template>
237
+ <template #item.index="{ index }">
238
+ {{ (data?.pagination.total ?? 0) - index - (data?.pagination.from ?? 0) + 1 }}
239
+ </template>
246
240
 
247
- <template #item.created_at="{ item }">
248
- <div class="d-flex text-pre-line">
249
- {{ item?.created_at != "-" || item?.created_at ? formatDate(item?.created_at) : "-" }}
250
- </div>
251
- </template>
252
-
253
- <template #loader />
241
+ <template #item.created_at="{ item }">
242
+ <div class="d-flex text-pre-line">
243
+ {{ item?.created_at != "-" || item?.created_at ? formatDate(item?.created_at) : "-" }}
244
+ </div>
245
+ </template>
254
246
 
255
- <!-- loading -->
256
- <template #loading>
257
- <div class="text-center">
258
- <VProgressCircular indeterminate />
259
- </div>
260
- </template>
247
+ <template #loader />
261
248
 
262
- <!-- pagination -->
263
- <template #bottom>
264
- <slot name="inside-bottom" :totals="data?.totals" />
265
- <TablePagination v-model="currentPage" :pagination="pagination" />
266
- </template>
267
- </VDataTableServer>
249
+ <!-- loading -->
250
+ <template #loading>
251
+ <div class="text-center">
252
+ <VProgressCircular indeterminate />
268
253
  </div>
269
- </AppCard>
270
- </VCol>
271
- </VRow>
272
- </section>
254
+ </template>
255
+
256
+ <!-- pagination -->
257
+ <template #bottom>
258
+ <slot name="inside-bottom" :totals="data?.totals" />
259
+ <TablePagination v-model="currentPage" :pagination="pagination" />
260
+ </template>
261
+ </VDataTableServer>
262
+ </div>
263
+ </AppCard>
273
264
  </template>
274
265
 
275
266
  <style scoped>
@@ -20,21 +20,21 @@ type __VLS_ModelProps = {
20
20
  modelValue?: string[];
21
21
  };
22
22
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_19: {}, __VLS_27: {}, __VLS_59: {}, __VLS_101: string | number, __VLS_102: any, __VLS_115: {
23
+ declare var __VLS_8: {}, __VLS_16: {}, __VLS_48: {}, __VLS_90: string | number, __VLS_91: any, __VLS_104: {
24
24
  totals: {
25
25
  [key: string]: number;
26
26
  } | undefined;
27
27
  };
28
28
  type __VLS_Slots = {} & {
29
- [K in NonNullable<typeof __VLS_101>]?: (props: typeof __VLS_102) => any;
29
+ [K in NonNullable<typeof __VLS_90>]?: (props: typeof __VLS_91) => any;
30
30
  } & {
31
- buttons?: (props: typeof __VLS_19) => any;
31
+ buttons?: (props: typeof __VLS_8) => any;
32
32
  } & {
33
- filters?: (props: typeof __VLS_27) => any;
33
+ filters?: (props: typeof __VLS_16) => any;
34
34
  } & {
35
- 'action-buttons'?: (props: typeof __VLS_59) => any;
35
+ 'action-buttons'?: (props: typeof __VLS_48) => any;
36
36
  } & {
37
- 'inside-bottom'?: (props: typeof __VLS_115) => any;
37
+ 'inside-bottom'?: (props: typeof __VLS_104) => any;
38
38
  };
39
39
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
40
40
  filterQueryString: import("vue").ComputedRef<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winchsa/ui",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {