@winchsa/ui 0.1.40 → 0.1.41

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.
@@ -15,12 +15,12 @@ type __VLS_Slots = {} & {
15
15
  default?: (props: typeof __VLS_76) => any;
16
16
  };
17
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
- refresh: (hideOverlay: () => void) => any;
19
18
  collapsed: (isContentCollapsed: boolean) => any;
19
+ refresh: (hideOverlay: () => void) => any;
20
20
  trash: () => any;
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- onRefresh?: ((hideOverlay: () => void) => any) | undefined;
23
22
  onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
23
+ onRefresh?: ((hideOverlay: () => void) => any) | undefined;
24
24
  onTrash?: (() => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -15,12 +15,12 @@ type __VLS_Slots = {} & {
15
15
  default?: (props: typeof __VLS_76) => any;
16
16
  };
17
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
18
- refresh: (hideOverlay: () => void) => any;
19
18
  collapsed: (isContentCollapsed: boolean) => any;
19
+ refresh: (hideOverlay: () => void) => any;
20
20
  trash: () => any;
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- onRefresh?: ((hideOverlay: () => void) => any) | undefined;
23
22
  onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
23
+ onRefresh?: ((hideOverlay: () => void) => any) | undefined;
24
24
  onTrash?: (() => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -6,9 +6,11 @@ type __VLS_Props = {
6
6
  disabled?: boolean;
7
7
  info?: string;
8
8
  };
9
- declare var __VLS_12: {};
9
+ declare var __VLS_1: {}, __VLS_14: {};
10
10
  type __VLS_Slots = {} & {
11
- default?: (props: typeof __VLS_12) => any;
11
+ title?: (props: typeof __VLS_1) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_14) => any;
12
14
  };
13
15
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -16,9 +16,11 @@ const colorStyle = computed(() => props.color ? `text-${props.color}` : "");
16
16
 
17
17
  <template>
18
18
  <div>
19
- <VLabel v-if="title" class="text-subtitle-2 text-capitalize">
20
- {{ title }}
21
- </VLabel>
19
+ <slot name="title">
20
+ <VLabel v-if="title" class="text-subtitle-2 text-capitalize">
21
+ {{ title }}
22
+ </VLabel>
23
+ </slot>
22
24
 
23
25
  <AppCard
24
26
  class="border px-4 py-0 mt-2 text-subtitle-2 d-flex align-center app-input-card"
@@ -6,9 +6,11 @@ type __VLS_Props = {
6
6
  disabled?: boolean;
7
7
  info?: string;
8
8
  };
9
- declare var __VLS_12: {};
9
+ declare var __VLS_1: {}, __VLS_14: {};
10
10
  type __VLS_Slots = {} & {
11
- default?: (props: typeof __VLS_12) => any;
11
+ title?: (props: typeof __VLS_1) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_14) => any;
12
14
  };
13
15
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,3 +1,7 @@
1
+ type __VLS_Props = {
2
+ to?: string | object;
3
+ withoutDefaultClass?: boolean;
4
+ };
1
5
  declare var __VLS_1: {}, __VLS_10: {}, __VLS_12: {};
2
6
  type __VLS_Slots = {} & {
3
7
  default?: (props: typeof __VLS_1) => any;
@@ -6,9 +10,7 @@ type __VLS_Slots = {} & {
6
10
  } & {
7
11
  default?: (props: typeof __VLS_12) => any;
8
12
  };
9
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {} | {
10
- [x: string]: any;
11
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
15
  declare const _default: typeof __VLS_export;
14
16
  export default _default;
@@ -1,49 +1,48 @@
1
1
  <script setup>
2
2
  import { RouterLink } from "vue-router";
3
- import { computed } from "vue";
4
- defineOptions({
5
- inheritAttrs: false
6
- });
3
+ import { computed, useAttrs } from "vue";
4
+ const attrs = useAttrs();
7
5
  const props = defineProps({
8
- // @ts-ignore
9
- ...RouterLink.props,
10
- to: {
11
- type: [String, Object],
12
- default: void 0
13
- },
14
- withoutDefaultClass: {
15
- type: Boolean,
16
- default: false
17
- }
6
+ to: { type: [String, Object], required: false, default: void 0 },
7
+ withoutDefaultClass: { type: Boolean, required: false, default: false }
18
8
  });
19
9
  const isExternalLink = computed(() => {
20
- return typeof props.to === "string" && (props.to.startsWith("http") || props.to.startsWith("https"));
10
+ return typeof props.to === "string" && (props.to.startsWith("http://") || props.to.startsWith("https://"));
11
+ });
12
+ const hrefValue = computed(() => {
13
+ return typeof props.to === "string" ? props.to : "";
21
14
  });
22
15
  </script>
23
16
 
24
17
  <template>
25
18
  <a
26
19
  v-if="isExternalLink"
27
- v-bind="$attrs"
28
- :href="to"
29
- target="_blank"
30
- :class="[{ 'hover-underline': !withoutDefaultClass }, ...($attrs?.class || [])]"
20
+ v-bind="{
21
+ target: '_blank',
22
+ ...attrs,
23
+ }"
24
+ :href="hrefValue"
25
+ :class="[{
26
+ 'hover-underline': !withoutDefaultClass
27
+ }, attrs?.class]"
31
28
  >
