@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
|
|
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
|
|
29
|
+
[K in NonNullable<typeof __VLS_90>]?: (props: typeof __VLS_91) => any;
|
|
30
30
|
} & {
|
|
31
|
-
buttons?: (props: typeof
|
|
31
|
+
buttons?: (props: typeof __VLS_8) => any;
|
|
32
32
|
} & {
|
|
33
|
-
filters?: (props: typeof
|
|
33
|
+
filters?: (props: typeof __VLS_16) => any;
|
|
34
34
|
} & {
|
|
35
|
-
'action-buttons'?: (props: typeof
|
|
35
|
+
'action-buttons'?: (props: typeof __VLS_48) => any;
|
|
36
36
|
} & {
|
|
37
|
-
'inside-bottom'?: (props: typeof
|
|
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
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
155
|
+
<VDivider v-if="hasFilters" />
|
|
162
156
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
175
|
+
<VSpacer />
|
|
182
176
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
<!-- buttons -->
|
|
178
|
+
<div v-if="enableActionButtons" class="d-flex align-center table-buttons">
|
|
179
|
+
<slot name="action-buttons" />
|
|
186
180
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
|
|
209
|
+
<VDivider v-if="enableButtonsFilter" :class="{
|
|
216
210
|
'sticky-divider': stickyActions
|
|
217
211
|
}" />
|
|
218
212
|
|
|
219
|
-
|
|
213
|
+
<div :class="[!useIsMobile().value || 'overflow-auto app-h-fit', {
|
|
220
214
|
'secondary-table': secondaryStyle,
|
|
221
215
|
'responsive-table': useIsMobile().value
|
|
222
216
|
}]">
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
217
|
+
<!-- table -->
|
|
218
|
+
<VDataTableServer
|
|
219
|
+
v-model="modelValue"
|
|
220
|
+
:class="{
|
|
227
221
|
'mt-5 px-5': secondaryStyle
|
|
228
222
|
}"
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
244
|
-
|
|
245
|
-
|
|
237
|
+
<template #item.index="{ index }">
|
|
238
|
+
{{ (data?.pagination.total ?? 0) - index - (data?.pagination.from ?? 0) + 1 }}
|
|
239
|
+
</template>
|
|
246
240
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
-
|
|
256
|
-
<template #loading>
|
|
257
|
-
<div class="text-center">
|
|
258
|
-
<VProgressCircular indeterminate />
|
|
259
|
-
</div>
|
|
260
|
-
</template>
|
|
247
|
+
<template #loader />
|
|
261
248
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
</template>
|
|
267
|
-
</VDataTableServer>
|
|
249
|
+
<!-- loading -->
|
|
250
|
+
<template #loading>
|
|
251
|
+
<div class="text-center">
|
|
252
|
+
<VProgressCircular indeterminate />
|
|
268
253
|
</div>
|
|
269
|
-
</
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
|
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
|
|
29
|
+
[K in NonNullable<typeof __VLS_90>]?: (props: typeof __VLS_91) => any;
|
|
30
30
|
} & {
|
|
31
|
-
buttons?: (props: typeof
|
|
31
|
+
buttons?: (props: typeof __VLS_8) => any;
|
|
32
32
|
} & {
|
|
33
|
-
filters?: (props: typeof
|
|
33
|
+
filters?: (props: typeof __VLS_16) => any;
|
|
34
34
|
} & {
|
|
35
|
-
'action-buttons'?: (props: typeof
|
|
35
|
+
'action-buttons'?: (props: typeof __VLS_48) => any;
|
|
36
36
|
} & {
|
|
37
|
-
'inside-bottom'?: (props: typeof
|
|
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>;
|