@bagelink/vue 1.9.51 → 1.9.56
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.
- package/dist/components/AddressSearch.vue.d.ts.map +1 -1
- package/dist/components/Btn.vue.d.ts +2 -2
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Filter.vue.d.ts +0 -1
- package/dist/components/Filter.vue.d.ts.map +1 -1
- package/dist/components/ImportData.vue.d.ts.map +1 -1
- package/dist/components/ModalConfirm.vue.d.ts.map +1 -1
- package/dist/components/Spreadsheet/Index.vue.d.ts.map +1 -1
- package/dist/components/form/FieldArray.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ColorInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DatePicker.vue.d.ts +1 -1
- package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/EmailInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +0 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts.map +1 -1
- package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/dialog/DialogConfirm.vue.d.ts +0 -3
- package/dist/dialog/DialogConfirm.vue.d.ts.map +1 -1
- package/dist/dialog/DialogForm.vue.d.ts.map +1 -1
- package/dist/form-flow/FormFlow.vue.d.ts.map +1 -1
- package/dist/form-flow/MultiStepForm.vue.d.ts.map +1 -1
- package/dist/i18n/index.d.ts +995 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/index.cjs +135 -130
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +15388 -11464
- package/dist/plugins/bagel.d.ts +5 -7
- package/dist/plugins/bagel.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/calendar/dateUtils.d.ts +6 -5
- package/dist/utils/calendar/dateUtils.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/lang.d.ts +6 -7
- package/dist/utils/lang.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/AddressSearch.vue +5 -2
- package/src/components/Btn.vue +8 -6
- package/src/components/Filter.vue +37 -76
- package/src/components/ImportData.vue +35 -29
- package/src/components/ModalConfirm.vue +9 -7
- package/src/components/Spreadsheet/Index.vue +35 -60
- package/src/components/calendar/views/AgendaView.vue +1 -1
- package/src/components/calendar/views/DayView.vue +3 -3
- package/src/components/calendar/views/MonthView.vue +1 -1
- package/src/components/calendar/views/WeekView.vue +6 -6
- package/src/components/form/FieldArray.vue +4 -2
- package/src/components/form/inputs/ColorInput.vue +18 -12
- package/src/components/form/inputs/DateInput.vue +8 -5
- package/src/components/form/inputs/EmailInput.vue +9 -7
- package/src/components/form/inputs/PasswordInput.vue +17 -15
- package/src/components/form/inputs/RadioPillsInput.vue +5 -3
- package/src/components/form/inputs/SelectInput.vue +13 -11
- package/src/components/form/inputs/TelInput.vue +11 -9
- package/src/components/form/inputs/Upload/UploadInput.vue +7 -5
- package/src/components/lightbox/Lightbox.vue +4 -1
- package/src/dialog/DialogConfirm.vue +11 -6
- package/src/dialog/DialogForm.vue +9 -9
- package/src/form-flow/FormFlow.vue +7 -15
- package/src/form-flow/MultiStepForm.vue +16 -12
- package/src/i18n/index.ts +136 -0
- package/src/i18n/locales/en.json +153 -0
- package/src/i18n/locales/es.json +153 -0
- package/src/i18n/locales/fr.json +153 -0
- package/src/i18n/locales/he.json +174 -0
- package/src/i18n/locales/it.json +153 -0
- package/src/i18n/locales/ru.json +153 -0
- package/src/index.ts +11 -5
- package/src/plugins/bagel.ts +14 -26
- package/src/styles/text.css +2 -1
- package/src/utils/calendar/dateUtils.ts +108 -63
- package/src/utils/index.ts +0 -2
- package/src/utils/lang.ts +0 -46
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DateLike } from '@vueuse/core';
|
|
2
|
-
import {
|
|
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
|
-
|
|
28
|
-
|
|
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
|
/**
|
|
@@ -51,7 +52,7 @@ export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument
|
|
|
51
52
|
YYYY: string;
|
|
52
53
|
};
|
|
53
54
|
export interface FormatDateOptions extends Partial<Pick<Intl.DateTimeFormatOptions, 'hour12'>> {
|
|
54
|
-
|
|
55
|
+
format?: DateTimeAcceptedFormats;
|
|
55
56
|
locale?: Intl.LocalesArgument;
|
|
56
57
|
tz?: string;
|
|
57
58
|
}
|
|
@@ -66,7 +67,7 @@ export declare function formatDate(date?: DateLike, format?: DateTimeAcceptedFor
|
|
|
66
67
|
* Formats a date based on the provided options.
|
|
67
68
|
* @param date The date to format (string or Date object).
|
|
68
69
|
* @param opts Options for formatting the date.
|
|
69
|
-
* @param opts.
|
|
70
|
+
* @param opts.format The format string (default is 'DD.MM.YY').
|
|
70
71
|
* @param opts.locale The locale to use for formatting (default is browser's locale).
|
|
71
72
|
* @param opts.tz The timezone to use for formatting (default is local timezone).
|
|
72
73
|
* @returns Formatted date string.
|
|
@@ -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,
|
|
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,uBAAuB,EAAY,MAAM,sBAAsB,CAAA;AAG7E,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CA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AAA"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -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,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SA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CAAC,EAAE,MAAM,QA6BpE;AAED,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/utils/lang.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `useI18n()` from '@bagelink/vue' instead.
|
|
3
|
+
* This will be removed in a future version.
|
|
4
|
+
*/
|
|
4
5
|
export declare function useLang(): {
|
|
5
6
|
lang: import('vue').WritableComputedRef<string, string>;
|
|
6
|
-
|
|
7
|
-
|
|
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
|
package/dist/utils/lang.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../src/utils/lang.ts"],"names":[],"mappings":"
|
|
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.
|
|
4
|
+
"version": "1.9.56",
|
|
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="
|
|
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)" />
|
package/src/components/Btn.vue
CHANGED
|
@@ -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?:
|
|
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 : '
|
|
80
|
+
const message = typeof props.confirm === 'string' ? props.confirm : $t('modalConfirm.message')
|
|
79
81
|
const confirmed = await confirmModal({
|
|
80
|
-
title: '
|
|
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
|
-
//
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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="
|
|
1336
|
+
:label="$t('importData.selectSheet')"
|
|
1335
1337
|
/>
|
|
1336
1338
|
<CheckInput
|
|
1337
|
-
v-model="hasHeaders" label="
|
|
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="
|
|
1469
|
+
:placeholder="$t('importData.selectSourceValue')"
|
|
1468
1470
|
/>
|
|
1469
1471
|
<TextInput
|
|
1470
1472
|
v-else v-model="selectedSourceValue" type="text"
|
|
1471
|
-
placeholder="
|
|
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="
|
|
1480
|
+
:placeholder="$t('importData.selectTargetValue')"
|
|
1479
1481
|
/>
|
|
1480
1482
|
<TextInput
|
|
1481
1483
|
v-else v-model="selectedTargetValue" type="text"
|
|
1482
|
-
placeholder="
|
|
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="
|
|
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
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
1620
|
-
<Btn value="
|
|
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"
|
|
1679
|
+
:options="relatedSourceValueOptions"
|
|
1680
|
+
:placeholder="$t('importData.selectSourceValue')"
|
|
1675
1681
|
/>
|
|
1676
1682
|
<input
|
|
1677
1683
|
v-else v-model="selectedRelatedSourceValue" type="text"
|
|
1678
|
-
placeholder="
|
|
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="
|
|
1692
|
+
:placeholder="$t('importData.selectTargetValue')"
|
|
1687
1693
|
/>
|
|
1688
1694
|
<input
|
|
1689
1695
|
v-else v-model="selectedRelatedTargetValue" type="text"
|
|
1690
|
-
placeholder="
|
|
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="
|
|
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 || '
|
|
23
|
-
const message = props.message || '
|
|
24
|
-
const confirmText = props.confirmText || '
|
|
25
|
-
const cancelText = props.cancelText || '
|
|
26
|
-
const confirmBtnColor: ThemeType
|
|
27
|
-
const cancelBtnColor: ThemeType
|
|
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>
|