32
29
  <slot />
33
30
  </a>
34
31
 
35
32
  <RouterLink
36
33
  v-else-if="to"
37
- v-bind="$attrs"
34
+ v-bind="attrs"
38
35
  :to="to"
39
- :class="[{ 'hover-underline': !withoutDefaultClass }, ...($attrs?.class || [])]"
36
+ :class="[{
37
+ 'hover-underline': !withoutDefaultClass
38
+ }, attrs?.class]"
40
39
  >
41
40
  <slot />
42
41
  </RouterLink>
43
42
 
44
43
  <span
45
44
  v-else
46
- v-bind="$attrs"
45
+ v-bind="attrs"
47
46
  >
48
47
  <slot />
49
48
  </span>
@@ -1,3 +1,7 @@
1
+ type __VLS_Props = {
2
+ to?: string | object;
3
+ withoutDefaultClass?: boolean;
4
+ };
1
5
  declare var __VLS_1: {}, __VLS_10: {}, __VLS_12: {};
2
6
  type __VLS_Slots = {} & {
3
7
  default?: (props: typeof __VLS_1) => any;
@@ -6,9 +10,7 @@ type __VLS_Slots = {} & {
6
10
  } & {
7
11
  default?: (props: typeof __VLS_12) => any;
8
12
  };
9
- declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {} | {
10
- [x: string]: any;
11
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
15
  declare const _default: typeof __VLS_export;
14
16
  export default _default;
@@ -17,6 +17,7 @@ type __VLS_Props = {
17
17
  showToday?: boolean;
18
18
  hideErrorMessage?: boolean;
19
19
  inTable?: boolean;
20
+ showIcon?: boolean;
20
21
  };
21
22
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
23
  "update:modelValue": (value: string | Date) => any;
@@ -26,7 +26,8 @@ const props = defineProps({
26
26
  rules: { type: Array, required: false },
27
27
  showToday: { type: Boolean, required: false, default: true },
28
28
  hideErrorMessage: { type: Boolean, required: false, default: false },
29
- inTable: { type: Boolean, required: false }
29
+ inTable: { type: Boolean, required: false },
30
+ showIcon: { type: Boolean, required: false, default: true }
30
31
  });
31
32
  const emit = defineEmits(["update:modelValue", "resetSelectedDate"]);
32
33
  const popover = ref({
@@ -197,7 +198,7 @@ onBeforeUnmount(() => {
197
198
  :id="elementId"
198
199
  :model-value="inputValue"
199
200
  :placeholder="placeholder"
200
- :append-inner-icon="$attrs['append-inner-icon'] || 'tabler-calendar-event'"
201
+ :append-inner-icon="!showIcon ? void 0 : $attrs['append-inner-icon'] ?? 'tabler-calendar-event'"
201
202
  :disabled="disabled"
202
203
  :clearable="clearable"
203
204
  :clear-icon="clearIcon"
@@ -17,6 +17,7 @@ type __VLS_Props = {
17
17
  showToday?: boolean;
18
18
  hideErrorMessage?: boolean;
19
19
  inTable?: boolean;
20
+ showIcon?: boolean;
20
21
  };
21
22
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
23
  "update:modelValue": (value: string | Date) => any;
@@ -7,7 +7,6 @@ type __VLS_Props = {
7
7
  valueIn24?: boolean;
8
8
  fillInFocus?: boolean;
9
9
  hideErrorMessage?: boolean;
10
- isAppRtl?: boolean;
11
10
  };
12
11
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
12
  "update:model-value": (value: string | null) => any;
@@ -14,8 +14,7 @@ const props = defineProps({
14
14
  placeholder: { type: String, required: false },
15
15
  valueIn24: { type: Boolean, required: false, default: true },
16
16
  fillInFocus: { type: Boolean, required: false, default: true },
17
- hideErrorMessage: { type: Boolean, required: false },
18
- isAppRtl: { type: Boolean, required: false }
17
+ hideErrorMessage: { type: Boolean, required: false }
19
18
  });
20
19
  const errors = ref([]);
21
20
  const hasError = computed(() => errors.value.length > 0);
@@ -108,19 +107,16 @@ onBeforeUnmount(() => {
108
107
  </script>
109
108
 
110
109
  <template>
111
- <div class="d-flex flex-column">
112
- <div dir="ltr" class="h-100">
113
- <div dir="ltr" class="d-flex justify-center align-center gap-2 h-100" :class="{
114
- 'rtl-input': isAppRtl
115
- }">
110
+ <div class="d-flex flex-column app-time-picker">
111
+ <div class="h-100">
112
+ <div class="d-flex justify-center align-center gap-2 h-100">
116
113
  <VTextField
117
114
  v-bind="{ ...$attrs }"
118
115
  :id="elementId"
119
116
  v-model="inputValue"
120
117
  :placeholder="placeholder || t('inputs.time')"
121
- :append-inner-icon="$attrs['append-inner-icon'] || 'tabler-clock'"
118
+ :append-inner-icon="!showIcon ? void 0 : $attrs['append-inner-icon'] ?? 'tabler-clock'"
122
119
  style="padding-block: 0.125rem;"
123
- dir="ltr"
124
120
  hide-details
125
121
  maxlength="5"
126
122
  :error-messages="errorMessages"
@@ -134,6 +130,7 @@ onBeforeUnmount(() => {
134
130
  </template>
135
131
  </VTextField>
136
132
  </div>
133
+
137
134
  <Teleport to="body">
138
135
  <div
139
136
  v-if="isFocus"
@@ -254,7 +251,7 @@ onBeforeUnmount(() => {
254
251
  v-if="!hideErrorMessage"
255
252
  :messages="typeof errors === 'object' ? errors.join(', ') : errors"
256
253
  :active="hasError"
257
- :class="isAppRtl ? 'text-right mr-2' : 'text-left ml-2'"
254
+ class="time-picker-messages"
258
255
  />
259
256
  </div>
260
257
  </template>
@@ -264,25 +261,27 @@ onBeforeUnmount(() => {
264
261
  color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
265
262
  }
266
263
 
267
- :deep(.v-field__input input) {
268
- text-align: start !important;
269
- }
270
-
271
- /* Apply text-align: end when RTL using the :deep modifier */
272
- .rtl-input :deep(.v-field__input input) {
273
- text-align: end !important;
274
- }
275
-
276
264
  :deep(.v-input__control .v-field .v-field__clearable) {
277
265
  inset-inline-start: -5px !important;
278
266
  }
279
267
 
280
- .icon {
281
- background-color: transparent !important;
268
+ .time-picker-messages {
269
+ text-align: start;
270
+ margin-inline-start: 8px;
282
271
  }
283
272
  </style>
284
273
 
285
274
  <style>
275
+ [dir=rtl] .app-time-picker input {
276
+ text-align: end;
277
+ padding-inline: var(--v-field-padding-end) var(--v-field-padding-start);
278
+ }
279
+
280
+ [dir=ltr] .app-time-picker input {
281
+ text-align: start;
282
+ padding-inline: var(--v-field-padding-start) var(--v-field-padding-end);
283
+ }
284
+
286
285
  .dp-custom-arrow {
287
286
  width: 15px;
288
287
  height: 15px;
@@ -335,7 +334,6 @@ onBeforeUnmount(() => {
335
334
  border-width: 1px;
336
335
  border-style: solid;
337
336
  border-color: rgba(var(--v-border-color), 0.35);
338
- text-align: end !important;
339
337
  }
340
338
 
341
339
  .dp__input_focus {
@@ -7,7 +7,6 @@ type __VLS_Props = {
7
7
  valueIn24?: boolean;
8
8
  fillInFocus?: boolean;
9
9
  hideErrorMessage?: boolean;
10
- isAppRtl?: boolean;
11
10
  };
12
11
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
12
  "update:model-value": (value: string | null) => any;
@@ -20,13 +20,13 @@ type __VLS_ModelProps = {
20
20
  modelValue?: string[];
21
21
  };
22
22
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_8: {}, __VLS_16: {}, __VLS_48: {}, __VLS_90: string | number, __VLS_91: any, __VLS_104: {
23
+ declare var __VLS_8: {}, __VLS_16: {}, __VLS_48: {}, __VLS_99: {
24
24
  totals: {
25
25
  [key: string]: number;
26
26
  } | undefined;
27
- };
27
+ }, __VLS_108: string | number, __VLS_109: any;
28
28
  type __VLS_Slots = {} & {
29
- [K in NonNullable<typeof __VLS_90>]?: (props: typeof __VLS_91) => any;
29
+ [K in NonNullable<typeof __VLS_108>]?: (props: typeof __VLS_109) => any;
30
30
  } & {
31
31
  buttons?: (props: typeof __VLS_8) => any;
32
32
  } & {
@@ -34,7 +34,7 @@ type __VLS_Slots = {} & {
34
34
  } & {
35
35
  'action-buttons'?: (props: typeof __VLS_48) => any;
36
36
  } & {
37
- 'inside-bottom'?: (props: typeof __VLS_104) => any;
37
+ 'inside-bottom'?: (props: typeof __VLS_99) => any;
38
38
  };
39
39
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
40
40
  filterQueryString: import("vue").ComputedRef<string>;
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { VCol, VRow, VCardText, VDivider, VProgressCircular, VIcon, VSpacer, VDataTableServer } from "vuetify/components";
2
+ import { VCardText, VDivider, VProgressCircular, VIcon, VSpacer, VDataTableServer } from "vuetify/components";
3
3
  import { useQuery } from "@tanstack/vue-query";
4
4
  import { useRoute, useRouter } from "vue-router";
5
5
  import { computed, reactive, ref, watch } from "vue";
@@ -135,7 +135,7 @@ defineExpose({
135
135
 
136
136
  <template>
137
137
  <AppCard
138
- style="z-index: unset !important;"
138
+ style="z-index: unset !important; overflow: visible !important;"
139
139
  :is-loading="isLoading && secondaryStyle"
140
140
  >
141
141
  <template v-if="enableButtons" #append>
@@ -206,14 +206,18 @@ defineExpose({
206
206
  </div>
207
207
  </VCardText>
208
208
 
209
- <VDivider v-if="enableButtonsFilter" :class="{
210
- 'sticky-divider': stickyActions
211
- }" />
209
+ <VDivider
210
+ v-if="enableButtonsFilter"
211
+ :class="{
212
+ 'sticky-divider-action': stickyActions,
213
+ 'sticky-divider': !stickyActions
214
+ }"
215
+ />
212
216
 
213
217
  <div :class="[!useIsMobile().value || 'overflow-auto app-h-fit', {
214
218
  'secondary-table': secondaryStyle,
215
219
  'responsive-table': useIsMobile().value
216
- }]">
220
+ }]" style="position: relative;">
217
221
  <!-- table -->
218
222
  <VDataTableServer
219
223
  v-model="modelValue"
@@ -225,15 +229,10 @@ defineExpose({
225
229
  :headers="headers"
226
230
  :loading="isLoading"
227
231
  :no-data-text="t('no_data')"
228
- :fixed-header="useIsMobile().value"
232
+ :fixed-header="!useIsMobile().value"
229
233
  :show-select="showSelect"
230
234
  :return-object="returnObject"
231
235
  >
232
- <!-- columns -->
233
- <template v-for="(_, name) in $slots" #[name]="slotProps">
234
- <slot :name="name" v-bind="slotProps || {}" />
235
- </template>
236
-
237
236
  <template #item.index="{ index }">
238
237
  {{ (data?.pagination.total ?? 0) - index - (data?.pagination.from ?? 0) + 1 }}
239
238
  </template>
@@ -258,25 +257,19 @@ defineExpose({
258
257
  <slot name="inside-bottom" :totals="data?.totals" />
259
258
  <TablePagination v-model="currentPage" :pagination="pagination" />
260
259
  </template>
260
+
261
+ <!-- columns -->
262
+ <template v-for="(_, name) in $slots" #[name]="slotProps">
263
+ <slot :name="name" v-bind="slotProps || {}" />
264
+ </template>
261
265
  </VDataTableServer>
262
266
  </div>
263
267
  </AppCard>
264
268
  </template>
265
269
 
266
270
  <style scoped>
267
- .sticky-actions {
268
- position: sticky !important;
269
- position: -webkit-sticky;
270
- top: 75px;
271
- z-index: 11 !important;
272
- background-color: rgb(var(--v-theme-surface)) !important;
273
- }
274
-
275
- .sticky-divider {
276
- position: sticky !important;
277
- position: -webkit-sticky;
278
- top: 146px;
279
- z-index: 11 !important;
271
+ :deep(.v-card) {
272
+ overflow: visible !important;
280
273
  }
281
274
 
282
275
  :deep(.v-table) .v-table__wrapper > table > tbody > tr > td,
@@ -285,20 +278,40 @@ defineExpose({
285
278
  }
286
279
 
287
280
  :deep(.v-table__wrapper) {
288
- overflow: inherit !important;
281
+ overflow: visible !important;
282
+ }
283
+
284
+ :deep(.v-data-table__wrapper) {
285
+ overflow: visible !important;
289
286
  }
290
287
 
288
+ :deep(table) {
289
+ position: relative;
290
+ }
291
291
  :deep(table) tr th {
292
292
  position: sticky !important;
293
293
  position: -webkit-sticky;
294
- top: 70px;
295
- z-index: 10;
294
+ top: 86px !important;
295
+ z-index: 10 !important;
296
296
  padding-bottom: 0.75rem;
297
297
  background-color: rgb(var(--v-theme-surface)) !important;
298
298
  }
299
299
 
300
+ .sticky-actions {
301
+ position: sticky;
302
+ top: 76px;
303
+ z-index: 12;
304
+ background-color: rgb(var(--v-theme-surface));
305
+ }
306
+
307
+ .sticky-divider-action {
308
+ position: sticky;
309
+ top: 140px;
310
+ z-index: 12;
311
+ }
312
+
300
313
  .sticky-actions ~ div :deep(table) tr th {
301
- top: 146px !important;
314
+ top: 141px !important;
302
315
  }
303
316
 
304
317
  .table-buttons .v-btn .v-btn__overlay {
@@ -320,7 +333,6 @@ defineExpose({
320
333
  .secondary-table :deep(table) th {
321
334
  padding: 14px 16px !important;
322
335
  height: fit-content !important;
323
- top: 80px !important;
324
336
  border: 1px solid rgb(var(--v-theme-silver)) !important;
325
337
  background-color: rgb(var(--v-theme-gray-200)) !important;
326
338
  color: rgb(var(--v-theme-on-surface)) !important;
@@ -337,7 +349,7 @@ defineExpose({
337
349
  }
338
350
 
339
351
  .sticky-actions ~ div .secondary-table :deep(table) th {
340
- top: 156px !important;
352
+ top: 141px !important;
341
353
  }
342
354
 
343
355
  :deep(.v-overlay) {
@@ -20,13 +20,13 @@ type __VLS_ModelProps = {
20
20
  modelValue?: string[];
21
21
  };
22
22
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_8: {}, __VLS_16: {}, __VLS_48: {}, __VLS_90: string | number, __VLS_91: any, __VLS_104: {
23
+ declare var __VLS_8: {}, __VLS_16: {}, __VLS_48: {}, __VLS_99: {
24
24
  totals: {
25
25
  [key: string]: number;
26
26
  } | undefined;
27
- };
27
+ }, __VLS_108: string | number, __VLS_109: any;
28
28
  type __VLS_Slots = {} & {
29
- [K in NonNullable<typeof __VLS_90>]?: (props: typeof __VLS_91) => any;
29
+ [K in NonNullable<typeof __VLS_108>]?: (props: typeof __VLS_109) => any;
30
30
  } & {
31
31
  buttons?: (props: typeof __VLS_8) => any;
32
32
  } & {
@@ -34,7 +34,7 @@ type __VLS_Slots = {} & {
34
34
  } & {
35
35
  'action-buttons'?: (props: typeof __VLS_48) => any;
36
36
  } & {
37
- 'inside-bottom'?: (props: typeof __VLS_104) => any;
37
+ 'inside-bottom'?: (props: typeof __VLS_99) => any;
38
38
  };
39
39
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
40
40
  filterQueryString: import("vue").ComputedRef<string>;
@@ -203,7 +203,7 @@ const placeholder = (header) => {
203
203
  :error-messages="errorMessages"
204
204
  :error="error"
205
205
  clear-icon="tabler-x"
206
- append-inner-icon="none"
206
+ :show-icon="false"
207
207
  in-table
208
208
  hide-error-message
209
209
  />
@@ -212,14 +212,12 @@ const placeholder = (header) => {
212
212
  v-if="header.type === 'timepicker'"
213
213
  v-model="item[header.key]"
214
214
  :validate-on="header.validateOn"
215
- class="pa-0 h-100 app-flex-1 app-max-w-150px app-input-outline"
215
+ class="pa-0 h-100 app-input-outline"
216
216
  :rules="header.rules"
217
217
  :show-icon="false"
218
218
  :disabled="isDisabled"
219
- :is-app-rtl="header.isAppRtl"
220
219
  :error-messages="errorMessages"
221
220
  :error="error"
222
- append-inner-icon="none"
223
221
  hide-error-message
224
222
  />
225
223
 
@@ -235,6 +235,10 @@ h6,
235
235
  font-size: 13px;
236
236
  }
237
237
 
238
+ .v-pagination__prev .v-btn.v-btn--density-default, .v-pagination__next .v-btn.v-btn--density-default {
239
+ width: calc(var(--v-btn-height) + 40px) !important;
240
+ }
241
+
238
242
  .v-data-table-footer {
239
243
  margin-block-start: 1rem;
240
244
  }
@@ -619,6 +619,10 @@ h6,
619
619
  font-size: 13px;
620
620
  }
621
621
 
622
+ .v-pagination__prev .v-btn.v-btn--density-default, .v-pagination__next .v-btn.v-btn--density-default {
623
+ width: calc(var(--v-btn-height) + 40px) !important;
624
+ }
625
+
622
626
  .v-data-table-footer {
623
627
  margin-block-start: 1rem;
624
628
  }
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.formatTime = exports.formatNumberColor = exports.formatNumber = exports.formatDateWithoutTime = exports.formatDateWithTime = exports.formatDateWithDay = exports.formatDate = exports.extractDate = void 0;
7
7
  var _core = require("@vueuse/core");
8
- var _vueI18n = require("vue-i18n");
9
8
  const formatDate = date => {
10
9
  return (0, _core.useDateFormat)(date, "DD/MM/YYYY \n hh:mm A").value;
11
10
  };
@@ -23,13 +22,9 @@ const formatDateWithTime = date => {
23
22
  };
24
23
  exports.formatDateWithTime = formatDateWithTime;
25
24
  const formatDateWithDay = date => {
26
- const {
27
- locale
28
- } = (0, _vueI18n.useI18n)({
29
- useScope: "global"
30
- });
25
+ const locale = localStorage.getItem("winch-lang") ?? "ar";
31
26
  return (0, _core.useDateFormat)(date, "HH:mm A dddd - DD/MM/YYYY", {
32
- locales: locale?.value === "ar" ? "ar-SA" : "en-US"
27
+ locales: locale === "ar" ? "ar-SA" : "en-US"
33
28
  }).value;
34
29
  };
35
30
  exports.formatDateWithDay = formatDateWithDay;
@@ -53,14 +48,10 @@ const extractDate = (dateString, format = "DD/MM/YYYY", hasTime = true) => {
53
48
  };
54
49
  exports.extractDate = extractDate;
55
50
  const formatNumber = (number, withCurrency = false) => {
56
- const {
57
- locale
58
- } = (0, _vueI18n.useI18n)({
59
- useScope: "global"
60
- });
51
+ const locale = localStorage.getItem("winch-lang") ?? "ar";
61
52
  const currency = withCurrency ? String.fromCharCode(59392) : "";
62
53
  if (number === void 0 || number === null || number === "" || number === 0) {
63
- return locale?.value !== "ar" ? `${currency} 0` : `0 ${currency}`;
54
+ return locale !== "ar" ? `${currency} 0` : `0 ${currency}`;
64
55
  }
65
56
  if (typeof number === "string") {
66
57
  number = parseFloat(number);
@@ -71,7 +62,7 @@ const formatNumber = (number, withCurrency = false) => {
71
62
  maximumFractionDigits: needsTwoDecimalPlaces ? 2 : 0
72
63
  };
73
64
  const formatted = Math.abs(number).toLocaleString("en-US", options);
74
- return locale?.value !== "ar" ? `${currency} ${number < 0 ? `${formatted}-` : formatted}` : `${number < 0 ? `-${formatted}` : formatted} ${currency}`;
65
+ return locale !== "ar" ? `${currency} ${number < 0 ? `${formatted}-` : formatted}` : `${number < 0 ? `-${formatted}` : formatted} ${currency}`;
75
66
  };
76
67
  exports.formatNumber = formatNumber;
77
68
  const formatNumberColor = number => {
@@ -1,5 +1,4 @@
1
1
  import { useDateFormat } from "@vueuse/core";
2
- import { useI18n } from "vue-i18n";
3
2
  export const formatDate = (date) => {
4
3
  return useDateFormat(date, "DD/MM/YYYY \n hh:mm A").value;
5
4
  };
@@ -13,8 +12,8 @@ export const formatDateWithTime = (date) => {
13
12
  return useDateFormat(date, "DD/MM/YYYY - hh:mm A").value;
14
13
  };
15
14
  export const formatDateWithDay = (date) => {
16
- const { locale } = useI18n({ useScope: "global" });
17
- return useDateFormat(date, "HH:mm A dddd - DD/MM/YYYY", { locales: locale?.value === "ar" ? "ar-SA" : "en-US" }).value;
15
+ const locale = localStorage.getItem("winch-lang") ?? "ar";
16
+ return useDateFormat(date, "HH:mm A dddd - DD/MM/YYYY", { locales: locale === "ar" ? "ar-SA" : "en-US" }).value;
18
17
  };
19
18
  export const extractDate = (dateString, format = "DD/MM/YYYY", hasTime = true) => {
20
19
  if (!dateString) {
@@ -31,10 +30,10 @@ export const extractDate = (dateString, format = "DD/MM/YYYY", hasTime = true) =
31
30
  return { day, month, year };
32
31
  };
33
32
  export const formatNumber = (number, withCurrency = false) => {
34
- const { locale } = useI18n({ useScope: "global" });
33
+ const locale = localStorage.getItem("winch-lang") ?? "ar";
35
34
  const currency = withCurrency ? String.fromCharCode(59392) : "";
36
35
  if (number === void 0 || number === null || number === "" || number === 0) {
37
- return locale?.value !== "ar" ? `${currency} 0` : `0 ${currency}`;
36
+ return locale !== "ar" ? `${currency} 0` : `0 ${currency}`;
38
37
  }
39
38
  if (typeof number === "string") {
40
39
  number = parseFloat(number);
@@ -45,7 +44,7 @@ export const formatNumber = (number, withCurrency = false) => {
45
44
  maximumFractionDigits: needsTwoDecimalPlaces ? 2 : 0
46
45
  };
47
46
  const formatted = Math.abs(number).toLocaleString("en-US", options);
48
- return locale?.value !== "ar" ? `${currency} ${number < 0 ? `${formatted}-` : formatted}` : `${number < 0 ? `-${formatted}` : formatted} ${currency}`;
47
+ return locale !== "ar" ? `${currency} ${number < 0 ? `${formatted}-` : formatted}` : `${number < 0 ? `-${formatted}` : formatted} ${currency}`;
49
48
  };
50
49
  export const formatNumberColor = (number) => {
51
50
  const parsedNumber = typeof number === "string" ? parseFloat(number) : number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winchsa/ui",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "publishConfig": {