@winchsa/ui 0.1.0
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/README.md +166 -0
- package/dist/components/Breadcrumbs.vue +46 -0
- package/dist/components/Breadcrumbs.vue.d.ts +6 -0
- package/dist/components/Drawer.vue +60 -0
- package/dist/components/Drawer.vue.d.ts +44 -0
- package/dist/components/IconBtn.vue +18 -0
- package/dist/components/IconBtn.vue.d.ts +30 -0
- package/dist/components/Modal.vue +155 -0
- package/dist/components/Modal.vue.d.ts +0 -0
- package/dist/components/SiteTitle.vue +14 -0
- package/dist/components/SiteTitle.vue.d.ts +2 -0
- package/dist/components/Toaster.vue +19 -0
- package/dist/components/Toaster.vue.d.ts +5 -0
- package/dist/components/cards/CheckboxesCard.vue +76 -0
- package/dist/components/cards/CheckboxesCard.vue.d.ts +20 -0
- package/dist/components/cards/HeaderCard.vue +31 -0
- package/dist/components/cards/HeaderCard.vue.d.ts +8 -0
- package/dist/components/cards/ImageCard.vue +73 -0
- package/dist/components/cards/ImageCard.vue.d.ts +63 -0
- package/dist/components/cards/InputCard.vue +60 -0
- package/dist/components/cards/InputCard.vue.d.ts +41 -0
- package/dist/components/cards/StaticCard.vue +37 -0
- package/dist/components/cards/StaticCard.vue.d.ts +33 -0
- package/dist/components/core/AppBarSearch.vue +345 -0
- package/dist/components/core/AppBarSearch.vue.d.ts +1587 -0
- package/dist/components/core/AppDrawerHeaderSection.vue +21 -0
- package/dist/components/core/AppDrawerHeaderSection.vue.d.ts +30 -0
- package/dist/components/core/AppSearchHeader.vue +72 -0
- package/dist/components/core/AppSearchHeader.vue.d.ts +7 -0
- package/dist/components/core/AppStepper.vue +232 -0
- package/dist/components/core/AppStepper.vue.d.ts +25 -0
- package/dist/components/core/CustomizerSection.vue +19 -0
- package/dist/components/core/CustomizerSection.vue.d.ts +25 -0
- package/dist/components/core/DialogCloseBtn.vue +20 -0
- package/dist/components/core/DialogCloseBtn.vue.d.ts +9 -0
- package/dist/components/core/MoreBtn.vue +27 -0
- package/dist/components/core/MoreBtn.vue.d.ts +25 -0
- package/dist/components/core/ScrollToTop.vue +39 -0
- package/dist/components/core/ScrollToTop.vue.d.ts +2 -0
- package/dist/components/core/app-form-elements/AppCombobox.vue +67 -0
- package/dist/components/core/app-form-elements/AppCombobox.vue.d.ts +0 -0
- package/dist/components/core/app-form-elements/AppSelect.vue +98 -0
- package/dist/components/core/app-form-elements/AppSelect.vue.d.ts +0 -0
- package/dist/components/core/app-form-elements/AppSwitch.vue +59 -0
- package/dist/components/core/app-form-elements/AppSwitch.vue.d.ts +27 -0
- package/dist/components/core/app-form-elements/AppTextField.vue +66 -0
- package/dist/components/core/app-form-elements/AppTextField.vue.d.ts +26 -0
- package/dist/components/core/app-form-elements/AppTextarea.vue +69 -0
- package/dist/components/core/app-form-elements/AppTextarea.vue.d.ts +26 -0
- package/dist/components/core/app-form-elements/CustomCheckboxes.vue +69 -0
- package/dist/components/core/app-form-elements/CustomCheckboxes.vue.d.ts +39 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithIcon.vue +80 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithIcon.vue.d.ts +39 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithImage.vue +67 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithImage.vue.d.ts +15 -0
- package/dist/components/core/app-form-elements/CustomRadios.vue +69 -0
- package/dist/components/core/app-form-elements/CustomRadios.vue.d.ts +40 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithIcon.vue +98 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithIcon.vue.d.ts +45 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithImage.vue +69 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithImage.vue.d.ts +53 -0
- package/dist/components/core/cards/AppCard.vue +45 -0
- package/dist/components/core/cards/AppCard.vue.d.ts +26 -0
- package/dist/components/core/cards/AppCardActions.vue +126 -0
- package/dist/components/core/cards/AppCardActions.vue.d.ts +79 -0
- package/dist/components/core/cards/CardStatisticsHorizontal.vue +29 -0
- package/dist/components/core/cards/CardStatisticsHorizontal.vue.d.ts +10 -0
- package/dist/components/forms/Accordion.vue +43 -0
- package/dist/components/forms/Accordion.vue.d.ts +35 -0
- package/dist/components/forms/AppLabel.vue +47 -0
- package/dist/components/forms/AppLabel.vue.d.ts +36 -0
- package/dist/components/forms/AppLink.vue +50 -0
- package/dist/components/forms/AppLink.vue.d.ts +27 -0
- package/dist/components/forms/AppNumberField.vue +85 -0
- package/dist/components/forms/AppNumberField.vue.d.ts +45 -0
- package/dist/components/forms/AppOtpInput.vue +84 -0
- package/dist/components/forms/AppOtpInput.vue.d.ts +16 -0
- package/dist/components/forms/AttachmentCropperInput.vue +228 -0
- package/dist/components/forms/AttachmentCropperInput.vue.d.ts +25 -0
- package/dist/components/forms/AttachmentInput.vue +116 -0
- package/dist/components/forms/AttachmentInput.vue.d.ts +20 -0
- package/dist/components/forms/AutocompleteInput.vue +759 -0
- package/dist/components/forms/AutocompleteInput.vue.d.ts +0 -0
- package/dist/components/forms/BankSelect.vue +43 -0
- package/dist/components/forms/BankSelect.vue.d.ts +19 -0
- package/dist/components/forms/BaseButton.vue +42 -0
- package/dist/components/forms/BaseButton.vue.d.ts +31 -0
- package/dist/components/forms/CounterInput.vue +71 -0
- package/dist/components/forms/CounterInput.vue.d.ts +15 -0
- package/dist/components/forms/DatePicker.vue +400 -0
- package/dist/components/forms/DatePicker.vue.d.ts +34 -0
- package/dist/components/forms/DatePickerRange.vue +129 -0
- package/dist/components/forms/DatePickerRange.vue.d.ts +23 -0
- package/dist/components/forms/DraggedUploadFile.vue +120 -0
- package/dist/components/forms/DraggedUploadFile.vue.d.ts +10 -0
- package/dist/components/forms/ImageCardInput.vue +234 -0
- package/dist/components/forms/ImageCardInput.vue.d.ts +0 -0
- package/dist/components/forms/InputValidationWrapper.vue +24 -0
- package/dist/components/forms/InputValidationWrapper.vue.d.ts +33 -0
- package/dist/components/forms/LicensePlateInput.vue +159 -0
- package/dist/components/forms/LicensePlateInput.vue.d.ts +16 -0
- package/dist/components/forms/ManualDate.vue +262 -0
- package/dist/components/forms/ManualDate.vue.d.ts +17 -0
- package/dist/components/forms/MobileInput.vue +118 -0
- package/dist/components/forms/MobileInput.vue.d.ts +49 -0
- package/dist/components/forms/PasswordInput.vue +29 -0
- package/dist/components/forms/PasswordInput.vue.d.ts +13 -0
- package/dist/components/forms/RangeInput.vue +48 -0
- package/dist/components/forms/RangeInput.vue.d.ts +5 -0
- package/dist/components/forms/Tabs.vue +35 -0
- package/dist/components/forms/Tabs.vue.d.ts +42 -0
- package/dist/components/forms/TimePicker.vue +370 -0
- package/dist/components/forms/TimePicker.vue.d.ts +23 -0
- package/dist/components/icons/EndMarker.vue +25 -0
- package/dist/components/icons/EndMarker.vue.d.ts +17 -0
- package/dist/components/icons/RedXIcon.vue +36 -0
- package/dist/components/icons/RedXIcon.vue.d.ts +2 -0
- package/dist/components/icons/StarFillIcon.vue +28 -0
- package/dist/components/icons/StarFillIcon.vue.d.ts +2 -0
- package/dist/components/icons/StartMarker.vue +25 -0
- package/dist/components/icons/StartMarker.vue.d.ts +17 -0
- package/dist/components/icons/WorkerIcon.vue +39 -0
- package/dist/components/icons/WorkerIcon.vue.d.ts +2 -0
- package/dist/components/loading/LoadingBar.vue +31 -0
- package/dist/components/loading/LoadingBar.vue.d.ts +5 -0
- package/dist/components/loading/LoadingDialog.vue +41 -0
- package/dist/components/loading/LoadingDialog.vue.d.ts +11 -0
- package/dist/components/loading/LoadingItem.vue +66 -0
- package/dist/components/loading/LoadingItem.vue.d.ts +47 -0
- package/dist/components/table/DataTable.vue +319 -0
- package/dist/components/table/DataTable.vue.d.ts +0 -0
- package/dist/components/table/EditableDataTable.vue +329 -0
- package/dist/components/table/EditableDataTable.vue.d.ts +73 -0
- package/dist/components/table/EditableDataTableRow.vue +243 -0
- package/dist/components/table/EditableDataTableRow.vue.d.ts +18 -0
- package/dist/components/table/FilterGenerator.vue +232 -0
- package/dist/components/table/FilterGenerator.vue.d.ts +14 -0
- package/dist/components/table/StaticTable.vue +152 -0
- package/dist/components/table/StaticTable.vue.d.ts +25 -0
- package/dist/components/table/TablePagination.vue +73 -0
- package/dist/components/table/TablePagination.vue.d.ts +13 -0
- package/dist/composables/use-is-mobile.d.ts +1 -0
- package/dist/composables/use-is-mobile.js +10 -0
- package/dist/composables/use-is-mobile.mjs +4 -0
- package/dist/composables/use-table-filters.d.ts +23 -0
- package/dist/composables/use-table-filters.js +196 -0
- package/dist/composables/use-table-filters.mjs +183 -0
- package/dist/fonts/NotoSans-Medium.ttf +0 -0
- package/dist/fonts/NotoSansArabic-Medium.ttf +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.eot +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.svg +9 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.ttf +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.woff +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.woff2 +0 -0
- package/dist/images/avatar.png +0 -0
- package/dist/images/sa.svg +1 -0
- package/dist/images/successful-registration.svg +15 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +447 -0
- package/dist/index.mjs +128 -0
- package/dist/styles/@core/scss/base/_components.scss +164 -0
- package/dist/styles/@core/scss/base/_dark.scss +16 -0
- package/dist/styles/@core/scss/base/_default-layout-w-vertical-nav.scss +106 -0
- package/dist/styles/@core/scss/base/_default-layout.scss +16 -0
- package/dist/styles/@core/scss/base/_index.scss +47 -0
- package/dist/styles/@core/scss/base/_layouts.scss +63 -0
- package/dist/styles/@core/scss/base/_misc.scss +20 -0
- package/dist/styles/@core/scss/base/_mixins.scss +84 -0
- package/dist/styles/@core/scss/base/_route-transitions.scss +70 -0
- package/dist/styles/@core/scss/base/_utilities.scss +418 -0
- package/dist/styles/@core/scss/base/_utils.scss +100 -0
- package/dist/styles/@core/scss/base/_variables.scss +190 -0
- package/dist/styles/@core/scss/base/_vertical-nav.scss +264 -0
- package/dist/styles/@core/scss/base/libs/_perfect-scrollbar.scss +35 -0
- package/dist/styles/@core/scss/base/libs/vuetify/_index.scss +1 -0
- package/dist/styles/@core/scss/base/libs/vuetify/_overrides.scss +385 -0
- package/dist/styles/@core/scss/base/libs/vuetify/_variables.scss +48 -0
- package/dist/styles/@core/scss/base/placeholders/_default-layout-vertical-nav.scss +48 -0
- package/dist/styles/@core/scss/base/placeholders/_default-layout.scss +3 -0
- package/dist/styles/@core/scss/base/placeholders/_index.scss +5 -0
- package/dist/styles/@core/scss/base/placeholders/_misc.scss +7 -0
- package/dist/styles/@core/scss/base/placeholders/_nav.scss +26 -0
- package/dist/styles/@core/scss/base/placeholders/_vertical-nav.scss +84 -0
- package/dist/styles/@core/scss/base/skins/_bordered.scss +60 -0
- package/dist/styles/@core/scss/base/skins/_index.scss +1 -0
- package/dist/styles/@core/scss/template/_components.scss +1035 -0
- package/dist/styles/@core/scss/template/_default-layout-w-vertical-nav.scss +20 -0
- package/dist/styles/@core/scss/template/_utilities.scss +20 -0
- package/dist/styles/@core/scss/template/_variables.scss +67 -0
- package/dist/styles/@core/scss/template/_vertical-nav.scss +41 -0
- package/dist/styles/@core/scss/template/index.css +18764 -0
- package/dist/styles/@core/scss/template/index.scss +15 -0
- package/dist/styles/@core/scss/template/libs/apex-chart.css +90 -0
- package/dist/styles/@core/scss/template/libs/apex-chart.scss +99 -0
- package/dist/styles/@core/scss/template/libs/shepherd.css +82 -0
- package/dist/styles/@core/scss/template/libs/shepherd.scss +88 -0
- package/dist/styles/@core/scss/template/libs/vuetify/_variables.scss +461 -0
- package/dist/styles/@core/scss/template/libs/vuetify/index.css +741 -0
- package/dist/styles/@core/scss/template/libs/vuetify/index.scss +1 -0
- package/dist/styles/@core/scss/template/pages/misc.css +16 -0
- package/dist/styles/@core/scss/template/pages/misc.scss +20 -0
- package/dist/styles/@core/scss/template/placeholders/_default-layout-vertical-nav.scss +9 -0
- package/dist/styles/@core/scss/template/placeholders/_index.scss +3 -0
- package/dist/styles/@core/scss/template/placeholders/_nav.scss +15 -0
- package/dist/styles/@core/scss/template/placeholders/_vertical-nav.scss +18 -0
- package/dist/styles/@core/scss/template/skins/_bordered.scss +36 -0
- package/dist/styles/@core/scss/template/skins/_index.scss +1 -0
- package/dist/styles/@layouts/styles/_classes.scss +3 -0
- package/dist/styles/@layouts/styles/_dashboard-layout.scss +43 -0
- package/dist/styles/@layouts/styles/_global.scss +10 -0
- package/dist/styles/@layouts/styles/_mixins.scss +28 -0
- package/dist/styles/@layouts/styles/_placeholders.scss +53 -0
- package/dist/styles/@layouts/styles/_rtl.scss +7 -0
- package/dist/styles/@layouts/styles/_variables.scss +22 -0
- package/dist/styles/@layouts/styles/index.css +14 -0
- package/dist/styles/@layouts/styles/index.scss +2 -0
- package/dist/styles/assets/scss/styles.css +16099 -0
- package/dist/styles/assets/scss/styles.scss +246 -0
- package/dist/styles/assets/scss/variables/_template.scss +1 -0
- package/dist/styles/assets/scss/variables/_vuetify.scss +1 -0
- package/dist/types.d.ts +226 -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 +39 -0
- package/dist/utils/client.mjs +25 -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/index.d.ts +9 -0
- package/dist/utils/index.js +104 -0
- package/dist/utils/index.mjs +9 -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 +28 -0
- package/dist/utils/ruleValidator.js +158 -0
- package/dist/utils/ruleValidator.mjs +144 -0
- package/dist/utils/toaster.d.ts +12 -0
- package/dist/utils/toaster.js +71 -0
- package/dist/utils/toaster.mjs +59 -0
- package/dist/utils/utils.d.ts +8 -0
- package/dist/utils/utils.js +70 -0
- package/dist/utils/utils.mjs +56 -0
- package/package.json +79 -0
- package/src/styles/@core/scss/base/_components.scss +164 -0
- package/src/styles/@core/scss/base/_dark.scss +16 -0
- package/src/styles/@core/scss/base/_default-layout-w-vertical-nav.scss +106 -0
- package/src/styles/@core/scss/base/_default-layout.scss +16 -0
- package/src/styles/@core/scss/base/_index.scss +47 -0
- package/src/styles/@core/scss/base/_layouts.scss +63 -0
- package/src/styles/@core/scss/base/_misc.scss +20 -0
- package/src/styles/@core/scss/base/_mixins.scss +84 -0
- package/src/styles/@core/scss/base/_route-transitions.scss +70 -0
- package/src/styles/@core/scss/base/_utilities.scss +418 -0
- package/src/styles/@core/scss/base/_utils.scss +100 -0
- package/src/styles/@core/scss/base/_variables.scss +190 -0
- package/src/styles/@core/scss/base/_vertical-nav.scss +264 -0
- package/src/styles/@core/scss/base/libs/_perfect-scrollbar.scss +35 -0
- package/src/styles/@core/scss/base/libs/vuetify/_index.scss +1 -0
- package/src/styles/@core/scss/base/libs/vuetify/_overrides.scss +385 -0
- package/src/styles/@core/scss/base/libs/vuetify/_variables.scss +48 -0
- package/src/styles/@core/scss/base/placeholders/_default-layout-vertical-nav.scss +48 -0
- package/src/styles/@core/scss/base/placeholders/_default-layout.scss +3 -0
- package/src/styles/@core/scss/base/placeholders/_index.scss +5 -0
- package/src/styles/@core/scss/base/placeholders/_misc.scss +7 -0
- package/src/styles/@core/scss/base/placeholders/_nav.scss +26 -0
- package/src/styles/@core/scss/base/placeholders/_vertical-nav.scss +84 -0
- package/src/styles/@core/scss/base/skins/_bordered.scss +60 -0
- package/src/styles/@core/scss/base/skins/_index.scss +1 -0
- package/src/styles/@core/scss/template/_components.scss +1035 -0
- package/src/styles/@core/scss/template/_default-layout-w-vertical-nav.scss +20 -0
- package/src/styles/@core/scss/template/_utilities.scss +20 -0
- package/src/styles/@core/scss/template/_variables.scss +67 -0
- package/src/styles/@core/scss/template/_vertical-nav.scss +41 -0
- package/src/styles/@core/scss/template/index.scss +15 -0
- package/src/styles/@core/scss/template/libs/apex-chart.scss +99 -0
- package/src/styles/@core/scss/template/libs/shepherd.scss +88 -0
- package/src/styles/@core/scss/template/libs/vuetify/_variables.scss +461 -0
- package/src/styles/@core/scss/template/libs/vuetify/index.scss +1 -0
- package/src/styles/@core/scss/template/pages/misc.scss +20 -0
- package/src/styles/@core/scss/template/placeholders/_default-layout-vertical-nav.scss +9 -0
- package/src/styles/@core/scss/template/placeholders/_index.scss +3 -0
- package/src/styles/@core/scss/template/placeholders/_nav.scss +15 -0
- package/src/styles/@core/scss/template/placeholders/_vertical-nav.scss +18 -0
- package/src/styles/@core/scss/template/skins/_bordered.scss +36 -0
- package/src/styles/@core/scss/template/skins/_index.scss +1 -0
- package/src/styles/@layouts/styles/_classes.scss +3 -0
- package/src/styles/@layouts/styles/_dashboard-layout.scss +43 -0
- package/src/styles/@layouts/styles/_global.scss +10 -0
- package/src/styles/@layouts/styles/_mixins.scss +28 -0
- package/src/styles/@layouts/styles/_placeholders.scss +53 -0
- package/src/styles/@layouts/styles/_rtl.scss +7 -0
- package/src/styles/@layouts/styles/_variables.scss +22 -0
- package/src/styles/@layouts/styles/index.scss +2 -0
- package/src/styles/assets/scss/styles.scss +246 -0
- package/src/styles/assets/scss/variables/_template.scss +1 -0
- package/src/styles/assets/scss/variables/_vuetify.scss +1 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
$font-family-custom: 'Saudi Riyal Symbol', 'Noto Sans English', 'Noto Sans Arabic', 'SA', --apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
|
|
2
|
+
|
|
3
|
+
@use 'vuetify/styles' as * with ($body-font-family: $font-family-custom);
|
|
4
|
+
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: 'Noto Sans English';
|
|
7
|
+
src: url('../../../fonts/NotoSans-Medium.ttf') format('woff2');
|
|
8
|
+
font-display: swap;
|
|
9
|
+
font-weight: normal;
|
|
10
|
+
letter-spacing: 0 !important;
|
|
11
|
+
unicode-range: U+0020-007E, U+00A0-00FF, U+0100-017F, U+0180-024F, U+1E00-1EFF;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@font-face {
|
|
15
|
+
font-family: 'Noto Sans Arabic';
|
|
16
|
+
src: url('../../../fonts/NotoSansArabic-Medium.ttf') format('woff2');
|
|
17
|
+
font-display: swap;
|
|
18
|
+
font-weight: normal;
|
|
19
|
+
unicode-range: U+0600-06FF;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'Saudi Riyal Symbol';
|
|
24
|
+
src: url('../../../fonts/saudi_riyal_symbol/saudi_riyal_symbol.eot');
|
|
25
|
+
src: url('../../../fonts/saudi_riyal_symbol/saudi_riyal_symbol.eot') format('embedded-opentype'),
|
|
26
|
+
url('../../../fonts/saudi_riyal_symbol/saudi_riyal_symbol.woff') format('woff'),
|
|
27
|
+
url('../../../fonts/saudi_riyal_symbol/saudi_riyal_symbol.ttf') format('truetype'),
|
|
28
|
+
url('../../../fonts/saudi_riyal_symbol/saudi_riyal_symbol.svg') format('svg');
|
|
29
|
+
font-weight: normal;
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-display: swap;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.v-application {
|
|
35
|
+
|
|
36
|
+
&,
|
|
37
|
+
* {
|
|
38
|
+
[dir='ltr'] & {
|
|
39
|
+
font-family: 'Saudi Riyal Symbol', 'Noto Sans English', 'Noto Sans Arabic', sans-serif;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[dir='rtl'] & {
|
|
43
|
+
font-family: 'Saudi Riyal Symbol', 'Noto Sans Arabic', 'Noto Sans English', sans-serif;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.v-slide-group__next,
|
|
48
|
+
.v-tab-login .v-slide-group__prev {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.v-tabs--grow .v-btn {
|
|
53
|
+
flex: 1 1 0 !important;
|
|
54
|
+
padding: 10px 0;
|
|
55
|
+
height: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.app-text-field {
|
|
59
|
+
input {
|
|
60
|
+
font-size: 13px;
|
|
61
|
+
color: rgba(var(--v-theme-on-background), var(--v-high-emphasis-opacity));
|
|
62
|
+
margin: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.v-field--active.v-field--focused {
|
|
66
|
+
box-shadow: none !important;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.v-overlay__content {
|
|
71
|
+
|
|
72
|
+
.v-list-item:not(.v-list-item--active):hover,
|
|
73
|
+
.v-list-item:not(.v-list-item--active):focus-visible {
|
|
74
|
+
color: #000;
|
|
75
|
+
background-color: rgba(255, 194, 15, 1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.v-list-item--variant-text .v-list-item__overlay {
|
|
79
|
+
background-color: rgba(255, 194, 15, 1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.v-input--disabled {
|
|
84
|
+
.v-field {
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
background: rgb(var(--v-disabled-background)) !important;
|
|
87
|
+
border: none !important;
|
|
88
|
+
|
|
89
|
+
&--disabled {
|
|
90
|
+
opacity: 1 !important;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.v-field__outline {
|
|
95
|
+
color: rgb(var(--v-disabled-border)) !important;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.v-field--active.v-field--focused {
|
|
101
|
+
box-shadow: none !important;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.v-breadcrumbs,
|
|
105
|
+
.v-card-title {
|
|
106
|
+
font-weight: 600 !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.v-label,
|
|
110
|
+
.nav-item-title,
|
|
111
|
+
.v-input__details,
|
|
112
|
+
.v-list-item-title,
|
|
113
|
+
.v-list-item__content,
|
|
114
|
+
.v-list-item-title,
|
|
115
|
+
.v-card-item__content,
|
|
116
|
+
.v-card-title,
|
|
117
|
+
.v-card-text {
|
|
118
|
+
overflow: initial !important;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.v-window {
|
|
122
|
+
padding: 12px 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.text-pre-line {
|
|
126
|
+
white-space: pre-line !important;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.v-input__prepend,
|
|
130
|
+
.v-input__append {
|
|
131
|
+
padding-top: 0 !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.hover-underline,
|
|
135
|
+
%hover-underline {
|
|
136
|
+
position: relative;
|
|
137
|
+
display: inline-block;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
|
|
140
|
+
&::after {
|
|
141
|
+
content: '';
|
|
142
|
+
position: absolute;
|
|
143
|
+
bottom: -3px;
|
|
144
|
+
inset-inline-start: 0;
|
|
145
|
+
width: 0;
|
|
146
|
+
height: 2px;
|
|
147
|
+
background-color: rgba(var(--v-theme-primary));
|
|
148
|
+
transition: width 0.3s ease;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
&::after {
|
|
153
|
+
width: 100%;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.outline-none {
|
|
159
|
+
outline: none !important;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.v-breadcrumbs-item--link {
|
|
163
|
+
text-decoration: none !important;
|
|
164
|
+
@extend %hover-underline;
|
|
165
|
+
|
|
166
|
+
&:hover {
|
|
167
|
+
text-decoration: none;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.back-btn {
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: 50%;
|
|
174
|
+
inset-inline-start: 0;
|
|
175
|
+
transform: translateY(-50%);
|
|
176
|
+
background: rgb(var(--v-theme-gray-200)) !important;
|
|
177
|
+
|
|
178
|
+
&:hover {
|
|
179
|
+
background: rgb(var(--v-theme-secondary)) !important;
|
|
180
|
+
color: rgb(var(--v-theme-on-secondary)) !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.v-btn__overlay {
|
|
184
|
+
display: none !important;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&:active {
|
|
188
|
+
transform: translateY(-50%) !important;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.v-chip {
|
|
193
|
+
min-width: 96px !important;
|
|
194
|
+
text-align: center;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
letter-spacing: 0 !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.v-autocomplete__selection {
|
|
200
|
+
.v-chip {
|
|
201
|
+
max-width: 100% !important;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.v-input__control {
|
|
206
|
+
.v-field {
|
|
207
|
+
position: relative !important;
|
|
208
|
+
|
|
209
|
+
.v-field__clearable {
|
|
210
|
+
position: absolute !important;
|
|
211
|
+
inset-inline-start: -20px !important;
|
|
212
|
+
z-index: 999 !important;
|
|
213
|
+
width: 20px !important;
|
|
214
|
+
background-color: rgb(var(--v-theme-surface));
|
|
215
|
+
top: 50% !important;
|
|
216
|
+
transform: translateY(-50%);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.v-input--disabled {
|
|
222
|
+
.v-field {
|
|
223
|
+
.v-field__clearable {
|
|
224
|
+
background-color: rgb(var(--v-disabled-background));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.v-input--disabled .v-input__control .v-field__field {
|
|
230
|
+
border: none !important;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.v-input--disabled .v-field .v-field__overlay {
|
|
234
|
+
border: 1px solid rgba(var(--v-border-color), var(--v-border-opacity)) !important;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.v-breadcrumbs-item {
|
|
238
|
+
padding: 0px !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.multiselect__tags {
|
|
242
|
+
padding-top: 10px !important;
|
|
243
|
+
padding-inline-start: 8px !important;
|
|
244
|
+
padding-bottom: 0 !important;
|
|
245
|
+
padding-inline-end: 40px !important;
|
|
246
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward '../../../@core/scss/template/variables';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward '../../../@core/scss/template/libs/vuetify/variables';
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export type SortItem = { key: string; order?: boolean | 'asc' | 'desc' }
|
|
4
|
+
|
|
5
|
+
export type ReplaceableItem = Record<string, string | number | null> |
|
|
6
|
+
Array<ReplaceableItem> |
|
|
7
|
+
string |
|
|
8
|
+
number |
|
|
9
|
+
null
|
|
10
|
+
|
|
11
|
+
export type ItemData = Record<string, string | number | null>
|
|
12
|
+
export type Params = Record<string, string | number | null | undefined | string[] | Date[] | number[] | (string | number)[] | boolean>
|
|
13
|
+
|
|
14
|
+
export type ApiResponse<T> = {
|
|
15
|
+
data: T
|
|
16
|
+
status: {
|
|
17
|
+
success: boolean
|
|
18
|
+
code: number
|
|
19
|
+
message: string
|
|
20
|
+
error_key: string
|
|
21
|
+
errors_list?: ErrorResponseFiled[]
|
|
22
|
+
}
|
|
23
|
+
totals?: { [key: string]: number }
|
|
24
|
+
pagination: Pagination
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type ErrorResponse<T = null> = {
|
|
28
|
+
data: T
|
|
29
|
+
status: {
|
|
30
|
+
success: boolean
|
|
31
|
+
code: number
|
|
32
|
+
message: string
|
|
33
|
+
error_key: string
|
|
34
|
+
errors_list?: ErrorResponseFiled[]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type ErrorResponseFiled = {
|
|
39
|
+
field: string
|
|
40
|
+
message: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type Breadcrumb = {
|
|
44
|
+
title: string
|
|
45
|
+
params?: Record<string, string>
|
|
46
|
+
to?: string
|
|
47
|
+
disabled?: boolean
|
|
48
|
+
hasLang?: boolean
|
|
49
|
+
onClick?: () => void
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type Header = {
|
|
53
|
+
key: string
|
|
54
|
+
title: string
|
|
55
|
+
sortable?: boolean
|
|
56
|
+
width?: string
|
|
57
|
+
maxWidth?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type FormFilterType = 'text' | 'range' | 'radio' | 'select' | 'datepicker' | 'datepickerRange' | 'autocomplete' | 'autocompleteGroups' | 'mobile' | 'bankSelect' | 'licensePlate'
|
|
61
|
+
|
|
62
|
+
export type FormFilter = {
|
|
63
|
+
name: string
|
|
64
|
+
keys?: string[]
|
|
65
|
+
label: string
|
|
66
|
+
placeholder?: string
|
|
67
|
+
type?: FormFilterType
|
|
68
|
+
hasLang?: boolean
|
|
69
|
+
options?: OptionItem[]
|
|
70
|
+
itemLabel?: string
|
|
71
|
+
urlSearch?: string
|
|
72
|
+
multiple?: boolean
|
|
73
|
+
trackBy?: string
|
|
74
|
+
trackByValue?: string | number | string[]
|
|
75
|
+
searchInternally?: boolean
|
|
76
|
+
params?: Record<string, string | number | null>
|
|
77
|
+
class?: string
|
|
78
|
+
clearable?: boolean
|
|
79
|
+
showDescription?: boolean
|
|
80
|
+
closableChips?: boolean
|
|
81
|
+
invisible?: boolean
|
|
82
|
+
value?: string | number | [] | object[] | string[] | number[] | null | (string | number | null)[]
|
|
83
|
+
rules?: []
|
|
84
|
+
fromMinDate?: Date | null
|
|
85
|
+
toMinDate?: Date | null
|
|
86
|
+
fromMaxDate?: Date | null
|
|
87
|
+
toMaxDate?: Date | null
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type Options = {
|
|
91
|
+
page: number
|
|
92
|
+
itemsPerPage: number
|
|
93
|
+
sortBy: readonly SortItem[]
|
|
94
|
+
groupBy: readonly SortItem[]
|
|
95
|
+
search: string | undefined
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type Pagination = {
|
|
99
|
+
to: number
|
|
100
|
+
from: number
|
|
101
|
+
total: number
|
|
102
|
+
count: number
|
|
103
|
+
per_page: number
|
|
104
|
+
current_page: number
|
|
105
|
+
last_page: number
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type EditableDataTableItemType = 'text' | 'datepicker' | 'timepicker' | 'autocomplete' | 'autocompleteGroups' | 'select' | 'number' | 'display' | 'license_plate' | 'manual_date'
|
|
109
|
+
|
|
110
|
+
export type EditableDataTableItem = {
|
|
111
|
+
internalIndex?: number
|
|
112
|
+
key: string
|
|
113
|
+
width?: string
|
|
114
|
+
title?: string
|
|
115
|
+
text?: string | undefined
|
|
116
|
+
placeholder?: string
|
|
117
|
+
type?: EditableDataTableItemType
|
|
118
|
+
required?: boolean
|
|
119
|
+
rules?: ((value: unknown) => typeof value | string)[]
|
|
120
|
+
renderDataOnMounted?: boolean
|
|
121
|
+
renderDataOnBeforeMount?: boolean
|
|
122
|
+
showDescription?: boolean
|
|
123
|
+
tooltip?: string
|
|
124
|
+
clearable?: boolean
|
|
125
|
+
disabled?: boolean
|
|
126
|
+
maxlength?: number
|
|
127
|
+
dependsOn?: string
|
|
128
|
+
nestedDependsOnKey?: string
|
|
129
|
+
fields?: EditableDataTableItem[]
|
|
130
|
+
errorKey?: string | string[]
|
|
131
|
+
useDependsOnAsParams?: boolean
|
|
132
|
+
dependsOnFunction?: (...args: unknown[]) => boolean
|
|
133
|
+
closableChips?: boolean
|
|
134
|
+
urlSearch?: string | ((...args: unknown[]) => string)
|
|
135
|
+
params?: Record<string, string | number | null>
|
|
136
|
+
menuIcon?: string
|
|
137
|
+
searchable?: boolean
|
|
138
|
+
searchInternally?: boolean
|
|
139
|
+
trackBy?: string
|
|
140
|
+
itemLabel?: string
|
|
141
|
+
multiple?: boolean
|
|
142
|
+
groupLabel?: string
|
|
143
|
+
groupValues?: string
|
|
144
|
+
options?: Record<string, unknown>[] | OptionItem[] | Ref<OptionItem[]>
|
|
145
|
+
disableIfEmpty?: boolean
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type OptionItem = {
|
|
149
|
+
id?: string | number | boolean
|
|
150
|
+
name?: string | number
|
|
151
|
+
value?: string | number | boolean
|
|
152
|
+
allowTranslate?: boolean
|
|
153
|
+
svg_icon_url?: string
|
|
154
|
+
png_icon_url?: string
|
|
155
|
+
children?: OptionItem[]
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type Item = {
|
|
159
|
+
id: number | string
|
|
160
|
+
name: string
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export type Attachment = {
|
|
164
|
+
id?: string | number
|
|
165
|
+
src: string
|
|
166
|
+
file?: File
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type City = {
|
|
170
|
+
id: string
|
|
171
|
+
name: string
|
|
172
|
+
lat: number
|
|
173
|
+
lng: number
|
|
174
|
+
is_winch_city: boolean
|
|
175
|
+
coordinates: [[number, number]] | []
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export type Bank = {
|
|
179
|
+
id: number
|
|
180
|
+
name: string
|
|
181
|
+
account_number: string
|
|
182
|
+
iban: string
|
|
183
|
+
bank_code: string
|
|
184
|
+
created_at: string
|
|
185
|
+
updated_at: string
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type CustomInputContent = {
|
|
189
|
+
title: string
|
|
190
|
+
desc?: string
|
|
191
|
+
value: string | number
|
|
192
|
+
subtitle?: string
|
|
193
|
+
icon?: { icon: string; size?: string; color?: string }
|
|
194
|
+
images?: string
|
|
195
|
+
image?: string
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type GridColumn = {
|
|
199
|
+
cols?: string
|
|
200
|
+
sm?: string
|
|
201
|
+
md?: string
|
|
202
|
+
lg?: string
|
|
203
|
+
xl?: string
|
|
204
|
+
xxl?: string
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Suppress intlify type inference errors
|
|
208
|
+
declare module '@intlify/core-base' {
|
|
209
|
+
export interface CoreTranslation {
|
|
210
|
+
[key: string]: any;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Global type augmentation to suppress TS2742 errors
|
|
215
|
+
declare global {
|
|
216
|
+
interface Window {
|
|
217
|
+
// Add any global window properties if needed
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Suppress TS2742 errors for vue-i18n
|
|
222
|
+
declare module 'vue-i18n' {
|
|
223
|
+
interface ComposerTranslation {
|
|
224
|
+
(key: string, ...args: any[]): string;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildApiUrl: (relativePath?: string) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildApiUrl = void 0;
|
|
7
|
+
const buildApiUrl = relativePath => {
|
|
8
|
+
const baseUrl = process.env.VITE_BASE_API;
|
|
9
|
+
if (!relativePath) {
|
|
10
|
+
return baseUrl;
|
|
11
|
+
}
|
|
12
|
+
const normalizedPath = relativePath.startsWith("/") ? relativePath.slice(1) : relativePath;
|
|
13
|
+
return `${baseUrl}/${normalizedPath}`;
|
|
14
|
+
};
|
|
15
|
+
exports.buildApiUrl = buildApiUrl;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const buildApiUrl = (relativePath) => {
|
|
2
|
+
const baseUrl = import.meta.env.VITE_BASE_API;
|
|
3
|
+
if (!relativePath) {
|
|
4
|
+
return baseUrl;
|
|
5
|
+
}
|
|
6
|
+
const normalizedPath = relativePath.startsWith("/") ? relativePath.slice(1) : relativePath;
|
|
7
|
+
return `${baseUrl}/${normalizedPath}`;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type FetchOptions } from 'ofetch';
|
|
2
|
+
import type { ApiResponse } from '../types';
|
|
3
|
+
type RequestOptions = Omit<FetchOptions<'json'>, 'method'> & {
|
|
4
|
+
ignoreUrlPrefix?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const client: {
|
|
7
|
+
get: <T>(path: string, options?: RequestOptions) => Promise<ApiResponse<T>>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.client = void 0;
|
|
7
|
+
var _ofetch = require("ofetch");
|
|
8
|
+
const clientInstance = _ofetch.ofetch.create({
|
|
9
|
+
credentials: "include"
|
|
10
|
+
});
|
|
11
|
+
async function apiRequest(method, path, options) {
|
|
12
|
+
const baseUrl = process.env.VITE_BASE_API;
|
|
13
|
+
const prefix = process.env.VITE_APP_TYPE;
|
|
14
|
+
const {
|
|
15
|
+
ignoreUrlPrefix,
|
|
16
|
+
headers,
|
|
17
|
+
...restOptions
|
|
18
|
+
} = options || {};
|
|
19
|
+
const token = localStorage.getItem("token");
|
|
20
|
+
return clientInstance(path, {
|
|
21
|
+
method,
|
|
22
|
+
baseURL: ignoreUrlPrefix ? baseUrl : `${baseUrl}/${prefix}`,
|
|
23
|
+
credentials: "include",
|
|
24
|
+
headers: {
|
|
25
|
+
"Accept": "application/json",
|
|
26
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
27
|
+
"Accept-Language": localStorage.getItem("token"),
|
|
28
|
+
"User-Platform": "web",
|
|
29
|
+
...(token && {
|
|
30
|
+
Authorization: `Bearer ${token}`
|
|
31
|
+
}),
|
|
32
|
+
...headers
|
|
33
|
+
},
|
|
34
|
+
...restOptions
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const client = exports.client = {
|
|
38
|
+
get: async (path, options) => apiRequest("GET", path, options)
|
|
39
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ofetch } from "ofetch";
|
|
2
|
+
const clientInstance = ofetch.create({ credentials: "include" });
|
|
3
|
+
async function apiRequest(method, path, options) {
|
|
4
|
+
const baseUrl = import.meta.env.VITE_BASE_API;
|
|
5
|
+
const prefix = import.meta.env.VITE_APP_TYPE;
|
|
6
|
+
const { ignoreUrlPrefix, headers, ...restOptions } = options || {};
|
|
7
|
+
const token = localStorage.getItem("token");
|
|
8
|
+
return clientInstance(path, {
|
|
9
|
+
method,
|
|
10
|
+
baseURL: ignoreUrlPrefix ? baseUrl : `${baseUrl}/${prefix}`,
|
|
11
|
+
credentials: "include",
|
|
12
|
+
headers: {
|
|
13
|
+
"Accept": "application/json",
|
|
14
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
15
|
+
"Accept-Language": localStorage.getItem("token"),
|
|
16
|
+
"User-Platform": "web",
|
|
17
|
+
...token && { Authorization: `Bearer ${token}` },
|
|
18
|
+
...headers
|
|
19
|
+
},
|
|
20
|
+
...restOptions
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export const client = {
|
|
24
|
+
get: async (path, options) => apiRequest("GET", path, options)
|
|
25
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.saveFile = exports.printPdf = void 0;
|
|
7
|
+
var _printJs = _interopRequireDefault(require("print-js"));
|
|
8
|
+
var _client = require("./client");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const printPdf = async url => {
|
|
11
|
+
const {
|
|
12
|
+
data
|
|
13
|
+
} = await _client.client.get(`/pdf/base64?url=${url}`, {
|
|
14
|
+
ignoreUrlPrefix: true
|
|
15
|
+
});
|
|
16
|
+
if (data) {
|
|
17
|
+
await (0, _printJs.default)({
|
|
18
|
+
printable: data,
|
|
19
|
+
type: "pdf",
|
|
20
|
+
base64: true
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.printPdf = printPdf;
|
|
25
|
+
const saveFile = (blob, fileName) => {
|
|
26
|
+
const urlFile = window.URL.createObjectURL(blob);
|
|
27
|
+
const a = document.createElement("a");
|
|
28
|
+
a.style.display = "none";
|
|
29
|
+
a.href = urlFile;
|
|
30
|
+
a.download = fileName ?? `${Date.now()}`;
|
|
31
|
+
document.body.appendChild(a);
|
|
32
|
+
a.click();
|
|
33
|
+
window.URL.revokeObjectURL(urlFile);
|
|
34
|
+
};
|
|
35
|
+
exports.saveFile = saveFile;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import printJS from "print-js";
|
|
2
|
+
import { client } from "./client.mjs";
|
|
3
|
+
export const printPdf = async (url) => {
|
|
4
|
+
const { data } = await client.get(`/pdf/base64?url=${url}`, { ignoreUrlPrefix: true });
|
|
5
|
+
if (data) {
|
|
6
|
+
await printJS({
|
|
7
|
+
printable: data,
|
|
8
|
+
type: "pdf",
|
|
9
|
+
base64: true
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export const saveFile = (blob, fileName) => {
|
|
14
|
+
const urlFile = window.URL.createObjectURL(blob);
|
|
15
|
+
const a = document.createElement("a");
|
|
16
|
+
a.style.display = "none";
|
|
17
|
+
a.href = urlFile;
|
|
18
|
+
a.download = fileName ?? `${Date.now()}`;
|
|
19
|
+
document.body.appendChild(a);
|
|
20
|
+
a.click();
|
|
21
|
+
window.URL.revokeObjectURL(urlFile);
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ErrorResponseFiled } from '../types';
|
|
2
|
+
export declare function formValidator(errors: ErrorResponseFiled[] | undefined, key: string): {
|
|
3
|
+
getError: () => ErrorResponseFiled | undefined;
|
|
4
|
+
getMessage: () => string;
|
|
5
|
+
hasError: () => boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function getErrorMessage(errors: ErrorResponseFiled[] | undefined, key: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formValidator = formValidator;
|
|
7
|
+
exports.getErrorMessage = getErrorMessage;
|
|
8
|
+
function formValidator(errors = [], key) {
|
|
9
|
+
const getError = () => errors?.find(e => e.field == key);
|
|
10
|
+
const getMessage = () => getError()?.message || "";
|
|
11
|
+
const hasError = () => Boolean(getError()?.field);
|
|
12
|
+
return {
|
|
13
|
+
getError,
|
|
14
|
+
getMessage,
|
|
15
|
+
hasError
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function getErrorMessage(errors = [], key) {
|
|
19
|
+
return errors?.find(e => e.field == key)?.message || "";
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function formValidator(errors = [], key) {
|
|
2
|
+
const getError = () => errors?.find((e) => e.field == key);
|
|
3
|
+
const getMessage = () => getError()?.message || "";
|
|
4
|
+
const hasError = () => Boolean(getError()?.field);
|
|
5
|
+
return {
|
|
6
|
+
getError,
|
|
7
|
+
getMessage,
|
|
8
|
+
hasError
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export function getErrorMessage(errors = [], key) {
|
|
12
|
+
return errors?.find((e) => e.field == key)?.message || "";
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const formatDate: (date: string) => string;
|
|
2
|
+
export declare const formatDateWithoutTime: (date: string | Date, format?: string) => string;
|
|
3
|
+
export declare const formatTime: (date: string) => string;
|
|
4
|
+
export declare const formatDateWithTime: (date: string) => string;
|
|
5
|
+
export declare const formatDateWithDay: (date: string) => string;
|
|
6
|
+
export declare const extractDate: (dateString: string | Date | null, format?: string, hasTime?: boolean) => {
|
|
7
|
+
day: string;
|
|
8
|
+
month: string;
|
|
9
|
+
year: string;
|
|
10
|
+
} | null;
|
|
11
|
+
export declare const formatNumber: (number: number | undefined | string, withCurrency?: boolean) => string;
|
|
12
|
+
export declare const formatNumberColor: (number: number | string | undefined) => string;
|