@bagelink/vue 0.0.807 → 0.0.813
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/AddressSaerch.vue.d.ts +7 -0
- package/dist/components/AddressSaerch.vue.d.ts.map +1 -0
- package/dist/components/BglVideo.vue.d.ts.map +1 -1
- 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 +9 -3
- package/dist/components/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/DropDown.vue.d.ts +184 -15
- package/dist/components/DropDown.vue.d.ts.map +1 -1
- package/dist/components/FormSchema.vue.d.ts +4 -5
- package/dist/components/LangText.vue.d.ts +2 -2
- package/dist/components/MapEmbed.vue.d.ts.map +1 -1
- package/dist/components/ModalBglForm.vue.d.ts +20 -21
- package/dist/components/ModalForm.vue.d.ts +9 -3
- package/dist/components/ModalForm.vue.d.ts.map +1 -1
- package/dist/components/NavBar.vue.d.ts.map +1 -1
- 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 +10 -2
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/Zoomer.vue.d.ts.map +1 -1
- package/dist/components/charts/BarChart.vue.d.ts +2 -2
- package/dist/components/form/BglField.vue.d.ts +6 -2
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.vue.d.ts +9 -3
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/BglMultiStepForm.vue.d.ts +21 -3
- package/dist/components/form/BglMultiStepForm.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/inputs/ColorPicker.vue.d.ts +6 -2
- package/dist/components/form/inputs/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CurrencyInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DatePicker.vue.d.ts +6 -2
- package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
- 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/PasswordInput.vue.d.ts +3 -1
- package/dist/components/form/inputs/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/PlainText.vue.d.ts +3 -3
- package/dist/components/form/inputs/RadioGroup.vue.d.ts +3 -1
- package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ReadOnlyInput.vue.d.ts +2 -2
- package/dist/components/form/inputs/RichText2/formatting.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 +53 -4
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TableField.vue.d.ts +6 -2
- package/dist/components/form/inputs/TableField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextArea.vue.d.ts +3 -3
- package/dist/components/form/inputs/TextInput.vue.d.ts +6 -2
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- 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/lightbox/Lightbox.vue.d.ts.map +1 -1
- package/dist/components/lightbox/index.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/index.d.ts +3 -1
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/index.cjs +357 -271
- package/dist/index.mjs +357 -271
- 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/plugins/modal.d.ts +12 -4
- package/dist/plugins/modal.d.ts.map +1 -1
- package/dist/style.css +3818 -389
- package/dist/types/BagelForm.d.ts +27 -9
- package/dist/types/BagelForm.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/materialIcon.d.ts +2 -0
- package/dist/types/materialIcon.d.ts.map +1 -0
- package/dist/utils/BagelFormUtils.d.ts +75 -17
- package/dist/utils/BagelFormUtils.d.ts.map +1 -1
- package/dist/utils/allCountries.d.ts +1 -1
- package/dist/utils/allCountries.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/lang.d.ts +3 -1
- package/dist/utils/lang.d.ts.map +1 -1
- package/dist/utils/objects.d.ts +0 -1
- package/dist/utils/strings.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/Accordion.vue +1 -1
- package/src/components/AccordionItem.vue +4 -4
- package/src/components/AddressSearch.vue +1 -1
- package/src/components/BglVideo.vue +1 -2
- package/src/components/DataPreview.vue +1 -1
- package/src/components/MapEmbed.vue +4 -6
- package/src/components/ModalForm.vue +3 -3
- package/src/components/NavBar.vue +6 -3
- package/src/components/TableSchema.vue +6 -6
- package/src/components/Zoomer.vue +7 -8
- package/src/components/dashboard/Lineart.vue +3 -3
- package/src/components/form/BglField.vue +2 -2
- package/src/components/form/BglFieldSet.vue +1 -1
- package/src/components/form/BglForm.vue +2 -2
- package/src/components/form/inputs/CheckInput.vue +1 -1
- package/src/components/form/inputs/ColorPicker.vue +1 -1
- package/src/components/form/inputs/DatePicker.vue +1 -1
- package/src/components/form/inputs/FileUpload.vue +4 -4
- package/src/components/form/inputs/OTP.vue +6 -6
- package/src/components/form/inputs/PasswordInput.vue +1 -1
- package/src/components/form/inputs/RadioPillsInput.vue +1 -1
- package/src/components/form/inputs/RichText.vue +1 -1
- package/src/components/form/inputs/RichText2/Toolbar.vue +2 -2
- package/src/components/form/inputs/RichText2/formatting.ts +5 -3
- package/src/components/form/inputs/RichText2/index.vue +1 -1
- package/src/components/form/inputs/SelectInput.vue +6 -6
- package/src/components/form/inputs/SignaturePad.vue +2 -2
- package/src/components/form/inputs/TableField.vue +5 -5
- package/src/components/form/inputs/TelInput.vue +4 -4
- package/src/components/form/inputs/TextInput.vue +1 -1
- package/src/components/form/inputs/ToggleInput.vue +1 -1
- package/src/components/formkit/FileUploader.vue +1 -1
- package/src/components/formkit/MiscFields.vue +1 -1
- package/src/components/layout/Layout.vue +2 -2
- package/src/components/layout/Tabs.vue +2 -2
- package/src/components/layout/TabsNav.vue +1 -1
- package/src/components/layout/tabsManager.ts +1 -1
- package/src/components/lightbox/Lightbox.vue +2 -2
- package/src/components/lightbox/index.ts +13 -7
- package/src/composables/index.ts +2 -2
- package/src/plugins/modal.ts +7 -7
- package/src/styles/appearance.css +36 -0
- package/src/styles/buttons.css +24 -0
- package/src/styles/layout.css +1989 -68
- package/src/styles/mobilLayout.css +1946 -41
- package/src/styles/theme.css +1 -1
- package/src/types/BagelForm.ts +9 -9
- package/src/types/index.ts +1 -1
- package/src/utils/BagelFormUtils.ts +1 -1
- package/src/utils/allCountries.ts +1 -1
- package/src/utils/index.ts +7 -7
- package/src/utils/lang.ts +1 -1
- package/src/utils/strings.ts +1 -2
- package/vite.config.ts +1 -1
- 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/utils/lang.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../src/utils/lang.ts"],"names":[],"mappings":"AAcA,iBAAS,IAAI,CAAC,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../src/utils/lang.ts"],"names":[],"mappings":"AAcA,iBAAS,IAAI,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAOrE;AAED,wBAAgB,OAAO;;;;;EAsBtB"}
|
package/dist/utils/objects.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BagelField } from '..';
|
|
2
|
-
|
|
3
2
|
export declare function getPropByPath(obj: Record<string, any>, propPath?: string, bagelField?: BagelField): {};
|
|
4
3
|
export declare function setPropByPath(obj: Record<string, any>, path?: string, value?: any): void;
|
|
5
4
|
//# sourceMappingURL=objects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAC3B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAChD,MAAM,
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAC3B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAChD,MAAM,CA+BR"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.813",
|
|
5
5
|
"description": "Bagel core sdk packages",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Neveh Allon",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"./vite.config.ts"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/leaflet": "^1.9.
|
|
54
|
+
"@types/leaflet": "^1.9.13",
|
|
55
55
|
"@types/signature_pad": "^2.3.6",
|
|
56
|
-
"@vue-macros/reactivity-transform": "^1.1.
|
|
56
|
+
"@vue-macros/reactivity-transform": "^1.1.2",
|
|
57
57
|
"vue": "^3.5.12"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"@vueuse/core": "^11.1.0",
|
|
119
119
|
"axios": "^1.7.7",
|
|
120
120
|
"floating-vue": "^5.2.2",
|
|
121
|
-
"libphonenumber-js": "1.11.
|
|
122
|
-
"signature_pad": "^5.0.
|
|
121
|
+
"libphonenumber-js": "1.11.12",
|
|
122
|
+
"signature_pad": "^5.0.4",
|
|
123
123
|
"type-fest": "^4.26.1"
|
|
124
124
|
},
|
|
125
125
|
"scripts": {
|
|
@@ -25,11 +25,11 @@ onMounted(() => {
|
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
interface AccordionState {
|
|
28
|
-
openItem
|
|
28
|
+
openItem?: string
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const accordionState = inject<AccordionState |
|
|
32
|
-
const id = props.id || Math.random().toString(36).
|
|
31
|
+
const accordionState = inject<AccordionState | undefined>('accordionState')
|
|
32
|
+
const id = props.id || Math.random().toString(36).slice(7)
|
|
33
33
|
|
|
34
34
|
if (accordionState) {
|
|
35
35
|
watch(
|
|
@@ -47,7 +47,7 @@ function toggle() {
|
|
|
47
47
|
if (isOpen) {
|
|
48
48
|
accordionState.openItem = id
|
|
49
49
|
} else if (accordionState.openItem === id) {
|
|
50
|
-
accordionState.openItem =
|
|
50
|
+
accordionState.openItem = undefined
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -18,7 +18,7 @@ function emitAddress(address: MapMarker) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async function searchAddresses() {
|
|
21
|
-
const addressURL = addressInput.
|
|
21
|
+
const addressURL = addressInput.replaceAll(/\s+/g, '+')
|
|
22
22
|
const geocodeUrl = `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURI(addressURL)}`
|
|
23
23
|
const res = await fetch(geocodeUrl)
|
|
24
24
|
searchResults = await res.json() || []
|
|
@@ -14,12 +14,11 @@ const aspectRatio = $computed(
|
|
|
14
14
|
() => props.aspectRatio?.replace(':', '/') || '16/9',
|
|
15
15
|
)
|
|
16
16
|
|
|
17
|
-
const embedType = $computed<'YouTube' | 'Vimeo' |
|
|
17
|
+
const embedType = $computed<'YouTube' | 'Vimeo' | undefined>(() => {
|
|
18
18
|
const youtubeRegex = /youtube\.com|youtu\.be/
|
|
19
19
|
if (youtubeRegex.test(props.src || '')) return 'YouTube'
|
|
20
20
|
const vimeoRegex = /vimeo\.com/
|
|
21
21
|
if (vimeoRegex.test(props.src || '')) return 'Vimeo'
|
|
22
|
-
return null
|
|
23
22
|
})
|
|
24
23
|
|
|
25
24
|
const videoUrl = $computed(() => {
|
|
@@ -16,7 +16,7 @@ const props = defineProps<{
|
|
|
16
16
|
excludeUnset?: boolean
|
|
17
17
|
}>()
|
|
18
18
|
|
|
19
|
-
const itemData = defineModel<
|
|
19
|
+
const itemData = defineModel<{ [key: string]: any }>('data', { default: {} })
|
|
20
20
|
|
|
21
21
|
function dataTransform(dataValue: any): any {
|
|
22
22
|
if (!dataValue) return dataValue
|
|
@@ -30,16 +30,14 @@ const props = withDefaults(
|
|
|
30
30
|
let L = $ref<any>()
|
|
31
31
|
let map = $ref<Map>()
|
|
32
32
|
const _markers = $ref<Marker[]>([])
|
|
33
|
-
const id = $ref(Math.random().toString(36).
|
|
33
|
+
const id = $ref(Math.random().toString(36).slice(2, 10))
|
|
34
34
|
|
|
35
35
|
const defaultMarkerSVG = '<svg id="eCJDQPwuXje1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 36 36" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" project-id="ac827abc0a8c4922b76bac4df7bd7646" export-id="2cc86932ccbc4825a31fd063b3e75478" cached="false"><style><![CDATA[#eCJDQPwuXje3_ts {animation: eCJDQPwuXje3_ts__ts 3000ms linear infinite normal forwards}@keyframes eCJDQPwuXje3_ts__ts { 0% {transform: translate(18px,18px) scale(1,1)} 3.333333% {transform: translate(18px,18px) scale(1,1);animation-timing-function: cubic-bezier(0.42,0,0.58,1)} 100% {transform: translate(18px,18px) scale(1.8,1.8)}} #eCJDQPwuXje3 {animation: eCJDQPwuXje3_c_o 3000ms linear infinite normal forwards}@keyframes eCJDQPwuXje3_c_o { 0% {opacity: 0} 3.333333% {opacity: 1;animation-timing-function: cubic-bezier(0.42,0,0.58,1)} 100% {opacity: 0}}]]></style><ellipse rx="10.049312" ry="10.049312" transform="translate(18 18)" fill="#2e5bff" stroke-width="0"/><g id="eCJDQPwuXje3_ts" transform="translate(18,18) scale(1,1)"><ellipse id="eCJDQPwuXje3" rx="10.049312" ry="10.049312" transform="translate(0,0)" opacity="0" fill="#2e5bff" stroke-width="0"/></g></svg>'
|
|
36
36
|
const leafletScriptUrl = 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.js'
|
|
37
37
|
|
|
38
|
-
function loadGlobalL() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
resolve(window.L)
|
|
42
|
-
})
|
|
38
|
+
async function loadGlobalL() {
|
|
39
|
+
while (!window.L) await sleep(100)
|
|
40
|
+
return window.L
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
async function initializeMap() {
|
|
@@ -24,7 +24,7 @@ const props = defineProps<{
|
|
|
24
24
|
|
|
25
25
|
onError?: (err: any) => void
|
|
26
26
|
|
|
27
|
-
modelValue?:
|
|
27
|
+
modelValue?: { [key: string]: any }
|
|
28
28
|
}>()
|
|
29
29
|
|
|
30
30
|
const emit = defineEmits(['update:visible'])
|
|
@@ -38,7 +38,7 @@ const computedFormSchema = $computed(() => {
|
|
|
38
38
|
return props.schema
|
|
39
39
|
})
|
|
40
40
|
|
|
41
|
-
const formData = defineModel<
|
|
41
|
+
const formData = defineModel<{ [key: string]: any }>('modelValue', {
|
|
42
42
|
default: {},
|
|
43
43
|
})
|
|
44
44
|
const form = $ref<InstanceType<typeof BagelForm>>()
|
|
@@ -65,7 +65,7 @@ function runDelete() {
|
|
|
65
65
|
closeModal()
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
function setFormValues(values:
|
|
68
|
+
function setFormValues(values: { [key: string]: any }) {
|
|
69
69
|
Object.assign(formData, values)
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -21,16 +21,19 @@ withDefaults(
|
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
let isOpen = $ref(true)
|
|
24
|
+
|
|
24
25
|
function calcIsOpen() {
|
|
25
|
-
isOpen
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
isOpen = window.innerWidth < 1100
|
|
27
|
+
|
|
28
|
+
const storedNavOpenVal = localStorage.getItem('navOpen')
|
|
29
|
+
if (storedNavOpenVal === 'true' || storedNavOpenVal === null) isOpen = true
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
function toggleMenu() {
|
|
31
33
|
isOpen = !isOpen
|
|
32
34
|
localStorage.setItem('navOpen', `${isOpen}`)
|
|
33
35
|
}
|
|
36
|
+
|
|
34
37
|
onMounted(calcIsOpen)
|
|
35
38
|
</script>
|
|
36
39
|
|
|
@@ -64,7 +64,7 @@ const computedSchema = $computed(() => useBglSchema<T>({
|
|
|
64
64
|
}))
|
|
65
65
|
|
|
66
66
|
function transform(rowData: any) {
|
|
67
|
-
const obj:
|
|
67
|
+
const obj: { [key: string]: any } = { ...rowData }
|
|
68
68
|
const fields = computedSchema.filter(f => f.id)
|
|
69
69
|
|
|
70
70
|
for (const field of fields) {
|
|
@@ -97,8 +97,8 @@ const computedData = computed(() => {
|
|
|
97
97
|
bValue = new Date(bValue).getTime()
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
const numAValue = Number.parseInt(`${aValue}`.
|
|
101
|
-
const numBValue = Number.parseInt(`${bValue}`.
|
|
100
|
+
const numAValue = Number.parseInt(`${aValue}`.replaceAll(/[^\d.-]/g, ''), 10)
|
|
101
|
+
const numBValue = Number.parseInt(`${bValue}`.replaceAll(/[^\d.-]/g, ''), 10)
|
|
102
102
|
|
|
103
103
|
if (!Number.isNaN(numAValue) && !Number.isNaN(numBValue)) {
|
|
104
104
|
if (sortDirection === 'ASC') return numAValue - numBValue
|
|
@@ -148,7 +148,7 @@ watch(
|
|
|
148
148
|
// #endregion ? VIRTUAL LIST
|
|
149
149
|
|
|
150
150
|
// #region ? SELECT COLUMN
|
|
151
|
-
const allSelector = $ref<HTMLInputElement |
|
|
151
|
+
const allSelector = $ref<HTMLInputElement | undefined>()
|
|
152
152
|
const computedSelectedItems = $computed(() => selectedItems.value)
|
|
153
153
|
|
|
154
154
|
function updateAllSelectorState() {
|
|
@@ -160,8 +160,8 @@ function updateAllSelectorState() {
|
|
|
160
160
|
allSelector.indeterminate = !allSelected && computedSelectedItems.length > 0
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
function toggleSelectItem(item:
|
|
164
|
-
if (
|
|
163
|
+
function toggleSelectItem(item: { [key: string]: any }) {
|
|
164
|
+
if (computedSelectedItems.length === 0) {
|
|
165
165
|
const obj = { ...item }
|
|
166
166
|
Object.keys(obj).forEach((key) => {
|
|
167
167
|
if (key.startsWith('_transformed_')) delete obj[key]
|
|
@@ -35,7 +35,7 @@ const {
|
|
|
35
35
|
|
|
36
36
|
const emit = defineEmits(['update:zoom'])
|
|
37
37
|
// Reactive state using $ref (vue-macros)
|
|
38
|
-
const zoomElement = $ref<HTMLElement |
|
|
38
|
+
const zoomElement = $ref<HTMLElement | undefined>()
|
|
39
39
|
let containerWidth = $ref(1)
|
|
40
40
|
let containerHeight = $ref(1)
|
|
41
41
|
let containerLeft = $ref(0)
|
|
@@ -62,8 +62,8 @@ let pointerPosX = $ref(-1)
|
|
|
62
62
|
let pointerPosY = $ref(-1)
|
|
63
63
|
let twoFingerInitDist = $ref(0)
|
|
64
64
|
let panLocked = $ref(true)
|
|
65
|
-
let raf = $ref<number |
|
|
66
|
-
let tapDetector = $ref<TapDetector |
|
|
65
|
+
let raf = $ref<number | undefined>()
|
|
66
|
+
let tapDetector = $ref<TapDetector | undefined>()
|
|
67
67
|
|
|
68
68
|
const wrapperStyle = $computed(() => {
|
|
69
69
|
const translateXValue = containerWidth * animTranslateX
|
|
@@ -172,12 +172,11 @@ function calcTranslateLimit() {
|
|
|
172
172
|
let translateLimitY = (scale * imageToContainerRatio - 1) / 2
|
|
173
173
|
if (translateLimitY < 0) translateLimitY = 0
|
|
174
174
|
return { x: (scale - 1) / 2, y: translateLimitY }
|
|
175
|
-
} else {
|
|
176
|
-
const imageToContainerRatio = containerHeight * aspectRatio / containerWidth
|
|
177
|
-
let translateLimitX = (scale * imageToContainerRatio - 1) / 2
|
|
178
|
-
if (translateLimitX < 0) translateLimitX = 0
|
|
179
|
-
return { x: translateLimitX, y: (scale - 1) / 2 }
|
|
180
175
|
}
|
|
176
|
+
const imageToContainerRatio = containerHeight * aspectRatio / containerWidth
|
|
177
|
+
let translateLimitX = (scale * imageToContainerRatio - 1) / 2
|
|
178
|
+
if (translateLimitX < 0) translateLimitX = 0
|
|
179
|
+
return { x: translateLimitX, y: (scale - 1) / 2 }
|
|
181
180
|
}
|
|
182
181
|
|
|
183
182
|
function getMarginDirection() {
|
|
@@ -58,7 +58,7 @@ const tooltipConfiguration = {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// Refs
|
|
61
|
-
let chartSize = $ref<Size |
|
|
61
|
+
let chartSize = $ref<Size | undefined>()
|
|
62
62
|
const chartContainer = $ref<HTMLElement>()
|
|
63
63
|
const displayMarker = $ref(true)
|
|
64
64
|
const chartMargin = $ref({
|
|
@@ -70,7 +70,7 @@ const chartMargin = $ref({
|
|
|
70
70
|
|
|
71
71
|
// Functions
|
|
72
72
|
function adjustChartSize() {
|
|
73
|
-
chartSize =
|
|
73
|
+
chartSize = undefined
|
|
74
74
|
const el = chartContainer
|
|
75
75
|
if (!el) return
|
|
76
76
|
const { width, height } = el.getBoundingClientRect()
|
|
@@ -93,7 +93,7 @@ onUnmounted(() => {
|
|
|
93
93
|
})
|
|
94
94
|
|
|
95
95
|
// Style Configurations
|
|
96
|
-
function dotStyling(ctx:
|
|
96
|
+
function dotStyling(ctx: { [key: string]: any }) {
|
|
97
97
|
return {
|
|
98
98
|
r: ctx.active ? 5 : 1,
|
|
99
99
|
fill: BRAND_COLOR,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
const props = withDefaults(
|
|
16
16
|
defineProps<{
|
|
17
17
|
field: Field<T>
|
|
18
|
-
modelValue:
|
|
18
|
+
modelValue: { [key: string]: any }
|
|
19
19
|
}>(),
|
|
20
20
|
{
|
|
21
21
|
modelValue: () => ({}),
|
|
@@ -24,7 +24,7 @@ const props = withDefaults(
|
|
|
24
24
|
|
|
25
25
|
const emit = defineEmits(['update:modelValue'])
|
|
26
26
|
|
|
27
|
-
const customAttrs = $ref<
|
|
27
|
+
const customAttrs = $ref<{ [key: string]: any }>({})
|
|
28
28
|
|
|
29
29
|
const is = $computed(() => {
|
|
30
30
|
if (props.field.$el === 'text') return TextInput
|
|
@@ -9,7 +9,7 @@ const props = withDefaults(
|
|
|
9
9
|
label?: string
|
|
10
10
|
id?: string
|
|
11
11
|
schema: BglFormSchemaFnT<any>
|
|
12
|
-
modelValue?:
|
|
12
|
+
modelValue?: { [key: string]: any }
|
|
13
13
|
onDelete?: (id: string) => void
|
|
14
14
|
onSubmit?: (data: any) => void
|
|
15
15
|
status?: FormStatus
|
|
@@ -26,7 +26,7 @@ const slots = useSlots()
|
|
|
26
26
|
const { showModal } = useModal()
|
|
27
27
|
|
|
28
28
|
const instAt = new Date()
|
|
29
|
-
const timeSinceInst = () =>
|
|
29
|
+
const timeSinceInst = () => Date.now() - instAt.getTime()
|
|
30
30
|
let formData = $ref(props.modelValue || {})
|
|
31
31
|
let isDirty = $ref(false)
|
|
32
32
|
let data = $computed({
|
|
@@ -11,7 +11,7 @@ const props = withDefaults(defineProps<{
|
|
|
11
11
|
value?: any
|
|
12
12
|
}>(), { defaultValue: false })
|
|
13
13
|
|
|
14
|
-
const inputId = $computed(() => props.id || Math.random().toString(36).
|
|
14
|
+
const inputId = $computed(() => props.id || Math.random().toString(36).slice(7))
|
|
15
15
|
|
|
16
16
|
const checked = defineModel<boolean | undefined | any[]>('modelValue', { default: undefined })
|
|
17
17
|
|
|
@@ -45,9 +45,9 @@ async function fetchFiles() {
|
|
|
45
45
|
|
|
46
46
|
onMounted(() => {
|
|
47
47
|
if (props.topic) fetchFiles()
|
|
48
|
-
if (!props.files && [file_bindkeys].flat().length) {
|
|
49
|
-
const ids = [file_bindkeys].flat().filter(Boolean)
|
|
50
|
-
if (!ids
|
|
48
|
+
if (!props.files && [file_bindkeys].flat().length > 0) {
|
|
49
|
+
const ids = [file_bindkeys].flat().filter(Boolean) as (string | number)[] | undefined
|
|
50
|
+
if (!ids?.length) return
|
|
51
51
|
if (props.multiple) {
|
|
52
52
|
ids.forEach((id) => {
|
|
53
53
|
void bagel
|
|
@@ -74,7 +74,7 @@ watch(
|
|
|
74
74
|
if (newFiles) {
|
|
75
75
|
const filesToAdd = [newFiles]
|
|
76
76
|
.flat()
|
|
77
|
-
.filter(f => !storageFiles.
|
|
77
|
+
.filter(f => !storageFiles.some(sf => sf[bindKey] === f[bindKey]))
|
|
78
78
|
for (const file of filesToAdd) {
|
|
79
79
|
storageFiles.push(file)
|
|
80
80
|
}
|
|
@@ -4,14 +4,14 @@ import { reactive } from 'vue'
|
|
|
4
4
|
const props = defineProps<{ digitCount: number, default?: string, modelValue?: string }>()
|
|
5
5
|
|
|
6
6
|
const emit = defineEmits(['update:modelValue', 'complete'])
|
|
7
|
-
const digits = reactive<(number | string |
|
|
7
|
+
const digits = reactive<(number | string | undefined)[]>([])
|
|
8
8
|
const otpCont = $ref<HTMLElement>()
|
|
9
9
|
|
|
10
10
|
function handlePaste(event: ClipboardEvent, index: number) {
|
|
11
11
|
event.preventDefault()
|
|
12
12
|
const { clipboardData } = event
|
|
13
|
-
const pastedText = clipboardData?.getData('text').
|
|
14
|
-
const pastedDigits = pastedText
|
|
13
|
+
const pastedText = clipboardData?.getData('text').replaceAll(/\D/g, '') // Ensure only numeric digits are pasted
|
|
14
|
+
const pastedDigits = [...(pastedText ?? '')]
|
|
15
15
|
if (!pastedDigits) return
|
|
16
16
|
for (let i = 0; i < pastedDigits.length; i++) {
|
|
17
17
|
const digit = pastedDigits[i]
|
|
@@ -37,7 +37,7 @@ function handleKeyDown(event: KeyboardEvent, index: number) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
if (event.key === 'Backspace') {
|
|
40
|
-
digits[index] =
|
|
40
|
+
digits[index] = undefined
|
|
41
41
|
|
|
42
42
|
if (index !== 0) {
|
|
43
43
|
const prevDigit = otpCont?.children[index - 1] as any
|
|
@@ -67,13 +67,13 @@ if (props.default && props.default.length === props.digitCount) {
|
|
|
67
67
|
}
|
|
68
68
|
} else {
|
|
69
69
|
for (let i = 0; i < props.digitCount; i++) {
|
|
70
|
-
digits[i] =
|
|
70
|
+
digits[i] = undefined
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function isDigitsFull() {
|
|
75
75
|
for (const elem of digits) {
|
|
76
|
-
if (elem
|
|
76
|
+
if (elem === undefined) {
|
|
77
77
|
return false
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -6,8 +6,8 @@ import SelectInput from '../SelectInput.vue'
|
|
|
6
6
|
defineProps<{ config: ToolbarConfig }>()
|
|
7
7
|
const emit = defineEmits(['action'])
|
|
8
8
|
|
|
9
|
-
// const colorPicker = $ref<HTMLInputElement |
|
|
10
|
-
// const fontSizeInput = $ref<HTMLInputElement |
|
|
9
|
+
// const colorPicker = $ref<HTMLInputElement | undefined>()
|
|
10
|
+
// const fontSizeInput = $ref<HTMLInputElement | undefined>()
|
|
11
11
|
|
|
12
12
|
interface toolbarOption {
|
|
13
13
|
name: ToolbarConfigOption | 'separator'
|
|
@@ -104,7 +104,7 @@ function increaseFontSize() {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
function decreaseFontSize() {
|
|
107
|
-
|
|
107
|
+
// TODO:
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
function removeFormatting() {
|
|
@@ -135,7 +135,7 @@ function insertList(type: string) {
|
|
|
135
135
|
const list = document.createElement(type)
|
|
136
136
|
const listItem = document.createElement('li')
|
|
137
137
|
listItem.textContent = range.toString()
|
|
138
|
-
list.
|
|
138
|
+
list.append(listItem)
|
|
139
139
|
range.deleteContents()
|
|
140
140
|
range.insertNode(list)
|
|
141
141
|
}
|
|
@@ -158,7 +158,9 @@ export function insertImage() {
|
|
|
158
158
|
console.log('image')
|
|
159
159
|
const { showModalForm } = useModal()
|
|
160
160
|
console.log(showModalForm)
|
|
161
|
-
showModalForm({ title: 'Upload Image', schema: [{ id: 'image', type: 'file' }], onSubmit: (
|
|
161
|
+
showModalForm({ title: 'Upload Image', schema: [{ id: 'image', type: 'file' }], onSubmit: (_data) => {
|
|
162
|
+
//
|
|
163
|
+
} })
|
|
162
164
|
// const url = prompt('Enter the image URL:')
|
|
163
165
|
// if (url) {
|
|
164
166
|
// const selection = window.getSelection()
|
|
@@ -7,7 +7,7 @@ import Toolbar from './Toolbar.vue'
|
|
|
7
7
|
const props = defineProps<{ modelValue: string, toolbarConfig?: ToolbarConfig }>()
|
|
8
8
|
const emit = defineEmits(['update:modelValue'])
|
|
9
9
|
|
|
10
|
-
const editableContent = $ref<HTMLElement |
|
|
10
|
+
const editableContent = $ref<HTMLElement | undefined>()
|
|
11
11
|
const defaultConfig: ToolbarConfig = [
|
|
12
12
|
'bold',
|
|
13
13
|
'italic',
|
|
@@ -32,14 +32,14 @@ const emit = defineEmits(['update:modelValue'])
|
|
|
32
32
|
|
|
33
33
|
const searchPlaceholder = $computed(() => props.searchPlaceholder || 'Search')
|
|
34
34
|
|
|
35
|
-
const searchInput = $ref<HTMLInputElement |
|
|
35
|
+
const searchInput = $ref<HTMLInputElement | undefined>()
|
|
36
36
|
|
|
37
37
|
let selectedItems = $ref<Option[]>([])
|
|
38
38
|
|
|
39
39
|
const selectedItemCount = $computed(() => selectedItems.length ?? 0)
|
|
40
40
|
let search = $ref<string>('')
|
|
41
41
|
|
|
42
|
-
const dropdown = $ref<InstanceType<typeof Dropdown> |
|
|
42
|
+
const dropdown = $ref<InstanceType<typeof Dropdown> | undefined>()
|
|
43
43
|
let selected = $ref(false)
|
|
44
44
|
let open = $ref(false)
|
|
45
45
|
|
|
@@ -64,7 +64,7 @@ const filteredOptions = $computed(() => props.options.filter((option) => {
|
|
|
64
64
|
const searchTerm = search
|
|
65
65
|
.split(/\s+/)
|
|
66
66
|
.filter(Boolean)
|
|
67
|
-
.map(t => new RegExp(t.
|
|
67
|
+
.map(t => new RegExp(t.replaceAll(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi'))
|
|
68
68
|
return (
|
|
69
69
|
Boolean(option)
|
|
70
70
|
&& (searchTerm.every(s => getLabel(option).match(s))
|
|
@@ -72,7 +72,7 @@ const filteredOptions = $computed(() => props.options.filter((option) => {
|
|
|
72
72
|
)
|
|
73
73
|
}))
|
|
74
74
|
|
|
75
|
-
const isSelected = (option: Option) => selectedItems.
|
|
75
|
+
const isSelected = (option: Option) => selectedItems.some(item => getValue(option) === getValue(item)) !== undefined
|
|
76
76
|
|
|
77
77
|
function updateOpen(visible: boolean) {
|
|
78
78
|
open = visible
|
|
@@ -87,7 +87,7 @@ function updateOpen(visible: boolean) {
|
|
|
87
87
|
if (props.searchable && !props.multiselect && selectedItemCount) search = selectedLabel as string
|
|
88
88
|
setTimeout(
|
|
89
89
|
() => (searchInput as any)?.$el?.querySelector('input')?.focus(),
|
|
90
|
-
|
|
90
|
+
350,
|
|
91
91
|
)
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -100,7 +100,7 @@ function getLabel(option: Option) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function getValue(option?: Option) {
|
|
103
|
-
if (!option) return
|
|
103
|
+
if (!option) return
|
|
104
104
|
if (typeof option === 'string') return option
|
|
105
105
|
if (typeof option === 'number') return option
|
|
106
106
|
return option.value
|
|
@@ -121,8 +121,8 @@ function draw() {
|
|
|
121
121
|
if (!isEmpty()) url = save()
|
|
122
122
|
const ratio = props.ratio ?? 1 / 2
|
|
123
123
|
const { width } = c.getBoundingClientRect()
|
|
124
|
-
c.width = props.width ? Number(props.width.
|
|
125
|
-
c.height = props.height ? Number(props.height.
|
|
124
|
+
c.width = props.width ? Number(props.width.replaceAll('px', '')) : width
|
|
125
|
+
c.height = props.height ? Number(props.height.replaceAll('px', '')) : width * ratio
|
|
126
126
|
clear()
|
|
127
127
|
if (!props.clearOnResize && url !== undefined) fromDataURL(url)
|
|
128
128
|
if (props.waterMark) addWaterMark(props.waterMark)
|
|
@@ -6,14 +6,14 @@ import { VueDraggableNext } from 'vue-draggable-next'
|
|
|
6
6
|
const props = withDefaults(
|
|
7
7
|
defineProps<{
|
|
8
8
|
description?: string
|
|
9
|
-
meta:
|
|
9
|
+
meta: { [key: string]: any } /* EntityMeta */
|
|
10
10
|
fieldname: string
|
|
11
11
|
bagelApp?: any
|
|
12
12
|
modelValue: any
|
|
13
13
|
}>(),
|
|
14
14
|
{
|
|
15
15
|
description: '',
|
|
16
|
-
bagelApp:
|
|
16
|
+
bagelApp: undefined,
|
|
17
17
|
},
|
|
18
18
|
)
|
|
19
19
|
const emits = defineEmits(['update:modelValue'])
|
|
@@ -21,10 +21,10 @@ let bagel: any
|
|
|
21
21
|
let api: any
|
|
22
22
|
const listRef = ref(props.modelValue)
|
|
23
23
|
const fieldMeta = props.meta.doc_meta.fields.find(
|
|
24
|
-
(field:
|
|
24
|
+
(field: { [key: string]: any }) => field.fieldname === props.fieldname,
|
|
25
25
|
)
|
|
26
26
|
const entityMeta = props.meta.links.find(
|
|
27
|
-
(link:
|
|
27
|
+
(link: { [key: string]: any }) => link.id === fieldMeta?.options,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
function handleUpdateModelValue(value: any, index: number, fieldname: string) {
|
|
@@ -58,7 +58,7 @@ function removeRow(idx: number) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function ended() {
|
|
61
|
-
listRef.value.forEach((item:
|
|
61
|
+
listRef.value.forEach((item: { [key: string]: any }, index: number) => {
|
|
62
62
|
item.idx = index + 1
|
|
63
63
|
})
|
|
64
64
|
emits('update:modelValue', listRef.value)
|