@katlux/toolkit 0.1.1-alpha.93 → 0.1.1-alpha.96

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.
Files changed (65) hide show
  1. package/dist/compiled/composables/locales.mjs +554 -0
  2. package/dist/compiled/composables/useKatluxI18n.mjs +56 -0
  3. package/dist/compiled/composables/useKatluxI18n.spec.mjs +10 -0
  4. package/dist/module.cjs +2 -1
  5. package/dist/module.json +1 -1
  6. package/dist/module.mjs +2 -1
  7. package/dist/runtime/components/KButton/KButton.global.d.vue.ts +2 -2
  8. package/dist/runtime/components/KButton/KButton.global.vue.d.ts +2 -2
  9. package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
  10. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +2 -2
  11. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +2 -2
  12. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +6 -6
  13. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +6 -6
  14. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +1 -1
  15. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +11 -11
  16. package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +11 -11
  17. package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +3 -3
  18. package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +1 -1
  19. package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +1 -1
  20. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +2 -2
  21. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +2 -2
  22. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +2 -2
  23. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +2 -2
  24. package/dist/runtime/components/KGantt/KGantt.global.d.vue.ts +9 -9
  25. package/dist/runtime/components/KGantt/KGantt.global.vue.d.ts +9 -9
  26. package/dist/runtime/components/KGantt/KGantt.logic.d.ts +4 -4
  27. package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
  28. package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
  29. package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +6 -6
  30. package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +6 -6
  31. package/dist/runtime/components/KIcon/KIcon.logic.d.ts +3 -3
  32. package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +1 -1
  33. package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +1 -1
  34. package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +1 -1
  35. package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +1 -1
  36. package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +1 -1
  37. package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +1 -1
  38. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +1 -1
  39. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +1 -1
  40. package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +1 -1
  41. package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +1 -1
  42. package/dist/runtime/components/KToast/KToast.global.d.vue.ts +1 -1
  43. package/dist/runtime/components/KToast/KToast.global.vue.d.ts +1 -1
  44. package/dist/runtime/components/KTooltip/KTooltip.global.d.vue.ts +1 -1
  45. package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +1 -1
  46. package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
  47. package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
  48. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +5 -5
  49. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +5 -5
  50. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
  51. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
  52. package/dist/runtime/composables/locales.d.ts +28 -0
  53. package/dist/runtime/composables/locales.js +554 -0
  54. package/dist/runtime/composables/useKatluxI18n.d.ts +15 -0
  55. package/dist/runtime/composables/useKatluxI18n.js +56 -0
  56. package/dist/runtime/plugins/PresetPlugin.js +1 -1
  57. package/dist/runtime/presets/default/components/KAlert/KAlert.vue +2 -3
  58. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +2 -2
  59. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +2 -2
  60. package/dist/runtime/presets/default/components/KModal/KModal.vue +2 -2
  61. package/dist/runtime/presets/default/components/KPagination/KPagination.vue +2 -2
  62. package/dist/runtime/presets/default/components/KTabs/KTabs.vue +2 -2
  63. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +2 -2
  64. package/dist/runtime/presets/default/components/KTree/KTree.vue +2 -2
  65. package/package.json +2 -1
@@ -25,9 +25,9 @@
25
25
  import { computed } from 'vue'
26
26
  import { CFlatClientDataProvider } from '@katlux/providers'
27
27
  import type { IKDatatableAction } from '@katlux/providers'
28
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
28
29
 
29
- const nuxtApp = useNuxtApp?.()
30
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
30
+ const { t } = useKatluxI18n()
31
31
 
32
32
  const props = defineProps<{
33
33
  bulkActions: IKDatatableAction[]
@@ -59,9 +59,9 @@
59
59
  import { computed } from 'vue'
60
60
  import { ADataProvider } from '@katlux/providers'
61
61
  import type { IKDatatableAction } from '@katlux/providers'
62
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
62
63
 
63
- const nuxtApp = useNuxtApp?.()
64
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
64
+ const { t } = useKatluxI18n()
65
65
 
66
66
  const props = defineProps<{
67
67
  dataProvider: ADataProvider
@@ -11,9 +11,9 @@ dialog.k-modal(ref="dialogRef" @close="closeModal" @click="handleBackdropClick"
11
11
 
12
12
  <script lang="ts" setup>
13
13
  import { ref, watch, onMounted } from 'vue'
14
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
14
15
 
15
- const nuxtApp = useNuxtApp?.()
16
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
16
+ const { t } = useKatluxI18n()
17
17
 
18
18
  const props = defineProps<{
19
19
  modalId: string
@@ -32,9 +32,9 @@ nav.k-pagination(v-if="totalPages > 1" :aria-label="t('Pagination Navigation')")
32
32
 
33
33
  <script setup lang="ts">
34
34
  import { computed } from 'vue'
35
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
35
36
 
36
- const nuxtApp = useNuxtApp?.()
37
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
37
+ const { t } = useKatluxI18n()
38
38
 
39
39
  const props = defineProps<{
40
40
  dp: any
@@ -22,9 +22,9 @@
22
22
 
23
23
  <script lang="ts" setup>
24
24
  import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue'
25
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
25
26
 
26
- const nuxtApp = useNuxtApp?.()
27
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
27
+ const { t } = useKatluxI18n()
28
28
 
29
29
  const props = defineProps<{
30
30
  items: any[]
@@ -9,9 +9,9 @@
9
9
 
10
10
  <script lang="ts" setup>
11
11
  import { computed, useAttrs } from 'vue'
12
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
12
13
 
13
- const nuxtApp = useNuxtApp?.()
14
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
14
+ const { t } = useKatluxI18n()
15
15
 
16
16
  defineOptions({
17
17
  inheritAttrs: false
@@ -50,9 +50,9 @@
50
50
 
51
51
  <script lang="ts" setup>
52
52
  import { computed, type Ref } from 'vue'
53
+ import { useKatluxI18n } from '#toolkit/composables/useKatluxI18n'
53
54
 
54
- const nuxtApp = useNuxtApp?.()
55
- const t = (key: string) => nuxtApp?.$t ? nuxtApp.$t(key) : key
55
+ const { t } = useKatluxI18n()
56
56
 
57
57
  const props = defineProps<{
58
58
  visibleRows: any[] // Rows with __treeNode attached
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.1-alpha.93",
3
+ "version": "0.1.1-alpha.96",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",
@@ -40,6 +40,7 @@
40
40
  "dependencies": {
41
41
  "@katlux/providers": "*",
42
42
  "@nuxt/kit": "^3.12.0",
43
+ "@nuxtjs/i18n": "^10.4.0",
43
44
  "pug": "^3.0.0",
44
45
  "sass": "^1.80.0"
45
46
  },