@opengis/form 0.0.17 → 0.0.19
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/behavior.vue.d.ts.map +1 -0
- package/dist/{form/src/components → components}/container-views/index.d.ts.map +1 -1
- package/dist/components/container-views/vs-container-accordion.vue.d.ts.map +1 -0
- package/dist/components/container-views/vs-container-default.vue.d.ts.map +1 -0
- package/dist/components/container-views/vs-container-switcher.vue.d.ts.map +1 -0
- package/dist/components/form/vs-compact-form.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-arrow-top-bottom.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-check.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-chevron-down.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-chevron-top-bottom.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-close.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-csv.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-delete.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-download.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-export.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-file.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-geojson.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-grip-vertical.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-import.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-info.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-magnifying-glass.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-no-data.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-pdf.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-pen.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-plus.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-upload.vue.d.ts.map +1 -0
- package/dist/components/icons/icon-zip.vue.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-email.vue.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-mask.vue.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-number.vue.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-static.vue.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-switcher.vue.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-text.vue.d.ts.map +1 -0
- package/dist/components/inputs/base/vs-input-textarea.vue.d.ts.map +1 -0
- package/dist/components/inputs/date/vs-date-text.vue.d.ts.map +1 -0
- package/dist/components/inputs/date/vs-input-date.vue.d.ts.map +1 -0
- package/dist/components/inputs/date/vs-input-date1.vue.d.ts.map +1 -0
- package/dist/components/inputs/date/vs-input-time.vue.d.ts.map +1 -0
- package/dist/components/inputs/file/vs-input-file-list-item.vue.d.ts.map +1 -0
- package/dist/components/inputs/file/vs-input-file.vue.d.ts.map +1 -0
- package/dist/components/inputs/file-list/vs-input-file-list.vue.d.ts.map +1 -0
- package/dist/components/inputs/file-list/vs-widget-file-info.vue.d.ts.map +1 -0
- package/dist/components/inputs/file-list/vs-widget-file-item.vue.d.ts.map +1 -0
- package/dist/{form/src/components → components}/inputs/index.d.ts.map +1 -1
- package/dist/components/inputs/map/icons/icon-compass.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/icons/icon-full-screen.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/icons/icon-line.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/icons/icon-map-pin.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/icons/icon-poligon-rectangle.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/icons/icon-poligon.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/map-layers.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/map-search.vue.d.ts.map +1 -0
- package/dist/components/inputs/map/map.d.ts.map +1 -0
- package/dist/components/inputs/map/util.d.ts.map +1 -0
- package/dist/components/inputs/map/vs-input-map.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/checkbox/index.d.ts.map +1 -0
- package/dist/components/inputs/options/checkbox/vs-checkbox-buttons.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/checkbox/vs-checkbox-default.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/checkbox/vs-input-checkbox-item.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/checkbox/vs-input-checkbox.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/radio/index.d.ts.map +1 -0
- package/dist/components/inputs/options/radio/vs-input-radio-buttons.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/radio/vs-input-radio-default.vue.d.ts.map +1 -0
- package/dist/components/inputs/options/radio/vs-input-radio.vue.d.ts.map +1 -0
- package/dist/components/inputs/table/vs-input-datatable.vue.d.ts.map +1 -0
- package/dist/components/inputs/tag/vs-input-tag.vue.d.ts.map +1 -0
- package/dist/components/inputs/vs-input-container.vue.d.ts.map +1 -0
- package/dist/components/inputs/vs-input-select.vue.d.ts.map +1 -0
- package/dist/components/layouts/index.d.ts.map +1 -0
- package/dist/components/layouts/vs-compact-form-layout.vue.d.ts.map +1 -0
- package/dist/components/layouts/vs-layout-default.vue.d.ts.map +1 -0
- package/dist/components/layouts/vs-layout-horizontal.vue.d.ts.map +1 -0
- package/dist/components/layouts/vs-layout-inline.vue.d.ts.map +1 -0
- package/dist/components/modal/modal-edit.vue.d.ts.map +1 -0
- package/dist/components/ui/vs-calendar.vue.d.ts.map +1 -0
- package/dist/components/ui/vs-popover.vue.d.ts.map +1 -0
- package/dist/composables/useForm.d.ts.map +1 -0
- package/dist/composables/useStyle.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +539 -523
- package/dist/index.umd.cjs +2 -2
- package/dist/plugin/form-plugin.d.ts.map +1 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/types/form.d.ts.map +1 -0
- package/dist/{form/src/types → types}/rules.d.ts.map +1 -1
- package/dist/utils/convertForm.d.ts.map +1 -0
- package/dist/utils/dynamicPosition.d.ts.map +1 -0
- package/dist/utils/file.api.d.ts.map +1 -0
- package/dist/utils/file.preview.d.ts.map +1 -0
- package/dist/utils/formConditions.d.ts.map +1 -0
- package/dist/utils/formRules.d.ts.map +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/randomId.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/core/src/emitter/eventBus.d.ts +0 -6
- package/dist/core/src/emitter/eventBus.d.ts.map +0 -1
- package/dist/form/src/components/behavior.vue.d.ts.map +0 -1
- package/dist/form/src/components/container-views/vs-container-accordion.vue.d.ts.map +0 -1
- package/dist/form/src/components/container-views/vs-container-default.vue.d.ts.map +0 -1
- package/dist/form/src/components/container-views/vs-container-switcher.vue.d.ts.map +0 -1
- package/dist/form/src/components/form/vs-compact-form.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-arrow-top-bottom.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-check.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-chevron-down.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-chevron-top-bottom.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-close.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-csv.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-delete.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-download.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-export.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-file.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-geojson.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-grip-vertical.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-import.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-info.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-magnifying-glass.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-no-data.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-pdf.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-pen.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-plus.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-upload.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/icon-zip.vue.d.ts.map +0 -1
- package/dist/form/src/components/icons/index.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-email.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-mask.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-number.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-static.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-switcher.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-text.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/base/vs-input-textarea.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/date/vs-date-text.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/date/vs-input-date.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/date/vs-input-date1.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/date/vs-input-time.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/file/vs-input-file-list-item.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/file/vs-input-file.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/file-list/vs-input-file-list.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/file-list/vs-widget-file-info.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/file-list/vs-widget-file-item.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/icons/icon-compass.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/icons/icon-full-screen.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/icons/icon-line.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/icons/icon-map-pin.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/icons/icon-poligon-rectangle.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/icons/icon-poligon.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/map-layers.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/map-search.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/map.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/util.d.ts.map +0 -1
- package/dist/form/src/components/inputs/map/vs-input-map.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/checkbox/index.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/checkbox/vs-checkbox-buttons.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/checkbox/vs-checkbox-default.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/checkbox/vs-input-checkbox-item.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/checkbox/vs-input-checkbox.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/radio/index.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/radio/vs-input-radio-buttons.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/radio/vs-input-radio-default.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/options/radio/vs-input-radio.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/table/vs-input-datatable.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/tag/vs-input-tag.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/vs-input-container.vue.d.ts.map +0 -1
- package/dist/form/src/components/inputs/vs-input-select.vue.d.ts.map +0 -1
- package/dist/form/src/components/layouts/index.d.ts.map +0 -1
- package/dist/form/src/components/layouts/vs-compact-form-layout.vue.d.ts.map +0 -1
- package/dist/form/src/components/layouts/vs-layout-default.vue.d.ts.map +0 -1
- package/dist/form/src/components/layouts/vs-layout-horizontal.vue.d.ts.map +0 -1
- package/dist/form/src/components/layouts/vs-layout-inline.vue.d.ts.map +0 -1
- package/dist/form/src/components/modal/modal-edit.vue.d.ts.map +0 -1
- package/dist/form/src/components/ui/vs-calendar.vue.d.ts.map +0 -1
- package/dist/form/src/components/ui/vs-popover.vue.d.ts.map +0 -1
- package/dist/form/src/composables/useForm.d.ts.map +0 -1
- package/dist/form/src/composables/useStyle.d.ts.map +0 -1
- package/dist/form/src/index.d.ts +0 -7
- package/dist/form/src/index.d.ts.map +0 -1
- package/dist/form/src/plugin/form-plugin.d.ts.map +0 -1
- package/dist/form/src/schema.d.ts.map +0 -1
- package/dist/form/src/types/form.d.ts.map +0 -1
- package/dist/form/src/utils/convertForm.d.ts.map +0 -1
- package/dist/form/src/utils/dynamicPosition.d.ts.map +0 -1
- package/dist/form/src/utils/file.api.d.ts.map +0 -1
- package/dist/form/src/utils/file.preview.d.ts.map +0 -1
- package/dist/form/src/utils/formConditions.d.ts.map +0 -1
- package/dist/form/src/utils/formRules.d.ts.map +0 -1
- package/dist/form/src/utils/index.d.ts.map +0 -1
- package/dist/form/src/utils/randomId.d.ts.map +0 -1
- /package/dist/{form/src/components → components}/behavior.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/container-views/index.d.ts +0 -0
- /package/dist/{form/src/components → components}/container-views/vs-container-accordion.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/container-views/vs-container-default.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/container-views/vs-container-switcher.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/form/vs-compact-form.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-arrow-top-bottom.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-check.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-chevron-down.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-chevron-top-bottom.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-close.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-csv.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-delete.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-download.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-export.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-file.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-geojson.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-grip-vertical.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-import.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-info.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-magnifying-glass.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-no-data.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-pdf.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-pen.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-plus.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-upload.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/icon-zip.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/icons/index.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-email.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-mask.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-number.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-static.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-switcher.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-text.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/base/vs-input-textarea.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/date/vs-date-text.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/date/vs-input-date.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/date/vs-input-date1.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/date/vs-input-time.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/file/vs-input-file-list-item.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/file/vs-input-file.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/file-list/vs-input-file-list.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/file-list/vs-widget-file-info.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/file-list/vs-widget-file-item.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/index.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/icons/icon-compass.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/icons/icon-full-screen.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/icons/icon-line.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/icons/icon-map-pin.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/icons/icon-poligon-rectangle.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/icons/icon-poligon.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/map-layers.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/map-search.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/map.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/util.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/map/vs-input-map.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/checkbox/index.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-checkbox-buttons.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-checkbox-default.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-input-checkbox-item.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/checkbox/vs-input-checkbox.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/radio/index.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/radio/vs-input-radio-buttons.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/radio/vs-input-radio-default.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/options/radio/vs-input-radio.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/table/vs-input-datatable.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/tag/vs-input-tag.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/vs-input-container.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/inputs/vs-input-select.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/layouts/index.d.ts +0 -0
- /package/dist/{form/src/components → components}/layouts/vs-compact-form-layout.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/layouts/vs-layout-default.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/layouts/vs-layout-horizontal.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/layouts/vs-layout-inline.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/modal/modal-edit.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/ui/vs-calendar.vue.d.ts +0 -0
- /package/dist/{form/src/components → components}/ui/vs-popover.vue.d.ts +0 -0
- /package/dist/{form/src/composables → composables}/useForm.d.ts +0 -0
- /package/dist/{form/src/composables → composables}/useStyle.d.ts +0 -0
- /package/dist/{form/src/plugin → plugin}/form-plugin.d.ts +0 -0
- /package/dist/{form/src/schema.d.ts → schema.d.ts} +0 -0
- /package/dist/{form/src/types → types}/form.d.ts +0 -0
- /package/dist/{form/src/types → types}/rules.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/convertForm.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/dynamicPosition.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/file.api.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/file.preview.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/formConditions.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/formRules.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/index.d.ts +0 -0
- /package/dist/{form/src/utils → utils}/randomId.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, createElementBlock as u, openBlock as i, createCommentVNode as S, renderSlot as ve, createElementVNode as t, toDisplayString as E, normalizeProps as Ee, guardReactiveProps as Fe, createTextVNode as oe, computed as D, mergeModels as q, useModel as G, withDirectives as K, normalizeClass as B, unref as H, vModelText as ne, vModelCheckbox as Qe, createVNode as j, ref as $, createBlock as X, resolveDynamicComponent as xe, normalizeStyle as fe, withCtx as Me, withModifiers as re, onMounted as ue, onBeforeUnmount as ut, watch as se, createStaticVNode as ae, vModelRadio as Xe, Fragment as Q, renderList as Y, mergeProps as Ce, reactive as dt, vShow as De, inject as Se, resolveComponent as Pe, Transition as Ye, createApp as ct, h as pt, onUnmounted as et, nextTick as $e, Teleport as ft, provide as Ne } from "vue";
|
|
2
2
|
import { notify as pe } from "@opengis/core";
|
|
3
3
|
const vt = { class: "w-full relative" }, mt = {
|
|
4
4
|
key: 0,
|
|
@@ -9,7 +9,7 @@ const vt = { class: "w-full relative" }, mt = {
|
|
|
9
9
|
}, gt = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
12
|
-
}, bt = /* @__PURE__ */
|
|
12
|
+
}, bt = /* @__PURE__ */ A({
|
|
13
13
|
__name: "vs-layout-default",
|
|
14
14
|
props: {
|
|
15
15
|
ua: { default: "" },
|
|
@@ -36,7 +36,7 @@ const vt = { class: "w-full relative" }, mt = {
|
|
|
36
36
|
}, kt = {
|
|
37
37
|
key: 1,
|
|
38
38
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
39
|
-
}, _t = /* @__PURE__ */
|
|
39
|
+
}, _t = /* @__PURE__ */ A({
|
|
40
40
|
__name: "vs-layout-horizontal",
|
|
41
41
|
props: {
|
|
42
42
|
ua: { default: "" },
|
|
@@ -57,7 +57,7 @@ const vt = { class: "w-full relative" }, mt = {
|
|
|
57
57
|
}), $t = { class: "w-full relative" }, Ct = {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "text-red-500 text-[10px] absolute bottom-[-14px]"
|
|
60
|
-
}, Vt = /* @__PURE__ */
|
|
60
|
+
}, Vt = /* @__PURE__ */ A({
|
|
61
61
|
__name: "vs-layout-inline",
|
|
62
62
|
props: {
|
|
63
63
|
ua: { default: "" },
|
|
@@ -84,7 +84,7 @@ function me(o) {
|
|
|
84
84
|
})
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */
|
|
87
|
+
const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
|
|
88
88
|
__name: "vs-input-text",
|
|
89
89
|
props: /* @__PURE__ */ q({
|
|
90
90
|
style: { default: () => ({}) },
|
|
@@ -101,12 +101,12 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
|
|
|
101
101
|
emits: ["update:modelValue"],
|
|
102
102
|
setup(o) {
|
|
103
103
|
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
|
|
104
|
-
return (
|
|
104
|
+
return (r, a) => K((i(), u("input", {
|
|
105
105
|
type: "text",
|
|
106
|
-
"onUpdate:modelValue":
|
|
107
|
-
placeholder:
|
|
108
|
-
disabled:
|
|
109
|
-
class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600":
|
|
106
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
|
|
107
|
+
placeholder: r.placeholder,
|
|
108
|
+
disabled: r.disabled,
|
|
109
|
+
class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
|
|
110
110
|
style: {
|
|
111
111
|
border: "1px solid #CFD9E0"
|
|
112
112
|
}
|
|
@@ -114,7 +114,7 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
|
|
|
114
114
|
[ne, n.value]
|
|
115
115
|
]);
|
|
116
116
|
}
|
|
117
|
-
}), Bt = ["placeholder"], St = /* @__PURE__ */
|
|
117
|
+
}), Bt = ["placeholder"], St = /* @__PURE__ */ A({
|
|
118
118
|
__name: "vs-input-number",
|
|
119
119
|
props: /* @__PURE__ */ q({
|
|
120
120
|
style: { default: () => ({}) },
|
|
@@ -131,11 +131,11 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
|
|
|
131
131
|
emits: ["update:modelValue"],
|
|
132
132
|
setup(o) {
|
|
133
133
|
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
|
|
134
|
-
return (
|
|
134
|
+
return (r, a) => K((i(), u("input", {
|
|
135
135
|
type: "number",
|
|
136
136
|
step: "any",
|
|
137
|
-
"onUpdate:modelValue":
|
|
138
|
-
placeholder:
|
|
137
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
|
|
138
|
+
placeholder: r.placeholder,
|
|
139
139
|
class: B(["py-1.5 px-3 block w-full", [H(l)]]),
|
|
140
140
|
style: {
|
|
141
141
|
border: "1px solid #CFD9E0"
|
|
@@ -144,12 +144,12 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
|
|
|
144
144
|
[ne, n.value]
|
|
145
145
|
]);
|
|
146
146
|
}
|
|
147
|
-
}),
|
|
147
|
+
}), R = (o, e) => {
|
|
148
148
|
const l = o.__vccOpts || o;
|
|
149
|
-
for (const [n,
|
|
150
|
-
l[n] =
|
|
149
|
+
for (const [n, r] of e)
|
|
150
|
+
l[n] = r;
|
|
151
151
|
return l;
|
|
152
|
-
}, jt = {},
|
|
152
|
+
}, jt = {}, It = {
|
|
153
153
|
xmlns: "http://www.w3.org/2000/svg",
|
|
154
154
|
viewBox: "0 0 24 24",
|
|
155
155
|
fill: "none",
|
|
@@ -159,8 +159,8 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ I({
|
|
|
159
159
|
"stroke-linejoin": "round",
|
|
160
160
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
|
|
161
161
|
};
|
|
162
|
-
function
|
|
163
|
-
return i(), u("svg",
|
|
162
|
+
function At(o, e) {
|
|
163
|
+
return i(), u("svg", It, e[0] || (e[0] = [
|
|
164
164
|
t("path", {
|
|
165
165
|
stroke: "none",
|
|
166
166
|
d: "M0 0h24v24H0z",
|
|
@@ -169,7 +169,7 @@ function It(o, e) {
|
|
|
169
169
|
t("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
170
170
|
]));
|
|
171
171
|
}
|
|
172
|
-
const zt = /* @__PURE__ */
|
|
172
|
+
const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-center gap-[4px]" }, Et = ["value", "id", "disabled"], Ft = ["for"], Dt = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Ut = /* @__PURE__ */ A({
|
|
173
173
|
__name: "vs-checkbox-default",
|
|
174
174
|
props: {
|
|
175
175
|
value: { default: "" },
|
|
@@ -182,27 +182,27 @@ const zt = /* @__PURE__ */ T(jt, [["render", It]]), Ot = { class: "flex items-ce
|
|
|
182
182
|
},
|
|
183
183
|
emits: ["update:modelValue"],
|
|
184
184
|
setup(o, { emit: e }) {
|
|
185
|
-
const l = e, n = o,
|
|
185
|
+
const l = e, n = o, r = D({
|
|
186
186
|
get: () => n.modelValue,
|
|
187
|
-
set: (
|
|
187
|
+
set: (a) => l("update:modelValue", a)
|
|
188
188
|
});
|
|
189
|
-
return (
|
|
189
|
+
return (a, s) => (i(), u("div", Ot, [
|
|
190
190
|
K(t("input", {
|
|
191
191
|
type: "checkbox",
|
|
192
|
-
value:
|
|
193
|
-
"onUpdate:modelValue": s[0] || (s[0] = (d) =>
|
|
194
|
-
class: B(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed":
|
|
195
|
-
id:
|
|
196
|
-
disabled:
|
|
192
|
+
value: a.value,
|
|
193
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => r.value = d),
|
|
194
|
+
class: B(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": a.disabled }]),
|
|
195
|
+
id: a.id,
|
|
196
|
+
disabled: a.disabled
|
|
197
197
|
}, null, 10, Et), [
|
|
198
|
-
[Qe,
|
|
198
|
+
[Qe, r.value]
|
|
199
199
|
]),
|
|
200
200
|
t("label", {
|
|
201
|
-
for:
|
|
202
|
-
class: B(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed":
|
|
201
|
+
for: a.id,
|
|
202
|
+
class: B(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.disabled }])
|
|
203
203
|
}, [
|
|
204
204
|
t("div", {
|
|
205
|
-
class: B(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [
|
|
205
|
+
class: B(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [r.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
|
|
206
206
|
}, [
|
|
207
207
|
j(zt, {
|
|
208
208
|
height: "12",
|
|
@@ -210,17 +210,17 @@ const zt = /* @__PURE__ */ T(jt, [["render", It]]), Ot = { class: "flex items-ce
|
|
|
210
210
|
})
|
|
211
211
|
], 2),
|
|
212
212
|
t("span", Dt, [
|
|
213
|
-
ve(
|
|
214
|
-
oe(E(
|
|
213
|
+
ve(a.$slots, "default", {}, () => [
|
|
214
|
+
oe(E(a.label), 1)
|
|
215
215
|
])
|
|
216
216
|
])
|
|
217
217
|
], 10, Ft)
|
|
218
218
|
]));
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
220
|
+
}), Tt = ["name", "value", "disabled"], Rt = { class: "flex items-center gap-[6px] text-[14px]" }, Pt = {
|
|
221
221
|
key: 0,
|
|
222
222
|
class: "text-[16px]"
|
|
223
|
-
}, Nt = ["src"], Ht = /* @__PURE__ */
|
|
223
|
+
}, Nt = ["src"], Ht = /* @__PURE__ */ A({
|
|
224
224
|
__name: "vs-checkbox-buttons",
|
|
225
225
|
props: {
|
|
226
226
|
value: { type: [String, Number, Boolean], default: "" },
|
|
@@ -234,26 +234,26 @@ const zt = /* @__PURE__ */ T(jt, [["render", It]]), Ot = { class: "flex items-ce
|
|
|
234
234
|
},
|
|
235
235
|
emits: ["update:modelValue"],
|
|
236
236
|
setup(o, { emit: e }) {
|
|
237
|
-
const l = o, n = e,
|
|
237
|
+
const l = o, n = e, r = D({
|
|
238
238
|
get: () => l.modelValue,
|
|
239
239
|
set: (d) => {
|
|
240
240
|
n("update:modelValue", d);
|
|
241
241
|
}
|
|
242
|
-
}),
|
|
242
|
+
}), a = D(() => Array.isArray(r.value) ? r.value.includes(l.value) : r.value === !0 || r.value === l.value), s = D(() => l.style?.size === "xs" ? "p-1.5 text-xs" : l.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
|
|
243
243
|
return (d, p) => (i(), u("label", {
|
|
244
|
-
class: B(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [s.value,
|
|
244
|
+
class: B(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [s.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
|
|
245
245
|
}, [
|
|
246
246
|
K(t("input", {
|
|
247
247
|
type: "checkbox",
|
|
248
248
|
class: "hidden",
|
|
249
249
|
name: d.id,
|
|
250
250
|
value: d.value,
|
|
251
|
-
"onUpdate:modelValue": p[0] || (p[0] = (f) =>
|
|
251
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
|
|
252
252
|
disabled: d.disabled
|
|
253
|
-
}, null, 8,
|
|
254
|
-
[Qe,
|
|
253
|
+
}, null, 8, Tt), [
|
|
254
|
+
[Qe, r.value]
|
|
255
255
|
]),
|
|
256
|
-
t("span",
|
|
256
|
+
t("span", Rt, [
|
|
257
257
|
d.icon || d.imgUrl ? (i(), u("span", Pt, [
|
|
258
258
|
d.icon ? (i(), u("i", {
|
|
259
259
|
key: 0,
|
|
@@ -273,7 +273,7 @@ const zt = /* @__PURE__ */ T(jt, [["render", It]]), Ot = { class: "flex items-ce
|
|
|
273
273
|
])
|
|
274
274
|
], 2));
|
|
275
275
|
}
|
|
276
|
-
}), qt = { class: "flex items-center" }, tt = /* @__PURE__ */
|
|
276
|
+
}), qt = { class: "flex items-center" }, tt = /* @__PURE__ */ A({
|
|
277
277
|
__name: "vs-input-checkbox-item",
|
|
278
278
|
props: {
|
|
279
279
|
value: { default: "" },
|
|
@@ -290,7 +290,7 @@ const zt = /* @__PURE__ */ T(jt, [["render", It]]), Ot = { class: "flex items-ce
|
|
|
290
290
|
},
|
|
291
291
|
emits: ["update:modelValue"],
|
|
292
292
|
setup(o, { emit: e }) {
|
|
293
|
-
const l = o, n = e,
|
|
293
|
+
const l = o, n = e, r = `radio-${Math.floor(Math.random() * 1e4)}`, a = D({
|
|
294
294
|
get: () => Array.isArray(l.modelValue) ? Array.isArray(l.modelValue) && l.modelValue.includes(l.value) : l.modelValue,
|
|
295
295
|
set: (d) => {
|
|
296
296
|
if (Array.isArray(l.modelValue)) {
|
|
@@ -306,9 +306,9 @@ const zt = /* @__PURE__ */ T(jt, [["render", It]]), Ot = { class: "flex items-ce
|
|
|
306
306
|
label: d.label,
|
|
307
307
|
info: d.option?.info,
|
|
308
308
|
disabled: d.disabled,
|
|
309
|
-
modelValue:
|
|
310
|
-
"onUpdate:modelValue": p[0] || (p[0] = (f) =>
|
|
311
|
-
id:
|
|
309
|
+
modelValue: a.value,
|
|
310
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => a.value = f),
|
|
311
|
+
id: r,
|
|
312
312
|
icon: d.icon,
|
|
313
313
|
imgUrl: d.imgUrl,
|
|
314
314
|
style: fe(d.style),
|
|
@@ -341,7 +341,7 @@ function Kt(o, e) {
|
|
|
341
341
|
t("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
342
342
|
]));
|
|
343
343
|
}
|
|
344
|
-
const Zt = /* @__PURE__ */
|
|
344
|
+
const Zt = /* @__PURE__ */ R(Gt, [["render", Kt]]), Wt = {}, Qt = {
|
|
345
345
|
xmlns: "http://www.w3.org/2000/svg",
|
|
346
346
|
width: "24",
|
|
347
347
|
height: "24",
|
|
@@ -364,13 +364,13 @@ function Xt(o, e) {
|
|
|
364
364
|
t("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
|
|
365
365
|
]));
|
|
366
366
|
}
|
|
367
|
-
const Yt = /* @__PURE__ */
|
|
367
|
+
const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
|
|
368
368
|
key: 0,
|
|
369
369
|
class: "flex items-start gap-x-1"
|
|
370
370
|
}, tl = {
|
|
371
371
|
key: 0,
|
|
372
372
|
class: "text-red-500 text-[14px]"
|
|
373
|
-
}, ll = ["title"], ol = ["disabled"], lt = /* @__PURE__ */
|
|
373
|
+
}, ll = ["title"], ol = ["disabled"], lt = /* @__PURE__ */ A({
|
|
374
374
|
__name: "vs-input-switcher",
|
|
375
375
|
props: /* @__PURE__ */ q({
|
|
376
376
|
rules: { default: () => [] },
|
|
@@ -392,10 +392,10 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
392
392
|
emits: ["update:modelValue"],
|
|
393
393
|
setup(o) {
|
|
394
394
|
const e = o, l = G(o, "modelValue");
|
|
395
|
-
return (n,
|
|
395
|
+
return (n, r) => e.view === "checkbox" ? (i(), u("div", el, [
|
|
396
396
|
j(tt, {
|
|
397
397
|
modelValue: l.value,
|
|
398
|
-
"onUpdate:modelValue":
|
|
398
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
|
|
399
399
|
label: n.text,
|
|
400
400
|
error: n.error || ""
|
|
401
401
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
@@ -404,7 +404,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
404
404
|
key: 1,
|
|
405
405
|
class: "cursor-pointer",
|
|
406
406
|
title: n.i,
|
|
407
|
-
onClick:
|
|
407
|
+
onClick: r[1] || (r[1] = re(() => {
|
|
408
408
|
}, ["prevent"]))
|
|
409
409
|
}, [
|
|
410
410
|
j(H(Yt), { class: "text-gray-500 w-[14px] h-[14px]" })
|
|
@@ -414,7 +414,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
414
414
|
type: "button",
|
|
415
415
|
class: B(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [l.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
|
|
416
416
|
disabled: n.disabled,
|
|
417
|
-
onClick:
|
|
417
|
+
onClick: r[2] || (r[2] = (a) => l.value = !l.value)
|
|
418
418
|
}, [
|
|
419
419
|
t("span", {
|
|
420
420
|
"data-state": "checked",
|
|
@@ -422,7 +422,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
422
422
|
}, null, 2)
|
|
423
423
|
], 10, ol));
|
|
424
424
|
}
|
|
425
|
-
}),
|
|
425
|
+
}), al = ["innerHTML"], qe = /* @__PURE__ */ A({
|
|
426
426
|
__name: "vs-input-static",
|
|
427
427
|
props: {
|
|
428
428
|
text: { default: "" },
|
|
@@ -439,9 +439,9 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
439
439
|
return (e, l) => (i(), u("div", {
|
|
440
440
|
class: B(e.customClass),
|
|
441
441
|
innerHTML: e.html ? e.html : e.text
|
|
442
|
-
}, null, 10,
|
|
442
|
+
}, null, 10, al));
|
|
443
443
|
}
|
|
444
|
-
}),
|
|
444
|
+
}), rl = ["placeholder", "disabled", "name"], sl = /* @__PURE__ */ A({
|
|
445
445
|
__name: "vs-input-mask",
|
|
446
446
|
props: /* @__PURE__ */ q({
|
|
447
447
|
name: {},
|
|
@@ -459,12 +459,12 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
459
459
|
}),
|
|
460
460
|
emits: ["update:modelValue"],
|
|
461
461
|
setup(o) {
|
|
462
|
-
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue"),
|
|
463
|
-
let
|
|
462
|
+
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue"), r = $(null);
|
|
463
|
+
let a = null;
|
|
464
464
|
return ue(async () => {
|
|
465
|
-
if (
|
|
465
|
+
if (r.value) {
|
|
466
466
|
const { default: s } = await import("./index-W-qQIppj.js");
|
|
467
|
-
|
|
467
|
+
a = s(r.value, {
|
|
468
468
|
mask: e.mask || "",
|
|
469
469
|
definitions: {
|
|
470
470
|
9: /[0-9]/,
|
|
@@ -473,16 +473,16 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
473
473
|
},
|
|
474
474
|
lazy: !1,
|
|
475
475
|
placeholderChar: e.placeholder
|
|
476
|
-
}),
|
|
477
|
-
n.value = e.unmask ?
|
|
478
|
-
}),
|
|
479
|
-
n.value = e.unmask ?
|
|
480
|
-
}),
|
|
476
|
+
}), a.on("accept", () => {
|
|
477
|
+
n.value = e.unmask ? a.unmaskedValue : a.value;
|
|
478
|
+
}), a.on("complete", () => {
|
|
479
|
+
n.value = e.unmask ? a.unmaskedValue : a.value;
|
|
480
|
+
}), a.value = n.value ?? "";
|
|
481
481
|
}
|
|
482
482
|
}), ut(() => {
|
|
483
|
-
|
|
483
|
+
a?.destroy();
|
|
484
484
|
}), se(() => e.mask, (s) => {
|
|
485
|
-
|
|
485
|
+
a && a.updateOptions({
|
|
486
486
|
mask: s,
|
|
487
487
|
definitions: {
|
|
488
488
|
9: /[0-9]/,
|
|
@@ -491,11 +491,11 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
493
|
}), se(n, (s) => {
|
|
494
|
-
|
|
494
|
+
a && a.unmaskedValue !== s && (a.value = s || "");
|
|
495
495
|
}), (s, d) => (i(), u("input", {
|
|
496
496
|
type: "text",
|
|
497
497
|
ref_key: "inputEl",
|
|
498
|
-
ref:
|
|
498
|
+
ref: r,
|
|
499
499
|
placeholder: s.placeholder,
|
|
500
500
|
disabled: s.disabled,
|
|
501
501
|
name: s.name,
|
|
@@ -503,9 +503,9 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
503
503
|
style: {
|
|
504
504
|
border: "1px solid #CFD9E0"
|
|
505
505
|
}
|
|
506
|
-
}, null, 10,
|
|
506
|
+
}, null, 10, rl));
|
|
507
507
|
}
|
|
508
|
-
}), nl = { class: "relative w-full bg-white rounded-lg" }, il = ["placeholder", "disabled"], ul = /* @__PURE__ */
|
|
508
|
+
}), nl = { class: "relative w-full bg-white rounded-lg" }, il = ["placeholder", "disabled"], ul = /* @__PURE__ */ A({
|
|
509
509
|
__name: "vs-input-email",
|
|
510
510
|
props: /* @__PURE__ */ q({
|
|
511
511
|
style: { default: () => ({}) },
|
|
@@ -522,14 +522,14 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
522
522
|
emits: ["update:modelValue"],
|
|
523
523
|
setup(o) {
|
|
524
524
|
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
|
|
525
|
-
return (
|
|
526
|
-
|
|
525
|
+
return (r, a) => (i(), u("div", nl, [
|
|
526
|
+
a[1] || (a[1] = ae('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
|
|
527
527
|
K(t("input", {
|
|
528
528
|
type: "email",
|
|
529
|
-
"onUpdate:modelValue":
|
|
530
|
-
placeholder:
|
|
531
|
-
disabled:
|
|
532
|
-
class: B(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600":
|
|
529
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
|
|
530
|
+
placeholder: r.placeholder,
|
|
531
|
+
disabled: r.disabled,
|
|
532
|
+
class: B(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
|
|
533
533
|
style: {
|
|
534
534
|
border: "1px solid #CFD9E0"
|
|
535
535
|
}
|
|
@@ -538,7 +538,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
538
538
|
])
|
|
539
539
|
]));
|
|
540
540
|
}
|
|
541
|
-
}), dl = ["value", "disabled"], cl = { class: "text-[13px] text-gray-700" }, pl = /* @__PURE__ */
|
|
541
|
+
}), dl = ["value", "disabled"], cl = { class: "text-[13px] text-gray-700" }, pl = /* @__PURE__ */ A({
|
|
542
542
|
__name: "vs-input-radio-default",
|
|
543
543
|
props: /* @__PURE__ */ q({
|
|
544
544
|
style: {},
|
|
@@ -561,7 +561,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
561
561
|
class: B(["flex items-center gap-0", [l.customClass]])
|
|
562
562
|
}, [
|
|
563
563
|
K(t("input", {
|
|
564
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
564
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
|
|
565
565
|
type: "radio",
|
|
566
566
|
value: l.value,
|
|
567
567
|
disabled: l.disabled,
|
|
@@ -583,7 +583,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
583
583
|
t("span", cl, E(l.text), 1)
|
|
584
584
|
], 2));
|
|
585
585
|
}
|
|
586
|
-
}), fl = ["value", "disabled"], vl = { class: "text-[13px] text-gray-700" }, ml = /* @__PURE__ */
|
|
586
|
+
}), fl = ["value", "disabled"], vl = { class: "text-[13px] text-gray-700" }, ml = /* @__PURE__ */ A({
|
|
587
587
|
__name: "vs-input-radio-buttons",
|
|
588
588
|
props: /* @__PURE__ */ q({
|
|
589
589
|
style: {},
|
|
@@ -609,7 +609,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
609
609
|
]])
|
|
610
610
|
}, [
|
|
611
611
|
K(t("input", {
|
|
612
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
612
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
|
|
613
613
|
type: "radio",
|
|
614
614
|
value: l.value,
|
|
615
615
|
disabled: l.disabled,
|
|
@@ -623,7 +623,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
623
623
|
}), hl = {
|
|
624
624
|
"vs-input-radio-default": pl,
|
|
625
625
|
"vs-input-radio-buttons": ml
|
|
626
|
-
}, Ge = /* @__PURE__ */
|
|
626
|
+
}, Ge = /* @__PURE__ */ A({
|
|
627
627
|
__name: "vs-input-radio",
|
|
628
628
|
props: /* @__PURE__ */ q({
|
|
629
629
|
options: {},
|
|
@@ -643,20 +643,20 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
643
643
|
emits: ["update:modelValue"],
|
|
644
644
|
setup(o) {
|
|
645
645
|
const e = o, l = G(o, "modelValue"), n = D(() => hl[`vs-input-radio-${e.view}`]);
|
|
646
|
-
return (
|
|
647
|
-
class: B([
|
|
646
|
+
return (r, a) => (i(), u("div", {
|
|
647
|
+
class: B([r.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
|
|
648
648
|
}, [
|
|
649
|
-
(i(!0), u(Q, null, Y(
|
|
649
|
+
(i(!0), u(Q, null, Y(r.options, (s) => (i(), X(xe(n.value), Ce({
|
|
650
650
|
key: s?.id,
|
|
651
651
|
text: s.text,
|
|
652
652
|
value: s.id.toString(),
|
|
653
653
|
checked: l.value === s.id,
|
|
654
654
|
modelValue: l.value,
|
|
655
|
-
"onUpdate:modelValue":
|
|
656
|
-
}, { ref_for: !0 },
|
|
655
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => l.value = d)
|
|
656
|
+
}, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
|
|
657
657
|
], 2));
|
|
658
658
|
}
|
|
659
|
-
}), gl = /* @__PURE__ */
|
|
659
|
+
}), gl = /* @__PURE__ */ A({
|
|
660
660
|
__name: "vs-input-checkbox",
|
|
661
661
|
props: {
|
|
662
662
|
options: { default: () => [] },
|
|
@@ -675,10 +675,10 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
675
675
|
},
|
|
676
676
|
emits: ["update:modelValue"],
|
|
677
677
|
setup(o, { emit: e }) {
|
|
678
|
-
const l = o, n = e,
|
|
678
|
+
const l = o, n = e, r = $([]), a = dt({}), s = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
|
|
679
679
|
try {
|
|
680
680
|
const c = await fetch(`/api/suggest/${l.data}`).then((g) => g.json());
|
|
681
|
-
|
|
681
|
+
r.value = c?.data || c;
|
|
682
682
|
} catch (c) {
|
|
683
683
|
console.error(c);
|
|
684
684
|
}
|
|
@@ -686,65 +686,65 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
686
686
|
return se(
|
|
687
687
|
() => l.modelValue,
|
|
688
688
|
(c) => {
|
|
689
|
-
if (typeof c == "boolean" &&
|
|
690
|
-
const g = s(
|
|
691
|
-
|
|
689
|
+
if (typeof c == "boolean" && r.value.length === 1) {
|
|
690
|
+
const g = s(r.value[0]);
|
|
691
|
+
a[g] = c;
|
|
692
692
|
} else if (Array.isArray(c)) {
|
|
693
693
|
const g = new Set(c);
|
|
694
|
-
|
|
694
|
+
r.value.forEach((v) => {
|
|
695
695
|
if (!v.disabled) {
|
|
696
696
|
const M = s(v);
|
|
697
|
-
|
|
697
|
+
a[M] = g.has(M);
|
|
698
698
|
}
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
702
|
{ immediate: !0 }
|
|
703
703
|
), se(
|
|
704
|
-
|
|
704
|
+
a,
|
|
705
705
|
() => {
|
|
706
|
-
if (!
|
|
706
|
+
if (!r.value.length) {
|
|
707
707
|
n("update:modelValue", null);
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
const c = Object.entries(
|
|
710
|
+
const c = Object.entries(a).filter(([, g]) => g).map(([g]) => g);
|
|
711
711
|
n("update:modelValue", c.length === 0 ? null : c);
|
|
712
712
|
},
|
|
713
713
|
{ deep: !0 }
|
|
714
714
|
), ue(() => {
|
|
715
715
|
if (l.data)
|
|
716
716
|
f().then(() => {
|
|
717
|
-
if (typeof l.modelValue == "boolean" &&
|
|
718
|
-
const c = s(
|
|
719
|
-
|
|
717
|
+
if (typeof l.modelValue == "boolean" && r.value.length === 1) {
|
|
718
|
+
const c = s(r.value[0]);
|
|
719
|
+
a[c] = l.modelValue;
|
|
720
720
|
} else if (Array.isArray(l.modelValue)) {
|
|
721
721
|
const c = new Set(l.modelValue);
|
|
722
|
-
|
|
722
|
+
r.value.forEach((g) => {
|
|
723
723
|
if (!g.disabled) {
|
|
724
724
|
const v = s(g);
|
|
725
|
-
|
|
725
|
+
a[v] = c.has(v);
|
|
726
726
|
}
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
|
-
else if (
|
|
731
|
-
const c = s(
|
|
732
|
-
|
|
730
|
+
else if (r.value = l.options, typeof l.modelValue == "boolean" && r.value.length === 1) {
|
|
731
|
+
const c = s(r.value[0]);
|
|
732
|
+
a[c] = l.modelValue;
|
|
733
733
|
} else if (Array.isArray(l.modelValue)) {
|
|
734
734
|
const c = new Set(l.modelValue);
|
|
735
|
-
|
|
735
|
+
r.value.forEach((g) => {
|
|
736
736
|
if (!g.disabled) {
|
|
737
737
|
const v = s(g);
|
|
738
|
-
|
|
738
|
+
a[v] = c.has(v);
|
|
739
739
|
}
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
742
|
}), (c, g) => (i(), u("div", {
|
|
743
743
|
class: B(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
|
|
744
744
|
}, [
|
|
745
|
-
(i(!0), u(Q, null, Y(
|
|
746
|
-
modelValue:
|
|
747
|
-
"onUpdate:modelValue": (M) =>
|
|
745
|
+
(i(!0), u(Q, null, Y(r.value, (v) => (i(), X(tt, {
|
|
746
|
+
modelValue: a[s(v)],
|
|
747
|
+
"onUpdate:modelValue": (M) => a[s(v)] = M,
|
|
748
748
|
value: s(v),
|
|
749
749
|
class: B(p(c.colSpan)),
|
|
750
750
|
disabled: v.disabled,
|
|
@@ -757,7 +757,7 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
757
757
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
|
|
758
758
|
], 2));
|
|
759
759
|
}
|
|
760
|
-
}), bl = /* @__PURE__ */
|
|
760
|
+
}), bl = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-54f9e19c"]]), yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ A({
|
|
761
761
|
__name: "vs-input-date1",
|
|
762
762
|
props: /* @__PURE__ */ q({
|
|
763
763
|
style: { default: () => ({}) },
|
|
@@ -774,11 +774,11 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
774
774
|
emits: ["update:modelValue"],
|
|
775
775
|
setup(o) {
|
|
776
776
|
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
|
|
777
|
-
return (
|
|
777
|
+
return (r, a) => K((i(), u("input", {
|
|
778
778
|
type: "date",
|
|
779
|
-
"onUpdate:modelValue":
|
|
780
|
-
placeholder:
|
|
781
|
-
disabled:
|
|
779
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
|
|
780
|
+
placeholder: r.placeholder,
|
|
781
|
+
disabled: r.disabled,
|
|
782
782
|
class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l)]]),
|
|
783
783
|
style: {
|
|
784
784
|
border: "1px solid #CFD9E0"
|
|
@@ -789,21 +789,21 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
789
789
|
}
|
|
790
790
|
}), wl = async (o, e, l, n) => {
|
|
791
791
|
try {
|
|
792
|
-
const
|
|
793
|
-
return
|
|
792
|
+
const r = new FormData();
|
|
793
|
+
return r.append("unique", "true"), r.append("file", o), (await fetch(
|
|
794
794
|
`/file/upload/uploads?id=${e || ""}&form=${l || ""}&table=${n || ""}`,
|
|
795
795
|
{
|
|
796
796
|
method: "POST",
|
|
797
|
-
body:
|
|
797
|
+
body: r
|
|
798
798
|
}
|
|
799
799
|
).then((s) => s.json()))?.result;
|
|
800
|
-
} catch (
|
|
800
|
+
} catch (r) {
|
|
801
801
|
return pe({
|
|
802
802
|
type: "error",
|
|
803
803
|
title: "Помилка!",
|
|
804
804
|
message: "Сталась помилка під час завантаження файлу",
|
|
805
805
|
position: "right-bottom"
|
|
806
|
-
}), console.error("Сталась помилка завантаження файлу",
|
|
806
|
+
}), console.error("Сталась помилка завантаження файлу", r), null;
|
|
807
807
|
}
|
|
808
808
|
}, kl = async (o) => {
|
|
809
809
|
try {
|
|
@@ -813,8 +813,8 @@ const Yt = /* @__PURE__ */ T(Wt, [["render", Xt]]), el = {
|
|
|
813
813
|
}
|
|
814
814
|
}, Je = async (o) => {
|
|
815
815
|
try {
|
|
816
|
-
const e = await fetch(`file/download/files/uploads${o}`), l = await e.arrayBuffer(), n = e.headers["content-type"],
|
|
817
|
-
s.setAttribute("download", o), s.href = window.URL.createObjectURL(
|
|
816
|
+
const e = await fetch(`file/download/files/uploads${o}`), l = await e.arrayBuffer(), n = e.headers["content-type"], r = new TextDecoder("utf-8").decode(l), a = new Blob([r], { type: n }), s = document.createElement("a");
|
|
817
|
+
s.setAttribute("download", o), s.href = window.URL.createObjectURL(a), s.click();
|
|
818
818
|
} catch (e) {
|
|
819
819
|
console.error(e.message);
|
|
820
820
|
}
|
|
@@ -835,7 +835,7 @@ function Cl(o, e) {
|
|
|
835
835
|
t("path", { d: "M12 5v14" }, null, -1)
|
|
836
836
|
]));
|
|
837
837
|
}
|
|
838
|
-
const je = /* @__PURE__ */
|
|
838
|
+
const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ml = {
|
|
839
839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
840
840
|
class: "icon icon-tabler icon-tabler-file-text",
|
|
841
841
|
width: "44",
|
|
@@ -847,12 +847,12 @@ const je = /* @__PURE__ */ T(_l, [["render", Cl]]), Vl = {}, Ml = {
|
|
|
847
847
|
"stroke-linecap": "round",
|
|
848
848
|
"stroke-linejoin": "round"
|
|
849
849
|
};
|
|
850
|
-
function Ll(o, e, l, n,
|
|
850
|
+
function Ll(o, e, l, n, r, a) {
|
|
851
851
|
return i(), u("svg", Ml, e[0] || (e[0] = [
|
|
852
|
-
|
|
852
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
|
|
853
853
|
]));
|
|
854
854
|
}
|
|
855
|
-
const Bl = /* @__PURE__ */
|
|
855
|
+
const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
|
|
856
856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
857
857
|
class: "icon icon-tabler icon-tabler-table",
|
|
858
858
|
width: "44",
|
|
@@ -864,7 +864,7 @@ const Bl = /* @__PURE__ */ T(Vl, [["render", Ll]]), Sl = {}, jl = {
|
|
|
864
864
|
"stroke-linecap": "round",
|
|
865
865
|
"stroke-linejoin": "round"
|
|
866
866
|
};
|
|
867
|
-
function
|
|
867
|
+
function Il(o, e, l, n, r, a) {
|
|
868
868
|
return i(), u("svg", jl, e[0] || (e[0] = [
|
|
869
869
|
t("path", {
|
|
870
870
|
stroke: "none",
|
|
@@ -892,7 +892,7 @@ function Al(o, e, l, n, a, r) {
|
|
|
892
892
|
}, null, -1)
|
|
893
893
|
]));
|
|
894
894
|
}
|
|
895
|
-
const
|
|
895
|
+
const Al = /* @__PURE__ */ R(Sl, [["render", Il]]), zl = {}, Ol = {
|
|
896
896
|
xmlns: "http://www.w3.org/2000/svg",
|
|
897
897
|
width: "24",
|
|
898
898
|
height: "24",
|
|
@@ -904,12 +904,12 @@ const Il = /* @__PURE__ */ T(Sl, [["render", Al]]), zl = {}, Ol = {
|
|
|
904
904
|
"stroke-linejoin": "round",
|
|
905
905
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
|
|
906
906
|
};
|
|
907
|
-
function El(o, e, l, n,
|
|
907
|
+
function El(o, e, l, n, r, a) {
|
|
908
908
|
return i(), u("svg", Ol, e[0] || (e[0] = [
|
|
909
|
-
|
|
909
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
|
|
910
910
|
]));
|
|
911
911
|
}
|
|
912
|
-
const Fl = /* @__PURE__ */
|
|
912
|
+
const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
|
|
913
913
|
xmlns: "http://www.w3.org/2000/svg",
|
|
914
914
|
class: "icon icon-tabler icon-tabler-file-zip",
|
|
915
915
|
width: "44",
|
|
@@ -921,12 +921,12 @@ const Fl = /* @__PURE__ */ T(zl, [["render", El]]), Dl = {}, Ul = {
|
|
|
921
921
|
"stroke-linecap": "round",
|
|
922
922
|
"stroke-linejoin": "round"
|
|
923
923
|
};
|
|
924
|
-
function
|
|
924
|
+
function Tl(o, e, l, n, r, a) {
|
|
925
925
|
return i(), u("svg", Ul, e[0] || (e[0] = [
|
|
926
|
-
|
|
926
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
|
|
927
927
|
]));
|
|
928
928
|
}
|
|
929
|
-
const
|
|
929
|
+
const Rl = /* @__PURE__ */ R(Dl, [["render", Tl]]), Pl = {}, Nl = {
|
|
930
930
|
xmlns: "http://www.w3.org/2000/svg",
|
|
931
931
|
class: "icon icon-tabler icon-tabler-file-code",
|
|
932
932
|
width: "44",
|
|
@@ -938,12 +938,12 @@ const Tl = /* @__PURE__ */ T(Dl, [["render", Rl]]), Pl = {}, Nl = {
|
|
|
938
938
|
"stroke-linecap": "round",
|
|
939
939
|
"stroke-linejoin": "round"
|
|
940
940
|
};
|
|
941
|
-
function Hl(o, e, l, n,
|
|
941
|
+
function Hl(o, e, l, n, r, a) {
|
|
942
942
|
return i(), u("svg", Nl, e[0] || (e[0] = [
|
|
943
|
-
|
|
943
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
|
|
944
944
|
]));
|
|
945
945
|
}
|
|
946
|
-
const ql = /* @__PURE__ */
|
|
946
|
+
const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
|
|
947
947
|
if (!o) return "";
|
|
948
948
|
const e = o?.split(".");
|
|
949
949
|
return e[e.length - 1];
|
|
@@ -955,7 +955,7 @@ const ql = /* @__PURE__ */ T(Pl, [["render", Hl]]), Gl = (o) => {
|
|
|
955
955
|
textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
|
|
956
956
|
documentsFormat: ["pdf"]
|
|
957
957
|
};
|
|
958
|
-
return l.imageFormat.includes(e) ? "img" : l.sheetsFormat.includes(e) ?
|
|
958
|
+
return l.imageFormat.includes(e) ? "img" : l.sheetsFormat.includes(e) ? Al : l.textsFormat.includes(e) ? ql : l.documentsFormat.includes(e) ? Bl : l.archivesFormat.includes(e) ? Rl : Fl;
|
|
959
959
|
}, Kl = {}, Zl = {
|
|
960
960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
961
961
|
width: "24",
|
|
@@ -970,10 +970,10 @@ const ql = /* @__PURE__ */ T(Pl, [["render", Hl]]), Gl = (o) => {
|
|
|
970
970
|
};
|
|
971
971
|
function Wl(o, e) {
|
|
972
972
|
return i(), u("svg", Zl, e[0] || (e[0] = [
|
|
973
|
-
|
|
973
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
|
|
974
974
|
]));
|
|
975
975
|
}
|
|
976
|
-
const
|
|
976
|
+
const Ie = /* @__PURE__ */ R(Kl, [["render", Wl]]), Ql = {}, Xl = {
|
|
977
977
|
xmlns: "http://www.w3.org/2000/svg",
|
|
978
978
|
width: "24",
|
|
979
979
|
height: "24",
|
|
@@ -997,7 +997,7 @@ function Yl(o, e) {
|
|
|
997
997
|
t("path", { d: "M12 4l0 12" }, null, -1)
|
|
998
998
|
]));
|
|
999
999
|
}
|
|
1000
|
-
const ot = /* @__PURE__ */
|
|
1000
|
+
const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, to = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, lo = /* @__PURE__ */ A({
|
|
1001
1001
|
__name: "vs-input-file-list-item",
|
|
1002
1002
|
props: /* @__PURE__ */ q({
|
|
1003
1003
|
format: {},
|
|
@@ -1018,26 +1018,26 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1018
1018
|
emits: ["update:value", "update:item"],
|
|
1019
1019
|
setup(o) {
|
|
1020
1020
|
const e = G(o, "value"), l = G(o, "item"), n = o;
|
|
1021
|
-
return (
|
|
1021
|
+
return (r, a) => (i(), u("div", eo, [
|
|
1022
1022
|
(i(), X(xe(H(Jl)(l.value)), {
|
|
1023
1023
|
src: l.value,
|
|
1024
1024
|
alt: "file",
|
|
1025
1025
|
class: "w-full h-full object-cover cursor-pointer",
|
|
1026
|
-
onClick:
|
|
1026
|
+
onClick: a[0] || (a[0] = (s) => H(Je)(l.value))
|
|
1027
1027
|
}, null, 8, ["src"])),
|
|
1028
1028
|
t("div", to, [
|
|
1029
1029
|
t("button", {
|
|
1030
1030
|
type: "button",
|
|
1031
|
-
onClick:
|
|
1031
|
+
onClick: a[1] || (a[1] = (s) => {
|
|
1032
1032
|
H(kl)(l.value), e.value = n.multiple ? e.value?.filter((d) => d !== l.value) : "";
|
|
1033
1033
|
}),
|
|
1034
1034
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
|
|
1035
1035
|
}, [
|
|
1036
|
-
j(
|
|
1036
|
+
j(Ie, { class: "w-4 h-4" })
|
|
1037
1037
|
]),
|
|
1038
1038
|
t("button", {
|
|
1039
1039
|
type: "button",
|
|
1040
|
-
onClick:
|
|
1040
|
+
onClick: a[2] || (a[2] = (s) => H(Je)(l.value)),
|
|
1041
1041
|
class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
|
|
1042
1042
|
}, [
|
|
1043
1043
|
j(ot, { class: "w-4 h-4" })
|
|
@@ -1045,10 +1045,10 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1045
1045
|
])
|
|
1046
1046
|
]));
|
|
1047
1047
|
}
|
|
1048
|
-
}), Ke = /* @__PURE__ */
|
|
1048
|
+
}), Ke = /* @__PURE__ */ R(lo, [["__scopeId", "data-v-0ca886b3"]]), oo = { class: "flex items-center gap-x-2" }, ao = {
|
|
1049
1049
|
key: 1,
|
|
1050
1050
|
class: "flex items-center flex-wrap gap-2"
|
|
1051
|
-
},
|
|
1051
|
+
}, ro = /* @__PURE__ */ A({
|
|
1052
1052
|
__name: "vs-input-file",
|
|
1053
1053
|
props: /* @__PURE__ */ q({
|
|
1054
1054
|
format: {},
|
|
@@ -1066,7 +1066,7 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1066
1066
|
}),
|
|
1067
1067
|
emits: ["update:modelValue"],
|
|
1068
1068
|
setup(o) {
|
|
1069
|
-
const e = o, l = G(o, "modelValue"), n = $(null),
|
|
1069
|
+
const e = o, l = G(o, "modelValue"), n = $(null), r = (s) => Array.isArray(l.value) && l.value[s] || "", a = async (s) => {
|
|
1070
1070
|
if (e.format) {
|
|
1071
1071
|
const f = s.target.files?.[0];
|
|
1072
1072
|
if (!f || !f.name.endsWith(e.format))
|
|
@@ -1083,7 +1083,7 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1083
1083
|
ref_key: "fileInput",
|
|
1084
1084
|
ref: n,
|
|
1085
1085
|
type: "file",
|
|
1086
|
-
onChange:
|
|
1086
|
+
onChange: a
|
|
1087
1087
|
}, null, 544),
|
|
1088
1088
|
!s.multiple && l.value ? (i(), X(Ke, {
|
|
1089
1089
|
key: 0,
|
|
@@ -1091,13 +1091,13 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1091
1091
|
"onUpdate:item": d[0] || (d[0] = (p) => l.value = p),
|
|
1092
1092
|
value: l.value,
|
|
1093
1093
|
"onUpdate:value": d[1] || (d[1] = (p) => l.value = p)
|
|
1094
|
-
}, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div",
|
|
1094
|
+
}, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ao, [
|
|
1095
1095
|
(i(!0), u(Q, null, Y(l.value, (p, f) => (i(), X(Ke, {
|
|
1096
1096
|
multiple: s.multiple,
|
|
1097
1097
|
key: f,
|
|
1098
1098
|
value: l.value,
|
|
1099
1099
|
"onUpdate:value": d[2] || (d[2] = (c) => l.value = c),
|
|
1100
|
-
item:
|
|
1100
|
+
item: r(f)
|
|
1101
1101
|
}, null, 8, ["multiple", "value", "item"]))), 128)),
|
|
1102
1102
|
t("div", {
|
|
1103
1103
|
onClick: d[3] || (d[3] = (p) => !s.disabled && n.value?.click()),
|
|
@@ -1118,7 +1118,7 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1118
1118
|
], 2))
|
|
1119
1119
|
]));
|
|
1120
1120
|
}
|
|
1121
|
-
}), so = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Be = /* @__PURE__ */
|
|
1121
|
+
}), so = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Be = /* @__PURE__ */ A({
|
|
1122
1122
|
__name: "vs-widget-file-info",
|
|
1123
1123
|
props: {
|
|
1124
1124
|
item: { default: null }
|
|
@@ -1135,24 +1135,24 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1135
1135
|
return "";
|
|
1136
1136
|
}
|
|
1137
1137
|
});
|
|
1138
|
-
function n(
|
|
1139
|
-
if (
|
|
1140
|
-
return `${
|
|
1141
|
-
const
|
|
1142
|
-
return
|
|
1138
|
+
function n(r) {
|
|
1139
|
+
if (r < 1024)
|
|
1140
|
+
return `${r} B`;
|
|
1141
|
+
const a = r / 1024;
|
|
1142
|
+
return a < 1024 ? `${a.toFixed(2)} KB` : `${(a / 1024).toFixed(2)} MB`;
|
|
1143
1143
|
}
|
|
1144
|
-
return (
|
|
1145
|
-
|
|
1144
|
+
return (r, a) => (i(), u(Q, null, [
|
|
1145
|
+
a[1] || (a[1] = ae('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
|
|
1146
1146
|
t("div", so, [
|
|
1147
|
-
t("p", no, E(
|
|
1147
|
+
t("p", no, E(r.item?.uploaded_name), 1),
|
|
1148
1148
|
t("p", io, [
|
|
1149
|
-
t("span", null, E(
|
|
1149
|
+
t("span", null, E(r.item?.username), 1),
|
|
1150
1150
|
K(t("span", uo, "|", 512), [
|
|
1151
|
-
[De,
|
|
1151
|
+
[De, r.item?.username]
|
|
1152
1152
|
]),
|
|
1153
1153
|
t("span", null, E(l.value), 1),
|
|
1154
|
-
|
|
1155
|
-
t("span", co, E(n(
|
|
1154
|
+
a[0] || (a[0] = t("span", { class: "px-[5px]" }, "|", -1)),
|
|
1155
|
+
t("span", co, E(n(r.item?.size)), 1)
|
|
1156
1156
|
])
|
|
1157
1157
|
])
|
|
1158
1158
|
], 64));
|
|
@@ -1169,7 +1169,7 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1169
1169
|
}, ho = ["href"], go = {
|
|
1170
1170
|
key: 3,
|
|
1171
1171
|
class: "flex gap-x-3 w-full items-center"
|
|
1172
|
-
}, bo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, yo = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, xo = { class: "inline-block" }, wo = { class: "inline-block" }, ko = /* @__PURE__ */
|
|
1172
|
+
}, bo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, yo = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, xo = { class: "inline-block" }, wo = { class: "inline-block" }, ko = /* @__PURE__ */ A({
|
|
1173
1173
|
__name: "vs-widget-file-item",
|
|
1174
1174
|
props: {
|
|
1175
1175
|
item: { default: null },
|
|
@@ -1179,10 +1179,10 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1179
1179
|
emits: ["update", "openModal", "openLightbox"],
|
|
1180
1180
|
setup(o, { emit: e }) {
|
|
1181
1181
|
const l = o, n = e;
|
|
1182
|
-
function
|
|
1182
|
+
function r(c) {
|
|
1183
1183
|
return ["pdf", "json"].includes(c.ext);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function a(c) {
|
|
1186
1186
|
return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(c.ext);
|
|
1187
1187
|
}
|
|
1188
1188
|
function s(c) {
|
|
@@ -1219,9 +1219,9 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1219
1219
|
}, [
|
|
1220
1220
|
j(Be, { item: c.item }, null, 8, ["item"])
|
|
1221
1221
|
])
|
|
1222
|
-
])) :
|
|
1222
|
+
])) : r(c.item) ? (i(), u("div", vo, [
|
|
1223
1223
|
j(Be, { item: c.item }, null, 8, ["item"])
|
|
1224
|
-
])) :
|
|
1224
|
+
])) : a(c.item) ? (i(), u("div", mo, [
|
|
1225
1225
|
t("a", {
|
|
1226
1226
|
href: `/api/file-preview?id=${c.item.file_id}`,
|
|
1227
1227
|
target: "_blank",
|
|
@@ -1252,7 +1252,7 @@ const ot = /* @__PURE__ */ T(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
|
|
|
1252
1252
|
class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
|
|
1253
1253
|
onClick: g[2] || (g[2] = (v) => p())
|
|
1254
1254
|
}, [
|
|
1255
|
-
j(
|
|
1255
|
+
j(Ie, {
|
|
1256
1256
|
height: "14",
|
|
1257
1257
|
width: "14"
|
|
1258
1258
|
})
|
|
@@ -1286,13 +1286,13 @@ function Co(o, e) {
|
|
|
1286
1286
|
t("path", { d: "M12 4l0 12" }, null, -1)
|
|
1287
1287
|
]));
|
|
1288
1288
|
}
|
|
1289
|
-
const Vo = /* @__PURE__ */
|
|
1289
|
+
const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Lo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, So = { class1: "ml-auto" }, jo = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, Io = {
|
|
1290
1290
|
key: 0,
|
|
1291
1291
|
class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
|
|
1292
|
-
},
|
|
1292
|
+
}, Ao = { class: "relative" }, zo = {
|
|
1293
1293
|
key: 1,
|
|
1294
1294
|
class: "space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
|
1295
|
-
}, Oo = { key: 0 }, Eo = /* @__PURE__ */
|
|
1295
|
+
}, Oo = { key: 0 }, Eo = /* @__PURE__ */ A({
|
|
1296
1296
|
__name: "vs-input-file-list",
|
|
1297
1297
|
props: {
|
|
1298
1298
|
id: { default: "" },
|
|
@@ -1307,12 +1307,12 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1307
1307
|
},
|
|
1308
1308
|
emits: ["update"],
|
|
1309
1309
|
setup(o, { emit: e }) {
|
|
1310
|
-
const l = o, n = Se("form"),
|
|
1310
|
+
const l = o, n = Se("form"), r = D(() => n.value.formId), a = $(!1), s = $(0), d = e, p = $(!1), f = $({}), c = $([]), g = $(""), v = D(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = D(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
|
|
1311
1311
|
const h = v.value.findIndex((J) => J === x.item.file_path);
|
|
1312
|
-
h !== -1 && (
|
|
1312
|
+
h !== -1 && (a.value = !0, s.value = h);
|
|
1313
1313
|
}, F = async () => {
|
|
1314
1314
|
try {
|
|
1315
|
-
const x = await fetch(`${l.prefix}/widget/file/${
|
|
1315
|
+
const x = await fetch(`${l.prefix}/widget/file/${r.value}`).then((h) => h.json());
|
|
1316
1316
|
c.value = x?.rows;
|
|
1317
1317
|
} catch (x) {
|
|
1318
1318
|
console.error(x);
|
|
@@ -1323,7 +1323,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1323
1323
|
const J = new FormData();
|
|
1324
1324
|
J.append("file", h);
|
|
1325
1325
|
try {
|
|
1326
|
-
const C = `${l.prefix}/widget/file/${
|
|
1326
|
+
const C = `${l.prefix}/widget/file/${r.value}`;
|
|
1327
1327
|
return await fetch(C, { method: "POST", body: J }), d("update", "file-list"), h;
|
|
1328
1328
|
} catch (C) {
|
|
1329
1329
|
return console.error(C), null;
|
|
@@ -1340,10 +1340,10 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1340
1340
|
}, _ = (x) => {
|
|
1341
1341
|
f.value = P(x), p.value = !0;
|
|
1342
1342
|
};
|
|
1343
|
-
return se(
|
|
1343
|
+
return se(r, (x) => {
|
|
1344
1344
|
x && F();
|
|
1345
1345
|
}), ue(() => {
|
|
1346
|
-
|
|
1346
|
+
r.value && F();
|
|
1347
1347
|
}), (x, h) => {
|
|
1348
1348
|
const J = Pe("Lightbox"), C = Pe("MessageBox");
|
|
1349
1349
|
return i(), u("div", Mo, [
|
|
@@ -1365,9 +1365,9 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1365
1365
|
])
|
|
1366
1366
|
])
|
|
1367
1367
|
]),
|
|
1368
|
-
c.value?.length > 4 ? (i(), u("div",
|
|
1368
|
+
c.value?.length > 4 ? (i(), u("div", Io, [
|
|
1369
1369
|
t("div", null, [
|
|
1370
|
-
t("div",
|
|
1370
|
+
t("div", Ao, [
|
|
1371
1371
|
h[8] || (h[8] = t("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
|
|
1372
1372
|
t("svg", {
|
|
1373
1373
|
class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
|
|
@@ -1413,15 +1413,15 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1413
1413
|
index: V,
|
|
1414
1414
|
onUpdate: h[2] || (h[2] = (z) => x.$emit("update", "file-list")),
|
|
1415
1415
|
onOpenModal: h[3] || (h[3] = (z) => _(z)),
|
|
1416
|
-
onOpenLightbox: h[4] || (h[4] = (z) =>
|
|
1416
|
+
onOpenLightbox: h[4] || (h[4] = (z) => I(z))
|
|
1417
1417
|
}, null, 8, ["prefix", "item", "index"]))), 128)),
|
|
1418
1418
|
M.value.length ? S("", !0) : (i(), u("div", Oo, h[9] || (h[9] = [
|
|
1419
1419
|
t("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
|
|
1420
1420
|
])))
|
|
1421
1421
|
])) : S("", !0),
|
|
1422
1422
|
j(J, {
|
|
1423
|
-
modelValue:
|
|
1424
|
-
"onUpdate:modelValue": h[5] || (h[5] = (m) =>
|
|
1423
|
+
modelValue: a.value,
|
|
1424
|
+
"onUpdate:modelValue": h[5] || (h[5] = (m) => a.value = m),
|
|
1425
1425
|
startIndex: s.value,
|
|
1426
1426
|
"onUpdate:index": h[6] || (h[6] = (m) => s.value = m),
|
|
1427
1427
|
images: v.value
|
|
@@ -1434,7 +1434,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1434
1434
|
]);
|
|
1435
1435
|
};
|
|
1436
1436
|
}
|
|
1437
|
-
}), Fo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" },
|
|
1437
|
+
}), Fo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" }, To = /* @__PURE__ */ A({
|
|
1438
1438
|
__name: "vs-container-switcher",
|
|
1439
1439
|
props: {
|
|
1440
1440
|
title: {
|
|
@@ -1457,12 +1457,12 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1457
1457
|
(n) => {
|
|
1458
1458
|
l.value = n;
|
|
1459
1459
|
}
|
|
1460
|
-
), (n,
|
|
1460
|
+
), (n, r) => (i(), u("div", null, [
|
|
1461
1461
|
t("div", Fo, [
|
|
1462
1462
|
t("p", Do, E(o.title), 1),
|
|
1463
1463
|
j(lt, {
|
|
1464
1464
|
modelValue: l.value,
|
|
1465
|
-
"onUpdate:modelValue":
|
|
1465
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
|
|
1466
1466
|
style: fe(o.style)
|
|
1467
1467
|
}, null, 8, ["modelValue", "style"])
|
|
1468
1468
|
]),
|
|
@@ -1478,7 +1478,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1478
1478
|
})
|
|
1479
1479
|
]));
|
|
1480
1480
|
}
|
|
1481
|
-
}),
|
|
1481
|
+
}), Ro = /* @__PURE__ */ R(To, [["__scopeId", "data-v-90320b87"]]), Po = { class: "text-[16px] text-gray-900 font-medium" }, No = { class: "grid gap-3" }, Ho = /* @__PURE__ */ A({
|
|
1482
1482
|
__name: "vs-container-accordion",
|
|
1483
1483
|
props: {
|
|
1484
1484
|
title: {
|
|
@@ -1501,10 +1501,10 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1501
1501
|
(n) => {
|
|
1502
1502
|
l.value = n;
|
|
1503
1503
|
}
|
|
1504
|
-
), (n,
|
|
1504
|
+
), (n, r) => (i(), u("div", null, [
|
|
1505
1505
|
t("button", {
|
|
1506
1506
|
type: "button",
|
|
1507
|
-
onClick:
|
|
1507
|
+
onClick: r[0] || (r[0] = (a) => l.value = !l.value),
|
|
1508
1508
|
class: "flex items-center gap-2"
|
|
1509
1509
|
}, [
|
|
1510
1510
|
j(H(Zt), {
|
|
@@ -1524,7 +1524,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1524
1524
|
})
|
|
1525
1525
|
]));
|
|
1526
1526
|
}
|
|
1527
|
-
}), qo = /* @__PURE__ */
|
|
1527
|
+
}), qo = /* @__PURE__ */ R(Ho, [["__scopeId", "data-v-590eff11"]]), Go = { class: "flex items-center justify-between" }, Jo = /* @__PURE__ */ A({
|
|
1528
1528
|
__name: "vs-container-default",
|
|
1529
1529
|
props: {
|
|
1530
1530
|
title: {
|
|
@@ -1545,7 +1545,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1545
1545
|
]));
|
|
1546
1546
|
}
|
|
1547
1547
|
}), Ko = {
|
|
1548
|
-
switcher:
|
|
1548
|
+
switcher: Ro,
|
|
1549
1549
|
accordion: qo,
|
|
1550
1550
|
default: Jo
|
|
1551
1551
|
}, le = {
|
|
@@ -1561,7 +1561,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1561
1561
|
Contain: "*",
|
|
1562
1562
|
In: "in",
|
|
1563
1563
|
NotIn: "not_in"
|
|
1564
|
-
}, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e,
|
|
1564
|
+
}, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e, ea = (o, e) => o <= e, ta = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, la = (o, e) => String(o).startsWith(String(e)), oa = (o, e) => String(o).endsWith(String(e)), aa = (o, e) => String(o).includes(String(e)), ra = (o, e) => Array.isArray(e) ? e.includes(o) : !1, sa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, at = (o, e) => {
|
|
1565
1565
|
if (!e) return !0;
|
|
1566
1566
|
switch (e?.[1]) {
|
|
1567
1567
|
case le.Equal:
|
|
@@ -1575,23 +1575,23 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1575
1575
|
case le.Lower:
|
|
1576
1576
|
return Yo(o, e?.[2]);
|
|
1577
1577
|
case le.LowerOrEqual:
|
|
1578
|
-
return
|
|
1578
|
+
return ea(o, e?.[2]);
|
|
1579
1579
|
case le.Between:
|
|
1580
|
-
return
|
|
1580
|
+
return ta(o, e?.[2]);
|
|
1581
1581
|
case le.StartWith:
|
|
1582
|
-
return
|
|
1582
|
+
return la(o, e?.[2]);
|
|
1583
1583
|
case le.EndWith:
|
|
1584
|
-
return
|
|
1584
|
+
return oa(o, e?.[2]);
|
|
1585
1585
|
case le.Contain:
|
|
1586
|
-
return
|
|
1586
|
+
return aa(o, e?.[2]);
|
|
1587
1587
|
case le.In:
|
|
1588
|
-
return
|
|
1588
|
+
return ra(o, e?.[2]);
|
|
1589
1589
|
case le.NotIn:
|
|
1590
|
-
return
|
|
1590
|
+
return sa(o, e?.[2]);
|
|
1591
1591
|
default:
|
|
1592
1592
|
return !0;
|
|
1593
1593
|
}
|
|
1594
|
-
},
|
|
1594
|
+
}, na = /* @__PURE__ */ A({
|
|
1595
1595
|
__name: "vs-input-container",
|
|
1596
1596
|
props: {
|
|
1597
1597
|
style: {
|
|
@@ -1612,19 +1612,19 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1612
1612
|
}
|
|
1613
1613
|
},
|
|
1614
1614
|
setup(o) {
|
|
1615
|
-
const e = o, l = Se("formValues", { default: {} }), n = Se("form"),
|
|
1615
|
+
const e = o, l = Se("formValues", { default: {} }), n = Se("form"), r = D(() => e.schema?.filter((s) => {
|
|
1616
1616
|
const d = s?.conditions;
|
|
1617
1617
|
if (!d) return !0;
|
|
1618
1618
|
const p = Array.isArray(d) ? d[0] : d, f = l?.value?.[p];
|
|
1619
|
-
return
|
|
1620
|
-
})),
|
|
1621
|
-
return (s, d) => o.schema?.length ? (i(), X(xe(
|
|
1619
|
+
return at(f, d);
|
|
1620
|
+
})), a = D(() => Ko[e.view]);
|
|
1621
|
+
return (s, d) => o.schema?.length ? (i(), X(xe(a.value), {
|
|
1622
1622
|
key: 0,
|
|
1623
1623
|
title: o.title,
|
|
1624
1624
|
style: fe(o.style)
|
|
1625
1625
|
}, {
|
|
1626
1626
|
default: Me(() => [
|
|
1627
|
-
(i(!0), u(Q, null, Y(
|
|
1627
|
+
(i(!0), u(Q, null, Y(r.value, (p) => (i(), X(rt, Ce({
|
|
1628
1628
|
key: p.name
|
|
1629
1629
|
}, { ref_for: !0 }, p, {
|
|
1630
1630
|
item: p,
|
|
@@ -1637,7 +1637,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1637
1637
|
_: 1
|
|
1638
1638
|
}, 8, ["title", "style"])) : S("", !0);
|
|
1639
1639
|
}
|
|
1640
|
-
}),
|
|
1640
|
+
}), ia = { class: "relative" }, ua = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, da = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, ca = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, pa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, fa = { class: "p-4 mim-h-0 h-full overflow-auto" }, va = /* @__PURE__ */ A({
|
|
1641
1641
|
__name: "modal-edit",
|
|
1642
1642
|
props: {
|
|
1643
1643
|
schema: {},
|
|
@@ -1648,7 +1648,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1648
1648
|
},
|
|
1649
1649
|
emits: ["close", "save", "edit"],
|
|
1650
1650
|
setup(o, { emit: e }) {
|
|
1651
|
-
const l = o, n = e,
|
|
1651
|
+
const l = o, n = e, r = $(l.schema), a = $(l.defaultValue ? JSON.parse(JSON.stringify(l.defaultValue)) : {}), s = $({}), d = $(), p = $(l.mode);
|
|
1652
1652
|
async function f() {
|
|
1653
1653
|
const g = s.value.validate();
|
|
1654
1654
|
if (g) {
|
|
@@ -1663,14 +1663,14 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1663
1663
|
headers: {
|
|
1664
1664
|
"Content-Type": "application/json"
|
|
1665
1665
|
},
|
|
1666
|
-
body: JSON.stringify(
|
|
1666
|
+
body: JSON.stringify(a.value)
|
|
1667
1667
|
});
|
|
1668
1668
|
if (v.ok)
|
|
1669
1669
|
await v.json(), pe({
|
|
1670
1670
|
type: "success",
|
|
1671
1671
|
title: "Успішно",
|
|
1672
1672
|
message: `Дані успішно ${p.value === "add" ? "збережено" : "оновлено"}`
|
|
1673
|
-
}), n("save",
|
|
1673
|
+
}), n("save", a.value);
|
|
1674
1674
|
else if (v.status === 400) {
|
|
1675
1675
|
const M = await v.json().catch(() => ({}));
|
|
1676
1676
|
pe({
|
|
@@ -1701,17 +1701,17 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1701
1701
|
return ue(async () => {
|
|
1702
1702
|
if (l.form) {
|
|
1703
1703
|
const g = await fetch(`/api/template/form/${l.form}`).then((v) => v.json());
|
|
1704
|
-
|
|
1704
|
+
r.value = g.schema, d.value = g.token;
|
|
1705
1705
|
} else if (l.token) {
|
|
1706
1706
|
d.value = l.token;
|
|
1707
1707
|
const g = await fetch(`/api/form/${d.value}`).then((v) => v.json());
|
|
1708
|
-
|
|
1708
|
+
r.value = g.schema, g.data ? a.value = g.data : p.value = "add";
|
|
1709
1709
|
}
|
|
1710
|
-
}), (g, v) => (i(), u("div",
|
|
1711
|
-
t("div",
|
|
1712
|
-
t("div",
|
|
1713
|
-
t("div",
|
|
1714
|
-
t("h3",
|
|
1710
|
+
}), (g, v) => (i(), u("div", ia, [
|
|
1711
|
+
t("div", ua, [
|
|
1712
|
+
t("div", da, [
|
|
1713
|
+
t("div", ca, [
|
|
1714
|
+
t("h3", pa, E(p.value === "add" ? "Додати" : "Змінити"), 1),
|
|
1715
1715
|
t("button", {
|
|
1716
1716
|
onClick: c,
|
|
1717
1717
|
type: "button",
|
|
@@ -1735,12 +1735,12 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1735
1735
|
], -1)
|
|
1736
1736
|
]))
|
|
1737
1737
|
]),
|
|
1738
|
-
t("div",
|
|
1739
|
-
|
|
1738
|
+
t("div", fa, [
|
|
1739
|
+
r.value ? (i(), X(Oe, {
|
|
1740
1740
|
key: 0,
|
|
1741
|
-
schema:
|
|
1742
|
-
values:
|
|
1743
|
-
"onUpdate:values": v[0] || (v[0] = (M) =>
|
|
1741
|
+
schema: r.value,
|
|
1742
|
+
values: a.value,
|
|
1743
|
+
"onUpdate:values": v[0] || (v[0] = (M) => a.value = M),
|
|
1744
1744
|
form: s.value,
|
|
1745
1745
|
"onUpdate:form": v[1] || (v[1] = (M) => s.value = M)
|
|
1746
1746
|
}, null, 8, ["schema", "values", "form"])) : S("", !0)
|
|
@@ -1769,37 +1769,37 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1769
1769
|
}
|
|
1770
1770
|
const n = document.createElement("div");
|
|
1771
1771
|
l.appendChild(n);
|
|
1772
|
-
function
|
|
1773
|
-
|
|
1772
|
+
function r() {
|
|
1773
|
+
a.unmount(), n.remove();
|
|
1774
1774
|
}
|
|
1775
|
-
const
|
|
1775
|
+
const a = ct({
|
|
1776
1776
|
render() {
|
|
1777
|
-
return pt(
|
|
1777
|
+
return pt(va, {
|
|
1778
1778
|
...o,
|
|
1779
1779
|
onClose: () => {
|
|
1780
|
-
e(null),
|
|
1780
|
+
e(null), r();
|
|
1781
1781
|
},
|
|
1782
1782
|
onSave: (s) => {
|
|
1783
|
-
e(s),
|
|
1783
|
+
e(s), r();
|
|
1784
1784
|
}
|
|
1785
1785
|
});
|
|
1786
1786
|
}
|
|
1787
1787
|
});
|
|
1788
|
-
|
|
1789
|
-
}),
|
|
1788
|
+
a.mount(n);
|
|
1789
|
+
}), ma = ["aria-expanded", "data-focus"], ha = { class: "flex items-center" }, ga = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, ba = ["onClick"], ya = {
|
|
1790
1790
|
key: 1,
|
|
1791
1791
|
class: /* @__PURE__ */ B(["flex items-center absolute truncate text-gray-900"])
|
|
1792
|
-
},
|
|
1792
|
+
}, xa = {
|
|
1793
1793
|
key: 2,
|
|
1794
1794
|
class: "absolute text-gray-500 truncate"
|
|
1795
|
-
},
|
|
1795
|
+
}, wa = { class: "flex-1 min-w-[2px]" }, ka = ["placeholder"], _a = { class: "flex items-center shrink-0" }, $a = ["disabled"], Ca = ["disabled"], Va = {
|
|
1796
1796
|
key: 0,
|
|
1797
1797
|
class: "absolute z-10 w-full mt-2 rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]",
|
|
1798
1798
|
role: "listbox"
|
|
1799
|
-
},
|
|
1799
|
+
}, Ma = ["aria-disabled", "onClick"], La = {
|
|
1800
1800
|
key: 1,
|
|
1801
1801
|
class: "px-3 py-2 text-center text-gray-500"
|
|
1802
|
-
},
|
|
1802
|
+
}, Ba = ["disabled"], Sa = /* @__PURE__ */ A({
|
|
1803
1803
|
__name: "vs-input-select",
|
|
1804
1804
|
props: /* @__PURE__ */ q({
|
|
1805
1805
|
multiple: { type: Boolean, default: !1 },
|
|
@@ -1826,19 +1826,19 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1826
1826
|
}),
|
|
1827
1827
|
emits: /* @__PURE__ */ q(["change"], ["update:modelValue"]),
|
|
1828
1828
|
setup(o, { emit: e }) {
|
|
1829
|
-
const l = o, n = e,
|
|
1829
|
+
const l = o, n = e, r = D(() => l.multiple), a = D(() => l.disabled);
|
|
1830
1830
|
me(l.style);
|
|
1831
|
-
const s = G(o, "modelValue"), d = $(null), p = $(null), f = $(null), c = $(!1), g = $(!1), v = $(null), M = $([]),
|
|
1831
|
+
const s = G(o, "modelValue"), d = $(null), p = $(null), f = $(null), c = $(!1), g = $(!1), v = $(null), M = $([]), I = $(-1), F = $([]), U = $(""), P = $(null), _ = $([]), x = D(() => {
|
|
1832
1832
|
if (!_.value.length) return [];
|
|
1833
1833
|
const k = new Map(M.value.map((w) => [w.id?.toString(), w]));
|
|
1834
1834
|
return _.value.map((w) => k.get(w?.toString())).filter((w) => !!w);
|
|
1835
|
-
}), h = D(() => l.placeholder || "Select..."), J = D(() =>
|
|
1835
|
+
}), h = D(() => l.placeholder || "Select..."), J = D(() => r.value ? !_.value.length && U.value === "" : !v.value?.text && U.value === ""), C = D(() => a.value ? !1 : r.value ? _.value.length > 0 : !!s.value), m = (k) => r.value ? _.value.some((w) => w?.toString() === k?.toString()) : s.value?.toString?.() === k?.toString?.(), V = D(() => {
|
|
1836
1836
|
let k = M.value ?? [];
|
|
1837
1837
|
if (U.value.trim() !== "") {
|
|
1838
1838
|
const w = U.value.toLowerCase();
|
|
1839
1839
|
k = k.filter((O) => O.text?.toLowerCase?.().includes(w));
|
|
1840
1840
|
}
|
|
1841
|
-
if (
|
|
1841
|
+
if (r.value && _.value.length) {
|
|
1842
1842
|
const w = new Set(_.value.map((O) => O?.toString()));
|
|
1843
1843
|
k = k.filter((O) => !w.has(O.id?.toString()));
|
|
1844
1844
|
}
|
|
@@ -1865,26 +1865,26 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1865
1865
|
Le && M.value.push(Le);
|
|
1866
1866
|
}, Promise.resolve());
|
|
1867
1867
|
}, we = async () => {
|
|
1868
|
-
|
|
1869
|
-
P.value?.focus(), V.value.length ?
|
|
1868
|
+
a.value || (c.value = !0, await Z(), await $e(() => {
|
|
1869
|
+
P.value?.focus(), V.value.length ? I.value = 0 : I.value = -1;
|
|
1870
1870
|
}));
|
|
1871
1871
|
}, ie = () => {
|
|
1872
|
-
c.value = !1,
|
|
1873
|
-
},
|
|
1874
|
-
if (
|
|
1872
|
+
c.value = !1, I.value = -1;
|
|
1873
|
+
}, Ae = async (k) => {
|
|
1874
|
+
if (a.value) return;
|
|
1875
1875
|
!c.value ? await we() : ie();
|
|
1876
1876
|
}, ke = async () => {
|
|
1877
1877
|
c.value ? P.value?.focus() : await we();
|
|
1878
1878
|
}, b = () => {
|
|
1879
|
-
|
|
1879
|
+
r.value ? (_.value = [], s.value = [], n("change", [])) : (v.value = null, s.value = null, n("change", null)), U.value = "", $e(() => P.value?.focus());
|
|
1880
1880
|
}, y = (k) => {
|
|
1881
|
-
|
|
1882
|
-
},
|
|
1883
|
-
|
|
1884
|
-
P.value?.focus(),
|
|
1881
|
+
r.value && (_.value = _.value.filter((w) => w?.toString() !== k?.toString()), s.value = [..._.value], n("change", s.value), $e(() => P.value?.focus()));
|
|
1882
|
+
}, T = (k) => {
|
|
1883
|
+
r.value ? (m(k.id) || (_.value = [..._.value, k.id], s.value = [..._.value], n("change", s.value)), U.value = "", $e(() => {
|
|
1884
|
+
P.value?.focus(), I.value = Math.min(I.value, V.value.length - 1);
|
|
1885
1885
|
})) : (v.value = k, s.value = k.id, n("change", s.value), U.value = "", ie());
|
|
1886
1886
|
}, N = (k) => {
|
|
1887
|
-
m(k.id) ||
|
|
1887
|
+
m(k.id) || T(k);
|
|
1888
1888
|
}, ee = (k, w) => {
|
|
1889
1889
|
if (!k || !w) return;
|
|
1890
1890
|
const O = k.offsetTop, W = O + k.offsetHeight, be = w.scrollTop, Le = be + w.clientHeight;
|
|
@@ -1893,35 +1893,35 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1893
1893
|
const it = w;
|
|
1894
1894
|
it.scrollTop = ze;
|
|
1895
1895
|
}, _e = async (k) => {
|
|
1896
|
-
|
|
1896
|
+
a.value || !c.value && (k.key === "ArrowDown" || k.key === "ArrowUp") && (k.preventDefault(), await we());
|
|
1897
1897
|
}, de = (k) => {
|
|
1898
1898
|
if (!c.value) return;
|
|
1899
1899
|
const { key: w } = k;
|
|
1900
1900
|
if (w === "ArrowDown")
|
|
1901
|
-
k.preventDefault(),
|
|
1901
|
+
k.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(F.value[I.value], f.value));
|
|
1902
1902
|
else if (w === "ArrowUp")
|
|
1903
|
-
k.preventDefault(),
|
|
1903
|
+
k.preventDefault(), I.value > 0 && (I.value -= 1, ee(F.value[I.value], f.value));
|
|
1904
1904
|
else if (w === "Enter") {
|
|
1905
1905
|
k.preventDefault();
|
|
1906
|
-
const O = V.value[
|
|
1907
|
-
O &&
|
|
1908
|
-
} else w === "Escape" ? (k.preventDefault(), ie()) : w === "Backspace" ?
|
|
1906
|
+
const O = V.value[I.value];
|
|
1907
|
+
O && T(O);
|
|
1908
|
+
} else w === "Escape" ? (k.preventDefault(), ie()) : w === "Backspace" ? r.value && U.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (I.value = 0, ee(F.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(F.value[I.value], f.value)) : w === "Tab" && ie();
|
|
1909
1909
|
}, he = () => {
|
|
1910
|
-
|
|
1910
|
+
a.value || (g.value = !0);
|
|
1911
1911
|
}, ge = () => {
|
|
1912
1912
|
g.value = !1, U.value = "";
|
|
1913
1913
|
}, ce = (k) => {
|
|
1914
1914
|
k.key === "Escape" && c.value && ie();
|
|
1915
1915
|
}, Ue = (k) => {
|
|
1916
1916
|
d.value && (d.value.contains(k.target) || ie());
|
|
1917
|
-
},
|
|
1917
|
+
}, Te = (k) => {
|
|
1918
1918
|
c.value && f.value && !f.value.contains(k.target) && ie();
|
|
1919
1919
|
};
|
|
1920
1920
|
se(() => l.options, (k) => {
|
|
1921
1921
|
k?.length && (M.value = [...k]);
|
|
1922
1922
|
}, { immediate: !0 });
|
|
1923
|
-
const
|
|
1924
|
-
if (
|
|
1923
|
+
const Re = async () => {
|
|
1924
|
+
if (r.value)
|
|
1925
1925
|
Array.isArray(s.value) ? _.value = [...s.value] : (_.value = s.value == null ? [] : [s.value], s.value = [..._.value]), !l.options?.length && l.data && await ye(_.value);
|
|
1926
1926
|
else {
|
|
1927
1927
|
if (Array.isArray(s.value)) {
|
|
@@ -1932,11 +1932,11 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1932
1932
|
}
|
|
1933
1933
|
};
|
|
1934
1934
|
se(s, () => {
|
|
1935
|
-
|
|
1935
|
+
Re();
|
|
1936
1936
|
}), ue(async () => {
|
|
1937
|
-
addEventListener("keydown", ce), addEventListener("scroll",
|
|
1937
|
+
addEventListener("keydown", ce), addEventListener("scroll", Te, !0), document.addEventListener("click", Ue, !0), l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z("")), await Re();
|
|
1938
1938
|
}), et(() => {
|
|
1939
|
-
removeEventListener("keydown", ce), removeEventListener("scroll",
|
|
1939
|
+
removeEventListener("keydown", ce), removeEventListener("scroll", Te, !0), document.removeEventListener("click", Ue, !0);
|
|
1940
1940
|
});
|
|
1941
1941
|
async function nt() {
|
|
1942
1942
|
if (!l.add) return;
|
|
@@ -1951,7 +1951,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1951
1951
|
class: "flex gap-1 w-full",
|
|
1952
1952
|
ref_key: "selectRoot",
|
|
1953
1953
|
ref: d,
|
|
1954
|
-
onClick: w[2] || (w[2] =
|
|
1954
|
+
onClick: w[2] || (w[2] = re(() => {
|
|
1955
1955
|
}, ["stop"]))
|
|
1956
1956
|
}, [
|
|
1957
1957
|
t("div", {
|
|
@@ -1973,7 +1973,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1973
1973
|
"flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
|
|
1974
1974
|
"border-gray-300 hover:border-gray-400",
|
|
1975
1975
|
c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
|
|
1976
|
-
|
|
1976
|
+
a.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
1977
1977
|
]),
|
|
1978
1978
|
role: "combobox",
|
|
1979
1979
|
"aria-expanded": c.value,
|
|
@@ -1987,22 +1987,22 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
1987
1987
|
ref_key: "triggerRef",
|
|
1988
1988
|
ref: p
|
|
1989
1989
|
}, [
|
|
1990
|
-
|
|
1990
|
+
r.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (O) => (i(), u("div", {
|
|
1991
1991
|
class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
|
|
1992
1992
|
key: O.id
|
|
1993
1993
|
}, [
|
|
1994
|
-
t("div",
|
|
1994
|
+
t("div", ha, [
|
|
1995
1995
|
O?.color ? (i(), u("span", {
|
|
1996
1996
|
key: 0,
|
|
1997
1997
|
class: "w-[16px] h-[16px] rounded-md block ml-1.5",
|
|
1998
1998
|
style: fe({ backgroundColor: O?.color })
|
|
1999
1999
|
}, null, 4)) : S("", !0),
|
|
2000
|
-
t("div",
|
|
2000
|
+
t("div", ga, E(O.text), 1)
|
|
2001
2001
|
]),
|
|
2002
2002
|
t("div", {
|
|
2003
2003
|
role: "button",
|
|
2004
2004
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
2005
|
-
onClick:
|
|
2005
|
+
onClick: re((W) => y(O.id), ["stop"])
|
|
2006
2006
|
}, w[3] || (w[3] = [
|
|
2007
2007
|
t("svg", {
|
|
2008
2008
|
height: "14",
|
|
@@ -2014,8 +2014,8 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2014
2014
|
}, [
|
|
2015
2015
|
t("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2016
2016
|
], -1)
|
|
2017
|
-
]), 8,
|
|
2018
|
-
]))), 128)) : !
|
|
2017
|
+
]), 8, ba)
|
|
2018
|
+
]))), 128)) : !r.value && v.value?.text && U.value === "" ? (i(), u("div", ya, [
|
|
2019
2019
|
v.value?.color ? (i(), u("span", {
|
|
2020
2020
|
key: 0,
|
|
2021
2021
|
class: "w-[14px] h-[14px] rounded-md block mr-1 mt-0.5",
|
|
@@ -2023,9 +2023,9 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2023
2023
|
}, null, 4)) : S("", !0),
|
|
2024
2024
|
oe(" " + E(v.value.text), 1)
|
|
2025
2025
|
])) : S("", !0),
|
|
2026
|
-
J.value ? (i(), u("div",
|
|
2027
|
-
t("div",
|
|
2028
|
-
!
|
|
2026
|
+
J.value ? (i(), u("div", xa, E(h.value), 1)) : S("", !0),
|
|
2027
|
+
t("div", wa, [
|
|
2028
|
+
!a.value && k.search ? K((i(), u("input", {
|
|
2029
2029
|
key: 0,
|
|
2030
2030
|
ref_key: "inputRef",
|
|
2031
2031
|
ref: P,
|
|
@@ -2037,24 +2037,24 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2037
2037
|
type: "text",
|
|
2038
2038
|
tabindex: "0",
|
|
2039
2039
|
"aria-autocomplete": "list",
|
|
2040
|
-
placeholder:
|
|
2040
|
+
placeholder: r.value && _.value.length ? "" : void 0,
|
|
2041
2041
|
"onUpdate:modelValue": w[0] || (w[0] = (O) => U.value = O),
|
|
2042
2042
|
onFocus: he,
|
|
2043
2043
|
onBlur: ge,
|
|
2044
2044
|
onKeydown: de
|
|
2045
|
-
}, null, 40,
|
|
2045
|
+
}, null, 40, ka)), [
|
|
2046
2046
|
[ne, U.value]
|
|
2047
2047
|
]) : S("", !0)
|
|
2048
2048
|
])
|
|
2049
2049
|
], 512),
|
|
2050
|
-
t("div",
|
|
2050
|
+
t("div", _a, [
|
|
2051
2051
|
C.value ? (i(), u("button", {
|
|
2052
2052
|
key: 0,
|
|
2053
2053
|
type: "button",
|
|
2054
2054
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2055
2055
|
"aria-hidden": "true",
|
|
2056
|
-
disabled:
|
|
2057
|
-
onClick:
|
|
2056
|
+
disabled: a.value,
|
|
2057
|
+
onClick: re(b, ["stop"])
|
|
2058
2058
|
}, w[4] || (w[4] = [
|
|
2059
2059
|
t("svg", {
|
|
2060
2060
|
height: "20",
|
|
@@ -2064,14 +2064,14 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2064
2064
|
}, [
|
|
2065
2065
|
t("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
|
|
2066
2066
|
], -1)
|
|
2067
|
-
]), 8, $
|
|
2067
|
+
]), 8, $a)) : S("", !0),
|
|
2068
2068
|
w[6] || (w[6] = t("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
|
|
2069
2069
|
t("button", {
|
|
2070
2070
|
type: "button",
|
|
2071
2071
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
2072
2072
|
"aria-hidden": "true",
|
|
2073
|
-
disabled:
|
|
2074
|
-
onClick: w[1] || (w[1] =
|
|
2073
|
+
disabled: a.value,
|
|
2074
|
+
onClick: w[1] || (w[1] = re((O) => Ae(), ["stop"]))
|
|
2075
2075
|
}, w[5] || (w[5] = [
|
|
2076
2076
|
t("svg", {
|
|
2077
2077
|
height: "20",
|
|
@@ -2081,10 +2081,10 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2081
2081
|
}, [
|
|
2082
2082
|
t("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
|
|
2083
2083
|
], -1)
|
|
2084
|
-
]), 8,
|
|
2084
|
+
]), 8, Ca)
|
|
2085
2085
|
])
|
|
2086
|
-
], 42,
|
|
2087
|
-
c.value ? (i(), u("div",
|
|
2086
|
+
], 42, ma),
|
|
2087
|
+
c.value ? (i(), u("div", Va, [
|
|
2088
2088
|
t("div", {
|
|
2089
2089
|
class: "max-h-[300px] overflow-y-auto py-1",
|
|
2090
2090
|
ref_key: "listRef",
|
|
@@ -2111,12 +2111,12 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2111
2111
|
t("div", {
|
|
2112
2112
|
class: B([
|
|
2113
2113
|
"leading-[19px]",
|
|
2114
|
-
|
|
2114
|
+
I.value === O.id ? "text-white" : "",
|
|
2115
2115
|
// active style like react-select
|
|
2116
|
-
(
|
|
2116
|
+
(I.value === W, "")
|
|
2117
2117
|
])
|
|
2118
2118
|
}, E(O.text), 3)
|
|
2119
|
-
], 10,
|
|
2119
|
+
], 10, Ma))), 128)) : (i(), u("div", La, " No options "))
|
|
2120
2120
|
], 512)
|
|
2121
2121
|
])) : S("", !0)
|
|
2122
2122
|
], 2),
|
|
@@ -2124,7 +2124,7 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2124
2124
|
key: 0,
|
|
2125
2125
|
onClick: nt,
|
|
2126
2126
|
class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
|
|
2127
|
-
disabled:
|
|
2127
|
+
disabled: a.value,
|
|
2128
2128
|
type: "button"
|
|
2129
2129
|
}, [
|
|
2130
2130
|
j(je, {
|
|
@@ -2132,10 +2132,10 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2132
2132
|
height: "16"
|
|
2133
2133
|
}),
|
|
2134
2134
|
w[9] || (w[9] = t("span", null, "Додати", -1))
|
|
2135
|
-
], 8,
|
|
2135
|
+
], 8, Ba)) : S("", !0)
|
|
2136
2136
|
], 512));
|
|
2137
2137
|
}
|
|
2138
|
-
}),
|
|
2138
|
+
}), ja = ["placeholder", "disabled"], Ia = /* @__PURE__ */ A({
|
|
2139
2139
|
__name: "vs-input-textarea",
|
|
2140
2140
|
props: /* @__PURE__ */ q({
|
|
2141
2141
|
style: { default: () => ({}) },
|
|
@@ -2152,20 +2152,20 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2152
2152
|
emits: ["update:modelValue"],
|
|
2153
2153
|
setup(o) {
|
|
2154
2154
|
const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
|
|
2155
|
-
return (
|
|
2156
|
-
"onUpdate:modelValue":
|
|
2157
|
-
placeholder:
|
|
2158
|
-
disabled:
|
|
2155
|
+
return (r, a) => K((i(), u("textarea", {
|
|
2156
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
|
|
2157
|
+
placeholder: r.placeholder,
|
|
2158
|
+
disabled: r.disabled,
|
|
2159
2159
|
row: "2",
|
|
2160
2160
|
class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [H(l)]]),
|
|
2161
2161
|
style: {
|
|
2162
2162
|
border: "1px solid #CFD9E0"
|
|
2163
2163
|
}
|
|
2164
|
-
}, null, 10,
|
|
2164
|
+
}, null, 10, ja)), [
|
|
2165
2165
|
[ne, n.value]
|
|
2166
2166
|
]);
|
|
2167
2167
|
}
|
|
2168
|
-
}),
|
|
2168
|
+
}), Aa = {}, za = {
|
|
2169
2169
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2170
2170
|
viewBox: "0 0 24 24",
|
|
2171
2171
|
fill: "none",
|
|
@@ -2175,8 +2175,8 @@ const Vo = /* @__PURE__ */ T(_o, [["render", Co]]), Mo = { class: "flex flex-col
|
|
|
2175
2175
|
"stroke-linejoin": "round",
|
|
2176
2176
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
|
|
2177
2177
|
};
|
|
2178
|
-
function
|
|
2179
|
-
return i(), u("svg",
|
|
2178
|
+
function Oa(o, e) {
|
|
2179
|
+
return i(), u("svg", za, e[0] || (e[0] = [
|
|
2180
2180
|
t("path", {
|
|
2181
2181
|
stroke: "none",
|
|
2182
2182
|
d: "M0 0h24v24H0z",
|
|
@@ -2186,7 +2186,7 @@ function Or(o, e) {
|
|
|
2186
2186
|
t("path", { d: "M21 21l-6 -6" }, null, -1)
|
|
2187
2187
|
]));
|
|
2188
2188
|
}
|
|
2189
|
-
const
|
|
2189
|
+
const Ea = /* @__PURE__ */ R(Aa, [["render", Oa]]), Fa = {}, Da = {
|
|
2190
2190
|
class: "flex-shrink-0 mt-0.5 size-3.5",
|
|
2191
2191
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2192
2192
|
viewBox: "0 0 24 24",
|
|
@@ -2196,15 +2196,15 @@ const Er = /* @__PURE__ */ T(Ir, [["render", Or]]), Fr = {}, Dr = {
|
|
|
2196
2196
|
"stroke-linecap": "round",
|
|
2197
2197
|
"stroke-linejoin": "round"
|
|
2198
2198
|
};
|
|
2199
|
-
function
|
|
2200
|
-
return i(), u("svg",
|
|
2199
|
+
function Ua(o, e) {
|
|
2200
|
+
return i(), u("svg", Da, e[0] || (e[0] = [
|
|
2201
2201
|
t("path", { d: "m3 16 4 4 4-4" }, null, -1),
|
|
2202
2202
|
t("path", { d: "M7 20V4" }, null, -1),
|
|
2203
2203
|
t("path", { d: "m21 8-4-4-4 4" }, null, -1),
|
|
2204
2204
|
t("path", { d: "M17 4v16" }, null, -1)
|
|
2205
2205
|
]));
|
|
2206
2206
|
}
|
|
2207
|
-
const
|
|
2207
|
+
const Ta = /* @__PURE__ */ R(Fa, [["render", Ua]]), Ra = {}, Pa = {
|
|
2208
2208
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2209
2209
|
width: "14",
|
|
2210
2210
|
height: "14",
|
|
@@ -2215,8 +2215,8 @@ const Rr = /* @__PURE__ */ T(Fr, [["render", Ur]]), Tr = {}, Pr = {
|
|
|
2215
2215
|
"stroke-linecap": "round",
|
|
2216
2216
|
"stroke-linejoin": "round"
|
|
2217
2217
|
};
|
|
2218
|
-
function
|
|
2219
|
-
return i(), u("svg",
|
|
2218
|
+
function Na(o, e) {
|
|
2219
|
+
return i(), u("svg", Pa, e[0] || (e[0] = [
|
|
2220
2220
|
t("path", {
|
|
2221
2221
|
stroke: "none",
|
|
2222
2222
|
d: "M0 0h24v24H0z",
|
|
@@ -2227,7 +2227,7 @@ function Nr(o, e) {
|
|
|
2227
2227
|
t("path", { d: "M12 4l0 12" }, null, -1)
|
|
2228
2228
|
]));
|
|
2229
2229
|
}
|
|
2230
|
-
const
|
|
2230
|
+
const Ha = /* @__PURE__ */ R(Ra, [["render", Na]]), qa = {}, Ga = {
|
|
2231
2231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2232
2232
|
viewBox: "0 0 24 24",
|
|
2233
2233
|
fill: "none",
|
|
@@ -2236,8 +2236,8 @@ const Hr = /* @__PURE__ */ T(Tr, [["render", Nr]]), qr = {}, Gr = {
|
|
|
2236
2236
|
"stroke-linecap": "round",
|
|
2237
2237
|
"stroke-linejoin": "round"
|
|
2238
2238
|
};
|
|
2239
|
-
function
|
|
2240
|
-
return i(), u("svg",
|
|
2239
|
+
function Ja(o, e) {
|
|
2240
|
+
return i(), u("svg", Ga, e[0] || (e[0] = [
|
|
2241
2241
|
t("path", {
|
|
2242
2242
|
stroke: "none",
|
|
2243
2243
|
d: "M0 0h24v24H0z",
|
|
@@ -2248,7 +2248,7 @@ function Jr(o, e) {
|
|
|
2248
2248
|
t("path", { d: "M12 4l0 12" }, null, -1)
|
|
2249
2249
|
]));
|
|
2250
2250
|
}
|
|
2251
|
-
const
|
|
2251
|
+
const Ka = /* @__PURE__ */ R(qa, [["render", Ja]]), Za = {}, Wa = {
|
|
2252
2252
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2253
2253
|
viewBox: "0 0 24 24",
|
|
2254
2254
|
fill: "none",
|
|
@@ -2257,22 +2257,22 @@ const Kr = /* @__PURE__ */ T(qr, [["render", Jr]]), Zr = {}, Wr = {
|
|
|
2257
2257
|
"stroke-linecap": "round",
|
|
2258
2258
|
"stroke-linejoin": "round"
|
|
2259
2259
|
};
|
|
2260
|
-
function
|
|
2261
|
-
return i(), u("svg",
|
|
2262
|
-
|
|
2260
|
+
function Qa(o, e) {
|
|
2261
|
+
return i(), u("svg", Wa, e[0] || (e[0] = [
|
|
2262
|
+
ae('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
|
|
2263
2263
|
]));
|
|
2264
2264
|
}
|
|
2265
|
-
const Ze = /* @__PURE__ */
|
|
2265
|
+
const Ze = /* @__PURE__ */ R(Za, [["render", Qa]]), Xa = {}, Ya = {
|
|
2266
2266
|
viewBox: "0 0 178 90",
|
|
2267
2267
|
fill: "none",
|
|
2268
2268
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2269
2269
|
};
|
|
2270
|
-
function
|
|
2271
|
-
return i(), u("svg",
|
|
2272
|
-
|
|
2270
|
+
function er(o, e) {
|
|
2271
|
+
return i(), u("svg", Ya, e[0] || (e[0] = [
|
|
2272
|
+
ae('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
|
|
2273
2273
|
]));
|
|
2274
2274
|
}
|
|
2275
|
-
const
|
|
2275
|
+
const tr = /* @__PURE__ */ R(Xa, [["render", er]]), lr = {}, or = {
|
|
2276
2276
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2277
2277
|
viewBox: "0 0 24 24",
|
|
2278
2278
|
fill: "none",
|
|
@@ -2281,16 +2281,16 @@ const ta = /* @__PURE__ */ T(Xr, [["render", ea]]), la = {}, oa = {
|
|
|
2281
2281
|
"stroke-linecap": "round",
|
|
2282
2282
|
"stroke-linejoin": "round"
|
|
2283
2283
|
};
|
|
2284
|
-
function
|
|
2285
|
-
return i(), u("svg",
|
|
2284
|
+
function ar(o, e) {
|
|
2285
|
+
return i(), u("svg", or, e[0] || (e[0] = [
|
|
2286
2286
|
t("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
|
|
2287
2287
|
]));
|
|
2288
2288
|
}
|
|
2289
|
-
const
|
|
2289
|
+
const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable border rounded-xl w-full flex-grow" }, nr = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ir = { class: "relative w-full" }, ur = { class: "table-wrapper flex gap-2" }, dr = { class: "vs-popover inline-block text-slate-700" }, cr = { class: "text-center" }, pr = { class: "" }, fr = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, vr = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, mr = { class: "text-sm items-center text-gray-800 flex gap-1" }, hr = { class: "w-full overflow-x-auto" }, gr = { class: "w-full table-auto caption-bottom text-sm" }, br = { class: "[&_tr]:border-b" }, yr = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, xr = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, wr = {
|
|
2290
2290
|
key: 0,
|
|
2291
2291
|
colspan: "100%",
|
|
2292
2292
|
class: "text-center"
|
|
2293
|
-
},
|
|
2293
|
+
}, kr = { class: "w-full" }, _r = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, $r = ["onDragstart", "onDragover", "onDrop"], Cr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Vr = { class: "flex items-center justify-center" }, Mr = { class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" }, Lr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Br = { class: "flex items-center justify-center gap-2" }, Sr = ["onClick"], jr = ["onClick"], Ir = /* @__PURE__ */ A({
|
|
2294
2294
|
__name: "vs-input-datatable",
|
|
2295
2295
|
props: /* @__PURE__ */ q({
|
|
2296
2296
|
colModel: {},
|
|
@@ -2307,9 +2307,9 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2307
2307
|
}),
|
|
2308
2308
|
emits: ["update:modelValue"],
|
|
2309
2309
|
setup(o) {
|
|
2310
|
-
const e = o, l = G(o, "modelValue"), n = $({}),
|
|
2311
|
-
if (!
|
|
2312
|
-
const C =
|
|
2310
|
+
const e = o, l = G(o, "modelValue"), n = $({}), r = $(""), a = D(() => {
|
|
2311
|
+
if (!r.value) return l.value ?? [];
|
|
2312
|
+
const C = r.value.toLowerCase();
|
|
2313
2313
|
return l.value.filter((m) => e.colModel?.some((V) => {
|
|
2314
2314
|
const z = m[V.key];
|
|
2315
2315
|
return z ? Array.isArray(z) ? z.join(", ").toLowerCase().includes(C) : String(z).toLowerCase().includes(C) : !1;
|
|
@@ -2325,7 +2325,7 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2325
2325
|
}
|
|
2326
2326
|
const m = [...l.value], [V] = m.splice(s.value, 1);
|
|
2327
2327
|
m.splice(C, 0, V), l.value = m, s.value = null, d.value = null;
|
|
2328
|
-
},
|
|
2328
|
+
}, I = (C) => {
|
|
2329
2329
|
const V = C.currentTarget.getBoundingClientRect();
|
|
2330
2330
|
c.value = { top: V.bottom + window.scrollY, left: V.left + window.scrollX }, p.value = !p.value;
|
|
2331
2331
|
}, F = () => {
|
|
@@ -2376,24 +2376,24 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2376
2376
|
function J(C) {
|
|
2377
2377
|
l.value = l.value.filter((m, V) => V !== C);
|
|
2378
2378
|
}
|
|
2379
|
-
return (C, m) => (i(), u("div",
|
|
2380
|
-
t("div",
|
|
2381
|
-
t("div",
|
|
2382
|
-
j(
|
|
2379
|
+
return (C, m) => (i(), u("div", sr, [
|
|
2380
|
+
t("div", nr, [
|
|
2381
|
+
t("div", ir, [
|
|
2382
|
+
j(Ea, {
|
|
2383
2383
|
width: "14",
|
|
2384
2384
|
height: "14",
|
|
2385
2385
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
|
|
2386
2386
|
}),
|
|
2387
2387
|
K(t("input", {
|
|
2388
2388
|
type: "text",
|
|
2389
|
-
"onUpdate:modelValue": m[0] || (m[0] = (V) =>
|
|
2389
|
+
"onUpdate:modelValue": m[0] || (m[0] = (V) => r.value = V),
|
|
2390
2390
|
placeholder: "Пошук",
|
|
2391
2391
|
class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
|
|
2392
2392
|
}, null, 512), [
|
|
2393
|
-
[ne,
|
|
2393
|
+
[ne, r.value]
|
|
2394
2394
|
])
|
|
2395
2395
|
]),
|
|
2396
|
-
t("div",
|
|
2396
|
+
t("div", ur, [
|
|
2397
2397
|
t("input", {
|
|
2398
2398
|
ref_key: "fileInput",
|
|
2399
2399
|
ref: f,
|
|
@@ -2402,14 +2402,14 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2402
2402
|
accept: ".json",
|
|
2403
2403
|
type: "file"
|
|
2404
2404
|
}, null, 544),
|
|
2405
|
-
t("div",
|
|
2406
|
-
t("div",
|
|
2407
|
-
t("div",
|
|
2405
|
+
t("div", dr, [
|
|
2406
|
+
t("div", cr, [
|
|
2407
|
+
t("div", pr, [
|
|
2408
2408
|
t("button", {
|
|
2409
|
-
onClick:
|
|
2409
|
+
onClick: I,
|
|
2410
2410
|
class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
|
|
2411
2411
|
}, [
|
|
2412
|
-
j(
|
|
2412
|
+
j(Ta, {
|
|
2413
2413
|
height: "16",
|
|
2414
2414
|
width: "16"
|
|
2415
2415
|
})
|
|
@@ -2424,13 +2424,13 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2424
2424
|
class: "text-slate-700 vsTailwind vs-popover__content bottom",
|
|
2425
2425
|
style: fe([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
|
|
2426
2426
|
}, [
|
|
2427
|
-
t("div",
|
|
2428
|
-
t("div",
|
|
2427
|
+
t("div", fr, [
|
|
2428
|
+
t("div", vr, [
|
|
2429
2429
|
t("button", {
|
|
2430
2430
|
onClick: F,
|
|
2431
2431
|
class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2432
2432
|
}, [
|
|
2433
|
-
j(
|
|
2433
|
+
j(Ha, {
|
|
2434
2434
|
class: "text-black",
|
|
2435
2435
|
width: "14",
|
|
2436
2436
|
height: "14"
|
|
@@ -2441,8 +2441,8 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2441
2441
|
onClick: P,
|
|
2442
2442
|
class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
|
|
2443
2443
|
}, [
|
|
2444
|
-
t("span",
|
|
2445
|
-
j(
|
|
2444
|
+
t("span", mr, [
|
|
2445
|
+
j(Ka, {
|
|
2446
2446
|
class: "text-black",
|
|
2447
2447
|
width: "14",
|
|
2448
2448
|
height: "14"
|
|
@@ -2462,11 +2462,11 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2462
2462
|
m[3] || (m[3] = oe(" Додати "))
|
|
2463
2463
|
])
|
|
2464
2464
|
]),
|
|
2465
|
-
t("div",
|
|
2466
|
-
t("table",
|
|
2467
|
-
t("thead",
|
|
2468
|
-
t("tr",
|
|
2469
|
-
t("th",
|
|
2465
|
+
t("div", hr, [
|
|
2466
|
+
t("table", gr, [
|
|
2467
|
+
t("thead", br, [
|
|
2468
|
+
t("tr", yr, [
|
|
2469
|
+
t("th", xr, [
|
|
2470
2470
|
j(Ze, {
|
|
2471
2471
|
width: "24",
|
|
2472
2472
|
height: "24",
|
|
@@ -2483,10 +2483,10 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2483
2483
|
t("tbody", {
|
|
2484
2484
|
class: B({ "[&_tr:last-child]:border-0": !d.value })
|
|
2485
2485
|
}, [
|
|
2486
|
-
|
|
2487
|
-
t("div",
|
|
2488
|
-
t("div",
|
|
2489
|
-
j(
|
|
2486
|
+
a.value.length === 0 ? (i(), u("td", wr, [
|
|
2487
|
+
t("div", kr, [
|
|
2488
|
+
t("div", _r, [
|
|
2489
|
+
j(tr, { class: "w-48 mx-auto" }),
|
|
2490
2490
|
m[5] || (m[5] = t("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
2491
2491
|
t("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
|
|
2492
2492
|
t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
|
|
@@ -2494,7 +2494,7 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2494
2494
|
])
|
|
2495
2495
|
])
|
|
2496
2496
|
])) : S("", !0),
|
|
2497
|
-
(i(!0), u(Q, null, Y(
|
|
2497
|
+
(i(!0), u(Q, null, Y(a.value, (V, z) => (i(), u("tr", {
|
|
2498
2498
|
key: V.id,
|
|
2499
2499
|
class: B(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
|
|
2500
2500
|
"opacity-50": s.value === z,
|
|
@@ -2502,11 +2502,11 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2502
2502
|
}]),
|
|
2503
2503
|
draggable: "true",
|
|
2504
2504
|
onDragstart: (Z) => g(z),
|
|
2505
|
-
onDragover:
|
|
2505
|
+
onDragover: re((Z) => v(z), ["prevent"]),
|
|
2506
2506
|
onDrop: (Z) => M(z)
|
|
2507
2507
|
}, [
|
|
2508
|
-
t("td",
|
|
2509
|
-
t("div",
|
|
2508
|
+
t("td", Cr, [
|
|
2509
|
+
t("div", Vr, [
|
|
2510
2510
|
j(Ze, {
|
|
2511
2511
|
width: "24",
|
|
2512
2512
|
height: "24",
|
|
@@ -2518,39 +2518,39 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2518
2518
|
key: Z.key,
|
|
2519
2519
|
class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
|
|
2520
2520
|
}, [
|
|
2521
|
-
t("div",
|
|
2521
|
+
t("div", Mr, E(x(V, Z)), 1)
|
|
2522
2522
|
]))), 128)),
|
|
2523
|
-
t("td",
|
|
2524
|
-
t("div",
|
|
2523
|
+
t("td", Lr, [
|
|
2524
|
+
t("div", Br, [
|
|
2525
2525
|
t("button", {
|
|
2526
2526
|
onClick: (Z) => h(V, z),
|
|
2527
2527
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2528
2528
|
}, [
|
|
2529
|
-
j(
|
|
2529
|
+
j(rr, {
|
|
2530
2530
|
width: "24",
|
|
2531
2531
|
height: "24",
|
|
2532
2532
|
class: "w-3 h-3"
|
|
2533
2533
|
})
|
|
2534
|
-
], 8,
|
|
2534
|
+
], 8, Sr),
|
|
2535
2535
|
t("button", {
|
|
2536
2536
|
onClick: (Z) => J(z),
|
|
2537
2537
|
class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
|
|
2538
2538
|
}, [
|
|
2539
|
-
j(
|
|
2539
|
+
j(Ie, {
|
|
2540
2540
|
width: "24",
|
|
2541
2541
|
height: "24",
|
|
2542
2542
|
class: "w-3 h-3"
|
|
2543
2543
|
})
|
|
2544
|
-
], 8,
|
|
2544
|
+
], 8, jr)
|
|
2545
2545
|
])
|
|
2546
2546
|
])
|
|
2547
|
-
], 42, $
|
|
2547
|
+
], 42, $r))), 128))
|
|
2548
2548
|
], 2)
|
|
2549
2549
|
])
|
|
2550
2550
|
])
|
|
2551
2551
|
]));
|
|
2552
2552
|
}
|
|
2553
|
-
}),
|
|
2553
|
+
}), Ar = {
|
|
2554
2554
|
draw: {
|
|
2555
2555
|
toolbar: {
|
|
2556
2556
|
actions: {
|
|
@@ -2658,7 +2658,7 @@ const aa = /* @__PURE__ */ T(la, [["render", ra]]), sa = { class: "vs-datatable
|
|
|
2658
2658
|
}
|
|
2659
2659
|
}
|
|
2660
2660
|
};
|
|
2661
|
-
function
|
|
2661
|
+
function zr(o) {
|
|
2662
2662
|
return o ? o.type === "FeatureCollection" || o.type === "Feature" ? o : o.geom ? {
|
|
2663
2663
|
type: "Feature",
|
|
2664
2664
|
geometry: {
|
|
@@ -2672,7 +2672,7 @@ function za(o) {
|
|
|
2672
2672
|
properties: {}
|
|
2673
2673
|
} : null : null;
|
|
2674
2674
|
}
|
|
2675
|
-
const
|
|
2675
|
+
const Or = {}, Er = {
|
|
2676
2676
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2677
2677
|
viewBox: "0 0 24 24",
|
|
2678
2678
|
stroke: "currentColor",
|
|
@@ -2682,8 +2682,8 @@ const Oa = {}, Ea = {
|
|
|
2682
2682
|
"stroke-linejoin": "round",
|
|
2683
2683
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
|
|
2684
2684
|
};
|
|
2685
|
-
function
|
|
2686
|
-
return i(), u("svg",
|
|
2685
|
+
function Fr(o, e) {
|
|
2686
|
+
return i(), u("svg", Er, e[0] || (e[0] = [
|
|
2687
2687
|
t("path", {
|
|
2688
2688
|
stroke: "none",
|
|
2689
2689
|
d: "M0 0h24v24H0z",
|
|
@@ -2693,7 +2693,7 @@ function Fa(o, e) {
|
|
|
2693
2693
|
t("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
|
|
2694
2694
|
]));
|
|
2695
2695
|
}
|
|
2696
|
-
const
|
|
2696
|
+
const Dr = /* @__PURE__ */ R(Or, [["render", Fr]]), Ur = {}, Tr = {
|
|
2697
2697
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2698
2698
|
viewBox: "0 0 24 24",
|
|
2699
2699
|
fill: "none",
|
|
@@ -2703,8 +2703,8 @@ const Da = /* @__PURE__ */ T(Oa, [["render", Fa]]), Ua = {}, Ra = {
|
|
|
2703
2703
|
"stroke-linejoin": "round",
|
|
2704
2704
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
|
|
2705
2705
|
};
|
|
2706
|
-
function
|
|
2707
|
-
return i(), u("svg",
|
|
2706
|
+
function Rr(o, e) {
|
|
2707
|
+
return i(), u("svg", Tr, e[0] || (e[0] = [
|
|
2708
2708
|
t("path", {
|
|
2709
2709
|
stroke: "none",
|
|
2710
2710
|
d: "M0 0h24v24H0z",
|
|
@@ -2715,7 +2715,7 @@ function Ta(o, e) {
|
|
|
2715
2715
|
t("path", { d: "M7.5 16.5l9 -9" }, null, -1)
|
|
2716
2716
|
]));
|
|
2717
2717
|
}
|
|
2718
|
-
const
|
|
2718
|
+
const Pr = /* @__PURE__ */ R(Ur, [["render", Rr]]), Nr = {}, Hr = {
|
|
2719
2719
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2720
2720
|
viewBox: "0 0 24 24",
|
|
2721
2721
|
fill: "none",
|
|
@@ -2725,12 +2725,12 @@ const Pa = /* @__PURE__ */ T(Ua, [["render", Ta]]), Na = {}, Ha = {
|
|
|
2725
2725
|
"stroke-linejoin": "round",
|
|
2726
2726
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
|
|
2727
2727
|
};
|
|
2728
|
-
function
|
|
2729
|
-
return i(), u("svg",
|
|
2730
|
-
|
|
2728
|
+
function qr(o, e) {
|
|
2729
|
+
return i(), u("svg", Hr, e[0] || (e[0] = [
|
|
2730
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
|
|
2731
2731
|
]));
|
|
2732
2732
|
}
|
|
2733
|
-
const
|
|
2733
|
+
const Gr = /* @__PURE__ */ R(Nr, [["render", qr]]), Jr = {}, Kr = {
|
|
2734
2734
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2735
2735
|
viewBox: "0 0 24 24",
|
|
2736
2736
|
fill: "none",
|
|
@@ -2740,12 +2740,12 @@ const Ga = /* @__PURE__ */ T(Na, [["render", qa]]), Ja = {}, Ka = {
|
|
|
2740
2740
|
"stroke-linejoin": "round",
|
|
2741
2741
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
|
|
2742
2742
|
};
|
|
2743
|
-
function
|
|
2744
|
-
return i(), u("svg",
|
|
2745
|
-
|
|
2743
|
+
function Zr(o, e) {
|
|
2744
|
+
return i(), u("svg", Kr, e[0] || (e[0] = [
|
|
2745
|
+
ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
|
|
2746
2746
|
]));
|
|
2747
2747
|
}
|
|
2748
|
-
const
|
|
2748
|
+
const Wr = /* @__PURE__ */ R(Jr, [["render", Zr]]), Qr = {}, Xr = {
|
|
2749
2749
|
version: "1.1",
|
|
2750
2750
|
viewBox: "0 0 14 14",
|
|
2751
2751
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2753,8 +2753,8 @@ const Wa = /* @__PURE__ */ T(Ja, [["render", Za]]), Qa = {}, Xa = {
|
|
|
2753
2753
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
2754
2754
|
class: "fullscreen-icon"
|
|
2755
2755
|
};
|
|
2756
|
-
function
|
|
2757
|
-
return i(), u("svg",
|
|
2756
|
+
function Yr(o, e) {
|
|
2757
|
+
return i(), u("svg", Xr, e[0] || (e[0] = [
|
|
2758
2758
|
t("title", null, null, -1),
|
|
2759
2759
|
t("desc", null, null, -1),
|
|
2760
2760
|
t("defs", null, null, -1),
|
|
@@ -2783,7 +2783,7 @@ function Ya(o, e) {
|
|
|
2783
2783
|
], -1)
|
|
2784
2784
|
]));
|
|
2785
2785
|
}
|
|
2786
|
-
const es = /* @__PURE__ */
|
|
2786
|
+
const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__search" }, ls = { class: "map-search__input" }, os = { class: "flex flex-nowrap relative" }, as = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, rs = { class: "flex items-center w-full" }, ss = { class: "max-w-[90%] truncate" }, ns = {
|
|
2787
2787
|
key: 0,
|
|
2788
2788
|
class: "absolute z-[3100] mt-0.5 left-0 right-0"
|
|
2789
2789
|
}, is = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, us = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, ds = ["onClick"], cs = { class: "flex justify-between items-center w-full" }, ps = { class: "flex items-center" }, fs = {
|
|
@@ -2806,37 +2806,37 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2806
2806
|
}, xs = {
|
|
2807
2807
|
key: 2,
|
|
2808
2808
|
class: "px-3 py-2 text-xs text-gray-400"
|
|
2809
|
-
}, ws = /* @__PURE__ */
|
|
2809
|
+
}, ws = /* @__PURE__ */ A({
|
|
2810
2810
|
__name: "map-search",
|
|
2811
2811
|
props: {
|
|
2812
2812
|
placeholder: { default: "50, 30" }
|
|
2813
2813
|
},
|
|
2814
2814
|
emits: ["goToCoordinates"],
|
|
2815
2815
|
setup(o, { emit: e }) {
|
|
2816
|
-
const l = e, n = $(!1),
|
|
2816
|
+
const l = e, n = $(!1), r = $("coordinates"), a = $(""), s = $([]), d = $(!1), p = $(!1);
|
|
2817
2817
|
let f;
|
|
2818
2818
|
const c = [
|
|
2819
2819
|
{ value: "coordinates", label: "Пошук по кординатам" },
|
|
2820
2820
|
{ value: "atu", label: "АТУ" },
|
|
2821
2821
|
{ value: "address", label: "Адресса" },
|
|
2822
2822
|
{ value: "search_here", label: "Пошук HERE" }
|
|
2823
|
-
], g = D(() => c.find((_) => _.value ===
|
|
2823
|
+
], g = D(() => c.find((_) => _.value === r.value)?.label ?? "АТУ");
|
|
2824
2824
|
function v(_) {
|
|
2825
|
-
|
|
2825
|
+
r.value = _.value, n.value = !1, a.value = "", a.value && F();
|
|
2826
2826
|
}
|
|
2827
2827
|
function M(_) {
|
|
2828
2828
|
_.target.closest(".map-search__input") || (n.value = !1);
|
|
2829
2829
|
}
|
|
2830
2830
|
ue(() => document.addEventListener("click", M)), et(() => document.removeEventListener("click", M));
|
|
2831
|
-
async function
|
|
2831
|
+
async function I(_) {
|
|
2832
2832
|
let x;
|
|
2833
|
-
|
|
2833
|
+
r.value === "atu" ? x = "/api/suggest/atu.nsdi.ato_level" : r.value === "address" ? x = "/api/suggest/map.address_id" : r.value === "search_here" && (x = "/api/gis-url-proxy");
|
|
2834
2834
|
const h = new URL(x || "");
|
|
2835
|
-
return
|
|
2835
|
+
return r.value === "search_here" ? h.searchParams.set("searchtext", _) : (r.value === "atu" || r.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
|
|
2836
2836
|
}
|
|
2837
2837
|
function F() {
|
|
2838
|
-
if (d.value = !0, p.value = !0,
|
|
2839
|
-
const _ =
|
|
2838
|
+
if (d.value = !0, p.value = !0, r.value === "coordinates") {
|
|
2839
|
+
const _ = a.value.trim().split(",");
|
|
2840
2840
|
if (_.length === 2) {
|
|
2841
2841
|
const x = parseFloat(_[0]), h = parseFloat(_[1]);
|
|
2842
2842
|
!Number.isNaN(x) && !Number.isNaN(h) && l("goToCoordinates", [x, h]);
|
|
@@ -2844,13 +2844,13 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2844
2844
|
return;
|
|
2845
2845
|
}
|
|
2846
2846
|
f && window.clearTimeout(f), f = window.setTimeout(async () => {
|
|
2847
|
-
const _ =
|
|
2847
|
+
const _ = a.value.trim();
|
|
2848
2848
|
if (!_) {
|
|
2849
2849
|
s.value = [], p.value = !1;
|
|
2850
2850
|
return;
|
|
2851
2851
|
}
|
|
2852
2852
|
try {
|
|
2853
|
-
const x = await
|
|
2853
|
+
const x = await I(_);
|
|
2854
2854
|
s.value = Array.isArray(x.features) ? x.features : [];
|
|
2855
2855
|
} catch {
|
|
2856
2856
|
s.value = [];
|
|
@@ -2860,7 +2860,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2860
2860
|
}, 300);
|
|
2861
2861
|
}
|
|
2862
2862
|
function U() {
|
|
2863
|
-
|
|
2863
|
+
a.value = "", s.value = [], d.value = !1, p.value = !1;
|
|
2864
2864
|
}
|
|
2865
2865
|
function P(_) {
|
|
2866
2866
|
l("goToCoordinates", _), d.value = !1, p.value = !1, s.value = [];
|
|
@@ -2868,13 +2868,13 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2868
2868
|
return (_, x) => (i(), u("div", ts, [
|
|
2869
2869
|
t("div", ls, [
|
|
2870
2870
|
t("div", os, [
|
|
2871
|
-
t("div",
|
|
2871
|
+
t("div", as, [
|
|
2872
2872
|
t("button", {
|
|
2873
2873
|
type: "button",
|
|
2874
2874
|
onClick: x[0] || (x[0] = (h) => n.value = !n.value),
|
|
2875
2875
|
class: "h-[40px] relative px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-1 focus:ring-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200"
|
|
2876
2876
|
}, [
|
|
2877
|
-
t("div",
|
|
2877
|
+
t("div", rs, [
|
|
2878
2878
|
t("span", ss, E(g.value), 1)
|
|
2879
2879
|
]),
|
|
2880
2880
|
x[3] || (x[3] = t("svg", {
|
|
@@ -2904,7 +2904,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2904
2904
|
t("div", ps, [
|
|
2905
2905
|
t("div", null, E(h.label), 1)
|
|
2906
2906
|
]),
|
|
2907
|
-
h.value ===
|
|
2907
|
+
h.value === r.value ? (i(), u("svg", fs, x[4] || (x[4] = [
|
|
2908
2908
|
t("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
2909
2909
|
]))) : S("", !0)
|
|
2910
2910
|
])
|
|
@@ -2940,15 +2940,15 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2940
2940
|
], -1)),
|
|
2941
2941
|
K(t("input", {
|
|
2942
2942
|
type: "text",
|
|
2943
|
-
"onUpdate:modelValue": x[1] || (x[1] = (h) =>
|
|
2943
|
+
"onUpdate:modelValue": x[1] || (x[1] = (h) => a.value = h),
|
|
2944
2944
|
onInput: F,
|
|
2945
2945
|
onFocus: x[2] || (x[2] = (h) => d.value = !0),
|
|
2946
2946
|
placeholder: "Пошук...",
|
|
2947
2947
|
class: "bg-white h-[38px] text-sm py-2 px-3 ps-9 pe-8 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
|
|
2948
2948
|
}, null, 544), [
|
|
2949
|
-
[ne,
|
|
2949
|
+
[ne, a.value]
|
|
2950
2950
|
]),
|
|
2951
|
-
|
|
2951
|
+
a.value ? (i(), u("button", {
|
|
2952
2952
|
key: 0,
|
|
2953
2953
|
onClick: U,
|
|
2954
2954
|
class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
|
|
@@ -2970,7 +2970,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2970
2970
|
})
|
|
2971
2971
|
], -1)
|
|
2972
2972
|
]))) : S("", !0),
|
|
2973
|
-
d.value &&
|
|
2973
|
+
d.value && r.value !== "coordinates" ? (i(), u("div", hs, [
|
|
2974
2974
|
s.value.length ? (i(), u("ul", gs, [
|
|
2975
2975
|
(i(!0), u(Q, null, Y(s.value, (h) => (i(), u("li", {
|
|
2976
2976
|
key: h.properties.place_id,
|
|
@@ -2985,7 +2985,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2985
2985
|
])
|
|
2986
2986
|
]));
|
|
2987
2987
|
}
|
|
2988
|
-
}), ks = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, _s = { class: "flex gap-2" }, $s = ["onClick", "title"], Cs = ["src"], Vs = /* @__PURE__ */
|
|
2988
|
+
}), ks = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, _s = { class: "flex gap-2" }, $s = ["onClick", "title"], Cs = ["src"], Vs = /* @__PURE__ */ A({
|
|
2989
2989
|
__name: "map-layers",
|
|
2990
2990
|
props: {
|
|
2991
2991
|
basemaps: {},
|
|
@@ -2993,16 +2993,16 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
2993
2993
|
},
|
|
2994
2994
|
emits: ["onLayerChange"],
|
|
2995
2995
|
setup(o, { emit: e }) {
|
|
2996
|
-
const n = $(o.defaultLayer ?? ""),
|
|
2997
|
-
function
|
|
2998
|
-
|
|
2996
|
+
const n = $(o.defaultLayer ?? ""), r = e;
|
|
2997
|
+
function a(s) {
|
|
2998
|
+
r("onLayerChange", s), n.value = s;
|
|
2999
2999
|
}
|
|
3000
3000
|
return (s, d) => (i(), u("div", ks, [
|
|
3001
3001
|
t("div", _s, [
|
|
3002
3002
|
(i(!0), u(Q, null, Y(s.basemaps, (p, f) => (i(), u("div", {
|
|
3003
3003
|
key: f,
|
|
3004
3004
|
class: B(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
|
|
3005
|
-
onClick: (c) =>
|
|
3005
|
+
onClick: (c) => a(f),
|
|
3006
3006
|
title: f,
|
|
3007
3007
|
role: "button",
|
|
3008
3008
|
tabindex: "0"
|
|
@@ -3016,16 +3016,16 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3016
3016
|
])
|
|
3017
3017
|
]));
|
|
3018
3018
|
}
|
|
3019
|
-
}), Ms = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ls = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, Ss = ["disabled"], js = { class: "absolute top-4 right-4 z-[1000]" },
|
|
3019
|
+
}), Ms = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ls = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, Ss = ["disabled"], js = { class: "absolute top-4 right-4 z-[1000]" }, Is = { class: "flex flex-col gap-[2px]" }, As = ["aria-pressed"], zs = ["aria-pressed"], Os = ["aria-pressed"], Es = ["aria-pressed"], Fs = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, Ds = {
|
|
3020
3020
|
key: 0,
|
|
3021
3021
|
class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
|
|
3022
|
-
}, Us = { class: "mr-auto" },
|
|
3022
|
+
}, Us = { class: "mr-auto" }, Ts = { class: "font-bold" }, Rs = { class: "flex items-center" }, Ps = { class: "text-xs mr-2" }, Ns = {
|
|
3023
3023
|
key: 0,
|
|
3024
3024
|
class: "text-xs"
|
|
3025
3025
|
}, Hs = {
|
|
3026
3026
|
key: 1,
|
|
3027
3027
|
class: "text-xs"
|
|
3028
|
-
}, qs = /* @__PURE__ */
|
|
3028
|
+
}, qs = /* @__PURE__ */ A({
|
|
3029
3029
|
__name: "vs-input-map",
|
|
3030
3030
|
props: {
|
|
3031
3031
|
style: {},
|
|
@@ -3038,8 +3038,8 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3038
3038
|
},
|
|
3039
3039
|
emits: ["update:modelValue"],
|
|
3040
3040
|
setup(o, { emit: e }) {
|
|
3041
|
-
const l = o, n = e,
|
|
3042
|
-
let
|
|
3041
|
+
const l = o, n = e, r = $(null);
|
|
3042
|
+
let a, s, d;
|
|
3043
3043
|
const p = $(null), f = $(null), c = $(6), g = $(0), v = $(null), M = {
|
|
3044
3044
|
topo100: {
|
|
3045
3045
|
url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
|
|
@@ -3054,12 +3054,12 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3054
3054
|
preview: "https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"
|
|
3055
3055
|
}
|
|
3056
3056
|
};
|
|
3057
|
-
let
|
|
3057
|
+
let I;
|
|
3058
3058
|
const F = $("topo100");
|
|
3059
3059
|
function U() {
|
|
3060
3060
|
return new Promise((b, y) => {
|
|
3061
3061
|
window.L && window.L.Draw && b(0);
|
|
3062
|
-
const
|
|
3062
|
+
const T = (ee) => {
|
|
3063
3063
|
if (Array.from(document.styleSheets).some((he) => he?.href?.includes(ee))) return;
|
|
3064
3064
|
const de = document.createElement("link");
|
|
3065
3065
|
de.rel = "stylesheet", de.href = ee, document.head.appendChild(de);
|
|
@@ -3072,7 +3072,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3072
3072
|
const ge = document.createElement("script");
|
|
3073
3073
|
ge.src = ee, ge.async = !0, ge.onload = () => _e(), ge.onerror = (ce) => de(ce), document.body.appendChild(ge);
|
|
3074
3074
|
});
|
|
3075
|
-
|
|
3075
|
+
T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), T("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(y);
|
|
3076
3076
|
});
|
|
3077
3077
|
}
|
|
3078
3078
|
function P() {
|
|
@@ -3084,7 +3084,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3084
3084
|
const y = s.getLayers();
|
|
3085
3085
|
if (!y.length) return;
|
|
3086
3086
|
const N = L.featureGroup(y).getBounds();
|
|
3087
|
-
N && N.isValid() &&
|
|
3087
|
+
N && N.isValid() && a.fitBounds(N, { padding: [b, b] });
|
|
3088
3088
|
}
|
|
3089
3089
|
function x() {
|
|
3090
3090
|
p.value?.click();
|
|
@@ -3100,7 +3100,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3100
3100
|
}
|
|
3101
3101
|
if (b instanceof L.Polygon || b instanceof L.Rectangle)
|
|
3102
3102
|
try {
|
|
3103
|
-
const y = b.getLatLngs(),
|
|
3103
|
+
const y = b.getLatLngs(), T = Array.isArray(y[0]) ? y[0] : y, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(T) : 0;
|
|
3104
3104
|
return N ? N / 1e6 : 0;
|
|
3105
3105
|
} catch {
|
|
3106
3106
|
return null;
|
|
@@ -3108,7 +3108,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3108
3108
|
return null;
|
|
3109
3109
|
}
|
|
3110
3110
|
function m(b) {
|
|
3111
|
-
return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() :
|
|
3111
|
+
return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : a.getCenter();
|
|
3112
3112
|
}
|
|
3113
3113
|
function V() {
|
|
3114
3114
|
const b = s.getLayers();
|
|
@@ -3116,9 +3116,9 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3116
3116
|
v.value = null, g.value = 0;
|
|
3117
3117
|
return;
|
|
3118
3118
|
}
|
|
3119
|
-
const y = b[b.length - 1],
|
|
3119
|
+
const y = b[b.length - 1], T = J(y), N = m(y), ee = C(y);
|
|
3120
3120
|
v.value = {
|
|
3121
|
-
type:
|
|
3121
|
+
type: T,
|
|
3122
3122
|
center: N,
|
|
3123
3123
|
areaKm2: ee,
|
|
3124
3124
|
layer: y
|
|
@@ -3126,79 +3126,79 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3126
3126
|
}
|
|
3127
3127
|
function z() {
|
|
3128
3128
|
const b = v.value?.layer;
|
|
3129
|
-
b && (b instanceof L.Circle && b.getBounds ?
|
|
3129
|
+
b && (b instanceof L.Circle && b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && a.setView(b.getLatLng(), Math.max(c.value, 14)));
|
|
3130
3130
|
}
|
|
3131
3131
|
function Z() {
|
|
3132
3132
|
const b = v.value?.layer;
|
|
3133
3133
|
b && (s.removeLayer(b), P(), V());
|
|
3134
3134
|
}
|
|
3135
3135
|
ue(async () => {
|
|
3136
|
-
await U(), L.drawLocal =
|
|
3137
|
-
const { layer:
|
|
3138
|
-
s.clearLayers(), s.addLayer(
|
|
3139
|
-
}),
|
|
3136
|
+
await U(), L.drawLocal = Ar, a = L.map(r.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), I = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = "topo100", s = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (y) => {
|
|
3137
|
+
const { layer: T } = y;
|
|
3138
|
+
s.clearLayers(), s.addLayer(T), P(), V(), _(), h.value = "";
|
|
3139
|
+
}), a.on(L.Draw.Event.EDITED, () => {
|
|
3140
3140
|
P(), V(), _();
|
|
3141
|
-
}),
|
|
3141
|
+
}), a.on(L.Draw.Event.DELETED, () => {
|
|
3142
3142
|
P(), V(), _();
|
|
3143
|
-
}),
|
|
3143
|
+
}), a.on("mousemove", (y) => {
|
|
3144
3144
|
f.value = y.latlng;
|
|
3145
|
-
}),
|
|
3146
|
-
c.value =
|
|
3145
|
+
}), a.on("zoomend", () => {
|
|
3146
|
+
c.value = a.getZoom();
|
|
3147
3147
|
});
|
|
3148
|
-
const b =
|
|
3148
|
+
const b = zr(l.modelValue);
|
|
3149
3149
|
if (b) {
|
|
3150
3150
|
const y = [];
|
|
3151
|
-
L.geoJSON(b).eachLayer((
|
|
3151
|
+
L.geoJSON(b).eachLayer((T) => y.push(T)), y.length && s.addLayer(y[0]), P(), V(), _();
|
|
3152
3152
|
}
|
|
3153
3153
|
});
|
|
3154
3154
|
function te(b) {
|
|
3155
|
-
if (
|
|
3155
|
+
if (a) {
|
|
3156
3156
|
switch (d && d.disable(), b) {
|
|
3157
3157
|
case "marker":
|
|
3158
|
-
d = new L.Draw.Marker(
|
|
3158
|
+
d = new L.Draw.Marker(a);
|
|
3159
3159
|
break;
|
|
3160
3160
|
case "polyline":
|
|
3161
|
-
d = new L.Draw.Polyline(
|
|
3161
|
+
d = new L.Draw.Polyline(a);
|
|
3162
3162
|
break;
|
|
3163
3163
|
case "polygon":
|
|
3164
|
-
d = new L.Draw.Polygon(
|
|
3164
|
+
d = new L.Draw.Polygon(a);
|
|
3165
3165
|
break;
|
|
3166
3166
|
case "rectangle":
|
|
3167
|
-
d = new L.Draw.Rectangle(
|
|
3167
|
+
d = new L.Draw.Rectangle(a);
|
|
3168
3168
|
break;
|
|
3169
3169
|
default:
|
|
3170
|
-
d = new L.Draw.Rectangle(
|
|
3170
|
+
d = new L.Draw.Rectangle(a);
|
|
3171
3171
|
break;
|
|
3172
3172
|
}
|
|
3173
3173
|
d && (d.enable(), h.value = b);
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
3176
|
function ye() {
|
|
3177
|
-
const b = s.toGeoJSON(), y = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }),
|
|
3178
|
-
N.href =
|
|
3177
|
+
const b = s.toGeoJSON(), y = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), T = URL.createObjectURL(y), N = document.createElement("a");
|
|
3178
|
+
N.href = T, N.download = "data.geojson", N.click(), URL.revokeObjectURL(T);
|
|
3179
3179
|
}
|
|
3180
3180
|
function we(b) {
|
|
3181
3181
|
const y = b.target.files?.[0];
|
|
3182
3182
|
if (!y) return;
|
|
3183
|
-
const
|
|
3184
|
-
|
|
3185
|
-
if (typeof
|
|
3183
|
+
const T = new FileReader();
|
|
3184
|
+
T.onload = () => {
|
|
3185
|
+
if (typeof T.result == "string")
|
|
3186
3186
|
try {
|
|
3187
|
-
const N = JSON.parse(
|
|
3187
|
+
const N = JSON.parse(T.result);
|
|
3188
3188
|
s.clearLayers(), N && L.geoJSON({ type: "Feature", geometry: N }).eachLayer((ee) => {
|
|
3189
3189
|
s.addLayer(ee);
|
|
3190
3190
|
}), P(), V(), _();
|
|
3191
3191
|
} finally {
|
|
3192
3192
|
b.target.value = "";
|
|
3193
3193
|
}
|
|
3194
|
-
},
|
|
3194
|
+
}, T.readAsText(y);
|
|
3195
3195
|
}
|
|
3196
3196
|
function ie(b) {
|
|
3197
|
-
|
|
3197
|
+
a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = b);
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function Ae(b) {
|
|
3200
3200
|
const y = L.latLng(b[0], b[1]);
|
|
3201
|
-
|
|
3201
|
+
a.setView(y, 13);
|
|
3202
3202
|
}
|
|
3203
3203
|
se(
|
|
3204
3204
|
() => l.modelValue,
|
|
@@ -3214,11 +3214,11 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3214
3214
|
}, [
|
|
3215
3215
|
t("div", {
|
|
3216
3216
|
ref_key: "mapContainer",
|
|
3217
|
-
ref:
|
|
3217
|
+
ref: r,
|
|
3218
3218
|
class: "w-full h-full"
|
|
3219
3219
|
}, null, 512),
|
|
3220
3220
|
t("div", Ms, [
|
|
3221
|
-
j(ws, { onGoToCoordinates:
|
|
3221
|
+
j(ws, { onGoToCoordinates: Ae }),
|
|
3222
3222
|
t("div", Ls, [
|
|
3223
3223
|
t("div", Bs, [
|
|
3224
3224
|
t("button", {
|
|
@@ -3244,46 +3244,46 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3244
3244
|
])
|
|
3245
3245
|
]),
|
|
3246
3246
|
t("div", js, [
|
|
3247
|
-
t("div",
|
|
3247
|
+
t("div", Is, [
|
|
3248
3248
|
t("button", {
|
|
3249
3249
|
class: B(["vs-btn", { "vs-active": h.value === "marker" }]),
|
|
3250
3250
|
"aria-pressed": h.value === "marker",
|
|
3251
3251
|
title: "Point (P)",
|
|
3252
3252
|
"aria-label": "Draw point",
|
|
3253
|
-
onClick: y[0] || (y[0] = (
|
|
3253
|
+
onClick: y[0] || (y[0] = (T) => te("marker"))
|
|
3254
3254
|
}, [
|
|
3255
|
-
j(
|
|
3256
|
-
], 10,
|
|
3255
|
+
j(Dr)
|
|
3256
|
+
], 10, As),
|
|
3257
3257
|
t("button", {
|
|
3258
3258
|
class: B(["vs-btn", { "vs-active": h.value === "polyline" }]),
|
|
3259
3259
|
"aria-pressed": h.value === "polyline",
|
|
3260
3260
|
title: "Line (L)",
|
|
3261
3261
|
"aria-label": "Draw polyline",
|
|
3262
|
-
onClick: y[1] || (y[1] = (
|
|
3262
|
+
onClick: y[1] || (y[1] = (T) => te("polyline"))
|
|
3263
3263
|
}, [
|
|
3264
|
-
j(
|
|
3264
|
+
j(Pr)
|
|
3265
3265
|
], 10, zs),
|
|
3266
3266
|
t("button", {
|
|
3267
3267
|
class: B(["vs-btn", { "vs-active": h.value === "polygon" }]),
|
|
3268
3268
|
"aria-pressed": h.value === "polygon",
|
|
3269
3269
|
title: "Polygon (G)",
|
|
3270
3270
|
"aria-label": "Draw polygon",
|
|
3271
|
-
onClick: y[2] || (y[2] = (
|
|
3271
|
+
onClick: y[2] || (y[2] = (T) => te("polygon"))
|
|
3272
3272
|
}, [
|
|
3273
|
-
j(
|
|
3273
|
+
j(Gr)
|
|
3274
3274
|
], 10, Os),
|
|
3275
3275
|
t("button", {
|
|
3276
3276
|
class: B(["vs-btn", { "vs-active": h.value === "rectangle" }]),
|
|
3277
3277
|
"aria-pressed": h.value === "rectangle",
|
|
3278
3278
|
title: "Rectangle (R)",
|
|
3279
3279
|
"aria-label": "Draw rectangle",
|
|
3280
|
-
onClick: y[3] || (y[3] = (
|
|
3280
|
+
onClick: y[3] || (y[3] = (T) => te("rectangle"))
|
|
3281
3281
|
}, [
|
|
3282
|
-
j(
|
|
3282
|
+
j(Wr)
|
|
3283
3283
|
], 10, Es),
|
|
3284
3284
|
t("button", {
|
|
3285
3285
|
class: "vs-btn",
|
|
3286
|
-
onClick: y[4] || (y[4] = (
|
|
3286
|
+
onClick: y[4] || (y[4] = (T) => ke.value = !ke.value)
|
|
3287
3287
|
}, [
|
|
3288
3288
|
j(es, { style: { width: "12px", height: "12px" } })
|
|
3289
3289
|
])
|
|
@@ -3302,9 +3302,9 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3302
3302
|
v.value ? (i(), u("div", Ds, [
|
|
3303
3303
|
t("div", Us, [
|
|
3304
3304
|
y[7] || (y[7] = oe(" Тип: ")),
|
|
3305
|
-
t("span",
|
|
3305
|
+
t("span", Ts, E(v.value.type), 1)
|
|
3306
3306
|
]),
|
|
3307
|
-
t("div",
|
|
3307
|
+
t("div", Rs, [
|
|
3308
3308
|
t("div", Ps, [
|
|
3309
3309
|
y[8] || (y[8] = oe(" Центр: ")),
|
|
3310
3310
|
t("b", null, E(v.value.center.lat.toFixed(5)) + ", " + E(v.value.center.lng.toFixed(5)), 1)
|
|
@@ -3319,26 +3319,26 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3319
3319
|
t("button", {
|
|
3320
3320
|
class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
|
|
3321
3321
|
title: "Наблизити",
|
|
3322
|
-
onClick: y[5] || (y[5] = (
|
|
3322
|
+
onClick: y[5] || (y[5] = (T) => z())
|
|
3323
3323
|
}, y[11] || (y[11] = [
|
|
3324
|
-
|
|
3324
|
+
ae('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-d73d6cfa><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-d73d6cfa></path><path d="M7 10l6 0" data-v-d73d6cfa></path><path d="M10 7l0 6" data-v-d73d6cfa></path><path d="M21 21l-6 -6" data-v-d73d6cfa></path></svg>', 1)
|
|
3325
3325
|
])),
|
|
3326
3326
|
t("button", {
|
|
3327
3327
|
class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
|
|
3328
3328
|
title: "Видалити",
|
|
3329
|
-
onClick: y[6] || (y[6] = (
|
|
3329
|
+
onClick: y[6] || (y[6] = (T) => Z())
|
|
3330
3330
|
}, [
|
|
3331
|
-
j(
|
|
3331
|
+
j(Ie, { class: "w-3 h-3" })
|
|
3332
3332
|
])
|
|
3333
3333
|
])
|
|
3334
3334
|
])) : S("", !0)
|
|
3335
3335
|
])
|
|
3336
3336
|
], 2));
|
|
3337
3337
|
}
|
|
3338
|
-
}), Gs = /* @__PURE__ */
|
|
3338
|
+
}), Gs = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-d73d6cfa"]]), Js = ["data-focus"], Ks = { class: "flex items-center" }, Zs = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Ws = ["onClick", "aria-label"], Qs = {
|
|
3339
3339
|
key: 0,
|
|
3340
3340
|
class: "absolute text-gray-500 truncate pl-2"
|
|
3341
|
-
}, Xs = { class: "flex-1 min-w-[2px]" }, Ys = ["placeholder"], en = { class: "flex items-center shrink-0" }, tn = ["disabled"], ln = /* @__PURE__ */
|
|
3341
|
+
}, Xs = { class: "flex-1 min-w-[2px]" }, Ys = ["placeholder"], en = { class: "flex items-center shrink-0" }, tn = ["disabled"], ln = /* @__PURE__ */ A({
|
|
3342
3342
|
__name: "vs-input-tag",
|
|
3343
3343
|
props: /* @__PURE__ */ q({
|
|
3344
3344
|
unique: { type: Boolean, default: !0 },
|
|
@@ -3357,7 +3357,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3357
3357
|
setup(o, { emit: e }) {
|
|
3358
3358
|
const l = o, n = e;
|
|
3359
3359
|
me(l.style);
|
|
3360
|
-
const
|
|
3360
|
+
const r = $(null), a = $(null), s = $(null), d = $(!1), p = $(""), f = G(o, "modelValue"), c = D(() => l.placeholder || "Add tag…"), g = D(() => f.value?.length === 0 && p.value === ""), v = D(() => !l.disabled && f.value?.length > 0), M = D(() => l.disabled), I = async () => {
|
|
3361
3361
|
M.value || await $e(() => s.value?.focus());
|
|
3362
3362
|
}, F = (C) => {
|
|
3363
3363
|
const m = C.trim();
|
|
@@ -3381,8 +3381,8 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3381
3381
|
return (C, m) => (i(), u("div", {
|
|
3382
3382
|
class: "flex gap-1 w-full",
|
|
3383
3383
|
ref_key: "root",
|
|
3384
|
-
ref:
|
|
3385
|
-
onClick: m[1] || (m[1] =
|
|
3384
|
+
ref: r,
|
|
3385
|
+
onClick: m[1] || (m[1] = re(() => {
|
|
3386
3386
|
}, ["stop"]))
|
|
3387
3387
|
}, [
|
|
3388
3388
|
t("div", {
|
|
@@ -3398,12 +3398,12 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3398
3398
|
M.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
|
|
3399
3399
|
]),
|
|
3400
3400
|
"data-focus": d.value ? "true" : "false",
|
|
3401
|
-
onClick:
|
|
3401
|
+
onClick: I
|
|
3402
3402
|
}, [
|
|
3403
3403
|
t("div", {
|
|
3404
3404
|
class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
|
|
3405
3405
|
ref_key: "chipsRef",
|
|
3406
|
-
ref:
|
|
3406
|
+
ref: a
|
|
3407
3407
|
}, [
|
|
3408
3408
|
(i(!0), u(Q, null, Y(f.value, (V, z) => (i(), u("div", {
|
|
3409
3409
|
key: z,
|
|
@@ -3415,7 +3415,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3415
3415
|
t("div", {
|
|
3416
3416
|
role: "button",
|
|
3417
3417
|
class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
|
|
3418
|
-
onClick:
|
|
3418
|
+
onClick: re((Z) => P(z), ["stop"]),
|
|
3419
3419
|
"aria-label": `Remove ${V}`
|
|
3420
3420
|
}, m[2] || (m[2] = [
|
|
3421
3421
|
t("svg", {
|
|
@@ -3461,7 +3461,7 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3461
3461
|
class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
|
|
3462
3462
|
"aria-label": "Clear all tags",
|
|
3463
3463
|
disabled: M.value,
|
|
3464
|
-
onClick:
|
|
3464
|
+
onClick: re(_, ["stop"])
|
|
3465
3465
|
}, m[3] || (m[3] = [
|
|
3466
3466
|
t("svg", {
|
|
3467
3467
|
height: "20",
|
|
@@ -3481,24 +3481,24 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3481
3481
|
VsInputText: He,
|
|
3482
3482
|
VsInputRadio: Ge,
|
|
3483
3483
|
"vs-input-text": He,
|
|
3484
|
-
"vs-input-textarea":
|
|
3484
|
+
"vs-input-textarea": Ia,
|
|
3485
3485
|
"vs-input-mask": sl,
|
|
3486
3486
|
"vs-input-number": St,
|
|
3487
3487
|
"vs-input-radio": Ge,
|
|
3488
|
-
"vs-input-select":
|
|
3488
|
+
"vs-input-select": Sa,
|
|
3489
3489
|
"vs-input-switcher": lt,
|
|
3490
3490
|
"vs-input-static": qe,
|
|
3491
|
-
"vs-input-container":
|
|
3491
|
+
"vs-input-container": na,
|
|
3492
3492
|
"vs-input-date": xl,
|
|
3493
3493
|
"vs-input-checkbox": bl,
|
|
3494
|
-
"vs-input-file":
|
|
3494
|
+
"vs-input-file": ro,
|
|
3495
3495
|
"vs-input-html": qe,
|
|
3496
3496
|
"vs-input-email": ul,
|
|
3497
|
-
"vs-input-datatable":
|
|
3497
|
+
"vs-input-datatable": Ir,
|
|
3498
3498
|
"vs-input-map": Gs,
|
|
3499
3499
|
"vs-input-file-list": Eo,
|
|
3500
3500
|
"vs-input-tag": ln
|
|
3501
|
-
},
|
|
3501
|
+
}, an = /* @__PURE__ */ A({
|
|
3502
3502
|
__name: "behavior",
|
|
3503
3503
|
props: {
|
|
3504
3504
|
api: {},
|
|
@@ -3512,25 +3512,25 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3512
3512
|
async function n() {
|
|
3513
3513
|
try {
|
|
3514
3514
|
if (!e.api) return;
|
|
3515
|
-
const
|
|
3516
|
-
if (!
|
|
3515
|
+
const r = e.api.replace("{{value}}", e.value), a = await fetch(r);
|
|
3516
|
+
if (!a.ok) {
|
|
3517
3517
|
pe({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
|
|
3518
3518
|
return;
|
|
3519
3519
|
}
|
|
3520
|
-
const s = await
|
|
3520
|
+
const s = await a.json();
|
|
3521
3521
|
if (!e.set || !l) return;
|
|
3522
3522
|
for (const [d, p] of Object.entries(e.set))
|
|
3523
3523
|
l.value[d] = s.result[p];
|
|
3524
|
-
} catch (
|
|
3525
|
-
console.error(e.error,
|
|
3524
|
+
} catch (r) {
|
|
3525
|
+
console.error(e.error, r);
|
|
3526
3526
|
}
|
|
3527
3527
|
}
|
|
3528
|
-
return (
|
|
3528
|
+
return (r, a) => (i(), u("button", {
|
|
3529
3529
|
onClick: n,
|
|
3530
3530
|
class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
|
|
3531
|
-
}, E(
|
|
3531
|
+
}, E(r.button), 1));
|
|
3532
3532
|
}
|
|
3533
|
-
}),
|
|
3533
|
+
}), rn = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
|
|
3534
3534
|
__name: "vs-compact-form-layout",
|
|
3535
3535
|
props: /* @__PURE__ */ q({
|
|
3536
3536
|
item: { default: {} },
|
|
@@ -3544,15 +3544,15 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3544
3544
|
}),
|
|
3545
3545
|
emits: ["update:modelValue"],
|
|
3546
3546
|
setup(o) {
|
|
3547
|
-
const e = o, l = G(o, "modelValue"), n = D(() => Mt[`${e.layout}`]),
|
|
3548
|
-
const d = H(
|
|
3547
|
+
const e = o, l = G(o, "modelValue"), n = D(() => Mt[`${e.layout}`]), r = D(() => on?.[`vs-input-${e.item.type}`]), a = D(() => {
|
|
3548
|
+
const d = H(r);
|
|
3549
3549
|
if (!d) return /* @__PURE__ */ new Set();
|
|
3550
3550
|
const p = d.props ?? d.__vccOpts?.props;
|
|
3551
3551
|
if (!p) return /* @__PURE__ */ new Set();
|
|
3552
3552
|
const f = Array.isArray(p) ? p : Object.keys(p);
|
|
3553
3553
|
return new Set(f);
|
|
3554
3554
|
}), s = D(() => {
|
|
3555
|
-
const d = e.item ?? {}, p =
|
|
3555
|
+
const d = e.item ?? {}, p = a.value;
|
|
3556
3556
|
return p.size ? Object.fromEntries(Object.entries(d).filter(([f]) => p.has(f))) : {};
|
|
3557
3557
|
});
|
|
3558
3558
|
return (d, p) => (i(), X(xe(n.value), {
|
|
@@ -3562,12 +3562,12 @@ const es = /* @__PURE__ */ T(Qa, [["render", Ya]]), ts = { class: "form-geom__se
|
|
|
3562
3562
|
label: e.item.label
|
|
3563
3563
|
}, {
|
|
3564
3564
|
default: Me(() => [
|
|
3565
|
-
t("div",
|
|
3566
|
-
(i(), X(xe(
|
|
3565
|
+
t("div", rn, [
|
|
3566
|
+
(i(), X(xe(r.value), Ce(s.value, {
|
|
3567
3567
|
modelValue: l.value,
|
|
3568
3568
|
"onUpdate:modelValue": p[0] || (p[0] = (f) => l.value = f)
|
|
3569
3569
|
}), null, 16, ["modelValue"])),
|
|
3570
|
-
d.item.behavior ? (i(), X(
|
|
3570
|
+
d.item.behavior ? (i(), X(an, Ce({ key: 0 }, d.item.behavior, { value: l.value }), null, 16, ["value"])) : S("", !0)
|
|
3571
3571
|
])
|
|
3572
3572
|
]),
|
|
3573
3573
|
_: 1
|
|
@@ -3612,8 +3612,8 @@ function fn(o) {
|
|
|
3612
3612
|
if (Array.isArray(o)) {
|
|
3613
3613
|
const l = [];
|
|
3614
3614
|
return o.forEach((n) => {
|
|
3615
|
-
const
|
|
3616
|
-
|
|
3615
|
+
const r = { ...n };
|
|
3616
|
+
r.name = (n.name || n.id || n.key || "").toString(), r.type = We(n.type), r.label = n.label || n.ua, r.rules = n.rules || n.validators, n.data && (r.api = `/api/suggest/${n.data}`), l.push(r);
|
|
3617
3617
|
}), l;
|
|
3618
3618
|
}
|
|
3619
3619
|
const e = [];
|
|
@@ -3630,15 +3630,15 @@ function fn(o) {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
function vn(o, e) {
|
|
3632
3632
|
const l = fn(e), n = $({});
|
|
3633
|
-
function
|
|
3633
|
+
function r(p) {
|
|
3634
3634
|
const f = p?.conditions;
|
|
3635
3635
|
if (!f) return !0;
|
|
3636
3636
|
const c = Array.isArray(f) ? f[0] : f, g = o?.value?.[c];
|
|
3637
|
-
return
|
|
3637
|
+
return at(g, f);
|
|
3638
3638
|
}
|
|
3639
|
-
const
|
|
3639
|
+
const a = (p = l, f = !0) => (p.forEach((c) => {
|
|
3640
3640
|
if (c.rules) {
|
|
3641
|
-
if (!
|
|
3641
|
+
if (!r(c)) {
|
|
3642
3642
|
delete n.value[c.name];
|
|
3643
3643
|
return;
|
|
3644
3644
|
}
|
|
@@ -3647,18 +3647,18 @@ function vn(o, e) {
|
|
|
3647
3647
|
v ? n.value[c.name] = v : delete n.value[c.name];
|
|
3648
3648
|
});
|
|
3649
3649
|
}
|
|
3650
|
-
c.schema &&
|
|
3651
|
-
}), f && Object.values(n.value).some(Boolean) ? n.value : null), s = D(() => l?.filter((p) =>
|
|
3650
|
+
c.schema && a(c.schema, !1);
|
|
3651
|
+
}), f && Object.values(n.value).some(Boolean) ? n.value : null), s = D(() => l?.filter((p) => r(p)));
|
|
3652
3652
|
return {
|
|
3653
3653
|
errors: n,
|
|
3654
|
-
validate:
|
|
3654
|
+
validate: a,
|
|
3655
3655
|
reset: () => {
|
|
3656
3656
|
o.value = {}, n.value = {};
|
|
3657
3657
|
},
|
|
3658
3658
|
visibleSchema: s
|
|
3659
3659
|
};
|
|
3660
3660
|
}
|
|
3661
|
-
const Oe = /* @__PURE__ */
|
|
3661
|
+
const Oe = /* @__PURE__ */ A({
|
|
3662
3662
|
__name: "vs-compact-form",
|
|
3663
3663
|
props: /* @__PURE__ */ q({
|
|
3664
3664
|
schema: { default: () => [] },
|
|
@@ -3674,12 +3674,12 @@ const Oe = /* @__PURE__ */ I({
|
|
|
3674
3674
|
}),
|
|
3675
3675
|
emits: /* @__PURE__ */ q(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
|
|
3676
3676
|
setup(o, { expose: e, emit: l }) {
|
|
3677
|
-
const n = l,
|
|
3677
|
+
const n = l, r = o, a = G(o, "form"), s = G(o, "values"), {
|
|
3678
3678
|
errors: d,
|
|
3679
3679
|
validate: p,
|
|
3680
3680
|
reset: f,
|
|
3681
3681
|
visibleSchema: c
|
|
3682
|
-
} = vn(s,
|
|
3682
|
+
} = vn(s, r.schema), g = () => {
|
|
3683
3683
|
n("update:modelValue", s.value), p(), n("handle-submit", s.value);
|
|
3684
3684
|
};
|
|
3685
3685
|
e({
|
|
@@ -3687,19 +3687,19 @@ const Oe = /* @__PURE__ */ I({
|
|
|
3687
3687
|
reset: f,
|
|
3688
3688
|
errors: d
|
|
3689
3689
|
}), ue(() => {
|
|
3690
|
-
|
|
3690
|
+
r.modelValue && (s.value = r.modelValue), a.value.value = s.value, a.value.errors = d.value, a.value.reset = f, a.value.validate = p, a.value.formId = r.formId;
|
|
3691
3691
|
});
|
|
3692
|
-
function v(M,
|
|
3693
|
-
if (M ===
|
|
3694
|
-
if (typeof M != "object" || typeof
|
|
3695
|
-
const F = Object.keys(M), U = Object.keys(
|
|
3696
|
-
return F.length !== U.length ? !1 : F.every((P) => M[P] ===
|
|
3692
|
+
function v(M, I) {
|
|
3693
|
+
if (M === I) return !0;
|
|
3694
|
+
if (typeof M != "object" || typeof I != "object" || !M || !I) return !1;
|
|
3695
|
+
const F = Object.keys(M), U = Object.keys(I);
|
|
3696
|
+
return F.length !== U.length ? !1 : F.every((P) => M[P] === I[P]);
|
|
3697
3697
|
}
|
|
3698
|
-
return Ne("form",
|
|
3699
|
-
onSubmit:
|
|
3698
|
+
return Ne("form", a), Ne("values", s), (M, I) => (i(), u("form", {
|
|
3699
|
+
onSubmit: re(g, ["prevent"]),
|
|
3700
3700
|
class: B(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
|
|
3701
3701
|
}, [
|
|
3702
|
-
(i(!0), u(Q, null, Y(H(c), (F) => (i(), X(
|
|
3702
|
+
(i(!0), u(Q, null, Y(H(c), (F) => (i(), X(rt, {
|
|
3703
3703
|
key: F.name,
|
|
3704
3704
|
class: B(M.layout === "horizontal" ? "col-span-12" : `col-span-${F.col || 12} `),
|
|
3705
3705
|
style: fe(M.style),
|
|
@@ -3718,12 +3718,28 @@ const Oe = /* @__PURE__ */ I({
|
|
|
3718
3718
|
Oe.install = function(e) {
|
|
3719
3719
|
e.component("VForm", Oe), Object.assign(e.config.globalProperties, {
|
|
3720
3720
|
$form: Ve
|
|
3721
|
-
}), e.provide("form", Ve), window.v3plugin || (window.v3plugin = {})
|
|
3721
|
+
}), e.provide("form", Ve), window.v3plugin || (window.v3plugin = {});
|
|
3722
3722
|
};
|
|
3723
3723
|
export {
|
|
3724
|
-
|
|
3724
|
+
va as ModalEdit,
|
|
3725
3725
|
Oe as VForm,
|
|
3726
|
+
bl as VsInputCheckbox,
|
|
3727
|
+
na as VsInputContainer,
|
|
3728
|
+
xl as VsInputDate,
|
|
3729
|
+
ul as VsInputEmail,
|
|
3730
|
+
ro as VsInputFile,
|
|
3731
|
+
Eo as VsInputFileList,
|
|
3732
|
+
sl as VsInputMask,
|
|
3733
|
+
St as VsInputNumber,
|
|
3734
|
+
Ge as VsInputRadio,
|
|
3735
|
+
Sa as VsInputSelect,
|
|
3736
|
+
qe as VsInputStatic,
|
|
3737
|
+
lt as VsInputSwitcher,
|
|
3738
|
+
ln as VsInputTag,
|
|
3726
3739
|
He as VsInputText,
|
|
3740
|
+
Ia as VsInputTextarea,
|
|
3727
3741
|
Oe as default,
|
|
3728
|
-
on as inputs
|
|
3742
|
+
on as inputs,
|
|
3743
|
+
Ir as vsInputDatatable,
|
|
3744
|
+
Gs as vsInputMap
|
|
3729
3745
|
};
|