@piveau/dpi 0.1.0-beta.45 → 0.1.0-beta.46
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/dist/assets/dpi.css +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +39 -37
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +42 -42
- package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +3 -3
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +92 -92
- package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +39 -39
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +16 -16
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +78 -74
- package/dist/data-provider-interface/store/modules/authStore.js +14 -12
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "axios";
|
|
2
2
|
import { cloneDeep as u, get as T } from "lodash-es";
|
|
3
3
|
import i from "../../../utils/draftApi.js";
|
|
4
4
|
import f from "../../../utils/identifiersApi.js";
|
|
@@ -68,14 +68,14 @@ const d = {
|
|
|
68
68
|
e("UPDATE_USER_DATA_PENDING");
|
|
69
69
|
try {
|
|
70
70
|
if (!s) throw new Error("Failed to retrieve RTP token");
|
|
71
|
-
const E = R(s), D = T(E, "authorization.permissions", []),
|
|
71
|
+
const E = R(s), D = T(E, "authorization.permissions", []), o = T(E, "realm_access.roles", []);
|
|
72
72
|
e("SET_USER_DATA", {
|
|
73
73
|
authToken: a,
|
|
74
74
|
rtpToken: s,
|
|
75
75
|
userName: E.preferred_username,
|
|
76
76
|
permissions: D,
|
|
77
77
|
drafts: [],
|
|
78
|
-
roles:
|
|
78
|
+
roles: o
|
|
79
79
|
}), _ = i({ baseURL: r, authToken: s }), A = f({
|
|
80
80
|
baseURL: r,
|
|
81
81
|
authToken: s
|
|
@@ -101,7 +101,7 @@ const d = {
|
|
|
101
101
|
data: t.body
|
|
102
102
|
};
|
|
103
103
|
console.log("############", a);
|
|
104
|
-
const s = await
|
|
104
|
+
const s = await n.request(a);
|
|
105
105
|
(s.status === 201 || s.status === 204) && (e("CHANGE_IS_EDIT_MODE", !1), e("CHANGE_IS_DRAFT", !1));
|
|
106
106
|
},
|
|
107
107
|
/**
|
|
@@ -131,8 +131,8 @@ const d = {
|
|
|
131
131
|
title: r,
|
|
132
132
|
body: E
|
|
133
133
|
}), e("UPDATE_USER_DATA_SUCCESS");
|
|
134
|
-
} catch (
|
|
135
|
-
throw e("UPDATE_USER_DATA_ERROR"),
|
|
134
|
+
} catch (o) {
|
|
135
|
+
throw e("UPDATE_USER_DATA_ERROR"), o;
|
|
136
136
|
}
|
|
137
137
|
return D;
|
|
138
138
|
},
|
|
@@ -150,7 +150,7 @@ const d = {
|
|
|
150
150
|
},
|
|
151
151
|
async publishUserDraftById({ commit: e, state: t }, { id: a, catalog: s, body: r = {} }) {
|
|
152
152
|
if (!_) return {};
|
|
153
|
-
if (!t.userData.drafts.find((
|
|
153
|
+
if (!t.userData.drafts.find((o) => o.id === a)) return {};
|
|
154
154
|
e("UPDATE_USER_DATA_PENDING");
|
|
155
155
|
let D;
|
|
156
156
|
try {
|
|
@@ -158,9 +158,11 @@ const d = {
|
|
|
158
158
|
id: a,
|
|
159
159
|
catalogue: s,
|
|
160
160
|
body: r
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
});
|
|
162
|
+
debugger;
|
|
163
|
+
e("DELETE_USER_DRAFT", a), e("UPDATE_USER_DATA_SUCCESS"), e("CHANGE_IS_DRAFT", !1), e("CHANGE_IS_EDIT_MODE", !1);
|
|
164
|
+
} catch (o) {
|
|
165
|
+
throw console.log("error"), e("UPDATE_USER_DATA_ERROR"), o;
|
|
164
166
|
}
|
|
165
167
|
return D;
|
|
166
168
|
},
|
|
@@ -170,7 +172,7 @@ const d = {
|
|
|
170
172
|
method: "GET",
|
|
171
173
|
url: E + "drafts/datasets/" + a + ".nt?catalogue=" + r
|
|
172
174
|
};
|
|
173
|
-
await
|
|
175
|
+
await n.request(D);
|
|
174
176
|
},
|
|
175
177
|
async publishUserDraft({ dispatch: e }, { id: t, catalog: a, body: s }) {
|
|
176
178
|
return e("publishUserDraftById", { id: t, catalog: a, body: s });
|
|
@@ -224,7 +226,7 @@ const d = {
|
|
|
224
226
|
Authorization: `Bearer ${t.token}`
|
|
225
227
|
},
|
|
226
228
|
data: t.data
|
|
227
|
-
}, s = await
|
|
229
|
+
}, s = await n.request(a);
|
|
228
230
|
if (s.status === 201 | s.status === 204) {
|
|
229
231
|
e("CHANGE_IS_EDIT_MODE", !1), e("CHANGE_IS_DRAFT", !1);
|
|
230
232
|
const r = u(d.userData), E = {
|