@piveau/dpi 0.1.0-beta.5
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/dpi.css +1 -0
- package/dist/composables/useRuntimeEnv.js +11 -0
- package/dist/composables/useTed.js +9 -0
- package/dist/data-provider-interface/DPIMenu.vue.js +457 -0
- package/dist/data-provider-interface/DataProviderInterface.vue.js +43 -0
- package/dist/data-provider-interface/DataProviderInterface.vue2.js +144 -0
- package/dist/data-provider-interface/HappyFlowComponents/BlogDPIHome.vue.js +13 -0
- package/dist/data-provider-interface/HappyFlowComponents/CommunityDPI.vue.js +11 -0
- package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1052 -0
- package/dist/data-provider-interface/HappyFlowComponents/ConsultingDPI.vue.js +11 -0
- package/dist/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +26 -0
- package/dist/data-provider-interface/HappyFlowComponents/FAQDPIHome.vue.js +11 -0
- package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +109 -0
- package/dist/data-provider-interface/HappyFlowComponents/ServiceDPIHome.vue.js +11 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/CheckCircleFill.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Circle.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/CircleFill.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/DatenbereitstellerV3.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Ellipse2Error.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Ellipse2Published.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Ellipse2Warning.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/FurV3.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/IllustrationCelebrate.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/IllustrationStart.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/InfoFill.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected1.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected1_2.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected2.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected2_2.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected3.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected3_2.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected4.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected4_2.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected5.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/Selected5_2.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/WarningFill.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/bydata_logo_blue_small.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/iconRight.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/img/x-circleFill.svg.js +4 -0
- package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +135 -0
- package/dist/data-provider-interface/HappyFlowComponents/services/eventBus.js +16 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ButtonV3.vue.js +256 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/CheckboxV3.vue.js +96 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Chip.vue.js +91 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +67 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/CrossOutButton.vue.js +63 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/DatasetStatus.vue.js +52 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +7 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +96 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +231 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Illustration.vue.js +33 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +477 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/InputV3.vue.js +182 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/LogoV3.vue.js +40 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +123 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +566 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/MoreButton.vue.js +56 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +41 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +157 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +80 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ByteSizeV3.vue.js +50 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +113 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +116 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +157 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DescriptionV3.vue.js +40 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +227 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js +148 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/IssuedDateV3.vue.js +43 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +70 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +46 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ModifiedDateV3.vue.js +43 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +130 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +67 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +157 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsModal.vue.js +106 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +247 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +79 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +73 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +134 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +43 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +68 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/StateTag.vue.js +64 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/SwitchV3.vue.js +195 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +207 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +115 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonLarge.vue.js +108 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +125 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +69 -0
- package/dist/data-provider-interface/components/AutocompleteInput.vue.js +279 -0
- package/dist/data-provider-interface/components/BasicInfosPage.vue.js +9 -0
- package/dist/data-provider-interface/components/ConditionalInput.vue.js +196 -0
- package/dist/data-provider-interface/components/ContactPage.vue.js +246 -0
- package/dist/data-provider-interface/components/CoveringPage.vue.js +9 -0
- package/dist/data-provider-interface/components/DataFetchingComponent.vue.js +49 -0
- package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +60 -0
- package/dist/data-provider-interface/components/DistLicense.vue.js +160 -0
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +1147 -0
- package/dist/data-provider-interface/components/DistributionStepper.vue.js +212 -0
- package/dist/data-provider-interface/components/Dropup.vue.js +62 -0
- package/dist/data-provider-interface/components/FileUpload.vue.js +278 -0
- package/dist/data-provider-interface/components/HVDPage.vue.js +106 -0
- package/dist/data-provider-interface/components/HappyFlowLandingPage.vue.js +70 -0
- package/dist/data-provider-interface/components/InfoSlot.vue.js +81 -0
- package/dist/data-provider-interface/components/InputPageStep.vue.js +40 -0
- package/dist/data-provider-interface/components/InputPageStep.vue2.js +4 -0
- package/dist/data-provider-interface/components/LanguageSelector.vue.js +65 -0
- package/dist/data-provider-interface/components/Navigation.vue.js +256 -0
- package/dist/data-provider-interface/components/Navigation.vue2.js +1 -0
- package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +81 -0
- package/dist/data-provider-interface/components/PublisherPage.vue.js +176 -0
- package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +413 -0
- package/dist/data-provider-interface/components/SelectControlledGroup.vue.js +55 -0
- package/dist/data-provider-interface/components/SelectControlledGroup.vue2.js +4 -0
- package/dist/data-provider-interface/components/SimpleAccessURLInput.vue.js +32 -0
- package/dist/data-provider-interface/components/SimpleInput.vue.js +35 -0
- package/dist/data-provider-interface/components/SimpleSelect.vue.js +111 -0
- package/dist/data-provider-interface/components/SpatialInput.vue.js +276 -0
- package/dist/data-provider-interface/components/TempResPage.vue.js +211 -0
- package/dist/data-provider-interface/components/TheErrorDialog.vue.js +90 -0
- package/dist/data-provider-interface/components/TheErrorDialog.vue2.js +4 -0
- package/dist/data-provider-interface/components/TitelPage.vue.js +52 -0
- package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.js +75 -0
- package/dist/data-provider-interface/components/UpdateDate.vue.js +75 -0
- package/dist/data-provider-interface/components/dpiV3Description.vue.js +44 -0
- package/dist/data-provider-interface/composables/aucotomplete.js +50 -0
- package/dist/data-provider-interface/composables/useDpiContext.js +17 -0
- package/dist/data-provider-interface/composables/useDpiEditMode.js +88 -0
- package/dist/data-provider-interface/composables/useDpiFormValues.js +8 -0
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +384 -0
- package/dist/data-provider-interface/composables/useDpiStepper.js +47 -0
- package/dist/data-provider-interface/composables/useDpiUtils.js +39 -0
- package/dist/data-provider-interface/composables/useErrorDialog.js +31 -0
- package/dist/data-provider-interface/composables/useFormSchema.js +56 -0
- package/dist/data-provider-interface/composables/useRequestUriName.js +58 -0
- package/dist/data-provider-interface/config/dcatap/format-types.js +256 -0
- package/dist/data-provider-interface/config/dcatap/input-definition.js +1842 -0
- package/dist/data-provider-interface/config/dcatap/page-content-config.js +23 -0
- package/dist/data-provider-interface/config/dcatap/prefixes.js +25 -0
- package/dist/data-provider-interface/config/dcatap/vocab-prefixes.js +24 -0
- package/dist/data-provider-interface/config/dcatapde/format-types.js +274 -0
- package/dist/data-provider-interface/config/dcatapde/input-definition.js +2131 -0
- package/dist/data-provider-interface/config/dcatapde/page-content-config.js +23 -0
- package/dist/data-provider-interface/config/dcatapde/prefixes.js +27 -0
- package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +33 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +161 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/format-types.js +5 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +2196 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +82 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/prefixes.js +5 -0
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/vocab-prefixes.js +5 -0
- package/dist/data-provider-interface/config/dcatapdeODB/format-types.js +5 -0
- package/dist/data-provider-interface/config/dcatapdeODB/input-definition.js +18 -0
- package/dist/data-provider-interface/config/dcatapdeODB/page-content-config.js +5 -0
- package/dist/data-provider-interface/config/dcatapdeODB/prefixes.js +5 -0
- package/dist/data-provider-interface/config/dcatapdeODB/vocab-prefixes.js +5 -0
- package/dist/data-provider-interface/config/dpi-spec-config.js +54 -0
- package/dist/data-provider-interface/config/selector-languages.json.js +57 -0
- package/dist/data-provider-interface/plugins/userConfigShimPlugin.js +10 -0
- package/dist/data-provider-interface/store/dpiStore.js +33 -0
- package/dist/data-provider-interface/store/modules/formSchemaStore.js +94 -0
- package/dist/data-provider-interface/store/modules/navigationStore.js +24 -0
- package/dist/data-provider-interface/utils/general-helper.js +218 -0
- package/dist/data-provider-interface/utils/injectionKeys.js +5 -0
- package/dist/data-provider-interface/utils/translation-helper.js +31 -0
- package/dist/data-provider-interface/utils/useSteps.js +34 -0
- package/dist/data-provider-interface/views/DistributionInputPage.vue.js +100 -0
- package/dist/data-provider-interface/views/DistributionOverview.vue.js +201 -0
- package/dist/data-provider-interface/views/DraftsPage.vue.js +278 -0
- package/dist/data-provider-interface/views/InputPage.vue.js +1182 -0
- package/dist/data-provider-interface/views/LinkedDataViewer.vue.js +105 -0
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.js +86 -0
- package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.js +214 -0
- package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.js +219 -0
- package/dist/data-provider-interface/views/OverviewPage/Properties/MultilingualProp.vue.js +19 -0
- package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.js +397 -0
- package/dist/data-provider-interface/views/OverviewPage/Properties/StringProp.vue.js +56 -0
- package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.js +109 -0
- package/dist/data-provider-interface/views/OverviewPage/Properties/URLProp.vue.js +92 -0
- package/dist/data-provider-interface/views/OverviewPage/PropertyEntry.vue.js +103 -0
- package/dist/data-provider-interface/views/OverviewPage.vue.js +189 -0
- package/dist/data-provider-interface/views/PropertyChooser.vue.js +41 -0
- package/dist/data-provider-interface/views/UserCataloguesPage.vue.js +74 -0
- package/dist/data-provider-interface/views/UserProfilePage.vue.js +83 -0
- package/dist/filters/dateFilters.js +39 -0
- package/dist/form/FormKitGroup.vue.js +55 -0
- package/dist/form/Repeatable.vue.js +7 -0
- package/dist/form/Repeatable.vue2.js +72 -0
- package/dist/form/inputDefinitions.js +131 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +124 -0
- package/dist/utils/helpers.js +32 -0
- package/dist/widgets/AppLink.vue.js +118 -0
- package/package.json +96 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { toRef as O, toValue as x, ref as E, computed as T, watch as F } from "vue";
|
|
2
|
+
import { useAsyncState as C } from "@vueuse/core";
|
|
3
|
+
import { defineJsonldResolver as M, dcatDatasetTransformer as k, datasetResolvers as G } from "@piveau/jsonld";
|
|
4
|
+
import { isEmpty as N } from "lodash-es";
|
|
5
|
+
function L(e) {
|
|
6
|
+
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
7
|
+
}
|
|
8
|
+
function o(e) {
|
|
9
|
+
if (e != null)
|
|
10
|
+
return Array.isArray(e) ? e[0] : e;
|
|
11
|
+
}
|
|
12
|
+
function d(e) {
|
|
13
|
+
return Array.isArray(e) ? e : e ? [e] : void 0;
|
|
14
|
+
}
|
|
15
|
+
function $(e) {
|
|
16
|
+
return Object.fromEntries(Object.entries(e).filter(([i, t]) => t != null && !N(t)));
|
|
17
|
+
}
|
|
18
|
+
function ce(e, i) {
|
|
19
|
+
const { enabled: t, hubSearchUrl: r } = i, n = O(x(t) ?? !1), { safeTransform: f } = M({
|
|
20
|
+
baseUrl: r,
|
|
21
|
+
resolvers: G(),
|
|
22
|
+
transformer: k
|
|
23
|
+
}), p = E([]), {
|
|
24
|
+
state: m,
|
|
25
|
+
isReady: y,
|
|
26
|
+
isLoading: h,
|
|
27
|
+
error: v,
|
|
28
|
+
execute: R
|
|
29
|
+
} = C(
|
|
30
|
+
async () => {
|
|
31
|
+
var I;
|
|
32
|
+
const c = await f(x(e));
|
|
33
|
+
if (c.error)
|
|
34
|
+
return p.value.push({
|
|
35
|
+
code: "transform_failed",
|
|
36
|
+
message: c.error.message
|
|
37
|
+
}), null;
|
|
38
|
+
const u = c.data;
|
|
39
|
+
return (!u || !((I = u["dpi:isDPIv3"]) != null && I["@value"])) && p.value.push({
|
|
40
|
+
code: "not_dpi_v3",
|
|
41
|
+
message: `The dataset is not a DPI v3 dataset. ID ${u["@id"]}`
|
|
42
|
+
}), {
|
|
43
|
+
dpiData: ee(u),
|
|
44
|
+
data: u
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
null,
|
|
48
|
+
{ immediate: !1 }
|
|
49
|
+
), g = T(() => n.value && !h.value && !!y.value), b = T(() => n.value && !!g.value), B = T(() => b.value), P = T(() => {
|
|
50
|
+
var c;
|
|
51
|
+
return (c = m.value) == null ? void 0 : c.dpiData;
|
|
52
|
+
}), A = T(() => {
|
|
53
|
+
var c;
|
|
54
|
+
return (c = m.value) == null ? void 0 : c.data;
|
|
55
|
+
});
|
|
56
|
+
return F(
|
|
57
|
+
() => x(e),
|
|
58
|
+
(c) => c && n.value ? R() : null
|
|
59
|
+
), F(A, (c) => {
|
|
60
|
+
console.log("jsonld resolved result:", c);
|
|
61
|
+
}), F(v, (c) => {
|
|
62
|
+
console.log("jsonld error:", c);
|
|
63
|
+
}), {
|
|
64
|
+
processedInput: m,
|
|
65
|
+
isProcessedInputReady: g,
|
|
66
|
+
result: P,
|
|
67
|
+
isMaterialized: b,
|
|
68
|
+
isReady: B,
|
|
69
|
+
errors: p
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function a(e) {
|
|
73
|
+
if (typeof e == "string")
|
|
74
|
+
return e;
|
|
75
|
+
if (e && typeof e == "object") {
|
|
76
|
+
if (e["@value"])
|
|
77
|
+
return String(e["@value"]);
|
|
78
|
+
if (e["@id"])
|
|
79
|
+
return String(e["@id"]);
|
|
80
|
+
}
|
|
81
|
+
return "";
|
|
82
|
+
}
|
|
83
|
+
function U(e) {
|
|
84
|
+
return o(e);
|
|
85
|
+
}
|
|
86
|
+
function s(e, i = "de") {
|
|
87
|
+
if (!e)
|
|
88
|
+
return "";
|
|
89
|
+
if (typeof e == "string")
|
|
90
|
+
return e;
|
|
91
|
+
if (typeof e == "object" && !Array.isArray(e) && !e["@value"] && !e["@id"])
|
|
92
|
+
return e[i] || Object.values(e)[0] || "";
|
|
93
|
+
if (Array.isArray(e)) {
|
|
94
|
+
const t = e.find((n) => n["@language"] === i);
|
|
95
|
+
if (t)
|
|
96
|
+
return t["@value"] || "";
|
|
97
|
+
const r = e[0];
|
|
98
|
+
return (r == null ? void 0 : r["@value"]) || a(r) || "";
|
|
99
|
+
}
|
|
100
|
+
return e["@language"] && e["@value"] ? e["@value"] : a(e);
|
|
101
|
+
}
|
|
102
|
+
function j(e) {
|
|
103
|
+
return s(e);
|
|
104
|
+
}
|
|
105
|
+
function S(e) {
|
|
106
|
+
return {
|
|
107
|
+
uri: e.uri,
|
|
108
|
+
"@value": e["@value"]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function w(e, i) {
|
|
112
|
+
const t = e.prefLabel;
|
|
113
|
+
return S({
|
|
114
|
+
uri: e["@id"] || e["purl:identifier"] || "",
|
|
115
|
+
"@value": t ? s(t) : e["purl:identifier"] || ""
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function D(e, i = !0) {
|
|
119
|
+
return {
|
|
120
|
+
isValid: i,
|
|
121
|
+
...e
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function z(e, i = "de") {
|
|
125
|
+
return e ? L(e).map((r) => typeof r == "string" ? D({
|
|
126
|
+
"@value": r,
|
|
127
|
+
"@language": i
|
|
128
|
+
}) : r && typeof r == "object" ? r["@language"] && r["@value"] ? D({
|
|
129
|
+
"@value": r["@value"],
|
|
130
|
+
"@language": r["@language"]
|
|
131
|
+
}) : D({
|
|
132
|
+
"@value": a(r),
|
|
133
|
+
"@language": i
|
|
134
|
+
}) : D({
|
|
135
|
+
"@value": "",
|
|
136
|
+
"@language": i
|
|
137
|
+
})) : [];
|
|
138
|
+
}
|
|
139
|
+
function q(e, i) {
|
|
140
|
+
return e ? L(e).map((r) => D({
|
|
141
|
+
"@type": i,
|
|
142
|
+
"@value": a(r)
|
|
143
|
+
})) : [];
|
|
144
|
+
}
|
|
145
|
+
function _(e, i) {
|
|
146
|
+
const t = { isValid: !0 };
|
|
147
|
+
for (const [r, n] of Object.entries(i))
|
|
148
|
+
t[r] = a(e == null ? void 0 : e[n]);
|
|
149
|
+
return t;
|
|
150
|
+
}
|
|
151
|
+
function J(e) {
|
|
152
|
+
return {
|
|
153
|
+
happyFlowLandingPage: {}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function X(e) {
|
|
157
|
+
const i = {
|
|
158
|
+
discoverabilityPage: [{ isValid: !0 }]
|
|
159
|
+
};
|
|
160
|
+
if (e["dcatap:hvdCategory"]) {
|
|
161
|
+
const t = L(e["dcatap:hvdCategory"]).filter(Boolean);
|
|
162
|
+
i.hvdPage = t == null ? void 0 : t.map((r) => ({
|
|
163
|
+
isValid: !0,
|
|
164
|
+
uri: r["@id"],
|
|
165
|
+
label: s(r.prefLabel)
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
if (e["dcat:theme"]) {
|
|
169
|
+
const t = L(e["dcat:theme"]);
|
|
170
|
+
i.discoverabilityPage = [
|
|
171
|
+
{ isValid: !0 },
|
|
172
|
+
...t.map((r) => D({
|
|
173
|
+
id: a(r).split("/").pop(),
|
|
174
|
+
uri: a(r),
|
|
175
|
+
label: s(r.prefLabel)
|
|
176
|
+
}))
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
return i;
|
|
180
|
+
}
|
|
181
|
+
function H(e) {
|
|
182
|
+
var r;
|
|
183
|
+
const t = {
|
|
184
|
+
datasetID: ((r = e["@id"]) == null ? void 0 : r.split("/").pop()) || "",
|
|
185
|
+
"dct:title": [],
|
|
186
|
+
"dct:description": [],
|
|
187
|
+
"dct:modified": [""],
|
|
188
|
+
"dct:publisher": [],
|
|
189
|
+
"dcat:contactPoint": []
|
|
190
|
+
};
|
|
191
|
+
if (e["dct:title"] && (t["dct:title"] = z(e["dct:title"])), e["dct:description"] && (t["dct:description"] = z(e["dct:description"])), e["dct:modified"] && (t["dct:modified"] = q(
|
|
192
|
+
e["dct:modified"],
|
|
193
|
+
"http://www.w3.org/2001/XMLSchema#date"
|
|
194
|
+
)), e["dct:publisher"]) {
|
|
195
|
+
const n = o(e["dct:publisher"]);
|
|
196
|
+
t["dct:publisher"] = [_(n, {
|
|
197
|
+
"foaf:name": "foaf:name",
|
|
198
|
+
"foaf:mbox": "foaf:mbox",
|
|
199
|
+
"foaf:homepage": "foaf:homepage"
|
|
200
|
+
})];
|
|
201
|
+
}
|
|
202
|
+
if (e["dcat:contactPoint"]) {
|
|
203
|
+
const n = o(e["dcat:contactPoint"]);
|
|
204
|
+
t["dcat:contactPoint"] = [_(n, {
|
|
205
|
+
"vcard:fn": "vcard:fn",
|
|
206
|
+
"vcard:hasEmail": "vcard:hasEmail",
|
|
207
|
+
"vcard:hasTelephone": "vcard:hasTelephone"
|
|
208
|
+
})];
|
|
209
|
+
}
|
|
210
|
+
return t;
|
|
211
|
+
}
|
|
212
|
+
function K(e) {
|
|
213
|
+
return {
|
|
214
|
+
"dcatde:politicalGeocodingURI": [{ isValid: !0 }],
|
|
215
|
+
"dcat:temporalResolution": [
|
|
216
|
+
{
|
|
217
|
+
isValid: !0,
|
|
218
|
+
type: "dct:PeriodOfTime",
|
|
219
|
+
"dct:temporal": [
|
|
220
|
+
{
|
|
221
|
+
dataType: "dateTime",
|
|
222
|
+
"dcat:startDate": "2025-07-03",
|
|
223
|
+
"dcat:endDate": "2025-07-18",
|
|
224
|
+
startTime: "12:08",
|
|
225
|
+
endTime: "12:08"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function Q(e, i) {
|
|
233
|
+
var r, n, f, p, m, y, h, v, R, g, b, B, P, A, c, u;
|
|
234
|
+
if (!e)
|
|
235
|
+
return {};
|
|
236
|
+
const t = o(e["spdx:checksum"]);
|
|
237
|
+
return {
|
|
238
|
+
isValid: !0,
|
|
239
|
+
id: i + 1,
|
|
240
|
+
"dcat:accessURL": a(o(e["dcat:accessURL"])) || "",
|
|
241
|
+
"dct:format": {
|
|
242
|
+
label: (r = o(e["dct:format"])) == null ? void 0 : r["purl:identifier"],
|
|
243
|
+
uri: ((n = o(e["dct:format"])) == null ? void 0 : n["@id"]) || ""
|
|
244
|
+
},
|
|
245
|
+
"dct:title": s(e["dct:title"]),
|
|
246
|
+
"dct:description": s(e["dct:description"]),
|
|
247
|
+
"dct:modified": a(o(e["dct:modified"])),
|
|
248
|
+
"dct:issued": a(o(e["dct:issued"])),
|
|
249
|
+
"dcat:byteSize": a(o(e["dcat:byteSize"])),
|
|
250
|
+
"dcatde:licenseAttributionByText": "",
|
|
251
|
+
"dct:accessRights": a(o(e["dct:accessRights"])),
|
|
252
|
+
"dcatap:availability": {
|
|
253
|
+
label: (f = o(e["dcatap:availability"])) == null ? void 0 : f.label,
|
|
254
|
+
uri: ((p = o(e["dcatap:availability"])) == null ? void 0 : p.uri) || ""
|
|
255
|
+
},
|
|
256
|
+
"dct:language": S({
|
|
257
|
+
"@value": `${s((m = o(e["dct:language"])) == null ? void 0 : m["purl:identifier"])} (${s((y = o(e["dct:language"])) == null ? void 0 : y["purl:identifier"])})`,
|
|
258
|
+
uri: ((h = o(e["dct:language"])) == null ? void 0 : h["@id"]) || ""
|
|
259
|
+
}),
|
|
260
|
+
"dcat:mediaType": S({
|
|
261
|
+
"@value": s((v = o(e["dcat:mediaType"])) == null ? void 0 : v.prefLabel),
|
|
262
|
+
uri: ((R = o(e["dcat:mediaType"])) == null ? void 0 : R["@id"]) || ""
|
|
263
|
+
}),
|
|
264
|
+
"dcat:compressFormat": S({
|
|
265
|
+
"@value": s((g = o(e["dcat:compressFormat"])) == null ? void 0 : g.prefLabel),
|
|
266
|
+
uri: ((b = o(e["dcat:compressFormat"])) == null ? void 0 : b["@id"]) || ""
|
|
267
|
+
}),
|
|
268
|
+
"dcat:packageFormat": S({
|
|
269
|
+
"@value": s((B = o(e["dcat:packageFormat"])) == null ? void 0 : B.prefLabel),
|
|
270
|
+
uri: ((P = o(e["dcat:packageFormat"])) == null ? void 0 : P["@id"]) || ""
|
|
271
|
+
}),
|
|
272
|
+
"adms:status": ((A = o(e["adms:status"])) == null ? void 0 : A["@id"]) || "",
|
|
273
|
+
checksum: {
|
|
274
|
+
title: a(o(t == null ? void 0 : t["spdx:checksumValue"])),
|
|
275
|
+
"spdx:checksum": ((c = a(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : c.split("_").pop()) || "",
|
|
276
|
+
uri: (u = a(o(t == null ? void 0 : t["spdx:algorithm"]))) == null ? void 0 : u.replace("spdx:", "http://spdx.org/rdf/terms#")
|
|
277
|
+
},
|
|
278
|
+
changeLicense: { title: "", "dcterms:license": "" },
|
|
279
|
+
showErrorFormat: !1,
|
|
280
|
+
formatErrorMessage: "",
|
|
281
|
+
showErrorDownloadURL: !1,
|
|
282
|
+
documentations: [],
|
|
283
|
+
conformsToItems: [],
|
|
284
|
+
policyItems: [],
|
|
285
|
+
accessServices: te(e["dcat:accessService"] || [], 1)
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
function W(e) {
|
|
289
|
+
var t;
|
|
290
|
+
const i = {
|
|
291
|
+
"dcat:distribution": [],
|
|
292
|
+
"dct:license": [{
|
|
293
|
+
label: ""
|
|
294
|
+
}]
|
|
295
|
+
};
|
|
296
|
+
if (e["dct:license"]) {
|
|
297
|
+
const r = (t = L(e["dcat:distribution"]).find((n) => n["dct:license"])) == null ? void 0 : t["dct:license"];
|
|
298
|
+
i["dct:license"] = [
|
|
299
|
+
{
|
|
300
|
+
isValid: !0,
|
|
301
|
+
uri: (r == null ? void 0 : r["@id"]) || "",
|
|
302
|
+
label: s(r) || ""
|
|
303
|
+
}
|
|
304
|
+
];
|
|
305
|
+
}
|
|
306
|
+
if (e["dcat:distribution"]) {
|
|
307
|
+
const r = L(e["dcat:distribution"]);
|
|
308
|
+
i["dcat:distribution"] = r.map((n, f) => Q(n, f)).filter((n) => Object.keys(n).length > 0);
|
|
309
|
+
}
|
|
310
|
+
return i;
|
|
311
|
+
}
|
|
312
|
+
function Y(e) {
|
|
313
|
+
return {
|
|
314
|
+
reviewAndPublishPage: [{ isValid: !0 }]
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
function Z(e) {
|
|
318
|
+
var t, r, n, f, p, m, y, h, v, R, g, b, B, P, A, c, u, V, I;
|
|
319
|
+
const i = {
|
|
320
|
+
"dct:language": (t = e["dct:language"]) == null ? void 0 : t.map((l) => w(l)).filter(Boolean),
|
|
321
|
+
"dct:conformsTo": (r = e["dct:conformsTo"]) == null ? void 0 : r.map((l) => ({
|
|
322
|
+
"rdfs:label": l["rdfs:label"],
|
|
323
|
+
uri: l["@id"]
|
|
324
|
+
})).filter(Boolean),
|
|
325
|
+
"dct:accessRights": e["dct:accessRights"] ? d(w(e["dct:accessRights"])) : [],
|
|
326
|
+
"dct:provenance": (n = e["dct:provenance"]) == null ? void 0 : n.map((l) => ({
|
|
327
|
+
"rdfs:label": l["rdfs:label"],
|
|
328
|
+
uri: l["@id"]
|
|
329
|
+
})).filter(Boolean),
|
|
330
|
+
"dct:accrualPeriodicity": e["dct:accrualPeriodicity"] ? d(w(e["dct:accrualPeriodicity"])) : [],
|
|
331
|
+
"dct:type": (f = e["dct:type"]) == null ? void 0 : f.map((l) => w(l)).filter(Boolean),
|
|
332
|
+
"dcat:spatialResolutionInMeters": a(e["dcat:spatialResolutionInMeters"]) || void 0,
|
|
333
|
+
"dcat:temporalResolution": a(e["dcat:temporalResolution"]) || void 0,
|
|
334
|
+
"dcat:qualifiedRelation": (p = d(e["dcat:qualifiedRelation"])) == null ? void 0 : p.filter(Boolean),
|
|
335
|
+
"dct:creator": (m = d(e["dct:creator"])) == null ? void 0 : m.filter(Boolean),
|
|
336
|
+
"dct:contributor": (y = d(e["dct:contributor"])) == null ? void 0 : y.filter(Boolean),
|
|
337
|
+
"dcatde:contributorID": (h = e["dcatapde:contributorID"]) == null ? void 0 : h.map((l) => w(l)).filter(Boolean),
|
|
338
|
+
"dcatde:geocodingDescription": (v = d(e["dcatapde:geocodingDescription"])) == null ? void 0 : v.filter(Boolean),
|
|
339
|
+
"dct:identifier": e["dct:identifier"] ? [{ "@value": e["dct:identifier"] }] : [],
|
|
340
|
+
"adms:identifier": (R = d(e["adms:identifier"])) == null ? void 0 : R.filter(Boolean),
|
|
341
|
+
"owl:versionInfo": (g = e["owl:versionInfo"]) == null ? void 0 : g.map((l) => ({ "@value": l })),
|
|
342
|
+
"adms:versionNotes": e["adms:versionNotes"],
|
|
343
|
+
"dcatde:legalBasis": (b = d(e["dcatapde:legalBasis"])) == null ? void 0 : b.filter(Boolean),
|
|
344
|
+
"dct:relation": (B = d(e["dct:relation"])) == null ? void 0 : B.filter(Boolean),
|
|
345
|
+
"dcat:landingPage": (P = d(e["dcat:landingPage"])) == null ? void 0 : P.filter(Boolean),
|
|
346
|
+
"prov:wasGeneratedBy": (A = d(e["prov:wasGeneratedBy"])) == null ? void 0 : A.filter(Boolean),
|
|
347
|
+
"dct:isReferencedBy": (c = d(e["dct:isReferencedBy"])) == null ? void 0 : c.filter(Boolean),
|
|
348
|
+
"dct:source": (u = d(e["dct:source"])) == null ? void 0 : u.filter(Boolean),
|
|
349
|
+
"dct:hasVersion": (V = d(e["dct:hasVersion"])) == null ? void 0 : V.filter(Boolean),
|
|
350
|
+
"dct:isVersionOf": (I = d(e["dct:isVersionOf"])) == null ? void 0 : I.filter(Boolean)
|
|
351
|
+
};
|
|
352
|
+
return $(i);
|
|
353
|
+
}
|
|
354
|
+
function ee(e) {
|
|
355
|
+
return {
|
|
356
|
+
Landing: J(),
|
|
357
|
+
Discoverability: X(e),
|
|
358
|
+
BasicInfos: H(e),
|
|
359
|
+
Covering: K(),
|
|
360
|
+
DistributionSimple: W(e),
|
|
361
|
+
ReviewAndPublish: Y(),
|
|
362
|
+
Additionals: Z(e)
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function te(e, i) {
|
|
366
|
+
return !e || !Array.isArray(e) || e.length === 0 ? [] : e.map((t) => ({
|
|
367
|
+
id: i,
|
|
368
|
+
"dcat:accessURL": a(U(t["dcat:accessURL"])),
|
|
369
|
+
"dcat:endpointURL": a(U(t["dcat:endpointURL"])),
|
|
370
|
+
"dct:description": j(t["dct:description"]),
|
|
371
|
+
"dct:title": j(t["dct:title"])
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
374
|
+
export {
|
|
375
|
+
d as asSomeArray,
|
|
376
|
+
s as extractLocalizedString,
|
|
377
|
+
a as extractStringValue,
|
|
378
|
+
o as getFirstItem,
|
|
379
|
+
L as normalizeToArray,
|
|
380
|
+
$ as purgeNullishAndEmptyProperties,
|
|
381
|
+
te as toAccessService,
|
|
382
|
+
ee as toDpi,
|
|
383
|
+
ce as useDpiSimpleLoader
|
|
384
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ref as x, computed as n, provide as g } from "vue";
|
|
2
|
+
import { dpiStepperKey as I } from "../utils/injectionKeys.js";
|
|
3
|
+
import m from "../utils/useSteps.js";
|
|
4
|
+
function P() {
|
|
5
|
+
const { steps: p, activeStep: u, subSteps: v, stepPlugin: l, visitedSteps: r } = m(), t = x([]), o = n(() => t.value.indexOf(u.value)), i = n(() => {
|
|
6
|
+
const e = o.value - 1;
|
|
7
|
+
return e >= 0 ? t.value[e] : "";
|
|
8
|
+
}), a = n(() => {
|
|
9
|
+
const e = o.value + 1;
|
|
10
|
+
return e < t.value.length ? t.value[e] : "";
|
|
11
|
+
}), s = (e) => {
|
|
12
|
+
t.value.includes(e) || t.value.push(e);
|
|
13
|
+
}, c = () => {
|
|
14
|
+
const e = o.value + 1;
|
|
15
|
+
e < t.value.length && (u.value = t.value[e]);
|
|
16
|
+
}, S = () => {
|
|
17
|
+
const e = o.value - 1;
|
|
18
|
+
e >= 0 && (u.value = t.value[e]);
|
|
19
|
+
}, f = (e) => {
|
|
20
|
+
t.value.includes(e) && (u.value = e);
|
|
21
|
+
}, d = (e) => {
|
|
22
|
+
e >= 0 && e < t.value.length && (u.value = t.value[e]);
|
|
23
|
+
};
|
|
24
|
+
return g(I, {
|
|
25
|
+
steps: p,
|
|
26
|
+
activeStep: u,
|
|
27
|
+
registerStep: s
|
|
28
|
+
}), {
|
|
29
|
+
steps: p,
|
|
30
|
+
subSteps: v,
|
|
31
|
+
activeStep: u,
|
|
32
|
+
activeStepIndex: o,
|
|
33
|
+
previousStep: i,
|
|
34
|
+
nextStep: a,
|
|
35
|
+
visitedSteps: r,
|
|
36
|
+
stepPlugin: l,
|
|
37
|
+
stepList: t,
|
|
38
|
+
registerStep: s,
|
|
39
|
+
goToNextStep: c,
|
|
40
|
+
goToPreviousStep: S,
|
|
41
|
+
goToStep: f,
|
|
42
|
+
goToStepByIndex: d
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
P as useDpiStepper
|
|
47
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useStore as D } from "vuex";
|
|
2
|
+
import { useRouter as S, useRoute as _ } from "vue-router";
|
|
3
|
+
import { computed as s, toValue as n } from "vue";
|
|
4
|
+
import { useI18n as h } from "vue-i18n";
|
|
5
|
+
function P() {
|
|
6
|
+
const r = S(), p = _(), l = D(), { locale: m, fallbackLocale: d } = h(), u = s(() => p.query.locale || m.value || d.value || "en"), i = s(
|
|
7
|
+
() => {
|
|
8
|
+
var e;
|
|
9
|
+
return ((e = l.getters["auth/getUserData"]) == null ? void 0 : e.rtpToken) || "";
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
function t() {
|
|
13
|
+
localStorage == null || localStorage.removeItem("dpi_duplicate"), localStorage == null || localStorage.removeItem("dpi_catalogues"), localStorage == null || localStorage.removeItem("dpi_editmode"), localStorage == null || localStorage.removeItem("dpi_datasets"), localStorage == null || localStorage.removeItem("dpi_draftmode");
|
|
14
|
+
}
|
|
15
|
+
function f(e) {
|
|
16
|
+
const { id: o, catalogId: a, isDraft: c = !1, locale: v, router: g = r } = e;
|
|
17
|
+
i.value || console.warn("No rpt token found. DPI cannot be opened in edit mode."), t(), c && l.dispatch("auth/setIsDraft", !0), localStorage == null || localStorage.removeItem("dpi_duplicate"), g.push({ name: "DataProviderInterface-Input", params: { property: "datasets" }, query: {
|
|
18
|
+
locale: n(v) || u.value,
|
|
19
|
+
edit: "true",
|
|
20
|
+
id: o,
|
|
21
|
+
catalog: a,
|
|
22
|
+
...c && { fromDraft: "true" }
|
|
23
|
+
} });
|
|
24
|
+
}
|
|
25
|
+
function I(e) {
|
|
26
|
+
const { locale: o, router: a = r } = e || {};
|
|
27
|
+
t(), a.push({ name: "DataProviderInterface-Input", params: { property: "datasets" }, query: {
|
|
28
|
+
locale: n(o) || u.value
|
|
29
|
+
} });
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
toEditMode: f,
|
|
33
|
+
toCreateMode: I,
|
|
34
|
+
cleanupDpi: t
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
P as useDpiUtils
|
|
39
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createSharedComposable as m } from "@vueuse/core";
|
|
2
|
+
import { computed as n, ref as s } from "vue";
|
|
3
|
+
const v = m(() => {
|
|
4
|
+
const e = s(!1), r = s(""), o = s(null), t = s(!1);
|
|
5
|
+
return {
|
|
6
|
+
open: e,
|
|
7
|
+
userMessage: r,
|
|
8
|
+
error: o,
|
|
9
|
+
isDevelopment: t
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
function D() {
|
|
13
|
+
const { open: e, userMessage: r, error: o, isDevelopment: t } = v(), l = (p, i) => {
|
|
14
|
+
e.value = !0, o.value = p, r.value = i || "";
|
|
15
|
+
}, a = () => {
|
|
16
|
+
e.value = !1;
|
|
17
|
+
}, u = n(() => !!e.value), c = n(() => o.value);
|
|
18
|
+
return {
|
|
19
|
+
open: e,
|
|
20
|
+
isOpen: u,
|
|
21
|
+
error: o,
|
|
22
|
+
userMessage: r,
|
|
23
|
+
currentError: c,
|
|
24
|
+
isDevelopment: t,
|
|
25
|
+
openErrorDialog: l,
|
|
26
|
+
closeErrorDialog: a
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
D as useErrorDialog
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createSharedComposable as p } from "@vueuse/core";
|
|
2
|
+
import { computed as d, ref as b, toValue as x } from "vue";
|
|
3
|
+
import { useDpiContext as D } from "./useDpiContext.js";
|
|
4
|
+
import { useI18n as w } from "vue-i18n";
|
|
5
|
+
import A from "../utils/translation-helper.js";
|
|
6
|
+
const F = p(() => {
|
|
7
|
+
const c = b({
|
|
8
|
+
schema: {
|
|
9
|
+
datasets: {},
|
|
10
|
+
distributions: {},
|
|
11
|
+
catalogues: {}
|
|
12
|
+
},
|
|
13
|
+
usersCatalogs: {}
|
|
14
|
+
});
|
|
15
|
+
return { state: c, getSchema: (a) => d(() => {
|
|
16
|
+
const r = x(a);
|
|
17
|
+
if (a === "catalogues" || a === "datasets" || a === "distributions")
|
|
18
|
+
return c.value.schema[r];
|
|
19
|
+
}) };
|
|
20
|
+
});
|
|
21
|
+
function K(c) {
|
|
22
|
+
const l = D(), { t: a, te: r } = c || w({ useScope: "global" }), { state: i, getSchema: S } = F(), h = d(() => l.value.specification);
|
|
23
|
+
function v({ property: t, page: e }) {
|
|
24
|
+
var n, s;
|
|
25
|
+
const o = (n = h.value.pageConent) == null ? void 0 : n[t][e], m = (s = h.value.inputDefinition) == null ? void 0 : s[t], u = JSON.parse(JSON.stringify(i.value));
|
|
26
|
+
C({ state: u, pageProperties: o, propertyDefinitions: m, property: t, page: e }), i.value = u;
|
|
27
|
+
}
|
|
28
|
+
function C({
|
|
29
|
+
state: t,
|
|
30
|
+
pageProperties: e,
|
|
31
|
+
propertyDefinitions: o,
|
|
32
|
+
property: m,
|
|
33
|
+
page: u
|
|
34
|
+
}) {
|
|
35
|
+
const n = [];
|
|
36
|
+
for (let s = 0; s < e.length; s += 1) {
|
|
37
|
+
const f = e[s];
|
|
38
|
+
try {
|
|
39
|
+
n.push(o[f]);
|
|
40
|
+
} catch {
|
|
41
|
+
console.warn(
|
|
42
|
+
`DCATAP doens't include a property called: ${f}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
t.schema[m][u] = n;
|
|
47
|
+
}
|
|
48
|
+
function g({ property: t, page: e }) {
|
|
49
|
+
const o = { ...i.value.schema };
|
|
50
|
+
A(o[t][e], t, a, r), i.value.schema[t][e] = o[t][e];
|
|
51
|
+
}
|
|
52
|
+
return { createSchema: v, translateSchema: g, getSchema: S };
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
K as useFormSchema
|
|
56
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useStore as b } from "vuex";
|
|
2
|
+
import { useRuntimeEnv as h } from "../../composables/useRuntimeEnv.js";
|
|
3
|
+
import { getTranslationFor as a } from "../../utils/helpers.js";
|
|
4
|
+
import { toValue as t } from "vue";
|
|
5
|
+
import { useAsyncState as q } from "@vueuse/core";
|
|
6
|
+
import { useAutocomplete as R } from "./aucotomplete.js";
|
|
7
|
+
function w(c) {
|
|
8
|
+
const {
|
|
9
|
+
res: m,
|
|
10
|
+
voc: n,
|
|
11
|
+
property: f,
|
|
12
|
+
locale: p
|
|
13
|
+
} = c, d = h();
|
|
14
|
+
b();
|
|
15
|
+
const { requestResourceName: v } = R();
|
|
16
|
+
return {
|
|
17
|
+
...q(
|
|
18
|
+
async () => {
|
|
19
|
+
const o = t(m), s = t(n), _ = t(f), l = p;
|
|
20
|
+
if (o != null) {
|
|
21
|
+
let u = s === "iana-media-types" || s === "spdx-checksum-algorithm", i;
|
|
22
|
+
return await v({
|
|
23
|
+
voc: s,
|
|
24
|
+
uri: o,
|
|
25
|
+
envs: d
|
|
26
|
+
}).then((r) => {
|
|
27
|
+
_ === "dcatde:politicalGeocodingURI" ? r != null && (i = u ? r.data.result.results.filter((e) => e.resource === o).map(
|
|
28
|
+
(e) => a(
|
|
29
|
+
e.alt_label,
|
|
30
|
+
t(l),
|
|
31
|
+
[]
|
|
32
|
+
)
|
|
33
|
+
)[0] : a(
|
|
34
|
+
r.data.result.alt_label,
|
|
35
|
+
t(l),
|
|
36
|
+
[]
|
|
37
|
+
)) : r != null && (i = u ? r.data.result.results.filter((e) => e.resource === o).map(
|
|
38
|
+
(e) => a(
|
|
39
|
+
e.pref_label,
|
|
40
|
+
t(l),
|
|
41
|
+
[]
|
|
42
|
+
)
|
|
43
|
+
)[0] : a(
|
|
44
|
+
r.data.result.pref_label,
|
|
45
|
+
t(l),
|
|
46
|
+
[]
|
|
47
|
+
));
|
|
48
|
+
}), i;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
void 0,
|
|
52
|
+
{ immediate: !1 }
|
|
53
|
+
)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
w as useRequestUriName
|
|
58
|
+
};
|