@winchsa/ui 0.1.31 → 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.
Files changed (300) hide show
  1. package/package.json +1 -1
  2. package/dist/components/Breadcrumbs.d.vue.ts +0 -7
  3. package/dist/components/Breadcrumbs.vue +0 -46
  4. package/dist/components/Breadcrumbs.vue.d.ts +0 -7
  5. package/dist/components/CustomizerSection.d.vue.ts +0 -17
  6. package/dist/components/CustomizerSection.vue +0 -19
  7. package/dist/components/CustomizerSection.vue.d.ts +0 -17
  8. package/dist/components/DialogCloseBtn.d.vue.ts +0 -7
  9. package/dist/components/DialogCloseBtn.vue +0 -20
  10. package/dist/components/DialogCloseBtn.vue.d.ts +0 -7
  11. package/dist/components/Drawer.d.vue.ts +0 -28
  12. package/dist/components/Drawer.vue +0 -60
  13. package/dist/components/Drawer.vue.d.ts +0 -28
  14. package/dist/components/IconBtn.d.vue.ts +0 -18
  15. package/dist/components/IconBtn.vue +0 -24
  16. package/dist/components/IconBtn.vue.d.ts +0 -18
  17. package/dist/components/LoadingBar.d.vue.ts +0 -6
  18. package/dist/components/LoadingBar.vue +0 -31
  19. package/dist/components/LoadingBar.vue.d.ts +0 -6
  20. package/dist/components/LoadingDialog.d.vue.ts +0 -12
  21. package/dist/components/LoadingDialog.vue +0 -41
  22. package/dist/components/LoadingDialog.vue.d.ts +0 -12
  23. package/dist/components/LoadingItem.d.vue.ts +0 -25
  24. package/dist/components/LoadingItem.vue +0 -66
  25. package/dist/components/LoadingItem.vue.d.ts +0 -25
  26. package/dist/components/Modal.d.vue.ts +0 -50
  27. package/dist/components/Modal.vue +0 -155
  28. package/dist/components/Modal.vue.d.ts +0 -50
  29. package/dist/components/MoreBtn.d.vue.ts +0 -17
  30. package/dist/components/MoreBtn.vue +0 -28
  31. package/dist/components/MoreBtn.vue.d.ts +0 -17
  32. package/dist/components/ScrollToTop.d.vue.ts +0 -3
  33. package/dist/components/ScrollToTop.vue +0 -39
  34. package/dist/components/ScrollToTop.vue.d.ts +0 -3
  35. package/dist/components/SiteTitle.d.vue.ts +0 -3
  36. package/dist/components/SiteTitle.vue +0 -14
  37. package/dist/components/SiteTitle.vue.d.ts +0 -3
  38. package/dist/components/Toaster.d.vue.ts +0 -6
  39. package/dist/components/Toaster.vue +0 -19
  40. package/dist/components/Toaster.vue.d.ts +0 -6
  41. package/dist/components/cards/AppCard.d.vue.ts +0 -18
  42. package/dist/components/cards/AppCard.vue +0 -45
  43. package/dist/components/cards/AppCard.vue.d.ts +0 -18
  44. package/dist/components/cards/AppCardActions.d.vue.ts +0 -33
  45. package/dist/components/cards/AppCardActions.vue +0 -126
  46. package/dist/components/cards/AppCardActions.vue.d.ts +0 -33
  47. package/dist/components/cards/CardStatisticsHorizontal.d.vue.ts +0 -9
  48. package/dist/components/cards/CardStatisticsHorizontal.vue +0 -29
  49. package/dist/components/cards/CardStatisticsHorizontal.vue.d.ts +0 -9
  50. package/dist/components/cards/CheckboxesCard.d.vue.ts +0 -18
  51. package/dist/components/cards/CheckboxesCard.vue +0 -108
  52. package/dist/components/cards/CheckboxesCard.vue.d.ts +0 -18
  53. package/dist/components/cards/HeaderCard.d.vue.ts +0 -9
  54. package/dist/components/cards/HeaderCard.vue +0 -31
  55. package/dist/components/cards/HeaderCard.vue.d.ts +0 -9
  56. package/dist/components/cards/ImageCard.d.vue.ts +0 -33
  57. package/dist/components/cards/ImageCard.vue +0 -73
  58. package/dist/components/cards/ImageCard.vue.d.ts +0 -33
  59. package/dist/components/cards/InputCard.d.vue.ts +0 -21
  60. package/dist/components/cards/InputCard.vue +0 -60
  61. package/dist/components/cards/InputCard.vue.d.ts +0 -21
  62. package/dist/components/cards/StaticCard.d.vue.ts +0 -21
  63. package/dist/components/cards/StaticCard.vue +0 -37
  64. package/dist/components/cards/StaticCard.vue.d.ts +0 -21
  65. package/dist/components/forms/Accordion.d.vue.ts +0 -19
  66. package/dist/components/forms/Accordion.vue +0 -43
  67. package/dist/components/forms/Accordion.vue.d.ts +0 -19
  68. package/dist/components/forms/AppBarSearch.d.vue.ts +0 -43
  69. package/dist/components/forms/AppBarSearch.vue +0 -345
  70. package/dist/components/forms/AppBarSearch.vue.d.ts +0 -43
  71. package/dist/components/forms/AppCombobox.d.vue.ts +0 -13
  72. package/dist/components/forms/AppCombobox.vue +0 -67
  73. package/dist/components/forms/AppCombobox.vue.d.ts +0 -13
  74. package/dist/components/forms/AppDrawerHeaderSection.d.vue.ts +0 -20
  75. package/dist/components/forms/AppDrawerHeaderSection.vue +0 -21
  76. package/dist/components/forms/AppDrawerHeaderSection.vue.d.ts +0 -20
  77. package/dist/components/forms/AppLabel.d.vue.ts +0 -24
  78. package/dist/components/forms/AppLabel.vue +0 -47
  79. package/dist/components/forms/AppLabel.vue.d.ts +0 -24
  80. package/dist/components/forms/AppLink.d.vue.ts +0 -19
  81. package/dist/components/forms/AppLink.vue +0 -50
  82. package/dist/components/forms/AppLink.vue.d.ts +0 -19
  83. package/dist/components/forms/AppNumberField.d.vue.ts +0 -20
  84. package/dist/components/forms/AppNumberField.vue +0 -85
  85. package/dist/components/forms/AppNumberField.vue.d.ts +0 -20
  86. package/dist/components/forms/AppOtpInput.d.vue.ts +0 -13
  87. package/dist/components/forms/AppOtpInput.vue +0 -84
  88. package/dist/components/forms/AppOtpInput.vue.d.ts +0 -13
  89. package/dist/components/forms/AppSearchHeader.d.vue.ts +0 -8
  90. package/dist/components/forms/AppSearchHeader.vue +0 -72
  91. package/dist/components/forms/AppSearchHeader.vue.d.ts +0 -8
  92. package/dist/components/forms/AppSelect.d.vue.ts +0 -17
  93. package/dist/components/forms/AppSelect.vue +0 -98
  94. package/dist/components/forms/AppSelect.vue.d.ts +0 -17
  95. package/dist/components/forms/AppStepper.d.vue.ts +0 -21
  96. package/dist/components/forms/AppStepper.vue +0 -232
  97. package/dist/components/forms/AppStepper.vue.d.ts +0 -21
  98. package/dist/components/forms/AppSwitch.d.vue.ts +0 -16
  99. package/dist/components/forms/AppSwitch.vue +0 -59
  100. package/dist/components/forms/AppSwitch.vue.d.ts +0 -16
  101. package/dist/components/forms/AppTextField.d.vue.ts +0 -13
  102. package/dist/components/forms/AppTextField.vue +0 -66
  103. package/dist/components/forms/AppTextField.vue.d.ts +0 -13
  104. package/dist/components/forms/AppTextarea.d.vue.ts +0 -13
  105. package/dist/components/forms/AppTextarea.vue +0 -69
  106. package/dist/components/forms/AppTextarea.vue.d.ts +0 -13
  107. package/dist/components/forms/AttachmentCropperInput.d.vue.ts +0 -18
  108. package/dist/components/forms/AttachmentCropperInput.vue +0 -227
  109. package/dist/components/forms/AttachmentCropperInput.vue.d.ts +0 -18
  110. package/dist/components/forms/AttachmentInput.d.vue.ts +0 -16
  111. package/dist/components/forms/AttachmentInput.vue +0 -116
  112. package/dist/components/forms/AttachmentInput.vue.d.ts +0 -16
  113. package/dist/components/forms/AutocompleteInput.d.vue.ts +0 -84
  114. package/dist/components/forms/AutocompleteInput.vue +0 -760
  115. package/dist/components/forms/AutocompleteInput.vue.d.ts +0 -84
  116. package/dist/components/forms/BankSelect.d.vue.ts +0 -21
  117. package/dist/components/forms/BankSelect.vue +0 -43
  118. package/dist/components/forms/BankSelect.vue.d.ts +0 -21
  119. package/dist/components/forms/BaseButton.d.vue.ts +0 -20
  120. package/dist/components/forms/BaseButton.vue +0 -42
  121. package/dist/components/forms/BaseButton.vue.d.ts +0 -20
  122. package/dist/components/forms/CounterInput.d.vue.ts +0 -13
  123. package/dist/components/forms/CounterInput.vue +0 -71
  124. package/dist/components/forms/CounterInput.vue.d.ts +0 -13
  125. package/dist/components/forms/CustomCheckboxes.d.vue.ts +0 -25
  126. package/dist/components/forms/CustomCheckboxes.vue +0 -69
  127. package/dist/components/forms/CustomCheckboxes.vue.d.ts +0 -25
  128. package/dist/components/forms/CustomCheckboxesWithIcon.d.vue.ts +0 -25
  129. package/dist/components/forms/CustomCheckboxesWithIcon.vue +0 -80
  130. package/dist/components/forms/CustomCheckboxesWithIcon.vue.d.ts +0 -25
  131. package/dist/components/forms/CustomCheckboxesWithImage.d.vue.ts +0 -16
  132. package/dist/components/forms/CustomCheckboxesWithImage.vue +0 -67
  133. package/dist/components/forms/CustomCheckboxesWithImage.vue.d.ts +0 -16
  134. package/dist/components/forms/CustomRadios.d.vue.ts +0 -25
  135. package/dist/components/forms/CustomRadios.vue +0 -69
  136. package/dist/components/forms/CustomRadios.vue.d.ts +0 -25
  137. package/dist/components/forms/CustomRadiosWithIcon.d.vue.ts +0 -28
  138. package/dist/components/forms/CustomRadiosWithIcon.vue +0 -98
  139. package/dist/components/forms/CustomRadiosWithIcon.vue.d.ts +0 -28
  140. package/dist/components/forms/CustomRadiosWithImage.d.vue.ts +0 -35
  141. package/dist/components/forms/CustomRadiosWithImage.vue +0 -69
  142. package/dist/components/forms/CustomRadiosWithImage.vue.d.ts +0 -35
  143. package/dist/components/forms/DatePicker.d.vue.ts +0 -29
  144. package/dist/components/forms/DatePicker.vue +0 -400
  145. package/dist/components/forms/DatePicker.vue.d.ts +0 -29
  146. package/dist/components/forms/DatePickerRange.d.vue.ts +0 -24
  147. package/dist/components/forms/DatePickerRange.vue +0 -127
  148. package/dist/components/forms/DatePickerRange.vue.d.ts +0 -24
  149. package/dist/components/forms/DraggedUploadFile.d.vue.ts +0 -11
  150. package/dist/components/forms/DraggedUploadFile.vue +0 -120
  151. package/dist/components/forms/DraggedUploadFile.vue.d.ts +0 -11
  152. package/dist/components/forms/ImageCardInput.d.vue.ts +0 -35
  153. package/dist/components/forms/ImageCardInput.vue +0 -234
  154. package/dist/components/forms/ImageCardInput.vue.d.ts +0 -35
  155. package/dist/components/forms/InputValidationWrapper.d.vue.ts +0 -26
  156. package/dist/components/forms/InputValidationWrapper.vue +0 -24
  157. package/dist/components/forms/InputValidationWrapper.vue.d.ts +0 -26
  158. package/dist/components/forms/LicensePlateInput.d.vue.ts +0 -21
  159. package/dist/components/forms/LicensePlateInput.vue +0 -175
  160. package/dist/components/forms/LicensePlateInput.vue.d.ts +0 -21
  161. package/dist/components/forms/ManualDate.d.vue.ts +0 -20
  162. package/dist/components/forms/ManualDate.vue +0 -264
  163. package/dist/components/forms/ManualDate.vue.d.ts +0 -20
  164. package/dist/components/forms/MobileInput.d.vue.ts +0 -25
  165. package/dist/components/forms/MobileInput.vue +0 -118
  166. package/dist/components/forms/MobileInput.vue.d.ts +0 -25
  167. package/dist/components/forms/PasswordInput.d.vue.ts +0 -11
  168. package/dist/components/forms/PasswordInput.vue +0 -29
  169. package/dist/components/forms/PasswordInput.vue.d.ts +0 -11
  170. package/dist/components/forms/RangeInput.d.vue.ts +0 -10
  171. package/dist/components/forms/RangeInput.vue +0 -48
  172. package/dist/components/forms/RangeInput.vue.d.ts +0 -10
  173. package/dist/components/forms/Tabs.d.vue.ts +0 -23
  174. package/dist/components/forms/Tabs.vue +0 -35
  175. package/dist/components/forms/Tabs.vue.d.ts +0 -23
  176. package/dist/components/forms/TimePicker.d.vue.ts +0 -18
  177. package/dist/components/forms/TimePicker.vue +0 -370
  178. package/dist/components/forms/TimePicker.vue.d.ts +0 -18
  179. package/dist/components/table/DataTable.d.vue.ts +0 -70
  180. package/dist/components/table/DataTable.vue +0 -361
  181. package/dist/components/table/DataTable.vue.d.ts +0 -70
  182. package/dist/components/table/EditableDataTable.d.vue.ts +0 -21
  183. package/dist/components/table/EditableDataTable.vue +0 -330
  184. package/dist/components/table/EditableDataTable.vue.d.ts +0 -21
  185. package/dist/components/table/EditableDataTableRow.d.vue.ts +0 -20
  186. package/dist/components/table/EditableDataTableRow.vue +0 -253
  187. package/dist/components/table/EditableDataTableRow.vue.d.ts +0 -20
  188. package/dist/components/table/FilterGenerator.d.vue.ts +0 -13
  189. package/dist/components/table/FilterGenerator.vue +0 -231
  190. package/dist/components/table/FilterGenerator.vue.d.ts +0 -13
  191. package/dist/components/table/StaticTable.d.vue.ts +0 -34
  192. package/dist/components/table/StaticTable.vue +0 -152
  193. package/dist/components/table/StaticTable.vue.d.ts +0 -34
  194. package/dist/components/table/TablePagination.d.vue.ts +0 -15
  195. package/dist/components/table/TablePagination.vue +0 -73
  196. package/dist/components/table/TablePagination.vue.d.ts +0 -15
  197. package/dist/composables/useIsMobile.d.ts +0 -1
  198. package/dist/composables/useIsMobile.js +0 -10
  199. package/dist/composables/useIsMobile.mjs +0 -4
  200. package/dist/composables/useTableFilters.d.ts +0 -23
  201. package/dist/composables/useTableFilters.js +0 -197
  202. package/dist/composables/useTableFilters.mjs +0 -184
  203. package/dist/images/avatar.png +0 -0
  204. package/dist/images/sa.svg +0 -1
  205. package/dist/index.d.ts +0 -65
  206. package/dist/index.js +0 -454
  207. package/dist/index.mjs +0 -130
  208. package/dist/lang/ar.json +0 -54
  209. package/dist/lang/en.json +0 -54
  210. package/dist/styles/assets/scss/variables/_template.scss +0 -1
  211. package/dist/styles/assets/scss/variables/_vuetify.scss +0 -1
  212. package/dist/styles/core/base/_components.scss +0 -164
  213. package/dist/styles/core/base/_dark.scss +0 -16
  214. package/dist/styles/core/base/_default-layout-w-vertical-nav.scss +0 -106
  215. package/dist/styles/core/base/_default-layout.scss +0 -16
  216. package/dist/styles/core/base/_index.scss +0 -47
  217. package/dist/styles/core/base/_layouts.scss +0 -63
  218. package/dist/styles/core/base/_misc.scss +0 -20
  219. package/dist/styles/core/base/_mixins.scss +0 -84
  220. package/dist/styles/core/base/_route-transitions.scss +0 -70
  221. package/dist/styles/core/base/_utilities.scss +0 -418
  222. package/dist/styles/core/base/_utils.scss +0 -100
  223. package/dist/styles/core/base/_variables.scss +0 -190
  224. package/dist/styles/core/base/_vertical-nav.scss +0 -264
  225. package/dist/styles/core/base/libs/_perfect-scrollbar.scss +0 -35
  226. package/dist/styles/core/base/libs/vuetify/_index.scss +0 -1
  227. package/dist/styles/core/base/libs/vuetify/_overrides.scss +0 -380
  228. package/dist/styles/core/base/libs/vuetify/_variables.scss +0 -48
  229. package/dist/styles/core/base/placeholders/_default-layout-vertical-nav.scss +0 -48
  230. package/dist/styles/core/base/placeholders/_default-layout.scss +0 -3
  231. package/dist/styles/core/base/placeholders/_index.scss +0 -5
  232. package/dist/styles/core/base/placeholders/_misc.scss +0 -7
  233. package/dist/styles/core/base/placeholders/_nav.scss +0 -26
  234. package/dist/styles/core/base/placeholders/_vertical-nav.scss +0 -84
  235. package/dist/styles/core/base/skins/_bordered.scss +0 -60
  236. package/dist/styles/core/base/skins/_index.scss +0 -1
  237. package/dist/styles/core/template/_components.scss +0 -1035
  238. package/dist/styles/core/template/_default-layout-w-vertical-nav.scss +0 -20
  239. package/dist/styles/core/template/_utilities.scss +0 -20
  240. package/dist/styles/core/template/_variables.scss +0 -67
  241. package/dist/styles/core/template/_vertical-nav.scss +0 -41
  242. package/dist/styles/core/template/index.css +0 -18779
  243. package/dist/styles/core/template/index.scss +0 -15
  244. package/dist/styles/core/template/libs/vuetify/_variables.scss +0 -464
  245. package/dist/styles/core/template/libs/vuetify/index.css +0 -739
  246. package/dist/styles/core/template/libs/vuetify/index.scss +0 -1
  247. package/dist/styles/core/template/pages/misc.css +0 -16
  248. package/dist/styles/core/template/pages/misc.scss +0 -20
  249. package/dist/styles/core/template/placeholders/_default-layout-vertical-nav.scss +0 -9
  250. package/dist/styles/core/template/placeholders/_index.scss +0 -3
  251. package/dist/styles/core/template/placeholders/_nav.scss +0 -15
  252. package/dist/styles/core/template/placeholders/_vertical-nav.scss +0 -18
  253. package/dist/styles/core/template/skins/_bordered.scss +0 -36
  254. package/dist/styles/core/template/skins/_index.scss +0 -1
  255. package/dist/styles/layouts/_classes.scss +0 -3
  256. package/dist/styles/layouts/_dashboard-layout.scss +0 -43
  257. package/dist/styles/layouts/_global.scss +0 -10
  258. package/dist/styles/layouts/_mixins.scss +0 -28
  259. package/dist/styles/layouts/_placeholders.scss +0 -53
  260. package/dist/styles/layouts/_rtl.scss +0 -7
  261. package/dist/styles/layouts/_variables.scss +0 -22
  262. package/dist/styles/layouts/index.css +0 -14
  263. package/dist/styles/layouts/index.scss +0 -2
  264. package/dist/types.d.ts +0 -218
  265. package/dist/utils/apiUrl.d.ts +0 -1
  266. package/dist/utils/apiUrl.js +0 -15
  267. package/dist/utils/apiUrl.mjs +0 -8
  268. package/dist/utils/client.d.ts +0 -9
  269. package/dist/utils/client.js +0 -53
  270. package/dist/utils/client.mjs +0 -39
  271. package/dist/utils/files.d.ts +0 -2
  272. package/dist/utils/files.js +0 -35
  273. package/dist/utils/files.mjs +0 -22
  274. package/dist/utils/formValidation.d.ts +0 -7
  275. package/dist/utils/formValidation.js +0 -20
  276. package/dist/utils/formValidation.mjs +0 -13
  277. package/dist/utils/formatters.d.ts +0 -12
  278. package/dist/utils/formatters.js +0 -84
  279. package/dist/utils/formatters.mjs +0 -56
  280. package/dist/utils/hijriDate.d.ts +0 -58
  281. package/dist/utils/hijriDate.js +0 -168
  282. package/dist/utils/hijriDate.mjs +0 -1951
  283. package/dist/utils/i18n.d.ts +0 -8
  284. package/dist/utils/i18n.js +0 -36
  285. package/dist/utils/i18n.mjs +0 -27
  286. package/dist/utils/index.d.ts +0 -10
  287. package/dist/utils/index.js +0 -115
  288. package/dist/utils/index.mjs +0 -10
  289. package/dist/utils/queryParams.d.ts +0 -4
  290. package/dist/utils/queryParams.js +0 -26
  291. package/dist/utils/queryParams.mjs +0 -18
  292. package/dist/utils/ruleValidator.d.ts +0 -41
  293. package/dist/utils/ruleValidator.js +0 -210
  294. package/dist/utils/ruleValidator.mjs +0 -195
  295. package/dist/utils/toaster.d.ts +0 -12
  296. package/dist/utils/toaster.js +0 -68
  297. package/dist/utils/toaster.mjs +0 -58
  298. package/dist/utils/utils.d.ts +0 -9
  299. package/dist/utils/utils.js +0 -84
  300. package/dist/utils/utils.mjs +0 -67
@@ -1,8 +0,0 @@
1
- export declare const i18n: () => import("vue-i18n").I18n<{
2
- en: any;
3
- ar: any;
4
- }, {}, {}, string, false>;
5
- export declare const createI18nInstance: (messages: object) => import("vue-i18n").I18n<{
6
- en: any;
7
- ar: any;
8
- }, {}, {}, string, false>;
@@ -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;
@@ -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
- };
@@ -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';
@@ -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
- });
@@ -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;