@bagelink/vue 1.9.49 → 1.9.54

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 (79) hide show
  1. package/dist/components/AddressSearch.vue.d.ts.map +1 -1
  2. package/dist/components/Btn.vue.d.ts +2 -2
  3. package/dist/components/Btn.vue.d.ts.map +1 -1
  4. package/dist/components/Filter.vue.d.ts +0 -1
  5. package/dist/components/Filter.vue.d.ts.map +1 -1
  6. package/dist/components/ImportData.vue.d.ts.map +1 -1
  7. package/dist/components/ModalConfirm.vue.d.ts.map +1 -1
  8. package/dist/components/Spreadsheet/Index.vue.d.ts.map +1 -1
  9. package/dist/components/form/FieldArray.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/ColorInput.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/DateInput.vue.d.ts +1 -1
  12. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/DatePicker.vue.d.ts +1 -1
  14. package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
  15. package/dist/components/form/inputs/EmailInput.vue.d.ts.map +1 -1
  16. package/dist/components/form/inputs/PasswordInput.vue.d.ts +1 -1
  17. package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
  18. package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
  19. package/dist/components/form/inputs/SelectInput.vue.d.ts +0 -1
  20. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  21. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  22. package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts.map +1 -1
  23. package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
  24. package/dist/dialog/DialogConfirm.vue.d.ts +0 -3
  25. package/dist/dialog/DialogConfirm.vue.d.ts.map +1 -1
  26. package/dist/dialog/DialogForm.vue.d.ts.map +1 -1
  27. package/dist/form-flow/FormFlow.vue.d.ts.map +1 -1
  28. package/dist/form-flow/MultiStepForm.vue.d.ts.map +1 -1
  29. package/dist/i18n/index.d.ts +996 -0
  30. package/dist/i18n/index.d.ts.map +1 -0
  31. package/dist/index.cjs +135 -130
  32. package/dist/index.d.ts +2 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.mjs +15415 -11483
  35. package/dist/plugins/bagel.d.ts +5 -7
  36. package/dist/plugins/bagel.d.ts.map +1 -1
  37. package/dist/plugins/useToast.d.ts.map +1 -1
  38. package/dist/style.css +1 -1
  39. package/dist/utils/calendar/dateUtils.d.ts +4 -3
  40. package/dist/utils/calendar/dateUtils.d.ts.map +1 -1
  41. package/dist/utils/index.d.ts +0 -1
  42. package/dist/utils/index.d.ts.map +1 -1
  43. package/dist/utils/lang.d.ts +6 -7
  44. package/dist/utils/lang.d.ts.map +1 -1
  45. package/package.json +2 -1
  46. package/src/components/AddressSearch.vue +5 -2
  47. package/src/components/Btn.vue +8 -6
  48. package/src/components/Filter.vue +37 -76
  49. package/src/components/ImportData.vue +35 -29
  50. package/src/components/ModalConfirm.vue +9 -7
  51. package/src/components/Spreadsheet/Index.vue +35 -60
  52. package/src/components/form/FieldArray.vue +4 -2
  53. package/src/components/form/inputs/ColorInput.vue +18 -12
  54. package/src/components/form/inputs/DateInput.vue +7 -4
  55. package/src/components/form/inputs/EmailInput.vue +9 -7
  56. package/src/components/form/inputs/PasswordInput.vue +17 -15
  57. package/src/components/form/inputs/RadioPillsInput.vue +5 -3
  58. package/src/components/form/inputs/SelectInput.vue +13 -11
  59. package/src/components/form/inputs/TelInput.vue +11 -9
  60. package/src/components/form/inputs/Upload/UploadInput.vue +7 -5
  61. package/src/components/lightbox/Lightbox.vue +4 -1
  62. package/src/dialog/DialogConfirm.vue +11 -6
  63. package/src/dialog/DialogForm.vue +9 -9
  64. package/src/form-flow/FormFlow.vue +7 -15
  65. package/src/form-flow/MultiStepForm.vue +16 -12
  66. package/src/i18n/index.ts +130 -0
  67. package/src/i18n/locales/en.json +153 -0
  68. package/src/i18n/locales/es.json +153 -0
  69. package/src/i18n/locales/fr.json +153 -0
  70. package/src/i18n/locales/he.json +174 -0
  71. package/src/i18n/locales/it.json +153 -0
  72. package/src/i18n/locales/ru.json +153 -0
  73. package/src/index.ts +11 -5
  74. package/src/plugins/bagel.ts +14 -26
  75. package/src/plugins/useToast.ts +4 -2
  76. package/src/styles/text.css +2 -1
  77. package/src/utils/calendar/dateUtils.ts +91 -59
  78. package/src/utils/index.ts +0 -2
  79. package/src/utils/lang.ts +0 -46
