@bagelink/vue 1.21.10 → 1.21.12
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/{StructuredEditor-BHEer9-p.cjs → StructuredEditor-Dc6GqYi4.cjs} +1 -1
- package/dist/{StructuredEditor-BZN02n3J.js → StructuredEditor-YZETrYpo.js} +1 -1
- package/dist/components/calendar/CalendarPopover.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -1
- package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TableField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts +2 -2
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src-BLRgeoYC.cjs +764 -0
- package/dist/{src-CTW4Wax2.js → src-vFF7kmFX.js} +11466 -11461
- package/dist/src.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/calendar/CalendarPopover.vue +2 -3
- package/src/components/calendar/views/WeekView.vue +1 -2
- package/src/components/dataTable/DataTable.vue +4 -0
- package/src/components/form/inputs/RichText/index.vue +25 -13
- package/src/components/form/inputs/SelectInput.vue +1 -2
- package/src/components/form/inputs/TableField.vue +5 -6
- package/src/components/form/inputs/TextInput.vue +2 -2
- package/dist/bin/experimentalGenTypedRoutes.d.ts +0 -10
- package/dist/bin/experimentalGenTypedRoutes.d.ts.map +0 -1
- package/dist/src-C3pGzzxq.cjs +0 -764
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.21.
|
|
4
|
+
"version": "1.21.12",
|
|
5
5
|
"description": "Bagel core sdk packages",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Bagel Studio",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/signature_pad": "^4.0.0",
|
|
64
64
|
"vue": "^3.5.45",
|
|
65
65
|
"vue-component-type-helpers": "^2.2.12",
|
|
66
|
-
"@bagelink/sdk": "1.21.
|
|
66
|
+
"@bagelink/sdk": "1.21.12"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@bagelink/sdk": "*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CalendarEvent } from './CalendarTypes'
|
|
3
3
|
import { Card, useDevice } from '../../index'
|
|
4
|
-
import {
|
|
4
|
+
import { computed } from 'vue'
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{
|
|
7
7
|
event?: CalendarEvent
|
|
@@ -15,7 +15,6 @@ const emit = defineEmits<{
|
|
|
15
15
|
(e: 'eventClick', event: CalendarEvent): void
|
|
16
16
|
}>()
|
|
17
17
|
const { scrollY, scrollX, innerHeight, innerWidth } = useDevice()
|
|
18
|
-
const popoverRef = ref<HTMLElement>()
|
|
19
18
|
|
|
20
19
|
const popoverPosition = computed(() => {
|
|
21
20
|
const popoverWidth = 400
|
|
@@ -61,7 +60,7 @@ function closePopover() {
|
|
|
61
60
|
|
|
62
61
|
<template>
|
|
63
62
|
<Card
|
|
64
|
-
v-if="show && event"
|
|
63
|
+
v-if="show && event" v-click-outside="closePopover" thin class="custom-popover" :style="{
|
|
65
64
|
top: `${popoverPosition.top}px`,
|
|
66
65
|
left: `${popoverPosition.left}px`,
|
|
67
66
|
maxWidth: `${popoverPosition.width}px`,
|
|
@@ -263,7 +263,6 @@ const currentTimeTop = ref(0)
|
|
|
263
263
|
const isToday = ref(false)
|
|
264
264
|
const currentTimeInterval = ref<any>()
|
|
265
265
|
|
|
266
|
-
const timeSlotsContainer = ref<HTMLElement>()
|
|
267
266
|
const calendarGrid = ref<HTMLElement>()
|
|
268
267
|
const dayColumns = ref<HTMLElement[]>([])
|
|
269
268
|
const dayColumnsContainer = ref<HTMLElement>()
|
|
@@ -640,7 +639,7 @@ onUnmounted(() => {
|
|
|
640
639
|
</div>
|
|
641
640
|
<div ref="scrollableContainer" class="overflow h-100p pe-05">
|
|
642
641
|
<div ref="dayColumnsContainer" class="weekGrid border-end relative">
|
|
643
|
-
<div
|
|
642
|
+
<div>
|
|
644
643
|
<div
|
|
645
644
|
v-for="slot in timeSlots" :key="slot.time"
|
|
646
645
|
class="txt-light txt-12 color-gray flex justify-content-center bg-gray-light border-start"
|
|
@@ -67,6 +67,8 @@ const {
|
|
|
67
67
|
cleanData: cleanTransformedData,
|
|
68
68
|
onSelect: (item) => { emit('select', item) }
|
|
69
69
|
})
|
|
70
|
+
// Template ref for the composable's header checkbox.
|
|
71
|
+
void allSelectorEl
|
|
70
72
|
|
|
71
73
|
const {
|
|
72
74
|
list,
|
|
@@ -83,6 +85,8 @@ const {
|
|
|
83
85
|
props.onLastItemVisible?.()
|
|
84
86
|
}
|
|
85
87
|
})
|
|
88
|
+
// Template ref for the composable's end-of-list sentinel.
|
|
89
|
+
void lastItemEl
|
|
86
90
|
|
|
87
91
|
const isSortable = computed(() => !!props.sortable)
|
|
88
92
|
const dragHandle = computed(() => {
|
|
@@ -588,6 +588,19 @@ let pendingTableData: {
|
|
|
588
588
|
existingTable: HTMLTableElement | null
|
|
589
589
|
} | null = null
|
|
590
590
|
|
|
591
|
+
function editingExistingImage() {
|
|
592
|
+
return pendingImageData?.existingImage != null
|
|
593
|
+
}
|
|
594
|
+
function editingExistingEmbed() {
|
|
595
|
+
return pendingEmbedData?.existingEmbed != null
|
|
596
|
+
}
|
|
597
|
+
function editingExistingVideo() {
|
|
598
|
+
return pendingVideoData?.existingVideo != null
|
|
599
|
+
}
|
|
600
|
+
function editingExistingTable() {
|
|
601
|
+
return pendingTableData?.existingTable != null
|
|
602
|
+
}
|
|
603
|
+
|
|
591
604
|
// Initialize content from modelValue
|
|
592
605
|
editor.state.content = normalizedModelValue.value
|
|
593
606
|
|
|
@@ -1458,7 +1471,6 @@ function submitTable() {
|
|
|
1458
1471
|
}
|
|
1459
1472
|
} else if (thead) {
|
|
1460
1473
|
thead.remove()
|
|
1461
|
-
thead = null
|
|
1462
1474
|
}
|
|
1463
1475
|
|
|
1464
1476
|
// 2. Reconcile body rows (<tbody>)
|
|
@@ -4061,7 +4073,7 @@ const imgTransform = computed({
|
|
|
4061
4073
|
|
|
4062
4074
|
<!-- Image Modal -->
|
|
4063
4075
|
<Dialog
|
|
4064
|
-
:open="showImageModal" :title="
|
|
4076
|
+
:open="showImageModal" :title="editingExistingImage() ? 'Edit Image' : 'Insert Image'"
|
|
4065
4077
|
width="l" @update:open="showImageModal = $event"
|
|
4066
4078
|
>
|
|
4067
4079
|
<div class="image-dialog-layout">
|
|
@@ -4116,11 +4128,11 @@ const imgTransform = computed({
|
|
|
4116
4128
|
<div class="flex gap-05 w-100 ">
|
|
4117
4129
|
<Btn value="Cancel" flat thin @click="showImageModal = false" />
|
|
4118
4130
|
<Btn
|
|
4119
|
-
v-if="
|
|
4131
|
+
v-if="editingExistingImage()" value="Delete Image" color="red" flat thin icon="delete"
|
|
4120
4132
|
@click="deleteImage"
|
|
4121
4133
|
/>
|
|
4122
4134
|
<Btn
|
|
4123
|
-
class="ms-auto" :value="
|
|
4135
|
+
class="ms-auto" :value="editingExistingImage() ? 'Save Changes' : 'Insert Image'"
|
|
4124
4136
|
:disabled="!imageForm.src" @click="submitImage"
|
|
4125
4137
|
/>
|
|
4126
4138
|
</div>
|
|
@@ -4129,7 +4141,7 @@ const imgTransform = computed({
|
|
|
4129
4141
|
|
|
4130
4142
|
<!-- Embed Modal -->
|
|
4131
4143
|
<Dialog
|
|
4132
|
-
:open="showEmbedModal" :title="
|
|
4144
|
+
:open="showEmbedModal" :title="editingExistingEmbed() ? 'Edit Embed' : 'Insert Embed'"
|
|
4133
4145
|
width="m" @update:open="showEmbedModal = $event"
|
|
4134
4146
|
>
|
|
4135
4147
|
<TextInput
|
|
@@ -4145,11 +4157,11 @@ const imgTransform = computed({
|
|
|
4145
4157
|
<div class="flex gap-05 w-100">
|
|
4146
4158
|
<Btn value="Cancel" flat thin @click="showEmbedModal = false" />
|
|
4147
4159
|
<Btn
|
|
4148
|
-
v-if="
|
|
4160
|
+
v-if="editingExistingEmbed()" value="Delete Embed" color="red" flat thin icon="delete"
|
|
4149
4161
|
@click="deleteEmbed"
|
|
4150
4162
|
/>
|
|
4151
4163
|
<Btn
|
|
4152
|
-
:value="
|
|
4164
|
+
:value="editingExistingEmbed() ? 'Save Changes' : 'Insert Embed'"
|
|
4153
4165
|
:disabled="!embedForm.src" class="ms-auto" @click="submitEmbed"
|
|
4154
4166
|
/>
|
|
4155
4167
|
</div>
|
|
@@ -4157,7 +4169,7 @@ const imgTransform = computed({
|
|
|
4157
4169
|
</Dialog>
|
|
4158
4170
|
<!-- Video Modal -->
|
|
4159
4171
|
<Dialog
|
|
4160
|
-
:open="showVideoModal" :title="
|
|
4172
|
+
:open="showVideoModal" :title="editingExistingVideo() ? 'Edit Video' : 'Insert Video'"
|
|
4161
4173
|
width="m" @update:open="showVideoModal = $event"
|
|
4162
4174
|
>
|
|
4163
4175
|
<div class="grid gap-0">
|
|
@@ -4236,11 +4248,11 @@ const imgTransform = computed({
|
|
|
4236
4248
|
<div class="flex gap-05 w-100 m_column">
|
|
4237
4249
|
<Btn value="Cancel" flat thin full-width-mobile @click="showVideoModal = false" />
|
|
4238
4250
|
<Btn
|
|
4239
|
-
v-if="
|
|
4251
|
+
v-if="editingExistingVideo()" value="Delete Video" color="red" flat thin icon="delete"
|
|
4240
4252
|
full-width-mobile @click="deleteVideo"
|
|
4241
4253
|
/>
|
|
4242
4254
|
<Btn
|
|
4243
|
-
:value="
|
|
4255
|
+
:value="editingExistingVideo() ? 'Save Video' : 'Insert Video'" class="ms-auto m_ms-0" full-width-mobile :disabled="!videoForm.src || !isValidVideoUrl(videoForm.src)"
|
|
4244
4256
|
@click="submitVideo"
|
|
4245
4257
|
/>
|
|
4246
4258
|
</div>
|
|
@@ -4250,7 +4262,7 @@ const imgTransform = computed({
|
|
|
4250
4262
|
<!-- Keep the table editor in the document top layer, including while the rich-text editor is fullscreen. -->
|
|
4251
4263
|
<Teleport to="body">
|
|
4252
4264
|
<Dialog
|
|
4253
|
-
:open="showTableEditor" :title="
|
|
4265
|
+
:open="showTableEditor" :title="editingExistingTable() ? 'Edit Table' : 'Insert Table'"
|
|
4254
4266
|
width="l" @update:open="showTableEditor = $event"
|
|
4255
4267
|
>
|
|
4256
4268
|
<template #default>
|
|
@@ -4415,11 +4427,11 @@ const imgTransform = computed({
|
|
|
4415
4427
|
<template #footer>
|
|
4416
4428
|
<Btn value="Cancel" flat thin @click="showTableEditor = false" />
|
|
4417
4429
|
<Btn
|
|
4418
|
-
v-if="
|
|
4430
|
+
v-if="editingExistingTable()" value="Delete Table" color="red" flat thin icon="delete"
|
|
4419
4431
|
@click="deleteTable"
|
|
4420
4432
|
/>
|
|
4421
4433
|
<Btn
|
|
4422
|
-
:value="
|
|
4434
|
+
:value="editingExistingTable() ? 'Save' : 'Insert Table'" class="ms-auto"
|
|
4423
4435
|
@click="submitTable"
|
|
4424
4436
|
/>
|
|
4425
4437
|
</template>
|
|
@@ -60,7 +60,6 @@ const getValue = (option?: Option): Primitive | undefined => getOptionValue(opti
|
|
|
60
60
|
const selectedItemCount = computed(() => selectedItems.value.length)
|
|
61
61
|
const searchTerm = ref<string>('')
|
|
62
62
|
|
|
63
|
-
const dropdown = ref<InstanceType<typeof Dropdown> | undefined>()
|
|
64
63
|
const selected = ref(false)
|
|
65
64
|
const open = ref(false)
|
|
66
65
|
const selectPlaceholder = computed(() => resolveI18n(props.placeholder) ?? $t('select.placeholder'))
|
|
@@ -294,7 +293,7 @@ onMounted(() => {
|
|
|
294
293
|
|
|
295
294
|
<template>
|
|
296
295
|
<Dropdown
|
|
297
|
-
|
|
296
|
+
v-model:shown="open" :placement="placement" class="bagel-input selectinput"
|
|
298
297
|
:class="[shellClass, { 'has-error': !!error, underlined, open, 'has-value': selectedItemCount > 0 }]"
|
|
299
298
|
:style="shellStyle" no-auto-focus
|
|
300
299
|
@click.stop
|
|
@@ -20,7 +20,6 @@ const props = withDefaults(
|
|
|
20
20
|
)
|
|
21
21
|
const emits = defineEmits(['update:modelValue'])
|
|
22
22
|
let bagel: any
|
|
23
|
-
let api: any
|
|
24
23
|
const listRef = ref(props.modelValue)
|
|
25
24
|
const fieldMeta = props.meta.doc_meta.fields.find(
|
|
26
25
|
(field: { [key: string]: any }) => field.fieldname === props.fieldname,
|
|
@@ -29,9 +28,9 @@ const entityMeta = props.meta.links.find(
|
|
|
29
28
|
(link: { [key: string]: any }) => link.id === fieldMeta?.options,
|
|
30
29
|
)
|
|
31
30
|
|
|
32
|
-
function handleUpdateModelValue(value: any, index: number, fieldname: string) {
|
|
31
|
+
function handleUpdateModelValue(value: any, index: number | string, fieldname: string) {
|
|
33
32
|
const rows = [...props.modelValue]
|
|
34
|
-
rows[index][fieldname] = value
|
|
33
|
+
rows[Number(index)][fieldname] = value
|
|
35
34
|
emits('update:modelValue', rows)
|
|
36
35
|
}
|
|
37
36
|
|
|
@@ -53,9 +52,9 @@ function addRow() {
|
|
|
53
52
|
emits('update:modelValue', rows)
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
function removeRow(idx: number) {
|
|
55
|
+
function removeRow(idx: number | string) {
|
|
57
56
|
const rows = [...props.modelValue]
|
|
58
|
-
rows.splice(idx, 1)
|
|
57
|
+
rows.splice(Number(idx), 1)
|
|
59
58
|
emits('update:modelValue', rows)
|
|
60
59
|
}
|
|
61
60
|
|
|
@@ -68,7 +67,7 @@ function ended() {
|
|
|
68
67
|
const { shellClass, shellStyle } = useBagelInputShell(props)
|
|
69
68
|
|
|
70
69
|
onMounted(() => {
|
|
71
|
-
bagel = props.bagelApp
|
|
70
|
+
bagel = props.bagelApp
|
|
72
71
|
})
|
|
73
72
|
</script>
|
|
74
73
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { IconType } from '../../Icon/types'
|
|
3
|
-
import type { Option } from '../../../types'
|
|
3
|
+
import type { Option, ValidateInputBaseT } from '../../../types'
|
|
4
4
|
import { useDebounceFn } from '@vueuse/core'
|
|
5
5
|
import { computed, onMounted, ref, watch, nextTick, useId } from 'vue'
|
|
6
6
|
import Card from '../../Card.vue'
|
|
@@ -21,7 +21,7 @@ export interface TextInputProps {
|
|
|
21
21
|
maxWidth?: string
|
|
22
22
|
labelColor?: string
|
|
23
23
|
labelActiveColor?: string
|
|
24
|
-
validate?:
|
|
24
|
+
validate?: ValidateInputBaseT['validate']
|
|
25
25
|
getFormData?: () => any
|
|
26
26
|
id?: string
|
|
27
27
|
title?: string
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"experimentalGenTypedRoutes.d.ts","sourceRoot":"","sources":["../../bin/experimentalGenTypedRoutes.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;IAC5C,aAAa,EAAE,MAAM,CAAA;CACrB"}
|