@oniti/quasar-app-extension-vlank-input 3.1.21 → 4.0.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/package.json +5 -5
- package/src/boot/register.js +10 -20
- package/src/index.js +8 -11
- package/src/component/store/errors/actions.js +0 -0
- package/src/component/store/errors/getters.js +0 -0
- package/src/component/store/errors/index.js +0 -12
- package/src/component/store/errors/mutations.js +0 -7
- package/src/component/store/errors/state.js +0 -5
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oniti/quasar-app-extension-vlank-input",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "A Quasar App Extension",
|
|
5
5
|
"author": "François BOUYER <francois@oniti.fr>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@oniti/quasar-ui-vlank-input": "^
|
|
9
|
+
"@oniti/quasar-ui-vlank-input": "^4.0.0"
|
|
10
10
|
},
|
|
11
11
|
"private": false,
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
17
|
-
"npm": ">=
|
|
18
|
-
"yarn": ">= 1.
|
|
16
|
+
"node": ">= 18.0.0",
|
|
17
|
+
"npm": ">= 9.0.0",
|
|
18
|
+
"yarn": ">= 1.22.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/boot/register.js
CHANGED
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
import errors from "../component/store/errors";
|
|
2
1
|
import { getValue } from "@oniti/oniti-helpers";
|
|
3
|
-
import VlankInput from
|
|
2
|
+
import VlankInput from "@oniti/quasar-ui-vlank-input";
|
|
3
|
+
import { useErrorsStore } from "@oniti/quasar-ui-vlank-input";
|
|
4
4
|
|
|
5
|
-
export default ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* Enregistrement du composant
|
|
10
|
-
*/
|
|
11
|
-
app.component('vlank-input', VlankInput.Component);
|
|
5
|
+
export default ({ app, store }) => {
|
|
6
|
+
const errorsStore = useErrorsStore(store);
|
|
7
|
+
|
|
8
|
+
app.component("vlank-input", VlankInput.Component);
|
|
12
9
|
|
|
13
|
-
/**
|
|
14
|
-
* Intercepteurs Axios
|
|
15
|
-
*/
|
|
16
10
|
if (app.config.globalProperties.$axios) {
|
|
17
11
|
app.config.globalProperties.$axios.interceptors.request.use(
|
|
18
12
|
(config) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
store.commit("errors/RESET_ERRORS", null);
|
|
13
|
+
if (errorsStore.errors) {
|
|
14
|
+
errorsStore.resetErrors();
|
|
22
15
|
}
|
|
23
16
|
return config;
|
|
24
17
|
},
|
|
25
|
-
(error) =>
|
|
26
|
-
return Promise.reject(error);
|
|
27
|
-
}
|
|
18
|
+
(error) => Promise.reject(error)
|
|
28
19
|
);
|
|
29
20
|
app.config.globalProperties.$axios.interceptors.response.use(
|
|
30
21
|
(response) => response,
|
|
31
22
|
(err) => {
|
|
32
23
|
if (err.response) {
|
|
33
24
|
const errors = getValue(err, "response.data.errors");
|
|
34
|
-
|
|
35
25
|
if (err.response.status === 422 && errors) {
|
|
36
|
-
|
|
26
|
+
errorsStore.setErrors(errors);
|
|
37
27
|
}
|
|
38
28
|
}
|
|
39
29
|
return Promise.reject(err);
|
package/src/index.js
CHANGED
|
@@ -3,19 +3,16 @@
|
|
|
3
3
|
* (runs on each dev/build)
|
|
4
4
|
*
|
|
5
5
|
* Docs: https://quasar.dev/app-extensions/development-guide/index-api
|
|
6
|
-
* API: https://github.com/quasarframework/quasar/blob/master/app/lib/app-extension/IndexAPI.js
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
|
-
function extendConf
|
|
10
|
-
|
|
11
|
-
conf.boot.push(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
conf.build.transpileDependencies.push(/quasar-app-extension-vlank-input[\\/]src/)
|
|
8
|
+
function extendConf(conf) {
|
|
9
|
+
conf.boot = conf.boot || [];
|
|
10
|
+
conf.boot.push(
|
|
11
|
+
"~@oniti/quasar-app-extension-vlank-input/src/boot/register.js"
|
|
12
|
+
);
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
module.exports = function (api) {
|
|
18
|
-
api.compatibleWith(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
16
|
+
api.compatibleWith("@quasar/app-vite", "^2.0.0");
|
|
17
|
+
api.extendQuasarConf(extendConf);
|
|
18
|
+
};
|
|
File without changes
|
|
File without changes
|