@winchsa/ui 0.1.30 → 0.1.33
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/package.json +1 -1
- package/dist/components/Breadcrumbs.d.vue.ts +0 -7
- package/dist/components/Breadcrumbs.vue +0 -46
- package/dist/components/Breadcrumbs.vue.d.ts +0 -7
- package/dist/components/CustomizerSection.d.vue.ts +0 -17
- package/dist/components/CustomizerSection.vue +0 -19
- package/dist/components/CustomizerSection.vue.d.ts +0 -17
- package/dist/components/DialogCloseBtn.d.vue.ts +0 -7
- package/dist/components/DialogCloseBtn.vue +0 -20
- package/dist/components/DialogCloseBtn.vue.d.ts +0 -7
- package/dist/components/Drawer.d.vue.ts +0 -28
- package/dist/components/Drawer.vue +0 -60
- package/dist/components/Drawer.vue.d.ts +0 -28
- package/dist/components/IconBtn.d.vue.ts +0 -18
- package/dist/components/IconBtn.vue +0 -24
- package/dist/components/IconBtn.vue.d.ts +0 -18
- package/dist/components/LoadingBar.d.vue.ts +0 -6
- package/dist/components/LoadingBar.vue +0 -31
- package/dist/components/LoadingBar.vue.d.ts +0 -6
- package/dist/components/LoadingDialog.d.vue.ts +0 -12
- package/dist/components/LoadingDialog.vue +0 -41
- package/dist/components/LoadingDialog.vue.d.ts +0 -12
- package/dist/components/LoadingItem.d.vue.ts +0 -25
- package/dist/components/LoadingItem.vue +0 -66
- package/dist/components/LoadingItem.vue.d.ts +0 -25
- package/dist/components/Modal.d.vue.ts +0 -50
- package/dist/components/Modal.vue +0 -155
- package/dist/components/Modal.vue.d.ts +0 -50
- package/dist/components/MoreBtn.d.vue.ts +0 -17
- package/dist/components/MoreBtn.vue +0 -28
- package/dist/components/MoreBtn.vue.d.ts +0 -17
- package/dist/components/ScrollToTop.d.vue.ts +0 -3
- package/dist/components/ScrollToTop.vue +0 -39
- package/dist/components/ScrollToTop.vue.d.ts +0 -3
- package/dist/components/SiteTitle.d.vue.ts +0 -3
- package/dist/components/SiteTitle.vue +0 -14
- package/dist/components/SiteTitle.vue.d.ts +0 -3
- package/dist/components/Toaster.d.vue.ts +0 -6
- package/dist/components/Toaster.vue +0 -19
- package/dist/components/Toaster.vue.d.ts +0 -6
- package/dist/components/cards/AppCard.d.vue.ts +0 -18
- package/dist/components/cards/AppCard.vue +0 -45
- package/dist/components/cards/AppCard.vue.d.ts +0 -18
- package/dist/components/cards/AppCardActions.d.vue.ts +0 -33
- package/dist/components/cards/AppCardActions.vue +0 -126
- package/dist/components/cards/AppCardActions.vue.d.ts +0 -33
- package/dist/components/cards/CardStatisticsHorizontal.d.vue.ts +0 -9
- package/dist/components/cards/CardStatisticsHorizontal.vue +0 -29
- package/dist/components/cards/CardStatisticsHorizontal.vue.d.ts +0 -9
- package/dist/components/cards/CheckboxesCard.d.vue.ts +0 -18
- package/dist/components/cards/CheckboxesCard.vue +0 -108
- package/dist/components/cards/CheckboxesCard.vue.d.ts +0 -18
- package/dist/components/cards/HeaderCard.d.vue.ts +0 -9
- package/dist/components/cards/HeaderCard.vue +0 -31
- package/dist/components/cards/HeaderCard.vue.d.ts +0 -9
- package/dist/components/cards/ImageCard.d.vue.ts +0 -33
- package/dist/components/cards/ImageCard.vue +0 -73
- package/dist/components/cards/ImageCard.vue.d.ts +0 -33
- package/dist/components/cards/InputCard.d.vue.ts +0 -21
- package/dist/components/cards/InputCard.vue +0 -60
- package/dist/components/cards/InputCard.vue.d.ts +0 -21
- package/dist/components/cards/StaticCard.d.vue.ts +0 -21
- package/dist/components/cards/StaticCard.vue +0 -37
- package/dist/components/cards/StaticCard.vue.d.ts +0 -21
- package/dist/components/forms/Accordion.d.vue.ts +0 -19
- package/dist/components/forms/Accordion.vue +0 -43
- package/dist/components/forms/Accordion.vue.d.ts +0 -19
- package/dist/components/forms/AppBarSearch.d.vue.ts +0 -43
- package/dist/components/forms/AppBarSearch.vue +0 -345
- package/dist/components/forms/AppBarSearch.vue.d.ts +0 -43
- package/dist/components/forms/AppCombobox.d.vue.ts +0 -13
- package/dist/components/forms/AppCombobox.vue +0 -67
- package/dist/components/forms/AppCombobox.vue.d.ts +0 -13
- package/dist/components/forms/AppDrawerHeaderSection.d.vue.ts +0 -20
- package/dist/components/forms/AppDrawerHeaderSection.vue +0 -21
- package/dist/components/forms/AppDrawerHeaderSection.vue.d.ts +0 -20
- package/dist/components/forms/AppLabel.d.vue.ts +0 -24
- package/dist/components/forms/AppLabel.vue +0 -47
- package/dist/components/forms/AppLabel.vue.d.ts +0 -24
- package/dist/components/forms/AppLink.d.vue.ts +0 -19
- package/dist/components/forms/AppLink.vue +0 -50
- package/dist/components/forms/AppLink.vue.d.ts +0 -19
- package/dist/components/forms/AppNumberField.d.vue.ts +0 -20
- package/dist/components/forms/AppNumberField.vue +0 -85
- package/dist/components/forms/AppNumberField.vue.d.ts +0 -20
- package/dist/components/forms/AppOtpInput.d.vue.ts +0 -13
- package/dist/components/forms/AppOtpInput.vue +0 -84
- package/dist/components/forms/AppOtpInput.vue.d.ts +0 -13
- package/dist/components/forms/AppSearchHeader.d.vue.ts +0 -8
- package/dist/components/forms/AppSearchHeader.vue +0 -72
- package/dist/components/forms/AppSearchHeader.vue.d.ts +0 -8
- package/dist/components/forms/AppSelect.d.vue.ts +0 -17
- package/dist/components/forms/AppSelect.vue +0 -98
- package/dist/components/forms/AppSelect.vue.d.ts +0 -17
- package/dist/components/forms/AppStepper.d.vue.ts +0 -21
- package/dist/components/forms/AppStepper.vue +0 -232
- package/dist/components/forms/AppStepper.vue.d.ts +0 -21
- package/dist/components/forms/AppSwitch.d.vue.ts +0 -16
- package/dist/components/forms/AppSwitch.vue +0 -59
- package/dist/components/forms/AppSwitch.vue.d.ts +0 -16
- package/dist/components/forms/AppTextField.d.vue.ts +0 -13
- package/dist/components/forms/AppTextField.vue +0 -66
- package/dist/components/forms/AppTextField.vue.d.ts +0 -13
- package/dist/components/forms/AppTextarea.d.vue.ts +0 -13
- package/dist/components/forms/AppTextarea.vue +0 -69
- package/dist/components/forms/AppTextarea.vue.d.ts +0 -13
- package/dist/components/forms/AttachmentCropperInput.d.vue.ts +0 -18
- package/dist/components/forms/AttachmentCropperInput.vue +0 -227
- package/dist/components/forms/AttachmentCropperInput.vue.d.ts +0 -18
- package/dist/components/forms/AttachmentInput.d.vue.ts +0 -16
- package/dist/components/forms/AttachmentInput.vue +0 -116
- package/dist/components/forms/AttachmentInput.vue.d.ts +0 -16
- package/dist/components/forms/AutocompleteInput.d.vue.ts +0 -84
- package/dist/components/forms/AutocompleteInput.vue +0 -760
- package/dist/components/forms/AutocompleteInput.vue.d.ts +0 -84
- package/dist/components/forms/BankSelect.d.vue.ts +0 -21
- package/dist/components/forms/BankSelect.vue +0 -43
- package/dist/components/forms/BankSelect.vue.d.ts +0 -21
- package/dist/components/forms/BaseButton.d.vue.ts +0 -20
- package/dist/components/forms/BaseButton.vue +0 -42
- package/dist/components/forms/BaseButton.vue.d.ts +0 -20
- package/dist/components/forms/CounterInput.d.vue.ts +0 -13
- package/dist/components/forms/CounterInput.vue +0 -71
- package/dist/components/forms/CounterInput.vue.d.ts +0 -13
- package/dist/components/forms/CustomCheckboxes.d.vue.ts +0 -25
- package/dist/components/forms/CustomCheckboxes.vue +0 -69
- package/dist/components/forms/CustomCheckboxes.vue.d.ts +0 -25
- package/dist/components/forms/CustomCheckboxesWithIcon.d.vue.ts +0 -25
- package/dist/components/forms/CustomCheckboxesWithIcon.vue +0 -80
- package/dist/components/forms/CustomCheckboxesWithIcon.vue.d.ts +0 -25
- package/dist/components/forms/CustomCheckboxesWithImage.d.vue.ts +0 -16
- package/dist/components/forms/CustomCheckboxesWithImage.vue +0 -67
- package/dist/components/forms/CustomCheckboxesWithImage.vue.d.ts +0 -16
- package/dist/components/forms/CustomRadios.d.vue.ts +0 -25
- package/dist/components/forms/CustomRadios.vue +0 -69
- package/dist/components/forms/CustomRadios.vue.d.ts +0 -25
- package/dist/components/forms/CustomRadiosWithIcon.d.vue.ts +0 -28
- package/dist/components/forms/CustomRadiosWithIcon.vue +0 -98
- package/dist/components/forms/CustomRadiosWithIcon.vue.d.ts +0 -28
- package/dist/components/forms/CustomRadiosWithImage.d.vue.ts +0 -35
- package/dist/components/forms/CustomRadiosWithImage.vue +0 -69
- package/dist/components/forms/CustomRadiosWithImage.vue.d.ts +0 -35
- package/dist/components/forms/DatePicker.d.vue.ts +0 -29
- package/dist/components/forms/DatePicker.vue +0 -400
- package/dist/components/forms/DatePicker.vue.d.ts +0 -29
- package/dist/components/forms/DatePickerRange.d.vue.ts +0 -24
- package/dist/components/forms/DatePickerRange.vue +0 -127
- package/dist/components/forms/DatePickerRange.vue.d.ts +0 -24
- package/dist/components/forms/DraggedUploadFile.d.vue.ts +0 -11
- package/dist/components/forms/DraggedUploadFile.vue +0 -120
- package/dist/components/forms/DraggedUploadFile.vue.d.ts +0 -11
- package/dist/components/forms/ImageCardInput.d.vue.ts +0 -35
- package/dist/components/forms/ImageCardInput.vue +0 -234
- package/dist/components/forms/ImageCardInput.vue.d.ts +0 -35
- package/dist/components/forms/InputValidationWrapper.d.vue.ts +0 -26
- package/dist/components/forms/InputValidationWrapper.vue +0 -24
- package/dist/components/forms/InputValidationWrapper.vue.d.ts +0 -26
- package/dist/components/forms/LicensePlateInput.d.vue.ts +0 -21
- package/dist/components/forms/LicensePlateInput.vue +0 -175
- package/dist/components/forms/LicensePlateInput.vue.d.ts +0 -21
- package/dist/components/forms/ManualDate.d.vue.ts +0 -20
- package/dist/components/forms/ManualDate.vue +0 -264
- package/dist/components/forms/ManualDate.vue.d.ts +0 -20
- package/dist/components/forms/MobileInput.d.vue.ts +0 -25
- package/dist/components/forms/MobileInput.vue +0 -118
- package/dist/components/forms/MobileInput.vue.d.ts +0 -25
- package/dist/components/forms/PasswordInput.d.vue.ts +0 -11
- package/dist/components/forms/PasswordInput.vue +0 -29
- package/dist/components/forms/PasswordInput.vue.d.ts +0 -11
- package/dist/components/forms/RangeInput.d.vue.ts +0 -10
- package/dist/components/forms/RangeInput.vue +0 -48
- package/dist/components/forms/RangeInput.vue.d.ts +0 -10
- package/dist/components/forms/Tabs.d.vue.ts +0 -23
- package/dist/components/forms/Tabs.vue +0 -35
- package/dist/components/forms/Tabs.vue.d.ts +0 -23
- package/dist/components/forms/TimePicker.d.vue.ts +0 -18
- package/dist/components/forms/TimePicker.vue +0 -370
- package/dist/components/forms/TimePicker.vue.d.ts +0 -18
- package/dist/components/table/DataTable.d.vue.ts +0 -70
- package/dist/components/table/DataTable.vue +0 -361
- package/dist/components/table/DataTable.vue.d.ts +0 -70
- package/dist/components/table/EditableDataTable.d.vue.ts +0 -21
- package/dist/components/table/EditableDataTable.vue +0 -328
- package/dist/components/table/EditableDataTable.vue.d.ts +0 -21
- package/dist/components/table/EditableDataTableRow.d.vue.ts +0 -20
- package/dist/components/table/EditableDataTableRow.vue +0 -253
- package/dist/components/table/EditableDataTableRow.vue.d.ts +0 -20
- package/dist/components/table/FilterGenerator.d.vue.ts +0 -13
- package/dist/components/table/FilterGenerator.vue +0 -231
- package/dist/components/table/FilterGenerator.vue.d.ts +0 -13
- package/dist/components/table/StaticTable.d.vue.ts +0 -34
- package/dist/components/table/StaticTable.vue +0 -152
- package/dist/components/table/StaticTable.vue.d.ts +0 -34
- package/dist/components/table/TablePagination.d.vue.ts +0 -15
- package/dist/components/table/TablePagination.vue +0 -73
- package/dist/components/table/TablePagination.vue.d.ts +0 -15
- package/dist/composables/useIsMobile.d.ts +0 -1
- package/dist/composables/useIsMobile.js +0 -10
- package/dist/composables/useIsMobile.mjs +0 -4
- package/dist/composables/useTableFilters.d.ts +0 -23
- package/dist/composables/useTableFilters.js +0 -197
- package/dist/composables/useTableFilters.mjs +0 -184
- package/dist/images/avatar.png +0 -0
- package/dist/images/sa.svg +0 -1
- package/dist/index.d.ts +0 -65
- package/dist/index.js +0 -454
- package/dist/index.mjs +0 -130
- package/dist/lang/ar.json +0 -54
- package/dist/lang/en.json +0 -54
- package/dist/styles/assets/scss/variables/_template.scss +0 -1
- package/dist/styles/assets/scss/variables/_vuetify.scss +0 -1
- package/dist/styles/core/base/_components.scss +0 -164
- package/dist/styles/core/base/_dark.scss +0 -16
- package/dist/styles/core/base/_default-layout-w-vertical-nav.scss +0 -106
- package/dist/styles/core/base/_default-layout.scss +0 -16
- package/dist/styles/core/base/_index.scss +0 -47
- package/dist/styles/core/base/_layouts.scss +0 -63
- package/dist/styles/core/base/_misc.scss +0 -20
- package/dist/styles/core/base/_mixins.scss +0 -84
- package/dist/styles/core/base/_route-transitions.scss +0 -70
- package/dist/styles/core/base/_utilities.scss +0 -418
- package/dist/styles/core/base/_utils.scss +0 -100
- package/dist/styles/core/base/_variables.scss +0 -190
- package/dist/styles/core/base/_vertical-nav.scss +0 -264
- package/dist/styles/core/base/libs/_perfect-scrollbar.scss +0 -35
- package/dist/styles/core/base/libs/vuetify/_index.scss +0 -1
- package/dist/styles/core/base/libs/vuetify/_overrides.scss +0 -380
- package/dist/styles/core/base/libs/vuetify/_variables.scss +0 -48
- package/dist/styles/core/base/placeholders/_default-layout-vertical-nav.scss +0 -48
- package/dist/styles/core/base/placeholders/_default-layout.scss +0 -3
- package/dist/styles/core/base/placeholders/_index.scss +0 -5
- package/dist/styles/core/base/placeholders/_misc.scss +0 -7
- package/dist/styles/core/base/placeholders/_nav.scss +0 -26
- package/dist/styles/core/base/placeholders/_vertical-nav.scss +0 -84
- package/dist/styles/core/base/skins/_bordered.scss +0 -60
- package/dist/styles/core/base/skins/_index.scss +0 -1
- package/dist/styles/core/template/_components.scss +0 -1035
- package/dist/styles/core/template/_default-layout-w-vertical-nav.scss +0 -20
- package/dist/styles/core/template/_utilities.scss +0 -20
- package/dist/styles/core/template/_variables.scss +0 -67
- package/dist/styles/core/template/_vertical-nav.scss +0 -41
- package/dist/styles/core/template/index.css +0 -18779
- package/dist/styles/core/template/index.scss +0 -15
- package/dist/styles/core/template/libs/vuetify/_variables.scss +0 -464
- package/dist/styles/core/template/libs/vuetify/index.css +0 -739
- package/dist/styles/core/template/libs/vuetify/index.scss +0 -1
- package/dist/styles/core/template/pages/misc.css +0 -16
- package/dist/styles/core/template/pages/misc.scss +0 -20
- package/dist/styles/core/template/placeholders/_default-layout-vertical-nav.scss +0 -9
- package/dist/styles/core/template/placeholders/_index.scss +0 -3
- package/dist/styles/core/template/placeholders/_nav.scss +0 -15
- package/dist/styles/core/template/placeholders/_vertical-nav.scss +0 -18
- package/dist/styles/core/template/skins/_bordered.scss +0 -36
- package/dist/styles/core/template/skins/_index.scss +0 -1
- package/dist/styles/layouts/_classes.scss +0 -3
- package/dist/styles/layouts/_dashboard-layout.scss +0 -43
- package/dist/styles/layouts/_global.scss +0 -10
- package/dist/styles/layouts/_mixins.scss +0 -28
- package/dist/styles/layouts/_placeholders.scss +0 -53
- package/dist/styles/layouts/_rtl.scss +0 -7
- package/dist/styles/layouts/_variables.scss +0 -22
- package/dist/styles/layouts/index.css +0 -14
- package/dist/styles/layouts/index.scss +0 -2
- package/dist/types.d.ts +0 -218
- package/dist/utils/apiUrl.d.ts +0 -1
- package/dist/utils/apiUrl.js +0 -15
- package/dist/utils/apiUrl.mjs +0 -8
- package/dist/utils/client.d.ts +0 -9
- package/dist/utils/client.js +0 -53
- package/dist/utils/client.mjs +0 -39
- package/dist/utils/files.d.ts +0 -2
- package/dist/utils/files.js +0 -35
- package/dist/utils/files.mjs +0 -22
- package/dist/utils/formValidation.d.ts +0 -7
- package/dist/utils/formValidation.js +0 -20
- package/dist/utils/formValidation.mjs +0 -13
- package/dist/utils/formatters.d.ts +0 -12
- package/dist/utils/formatters.js +0 -84
- package/dist/utils/formatters.mjs +0 -56
- package/dist/utils/hijriDate.d.ts +0 -58
- package/dist/utils/hijriDate.js +0 -168
- package/dist/utils/hijriDate.mjs +0 -1951
- package/dist/utils/i18n.d.ts +0 -8
- package/dist/utils/i18n.js +0 -36
- package/dist/utils/i18n.mjs +0 -27
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.js +0 -115
- package/dist/utils/index.mjs +0 -10
- package/dist/utils/queryParams.d.ts +0 -4
- package/dist/utils/queryParams.js +0 -26
- package/dist/utils/queryParams.mjs +0 -18
- package/dist/utils/ruleValidator.d.ts +0 -41
- package/dist/utils/ruleValidator.js +0 -210
- package/dist/utils/ruleValidator.mjs +0 -195
- package/dist/utils/toaster.d.ts +0 -12
- package/dist/utils/toaster.js +0 -68
- package/dist/utils/toaster.mjs +0 -58
- package/dist/utils/utils.d.ts +0 -9
- package/dist/utils/utils.js +0 -84
- package/dist/utils/utils.mjs +0 -67
package/dist/utils/i18n.d.ts
DELETED
package/dist/utils/i18n.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.i18n = exports.createI18nInstance = void 0;
|
|
7
|
-
var _vueI18n = require("vue-i18n");
|
|
8
|
-
var _en = _interopRequireDefault(require("../lang/en.json"));
|
|
9
|
-
var _ar = _interopRequireDefault(require("../lang/ar.json"));
|
|
10
|
-
var _utils = require("./utils");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const defaultMessages = {
|
|
13
|
-
en: _en.default,
|
|
14
|
-
ar: _ar.default
|
|
15
|
-
};
|
|
16
|
-
let _i18nInstance = (0, _vueI18n.createI18n)({
|
|
17
|
-
legacy: false,
|
|
18
|
-
locale: "ar",
|
|
19
|
-
fallbackLocale: "ar",
|
|
20
|
-
globalInjection: true,
|
|
21
|
-
messages: defaultMessages
|
|
22
|
-
});
|
|
23
|
-
const i18n = () => _i18nInstance;
|
|
24
|
-
exports.i18n = i18n;
|
|
25
|
-
const createI18nInstance = messages => {
|
|
26
|
-
const mergedMessages = (0, _utils.mergeDeep)(defaultMessages, messages);
|
|
27
|
-
_i18nInstance = (0, _vueI18n.createI18n)({
|
|
28
|
-
legacy: false,
|
|
29
|
-
locale: "ar",
|
|
30
|
-
fallbackLocale: "ar",
|
|
31
|
-
globalInjection: true,
|
|
32
|
-
messages: mergedMessages
|
|
33
|
-
});
|
|
34
|
-
return _i18nInstance;
|
|
35
|
-
};
|
|
36
|
-
exports.createI18nInstance = createI18nInstance;
|
package/dist/utils/i18n.mjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createI18n } from "vue-i18n";
|
|
2
|
-
import en from "../lang/en.json";
|
|
3
|
-
import ar from "../lang/ar.json";
|
|
4
|
-
import { mergeDeep } from "./utils.mjs";
|
|
5
|
-
const defaultMessages = {
|
|
6
|
-
en,
|
|
7
|
-
ar
|
|
8
|
-
};
|
|
9
|
-
let _i18nInstance = createI18n({
|
|
10
|
-
legacy: false,
|
|
11
|
-
locale: "ar",
|
|
12
|
-
fallbackLocale: "ar",
|
|
13
|
-
globalInjection: true,
|
|
14
|
-
messages: defaultMessages
|
|
15
|
-
});
|
|
16
|
-
export const i18n = () => _i18nInstance;
|
|
17
|
-
export const createI18nInstance = (messages) => {
|
|
18
|
-
const mergedMessages = mergeDeep(defaultMessages, messages);
|
|
19
|
-
_i18nInstance = createI18n({
|
|
20
|
-
legacy: false,
|
|
21
|
-
locale: "ar",
|
|
22
|
-
fallbackLocale: "ar",
|
|
23
|
-
globalInjection: true,
|
|
24
|
-
messages: mergedMessages
|
|
25
|
-
});
|
|
26
|
-
return _i18nInstance;
|
|
27
|
-
};
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './apiUrl';
|
|
2
|
-
export * from './client';
|
|
3
|
-
export * from './files';
|
|
4
|
-
export * from './formValidation';
|
|
5
|
-
export * from './formatters';
|
|
6
|
-
export * from './queryParams';
|
|
7
|
-
export * from './ruleValidator';
|
|
8
|
-
export * from './toaster';
|
|
9
|
-
export * from './i18n';
|
|
10
|
-
export * from './utils';
|
package/dist/utils/index.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _apiUrl = require("./apiUrl");
|
|
7
|
-
Object.keys(_apiUrl).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _apiUrl[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _apiUrl[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _client = require("./client");
|
|
18
|
-
Object.keys(_client).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _client[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _client[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _files = require("./files");
|
|
29
|
-
Object.keys(_files).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _files[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _files[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _formValidation = require("./formValidation");
|
|
40
|
-
Object.keys(_formValidation).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _formValidation[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _formValidation[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _formatters = require("./formatters");
|
|
51
|
-
Object.keys(_formatters).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _formatters[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _formatters[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _queryParams = require("./queryParams");
|
|
62
|
-
Object.keys(_queryParams).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _queryParams[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _queryParams[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _ruleValidator = require("./ruleValidator");
|
|
73
|
-
Object.keys(_ruleValidator).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _ruleValidator[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _ruleValidator[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _toaster = require("./toaster");
|
|
84
|
-
Object.keys(_toaster).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _toaster[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _toaster[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _i18n = require("./i18n");
|
|
95
|
-
Object.keys(_i18n).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _i18n[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _i18n[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _utils = require("./utils");
|
|
106
|
-
Object.keys(_utils).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _utils[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return _utils[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
package/dist/utils/index.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "./apiUrl.mjs";
|
|
2
|
-
export * from "./client.mjs";
|
|
3
|
-
export * from "./files.mjs";
|
|
4
|
-
export * from "./formValidation.mjs";
|
|
5
|
-
export * from "./formatters.mjs";
|
|
6
|
-
export * from "./queryParams.mjs";
|
|
7
|
-
export * from "./ruleValidator.mjs";
|
|
8
|
-
export * from "./toaster.mjs";
|
|
9
|
-
export * from "./i18n.mjs";
|
|
10
|
-
export * from "./utils.mjs";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
2
|
-
import type { Params } from '../types';
|
|
3
|
-
export declare const buildQueryString: (params: Params | undefined) => string;
|
|
4
|
-
export declare const decodeRouteParams: (to?: RouteLocationNormalizedLoaded) => URLSearchParams;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.decodeRouteParams = exports.buildQueryString = void 0;
|
|
7
|
-
var _vueRouter = require("vue-router");
|
|
8
|
-
const buildQueryString = params => {
|
|
9
|
-
const inputParams = params || {};
|
|
10
|
-
return Object.entries(inputParams).filter(([key, value]) => {
|
|
11
|
-
return key && value !== null && value !== void 0 && (Array.isArray(value) && value.length !== 0 || String(value).trim().length > 0);
|
|
12
|
-
}).map(([key, value]) => {
|
|
13
|
-
if (Array.isArray(value)) {
|
|
14
|
-
return value.map((subValue, index) => subValue ? `${key}[${index}]=${subValue}` : null).join("&");
|
|
15
|
-
}
|
|
16
|
-
return `${key}=${value}`;
|
|
17
|
-
}).join("&");
|
|
18
|
-
};
|
|
19
|
-
exports.buildQueryString = buildQueryString;
|
|
20
|
-
const decodeRouteParams = to => {
|
|
21
|
-
const route = to || (0, _vueRouter.useRoute)();
|
|
22
|
-
const path = decodeURIComponent(route.fullPath.replace(route.path, ""));
|
|
23
|
-
const params = new URLSearchParams(decodeURIComponent(path));
|
|
24
|
-
return params;
|
|
25
|
-
};
|
|
26
|
-
exports.decodeRouteParams = decodeRouteParams;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useRoute } from "vue-router";
|
|
2
|
-
export const buildQueryString = (params) => {
|
|
3
|
-
const inputParams = params || {};
|
|
4
|
-
return Object.entries(inputParams).filter(([key, value]) => {
|
|
5
|
-
return key && value !== null && value !== void 0 && (Array.isArray(value) && value.length !== 0 || String(value).trim().length > 0);
|
|
6
|
-
}).map(([key, value]) => {
|
|
7
|
-
if (Array.isArray(value)) {
|
|
8
|
-
return value.map((subValue, index) => subValue ? `${key}[${index}]=${subValue}` : null).join("&");
|
|
9
|
-
}
|
|
10
|
-
return `${key}=${value}`;
|
|
11
|
-
}).join("&");
|
|
12
|
-
};
|
|
13
|
-
export const decodeRouteParams = (to) => {
|
|
14
|
-
const route = to || useRoute();
|
|
15
|
-
const path = decodeURIComponent(route.fullPath.replace(route.path, ""));
|
|
16
|
-
const params = new URLSearchParams(decodeURIComponent(path));
|
|
17
|
-
return params;
|
|
18
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { VForm } from 'vuetify/components/VForm';
|
|
2
|
-
export declare const ruleValidator: () => {
|
|
3
|
-
fileValidator: (file: File | undefined, maxSizeInMB: number, types: string[]) => boolean | undefined;
|
|
4
|
-
requiredValidator: (value: unknown) => string | true;
|
|
5
|
-
requiredLocationValidator: (locations: Array<{
|
|
6
|
-
name?: string;
|
|
7
|
-
address?: string;
|
|
8
|
-
lat?: number | null;
|
|
9
|
-
lng?: number | null;
|
|
10
|
-
}> | {
|
|
11
|
-
name?: string;
|
|
12
|
-
address?: string;
|
|
13
|
-
lat?: number | null;
|
|
14
|
-
lng?: number | null;
|
|
15
|
-
}) => string | true;
|
|
16
|
-
emailValidator: (value: unknown) => string | true;
|
|
17
|
-
alphaValidator: (value: unknown) => string | true;
|
|
18
|
-
alphaDashValidator: (value: unknown) => string | true;
|
|
19
|
-
alphaWithNumberValidator: (value: unknown) => string | true;
|
|
20
|
-
betweenValidator: (value: unknown, min: number, max: number) => string | true;
|
|
21
|
-
integerValidator: (value: unknown) => string | true;
|
|
22
|
-
numberValidator: (value: unknown) => string | true;
|
|
23
|
-
confirmedValidator: (value: string, target: string) => string | true;
|
|
24
|
-
urlValidator: (value: unknown) => string | true;
|
|
25
|
-
lengthValidator: (value: unknown, length: number) => string | true;
|
|
26
|
-
ibanValidator: (value: unknown) => string | true;
|
|
27
|
-
dateValidator: (value: unknown) => string | true;
|
|
28
|
-
regexValidator: (value: string, regex: RegExp, message?: string) => string | true;
|
|
29
|
-
idNumberValidator: (value: string | number | null) => string | undefined;
|
|
30
|
-
requiredManualDateValidator: (value: {
|
|
31
|
-
year?: string;
|
|
32
|
-
month?: string;
|
|
33
|
-
day?: string;
|
|
34
|
-
}) => string | true;
|
|
35
|
-
requiredPlateValidator: (value: string[] | null | undefined) => string | true;
|
|
36
|
-
};
|
|
37
|
-
export declare const useFormValidation: () => {
|
|
38
|
-
validateAndScroll: (refVForm: VForm | undefined) => Promise<boolean>;
|
|
39
|
-
validationType: import("vue").Ref<"input" | "submit", "input" | "submit">;
|
|
40
|
-
scrollToError: () => Promise<void>;
|
|
41
|
-
};
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useFormValidation = exports.ruleValidator = void 0;
|
|
7
|
-
var _vue = require("vue");
|
|
8
|
-
var _vueI18n = require("vue-i18n");
|
|
9
|
-
var _toaster = require("./toaster");
|
|
10
|
-
var _utils = require("./utils");
|
|
11
|
-
const ruleValidator = () => {
|
|
12
|
-
const {
|
|
13
|
-
t
|
|
14
|
-
} = (0, _vueI18n.useI18n)();
|
|
15
|
-
const requiredValidator = value => {
|
|
16
|
-
if ((0, _utils.isNullOrUndefined)(value) || (0, _utils.isEmptyArray)(value) || value === false) {
|
|
17
|
-
return t("validation.required");
|
|
18
|
-
}
|
|
19
|
-
return !!String(value).trim().length || t("validation.required");
|
|
20
|
-
};
|
|
21
|
-
const requiredLocationValidator = locations => {
|
|
22
|
-
const locationArray = Array.isArray(locations) ? locations : [locations];
|
|
23
|
-
if (!locationArray || locationArray.length === 0) {
|
|
24
|
-
return t("validation.required");
|
|
25
|
-
}
|
|
26
|
-
for (const location of locationArray) {
|
|
27
|
-
if (!location || !location.address || !String(location.address).trim() || location.lat === null || typeof location.lat !== "number" || location.lng === null || typeof location.lng !== "number") {
|
|
28
|
-
return t("validation.required");
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return true;
|
|
32
|
-
};
|
|
33
|
-
const ibanValidator = value => {
|
|
34
|
-
if ((0, _utils.isNullOrUndefined)(value) || (0, _utils.isEmptyArray)(value) || value === false || String(value).length !== 24) {
|
|
35
|
-
return t("validation.iban");
|
|
36
|
-
}
|
|
37
|
-
return !!String(value).trim().length || t("validation.iban");
|
|
38
|
-
};
|
|
39
|
-
const idNumberValidator = value => {
|
|
40
|
-
const str = value?.toString() || "";
|
|
41
|
-
const validStarts = ["1", "2", "3", "4"];
|
|
42
|
-
if (str.length !== 10 || !validStarts.includes(str[0])) {
|
|
43
|
-
return t("validation.invalid");
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const requiredManualDateValidator = value => {
|
|
47
|
-
if ((0, _utils.isEmpty)(value?.day) || (0, _utils.isEmpty)(value?.month) || (0, _utils.isEmpty)(value?.year)) {
|
|
48
|
-
return t("validation.required");
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
};
|
|
52
|
-
const emailValidator = value => {
|
|
53
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
const re = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
|
|
57
|
-
if (Array.isArray(value)) {
|
|
58
|
-
return value.every(val => re.test(String(val))) || t("validation.email");
|
|
59
|
-
}
|
|
60
|
-
return re.test(String(value)) || t("validation.email");
|
|
61
|
-
};
|
|
62
|
-
const confirmedValidator = (value, target) => value === target || t("validation.confirmed");
|
|
63
|
-
const betweenValidator = (value, min, max) => {
|
|
64
|
-
const valueAsNumber = Number(value);
|
|
65
|
-
return Number(min) <= valueAsNumber && Number(max) >= valueAsNumber || t("validation.between", {
|
|
66
|
-
min,
|
|
67
|
-
max
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
const integerValidator = value => {
|
|
71
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
if (Array.isArray(value)) {
|
|
75
|
-
return value.every(val => /^-?[0-9]+$/.test(String(val))) || t("validation.integer");
|
|
76
|
-
}
|
|
77
|
-
return /^-?[0-9]+$/.test(String(value)) || t("validation.integer");
|
|
78
|
-
};
|
|
79
|
-
const numberValidator = value => {
|
|
80
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
return /^\d+(\.\d+)?$/.test(String(value)) || t("validation.number");
|
|
84
|
-
};
|
|
85
|
-
const alphaValidator = value => {
|
|
86
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
return /^[A-Za-z\u0600-\u06FF\s]*$/i.test(String(value)) || t("validation.alphabetic");
|
|
90
|
-
};
|
|
91
|
-
const alphaWithNumberValidator = value => {
|
|
92
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
return /^[A-Za-z\u0600-\u06FF0-9\s]*$/.test(String(value)) || t("validation.alphabetic");
|
|
96
|
-
};
|
|
97
|
-
const urlValidator = value => {
|
|
98
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
const re = /^(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9.-]+\.[a-zA-Z]{2,5}[.]?/;
|
|
102
|
-
return re.test(String(value)) || t("validation.url");
|
|
103
|
-
};
|
|
104
|
-
const lengthValidator = (value, length) => {
|
|
105
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
return String(value).length === length || t("validation.length", {
|
|
109
|
-
length
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
const alphaDashValidator = value => {
|
|
113
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
114
|
-
return true;
|
|
115
|
-
}
|
|
116
|
-
const valueAsString = String(value);
|
|
117
|
-
return /^[0-9A-Z_-]*$/i.test(valueAsString) || t("validation.alpha_dash");
|
|
118
|
-
};
|
|
119
|
-
const fileValidator = (file, maxSizeInMB, types) => {
|
|
120
|
-
if (!file) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
if (file.size > maxSizeInMB * 1024 * 1024) {
|
|
124
|
-
(0, _toaster.toaster)().error(t("validation.file_size_limit_exceeded", {
|
|
125
|
-
size: maxSizeInMB
|
|
126
|
-
}));
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
if (!types.includes(file.type)) {
|
|
130
|
-
(0, _toaster.toaster)().error(t("validation.file_type_not_allowed", {
|
|
131
|
-
types: types.map(type => type.split("/")[1]).join(", ")
|
|
132
|
-
}));
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
return true;
|
|
136
|
-
};
|
|
137
|
-
const requiredPlateValidator = value => {
|
|
138
|
-
if (!value || !value?.every(val => val !== "")) {
|
|
139
|
-
return t("validation.required");
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
142
|
-
};
|
|
143
|
-
const dateValidator = value => {
|
|
144
|
-
if ((0, _utils.isEmpty)(value)) {
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
const dateString = String(value);
|
|
148
|
-
const datePattern = /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/(\d{4})$/;
|
|
149
|
-
if (!datePattern.test(dateString)) {
|
|
150
|
-
return t("validation.date", {
|
|
151
|
-
format: "DD/MM/YYYY"
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
return true;
|
|
155
|
-
};
|
|
156
|
-
const regexValidator = (value, regex, message) => {
|
|
157
|
-
return regex.test(value) || message || t("validation.invalid");
|
|
158
|
-
};
|
|
159
|
-
return {
|
|
160
|
-
fileValidator,
|
|
161
|
-
requiredValidator,
|
|
162
|
-
requiredLocationValidator,
|
|
163
|
-
emailValidator,
|
|
164
|
-
alphaValidator,
|
|
165
|
-
alphaDashValidator,
|
|
166
|
-
alphaWithNumberValidator,
|
|
167
|
-
betweenValidator,
|
|
168
|
-
integerValidator,
|
|
169
|
-
numberValidator,
|
|
170
|
-
confirmedValidator,
|
|
171
|
-
urlValidator,
|
|
172
|
-
lengthValidator,
|
|
173
|
-
ibanValidator,
|
|
174
|
-
dateValidator,
|
|
175
|
-
regexValidator,
|
|
176
|
-
idNumberValidator,
|
|
177
|
-
requiredManualDateValidator,
|
|
178
|
-
requiredPlateValidator
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
exports.ruleValidator = ruleValidator;
|
|
182
|
-
const useFormValidation = () => {
|
|
183
|
-
const validationType = (0, _vue.ref)("submit");
|
|
184
|
-
const validateAndScroll = async refVForm => {
|
|
185
|
-
const isValid = await refVForm?.validate();
|
|
186
|
-
await scrollToError();
|
|
187
|
-
if (isValid?.valid === false) {
|
|
188
|
-
await scrollToError();
|
|
189
|
-
validationType.value = "input";
|
|
190
|
-
return false;
|
|
191
|
-
}
|
|
192
|
-
return true;
|
|
193
|
-
};
|
|
194
|
-
const scrollToError = async () => {
|
|
195
|
-
validationType.value = "input";
|
|
196
|
-
await (0, _vue.nextTick)(() => {
|
|
197
|
-
const el = document.querySelector(".v-messages__message:first-of-type");
|
|
198
|
-
el?.scrollIntoView({
|
|
199
|
-
behavior: "smooth",
|
|
200
|
-
block: "center"
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
return {
|
|
205
|
-
validateAndScroll,
|
|
206
|
-
validationType,
|
|
207
|
-
scrollToError
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
exports.useFormValidation = useFormValidation;
|