@mythpe/quasar-ui-qui 0.0.22-dev → 0.0.23-dev
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/src/index.ts +19 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/vee-rules.ts +31 -0
package/package.json
CHANGED
package/src/index.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
|
|
3
|
+
* Email: mythpe@gmail.com
|
|
4
|
+
* Mobile: +966590470092
|
|
5
|
+
* Website: https://www.4myth.com
|
|
6
|
+
* Github: https://github.com/mythpe
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import * as composable from './composable'
|
|
10
|
+
import * as utils from './utils'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
...composable,
|
|
14
|
+
...utils
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export * from './components'
|
|
18
|
+
export * from './composable'
|
|
19
|
+
export * from './utils'
|
package/src/utils/index.ts
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
|
|
3
|
+
* Email: mythpe@gmail.com
|
|
4
|
+
* Mobile: +966590470092
|
|
5
|
+
* Website: https://www.4myth.com
|
|
6
|
+
* Github: https://github.com/mythpe
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import lodash from 'lodash'
|
|
10
|
+
import { patterns } from 'quasar'
|
|
11
|
+
|
|
12
|
+
const { testPattern } = patterns
|
|
13
|
+
|
|
14
|
+
export const veeRules = {
|
|
15
|
+
float: (v: any) => lodash.isNumber(parseInt(v)) && !isNaN(parseInt(v)) && v?.toString().split('.')?.length <= 2 && (/(\d)+/g.test(v) && !/[a-zA-Z]/.test(
|
|
16
|
+
v)),
|
|
17
|
+
date: (v: any) => /^-?[\d]+-[0-1]\d-[0-3]\d$/.test(v),
|
|
18
|
+
time: (v: any) => testPattern.time(v),
|
|
19
|
+
fulltime: (v: any) => testPattern.fulltime(v),
|
|
20
|
+
timeOrFulltime: (v: any) => testPattern.timeOrFulltime(v),
|
|
21
|
+
hexColor: (v: any) => testPattern.hexColor(v),
|
|
22
|
+
hexaColor: (v: any) => testPattern.hexaColor(v),
|
|
23
|
+
hexOrHexaColor: (v: any) => testPattern.hexOrHexaColor(v),
|
|
24
|
+
rgbColor: (v: any) => testPattern.rgbColor(v),
|
|
25
|
+
rgbaColor: (v: any) => testPattern.rgbaColor(v),
|
|
26
|
+
rgbOrRgbaColor: (v: any) => testPattern.rgbOrRgbaColor(v),
|
|
27
|
+
hexOrRgbColor: (v: any) => testPattern.hexOrRgbColor(v),
|
|
28
|
+
hexaOrRgbaColor: (v: any) => testPattern.hexaOrRgbaColor(v),
|
|
29
|
+
color: (v: any) => !v ? !0 : testPattern.anyColor(v),
|
|
30
|
+
requiredColor: (v: any) => testPattern.anyColor(v)
|
|
31
|
+
}
|