@piveau/dpi 0.2.0-alpha.66 → 0.2.0-alpha.67
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/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue2.js +39 -56
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +94 -108
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +245 -250
- package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +87 -97
- package/dist/packages/dpi/src/data-provider-interface/components/PublisherPage.vue.js +105 -115
- package/dist/packages/dpi/src/data-provider-interface/composables/useOrganizationInfo.js +61 -30
- package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +342 -342
- package/package.json +1 -1
|
@@ -1,159 +1,149 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { PhWarning as
|
|
3
|
-
import { useOrganizationInfo as
|
|
4
|
-
import { useTwinbyUser as
|
|
1
|
+
import { ref as v, computed as T, watch as F, createElementBlock as u, openBlock as d, createElementVNode as o, createCommentVNode as h, toDisplayString as c, createVNode as f, Fragment as I, renderList as L, unref as g } from "vue";
|
|
2
|
+
import { PhWarning as b } from "@phosphor-icons/vue";
|
|
3
|
+
import { useOrganizationInfo as K } from "../composables/useOrganizationInfo.js";
|
|
4
|
+
import { useTwinbyUser as N } from "../composables/useTwinbyUser.js";
|
|
5
5
|
import V from "../HappyFlowComponents/ui/InputField.vue.js";
|
|
6
|
-
import
|
|
6
|
+
import j from "../HappyFlowComponents/ui/TextButtonSmall.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import { useEditModeInfo as
|
|
10
|
-
const
|
|
8
|
+
import A from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
import { useEditModeInfo as M } from "../composables/useDpiEditMode.js";
|
|
10
|
+
const q = { class: "dpiV3InnerComponentWrap" }, G = { class: "copy-large-regular" }, H = { class: "dpiV3AutoCompleteWrap" }, J = { class: "firstRow" }, Q = { class: "secondRow" }, X = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "copy-small-regular"
|
|
13
|
-
},
|
|
13
|
+
}, Y = {
|
|
14
14
|
key: 2,
|
|
15
15
|
class: "copy-small-regular"
|
|
16
|
-
},
|
|
16
|
+
}, Z = { class: "input-container" }, ee = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "dpiV3_errormsgWrapper"
|
|
19
|
-
},
|
|
19
|
+
}, ae = { class: "copy-mini-regular" }, le = { class: "input-container" }, te = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "dpiV3_errormsgWrapper"
|
|
22
|
-
},
|
|
22
|
+
}, se = { class: "copy-mini-regular" }, oe = { class: "input-container" }, ie = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "dpiV3_errormsgWrapper"
|
|
25
|
-
},
|
|
25
|
+
}, ne = { class: "copy-mini-regular" }, re = { class: "copy-large-regular" }, ue = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "form-error-message"
|
|
28
|
-
},
|
|
28
|
+
}, de = {
|
|
29
29
|
__name: "PublisherPage",
|
|
30
30
|
props: {
|
|
31
31
|
context: Object
|
|
32
32
|
},
|
|
33
33
|
setup(B) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const {
|
|
37
|
-
id:
|
|
38
|
-
authToken:
|
|
34
|
+
const w = B, { isEditMode: W } = M(), { organization: E, authToken: P, startFetchPermissions: R } = N();
|
|
35
|
+
R();
|
|
36
|
+
const { organizationDisplay: p, isLoading: S, isFetching: O } = K({
|
|
37
|
+
id: E,
|
|
38
|
+
authToken: P
|
|
39
39
|
});
|
|
40
|
-
let s =
|
|
41
|
-
const _ =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return {};
|
|
46
|
-
const a = {
|
|
47
|
-
organization: e.name || ((o = w.value) == null ? void 0 : o.title) || ((D = w.value) == null ? void 0 : D.id)
|
|
48
|
-
};
|
|
49
|
-
if (e.email && (a.email = e.email), e.homepage) {
|
|
50
|
-
const I = e.homepage.startsWith("http") ? e.homepage : `https://${e.homepage}`;
|
|
51
|
-
a.website = I;
|
|
52
|
-
}
|
|
53
|
-
return a;
|
|
54
|
-
}), n = m([
|
|
40
|
+
let s = v({ 1: !1, 2: !1, 3: !1 });
|
|
41
|
+
const _ = v(null), y = v(null), z = T(() => S.value || O.value), r = T(() => {
|
|
42
|
+
const e = {};
|
|
43
|
+
return p.value.title && (e.organization = p.value.title), p.value.email && (e.email = p.value.email), p.value.homepage && (e.website = p.value.homepage), e;
|
|
44
|
+
}), i = v([
|
|
55
45
|
{ isValid: "unset", "foaf:name": "", "foaf:mbox": "", "foaf:homepage": "" }
|
|
56
|
-
]),
|
|
46
|
+
]), t = v({
|
|
57
47
|
1: { show: !1, message: "Bitte geben Sie einen gültigen Organisationsnamen ein." },
|
|
58
48
|
2: { show: !1, message: "Bitte geben Sie eine gültige E-Mail-Adresse ein." },
|
|
59
49
|
3: { show: !1, message: "Bitte geben Sie eine gültige URL ein." }
|
|
60
50
|
});
|
|
61
|
-
function
|
|
51
|
+
function x(e) {
|
|
62
52
|
return e.trim().length >= 2;
|
|
63
53
|
}
|
|
64
|
-
function
|
|
54
|
+
function $(e) {
|
|
65
55
|
return /^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e);
|
|
66
56
|
}
|
|
67
|
-
function
|
|
57
|
+
function D(e) {
|
|
68
58
|
return /^([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i.test(e);
|
|
69
59
|
}
|
|
70
|
-
|
|
71
|
-
function k(e, a,
|
|
72
|
-
let
|
|
60
|
+
W.value || w.context.node.input(i);
|
|
61
|
+
function k(e, a, l) {
|
|
62
|
+
let n = !1;
|
|
73
63
|
if (e.trim() === "")
|
|
74
|
-
|
|
64
|
+
t.value[l].show = !1, s.value[l] = !1;
|
|
75
65
|
else {
|
|
76
66
|
switch (a) {
|
|
77
67
|
case "foaf:name":
|
|
78
|
-
|
|
68
|
+
n = x(e);
|
|
79
69
|
break;
|
|
80
70
|
case "foaf:mbox":
|
|
81
|
-
|
|
71
|
+
n = $(e);
|
|
82
72
|
break;
|
|
83
73
|
case "foaf:homepage":
|
|
84
|
-
|
|
74
|
+
n = D(e);
|
|
85
75
|
break;
|
|
86
76
|
default:
|
|
87
|
-
|
|
77
|
+
n = e.trim() !== "";
|
|
88
78
|
}
|
|
89
|
-
|
|
79
|
+
t.value[l].show = !n, s.value[l] = n;
|
|
90
80
|
}
|
|
91
|
-
s.value[1] && s.value[2] && s.value[3] ?
|
|
81
|
+
s.value[1] && s.value[2] && s.value[3] ? i.value[0].isValid = !0 : i.value[0].isValid = "unset";
|
|
92
82
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
k(e, a,
|
|
96
|
-
}, 800)) :
|
|
97
|
-
k(e, a,
|
|
98
|
-
}, 800)) : k(e, a,
|
|
83
|
+
function m(e, a, l) {
|
|
84
|
+
i.value = i.value.map((n) => a in n ? { ...n, [a]: e } : n), w.context.node.value.length === 0 && w.context.node.input(i.value), l === 2 ? (_.value && clearTimeout(_.value), _.value = setTimeout(() => {
|
|
85
|
+
k(e, a, l);
|
|
86
|
+
}, 800)) : l === 3 ? (y.value && clearTimeout(y.value), y.value = setTimeout(() => {
|
|
87
|
+
k(e, a, l);
|
|
88
|
+
}, 800)) : k(e, a, l);
|
|
99
89
|
}
|
|
100
|
-
function
|
|
101
|
-
const e =
|
|
90
|
+
function U() {
|
|
91
|
+
const e = i.value[0];
|
|
102
92
|
if (e["foaf:name"].trim() === "")
|
|
103
|
-
|
|
93
|
+
t.value[1].show = !0, s.value[1] = !1;
|
|
104
94
|
else {
|
|
105
|
-
const a =
|
|
106
|
-
|
|
95
|
+
const a = x(e["foaf:name"]);
|
|
96
|
+
t.value[1].show = !a, s.value[1] = a;
|
|
107
97
|
}
|
|
108
98
|
if (e["foaf:mbox"].trim() === "")
|
|
109
|
-
|
|
99
|
+
t.value[2].show = !0, s.value[2] = !1;
|
|
110
100
|
else {
|
|
111
|
-
const a =
|
|
112
|
-
|
|
101
|
+
const a = $(e["foaf:mbox"]);
|
|
102
|
+
t.value[2].show = !a, s.value[2] = a;
|
|
113
103
|
}
|
|
114
104
|
if (e["foaf:homepage"].trim() === "")
|
|
115
|
-
|
|
105
|
+
t.value[3].show = !0, s.value[3] = !1;
|
|
116
106
|
else {
|
|
117
|
-
const a =
|
|
118
|
-
|
|
107
|
+
const a = D(e["foaf:homepage"]);
|
|
108
|
+
t.value[3].show = !a, s.value[3] = a;
|
|
119
109
|
}
|
|
120
|
-
s.value[1] && s.value[2] && s.value[3] ?
|
|
110
|
+
s.value[1] && s.value[2] && s.value[3] ? i.value[0].isValid = !0 : i.value[0].isValid = !1, console.log("Validation states:", s.value), console.log("Validation errors:", t.value);
|
|
121
111
|
}
|
|
122
|
-
|
|
123
|
-
console.log("Overall validity changed:", e), e === !1 &&
|
|
112
|
+
F(() => i.value[0].isValid, (e) => {
|
|
113
|
+
console.log("Overall validity changed:", e), e === !1 && U();
|
|
124
114
|
});
|
|
125
|
-
function
|
|
126
|
-
if (r.value && (r.value.organization &&
|
|
115
|
+
function C() {
|
|
116
|
+
if (r.value && (r.value.organization && m(r.value.organization, "foaf:name", 1), r.value.email && m(r.value.email, "foaf:mbox", 2), r.value.website)) {
|
|
127
117
|
let e = r.value.website;
|
|
128
|
-
e.startsWith("https://") ? e = e.substring(8) : e.startsWith("http://") && (e = e.substring(7)),
|
|
118
|
+
e.startsWith("https://") ? e = e.substring(8) : e.startsWith("http://") && (e = e.substring(7)), m(e, "foaf:homepage", 3);
|
|
129
119
|
}
|
|
130
120
|
}
|
|
131
|
-
return (e, a) => (d(), u("div",
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
a[3] || (a[3] =
|
|
137
|
-
|
|
121
|
+
return (e, a) => (d(), u("div", q, [
|
|
122
|
+
o("h4", null, c(e.$t("message.dataupload.datasets.dct:publisher.title")), 1),
|
|
123
|
+
o("div", G, c(e.$t("message.dataupload.datasets.dct:publisher.description")), 1),
|
|
124
|
+
o("div", H, [
|
|
125
|
+
o("div", J, [
|
|
126
|
+
a[3] || (a[3] = o("div", null, [
|
|
127
|
+
o("span", { class: "copy-small-semi-bold" }, "Konto")
|
|
138
128
|
], -1)),
|
|
139
|
-
f(
|
|
129
|
+
f(j, {
|
|
140
130
|
"button-text": "Diese Details verwenden",
|
|
141
131
|
"icon-start": "true",
|
|
142
132
|
"icon-name": "copy",
|
|
143
133
|
disabled: z.value || Object.keys(r.value).length === 0,
|
|
144
|
-
onClick:
|
|
134
|
+
onClick: C
|
|
145
135
|
}, null, 8, ["disabled"])
|
|
146
136
|
]),
|
|
147
|
-
|
|
148
|
-
z.value ? (d(), u("span",
|
|
149
|
-
key:
|
|
137
|
+
o("div", Q, [
|
|
138
|
+
z.value ? (d(), u("span", X, "Lade Kontodaten...")) : Object.keys(r.value).length > 0 ? (d(!0), u(I, { key: 1 }, L(r.value, (l, n) => (d(), u("span", {
|
|
139
|
+
key: n,
|
|
150
140
|
class: "copy-small-regular"
|
|
151
|
-
},
|
|
141
|
+
}, c(l), 1))), 128)) : (d(), u("span", Y, "Keine Kontodaten verfügbar"))
|
|
152
142
|
])
|
|
153
143
|
]),
|
|
154
|
-
|
|
144
|
+
o("div", Z, [
|
|
155
145
|
f(V, {
|
|
156
|
-
"model-value":
|
|
146
|
+
"model-value": i.value[0]["foaf:name"],
|
|
157
147
|
"add-on-text": !1,
|
|
158
148
|
"date-picker": !1,
|
|
159
149
|
"info-icon": !1,
|
|
@@ -163,20 +153,20 @@ const H = { class: "dpiV3InnerComponentWrap" }, J = { class: "copy-large-regular
|
|
|
163
153
|
"initial-hint-text": !1,
|
|
164
154
|
label: e.$t("message.dataupload.datasets.dct:publisher.nameInput.title"),
|
|
165
155
|
"show-end-icon": !1,
|
|
166
|
-
"show-error":
|
|
167
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
156
|
+
"show-error": t.value[1].show,
|
|
157
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => m(l, "foaf:name", 1))
|
|
168
158
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
169
|
-
|
|
170
|
-
f(
|
|
159
|
+
t.value[1].show ? (d(), u("div", ee, [
|
|
160
|
+
f(g(b), {
|
|
171
161
|
size: 16,
|
|
172
162
|
weight: "fill"
|
|
173
163
|
}),
|
|
174
|
-
|
|
175
|
-
])) :
|
|
164
|
+
o("span", ae, c(t.value[1].message), 1)
|
|
165
|
+
])) : h("", !0)
|
|
176
166
|
]),
|
|
177
|
-
|
|
167
|
+
o("div", le, [
|
|
178
168
|
f(V, {
|
|
179
|
-
"model-value":
|
|
169
|
+
"model-value": i.value[0]["foaf:mbox"],
|
|
180
170
|
"add-on-text": !1,
|
|
181
171
|
"date-picker": !1,
|
|
182
172
|
"info-icon": !1,
|
|
@@ -184,22 +174,22 @@ const H = { class: "dpiV3InnerComponentWrap" }, J = { class: "copy-large-regular
|
|
|
184
174
|
"pre-icon": !1,
|
|
185
175
|
"input-field-size": "large",
|
|
186
176
|
"initial-hint-text": !1,
|
|
187
|
-
"show-error":
|
|
177
|
+
"show-error": t.value[2].show,
|
|
188
178
|
label: e.$t("message.dataupload.datasets.dct:publisher.mailInput.title"),
|
|
189
179
|
"show-end-icon": !1,
|
|
190
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
180
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => m(l, "foaf:mbox", 2))
|
|
191
181
|
}, null, 8, ["model-value", "placeholder", "show-error", "label"]),
|
|
192
|
-
|
|
193
|
-
f(
|
|
182
|
+
t.value[2].show ? (d(), u("div", te, [
|
|
183
|
+
f(g(b), {
|
|
194
184
|
size: 16,
|
|
195
185
|
weight: "fill"
|
|
196
186
|
}),
|
|
197
|
-
|
|
198
|
-
])) :
|
|
187
|
+
o("span", se, c(t.value[2].message), 1)
|
|
188
|
+
])) : h("", !0)
|
|
199
189
|
]),
|
|
200
|
-
|
|
190
|
+
o("div", oe, [
|
|
201
191
|
f(V, {
|
|
202
|
-
"model-value":
|
|
192
|
+
"model-value": i.value[0]["foaf:homepage"],
|
|
203
193
|
"add-on-text": !0,
|
|
204
194
|
"date-picker": !1,
|
|
205
195
|
"info-icon": !1,
|
|
@@ -210,28 +200,28 @@ const H = { class: "dpiV3InnerComponentWrap" }, J = { class: "copy-large-regular
|
|
|
210
200
|
"add-on-leading-text": "https://",
|
|
211
201
|
label: e.$t("message.dataupload.datasets.dct:publisher.websiteInput.title"),
|
|
212
202
|
"show-end-icon": !1,
|
|
213
|
-
"show-error":
|
|
214
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
203
|
+
"show-error": t.value[3].show,
|
|
204
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => m(l, "foaf:homepage", 3))
|
|
215
205
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
216
|
-
|
|
217
|
-
f(
|
|
206
|
+
t.value[3].show ? (d(), u("div", ie, [
|
|
207
|
+
f(g(b), {
|
|
218
208
|
size: 16,
|
|
219
209
|
weight: "fill"
|
|
220
210
|
}),
|
|
221
|
-
|
|
222
|
-
])) :
|
|
211
|
+
o("span", ne, c(t.value[3].message), 1)
|
|
212
|
+
])) : h("", !0)
|
|
223
213
|
]),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
f(
|
|
214
|
+
o("div", re, c(e.$t("message.dataupload.datasets.dct:publisher.descriptionBottom")), 1),
|
|
215
|
+
i.value.find((l) => l.isValid === !1) ? (d(), u("div", ue, [
|
|
216
|
+
f(g(b), {
|
|
227
217
|
size: 16,
|
|
228
218
|
weight: "fill"
|
|
229
219
|
}),
|
|
230
|
-
a[4] || (a[4] =
|
|
231
|
-
])) :
|
|
220
|
+
a[4] || (a[4] = o("span", { class: "copy-mini-regular" }, "Bitte füllen Sie alle Pflichtfelder aus, bevor Sie fortfahren.", -1))
|
|
221
|
+
])) : h("", !0)
|
|
232
222
|
]));
|
|
233
223
|
}
|
|
234
|
-
},
|
|
224
|
+
}, _e = /* @__PURE__ */ A(de, [["__scopeId", "data-v-37cc37b6"]]);
|
|
235
225
|
export {
|
|
236
|
-
|
|
226
|
+
_e as default
|
|
237
227
|
};
|
|
@@ -1,48 +1,79 @@
|
|
|
1
|
-
import { defineHubSearch as
|
|
2
|
-
import { computed as
|
|
3
|
-
import
|
|
4
|
-
import { useRuntimeEnv as
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { defineHubSearch as k, getTranslationFor as F } from "@piveau/sdk-vue";
|
|
2
|
+
import { computed as b, toValue as w } from "vue";
|
|
3
|
+
import D from "zod";
|
|
4
|
+
import { useRuntimeEnv as E } from "../../composables/useRuntimeEnv.js";
|
|
5
|
+
function C(s, t) {
|
|
6
|
+
return s ? s.startsWith(t) ? s.substring(t.length) : s : "";
|
|
7
|
+
}
|
|
8
|
+
function H(s) {
|
|
9
|
+
if (!s)
|
|
10
|
+
return "";
|
|
11
|
+
const t = s.endsWith("/") ? s.slice(0, -1) : s;
|
|
12
|
+
return t.startsWith("http") ? t : `https://${t}`;
|
|
13
|
+
}
|
|
14
|
+
function B(s) {
|
|
15
|
+
const t = E(), I = s.baseUrl || t.api.baseUrl || "https://twin.bydata.de/api/hub/search/", R = b(() => !!w(s.id).trim()), { useResource: T } = k({
|
|
16
|
+
baseUrl: I,
|
|
8
17
|
index: "catalogue",
|
|
9
18
|
indexDetails: "catalogues",
|
|
10
|
-
schema:
|
|
19
|
+
schema: D.any()
|
|
11
20
|
}, (e) => {
|
|
12
|
-
var
|
|
13
|
-
const
|
|
14
|
-
name: ((
|
|
15
|
-
email: ((
|
|
16
|
-
|
|
21
|
+
var l, r, u, h, p, i, d, a, c, m, f, y;
|
|
22
|
+
const n = {
|
|
23
|
+
name: ((l = e.publisher) == null ? void 0 : l.name) || "",
|
|
24
|
+
email: C((r = e.publisher) == null ? void 0 : r.email, "mailto:"),
|
|
25
|
+
emailRaw: (u = e.publisher) == null ? void 0 : u.email,
|
|
26
|
+
homepage: ((h = e.publisher) == null ? void 0 : h.homepage) || "",
|
|
27
|
+
phone: C((p = e.publisher) == null ? void 0 : p.phone_number, "tel:"),
|
|
28
|
+
phoneRaw: ((i = e.publisher) == null ? void 0 : i.phone_number) || "",
|
|
17
29
|
address: {
|
|
18
|
-
street: ((
|
|
19
|
-
postalCode: ((
|
|
20
|
-
locality: ((
|
|
30
|
+
street: ((a = (d = e.publisher) == null ? void 0 : d.address) == null ? void 0 : a.street) || "",
|
|
31
|
+
postalCode: ((m = (c = e.publisher) == null ? void 0 : c.address) == null ? void 0 : m.postalCode) || "",
|
|
32
|
+
locality: ((y = (f = e.publisher) == null ? void 0 : f.address) == null ? void 0 : y.locality) || ""
|
|
21
33
|
}
|
|
22
34
|
};
|
|
23
35
|
return {
|
|
24
36
|
id: e.id,
|
|
25
|
-
title:
|
|
26
|
-
description:
|
|
27
|
-
publisher:
|
|
37
|
+
title: F(e.title || "", ["de", "en"]),
|
|
38
|
+
description: F(e.description || "", ["de", "en"]),
|
|
39
|
+
publisher: n,
|
|
28
40
|
catalogueFavIcon: e.catalogueFavIcon || []
|
|
29
41
|
};
|
|
30
|
-
}), { resultEnhanced:
|
|
42
|
+
}), { resultEnhanced: o, isLoading: _, isFetching: x, result: S, isSuccess: U } = T(s.id, {
|
|
31
43
|
queryOptions: {
|
|
32
|
-
enabled:
|
|
44
|
+
enabled: R
|
|
33
45
|
},
|
|
34
|
-
headers: {
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
headers: b(() => {
|
|
47
|
+
const e = w(s.authToken);
|
|
48
|
+
return {
|
|
49
|
+
...e && { Authorization: `Bearer ${e}` }
|
|
50
|
+
};
|
|
51
|
+
})
|
|
52
|
+
}), W = b(() => {
|
|
53
|
+
var n, l, r, u, h, p, i, d, a, c, m;
|
|
54
|
+
const e = o.value;
|
|
55
|
+
return {
|
|
56
|
+
title: ((n = e == null ? void 0 : e.publisher) == null ? void 0 : n.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.id) || "",
|
|
57
|
+
email: ((l = e == null ? void 0 : e.publisher) == null ? void 0 : l.email) || "",
|
|
58
|
+
phone: ((r = e == null ? void 0 : e.publisher) == null ? void 0 : r.phone) || "",
|
|
59
|
+
homepage: H((u = e == null ? void 0 : e.publisher) == null ? void 0 : u.homepage),
|
|
60
|
+
address: {
|
|
61
|
+
street: ((p = (h = e == null ? void 0 : e.publisher) == null ? void 0 : h.address) == null ? void 0 : p.street) || "",
|
|
62
|
+
postalCode: ((d = (i = e == null ? void 0 : e.publisher) == null ? void 0 : i.address) == null ? void 0 : d.postalCode) || "",
|
|
63
|
+
locality: ((c = (a = e == null ? void 0 : e.publisher) == null ? void 0 : a.address) == null ? void 0 : c.locality) || ""
|
|
64
|
+
},
|
|
65
|
+
logo: ((m = e == null ? void 0 : e.catalogueFavIcon) == null ? void 0 : m[0]) || ""
|
|
66
|
+
};
|
|
37
67
|
});
|
|
38
68
|
return {
|
|
39
|
-
resultEnhanced:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
resultEnhanced: o,
|
|
70
|
+
organizationDisplay: W,
|
|
71
|
+
isLoading: _,
|
|
72
|
+
isFetching: x,
|
|
73
|
+
result: S,
|
|
74
|
+
isSuccess: U
|
|
44
75
|
};
|
|
45
76
|
}
|
|
46
77
|
export {
|
|
47
|
-
|
|
78
|
+
B as useOrganizationInfo
|
|
48
79
|
};
|