@bagelink/vue 1.12.38 → 1.12.43
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/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Slider.vue.d.ts.map +1 -1
- package/dist/components/Spreadsheet/Index.vue.d.ts.map +1 -1
- package/dist/components/Spreadsheet/SpreadsheetCell.vue.d.ts.map +1 -1
- package/dist/components/Spreadsheet/SpreadsheetTable.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.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/form-flow/form-flow.d.ts.map +1 -1
- package/dist/form-flow/schema-fields.d.ts +127 -0
- package/dist/form-flow/schema-fields.d.ts.map +1 -0
- package/dist/index.cjs +73 -73
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +7912 -7693
- package/dist/style.css +1 -1
- package/dist/utils/useSearch.d.ts.map +1 -1
- package/package.json +102 -101
- package/src/components/Slider.vue +2 -1
- package/src/components/Spreadsheet/Index.vue +3 -3
- package/src/components/Spreadsheet/SpreadsheetCell.vue +1 -1
- package/src/components/calendar/views/WeekView.vue +20 -5
- package/src/components/form/inputs/RadioGroup.vue +1 -0
- package/src/components/form/inputs/TextInput.vue +3 -3
- package/src/components/layout/AppSidebar.vue +8 -7
- package/src/dialog/DialogForm.vue +1 -1
- package/src/form-flow/FormFlow.vue +7 -5
- package/src/form-flow/MultiStepForm.vue +6 -3
- package/src/form-flow/form-flow.ts +4 -0
- package/src/form-flow/schema-fields.ts +470 -0
- package/src/index.ts +2 -0
- package/src/styles/scrollbar.css +7 -1
- package/src/styles/text.css +8 -0
- package/src/utils/useSearch.ts +1 -1
- package/LICENSE +0 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../src/utils/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAaxD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,UAYvC;AAGD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AA2ED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACrC,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAA;IAC7B,YAAY,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../src/utils/useSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAaxD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,UAYvC;AAGD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AA2ED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACrC,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC9B,OAAO,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAA;IACzB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAChC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACtC;AAwBD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAyL/D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAC1B,KAAK,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC,GACzD,YAAY,CAAC,CAAC,CAAC,GAAG;IAAE,UAAU,EAAE,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAAA;AAC9D,wBAAgB,SAAS,CAAC,CAAC,EAC1B,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GACzB,YAAY,CAAC,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,102 +1,103 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
}
|
|
2
|
+
"name": "@bagelink/vue",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.12.43",
|
|
5
|
+
"description": "Bagel core sdk packages",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Bagel Studio",
|
|
8
|
+
"email": "hi@bagelstudio.co.il"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"homepage": "https://github.com/bageldb/bagelink/tree/master/packages/vue#readme",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/bageldb/bagelink.git",
|
|
15
|
+
"directory": "packages/vue"
|
|
16
|
+
},
|
|
17
|
+
"bugs": "https://github.com/bageldb/bagelink/issues",
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"exports": {
|
|
21
|
+
"./tsconfig.json": "./tsconfig.json",
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./src": "./src/index.ts",
|
|
24
|
+
"./src/components": "./src/components/index.ts",
|
|
25
|
+
"./src/plugins": "./src/plugins/index.ts",
|
|
26
|
+
"./src/utils": "./src/utils/index.ts",
|
|
27
|
+
"./src/types": "./src/types/index.ts",
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"require": "./dist/index.cjs",
|
|
31
|
+
"import": "./dist/index.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./style.css": "./dist/style.css",
|
|
34
|
+
"./*": "./*"
|
|
35
|
+
},
|
|
36
|
+
"main": "./dist/index.cjs",
|
|
37
|
+
"module": "./dist/index.mjs",
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"typesVersions": {
|
|
40
|
+
"*": {
|
|
41
|
+
"*": [
|
|
42
|
+
"./dist/*",
|
|
43
|
+
"./dist/index.d.ts"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"bin": {
|
|
48
|
+
"generateFormSchema": "./bin/generateFormSchema.ts",
|
|
49
|
+
"experimentalGenTypedRoutes": "./bin/experimentalGenTypedRoutes.ts"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist",
|
|
53
|
+
"src",
|
|
54
|
+
"./vite.config.ts",
|
|
55
|
+
"bin/utils.ts",
|
|
56
|
+
"bin/generateFormSchema.ts",
|
|
57
|
+
"bin/experimentalGenTypedRoutes.ts"
|
|
58
|
+
],
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/leaflet": "^1.9.18",
|
|
61
|
+
"@types/signature_pad": "^4.0.0",
|
|
62
|
+
"swiper": "^12.0.3",
|
|
63
|
+
"vue": "^3.5.32",
|
|
64
|
+
"vue-component-type-helpers": "^2.2.10"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"@bagelink/sdk": "*",
|
|
68
|
+
"type-fest": "^4",
|
|
69
|
+
"vue": "*",
|
|
70
|
+
"vue-component-type-helpers": ">=2.2.10",
|
|
71
|
+
"vue-draggable-next": "^2.2.1",
|
|
72
|
+
"vue-router": "*"
|
|
73
|
+
},
|
|
74
|
+
"peerDependenciesMeta": {
|
|
75
|
+
"vue-draggable-next": {
|
|
76
|
+
"optional": true
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"prepublishOnly": "pnpm build",
|
|
81
|
+
"dev": "tsx watch src/index.ts",
|
|
82
|
+
"build": "vite build",
|
|
83
|
+
"test-build": "pnpm build && node test-build.js",
|
|
84
|
+
"start": "tsx src/index.ts",
|
|
85
|
+
"test": "vitest"
|
|
86
|
+
},
|
|
87
|
+
"publishConfig": {
|
|
88
|
+
"access": "public"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@bagelink/utils": "1.12.42",
|
|
92
|
+
"@floating-ui/dom": "^1.7.5",
|
|
93
|
+
"@oddbird/popover-polyfill": "^0.6.1",
|
|
94
|
+
"@vueuse/core": "^13.3.0",
|
|
95
|
+
"@zxcvbn-ts/core": "^3.0.4",
|
|
96
|
+
"axios": "^1.9.0",
|
|
97
|
+
"floating-vue": "^5.2.2",
|
|
98
|
+
"libphonenumber-js": "1.12.9",
|
|
99
|
+
"signature_pad": "^5.0.9",
|
|
100
|
+
"vue-i18n": "^11.2.8",
|
|
101
|
+
"vue-toastification": "^2.0.0-rc.5"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- eslint-disable vue/multi-word-component-names -->
|
|
1
2
|
<script setup lang="ts">
|
|
2
3
|
import { sleep, useDevice } from '@bagelink/vue'
|
|
3
4
|
import { ref, onMounted, onBeforeUnmount, watch, computed, nextTick, onUpdated } from 'vue'
|
|
@@ -500,7 +501,7 @@ function copyAttributesAndEvents(original: Element, clone: Element): void {
|
|
|
500
501
|
|
|
501
502
|
// Get original onClick behavior
|
|
502
503
|
if (original.onclick) {
|
|
503
|
-
original.onclick(new
|
|
504
|
+
original.onclick(new PointerEvent('click'))
|
|
504
505
|
} else {
|
|
505
506
|
// Default behavior - navigate like original link would
|
|
506
507
|
const targetBlank = original.getAttribute('target') === '_blank'
|
|
@@ -14,7 +14,7 @@ const { modelValue, columnConfig, label, allowAddRow = true } = defineProps<Spre
|
|
|
14
14
|
|
|
15
15
|
const emit = defineEmits(['update:modelValue'])
|
|
16
16
|
const { $t } = useI18n()
|
|
17
|
-
const { wrapText } = useLocalStore()
|
|
17
|
+
const { wrapText } = useLocalStore({ wrapText: false })
|
|
18
18
|
|
|
19
19
|
const localRows = ref(
|
|
20
20
|
modelValue ? modelValue.map(row => flattenObject({ ...row })) : []
|
|
@@ -185,7 +185,7 @@ function handleSpreadsheetKeyDown(event: KeyboardEvent) {
|
|
|
185
185
|
case 'v': event.preventDefault(); pasteSelection(); break
|
|
186
186
|
case 'z':
|
|
187
187
|
event.preventDefault()
|
|
188
|
-
event.shiftKey
|
|
188
|
+
if (event.shiftKey) redo(); else undo()
|
|
189
189
|
break
|
|
190
190
|
case 'y': event.preventDefault(); redo(); break
|
|
191
191
|
}
|
|
@@ -207,7 +207,7 @@ function handleSpreadsheetKeyDown(event: KeyboardEvent) {
|
|
|
207
207
|
<ListItem title="Undo" icon="undo" :disabled="!canUndo" @click="undo" />
|
|
208
208
|
<ListItem title="Redo" icon="redo" :disabled="!canRedo" @click="redo" />
|
|
209
209
|
<ToggleInput v-model="wrapText" :label="$t('spreadsheet.wrapText')" />
|
|
210
|
-
<Dropdown placement="
|
|
210
|
+
<Dropdown placement="bottom-end">
|
|
211
211
|
<template #trigger="{ show }">
|
|
212
212
|
<ListItem title="Column Visibility" icon="view_column" @click="show()" />
|
|
213
213
|
</template>
|
|
@@ -665,11 +665,20 @@ onUnmounted(() => {
|
|
|
665
665
|
@mousedown="props.availabilityEditable ? handleAvailMouseDown($event, index) : handleMouseDown($event, day)"
|
|
666
666
|
>
|
|
667
667
|
<!-- Hour grid lines -->
|
|
668
|
-
<
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
668
|
+
<template v-for="slot in timeSlots" :key="`line-${slot.time}`">
|
|
669
|
+
<div
|
|
670
|
+
class="hour-line absolute start end pointer-events-none"
|
|
671
|
+
:style="{ top: `${slot.hour * slotHeight}px` }"
|
|
672
|
+
/>
|
|
673
|
+
<div
|
|
674
|
+
class="sub-hour-line absolute start end pointer-events-none"
|
|
675
|
+
:style="{ top: `${slot.hour * slotHeight + slotHeight / 3}px` }"
|
|
676
|
+
/>
|
|
677
|
+
<div
|
|
678
|
+
class="sub-hour-line absolute start end pointer-events-none"
|
|
679
|
+
:style="{ top: `${slot.hour * slotHeight + (slotHeight * 2) / 3}px` }"
|
|
680
|
+
/>
|
|
681
|
+
</template>
|
|
673
682
|
|
|
674
683
|
<!-- Availability painted blocks (behind events) -->
|
|
675
684
|
<template v-if="props.availabilityMode">
|
|
@@ -802,6 +811,12 @@ onUnmounted(() => {
|
|
|
802
811
|
height: 0;
|
|
803
812
|
}
|
|
804
813
|
|
|
814
|
+
.sub-hour-line {
|
|
815
|
+
border-top: 1px dashed var(--bgl-gray-30, #e8e8e8);
|
|
816
|
+
z-index: 0;
|
|
817
|
+
height: 0;
|
|
818
|
+
}
|
|
819
|
+
|
|
805
820
|
/* This ensures all grid content aligns properly */
|
|
806
821
|
.overflow {
|
|
807
822
|
position: relative;
|
|
@@ -35,7 +35,7 @@ export interface TextInputProps extends ValidateInputBaseT {
|
|
|
35
35
|
autoheight?: boolean
|
|
36
36
|
code?: boolean
|
|
37
37
|
rows?: number | string
|
|
38
|
-
autocomplete?:
|
|
38
|
+
autocomplete?: string
|
|
39
39
|
autofocus?: boolean
|
|
40
40
|
error?: string
|
|
41
41
|
onFocusout?: (e: FocusEvent) => void
|
|
@@ -59,12 +59,12 @@ const normalizedPattern = computed(() => {
|
|
|
59
59
|
|
|
60
60
|
// Validate the pattern by trying to create a RegExp
|
|
61
61
|
try {
|
|
62
|
-
|
|
62
|
+
new RegExp(pattern, 'v')
|
|
63
63
|
return pattern
|
|
64
64
|
} catch {
|
|
65
65
|
// If 'v' flag fails, try without it (older browsers)
|
|
66
66
|
try {
|
|
67
|
-
|
|
67
|
+
new RegExp(pattern)
|
|
68
68
|
return pattern
|
|
69
69
|
} catch (err) {
|
|
70
70
|
console.error('Invalid pattern:', props.pattern, err)
|
|
@@ -144,7 +144,7 @@ const sidebarStyles = computed(() => {
|
|
|
144
144
|
|
|
145
145
|
<template>
|
|
146
146
|
<aside
|
|
147
|
-
class="app-sidebar transition-400 fixed start top bottom h-100vh z-99" :class="{
|
|
147
|
+
class="app-sidebar transition-400 fixed start top bottom h-100vh z-99 testMe1" :class="{
|
|
148
148
|
'sidebar-mobile-open': menuState.isMobile.value && menuState.isOpen.value,
|
|
149
149
|
'sidebar-mobile-closed':
|
|
150
150
|
menuState.isMobile.value && !menuState.isOpen.value,
|
|
@@ -161,14 +161,14 @@ const sidebarStyles = computed(() => {
|
|
|
161
161
|
}" :class="{
|
|
162
162
|
'card cardWrapSide': props.card,
|
|
163
163
|
'ps-05': !menuState.isOpen.value,
|
|
164
|
-
'
|
|
164
|
+
'ps-0751': menuState.isOpen.value,
|
|
165
165
|
'aside_frame': props.frame,
|
|
166
166
|
}" class="overflow-hidden flex column flex-stretch gap-1 w100p pt-1 pb-05 h-100p"
|
|
167
167
|
>
|
|
168
168
|
<!-- Logo/Brand -->
|
|
169
169
|
<router-link
|
|
170
170
|
to="/" class="decoration-none flex siderbarLogoWrap" :class="{
|
|
171
|
-
'gap-05 ps-
|
|
171
|
+
'gap-05 ps-1': menuState.isOpen.value,
|
|
172
172
|
'gap-0 pe-05 mx-auto': !menuState.isOpen.value,
|
|
173
173
|
}"
|
|
174
174
|
>
|
|
@@ -182,11 +182,11 @@ const sidebarStyles = computed(() => {
|
|
|
182
182
|
</router-link>
|
|
183
183
|
|
|
184
184
|
<!-- Navigation Links -->
|
|
185
|
-
<nav class="sidebar-nav flex column flex-stretch gap-025 align-items-start
|
|
185
|
+
<nav class="sidebar-nav flex column flex-stretch gap-025 align-items-start ps-025" :class="{ 'justify-content-center': props.centerlinks }">
|
|
186
186
|
<Btn
|
|
187
187
|
v-for="link in props.navLinks" :key="link.to"
|
|
188
188
|
:title="!menuState.isOpen.value && !menuState.isMobile.value ? resolveI18n(link.label) : ''" fullWidth
|
|
189
|
-
alignTxt="start" class="flex-shrink-0 px-
|
|
189
|
+
alignTxt="start" class="flex-shrink-0 px-075" :class="{ 'nav-btn-active': isActiveRoute(link) }"
|
|
190
190
|
:style="{
|
|
191
191
|
backgroundColor: isActiveRoute(link) ? props.activeColor : props.bgColor,
|
|
192
192
|
color: isActiveRoute(link) ? 'white' : props.textColor,
|
|
@@ -200,7 +200,7 @@ const sidebarStyles = computed(() => {
|
|
|
200
200
|
</Btn>
|
|
201
201
|
</nav>
|
|
202
202
|
<!-- Footer -->
|
|
203
|
-
<div class="sidebar-footer flex column flex-stretch gap-025 align-items-start mt-auto">
|
|
203
|
+
<div class="sidebar-footer flex column flex-stretch gap-025 align-items-start px-025 mt-auto">
|
|
204
204
|
<!-- Footer Links -->
|
|
205
205
|
<Btn
|
|
206
206
|
v-for="link in props.footerLinks" :key="link.to || link.label"
|
|
@@ -209,7 +209,7 @@ const sidebarStyles = computed(() => {
|
|
|
209
209
|
backgroundColor: isActiveRoute(link) ? props.activeColor : props.bgColor,
|
|
210
210
|
color: isActiveRoute(link) ? 'white' : props.textColor,
|
|
211
211
|
}"
|
|
212
|
-
fullWidth alignTxt="start" class="flex-shrink-0 px-
|
|
212
|
+
fullWidth alignTxt="start" class="flex-shrink-0 px-075" :class="{ 'nav-btn-active': isActiveRoute(link) }"
|
|
213
213
|
:to="link.to || '/'" @click="link.action"
|
|
214
214
|
>
|
|
215
215
|
<Icon :name="link.icon" size="1.2" />
|
|
@@ -243,6 +243,7 @@ const sidebarStyles = computed(() => {
|
|
|
243
243
|
.sidebar-nav {
|
|
244
244
|
overflow-y: auto;
|
|
245
245
|
flex: 1;
|
|
246
|
+
margin-inline: -0.05rem;
|
|
246
247
|
}
|
|
247
248
|
|
|
248
249
|
.cardWrapSide .bgl_icon-font {
|
|
@@ -46,7 +46,7 @@ const isDeleting = ref(false)
|
|
|
46
46
|
const error = ref<string | null>(null)
|
|
47
47
|
|
|
48
48
|
// Ref to FormFlow for validation
|
|
49
|
-
const formFlowRef = ref<
|
|
49
|
+
const formFlowRef = ref<{ validate: () => boolean }>()
|
|
50
50
|
|
|
51
51
|
const hasDeleteHandler = computed(() => typeof props.onDelete === 'function')
|
|
52
52
|
|
|
@@ -366,11 +366,13 @@ defineExpose({
|
|
|
366
366
|
<template v-if="field._type === 'array' && field._config.schema?._isSchema">
|
|
367
367
|
<ArrayInput v-bind="getFieldProps(field, key)">
|
|
368
368
|
<template #default="{ item }">
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
369
|
+
<!-- @vue-ignore -->
|
|
370
|
+
<FormFlow
|
|
371
|
+
:model-value="(item.value as any)"
|
|
372
|
+
:schema="(field._config.schema as any)"
|
|
373
|
+
:components="components"
|
|
374
|
+
@update:model-value="(val: any) => { item.value = val }"
|
|
375
|
+
/>
|
|
374
376
|
</template>
|
|
375
377
|
</ArrayInput>
|
|
376
378
|
</template>
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* - Data persistence across steps
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import type { Slots } from 'vue'
|
|
12
13
|
import type { FieldBuilder, SchemaDefinition } from './form-flow'
|
|
13
|
-
import { computed, ref, watch } from 'vue'
|
|
14
|
+
import { computed, ref, useSlots, watch } from 'vue'
|
|
14
15
|
|
|
15
16
|
import { useI18n } from '../i18n'
|
|
16
17
|
import { parseQuery } from '../utils/queryFilter'
|
|
@@ -30,6 +31,8 @@ const emit = defineEmits<{
|
|
|
30
31
|
}>()
|
|
31
32
|
|
|
32
33
|
const { $t } = useI18n()
|
|
34
|
+
const slots: Slots = useSlots()
|
|
35
|
+
const slotNames = computed((): string[] => Object.keys(slots))
|
|
33
36
|
|
|
34
37
|
export interface Props {
|
|
35
38
|
schema: Record<string, SchemaDefinition>
|
|
@@ -360,8 +363,8 @@ defineExpose({
|
|
|
360
363
|
<!-- Default: Use FormFlow -->
|
|
361
364
|
<FormFlow v-model="formData" :schema="currentStepSchema" :components="components" :errors="stepErrors">
|
|
362
365
|
<!-- Pass through field slots -->
|
|
363
|
-
|
|
364
|
-
|
|
366
|
+
<template v-for="slotName in slotNames" :key="slotName" #[slotName]="slotProps">
|
|
367
|
+
<slot :name="slotName" v-bind="slotProps" />
|
|
365
368
|
</template>
|
|
366
369
|
</FormFlow>
|
|
367
370
|
</slot>
|
|
@@ -1056,3 +1056,7 @@ export type InferSchemaType<S extends SchemaDefinition> = {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
1058
|
type InferFieldType<F> = F extends FieldBuilder<infer T> ? T : any
|
|
1059
|
+
|
|
1060
|
+
// Re-export schema-fields utilities
|
|
1061
|
+
export { schemaToFields, fieldsToSchema, initFormData, validateFormData, useSchemaToFields, inferFieldType as inferSchemaFieldType, defaultRowSpan } from './schema-fields'
|
|
1062
|
+
export type { FormField, FormFieldType, FormFieldValidation, JSONSchemaObject, JSONSchemaProperty, SelectOption as SchemaSelectOption } from './schema-fields'
|