@winchsa/ui 0.1.33 → 0.1.35
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/Breadcrumbs.d.vue.ts +7 -0
- package/dist/components/Breadcrumbs.vue +46 -0
- package/dist/components/Breadcrumbs.vue.d.ts +7 -0
- package/dist/components/CustomizerSection.d.vue.ts +17 -0
- package/dist/components/CustomizerSection.vue +19 -0
- package/dist/components/CustomizerSection.vue.d.ts +17 -0
- package/dist/components/DialogCloseBtn.d.vue.ts +7 -0
- package/dist/components/DialogCloseBtn.vue +20 -0
- package/dist/components/DialogCloseBtn.vue.d.ts +7 -0
- package/dist/components/Drawer.d.vue.ts +28 -0
- package/dist/components/Drawer.vue +60 -0
- package/dist/components/Drawer.vue.d.ts +28 -0
- package/dist/components/IconBtn.d.vue.ts +18 -0
- package/dist/components/IconBtn.vue +24 -0
- package/dist/components/IconBtn.vue.d.ts +18 -0
- package/dist/components/LoadingBar.d.vue.ts +6 -0
- package/dist/components/LoadingBar.vue +31 -0
- package/dist/components/LoadingBar.vue.d.ts +6 -0
- package/dist/components/LoadingDialog.d.vue.ts +12 -0
- package/dist/components/LoadingDialog.vue +41 -0
- package/dist/components/LoadingDialog.vue.d.ts +12 -0
- package/dist/components/LoadingItem.d.vue.ts +25 -0
- package/dist/components/LoadingItem.vue +66 -0
- package/dist/components/LoadingItem.vue.d.ts +25 -0
- package/dist/components/Modal.d.vue.ts +50 -0
- package/dist/components/Modal.vue +155 -0
- package/dist/components/Modal.vue.d.ts +50 -0
- package/dist/components/MoreBtn.d.vue.ts +17 -0
- package/dist/components/MoreBtn.vue +28 -0
- package/dist/components/MoreBtn.vue.d.ts +17 -0
- package/dist/components/ScrollToTop.d.vue.ts +3 -0
- package/dist/components/ScrollToTop.vue +39 -0
- package/dist/components/ScrollToTop.vue.d.ts +3 -0
- package/dist/components/SiteTitle.d.vue.ts +3 -0
- package/dist/components/SiteTitle.vue +14 -0
- package/dist/components/SiteTitle.vue.d.ts +3 -0
- package/dist/components/Toaster.d.vue.ts +6 -0
- package/dist/components/Toaster.vue +19 -0
- package/dist/components/Toaster.vue.d.ts +6 -0
- package/dist/components/cards/AppCard.d.vue.ts +18 -0
- package/dist/components/cards/AppCard.vue +45 -0
- package/dist/components/cards/AppCard.vue.d.ts +18 -0
- package/dist/components/cards/AppCardActions.d.vue.ts +33 -0
- package/dist/components/cards/AppCardActions.vue +126 -0
- package/dist/components/cards/AppCardActions.vue.d.ts +33 -0
- package/dist/components/cards/CardStatisticsHorizontal.d.vue.ts +9 -0
- package/dist/components/cards/CardStatisticsHorizontal.vue +29 -0
- package/dist/components/cards/CardStatisticsHorizontal.vue.d.ts +9 -0
- package/dist/components/cards/CheckboxesCard.d.vue.ts +18 -0
- package/dist/components/cards/CheckboxesCard.vue +108 -0
- package/dist/components/cards/CheckboxesCard.vue.d.ts +18 -0
- package/dist/components/cards/HeaderCard.d.vue.ts +9 -0
- package/dist/components/cards/HeaderCard.vue +31 -0
- package/dist/components/cards/HeaderCard.vue.d.ts +9 -0
- package/dist/components/cards/ImageCard.d.vue.ts +33 -0
- package/dist/components/cards/ImageCard.vue +73 -0
- package/dist/components/cards/ImageCard.vue.d.ts +33 -0
- package/dist/components/cards/InputCard.d.vue.ts +21 -0
- package/dist/components/cards/InputCard.vue +60 -0
- package/dist/components/cards/InputCard.vue.d.ts +21 -0
- package/dist/components/cards/StaticCard.d.vue.ts +21 -0
- package/dist/components/cards/StaticCard.vue +37 -0
- package/dist/components/cards/StaticCard.vue.d.ts +21 -0
- package/dist/components/forms/Accordion.d.vue.ts +19 -0
- package/dist/components/forms/Accordion.vue +43 -0
- package/dist/components/forms/Accordion.vue.d.ts +19 -0
- package/dist/components/forms/AppBarSearch.d.vue.ts +43 -0
- package/dist/components/forms/AppBarSearch.vue +345 -0
- package/dist/components/forms/AppBarSearch.vue.d.ts +43 -0
- package/dist/components/forms/AppCombobox.d.vue.ts +13 -0
- package/dist/components/forms/AppCombobox.vue +60 -0
- package/dist/components/forms/AppCombobox.vue.d.ts +13 -0
- package/dist/components/forms/AppDrawerHeaderSection.d.vue.ts +20 -0
- package/dist/components/forms/AppDrawerHeaderSection.vue +21 -0
- package/dist/components/forms/AppDrawerHeaderSection.vue.d.ts +20 -0
- package/dist/components/forms/AppLabel.d.vue.ts +24 -0
- package/dist/components/forms/AppLabel.vue +47 -0
- package/dist/components/forms/AppLabel.vue.d.ts +24 -0
- package/dist/components/forms/AppLink.d.vue.ts +19 -0
- package/dist/components/forms/AppLink.vue +50 -0
- package/dist/components/forms/AppLink.vue.d.ts +19 -0
- package/dist/components/forms/AppNumberField.d.vue.ts +20 -0
- package/dist/components/forms/AppNumberField.vue +79 -0
- package/dist/components/forms/AppNumberField.vue.d.ts +20 -0
- package/dist/components/forms/AppOtpInput.d.vue.ts +13 -0
- package/dist/components/forms/AppOtpInput.vue +84 -0
- package/dist/components/forms/AppOtpInput.vue.d.ts +13 -0
- package/dist/components/forms/AppSearchHeader.d.vue.ts +8 -0
- package/dist/components/forms/AppSearchHeader.vue +72 -0
- package/dist/components/forms/AppSearchHeader.vue.d.ts +8 -0
- package/dist/components/forms/AppSelect.d.vue.ts +21 -0
- package/dist/components/forms/AppSelect.vue +94 -0
- package/dist/components/forms/AppSelect.vue.d.ts +21 -0
- package/dist/components/forms/AppStepper.d.vue.ts +21 -0
- package/dist/components/forms/AppStepper.vue +232 -0
- package/dist/components/forms/AppStepper.vue.d.ts +21 -0
- package/dist/components/forms/AppSwitch.d.vue.ts +18 -0
- package/dist/components/forms/AppSwitch.vue +60 -0
- package/dist/components/forms/AppSwitch.vue.d.ts +18 -0
- package/dist/components/forms/AppTextField.d.vue.ts +17 -0
- package/dist/components/forms/AppTextField.vue +62 -0
- package/dist/components/forms/AppTextField.vue.d.ts +17 -0
- package/dist/components/forms/AppTextarea.d.vue.ts +17 -0
- package/dist/components/forms/AppTextarea.vue +65 -0
- package/dist/components/forms/AppTextarea.vue.d.ts +17 -0
- package/dist/components/forms/AttachmentCropperInput.d.vue.ts +18 -0
- package/dist/components/forms/AttachmentCropperInput.vue +227 -0
- package/dist/components/forms/AttachmentCropperInput.vue.d.ts +18 -0
- package/dist/components/forms/AttachmentInput.d.vue.ts +16 -0
- package/dist/components/forms/AttachmentInput.vue +116 -0
- package/dist/components/forms/AttachmentInput.vue.d.ts +16 -0
- package/dist/components/forms/AutocompleteInput.d.vue.ts +86 -0
- package/dist/components/forms/AutocompleteInput.vue +778 -0
- package/dist/components/forms/AutocompleteInput.vue.d.ts +86 -0
- package/dist/components/forms/BankSelect.d.vue.ts +21 -0
- package/dist/components/forms/BankSelect.vue +43 -0
- package/dist/components/forms/BankSelect.vue.d.ts +21 -0
- package/dist/components/forms/BaseButton.d.vue.ts +20 -0
- package/dist/components/forms/BaseButton.vue +42 -0
- package/dist/components/forms/BaseButton.vue.d.ts +20 -0
- package/dist/components/forms/CounterInput.d.vue.ts +13 -0
- package/dist/components/forms/CounterInput.vue +71 -0
- package/dist/components/forms/CounterInput.vue.d.ts +13 -0
- package/dist/components/forms/CustomCheckboxes.d.vue.ts +25 -0
- package/dist/components/forms/CustomCheckboxes.vue +69 -0
- package/dist/components/forms/CustomCheckboxes.vue.d.ts +25 -0
- package/dist/components/forms/CustomCheckboxesWithIcon.d.vue.ts +25 -0
- package/dist/components/forms/CustomCheckboxesWithIcon.vue +80 -0
- package/dist/components/forms/CustomCheckboxesWithIcon.vue.d.ts +25 -0
- package/dist/components/forms/CustomCheckboxesWithImage.d.vue.ts +16 -0
- package/dist/components/forms/CustomCheckboxesWithImage.vue +67 -0
- package/dist/components/forms/CustomCheckboxesWithImage.vue.d.ts +16 -0
- package/dist/components/forms/CustomRadios.d.vue.ts +25 -0
- package/dist/components/forms/CustomRadios.vue +69 -0
- package/dist/components/forms/CustomRadios.vue.d.ts +25 -0
- package/dist/components/forms/CustomRadiosWithIcon.d.vue.ts +28 -0
- package/dist/components/forms/CustomRadiosWithIcon.vue +98 -0
- package/dist/components/forms/CustomRadiosWithIcon.vue.d.ts +28 -0
- package/dist/components/forms/CustomRadiosWithImage.d.vue.ts +35 -0
- package/dist/components/forms/CustomRadiosWithImage.vue +69 -0
- package/dist/components/forms/CustomRadiosWithImage.vue.d.ts +35 -0
- package/dist/components/forms/DatePicker.d.vue.ts +29 -0
- package/dist/components/forms/DatePicker.vue +392 -0
- package/dist/components/forms/DatePicker.vue.d.ts +29 -0
- package/dist/components/forms/DatePickerRange.d.vue.ts +24 -0
- package/dist/components/forms/DatePickerRange.vue +127 -0
- package/dist/components/forms/DatePickerRange.vue.d.ts +24 -0
- package/dist/components/forms/DraggedUploadFile.d.vue.ts +11 -0
- package/dist/components/forms/DraggedUploadFile.vue +120 -0
- package/dist/components/forms/DraggedUploadFile.vue.d.ts +11 -0
- package/dist/components/forms/ImageCardInput.d.vue.ts +35 -0
- package/dist/components/forms/ImageCardInput.vue +234 -0
- package/dist/components/forms/ImageCardInput.vue.d.ts +35 -0
- package/dist/components/forms/InputValidationWrapper.d.vue.ts +26 -0
- package/dist/components/forms/InputValidationWrapper.vue +24 -0
- package/dist/components/forms/InputValidationWrapper.vue.d.ts +26 -0
- package/dist/components/forms/LicensePlateInput.d.vue.ts +21 -0
- package/dist/components/forms/LicensePlateInput.vue +175 -0
- package/dist/components/forms/LicensePlateInput.vue.d.ts +21 -0
- package/dist/components/forms/ManualDate.d.vue.ts +20 -0
- package/dist/components/forms/ManualDate.vue +264 -0
- package/dist/components/forms/ManualDate.vue.d.ts +20 -0
- package/dist/components/forms/MobileInput.d.vue.ts +25 -0
- package/dist/components/forms/MobileInput.vue +118 -0
- package/dist/components/forms/MobileInput.vue.d.ts +25 -0
- package/dist/components/forms/PasswordInput.d.vue.ts +11 -0
- package/dist/components/forms/PasswordInput.vue +29 -0
- package/dist/components/forms/PasswordInput.vue.d.ts +11 -0
- package/dist/components/forms/RangeInput.d.vue.ts +10 -0
- package/dist/components/forms/RangeInput.vue +48 -0
- package/dist/components/forms/RangeInput.vue.d.ts +10 -0
- package/dist/components/forms/Tabs.d.vue.ts +23 -0
- package/dist/components/forms/Tabs.vue +35 -0
- package/dist/components/forms/Tabs.vue.d.ts +23 -0
- package/dist/components/forms/TimePicker.d.vue.ts +18 -0
- package/dist/components/forms/TimePicker.vue +370 -0
- package/dist/components/forms/TimePicker.vue.d.ts +18 -0
- package/dist/components/table/DataTable.d.vue.ts +70 -0
- package/dist/components/table/DataTable.vue +361 -0
- package/dist/components/table/DataTable.vue.d.ts +70 -0
- package/dist/components/table/EditableDataTable.d.vue.ts +21 -0
- package/dist/components/table/EditableDataTable.vue +330 -0
- package/dist/components/table/EditableDataTable.vue.d.ts +21 -0
- package/dist/components/table/EditableDataTableRow.d.vue.ts +20 -0
- package/dist/components/table/EditableDataTableRow.vue +252 -0
- package/dist/components/table/EditableDataTableRow.vue.d.ts +20 -0
- package/dist/components/table/FilterGenerator.d.vue.ts +13 -0
- package/dist/components/table/FilterGenerator.vue +231 -0
- package/dist/components/table/FilterGenerator.vue.d.ts +13 -0
- package/dist/components/table/StaticTable.d.vue.ts +34 -0
- package/dist/components/table/StaticTable.vue +152 -0
- package/dist/components/table/StaticTable.vue.d.ts +34 -0
- package/dist/components/table/TablePagination.d.vue.ts +15 -0
- package/dist/components/table/TablePagination.vue +73 -0
- package/dist/components/table/TablePagination.vue.d.ts +15 -0
- package/dist/composables/useIsMobile.d.ts +1 -0
- package/dist/composables/useIsMobile.js +10 -0
- package/dist/composables/useIsMobile.mjs +4 -0
- package/dist/composables/useTableFilters.d.ts +23 -0
- package/dist/composables/useTableFilters.js +197 -0
- package/dist/composables/useTableFilters.mjs +184 -0
- package/dist/images/avatar.png +0 -0
- package/dist/images/sa.svg +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +454 -0
- package/dist/index.mjs +130 -0
- package/dist/lang/ar.json +54 -0
- package/dist/lang/en.json +54 -0
- package/dist/styles/assets/scss/variables/_template.scss +1 -0
- package/dist/styles/assets/scss/variables/_vuetify.scss +1 -0
- package/dist/styles/core/base/_components.scss +164 -0
- package/dist/styles/core/base/_dark.scss +16 -0
- package/dist/styles/core/base/_default-layout-w-vertical-nav.scss +106 -0
- package/dist/styles/core/base/_default-layout.scss +16 -0
- package/dist/styles/core/base/_index.scss +47 -0
- package/dist/styles/core/base/_layouts.scss +63 -0
- package/dist/styles/core/base/_misc.scss +20 -0
- package/dist/styles/core/base/_mixins.scss +84 -0
- package/dist/styles/core/base/_route-transitions.scss +70 -0
- package/dist/styles/core/base/_utilities.scss +418 -0
- package/dist/styles/core/base/_utils.scss +100 -0
- package/dist/styles/core/base/_variables.scss +190 -0
- package/dist/styles/core/base/_vertical-nav.scss +264 -0
- package/dist/styles/core/base/libs/_perfect-scrollbar.scss +35 -0
- package/dist/styles/core/base/libs/vuetify/_index.scss +1 -0
- package/dist/styles/core/base/libs/vuetify/_overrides.scss +380 -0
- package/dist/styles/core/base/libs/vuetify/_variables.scss +48 -0
- package/dist/styles/core/base/placeholders/_default-layout-vertical-nav.scss +48 -0
- package/dist/styles/core/base/placeholders/_default-layout.scss +3 -0
- package/dist/styles/core/base/placeholders/_index.scss +5 -0
- package/dist/styles/core/base/placeholders/_misc.scss +7 -0
- package/dist/styles/core/base/placeholders/_nav.scss +26 -0
- package/dist/styles/core/base/placeholders/_vertical-nav.scss +84 -0
- package/dist/styles/core/base/skins/_bordered.scss +60 -0
- package/dist/styles/core/base/skins/_index.scss +1 -0
- package/dist/styles/core/template/_components.scss +1044 -0
- package/dist/styles/core/template/_default-layout-w-vertical-nav.scss +20 -0
- package/dist/styles/core/template/_utilities.scss +20 -0
- package/dist/styles/core/template/_variables.scss +67 -0
- package/dist/styles/core/template/_vertical-nav.scss +41 -0
- package/dist/styles/core/template/index.css +18786 -0
- package/dist/styles/core/template/index.scss +15 -0
- package/dist/styles/core/template/libs/vuetify/_variables.scss +464 -0
- package/dist/styles/core/template/libs/vuetify/index.css +739 -0
- package/dist/styles/core/template/libs/vuetify/index.scss +1 -0
- package/dist/styles/core/template/pages/misc.css +16 -0
- package/dist/styles/core/template/pages/misc.scss +20 -0
- package/dist/styles/core/template/placeholders/_default-layout-vertical-nav.scss +9 -0
- package/dist/styles/core/template/placeholders/_index.scss +3 -0
- package/dist/styles/core/template/placeholders/_nav.scss +15 -0
- package/dist/styles/core/template/placeholders/_vertical-nav.scss +18 -0
- package/dist/styles/core/template/skins/_bordered.scss +36 -0
- package/dist/styles/core/template/skins/_index.scss +1 -0
- package/dist/styles/layouts/_classes.scss +3 -0
- package/dist/styles/layouts/_dashboard-layout.scss +43 -0
- package/dist/styles/layouts/_global.scss +10 -0
- package/dist/styles/layouts/_mixins.scss +28 -0
- package/dist/styles/layouts/_placeholders.scss +53 -0
- package/dist/styles/layouts/_rtl.scss +7 -0
- package/dist/styles/layouts/_variables.scss +22 -0
- package/dist/styles/layouts/index.css +14 -0
- package/dist/styles/layouts/index.scss +2 -0
- package/dist/types.d.ts +218 -0
- package/dist/utils/apiUrl.d.ts +1 -0
- package/dist/utils/apiUrl.js +15 -0
- package/dist/utils/apiUrl.mjs +8 -0
- package/dist/utils/client.d.ts +9 -0
- package/dist/utils/client.js +53 -0
- package/dist/utils/client.mjs +39 -0
- package/dist/utils/files.d.ts +2 -0
- package/dist/utils/files.js +35 -0
- package/dist/utils/files.mjs +22 -0
- package/dist/utils/formValidation.d.ts +7 -0
- package/dist/utils/formValidation.js +20 -0
- package/dist/utils/formValidation.mjs +13 -0
- package/dist/utils/formatters.d.ts +12 -0
- package/dist/utils/formatters.js +84 -0
- package/dist/utils/formatters.mjs +56 -0
- package/dist/utils/hijriDate.d.ts +58 -0
- package/dist/utils/hijriDate.js +168 -0
- package/dist/utils/hijriDate.mjs +1951 -0
- package/dist/utils/i18n.d.ts +8 -0
- package/dist/utils/i18n.js +36 -0
- package/dist/utils/i18n.mjs +27 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +115 -0
- package/dist/utils/index.mjs +10 -0
- package/dist/utils/queryParams.d.ts +4 -0
- package/dist/utils/queryParams.js +26 -0
- package/dist/utils/queryParams.mjs +18 -0
- package/dist/utils/ruleValidator.d.ts +41 -0
- package/dist/utils/ruleValidator.js +210 -0
- package/dist/utils/ruleValidator.mjs +195 -0
- package/dist/utils/toaster.d.ts +12 -0
- package/dist/utils/toaster.js +68 -0
- package/dist/utils/toaster.mjs +58 -0
- package/dist/utils/utils.d.ts +9 -0
- package/dist/utils/utils.js +84 -0
- package/dist/utils/utils.mjs +67 -0
- package/package.json +67 -67
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
type Suggestion = {
|
|
2
|
+
icon: string;
|
|
3
|
+
title: string;
|
|
4
|
+
url: object;
|
|
5
|
+
};
|
|
6
|
+
type Suggestions = {
|
|
7
|
+
title: string;
|
|
8
|
+
content: Suggestion[];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
isDialogVisible: boolean;
|
|
12
|
+
searchQuery: string;
|
|
13
|
+
searchResults: any[];
|
|
14
|
+
suggestions?: Suggestions[];
|
|
15
|
+
noDataSuggestion?: Suggestion[];
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_75: {
|
|
18
|
+
item: any;
|
|
19
|
+
}, __VLS_105: {}, __VLS_146: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
searchResult?: (props: typeof __VLS_75) => any;
|
|
22
|
+
} & {
|
|
23
|
+
suggestions?: (props: typeof __VLS_105) => any;
|
|
24
|
+
} & {
|
|
25
|
+
noData?: (props: typeof __VLS_146) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
|
+
"update:isDialogVisible": (value: boolean) => any;
|
|
29
|
+
"update:searchQuery": (value: string) => any;
|
|
30
|
+
itemSelected: (value: any) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
"onUpdate:isDialogVisible"?: ((value: boolean) => any) | undefined;
|
|
33
|
+
"onUpdate:searchQuery"?: ((value: string) => any) | undefined;
|
|
34
|
+
onItemSelected?: ((value: any) => any) | undefined;
|
|
35
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { PerfectScrollbar } from "vue3-perfect-scrollbar";
|
|
3
|
+
import { useMagicKeys } from "@vueuse/core";
|
|
4
|
+
import { ref, toRaw, watch, watchEffect } from "vue";
|
|
5
|
+
import { VList, VListItem, VListSubheader, VListItemTitle, VCardText, VDialog, VIcon, VDivider, VCol, VRow, VTextField } from "vuetify/components";
|
|
6
|
+
import IconBtn from "../IconBtn.vue";
|
|
7
|
+
import AppCard from "../cards/AppCard.vue";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
isDialogVisible: { type: Boolean, required: true },
|
|
10
|
+
searchQuery: { type: String, required: true },
|
|
11
|
+
searchResults: { type: Array, required: true },
|
|
12
|
+
suggestions: { type: Array, required: false },
|
|
13
|
+
noDataSuggestion: { type: Array, required: false }
|
|
14
|
+
});
|
|
15
|
+
const emit = defineEmits(["update:isDialogVisible", "update:searchQuery", "itemSelected"]);
|
|
16
|
+
const { ctrl_k, meta_k } = useMagicKeys({
|
|
17
|
+
passive: false,
|
|
18
|
+
onEventFired(e) {
|
|
19
|
+
if (e.ctrlKey && e.key === "k" && e.type === "keydown") {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const refSearchList = ref();
|
|
25
|
+
const searchQuery = ref(structuredClone(toRaw(props.searchQuery)));
|
|
26
|
+
const refSearchInput = ref();
|
|
27
|
+
const isLocalDialogVisible = ref(structuredClone(toRaw(props.isDialogVisible)));
|
|
28
|
+
const searchResults = ref(structuredClone(toRaw(props.searchResults)));
|
|
29
|
+
watch(props, () => {
|
|
30
|
+
isLocalDialogVisible.value = structuredClone(toRaw(props.isDialogVisible));
|
|
31
|
+
searchResults.value = structuredClone(toRaw(props.searchResults));
|
|
32
|
+
searchQuery.value = structuredClone(toRaw(props.searchQuery));
|
|
33
|
+
});
|
|
34
|
+
watch([ctrl_k, meta_k], () => {
|
|
35
|
+
isLocalDialogVisible.value = true;
|
|
36
|
+
emit("update:isDialogVisible", true);
|
|
37
|
+
});
|
|
38
|
+
const clearSearchAndCloseDialog = () => {
|
|
39
|
+
emit("update:isDialogVisible", false);
|
|
40
|
+
emit("update:searchQuery", "");
|
|
41
|
+
};
|
|
42
|
+
watchEffect(() => {
|
|
43
|
+
if (!searchQuery.value.length) {
|
|
44
|
+
searchResults.value = [];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const getFocusOnSearchList = (e) => {
|
|
48
|
+
if (e.key === "ArrowDown") {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
refSearchList.value?.focus("next");
|
|
51
|
+
} else if (e.key === "ArrowUp") {
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
refSearchList.value?.focus("prev");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const dialogModelValueUpdate = (val) => {
|
|
57
|
+
emit("update:isDialogVisible", val);
|
|
58
|
+
emit("update:searchQuery", "");
|
|
59
|
+
};
|
|
60
|
+
const resolveCategories = (val) => {
|
|
61
|
+
if (val === "dashboards") {
|
|
62
|
+
return "Dashboards";
|
|
63
|
+
}
|
|
64
|
+
if (val === "appsPages") {
|
|
65
|
+
return "Apps & Pages";
|
|
66
|
+
}
|
|
67
|
+
if (val === "userInterface") {
|
|
68
|
+
return "User Interface";
|
|
69
|
+
}
|
|
70
|
+
if (val === "formsTables") {
|
|
71
|
+
return "Forms Tables";
|
|
72
|
+
}
|
|
73
|
+
if (val === "chartsMisc") {
|
|
74
|
+
return "Charts Misc";
|
|
75
|
+
}
|
|
76
|
+
return "Misc";
|
|
77
|
+
};
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<template>
|
|
81
|
+
<VDialog
|
|
82
|
+
max-width="600"
|
|
83
|
+
:model-value="isLocalDialogVisible"
|
|
84
|
+
:height="$vuetify.display.smAndUp ? '550' : '100%'"
|
|
85
|
+
:fullscreen="$vuetify.display.width < 600"
|
|
86
|
+
class="app-bar-search-dialog"
|
|
87
|
+
@update:model-value="dialogModelValueUpdate"
|
|
88
|
+
@keyup.esc="clearSearchAndCloseDialog"
|
|
89
|
+
>
|
|
90
|
+
<AppCard
|
|
91
|
+
height="100%"
|
|
92
|
+
width="100%"
|
|
93
|
+
class="position-relative"
|
|
94
|
+
>
|
|
95
|
+
<VCardText
|
|
96
|
+
class="pt-1"
|
|
97
|
+
style="min-block-size: 65px"
|
|
98
|
+
>
|
|
99
|
+
<!-- Search Input -->
|
|
100
|
+
<VTextField
|
|
101
|
+
ref="refSearchInput"
|
|
102
|
+
v-model="searchQuery"
|
|
103
|
+
autofocus
|
|
104
|
+
density="comfortable"
|
|
105
|
+
variant="plain"
|
|
106
|
+
class="app-bar-autocomplete-box"
|
|
107
|
+
@keyup.esc="clearSearchAndCloseDialog"
|
|
108
|
+
@keydown="getFocusOnSearchList"
|
|
109
|
+
@update:model-value="$emit('update:searchQuery', searchQuery)"
|
|
110
|
+
>
|
|
111
|
+
<!-- Prepend Inner -->
|
|
112
|
+
<template #prepend-inner>
|
|
113
|
+
<div class="d-flex align-center text-high-emphasis me-1">
|
|
114
|
+
<VIcon
|
|
115
|
+
size="22"
|
|
116
|
+
icon="tabler-search"
|
|
117
|
+
class="mt-1"
|
|
118
|
+
style="opacity: 1"
|
|
119
|
+
/>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
|
|
123
|
+
<!-- Append Inner -->
|
|
124
|
+
<template #append-inner>
|
|
125
|
+
<div class="d-flex align-center">
|
|
126
|
+
<div
|
|
127
|
+
class="text-base text-disabled cursor-pointer me-1"
|
|
128
|
+
@click="clearSearchAndCloseDialog"
|
|
129
|
+
>
|
|
130
|
+
[esc]
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<IconBtn
|
|
134
|
+
size="small"
|
|
135
|
+
icon="tabler-x"
|
|
136
|
+
@click="clearSearchAndCloseDialog"
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
</template>
|
|
140
|
+
</VTextField>
|
|
141
|
+
</VCardText>
|
|
142
|
+
|
|
143
|
+
<!-- Divider -->
|
|
144
|
+
<VDivider />
|
|
145
|
+
|
|
146
|
+
<!-- Perfect Scrollbar -->
|
|
147
|
+
<PerfectScrollbar
|
|
148
|
+
:options="{
|
|
149
|
+
wheelPropagation: false,
|
|
150
|
+
suppressScrollX: true
|
|
151
|
+
}"
|
|
152
|
+
class="h-100"
|
|
153
|
+
>
|
|
154
|
+
<!-- Search List -->
|
|
155
|
+
<VList
|
|
156
|
+
v-show="searchQuery.length && !!searchResults.length"
|
|
157
|
+
ref="refSearchList"
|
|
158
|
+
density="compact"
|
|
159
|
+
class="app-bar-search-list"
|
|
160
|
+
>
|
|
161
|
+
<!-- list Item /List Sub header -->
|
|
162
|
+
<template
|
|
163
|
+
v-for="item in searchResults"
|
|
164
|
+
:key="item.title"
|
|
165
|
+
>
|
|
166
|
+
<VListSubheader
|
|
167
|
+
v-if="'header' in item"
|
|
168
|
+
class="text-disabled"
|
|
169
|
+
>
|
|
170
|
+
{{ resolveCategories(item.title) }}
|
|
171
|
+
</VListSubheader>
|
|
172
|
+
|
|
173
|
+
<template v-else>
|
|
174
|
+
<slot
|
|
175
|
+
name="searchResult"
|
|
176
|
+
:item="item"
|
|
177
|
+
>
|
|
178
|
+
<VListItem
|
|
179
|
+
link
|
|
180
|
+
@click="$emit('itemSelected', item)"
|
|
181
|
+
>
|
|
182
|
+
<template #prepend>
|
|
183
|
+
<VIcon
|
|
184
|
+
size="20"
|
|
185
|
+
:icon="item.icon"
|
|
186
|
+
class="me-3"
|
|
187
|
+
/>
|
|
188
|
+
</template>
|
|
189
|
+
|
|
190
|
+
<template #append>
|
|
191
|
+
<VIcon
|
|
192
|
+
size="20"
|
|
193
|
+
icon="tabler-corner-down-left"
|
|
194
|
+
class="enter-icon text-disabled"
|
|
195
|
+
/>
|
|
196
|
+
</template>
|
|
197
|
+
|
|
198
|
+
<VListItemTitle>
|
|
199
|
+
{{ item.title }}
|
|
200
|
+
</VListItemTitle>
|
|
201
|
+
</VListItem>
|
|
202
|
+
</slot>
|
|
203
|
+
</template>
|
|
204
|
+
</template>
|
|
205
|
+
</VList>
|
|
206
|
+
|
|
207
|
+
<!-- Suggestions -->
|
|
208
|
+
<div
|
|
209
|
+
v-show="!!searchResults && !searchQuery"
|
|
210
|
+
class="h-100"
|
|
211
|
+
>
|
|
212
|
+
<slot name="suggestions">
|
|
213
|
+
<VCardText class="app-bar-search-suggestions h-100 pa-10">
|
|
214
|
+
<VRow
|
|
215
|
+
v-if="props.suggestions"
|
|
216
|
+
class="gap-y-4"
|
|
217
|
+
>
|
|
218
|
+
<VCol
|
|
219
|
+
v-for="suggestion in props.suggestions"
|
|
220
|
+
:key="suggestion.title"
|
|
221
|
+
cols="12"
|
|
222
|
+
sm="6"
|
|
223
|
+
class="ps-6"
|
|
224
|
+
>
|
|
225
|
+
<p class="text-xs text-disabled text-uppercase">
|
|
226
|
+
{{ suggestion.title }}
|
|
227
|
+
</p>
|
|
228
|
+
|
|
229
|
+
<VList class="card-list">
|
|
230
|
+
<VListItem
|
|
231
|
+
v-for="item in suggestion.content"
|
|
232
|
+
:key="item.title"
|
|
233
|
+
link
|
|
234
|
+
:title="item.title"
|
|
235
|
+
class="app-bar-search-suggestion"
|
|
236
|
+
@click="$emit('itemSelected', item)"
|
|
237
|
+
>
|
|
238
|
+
<template #prepend>
|
|
239
|
+
<VIcon
|
|
240
|
+
:icon="item.icon"
|
|
241
|
+
size="20"
|
|
242
|
+
class="me-2"
|
|
243
|
+
/>
|
|
244
|
+
</template>
|
|
245
|
+
</VListItem>
|
|
246
|
+
</VList>
|
|
247
|
+
</VCol>
|
|
248
|
+
</VRow>
|
|
249
|
+
</VCardText>
|
|
250
|
+
</slot>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<!-- No Data found -->
|
|
254
|
+
<div
|
|
255
|
+
v-show="!searchResults.length && searchQuery.length"
|
|
256
|
+
class="h-100"
|
|
257
|
+
>
|
|
258
|
+
<slot name="noData">
|
|
259
|
+
<VCardText class="h-100">
|
|
260
|
+
<div
|
|
261
|
+
class="app-bar-search-suggestions d-flex flex-column align-center justify-center text-high-emphasis h-100"
|
|
262
|
+
>
|
|
263
|
+
<VIcon
|
|
264
|
+
size="75"
|
|
265
|
+
icon="tabler-file-x"
|
|
266
|
+
/>
|
|
267
|
+
<div class="d-flex align-center flex-wrap justify-center gap-2 text-h6 my-3">
|
|
268
|
+
<span>No Result For </span>
|
|
269
|
+
<span>"{{ searchQuery }}"</span>
|
|
270
|
+
</div>
|
|
271
|
+
<div
|
|
272
|
+
v-if="props.noDataSuggestion"
|
|
273
|
+
class="mt-8"
|
|
274
|
+
>
|
|
275
|
+
<span class="d-flex justify-center text-disabled">Try searching for</span>
|
|
276
|
+
<h6
|
|
277
|
+
v-for="suggestion in props.noDataSuggestion"
|
|
278
|
+
:key="suggestion.title"
|
|
279
|
+
class="app-bar-search-suggestion text-sm font-weight-regular cursor-pointer mt-3"
|
|
280
|
+
@click="$emit('itemSelected', suggestion)"
|
|
281
|
+
>
|
|
282
|
+
<VIcon
|
|
283
|
+
size="20"
|
|
284
|
+
:icon="suggestion.icon"
|
|
285
|
+
class="me-3"
|
|
286
|
+
/>
|
|
287
|
+
<span class="text-sm">{{ suggestion.title }}</span>
|
|
288
|
+
</h6>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
</VCardText>
|
|
292
|
+
</slot>
|
|
293
|
+
</div>
|
|
294
|
+
</PerfectScrollbar>
|
|
295
|
+
</AppCard>
|
|
296
|
+
</VDialog>
|
|
297
|
+
</template>
|
|
298
|
+
|
|
299
|
+
<style scoped>
|
|
300
|
+
.app-bar-search-suggestions .app-bar-search-suggestion:hover {
|
|
301
|
+
color: rgb(var(--v-theme-primary));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.app-bar-autocomplete-box .v-field__input {
|
|
305
|
+
padding-block-end: 0.425rem;
|
|
306
|
+
padding-block-start: 1.16rem;
|
|
307
|
+
}
|
|
308
|
+
.app-bar-autocomplete-box .v-field__append-inner,
|
|
309
|
+
.app-bar-autocomplete-box .v-field__prepend-inner {
|
|
310
|
+
padding-block-start: 0.95rem;
|
|
311
|
+
}
|
|
312
|
+
.app-bar-autocomplete-box .v-field__field input {
|
|
313
|
+
text-align: start !important;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.app-bar-search-dialog .v-overlay__scrim {
|
|
317
|
+
backdrop-filter: blur(4px);
|
|
318
|
+
}
|
|
319
|
+
.app-bar-search-dialog .v-list-item-title {
|
|
320
|
+
font-size: 0.875rem !important;
|
|
321
|
+
}
|
|
322
|
+
.app-bar-search-dialog .app-bar-search-list .v-list-item,
|
|
323
|
+
.app-bar-search-dialog .app-bar-search-list .v-list-subheader {
|
|
324
|
+
font-size: 0.75rem;
|
|
325
|
+
padding-inline: 1.5rem !important;
|
|
326
|
+
}
|
|
327
|
+
.app-bar-search-dialog .app-bar-search-list .v-list-item .v-list-item__append .enter-icon {
|
|
328
|
+
visibility: hidden;
|
|
329
|
+
}
|
|
330
|
+
.app-bar-search-dialog .app-bar-search-list .v-list-item:hover .v-list-item__append .enter-icon, .app-bar-search-dialog .app-bar-search-list .v-list-item:active .v-list-item__append .enter-icon, .app-bar-search-dialog .app-bar-search-list .v-list-item:focus .v-list-item__append .enter-icon {
|
|
331
|
+
visibility: visible;
|
|
332
|
+
}
|
|
333
|
+
.app-bar-search-dialog .app-bar-search-list .v-list-subheader {
|
|
334
|
+
line-height: 1;
|
|
335
|
+
min-block-size: auto;
|
|
336
|
+
padding-block: 0.6875rem 0.3125rem;
|
|
337
|
+
text-transform: uppercase;
|
|
338
|
+
}
|
|
339
|
+
</style>
|
|
340
|
+
|
|
341
|
+
<style scoped>
|
|
342
|
+
.card-list {
|
|
343
|
+
--v-card-list-gap: 16px;
|
|
344
|
+
}
|
|
345
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
type Suggestion = {
|
|
2
|
+
icon: string;
|
|
3
|
+
title: string;
|
|
4
|
+
url: object;
|
|
5
|
+
};
|
|
6
|
+
type Suggestions = {
|
|
7
|
+
title: string;
|
|
8
|
+
content: Suggestion[];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
isDialogVisible: boolean;
|
|
12
|
+
searchQuery: string;
|
|
13
|
+
searchResults: any[];
|
|
14
|
+
suggestions?: Suggestions[];
|
|
15
|
+
noDataSuggestion?: Suggestion[];
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_75: {
|
|
18
|
+
item: any;
|
|
19
|
+
}, __VLS_105: {}, __VLS_146: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
searchResult?: (props: typeof __VLS_75) => any;
|
|
22
|
+
} & {
|
|
23
|
+
suggestions?: (props: typeof __VLS_105) => any;
|
|
24
|
+
} & {
|
|
25
|
+
noData?: (props: typeof __VLS_146) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
28
|
+
"update:isDialogVisible": (value: boolean) => any;
|
|
29
|
+
"update:searchQuery": (value: string) => any;
|
|
30
|
+
itemSelected: (value: any) => any;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
"onUpdate:isDialogVisible"?: ((value: boolean) => any) | undefined;
|
|
33
|
+
"onUpdate:searchQuery"?: ((value: string) => any) | undefined;
|
|
34
|
+
onItemSelected?: ((value: any) => any) | undefined;
|
|
35
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_15: string | number, __VLS_16: any;
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
[K in NonNullable<typeof __VLS_15>]?: (props: typeof __VLS_16) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from "vue";
|
|
3
|
+
import { VCombobox, VLabel } from "vuetify/components";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: "AppCombobox",
|
|
7
|
+
inheritAttrs: false
|
|
8
|
+
});
|
|
9
|
+
const { t } = useI18n();
|
|
10
|
+
const attrs = useAttrs();
|
|
11
|
+
const uid = Math.random().toString(36).slice(2, 7);
|
|
12
|
+
const label = computed(() => attrs.label);
|
|
13
|
+
const langLabel = computed(() => label.value ? t(label.value) : "");
|
|
14
|
+
const elementId = computed(() => {
|
|
15
|
+
const token = attrs.id || label.value;
|
|
16
|
+
return token ? `app-combobox-${token}-${uid}` : void 0;
|
|
17
|
+
});
|
|
18
|
+
const placeholder = computed(() => {
|
|
19
|
+
return attrs.placeholder || (label.value ? t("inputs.placeholder", { name: langLabel.value }) : "");
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div
|
|
25
|
+
class="app-combobox flex-grow-1"
|
|
26
|
+
:class="$attrs.class"
|
|
27
|
+
>
|
|
28
|
+
<VLabel
|
|
29
|
+
v-if="label"
|
|
30
|
+
:for="elementId"
|
|
31
|
+
class="mb-2 text-body-2 text-high-emphasis"
|
|
32
|
+
:text="langLabel"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<VCombobox
|
|
36
|
+
v-bind="{
|
|
37
|
+
...$attrs,
|
|
38
|
+
class: null,
|
|
39
|
+
label: void 0,
|
|
40
|
+
variant: 'outlined',
|
|
41
|
+
id: elementId,
|
|
42
|
+
menuProps: {
|
|
43
|
+
contentClass: ['app-inner-list', 'app-combobox__content', 'v-combobox__content', $attrs.multiple !== void 0 ? 'v-list-select-multiple' : '']
|
|
44
|
+
}
|
|
45
|
+
}"
|
|
46
|
+
:no-data-text="t('no_data')"
|
|
47
|
+
:placeholder="placeholder"
|
|
48
|
+
>
|
|
49
|
+
<template
|
|
50
|
+
v-for="(_, name) in $slots"
|
|
51
|
+
#[name]="slotProps"
|
|
52
|
+
>
|
|
53
|
+
<slot
|
|
54
|
+
:name="name"
|
|
55
|
+
v-bind="slotProps || {}"
|
|
56
|
+
/>
|
|
57
|
+
</template>
|
|
58
|
+
</VCombobox>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_15: string | number, __VLS_16: any;
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
[K in NonNullable<typeof __VLS_15>]?: (props: typeof __VLS_16) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_7: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
beforeClose?: (props: typeof __VLS_7) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
cancel: (el: MouseEvent) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onCancel?: ((el: MouseEvent) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { VSpacer } from "vuetify/components";
|
|
3
|
+
import IconBtn from "../IconBtn.vue";
|
|
4
|
+
defineProps({
|
|
5
|
+
title: { type: String, required: true }
|
|
6
|
+
});
|
|
7
|
+
defineEmits(["cancel"]);
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="px-5 py-3 d-flex align-center">
|
|
12
|
+
<h3 class="font-weight-medium text-xl">
|
|
13
|
+
{{ title }}
|
|
14
|
+
</h3>
|
|
15
|
+
<VSpacer />
|
|
16
|
+
|
|
17
|
+
<slot name="beforeClose" />
|
|
18
|
+
|
|
19
|
+
<IconBtn icon="tabler-x" @click="$emit('cancel', $event)" />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_7: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
beforeClose?: (props: typeof __VLS_7) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
cancel: (el: MouseEvent) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onCancel?: ((el: MouseEvent) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
class?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
rules?: ((value: unknown) => string)[];
|
|
5
|
+
errorMessages?: string;
|
|
6
|
+
modelValue?: string | number | undefined | null;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_15: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_15) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
"update:modelValue": (value: string | number | null | undefined) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { VValidation, VLabel, VMessages } from "vuetify/components";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
defineEmits(["update:modelValue"]);
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
class: { type: String, required: false },
|
|
8
|
+
label: { type: String, required: false },
|
|
9
|
+
rules: { type: Array, required: false },
|
|
10
|
+
errorMessages: { type: String, required: false },
|
|
11
|
+
modelValue: { type: null, required: false }
|
|
12
|
+
});
|
|
13
|
+
const { t } = useI18n();
|
|
14
|
+
const LangLabel = computed(() => props.label ? t(props.label) : "");
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div>
|
|
19
|
+
<VValidation
|
|
20
|
+
v-slot="{ errorMessages: validationErrors, isValid }"
|
|
21
|
+
:model-value="modelValue"
|
|
22
|
+
:rules="rules"
|
|
23
|
+
validate-on="input lazy"
|
|
24
|
+
@update:model-value="val => $emit('update:modelValue', val)"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
class="d-flex flex-column w-100"
|
|
28
|
+
:class="props.class"
|
|
29
|
+
>
|
|
30
|
+
<VLabel
|
|
31
|
+
v-if="label"
|
|
32
|
+
class="mb-2 text-body-2 text-high-emphasis app-font-size-13"
|
|
33
|
+
:text="LangLabel"
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<slot />
|
|
37
|
+
|
|
38
|
+
<VMessages
|
|
39
|
+
v-if="isValid.value === false || errorMessages?.length !== 0"
|
|
40
|
+
class="text-start"
|
|
41
|
+
:messages="[validationErrors.value, errorMessages]"
|
|
42
|
+
:active="isValid.value === false || errorMessages?.length !== 0"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</VValidation>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
class?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
rules?: ((value: unknown) => string)[];
|
|
5
|
+
errorMessages?: string;
|
|
6
|
+
modelValue?: string | number | undefined | null;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_15: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_15) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
"update:modelValue": (value: string | number | null | undefined) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string | number | null | undefined) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|