@mythpe/quasar-app-extension-qui 0.0.6-dev → 0.0.7-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/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './src/utils/vue-plugin'
2
+ import * as Plugin from './src/utils/vue-plugin'
3
+ export default Plugin
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-app-extension-qui",
3
- "version": "0.0.6-dev",
3
+ "version": "0.0.7-dev",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": "MyTh Ahmed Faiz <mythpe@gmail.com>",
6
6
  "email": "mythpe@gmail.com",
7
7
  "mobile": "+966590470092",
8
8
  "license": "MIT",
9
9
  "type": "module",
10
- "module": "src/index.js",
11
- "main": "src/index.js",
10
+ "module": "index.js",
11
+ "main": "index.js",
12
12
  "scripts": {
13
13
  "lint": "eslint --ext .js,.ts,.vue ./",
14
14
  "lint:fix": "eslint --ext .js,.ts,.vue ./ --fix",
@@ -18,13 +18,13 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "typed.js": "^2.1.0",
21
+ "lodash": "^4.17.21",
21
22
  "vee-validate": "^4.14.0",
22
23
  "@vee-validate/i18n": "^4.14.0",
23
24
  "@vee-validate/rules": "^4.14.0",
24
25
  "vue-i18n": "^10.0.0"
25
26
  },
26
27
  "devDependencies": {
27
- "lodash": "^4.17.21",
28
28
  "@quasar/app-webpack": "^3.13.0",
29
29
  "@quasar/extras": "^1.16.4",
30
30
  "@rollup/plugin-buble": "^0.21.3",
@@ -0,0 +1,30 @@
1
+ import { ref } from 'vue'
2
+ import type { QBtnProps } from 'quasar'
3
+ import { extend } from 'quasar'
4
+ import type { MythContext, UiOptionsContext } from '../types'
5
+
6
+ const defGutters = 'md'
7
+ const defaultOptions: UiOptionsContext = {
8
+ style: {
9
+ gutters: defGutters
10
+ }
11
+ }
12
+ const optionsRef = ref<UiOptionsContext>({ ...defaultOptions })
13
+
14
+ export const myth : MythContext = {
15
+ options: optionsRef,
16
+ setOptions (values: Partial<UiOptionsContext>) {
17
+ optionsRef.value = extend(!0, defaultOptions, values)
18
+ },
19
+ withOptions (values: Partial<UiOptionsContext>) {
20
+ optionsRef.value = extend(!0, defaultOptions, optionsRef.value, values)
21
+ },
22
+ withBtnOptions (values: Partial<QBtnProps>) {
23
+ this.withOptions({
24
+ btn: {
25
+ props: values
26
+ }
27
+ })
28
+ }
29
+ }
30
+ export default myth
@@ -1,5 +1,6 @@
1
- import js from '../../package.json'
2
- import myth from './myth.js'
1
+ import type { App } from 'vue'
2
+ import { name, version } from '../../package.json'
3
+ import { myth } from './myth'
3
4
  import MBtn from '../components/form/MBtn.vue'
4
5
  import MBlock from '../components/grid/MBlock.vue'
5
6
  import MCol from '../components/grid/MCol.vue'
@@ -9,10 +10,7 @@ import MHelpRow from '../components/grid/MHelpRow.vue'
9
10
  import MRow from '../components/grid/MRow.vue'
10
11
  import MTypingString from '../components/typography/MTypingString.vue'
11
12
 
12
- const name = js.name
13
- const version = js.version
14
-
15
- function install (app, options = {}) {
13
+ function install (app: App, options = {}) {
16
14
  myth.withOptions(options)
17
15
 
18
16
  // Form.
@@ -30,11 +28,16 @@ function install (app, options = {}) {
30
28
  app.component('MTypingString', MTypingString)
31
29
  }
32
30
 
33
- export const e = {
31
+ export {
34
32
  name,
35
33
  version,
36
34
  install,
37
35
  myth
38
36
  }
39
37
 
40
- export default e
38
+ export default {
39
+ name,
40
+ version,
41
+ install,
42
+ myth
43
+ }
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "baseUrl": "./src",
4
- "rootDir": "./src",
3
+ "baseUrl": ".",
4
+ "rootDir": ".",
5
5
  "outDir": "dist",
6
6
  "esModuleInterop": true,
7
7
  "skipLibCheck": true,
package/src/utils/myth.js DELETED
@@ -1,28 +0,0 @@
1
- import { ref } from 'vue'
2
- import { extend } from 'quasar'
3
-
4
- const defGutters = 'md'
5
- const defaultOptions = {
6
- style: {
7
- gutters: defGutters
8
- }
9
- }
10
- const optionsRef = ref({ ...defaultOptions })
11
-
12
- export const myth = {
13
- options: optionsRef,
14
- setOptions (values) {
15
- optionsRef.value = extend(!0, defaultOptions, values)
16
- },
17
- withOptions (values) {
18
- optionsRef.value = extend(!0, defaultOptions, optionsRef.value, values)
19
- },
20
- withBtnOptions (values) {
21
- this.withOptions({
22
- btn: {
23
- props: values
24
- }
25
- })
26
- }
27
- }
28
- export default myth
File without changes