@@ -1,5 +1,5 @@
1
1
  import { DateLike } from '@vueuse/core';
2
- import { AvailableTimeLanguages, DateTimeAcceptedFormats } from '../../types/timeAgoT';
2
+ import { DateTimeAcceptedFormats } from '../../types/timeAgoT';
3
3
  interface TimeDeltaOptions {
4
4
  Day?: number;
5
5
  Hour?: number;
@@ -24,8 +24,9 @@ interface TimeDeltaOptions {
24
24
  year?: number;
25
25
  }
26
26
  export declare function timeDelta(date: string | Date, options: TimeDeltaOptions): Date;
27
- export declare function timeAgo(date: string | Date, langOrConfig?: AvailableTimeLanguages | {
28
- lang?: AvailableTimeLanguages;
27
+ type TimeAgoLang = 'en' | 'es' | 'fr' | 'he' | 'it' | 'ru';
28
+ export declare function timeAgo(date: string | Date, langOrConfig?: TimeAgoLang | {
29
+ lang?: TimeAgoLang;
29
30
  mode?: 'relative' | 'absolute';
30
31
  }): string;
31
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CA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wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAA;AAkG7E,eAAO,MAAM,OAAO,mBAAa,CAAA"}
@@ -24,7 +24,6 @@ export declare function normalizeURL(url: string): string;
24
24
  export declare function normalizeDimension(value: string | number | undefined, defaultMetric?: string): string | undefined;
25
25
  export * as bagelFormUtils from './BagelFormUtils';
26
26
  export { useForm } from './BagelFormUtils';
27
- export { useLang } from './lang';
28
27
  export type { ComparisonOperator, FilterCondition, LogicalOperator, QueryConditions, QueryFilter } from './queryFilter';
29
28
  export { anyOf, parseQuery, queryFilter, range, search } from './queryFilter';
30
29
  export type { ShowdownConverter, ShowdownOptions } from './showdown';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAI1E,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,IAAI,GAAE,MAAY,QAO1D;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,UAMlC;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ3D;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,iBAGtE;AAED,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,UAG3C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,QAIrE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,UAOpE;AAED,wB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will be removed in a future version.
4
+ */
4
5
  export declare function useLang(): {
5
6
  lang: import('vue').WritableComputedRef<string, string>;
6
- $tdb: typeof $tdb;
7
- availableLangs: import('vue').WritableComputedRef<string[], string[]>;
8
- defaultLang: import('vue').WritableComputedRef<string, string>;
7
+ availableLangs: import('vue').ComputedRef<string[]>;
8
+ defaultLang: import('vue').ComputedRef<string>;
9
9
  };
10
- export {};
11
10
  //# sourceMappingURL=lang.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../src/utils/lang.ts"],"names":[],"mappings":"AAcA,iBAAS,IAAI,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAOrE;AAED,wBAAgB,OAAO;;;;;EAsBtB"}
1
+ {"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../src/utils/lang.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,OAAO;;;;EA6BtB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.9.49",
4
+ "version": "1.9.54",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -81,6 +81,7 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@vueuse/core": "^13.3.0",
84
+ "vue-i18n": "^11.2.8",
84
85
  "@zxcvbn-ts/core": "^3.0.4",
85
86
  "axios": "^1.9.0",
86
87
  "floating-vue": "^5.2.2",
@@ -1,8 +1,11 @@
1
1
  <script setup lang="ts">
2
- import { Dropdown, ListItem, ListView, TextInput } from '@bagelink/vue'
2
+ import { Dropdown, ListItem, ListView, TextInput, useI18n } from '@bagelink/vue'
3
3
  import { ref } from 'vue'
4
4
 
5
5
  const emit = defineEmits(['addressSelected'])
6
+
7
+ const { $t } = useI18n()
8
+
6
9
  const addressInput = ref('')
7
10
  const searchResults = ref<any[]>([])
8
11
 
@@ -31,7 +34,7 @@ async function searchAddresses() {
31
34
  <div class="relative">
32
35
  <Dropdown ref="suggestion" :noAutoFocus="true" placement="bottom-start">
33
36
  <template #trigger>
34
- <TextInput v-model="addressInput" placeholder="Enter address" @debounce="searchAddresses" />
37
+ <TextInput v-model="addressInput" :placeholder="$t('addressSearch.placeholder')" @debounce="searchAddresses" />
35
38
  </template>
36
39
  <ListView class="-mt-2 hm-300px">
37
40
  <ListItem v-for="(result, index) in searchResults" :key="index" icon="location_on" :title="result.display_name" @click="emitAddress(result)" />
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import type { IconType, ExtendedThemeType } from '@bagelink/vue'
2
+ import type { IconType, ExtendedThemeType, TranslatableString } from '@bagelink/vue'
3
3
  import type { SetupContext } from 'vue'
4
- import { Icon, Loading, useModal } from '@bagelink/vue'
4
+ import { Icon, Loading, useModal, useI18n, resolveI18n } from '@bagelink/vue'
5
5
  import { useSlots, ref, onMounted, onUnmounted, computed } from 'vue'
6
6
  import { RouterLink } from 'vue-router'
7
7
 
@@ -22,7 +22,7 @@ const props = withDefaults(
22
22
  type?: 'button' | 'submit' | 'reset'
23
23
  loading?: boolean
24
24
  role?: string
25
- value?: string
25
+ value?: TranslatableString
26
26
  to?: string
27
27
  href?: string
28
28
  round?: boolean
@@ -57,6 +57,8 @@ const emit = defineEmits<{
57
57
  confirmed: [event: MouseEvent]
58
58
  }>()
59
59
 
60
+ const { $t } = useI18n()
61
+
60
62
  const isMobileScreen = ref(false)
61
63
 
62
64
  function checkMobile() {
@@ -75,9 +77,9 @@ onUnmounted(() => {
75
77
  async function handleClick(event: MouseEvent) {
76
78
  if (props.confirm !== undefined && props.confirm !== false) {
77
79
  const { confirmModal } = useModal()
78
- const message = typeof props.confirm === 'string' ? props.confirm : 'Are you sure?'
80
+ const message = typeof props.confirm === 'string' ? props.confirm : $t('modalConfirm.message')
79
81
  const confirmed = await confirmModal({
80
- title: 'Confirm',
82
+ title: $t('modalConfirm.title'),
81
83
  message
82
84
  })
83
85
 
@@ -167,7 +169,7 @@ const slots: SetupContext['slots'] = useSlots()
167
169
  />
168
170
  <slot />
169
171
  <template v-if="!slots.default && value">
170
- {{ value }}
172
+ {{ resolveI18n(value) }}
171
173
  </template>
172
174
  <Icon
173
175
  v-if="iconEnd" :icon="iconEnd" class="transition-400" :size="iconSizeComputed"
@@ -1,11 +1,10 @@
1
1
  <script setup lang="ts" generic="T extends Record<string, any>">
2
2
  import type { Option } from '@bagelink/vue'
3
3
  import type { ComparisonOperator, LogicalOperator, QueryConditions } from './queryFilter'
4
- import { Btn, DateInput, Dropdown, Icon, SelectInput, TextInput } from '@bagelink/vue'
4
+ import { Btn, DateInput, Dropdown, Icon, SelectInput, TextInput, useI18n } from '@bagelink/vue'
5
5
  import { computed } from 'vue'
6
6
 
7
7
  type OptionsSource = Option[] | ((query: string) => Promise<Option[]>)
8
- type Language = 'he' | 'en'
9
8
 
10
9
  interface UICondition {
11
10
  id: string
@@ -22,7 +21,6 @@ const props = defineProps<{
22
21
  type?: 'string' | 'number' | 'boolean' | 'date'
23
22
  options?: OptionsSource
24
23
  }>
25
- language?: Language
26
24
  }>()
27
25
 
28
26
  const emit = defineEmits<{
@@ -31,85 +29,48 @@ const emit = defineEmits<{
31
29
 
32
30
  const model = defineModel<QueryConditions<T>>({ default: () => [] })
33
31
 
32
+ const { $t } = useI18n()
33
+
34
34
  let conditionIdCounter = 0
35
35
  function generateId() {
36
36
  return `cond_${++conditionIdCounter}_${Date.now()}`
37
37
  }
38
38
 
39
- // Localization data
40
- const texts = {
41
- he: {
42
- filter: 'פילטר',
43
- noActiveFilters: 'אין פילטרים פעילים',
44
- connectors: {
45
- and: 'וגם',
46
- or: 'או'
47
- },
48
- operators: {
49
- eq: 'שווה ל',
50
- ne: 'לא שווה ל',
51
- gt: 'גדול מ',
52
- ge: 'גדול או שווה ל',
53
- lt: 'קטן מ',
54
- le: 'קטן או שווה ל',
55
- co: 'מכיל',
56
- sw: 'מתחיל ב',
57
- ew: 'מסתיים ב',
58
- pr: 'קיים'
59
- },
60
- placeholders: {
61
- selectField: 'בחר שדה',
62
- selectOption: 'בחירה',
63
- selectDate: 'בחירת תאריך',
64
- enterValue: 'ערך'
65
- },
66
- buttons: {
67
- addCondition: 'הוספת תנאי',
68
- clearAll: 'נקה הכל'
69
- },
70
- boolean: {
71
- true: 'כן',
72
- false: 'לא'
73
- }
39
+ // Computed texts using i18n
40
+ const currentTexts = computed(() => ({
41
+ filter: $t('filter.filter'),
42
+ noActiveFilters: $t('filter.noActiveFilters'),
43
+ connectors: {
44
+ and: $t('filter.connectors.and'),
45
+ or: $t('filter.connectors.or'),
74
46
  },
75
- en: {
76
- filter: 'Filter',
77
- noActiveFilters: 'No active filters',
78
- connectors: {
79
- and: 'And',
80
- or: 'Or'
81
- },
82
- operators: {
83
- eq: 'Equals',
84
- ne: 'Not equals',
85
- gt: 'Greater than',
86
- ge: 'Greater or equal',
87
- lt: 'Less than',
88
- le: 'Less or equal',
89
- co: 'Contains',
90
- sw: 'Starts with',
91
- ew: 'Ends with',
92
- pr: 'Present'
93
- },
94
- placeholders: {
95
- selectField: 'Select field',
96
- selectOption: 'Select option',
97
- selectDate: 'Select date',
98
- enterValue: 'Value'
99
- },
100
- buttons: {
101
- addCondition: 'Add condition',
102
- clearAll: 'Clear all'
103
- },
104
- boolean: {
105
- true: 'Yes',
106
- false: 'No'
107
- }
108
- }
109
- }
110
-
111
- // Get current language texts
112
- const currentTexts = computed(() => texts[props.language || 'en'])
47
+ operators: {
48
+ eq: $t('filter.operators.eq'),
49
+ ne: $t('filter.operators.ne'),
50
+ gt: $t('filter.operators.gt'),
51
+ ge: $t('filter.operators.ge'),
52
+ lt: $t('filter.operators.lt'),
53
+ le: $t('filter.operators.le'),
54
+ co: $t('filter.operators.co'),
55
+ sw: $t('filter.operators.sw'),
56
+ ew: $t('filter.operators.ew'),
57
+ pr: $t('filter.operators.pr'),
58
+ },
59
+ placeholders: {
60
+ selectField: $t('filter.placeholders.selectField'),
61
+ selectOption: $t('filter.placeholders.selectOption'),
62
+ selectDate: $t('filter.placeholders.selectDate'),
63
+ enterValue: $t('filter.placeholders.enterValue'),
64
+ },
65
+ buttons: {
66
+ addCondition: $t('filter.buttons.addCondition'),
67
+ clearAll: $t('filter.buttons.clearAll'),
68
+ },
69
+ boolean: {
70
+ true: $t('select.yes'),
71
+ false: $t('select.no'),
72
+ },
73
+ }))
113
74
 
114
75
  // Map model conditions to UI conditions with stable IDs
115
76
  const conditionIds = new Map<number, string>()
@@ -13,13 +13,24 @@ import {
13
13
  Spreadsheet,
14
14
  useExcel,
15
15
  DragOver,
16
+ useI18n,
16
17
  } from '@bagelink/vue'
17
18
  import { computed, reactive, ref, watch, watchEffect, toValue } from 'vue'
18
-
19
19
  import { useSchemaField } from '../composables/useSchemaField'
20
20
  import { formatString } from '../utils/strings'
21
21
  import TextInput from './form/inputs/TextInput.vue'
22
22
 
23
+ const props = defineProps<{
24
+ schema?: MaybeRefOrGetter<BglFormSchemaT<T>>
25
+ title?: string
26
+ }>()
27
+
28
+ const emit = defineEmits<{
29
+ (e: 'processedData', data: T[]): void
30
+ }>()
31
+
32
+ const { $t } = useI18n()
33
+
23
34
  interface SchemaItem {
24
35
  id: string
25
36
  label: string
@@ -55,15 +66,6 @@ interface Transformation {
55
66
  targetValue: any
56
67
  }
57
68
 
58
- const props = defineProps<{
59
- schema?: MaybeRefOrGetter<BglFormSchemaT<T>>
60
- title?: string
61
- }>()
62
-
63
- const emit = defineEmits<{
64
- (e: 'processedData', data: T[]): void
65
- }>()
66
-
67
69
  // Get Excel utilities from composable
68
70
  const {
69
71
  readSheetData,
@@ -1331,10 +1333,10 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1331
1333
  </Btn>
1332
1334
  <SelectInput
1333
1335
  v-if="sheetNames.length > 1" v-model="selectedSheet" :options="sheetNames"
1334
- label="Select Sheet"
1336
+ :label="$t('importData.selectSheet')"
1335
1337
  />
1336
1338
  <CheckInput
1337
- v-model="hasHeaders" label="Mark this if file has a header row" class="m-0"
1339
+ v-model="hasHeaders" :label="$t('importData.hasHeaders')" class="m-0"
1338
1340
  style="--bgl-accent-color: var(--bgl-black); --bgl-primary: var(--bgl-black);"
1339
1341
  />
1340
1342
  </div>
@@ -1464,22 +1466,22 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1464
1466
  <SelectInput
1465
1467
  v-if="fieldMapping[selectedTransformField.id]"
1466
1468
  v-model="selectedSourceValue" searchable :options="sourceValueOptions"
1467
- placeholder="Select source value"
1469
+ :placeholder="$t('importData.selectSourceValue')"
1468
1470
  />
1469
1471
  <TextInput
1470
1472
  v-else v-model="selectedSourceValue" type="text"
1471
- placeholder="Source value"
1473
+ :placeholder="$t('importData.sourceValue')"
1472
1474
  />
1473
1475
  </div>
1474
1476
  <div class="grid-span-4">
1475
1477
  <SelectInput
1476
1478
  v-if="selectedTransformField.options && selectedTransformField.options.length > 0"
1477
1479
  v-model="selectedTargetValue" searchable :options="selectedTransformField.options"
1478
- placeholder="Select target value"
1480
+ :placeholder="$t('importData.selectTargetValue')"
1479
1481
  />
1480
1482
  <TextInput
1481
1483
  v-else v-model="selectedTargetValue" type="text"
1482
- placeholder="Target value"
1484
+ :placeholder="$t('importData.targetValue')"
1483
1485
  />
1484
1486
  </div>
1485
1487
  <Btn
@@ -1491,7 +1493,7 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1491
1493
  </div>
1492
1494
 
1493
1495
  <div class="flex pt-05">
1494
- <Btn class="ms-auto" value="Close" @click="showTransformDialog = false" />
1496
+ <Btn class="ms-auto" value="$t:importData.close" @click="showTransformDialog = false" />
1495
1497
  </div>
1496
1498
  </div>
1497
1499
  </Modal>
@@ -1524,7 +1526,10 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1524
1526
  <Pill>
1525
1527
  {{ relatedFiles[selectedRelationField.id]!.name }}
1526
1528
  </Pill>
1527
- <Btn thin round value="Change File" @click="relatedFiles[selectedRelationField.id] = null" />
1529
+ <Btn
1530
+ thin round value="$t:importData.changeFile"
1531
+ @click="relatedFiles[selectedRelationField.id] = null"
1532
+ />
1528
1533
  </div>
1529
1534
 
1530
1535
  <div v-if="relatedFileData[selectedRelationField.id]">
@@ -1533,12 +1538,12 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1533
1538
  <div class="flex gap-1">
1534
1539
  <SelectInput
1535
1540
  v-model="parentKeyField[selectedRelationField.id]" :options="fileHeaders"
1536
- label="Source Key Field (from this file)"
1541
+ :label="$t('importData.sourceKeyField')"
1537
1542
  />
1538
1543
  <SelectInput
1539
1544
  v-model="relatedKeyField[selectedRelationField.id]"
1540
1545
  :options="Object.keys(relatedFileData[selectedRelationField.id][0] || {})"
1541
- label="Related Key Field (from related file)"
1546
+ :label="$t('importData.relatedKeyField')"
1542
1547
  />
1543
1548
  </div>
1544
1549
 
@@ -1564,7 +1569,7 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1564
1569
  <SelectInput
1565
1570
  v-model="relatedFileMappings[selectedRelationField.id][schemaItem.id]"
1566
1571
  :options="Object.keys(relatedFileData[selectedRelationField.id][0] || {})"
1567
- placeholder="Select column..."
1572
+ :placeholder="$t('importData.selectColumn')"
1568
1573
  />
1569
1574
  </td>
1570
1575
  <td>
@@ -1599,7 +1604,7 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1599
1604
  </div>
1600
1605
  </div>
1601
1606
  <div class="flex pt-05">
1602
- <Btn class="ms-auto" value="Close" @click="showRelatedDialog = false" />
1607
+ <Btn class="ms-auto" value="$t:importData.close" @click="showRelatedDialog = false" />
1603
1608
  </div>
1604
1609
  </div>
1605
1610
  </Modal>
@@ -1616,8 +1621,8 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1616
1621
  Showing all {{ previewData.length }} records. You can edit values directly.
1617
1622
  </p>
1618
1623
  <div class="flex gap-1 mt-1 space-between">
1619
- <Btn flat thin value="Cancel" @click="showPreviewModal = false" />
1620
- <Btn value="Import Data" @click="processData()" />
1624
+ <Btn flat thin value="$t:importData.cancel" @click="showPreviewModal = false" />
1625
+ <Btn value="$t:importData.importData" @click="processData()" />
1621
1626
  </div>
1622
1627
  </div>
1623
1628
  </Modal>
@@ -1671,11 +1676,12 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1671
1676
  <SelectInput
1672
1677
  v-if="relatedFileMappings[selectedRelatedTransformField.parentId]?.[selectedRelatedTransformField.field.id]"
1673
1678
  v-model="selectedRelatedSourceValue" searchable
1674
- :options="relatedSourceValueOptions" placeholder="Select source value"
1679
+ :options="relatedSourceValueOptions"
1680
+ :placeholder="$t('importData.selectSourceValue')"
1675
1681
  />
1676
1682
  <input
1677
1683
  v-else v-model="selectedRelatedSourceValue" type="text"
1678
- placeholder="Source value"
1684
+ :placeholder="$t('importData.sourceValue')"
1679
1685
  >
1680
1686
  </td>
1681
1687
  <td>
@@ -1683,11 +1689,11 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1683
1689
  v-if="selectedRelatedTransformField.field.options && selectedRelatedTransformField.field.options.length > 0"
1684
1690
  v-model="selectedRelatedTargetValue" searchable
1685
1691
  :options="selectedRelatedTransformField.field.options"
1686
- placeholder="Select target value"
1692
+ :placeholder="$t('importData.selectTargetValue')"
1687
1693
  />
1688
1694
  <input
1689
1695
  v-else v-model="selectedRelatedTargetValue" type="text"
1690
- placeholder="Target value"
1696
+ :placeholder="$t('importData.targetValue')"
1691
1697
  >
1692
1698
  </td>
1693
1699
  <td>
@@ -1704,7 +1710,7 @@ function getRelatedFieldWithDefaults(parentId: string, field: any) {
1704
1710
  </div>
1705
1711
 
1706
1712
  <div>
1707
- <Btn value="Close" @click="showRelatedTransformDialog = false" />
1713
+ <Btn value="$t:importData.close" @click="showRelatedTransformDialog = false" />
1708
1714
  </div>
1709
1715
  </div>
1710
1716
  </Modal>
@@ -1,6 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ThemeType } from '@bagelink/vue'
3
- import { Btn, Modal } from '@bagelink/vue'
3
+ import { Btn, Modal, useI18n } from '@bagelink/vue'
4
+ import { computed } from 'vue'
4
5
 
5
6
  const props = defineProps<{
6
7
  title?: string
@@ -13,18 +14,19 @@ const props = defineProps<{
13
14
  }>()
14
15
 
15
16
  const emit = defineEmits(['update:visible'])
17
+ const { $t } = useI18n()
16
18
 
17
19
  function select(val: boolean) {
18
20
  props.resolve(val)
19
21
  emit('update:visible')
20
22
  }
21
23
 
22
- const title = props.title || 'Confirm'
23
- const message = props.message || 'Are you sure you want to continue?'
24
- const confirmText = props.confirmText || 'Confirm'
25
- const cancelText = props.cancelText || 'Cancel'
26
- const confirmBtnColor: ThemeType = props.confirmBtnColor || 'green'
27
- const cancelBtnColor: ThemeType = props.cancelBtnColor || 'gray'
24
+ const title = computed(() => props.title || $t('modalConfirm.title'))
25
+ const message = computed(() => props.message || $t('modalConfirm.message'))
26
+ const confirmText = computed(() => props.confirmText || $t('modalConfirm.confirm'))
27
+ const cancelText = computed(() => props.cancelText || $t('modalConfirm.cancel'))
28
+ const confirmBtnColor = computed((): ThemeType => props.confirmBtnColor || 'green')
29
+ const cancelBtnColor = computed((): ThemeType => props.cancelBtnColor || 'gray')
28
30
  </script>
29
31
 
30
32
  <template>