@bagelink/vue 0.0.1147 → 0.0.1155
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/common-C_IH8b5S.cjs +12580 -0
- package/dist/common-DoeNgx31.js +12579 -0
- package/dist/components/AddressSaerch.vue.d.ts +7 -0
- package/dist/components/AddressSaerch.vue.d.ts.map +1 -0
- package/dist/components/ComboBox.vue.d.ts +3 -3
- package/dist/components/Comments.vue.d.ts +2 -2
- package/dist/components/ContactSubmissions.vue.d.ts +2 -2
- package/dist/components/DataPreview.vue.d.ts +12 -35
- package/dist/components/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/useTableData.d.ts +10 -2
- package/dist/components/DataTable/useTableData.d.ts.map +1 -1
- package/dist/components/Draggable/Draggable.vue.d.ts +45 -0
- package/dist/components/Draggable/Draggable.vue.d.ts.map +1 -0
- package/dist/components/Draggable/index.d.ts +5 -0
- package/dist/components/Draggable/index.d.ts.map +1 -0
- package/dist/components/Draggable/useDraggable.d.ts +31 -0
- package/dist/components/Draggable/useDraggable.d.ts.map +1 -0
- package/dist/components/Draggable/vDraggable.d.ts +4 -0
- package/dist/components/Draggable/vDraggable.d.ts.map +1 -0
- package/dist/components/FormSchema.vue.d.ts +4 -5
- package/dist/components/LangText.vue.d.ts +2 -2
- package/dist/components/ListView.vue.d.ts.map +1 -1
- package/dist/components/ModalBglForm.vue.d.ts +20 -21
- package/dist/components/PersonPreview.vue.d.ts +4 -5
- package/dist/components/PersonPreviewFormkit.vue.d.ts +3 -4
- package/dist/components/Popover.vue.d.ts +10 -0
- package/dist/components/Popover.vue.d.ts.map +1 -0
- package/dist/components/RTXEditor.vue.d.ts +3 -3
- package/dist/components/TabbedLayout.vue.d.ts +4 -5
- package/dist/components/TableSchema.vue.d.ts +2 -2
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/charts/BarChart.vue.d.ts +2 -2
- package/dist/components/form/BagelForm.vue.d.ts.map +1 -1
- package/dist/components/form/FieldArray.vue.d.ts.map +1 -1
- package/dist/components/form/ItemRef.vue.d.ts +3 -5
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/MaterialIcon.vue.d.ts +3 -4
- package/dist/components/form/PlainInputField.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +0 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/inputs/CurrencyInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DatetimeInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DurationInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DynamicLinkField.vue.d.ts +3 -3
- package/dist/components/form/inputs/EmailInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/FloatInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/IntInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/LinkField.vue.d.ts +3 -3
- package/dist/components/form/inputs/Password.vue.d.ts +3 -3
- package/dist/components/form/inputs/PlainText.vue.d.ts +3 -3
- package/dist/components/form/inputs/ReadOnlyInput.vue.d.ts +2 -2
- package/dist/components/form/inputs/RichText/Toolbar.vue.d.ts +14 -0
- package/dist/components/form/inputs/RichText/Toolbar.vue.d.ts.map +1 -0
- package/dist/components/form/inputs/RichText/formatting.d.ts +11 -0
- package/dist/components/form/inputs/RichText/formatting.d.ts.map +1 -0
- package/dist/components/form/inputs/RichText/richtext-types.d.ts +3 -0
- package/dist/components/form/inputs/RichText/richtext-types.d.ts.map +1 -0
- package/dist/components/form/inputs/RichText2/Toolbar.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText2/index.vue.d.ts +0 -1
- package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichTextEditor.vue.d.ts +3 -3
- package/dist/components/form/inputs/SelectField.vue.d.ts +8 -6
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +4 -4
- package/dist/components/form/inputs/TextArea.vue.d.ts +3 -3
- package/dist/components/form/inputs/TextInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Upload/UploadFile.vue.d.ts +86 -0
- package/dist/components/form/inputs/Upload/UploadFile.vue.d.ts.map +1 -0
- package/dist/components/formkit/AddressArray.vue.d.ts +2 -2
- package/dist/components/formkit/BankDetailsArray.vue.d.ts +2 -2
- package/dist/components/formkit/ContactArrayFormKit.vue.d.ts +2 -2
- package/dist/components/formkit/FileUploader.vue.d.ts +2 -2
- package/dist/components/formkit/MiscFields.vue.d.ts +2 -2
- package/dist/components/formkit/Toggle.vue.d.ts +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layout/Layout.vue.d.ts +1 -1
- package/dist/components/layout/Layout.vue.d.ts.map +1 -1
- package/dist/components/sortable/Animation.d.ts +43 -0
- package/dist/components/sortable/Animation.d.ts.map +1 -0
- package/dist/components/sortable/BrowserInfo.d.ts +7 -0
- package/dist/components/sortable/BrowserInfo.d.ts.map +1 -0
- package/dist/components/sortable/EventDispatcher.d.ts +13 -0
- package/dist/components/sortable/EventDispatcher.d.ts.map +1 -0
- package/dist/components/sortable/PluginManager.d.ts +27 -0
- package/dist/components/sortable/PluginManager.d.ts.map +1 -0
- package/dist/components/sortable/Sortable.d.ts +81 -0
- package/dist/components/sortable/Sortable.d.ts.map +1 -0
- package/dist/components/sortable/index.d.ts +5 -0
- package/dist/components/sortable/index.d.ts.map +1 -0
- package/dist/components/sortable/utils.d.ts +49 -0
- package/dist/components/sortable/utils.d.ts.map +1 -0
- package/dist/components/whatsapp/form/MsgTemplate.vue.d.ts +3 -4
- package/dist/components/whatsapp/form/TextVariableExamples.vue.d.ts +2 -2
- package/dist/composables/drag-n-drop/useDraggable.d.ts +2 -0
- package/dist/composables/drag-n-drop/useDraggable.d.ts.map +1 -0
- package/dist/composables/useSchemaField.d.ts +15 -0
- package/dist/composables/useSchemaField.d.ts.map +1 -0
- package/dist/editor-CUDRLdmS.js +4 -0
- package/dist/editor-Cu374vEW.cjs +4 -0
- package/dist/editor-a8DSbb6P.js +4 -0
- package/dist/editor-xBt_vIha.cjs +4 -0
- package/dist/heic2any-8wMqMfB_.js +933 -0
- package/dist/heic2any-BrqcNzfV.js +935 -0
- package/dist/heic2any-C8KwH72N.cjs +934 -0
- package/dist/heic2any-k9wDCKka.cjs +932 -0
- package/dist/index-DiG-xM9T.cjs +35016 -0
- package/dist/index-nGuSAiY2.js +35017 -0
- package/dist/index.cjs +1322 -884
- package/dist/index.mjs +1324 -886
- package/dist/plugins/drag-n-drop/draggable.d.ts +4 -0
- package/dist/plugins/drag-n-drop/draggable.d.ts.map +1 -0
- package/dist/plugins/drag-n-drop/droppable.d.ts +4 -0
- package/dist/plugins/drag-n-drop/droppable.d.ts.map +1 -0
- package/dist/plugins/drag-n-drop/index.d.ts +5 -0
- package/dist/plugins/drag-n-drop/index.d.ts.map +1 -0
- package/dist/plugins/drag-n-drop/useDraggable.d.ts +8 -0
- package/dist/plugins/drag-n-drop/useDraggable.d.ts.map +1 -0
- package/dist/plugins/drag-n-drop/useDroppable.d.ts +7 -0
- package/dist/plugins/drag-n-drop/useDroppable.d.ts.map +1 -0
- package/dist/style.css +186 -208
- package/dist/types/materialIcon.d.ts +2 -0
- package/dist/types/materialIcon.d.ts.map +1 -0
- package/dist/utils/objects.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/DataPreview.vue +45 -116
- package/src/components/DataTable/DataTable.vue +18 -12
- package/src/components/DataTable/useTableData.ts +50 -16
- package/src/components/Draggable/Draggable.vue +64 -0
- package/src/components/Draggable/index.ts +4 -0
- package/src/components/Draggable/useDraggable.ts +632 -0
- package/src/components/Draggable/vDraggable.ts +17 -0
- package/src/components/ListView.vue +6 -2
- package/src/components/Pill.vue +1 -1
- package/src/components/form/BagelForm.vue +16 -101
- package/src/components/form/FieldArray.vue +21 -3
- package/src/components/form/index.ts +0 -1
- package/src/components/form/inputs/TextInput.vue +5 -5
- package/src/components/index.ts +5 -1
- package/src/composables/useSchemaField.ts +193 -0
- package/src/styles/text.css +15 -11
- package/dist/components/Accordion.d.ts +0 -12
- package/dist/components/Accordion.d.ts.map +0 -1
- package/dist/components/AccordionItem.d.ts +0 -34
- package/dist/components/AccordionItem.d.ts.map +0 -1
- package/dist/components/Alert.d.ts +0 -34
- package/dist/components/Alert.d.ts.map +0 -1
- package/dist/components/Avatar.d.ts +0 -36
- package/dist/components/Avatar.d.ts.map +0 -1
- package/dist/components/Badge.d.ts +0 -22
- package/dist/components/Badge.d.ts.map +0 -1
- package/dist/components/BglVideo.d.ts +0 -20
- package/dist/components/BglVideo.d.ts.map +0 -1
- package/dist/components/Btn.d.ts +0 -99
- package/dist/components/Btn.d.ts.map +0 -1
- package/dist/components/Card.d.ts +0 -39
- package/dist/components/Card.d.ts.map +0 -1
- package/dist/components/Carousel.d.ts +0 -74
- package/dist/components/Carousel.d.ts.map +0 -1
- package/dist/components/DataPreview.d.ts +0 -42
- package/dist/components/DataPreview.d.ts.map +0 -1
- package/dist/components/Drop.vue.d.ts +0 -34
- package/dist/components/Drop.vue.d.ts.map +0 -1
- package/dist/components/FileUploader.vue.d.ts +0 -60
- package/dist/components/FileUploader.vue.d.ts.map +0 -1
- package/dist/components/Flag.d.ts +0 -20
- package/dist/components/Flag.d.ts.map +0 -1
- package/dist/components/ListItem.d.ts +0 -34
- package/dist/components/ListItem.d.ts.map +0 -1
- package/dist/components/ListView.d.ts +0 -13
- package/dist/components/ListView.d.ts.map +0 -1
- package/dist/components/MapEmbed.d.ts +0 -3
- package/dist/components/MapEmbed.d.ts.map +0 -1
- package/dist/components/MaterialIcon.d.ts +0 -26
- package/dist/components/MaterialIcon.d.ts.map +0 -1
- package/dist/components/Modal.d.ts +0 -46
- package/dist/components/Modal.d.ts.map +0 -1
- package/dist/components/ModalConfirm.d.ts +0 -24
- package/dist/components/ModalConfirm.d.ts.map +0 -1
- package/dist/components/ModalForm.d.ts +0 -78
- package/dist/components/ModalForm.d.ts.map +0 -1
- package/dist/components/NavBar.d.ts +0 -64
- package/dist/components/NavBar.d.ts.map +0 -1
- package/dist/components/PageTitle.d.ts +0 -24
- package/dist/components/PageTitle.d.ts.map +0 -1
- package/dist/components/RouterWrapper.d.ts +0 -3
- package/dist/components/RouterWrapper.d.ts.map +0 -1
- package/dist/components/TableSchema.d.ts +0 -35
- package/dist/components/TableSchema.d.ts.map +0 -1
- package/dist/components/Title.d.ts +0 -42
- package/dist/components/Title.d.ts.map +0 -1
- package/dist/components/TopBar.d.ts +0 -12
- package/dist/components/TopBar.d.ts.map +0 -1
- package/dist/components/dashboard/Lineart.d.ts +0 -20
- package/dist/components/dashboard/Lineart.d.ts.map +0 -1
- package/dist/components/form/BglField.d.ts +0 -25
- package/dist/components/form/BglField.d.ts.map +0 -1
- package/dist/components/form/BglForm.d.ts +0 -75
- package/dist/components/form/BglForm.d.ts.map +0 -1
- package/dist/components/form/inputs/CheckInput.d.ts +0 -56
- package/dist/components/form/inputs/CheckInput.d.ts.map +0 -1
- package/dist/components/form/inputs/Checkbox.d.ts +0 -16
- package/dist/components/form/inputs/Checkbox.d.ts.map +0 -1
- package/dist/components/form/inputs/ColorPicker.d.ts +0 -48
- package/dist/components/form/inputs/ColorPicker.d.ts.map +0 -1
- package/dist/components/form/inputs/DateInput.d.ts +0 -64
- package/dist/components/form/inputs/DateInput.d.ts.map +0 -1
- package/dist/components/form/inputs/DatePicker.d.ts +0 -33
- package/dist/components/form/inputs/DatePicker.d.ts.map +0 -1
- package/dist/components/form/inputs/FileUpload.d.ts +0 -108
- package/dist/components/form/inputs/FileUpload.d.ts.map +0 -1
- package/dist/components/form/inputs/JSONInput.d.ts +0 -53
- package/dist/components/form/inputs/JSONInput.d.ts.map +0 -1
- package/dist/components/form/inputs/RadioGroup.d.ts +0 -42
- package/dist/components/form/inputs/RadioGroup.d.ts.map +0 -1
- package/dist/components/form/inputs/RadioPillsInput.d.ts +0 -48
- package/dist/components/form/inputs/RadioPillsInput.d.ts.map +0 -1
- package/dist/components/form/inputs/RichText.d.ts +0 -20
- package/dist/components/form/inputs/RichText.d.ts.map +0 -1
- package/dist/components/form/inputs/RichText2/Toolbar.d.ts +0 -22
- package/dist/components/form/inputs/RichText2/Toolbar.d.ts.map +0 -1
- package/dist/components/form/inputs/RichText2/index.d.ts +0 -24
- package/dist/components/form/inputs/RichText2/index.d.ts.map +0 -1
- package/dist/components/form/inputs/SelectInput.d.ts +0 -55
- package/dist/components/form/inputs/SelectInput.d.ts.map +0 -1
- package/dist/components/form/inputs/SignaturePad.d.ts +0 -72
- package/dist/components/form/inputs/SignaturePad.d.ts.map +0 -1
- package/dist/components/form/inputs/TableField.d.ts +0 -45
- package/dist/components/form/inputs/TableField.d.ts.map +0 -1
- package/dist/components/form/inputs/TelInput.d.ts +0 -241
- package/dist/components/form/inputs/TelInput.d.ts.map +0 -1
- package/dist/components/form/inputs/TextInput.d.ts +0 -90
- package/dist/components/form/inputs/TextInput.d.ts.map +0 -1
- package/dist/components/form/inputs/ToggleInput.d.ts +0 -58
- package/dist/components/form/inputs/ToggleInput.d.ts.map +0 -1
- package/dist/components/layout/BottomMenu.d.ts +0 -27
- package/dist/components/layout/BottomMenu.d.ts.map +0 -1
- package/dist/components/layout/Layout.d.ts +0 -58
- package/dist/components/layout/Layout.d.ts.map +0 -1
- package/dist/components/layout/SidebarMenu.d.ts +0 -38
- package/dist/components/layout/SidebarMenu.d.ts.map +0 -1
- package/dist/components/layout/TabbedLayout.d.ts +0 -42
- package/dist/components/layout/TabbedLayout.d.ts.map +0 -1
- package/dist/components/layout/Tabs.d.ts +0 -31
- package/dist/components/layout/Tabs.d.ts.map +0 -1
- package/dist/components/layout/TabsBody.d.ts +0 -23
- package/dist/components/layout/TabsBody.d.ts.map +0 -1
- package/dist/components/layout/TabsNav.d.ts +0 -35
- package/dist/components/layout/TabsNav.d.ts.map +0 -1
- package/dist/styles.css +0 -14073
- package/dist/vue.css +0 -14073
- package/src/components/form/BglField.vue +0 -132
- package/src/components/form/BglForm.vue +0 -157
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { BglFormSchemaT, BglFormSchemaFnT, Field } from '@bagelink/vue'
|
|
3
3
|
import type { VNode } from 'vue'
|
|
4
|
-
import { BglForm, CheckInput, DateInput, FieldArray, FileUpload, NumberInput, RichText, SelectInput, TabsNav, TextInput, ToggleInput, UploadInput } from '@bagelink/vue'
|
|
5
4
|
import { h, watch } from 'vue'
|
|
5
|
+
import { useSchemaField } from '../../composables/useSchemaField'
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
modelValue: Record<string, any>
|
|
@@ -39,30 +39,6 @@ const isDirty = $computed(() => {
|
|
|
39
39
|
return current !== initial
|
|
40
40
|
})
|
|
41
41
|
|
|
42
|
-
function getComponent(field: Field) {
|
|
43
|
-
const componentMap = {
|
|
44
|
-
text: TextInput,
|
|
45
|
-
textarea: TextInput,
|
|
46
|
-
number: NumberInput,
|
|
47
|
-
array: FieldArray,
|
|
48
|
-
select: SelectInput,
|
|
49
|
-
toggle: ToggleInput,
|
|
50
|
-
check: CheckInput,
|
|
51
|
-
richtext: RichText,
|
|
52
|
-
upload: UploadInput,
|
|
53
|
-
file: FileUpload,
|
|
54
|
-
date: DateInput,
|
|
55
|
-
tabs: TabsNav,
|
|
56
|
-
bglform: BglForm
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (field.$el === 'textarea' && !field.attrs?.multiline) {
|
|
60
|
-
field.attrs = { ...field.attrs, multiline: true }
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return componentMap[field.$el as keyof typeof componentMap] ?? field.$el ?? 'div'
|
|
64
|
-
}
|
|
65
|
-
|
|
66
42
|
function updateFormData(fieldId: string, value: any) {
|
|
67
43
|
formData = {
|
|
68
44
|
...formData,
|
|
@@ -76,82 +52,6 @@ function handleSubmit() {
|
|
|
76
52
|
initialFormData = { ...formData }
|
|
77
53
|
}
|
|
78
54
|
|
|
79
|
-
function renderSchemaField(field: Field): VNode | null {
|
|
80
|
-
const Component = getComponent(field)
|
|
81
|
-
if (!Component) return null
|
|
82
|
-
|
|
83
|
-
// Check if this field should be rendered based on v-if conditions
|
|
84
|
-
if (!shouldRenderField(field)) return null
|
|
85
|
-
|
|
86
|
-
const {
|
|
87
|
-
$el,
|
|
88
|
-
vIf,
|
|
89
|
-
'v-if': vIf2,
|
|
90
|
-
children,
|
|
91
|
-
options,
|
|
92
|
-
attrs,
|
|
93
|
-
class: fieldClass,
|
|
94
|
-
id,
|
|
95
|
-
onUpdate,
|
|
96
|
-
// Common form field props that need special handling
|
|
97
|
-
required,
|
|
98
|
-
label,
|
|
99
|
-
placeholder,
|
|
100
|
-
disabled,
|
|
101
|
-
...fieldProps
|
|
102
|
-
} = field
|
|
103
|
-
|
|
104
|
-
const currentValue = field.id ? formData[field.id] : undefined
|
|
105
|
-
|
|
106
|
-
const props: Record<string, any> = {
|
|
107
|
-
...fieldProps,
|
|
108
|
-
required,
|
|
109
|
-
label,
|
|
110
|
-
placeholder,
|
|
111
|
-
disabled,
|
|
112
|
-
'modelValue': currentValue,
|
|
113
|
-
'onUpdate:modelValue': (value: any) => {
|
|
114
|
-
if (!field.id) return
|
|
115
|
-
updateFormData(field.id, value)
|
|
116
|
-
field.onUpdate?.(value, formData)
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// Remove undefined props to avoid vue warnings
|
|
121
|
-
Object.keys(props).forEach(key => props[key] === undefined && delete props[key])
|
|
122
|
-
|
|
123
|
-
// Add options if they exist in the field
|
|
124
|
-
if (field.options) {
|
|
125
|
-
props.options = typeof field.options === 'function'
|
|
126
|
-
? field.options(formData[field.id as string], formData)
|
|
127
|
-
: field.options
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Handle dynamic props
|
|
131
|
-
if (field.attrs) {
|
|
132
|
-
Object.entries(field.attrs).forEach(([key, value]) => {
|
|
133
|
-
props[key] = typeof value === 'function' ? value(formData[field.id as string], formData) : value
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (field.class) {
|
|
138
|
-
props.class = typeof field.class === 'function'
|
|
139
|
-
? field.class(formData[field.id as string], formData)
|
|
140
|
-
: field.class
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const slots = field.children?.length
|
|
144
|
-
? {
|
|
145
|
-
default: () => field.children!
|
|
146
|
-
.map(child => typeof child === 'string' ? child : renderSchemaField(child))
|
|
147
|
-
.filter(Boolean),
|
|
148
|
-
...field.slots
|
|
149
|
-
}
|
|
150
|
-
: field.slots
|
|
151
|
-
|
|
152
|
-
return h(Component as any, props, slots)
|
|
153
|
-
}
|
|
154
|
-
|
|
155
55
|
function shouldRenderField(field: Field): boolean {
|
|
156
56
|
const condition = field.vIf ?? field['v-if']
|
|
157
57
|
if (condition === undefined) return true
|
|
@@ -165,6 +65,21 @@ function validateForm() {
|
|
|
165
65
|
return form.reportValidity()
|
|
166
66
|
}
|
|
167
67
|
|
|
68
|
+
const { renderField } = useSchemaField<Record<string, any>>({
|
|
69
|
+
mode: 'form',
|
|
70
|
+
getRowData: () => formData,
|
|
71
|
+
onUpdate: (field, value) => {
|
|
72
|
+
if (!field.id) return
|
|
73
|
+
updateFormData(field.id, value)
|
|
74
|
+
field.onUpdate?.(value, formData)
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
function renderSchemaField(field: Field): VNode | null {
|
|
79
|
+
if (!shouldRenderField(field)) return null
|
|
80
|
+
return renderField(field)
|
|
81
|
+
}
|
|
82
|
+
|
|
168
83
|
defineExpose({ form, isDirty, validateForm })
|
|
169
84
|
</script>
|
|
170
85
|
|
|
@@ -7,7 +7,8 @@ import type {
|
|
|
7
7
|
BglFormSchemaFnT,
|
|
8
8
|
Field,
|
|
9
9
|
} from '@bagelink/vue'
|
|
10
|
-
import {
|
|
10
|
+
import { BagelForm, Btn } from '@bagelink/vue'
|
|
11
|
+
import { useSchemaField } from '../../composables/useSchemaField'
|
|
11
12
|
|
|
12
13
|
const props = withDefaults(
|
|
13
14
|
defineProps<{
|
|
@@ -70,6 +71,18 @@ const computedField = $computed(
|
|
|
70
71
|
$el: props.el,
|
|
71
72
|
}) as Field<T>
|
|
72
73
|
) as Field<Record<string, any>>
|
|
74
|
+
|
|
75
|
+
const { renderField } = useSchemaField<Record<string, any>>({
|
|
76
|
+
mode: 'form',
|
|
77
|
+
getRowData: () => data,
|
|
78
|
+
onUpdate: (field, value) => {
|
|
79
|
+
if (!field.id) return
|
|
80
|
+
const index = Number.parseInt(field.id)
|
|
81
|
+
if (Number.isNaN(index)) return
|
|
82
|
+
data[index] = value
|
|
83
|
+
emitValue()
|
|
84
|
+
}
|
|
85
|
+
})
|
|
73
86
|
</script>
|
|
74
87
|
|
|
75
88
|
<template>
|
|
@@ -80,7 +93,7 @@ const computedField = $computed(
|
|
|
80
93
|
|
|
81
94
|
<div v-if="schema" class="ps-025 border-start">
|
|
82
95
|
<div v-for="(_, i) in data" :key="i" outline thin class="mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden">
|
|
83
|
-
<
|
|
96
|
+
<BagelForm v-model="data[i]" :schema="schema" @update:model-value="emitValue" />
|
|
84
97
|
<div class="bg-gray-80 -my-05 px-025 pt-065 txt-center">
|
|
85
98
|
<Btn
|
|
86
99
|
v-if="props.delete"
|
|
@@ -97,7 +110,12 @@ const computedField = $computed(
|
|
|
97
110
|
</Btn>
|
|
98
111
|
</div>
|
|
99
112
|
<template v-else>
|
|
100
|
-
<
|
|
113
|
+
<component
|
|
114
|
+
:is="renderField({ ...computedField, id: String(i) })"
|
|
115
|
+
v-for="(_, i) in data"
|
|
116
|
+
:key="i"
|
|
117
|
+
@update:model-value="emitValue"
|
|
118
|
+
/>
|
|
101
119
|
</template>
|
|
102
120
|
</div>
|
|
103
121
|
</template>
|
|
@@ -28,7 +28,7 @@ const props = withDefaults(
|
|
|
28
28
|
multiline?: boolean
|
|
29
29
|
autoheight?: boolean
|
|
30
30
|
code?: boolean
|
|
31
|
-
|
|
31
|
+
rows?: number | string
|
|
32
32
|
autocomplete?: AutoFillField
|
|
33
33
|
autofocus?: boolean
|
|
34
34
|
onFocusout?: (e: FocusEvent) => void
|
|
@@ -43,9 +43,9 @@ let inputVal = $ref<string | number>()
|
|
|
43
43
|
|
|
44
44
|
const input = $ref<HTMLInputElement>()
|
|
45
45
|
|
|
46
|
-
const
|
|
47
|
-
if (props.
|
|
48
|
-
if (props.
|
|
46
|
+
const inputRows = $computed(() => {
|
|
47
|
+
if (props.autoheight) return `${inputVal}`.split('\n').length || props.rows || 1
|
|
48
|
+
if (props.rows) return props.rows
|
|
49
49
|
if (props.multiline || props.code) return 4
|
|
50
50
|
return 1
|
|
51
51
|
})
|
|
@@ -115,7 +115,7 @@ onMounted(() => {
|
|
|
115
115
|
v-model="inputVal"
|
|
116
116
|
:title
|
|
117
117
|
:type
|
|
118
|
-
:rows
|
|
118
|
+
:rows="inputRows"
|
|
119
119
|
:placeholder="placeholder || label"
|
|
120
120
|
:disabled
|
|
121
121
|
:required
|
package/src/components/index.ts
CHANGED
|
@@ -12,7 +12,9 @@ export { default as Carousel } from './Carousel.vue'
|
|
|
12
12
|
export * from './dashboard'
|
|
13
13
|
export { default as DataPreview } from './DataPreview.vue'
|
|
14
14
|
export { default as DataTable } from './DataTable/DataTable.vue'
|
|
15
|
+
/** @deprecated Use DataTable instead of TableSchema. They are the same component. */
|
|
15
16
|
export { default as TableSchema } from './DataTable/DataTable.vue'
|
|
17
|
+
export { Draggable, useDraggable, vDraggable } from './Draggable'
|
|
16
18
|
export { default as Dropdown } from './Dropdown.vue'
|
|
17
19
|
export { default as FieldSetVue } from './FieldSetVue.vue'
|
|
18
20
|
export { default as Flag } from './Flag.vue'
|
|
@@ -22,15 +24,16 @@ export { default as IframeVue } from './IframeVue.vue'
|
|
|
22
24
|
export { default as Image } from './Image.vue'
|
|
23
25
|
export * from './layout'
|
|
24
26
|
export { default as ListItem } from './ListItem.vue'
|
|
27
|
+
|
|
25
28
|
export { default as ListView } from './ListView.vue'
|
|
26
29
|
export { default as Loading } from './Loading.vue'
|
|
27
|
-
|
|
28
30
|
export { default as MapEmbed } from './MapEmbed.vue'
|
|
29
31
|
export { default as Modal } from './Modal.vue'
|
|
30
32
|
export { default as ModalConfirm } from './ModalConfirm.vue'
|
|
31
33
|
export { default as ModalForm } from './ModalForm.vue'
|
|
32
34
|
export { default as NavBar } from './NavBar.vue'
|
|
33
35
|
export { default as PageTitle } from './PageTitle.vue'
|
|
36
|
+
|
|
34
37
|
export { default as Pill } from './Pill.vue'
|
|
35
38
|
export { default as RouterWrapper } from './RouterWrapper.vue'
|
|
36
39
|
|
|
@@ -38,4 +41,5 @@ export { default as Title } from './Title.vue'
|
|
|
38
41
|
export { default as ToolBar } from './ToolBar.vue'
|
|
39
42
|
|
|
40
43
|
export { default as TopBar } from './TopBar.vue'
|
|
44
|
+
|
|
41
45
|
export { default as Zoomer } from './Zoomer.vue'
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import type { VNode } from 'vue'
|
|
2
|
+
import type { BaseBagelField } from '../types/BagelForm'
|
|
3
|
+
import {
|
|
4
|
+
TextInput,
|
|
5
|
+
NumberInput,
|
|
6
|
+
FieldArray,
|
|
7
|
+
SelectInput,
|
|
8
|
+
ToggleInput,
|
|
9
|
+
CheckInput,
|
|
10
|
+
RichText,
|
|
11
|
+
UploadInput,
|
|
12
|
+
FileUpload,
|
|
13
|
+
DateInput,
|
|
14
|
+
TabsNav,
|
|
15
|
+
BglForm,
|
|
16
|
+
bindAttrs,
|
|
17
|
+
classify,
|
|
18
|
+
keyToLabel
|
|
19
|
+
} from '@bagelink/vue'
|
|
20
|
+
import { h } from 'vue'
|
|
21
|
+
|
|
22
|
+
const SLOT_VALUE_COMPONENTS = new Set(['div', 'span', 'p'])
|
|
23
|
+
|
|
24
|
+
const SRC_VALUE_COMPONENTS = new Set(['img', 'iframe'])
|
|
25
|
+
|
|
26
|
+
export interface UseSchemaFieldOptions<T> {
|
|
27
|
+
mode?: 'form' | 'preview' | 'table'
|
|
28
|
+
getRowData?: () => T
|
|
29
|
+
onUpdate?: (field: BaseBagelField<T>, value: any) => void
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function useSchemaField<T extends Record<string, any>>(options: UseSchemaFieldOptions<T>) {
|
|
33
|
+
const { mode = 'form', getRowData, onUpdate } = options
|
|
34
|
+
|
|
35
|
+
function getComponent(field: BaseBagelField<T>) {
|
|
36
|
+
const componentMap = {
|
|
37
|
+
text: TextInput,
|
|
38
|
+
textarea: TextInput,
|
|
39
|
+
number: NumberInput,
|
|
40
|
+
array: FieldArray,
|
|
41
|
+
select: SelectInput,
|
|
42
|
+
toggle: ToggleInput,
|
|
43
|
+
check: CheckInput,
|
|
44
|
+
richtext: RichText,
|
|
45
|
+
upload: UploadInput,
|
|
46
|
+
file: FileUpload,
|
|
47
|
+
date: DateInput,
|
|
48
|
+
tabs: TabsNav,
|
|
49
|
+
form: BglForm
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (field.$el === 'textarea' && !field.attrs?.multiline) {
|
|
53
|
+
field.attrs = { ...field.attrs, multiline: true }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return typeof field.$el === 'object' ? field.$el : componentMap[field.$el as keyof typeof componentMap] ?? field.$el ?? 'div'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function renderField(
|
|
60
|
+
field: BaseBagelField<T>,
|
|
61
|
+
slots?: Record<string, (props: { row: T, field: BaseBagelField<T> }) => any>
|
|
62
|
+
): VNode | null {
|
|
63
|
+
const Component = getComponent(field)
|
|
64
|
+
if (!Component) return null
|
|
65
|
+
|
|
66
|
+
const rowData = getRowData?.() || {} as T
|
|
67
|
+
|
|
68
|
+
const {
|
|
69
|
+
$el,
|
|
70
|
+
children,
|
|
71
|
+
options,
|
|
72
|
+
attrs,
|
|
73
|
+
class: fieldClass,
|
|
74
|
+
id,
|
|
75
|
+
transform,
|
|
76
|
+
slots: fieldSlots,
|
|
77
|
+
required,
|
|
78
|
+
label,
|
|
79
|
+
placeholder,
|
|
80
|
+
disabled,
|
|
81
|
+
...fieldProps
|
|
82
|
+
} = field
|
|
83
|
+
|
|
84
|
+
const currentValue = field.id ? rowData[field.id as keyof T] : undefined
|
|
85
|
+
const transformedValue = transform ? transform(currentValue, rowData) : currentValue
|
|
86
|
+
|
|
87
|
+
// First bind any function attributes with the current value and row data
|
|
88
|
+
const boundFieldProps = bindAttrs(fieldProps, currentValue, rowData)
|
|
89
|
+
|
|
90
|
+
// Check if this component should receive value as slot
|
|
91
|
+
const isSlotValueComponent = typeof Component === 'string' && SLOT_VALUE_COMPONENTS.has(Component)
|
|
92
|
+
// Check if this component should receive value as src
|
|
93
|
+
const isSrcValueComponent = typeof Component === 'string' && SRC_VALUE_COMPONENTS.has(Component)
|
|
94
|
+
|
|
95
|
+
const props: Record<string, any> = {
|
|
96
|
+
...boundFieldProps,
|
|
97
|
+
required,
|
|
98
|
+
label,
|
|
99
|
+
placeholder,
|
|
100
|
+
disabled,
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// For form mode, always use the original value for modelValue
|
|
104
|
+
if (mode === 'form') {
|
|
105
|
+
props.modelValue = currentValue
|
|
106
|
+
props['onUpdate:modelValue'] = (value: any) => {
|
|
107
|
+
onUpdate?.(field, value)
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
// For display modes (table/preview), use transformed value based on component type
|
|
111
|
+
if (isSlotValueComponent) {
|
|
112
|
+
// Slot components don't need a value prop
|
|
113
|
+
} else if (isSrcValueComponent) {
|
|
114
|
+
props.src = transformedValue
|
|
115
|
+
} else {
|
|
116
|
+
props.modelValue = transformedValue
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Remove undefined props to avoid vue warnings
|
|
121
|
+
Object.keys(props).forEach(key => props[key] === undefined && delete props[key])
|
|
122
|
+
|
|
123
|
+
// Add options if they exist in the field
|
|
124
|
+
if (field.options) {
|
|
125
|
+
props.options = typeof field.options === 'function'
|
|
126
|
+
? field.options(currentValue, rowData)
|
|
127
|
+
: field.options
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Handle dynamic props and attrs
|
|
131
|
+
if (field.attrs) {
|
|
132
|
+
const boundAttrs = bindAttrs(field.attrs, currentValue, rowData)
|
|
133
|
+
Object.entries(boundAttrs).forEach(([key, value]) => {
|
|
134
|
+
if (typeof value === 'function') {
|
|
135
|
+
props[key] = value(currentValue, rowData)
|
|
136
|
+
} else {
|
|
137
|
+
props[key] = value
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Handle class binding last to ensure all transformations are applied
|
|
143
|
+
props.class = classify(currentValue, rowData, fieldClass, props.class)
|
|
144
|
+
|
|
145
|
+
// Handle component slots
|
|
146
|
+
const componentSlots: Record<string, any> = {}
|
|
147
|
+
|
|
148
|
+
// Add default slot if there are children
|
|
149
|
+
if (children?.length) {
|
|
150
|
+
componentSlots.default = () => children.map((child) => {
|
|
151
|
+
if (typeof child === 'string') return child
|
|
152
|
+
return renderField(child, slots)
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// For slot value components, add the transformed value as default slot content
|
|
157
|
+
if (isSlotValueComponent && transformedValue !== undefined) {
|
|
158
|
+
componentSlots.default = () => transformedValue?.toString() || ''
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Add any custom slots from the field
|
|
162
|
+
if (fieldSlots) {
|
|
163
|
+
Object.entries(fieldSlots).forEach(([name, slot]) => {
|
|
164
|
+
componentSlots[name] = typeof slot === 'function'
|
|
165
|
+
? () => slot(currentValue, rowData)
|
|
166
|
+
: () => slot
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Handle custom slot content from parent
|
|
171
|
+
const slotContent = field.id && slots?.[field.id]
|
|
172
|
+
? slots[field.id]({ row: rowData, field })
|
|
173
|
+
: undefined
|
|
174
|
+
|
|
175
|
+
if (mode === 'preview') {
|
|
176
|
+
return h('div', { class: 'preview-field' }, [
|
|
177
|
+
h('div', { class: 'field-label' }, field.label || keyToLabel(field.id || '')),
|
|
178
|
+
h('div', { class: 'field-value' }, [
|
|
179
|
+
slotContent || (typeof field.$el === 'object'
|
|
180
|
+
? h(Component as any, props, componentSlots)
|
|
181
|
+
: transformedValue?.toString() || '')
|
|
182
|
+
])
|
|
183
|
+
])
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return slotContent || h(Component as any, props, componentSlots)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
renderField,
|
|
191
|
+
getComponent
|
|
192
|
+
}
|
|
193
|
+
}
|
package/src/styles/text.css
CHANGED
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
font-size: 100px;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
|
|
118
117
|
.txt110,
|
|
119
118
|
.txt-110 {
|
|
120
119
|
font-size: 110px;
|
|
@@ -140,7 +139,6 @@
|
|
|
140
139
|
font-size: 150px;
|
|
141
140
|
}
|
|
142
141
|
|
|
143
|
-
|
|
144
142
|
.txt18,
|
|
145
143
|
.txt-18 {
|
|
146
144
|
font-size: 18px;
|
|
@@ -357,6 +355,18 @@
|
|
|
357
355
|
cursor: pointer;
|
|
358
356
|
}
|
|
359
357
|
|
|
358
|
+
.grab {
|
|
359
|
+
cursor: grab;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.grab:active {
|
|
363
|
+
cursor: grabbing;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.not-allowed {
|
|
367
|
+
cursor: not-allowed;
|
|
368
|
+
}
|
|
369
|
+
|
|
360
370
|
.decoration-none {
|
|
361
371
|
text-decoration: none;
|
|
362
372
|
}
|
|
@@ -387,7 +397,7 @@
|
|
|
387
397
|
}
|
|
388
398
|
|
|
389
399
|
.bgl_icon-font {
|
|
390
|
-
font-family:
|
|
400
|
+
font-family: 'Material Symbols Outlined', serif !important;
|
|
391
401
|
}
|
|
392
402
|
|
|
393
403
|
.nowrap {
|
|
@@ -406,9 +416,7 @@
|
|
|
406
416
|
white-space: nowrap;
|
|
407
417
|
}
|
|
408
418
|
|
|
409
|
-
|
|
410
419
|
@media screen and (max-width: 910px) {
|
|
411
|
-
|
|
412
420
|
.txt20,
|
|
413
421
|
.txt-20 {
|
|
414
422
|
font-size: 18px;
|
|
@@ -525,7 +533,6 @@
|
|
|
525
533
|
font-size: 72px;
|
|
526
534
|
}
|
|
527
535
|
|
|
528
|
-
|
|
529
536
|
.m_txt80,
|
|
530
537
|
.m_txt-80 {
|
|
531
538
|
font-size: 80px;
|
|
@@ -541,7 +548,6 @@
|
|
|
541
548
|
font-size: 100px;
|
|
542
549
|
}
|
|
543
550
|
|
|
544
|
-
|
|
545
551
|
.m_txt110,
|
|
546
552
|
.m_txt-110 {
|
|
547
553
|
font-size: 110px;
|
|
@@ -792,9 +798,8 @@
|
|
|
792
798
|
text-decoration: underline !important;
|
|
793
799
|
}
|
|
794
800
|
|
|
795
|
-
|
|
796
801
|
.m_bgl_icon-font {
|
|
797
|
-
font-family:
|
|
802
|
+
font-family: 'Material Symbols Outlined', serif;
|
|
798
803
|
}
|
|
799
804
|
|
|
800
805
|
.m_nowrap {
|
|
@@ -828,5 +833,4 @@
|
|
|
828
833
|
.m_capitalize {
|
|
829
834
|
text-transform: capitalize;
|
|
830
835
|
}
|
|
831
|
-
|
|
832
|
-
}
|
|
836
|
+
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
default?(_: {}): any;
|
|
3
|
-
};
|
|
4
|
-
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
|
|
5
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
6
|
-
export default _default;
|
|
7
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
8
|
-
new (): {
|
|
9
|
-
$slots: S;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=Accordion.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Accordion.vue"],"names":[],"mappings":"AAeA,iBAAS,cAAc;qBAoCM,GAAG;EAG/B;AAOD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
head?(_: {}): any;
|
|
3
|
-
default?(_: {}): any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
-
label?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
open?: boolean;
|
|
9
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
-
"update:open": (...args: any[]) => void;
|
|
11
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
-
label?: string;
|
|
13
|
-
id?: string;
|
|
14
|
-
open?: boolean;
|
|
15
|
-
}>>> & {
|
|
16
|
-
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
}, {}, {}>;
|
|
18
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
-
new (): {
|
|
31
|
-
$slots: S;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=AccordionItem.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/AccordionItem.vue"],"names":[],"mappings":"AAkDA,iBAAS,cAAc;kBA4II,GAAG;qBACA,GAAG;EAGhC;AAiBD,QAAA,MAAM,eAAe;YAMZ,MAAM;SACT,MAAM;WACJ,OAAO;;;;YAFN,MAAM;SACT,MAAM;WACJ,OAAO;;;UAGb,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { MaterialIcons } from '..';
|
|
2
|
-
|
|
3
|
-
interface Props {
|
|
4
|
-
message: string;
|
|
5
|
-
dismissable?: boolean;
|
|
6
|
-
type?: 'info' | 'warning' | 'error';
|
|
7
|
-
icon?: MaterialIcons | 'none';
|
|
8
|
-
}
|
|
9
|
-
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
10
|
-
type: string;
|
|
11
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
-
type: string;
|
|
13
|
-
}>>>, {
|
|
14
|
-
type: "info" | "warning" | "error";
|
|
15
|
-
}, {}>;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
-
} : {
|
|
22
|
-
type: import('vue').PropType<T[K]>;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type __VLS_WithDefaults<P, D> = {
|
|
27
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
-
default: D[K];
|
|
29
|
-
}> : P[K];
|
|
30
|
-
};
|
|
31
|
-
type __VLS_Prettify<T> = {
|
|
32
|
-
[K in keyof T]: T[K];
|
|
33
|
-
} & {};
|
|
34
|
-
//# sourceMappingURL=Alert.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.vue.d.ts","sourceRoot":"","sources":["../../src/components/Alert.vue"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAKlD,UAAU,KAAK;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;IACnC,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAA;CAC7B;;;;;;UAFO,MAAM,GAAG,SAAS,GAAG,OAAO;;AAoIpC,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
fallback?: string;
|
|
3
|
-
src?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
size?: number;
|
|
6
|
-
}>, {
|
|
7
|
-
size: number;
|
|
8
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
-
fallback?: string;
|
|
10
|
-
src?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
size?: number;
|
|
13
|
-
}>, {
|
|
14
|
-
size: number;
|
|
15
|
-
}>>>, {
|
|
16
|
-
size: number;
|
|
17
|
-
}, {}>;
|
|
18
|
-
export default _default;
|
|
19
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
-
} : {
|
|
24
|
-
type: import('vue').PropType<T[K]>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
type __VLS_WithDefaults<P, D> = {
|
|
29
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
30
|
-
default: D[K];
|
|
31
|
-
}> : P[K];
|
|
32
|
-
};
|
|
33
|
-
type __VLS_Prettify<T> = {
|
|
34
|
-
[K in keyof T]: T[K];
|
|
35
|
-
} & {};
|
|
36
|
-
//# sourceMappingURL=Avatar.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.vue.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.vue"],"names":[],"mappings":";eAqGY,MAAM;UACX,MAAM;WACL,MAAM;WACN,MAAM;;;;eAHF,MAAM;UACX,MAAM;WACL,MAAM;WACN,MAAM;;;;UAAN,MAAM;;AATd,wBAWG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|