@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.
Files changed (194) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/assets/dpi.css +1 -0
  3. package/dist/composables/useRuntimeEnv.js +11 -0
  4. package/dist/composables/useTed.js +9 -0
  5. package/dist/data-provider-interface/DPIMenu.vue.js +457 -0
  6. package/dist/data-provider-interface/DataProviderInterface.vue.js +43 -0
  7. package/dist/data-provider-interface/DataProviderInterface.vue2.js +144 -0
  8. package/dist/data-provider-interface/HappyFlowComponents/BlogDPIHome.vue.js +13 -0
  9. package/dist/data-provider-interface/HappyFlowComponents/CommunityDPI.vue.js +11 -0
  10. package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1052 -0
  11. package/dist/data-provider-interface/HappyFlowComponents/ConsultingDPI.vue.js +11 -0
  12. package/dist/data-provider-interface/HappyFlowComponents/DPIHome.vue.js +26 -0
  13. package/dist/data-provider-interface/HappyFlowComponents/FAQDPIHome.vue.js +11 -0
  14. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +109 -0
  15. package/dist/data-provider-interface/HappyFlowComponents/ServiceDPIHome.vue.js +11 -0
  16. package/dist/data-provider-interface/HappyFlowComponents/img/CheckCircleFill.svg.js +4 -0
  17. package/dist/data-provider-interface/HappyFlowComponents/img/Circle.svg.js +4 -0
  18. package/dist/data-provider-interface/HappyFlowComponents/img/CircleFill.svg.js +4 -0
  19. package/dist/data-provider-interface/HappyFlowComponents/img/DatenbereitstellerV3.svg.js +4 -0
  20. package/dist/data-provider-interface/HappyFlowComponents/img/Ellipse2Error.svg.js +4 -0
  21. package/dist/data-provider-interface/HappyFlowComponents/img/Ellipse2Published.svg.js +4 -0
  22. package/dist/data-provider-interface/HappyFlowComponents/img/Ellipse2Warning.svg.js +4 -0
  23. package/dist/data-provider-interface/HappyFlowComponents/img/FurV3.svg.js +4 -0
  24. package/dist/data-provider-interface/HappyFlowComponents/img/IllustrationCelebrate.svg.js +4 -0
  25. package/dist/data-provider-interface/HappyFlowComponents/img/IllustrationStart.svg.js +4 -0
  26. package/dist/data-provider-interface/HappyFlowComponents/img/InfoFill.svg.js +4 -0
  27. package/dist/data-provider-interface/HappyFlowComponents/img/Selected1.svg.js +4 -0
  28. package/dist/data-provider-interface/HappyFlowComponents/img/Selected1_2.svg.js +4 -0
  29. package/dist/data-provider-interface/HappyFlowComponents/img/Selected2.svg.js +4 -0
  30. package/dist/data-provider-interface/HappyFlowComponents/img/Selected2_2.svg.js +4 -0
  31. package/dist/data-provider-interface/HappyFlowComponents/img/Selected3.svg.js +4 -0
  32. package/dist/data-provider-interface/HappyFlowComponents/img/Selected3_2.svg.js +4 -0
  33. package/dist/data-provider-interface/HappyFlowComponents/img/Selected4.svg.js +4 -0
  34. package/dist/data-provider-interface/HappyFlowComponents/img/Selected4_2.svg.js +4 -0
  35. package/dist/data-provider-interface/HappyFlowComponents/img/Selected5.svg.js +4 -0
  36. package/dist/data-provider-interface/HappyFlowComponents/img/Selected5_2.svg.js +4 -0
  37. package/dist/data-provider-interface/HappyFlowComponents/img/WarningFill.svg.js +4 -0
  38. package/dist/data-provider-interface/HappyFlowComponents/img/bydata_logo_blue_small.svg.js +4 -0
  39. package/dist/data-provider-interface/HappyFlowComponents/img/iconRight.svg.js +4 -0
  40. package/dist/data-provider-interface/HappyFlowComponents/img/x-circleFill.svg.js +4 -0
  41. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +135 -0
  42. package/dist/data-provider-interface/HappyFlowComponents/services/eventBus.js +16 -0
  43. package/dist/data-provider-interface/HappyFlowComponents/ui/ButtonV3.vue.js +256 -0
  44. package/dist/data-provider-interface/HappyFlowComponents/ui/CheckboxV3.vue.js +96 -0
  45. package/dist/data-provider-interface/HappyFlowComponents/ui/Chip.vue.js +91 -0
  46. package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +67 -0
  47. package/dist/data-provider-interface/HappyFlowComponents/ui/CrossOutButton.vue.js +63 -0
  48. package/dist/data-provider-interface/HappyFlowComponents/ui/DatasetStatus.vue.js +52 -0
  49. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +7 -0
  50. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +96 -0
  51. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +231 -0
  52. package/dist/data-provider-interface/HappyFlowComponents/ui/Illustration.vue.js +33 -0
  53. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +477 -0
  54. package/dist/data-provider-interface/HappyFlowComponents/ui/InputV3.vue.js +182 -0
  55. package/dist/data-provider-interface/HappyFlowComponents/ui/LogoV3.vue.js +40 -0
  56. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +123 -0
  57. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +566 -0
  58. package/dist/data-provider-interface/HappyFlowComponents/ui/MoreButton.vue.js +56 -0
  59. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +41 -0
  60. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +157 -0
  61. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +80 -0
  62. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ByteSizeV3.vue.js +50 -0
  63. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +113 -0
  64. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +116 -0
  65. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +157 -0
  66. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DescriptionV3.vue.js +40 -0
  67. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +227 -0
  68. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js +148 -0
  69. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/IssuedDateV3.vue.js +43 -0
  70. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +70 -0
  71. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +46 -0
  72. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ModifiedDateV3.vue.js +43 -0
  73. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +130 -0
  74. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +67 -0
  75. package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +157 -0
  76. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsModal.vue.js +106 -0
  77. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +247 -0
  78. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +79 -0
  79. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +73 -0
  80. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +134 -0
  81. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +43 -0
  82. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +68 -0
  83. package/dist/data-provider-interface/HappyFlowComponents/ui/StateTag.vue.js +64 -0
  84. package/dist/data-provider-interface/HappyFlowComponents/ui/SwitchV3.vue.js +195 -0
  85. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +207 -0
  86. package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +115 -0
  87. package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonLarge.vue.js +108 -0
  88. package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +125 -0
  89. package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +69 -0
  90. package/dist/data-provider-interface/components/AutocompleteInput.vue.js +279 -0
  91. package/dist/data-provider-interface/components/BasicInfosPage.vue.js +9 -0
  92. package/dist/data-provider-interface/components/ConditionalInput.vue.js +196 -0
  93. package/dist/data-provider-interface/components/ContactPage.vue.js +246 -0
  94. package/dist/data-provider-interface/components/CoveringPage.vue.js +9 -0
  95. package/dist/data-provider-interface/components/DataFetchingComponent.vue.js +49 -0
  96. package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +60 -0
  97. package/dist/data-provider-interface/components/DistLicense.vue.js +160 -0
  98. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +1147 -0
  99. package/dist/data-provider-interface/components/DistributionStepper.vue.js +212 -0
  100. package/dist/data-provider-interface/components/Dropup.vue.js +62 -0
  101. package/dist/data-provider-interface/components/FileUpload.vue.js +278 -0
  102. package/dist/data-provider-interface/components/HVDPage.vue.js +106 -0
  103. package/dist/data-provider-interface/components/HappyFlowLandingPage.vue.js +70 -0
  104. package/dist/data-provider-interface/components/InfoSlot.vue.js +81 -0
  105. package/dist/data-provider-interface/components/InputPageStep.vue.js +40 -0
  106. package/dist/data-provider-interface/components/InputPageStep.vue2.js +4 -0
  107. package/dist/data-provider-interface/components/LanguageSelector.vue.js +65 -0
  108. package/dist/data-provider-interface/components/Navigation.vue.js +256 -0
  109. package/dist/data-provider-interface/components/Navigation.vue2.js +1 -0
  110. package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +81 -0
  111. package/dist/data-provider-interface/components/PublisherPage.vue.js +176 -0
  112. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +413 -0
  113. package/dist/data-provider-interface/components/SelectControlledGroup.vue.js +55 -0
  114. package/dist/data-provider-interface/components/SelectControlledGroup.vue2.js +4 -0
  115. package/dist/data-provider-interface/components/SimpleAccessURLInput.vue.js +32 -0
  116. package/dist/data-provider-interface/components/SimpleInput.vue.js +35 -0
  117. package/dist/data-provider-interface/components/SimpleSelect.vue.js +111 -0
  118. package/dist/data-provider-interface/components/SpatialInput.vue.js +276 -0
  119. package/dist/data-provider-interface/components/TempResPage.vue.js +211 -0
  120. package/dist/data-provider-interface/components/TheErrorDialog.vue.js +90 -0
  121. package/dist/data-provider-interface/components/TheErrorDialog.vue2.js +4 -0
  122. package/dist/data-provider-interface/components/TitelPage.vue.js +52 -0
  123. package/dist/data-provider-interface/components/UniqueIdentifierInput.vue.js +75 -0
  124. package/dist/data-provider-interface/components/UpdateDate.vue.js +75 -0
  125. package/dist/data-provider-interface/components/dpiV3Description.vue.js +44 -0
  126. package/dist/data-provider-interface/composables/aucotomplete.js +50 -0
  127. package/dist/data-provider-interface/composables/useDpiContext.js +17 -0
  128. package/dist/data-provider-interface/composables/useDpiEditMode.js +88 -0
  129. package/dist/data-provider-interface/composables/useDpiFormValues.js +8 -0
  130. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +384 -0
  131. package/dist/data-provider-interface/composables/useDpiStepper.js +47 -0
  132. package/dist/data-provider-interface/composables/useDpiUtils.js +39 -0
  133. package/dist/data-provider-interface/composables/useErrorDialog.js +31 -0
  134. package/dist/data-provider-interface/composables/useFormSchema.js +56 -0
  135. package/dist/data-provider-interface/composables/useRequestUriName.js +58 -0
  136. package/dist/data-provider-interface/config/dcatap/format-types.js +256 -0
  137. package/dist/data-provider-interface/config/dcatap/input-definition.js +1842 -0
  138. package/dist/data-provider-interface/config/dcatap/page-content-config.js +23 -0
  139. package/dist/data-provider-interface/config/dcatap/prefixes.js +25 -0
  140. package/dist/data-provider-interface/config/dcatap/vocab-prefixes.js +24 -0
  141. package/dist/data-provider-interface/config/dcatapde/format-types.js +274 -0
  142. package/dist/data-provider-interface/config/dcatapde/input-definition.js +2131 -0
  143. package/dist/data-provider-interface/config/dcatapde/page-content-config.js +23 -0
  144. package/dist/data-provider-interface/config/dcatapde/prefixes.js +27 -0
  145. package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +33 -0
  146. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +161 -0
  147. package/dist/data-provider-interface/config/dcatapdeHappyFlow/format-types.js +5 -0
  148. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +2196 -0
  149. package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +82 -0
  150. package/dist/data-provider-interface/config/dcatapdeHappyFlow/prefixes.js +5 -0
  151. package/dist/data-provider-interface/config/dcatapdeHappyFlow/vocab-prefixes.js +5 -0
  152. package/dist/data-provider-interface/config/dcatapdeODB/format-types.js +5 -0
  153. package/dist/data-provider-interface/config/dcatapdeODB/input-definition.js +18 -0
  154. package/dist/data-provider-interface/config/dcatapdeODB/page-content-config.js +5 -0
  155. package/dist/data-provider-interface/config/dcatapdeODB/prefixes.js +5 -0
  156. package/dist/data-provider-interface/config/dcatapdeODB/vocab-prefixes.js +5 -0
  157. package/dist/data-provider-interface/config/dpi-spec-config.js +54 -0
  158. package/dist/data-provider-interface/config/selector-languages.json.js +57 -0
  159. package/dist/data-provider-interface/plugins/userConfigShimPlugin.js +10 -0
  160. package/dist/data-provider-interface/store/dpiStore.js +33 -0
  161. package/dist/data-provider-interface/store/modules/formSchemaStore.js +94 -0
  162. package/dist/data-provider-interface/store/modules/navigationStore.js +24 -0
  163. package/dist/data-provider-interface/utils/general-helper.js +218 -0
  164. package/dist/data-provider-interface/utils/injectionKeys.js +5 -0
  165. package/dist/data-provider-interface/utils/translation-helper.js +31 -0
  166. package/dist/data-provider-interface/utils/useSteps.js +34 -0
  167. package/dist/data-provider-interface/views/DistributionInputPage.vue.js +100 -0
  168. package/dist/data-provider-interface/views/DistributionOverview.vue.js +201 -0
  169. package/dist/data-provider-interface/views/DraftsPage.vue.js +278 -0
  170. package/dist/data-provider-interface/views/InputPage.vue.js +1182 -0
  171. package/dist/data-provider-interface/views/LinkedDataViewer.vue.js +105 -0
  172. package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.js +86 -0
  173. package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.js +214 -0
  174. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.js +219 -0
  175. package/dist/data-provider-interface/views/OverviewPage/Properties/MultilingualProp.vue.js +19 -0
  176. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.js +397 -0
  177. package/dist/data-provider-interface/views/OverviewPage/Properties/StringProp.vue.js +56 -0
  178. package/dist/data-provider-interface/views/OverviewPage/Properties/URIProp.vue.js +109 -0
  179. package/dist/data-provider-interface/views/OverviewPage/Properties/URLProp.vue.js +92 -0
  180. package/dist/data-provider-interface/views/OverviewPage/PropertyEntry.vue.js +103 -0
  181. package/dist/data-provider-interface/views/OverviewPage.vue.js +189 -0
  182. package/dist/data-provider-interface/views/PropertyChooser.vue.js +41 -0
  183. package/dist/data-provider-interface/views/UserCataloguesPage.vue.js +74 -0
  184. package/dist/data-provider-interface/views/UserProfilePage.vue.js +83 -0
  185. package/dist/filters/dateFilters.js +39 -0
  186. package/dist/form/FormKitGroup.vue.js +55 -0
  187. package/dist/form/Repeatable.vue.js +7 -0
  188. package/dist/form/Repeatable.vue2.js +72 -0
  189. package/dist/form/inputDefinitions.js +131 -0
  190. package/dist/index.d.ts +1 -0
  191. package/dist/index.js +124 -0
  192. package/dist/utils/helpers.js +32 -0
  193. package/dist/widgets/AppLink.vue.js +118 -0
  194. package/package.json +96 -0
@@ -0,0 +1,212 @@
1
+ import { defineComponent as D, resolveComponent as m, createElementBlock as i, openBlock as o, Fragment as f, createVNode as S, createElementVNode as r, withCtx as C, createCommentVNode as a, renderList as g, normalizeClass as $, createTextVNode as k, toDisplayString as l, markRaw as T } from "vue";
2
+ import { mapGetters as O } from "vuex";
3
+ import { useDpiStepper as I } from "../composables/useDpiStepper.js";
4
+ import P from "./InputPageStep.vue.js";
5
+ import w from "./SelectControlledGroup.vue.js";
6
+ import { useWindowScroll as F } from "@vueuse/core";
7
+ import V from "../../_virtual/_plugin-vue_export-helper.js";
8
+ const B = D({
9
+ props: {
10
+ name: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ index: {
15
+ required: !0
16
+ },
17
+ schema: {
18
+ required: !0,
19
+ type: Object
20
+ },
21
+ context: {
22
+ type: Object
23
+ },
24
+ distributionIsCollapsed: {
25
+ type: Boolean
26
+ },
27
+ collapseDistributions: {
28
+ type: Function
29
+ },
30
+ deleteDistribution: {
31
+ type: Function
32
+ }
33
+ },
34
+ components: {
35
+ InputPageStep: P
36
+ },
37
+ data() {
38
+ return {
39
+ isCollapsed: !1,
40
+ camel2title: (e) => e.replace(/([A-Z])/g, (t) => ` ${t}`).replace(/^./, (t) => t.toUpperCase()).trim(),
41
+ isActive: !1,
42
+ indexOfDis: 1
43
+ };
44
+ },
45
+ methods: {
46
+ editDistribution() {
47
+ this.isCollapsed = !this.isCollapsed, this.collapseDistributions(this.index);
48
+ },
49
+ scrollToTop() {
50
+ let { x: e, y: t } = F({ behavior: "smooth" });
51
+ t.value = 0;
52
+ },
53
+ convertToRoman(e) {
54
+ if (e === 1)
55
+ return "A";
56
+ if (e === 2)
57
+ return "B";
58
+ if (e === 3)
59
+ return "C";
60
+ if (e === 4)
61
+ return "D";
62
+ }
63
+ },
64
+ computed: {
65
+ ...O("dpiStore", [
66
+ "getNavSteps"
67
+ ]),
68
+ getName() {
69
+ return this.name || values.Distributions.distributionList[this.name - 1].Mandatory["dcat:accessURL"][0]["@id"];
70
+ }
71
+ },
72
+ watch: {
73
+ distributionIsCollapsed: {
74
+ handler(e) {
75
+ this.isCollapsed = e;
76
+ }
77
+ }
78
+ },
79
+ created() {
80
+ },
81
+ setup() {
82
+ const {
83
+ steps: e,
84
+ activeStep: t,
85
+ visitedSteps: d,
86
+ previousStep: y,
87
+ nextStep: b,
88
+ stepPlugin: h,
89
+ goToNextStep: u,
90
+ goToPreviousStep: c
91
+ } = I(), v = (s) => (e[s].errorCount > 0 || e[s].blockingCount > 0) && d.value.includes(s), n = T({
92
+ SelectControlledGroup: w
93
+ });
94
+ return {
95
+ steps: e,
96
+ visitedSteps: d,
97
+ activeStep: t,
98
+ previousStep: y,
99
+ nextStep: b,
100
+ stepPlugin: h,
101
+ checkStepValidity: v,
102
+ goToNextStep: u,
103
+ goToPreviousStep: c,
104
+ library: n
105
+ };
106
+ }
107
+ }), _ = {
108
+ name: "distribution-stepper",
109
+ class: "singleDistributions"
110
+ }, j = {
111
+ key: 0,
112
+ class: "disInfoWrapper"
113
+ }, K = { class: "steps" }, R = ["data-step-active", "data-step-valid", "onClick"], z = { class: "stepBubbleWrap" }, A = { class: "circle stepCircle" }, L = ["textContent"], M = {
114
+ key: 0,
115
+ class: "seperatorHorizontalStepper"
116
+ }, W = {
117
+ key: 1,
118
+ class: "seperatorHorizontalStepper"
119
+ }, q = {
120
+ key: 0,
121
+ class: "step inactiveStep"
122
+ }, E = { class: "d-flex flex-column w-100" }, G = {
123
+ key: 0,
124
+ class: "p-1"
125
+ }, H = { class: "m-3 d-flex justify-content-end" };
126
+ function U(e, t, d, y, b, h) {
127
+ const u = m("FormKitSchema"), c = m("InputPageStep"), v = m("FormKit");
128
+ return o(), i(f, null, [
129
+ S(v, {
130
+ type: "form",
131
+ actions: !1,
132
+ plugins: [e.stepPlugin]
133
+ }, {
134
+ default: C(() => [
135
+ r("div", _, [
136
+ e.isCollapsed ? a("", !0) : (o(), i("div", j, [
137
+ r("ul", K, [
138
+ (o(!0), i(f, null, g(e.steps, (n, s, p) => (o(), i("li", {
139
+ key: p,
140
+ class: $(["step", {
141
+ activeItem: e.activeStep === s,
142
+ inactiveStep: s != e.activeStep,
143
+ "has-errors": e.checkStepValidity(s)
144
+ }]),
145
+ "data-step-active": e.activeStep === s,
146
+ "data-step-valid": n.valid && n.errorCount === 0,
147
+ onClick: (Z) => {
148
+ e.activeStep = s, e.indexOfDis = p + 1;
149
+ }
150
+ }, [
151
+ r("div", z, [
152
+ r("div", A, l(e.convertToRoman(p + 1)), 1),
153
+ e.checkStepValidity(s) ? (o(), i("span", {
154
+ key: 0,
155
+ class: "step--errors",
156
+ textContent: l(n.errorCount + n.blockingCount)
157
+ }, null, 8, L)) : a("", !0),
158
+ k(" " + l(e.$t("message.dataupload.steps." + s + "Step")), 1)
159
+ ]),
160
+ p + 1 != Object.keys(e.getNavSteps(e.$env.content.dataProviderInterface.specification).distributions).length ? (o(), i("div", M)) : a("", !0),
161
+ e.activeStep === "overview" ? (o(), i("div", W)) : a("", !0)
162
+ ], 10, R))), 128)),
163
+ e.activeStep === "overview" ? (o(), i("li", q, t[2] || (t[2] = [
164
+ r("div", { class: "circle stepCircle" }, null, -1)
165
+ ]))) : a("", !0)
166
+ ]),
167
+ r("div", E, [
168
+ (o(!0), i(f, null, g(e.getNavSteps(e.$env.content.dataProviderInterface.specification).distributions, (n, s) => (o(), i("div", { key: s }, [
169
+ S(c, { name: n }, {
170
+ default: C(() => [
171
+ S(u, {
172
+ schema: e.schema[n],
173
+ library: e.library
174
+ }, null, 8, ["schema", "library"]),
175
+ n === "Mandatory" ? (o(), i("p", G, [
176
+ t[3] || (t[3] = r("b", null, "*", -1)),
177
+ k(" " + l(e.$t("message.dataupload.steps.MandatoryStep")), 1)
178
+ ])) : a("", !0)
179
+ ]),
180
+ _: 2
181
+ }, 1032, ["name"])
182
+ ]))), 128))
183
+ ])
184
+ ]))
185
+ ])
186
+ ]),
187
+ _: 1
188
+ }, 8, ["plugins"]),
189
+ r("div", H, [
190
+ e.indexOfDis > 1 ? (o(), i("button", {
191
+ key: 0,
192
+ type: "button",
193
+ class: "btn btn-secondary",
194
+ onClick: t[0] || (t[0] = (n) => {
195
+ e.goToPreviousStep(), e.scrollToTop(), e.indexOfDis = e.indexOfDis - 1;
196
+ })
197
+ }, l(e.$t("message.dataupload.steps.previousDisStep")), 1)) : a("", !0),
198
+ e.indexOfDis < 4 ? (o(), i("button", {
199
+ key: 1,
200
+ type: "button",
201
+ class: "btn btn-secondary ml-3",
202
+ onClick: t[1] || (t[1] = (n) => {
203
+ e.goToNextStep(), e.scrollToTop(), e.indexOfDis = e.indexOfDis + 1;
204
+ })
205
+ }, l(e.$t("message.dataupload.steps.nextDisStep")), 1)) : a("", !0)
206
+ ])
207
+ ], 64);
208
+ }
209
+ const te = /* @__PURE__ */ V(B, [["render", U]]);
210
+ export {
211
+ te as default
212
+ };
@@ -0,0 +1,62 @@
1
+ import { createElementBlock as o, createCommentVNode as p, openBlock as a, createElementVNode as n, createTextVNode as l, toDisplayString as d, Fragment as u, renderList as c, createBlock as i, resolveDynamicComponent as m, normalizeClass as g, withCtx as y } from "vue";
2
+ /* empty css */
3
+ import _ from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const h = {
5
+ name: "Dropup",
6
+ props: {
7
+ groupName: {
8
+ type: String
9
+ },
10
+ groupItems: {
11
+ type: Array
12
+ },
13
+ show: {
14
+ type: Boolean
15
+ },
16
+ isCatalog: {
17
+ type: Boolean
18
+ },
19
+ isOperator: {
20
+ type: Boolean
21
+ }
22
+ }
23
+ }, f = {
24
+ key: 0,
25
+ class: "btn-group dropup"
26
+ }, k = {
27
+ type: "button",
28
+ class: "dpi-menu-dropup-btn btn btn-default dropdown-toggle",
29
+ "data-toggle": "dropdown",
30
+ "aria-haspopup": "true",
31
+ "aria-expanded": "false"
32
+ }, b = { class: "dropdown-menu" }, C = ["data-cy"];
33
+ function w(r, s, t, B, D, N) {
34
+ return t.show && !t.isCatalog || t.show && t.isCatalog && t.isOperator ? (a(), o("div", f, [
35
+ n("button", k, [
36
+ l(d(r.$t("message.dataupload.menu." + t.groupName)), 1),
37
+ s[0] || (s[0] = n("span", { class: "caret" }, null, -1))
38
+ ]),
39
+ n("ul", b, [
40
+ (a(!0), o(u, null, c(t.groupItems, (e) => (a(), o("li", {
41
+ key: e.key,
42
+ "data-cy": e.key
43
+ }, [
44
+ (a(), i(m(e.handler ? "a" : "router-link"), {
45
+ class: g(["dropdown-item", { disabled: e.disabled }]),
46
+ to: e.to || { name: "Datasets" },
47
+ href: e.handler ? "#" : "",
48
+ onClick: (v) => e.handler ? e.handler() : null
49
+ }, {
50
+ default: y(() => [
51
+ l(d(r.$t("message.dataupload.menu." + e.name)), 1)
52
+ ]),
53
+ _: 2
54
+ }, 1032, ["class", "to", "href", "onClick"]))
55
+ ], 8, C))), 128))
56
+ ])
57
+ ])) : p("", !0);
58
+ }
59
+ const E = /* @__PURE__ */ _(h, [["render", w], ["__scopeId", "data-v-5be20074"]]);
60
+ export {
61
+ E as default
62
+ };
@@ -0,0 +1,278 @@
1
+ import { mapActions as b, mapGetters as U } from "vuex";
2
+ import F from "axios";
3
+ import C from "../utils/general-helper.js";
4
+ import { getNode as V } from "@formkit/core";
5
+ import { resolveComponent as E, createElementBlock as a, openBlock as n, Fragment as x, createElementVNode as d, createCommentVNode as u, createVNode as y, toDisplayString as f, mergeProps as _, withDirectives as O, vModelText as S, createTextVNode as A, renderList as T, reactive as G, ref as P } from "vue";
6
+ import { onClickOutside as L } from "@vueuse/core";
7
+ import { useRuntimeEnv as q } from "../../composables/useRuntimeEnv.js";
8
+ import "@formkit/vue";
9
+ import { useI18n as D } from "vue-i18n";
10
+ /* empty css */
11
+ import N from "../../_virtual/_plugin-vue_export-helper.js";
12
+ const B = {
13
+ props: {
14
+ context: {
15
+ type: Object,
16
+ required: !0
17
+ }
18
+ },
19
+ data() {
20
+ var l;
21
+ return {
22
+ inputChoice: "",
23
+ error: "",
24
+ URLValue: "",
25
+ uploadURL: !1,
26
+ uploadFileSwitch: !1,
27
+ checkifSet: !1,
28
+ isLoading: !1,
29
+ success: !1,
30
+ fail: !1,
31
+ validExtensions: ((l = this.$env.content.dataProviderInterface.uploadFileTypes) == null ? void 0 : l.split(",")) || []
32
+ };
33
+ },
34
+ computed: {
35
+ ...U("auth", [
36
+ "getUserData",
37
+ "getIsEditMode"
38
+ ]),
39
+ ...U("dpiStore", [
40
+ "getData"
41
+ ]),
42
+ getCatalogue() {
43
+ return V("dcat:catalog").value;
44
+ }
45
+ },
46
+ methods: {
47
+ ...b("dpiStore", [
48
+ "saveLocalstorageValues"
49
+ ]),
50
+ toggleUploadUrl() {
51
+ this.inputChoice = this.t("message.dataupload.datasets.conditional.fileupload"), this.uploadURL && (this.uploadURL = !this.uploadURL);
52
+ },
53
+ toggleUploadFileSwitch() {
54
+ this.inputChoice = this.t("message.dataupload.datasets.conditional.URL"), this.uploadFileSwitch && (this.uploadFileSwitch = !this.uploadFileSwitch);
55
+ },
56
+ validateFile(l) {
57
+ const o = "." + l.target.files[0].name.split(".").pop().toLowerCase();
58
+ this.validExtensions && this.validExtensions.length ? this.validExtensions.includes(o) ? this.uploadOrReplaceFile({ file: l.target.files[0] }) : console.log("Wrong filetype") : (this.error = "", this.uploadOrReplaceFile({ file: l.target.files[0] }));
59
+ },
60
+ async saveUrl() {
61
+ this.URLValue.includes("http://") || this.URLValue.includes("https://") ? await this.context.node.input({ "@id": this.URLValue, mode: this.inputChoice }) : await this.context.node.input({ "@id": "https://" + this.URLValue, mode: this.inputChoice });
62
+ },
63
+ checkIfPresent() {
64
+ if (this.context.value["@id"])
65
+ return this.URLValue = this.context.value["@id"], !0;
66
+ },
67
+ // finds the parent input group of a given element.
68
+ findParentInputGroupOfElement(l) {
69
+ let e = l;
70
+ for (; e; ) {
71
+ if (e.classList.contains("formkit-input-group-repeatable"))
72
+ return e;
73
+ e = e.parentElement;
74
+ }
75
+ return null;
76
+ },
77
+ // finds the index of the distribution access URL based on the root of this component.
78
+ findDistributionAccessUrlIndex() {
79
+ const l = this.$refs.fileupload, e = this.findParentInputGroupOfElement(l);
80
+ if (!e) return null;
81
+ const s = e.parentElement.querySelectorAll(".formkit-input-group-repeatable");
82
+ return Array.from(s).indexOf(e);
83
+ },
84
+ async uploadOrReplaceFile({ file: l }) {
85
+ var s, t, r, c, i, p, g;
86
+ const e = ((r = (t = (s = this.$env) == null ? void 0 : s.content) == null ? void 0 : t.dataProviderInterface) == null ? void 0 : r.enableFileUploadReplace) || !1, o = ((c = this.$route.query) == null ? void 0 : c.edit) ?? !1;
87
+ if (e && o) {
88
+ const k = (i = this.$route.query) == null ? void 0 : i.edit, w = this.findDistributionAccessUrlIndex(), h = (p = this.getData("distributions")) == null ? void 0 : p[k], m = (g = h == null ? void 0 : h["dcat:accessURL"]) == null ? void 0 : g[w], v = m == null ? void 0 : m["@id"];
89
+ if (v) {
90
+ const I = this.$env.api.fileUploadUrl, R = C.getFileIdByAccessUrl({ accessUrl: v, fileUploadUrl: I });
91
+ return await this.uploadFile(l, {
92
+ method: "PUT",
93
+ url: `${this.$env.api.fileUploadUrl}data/${R}?catalog=${this.getCatalogue}`
94
+ });
95
+ }
96
+ }
97
+ return await this.uploadFile(l);
98
+ },
99
+ async uploadFile(l, e = {}) {
100
+ this.isLoading = !0;
101
+ const o = new FormData();
102
+ o.append("file", l);
103
+ const s = this.getCatalogue, t = this.getUserData.rtpToken, r = {
104
+ method: "POST",
105
+ url: `${this.$env.api.fileUploadUrl}data?catalog=${s}`,
106
+ ...e
107
+ }, c = {
108
+ method: r.method,
109
+ url: r.url,
110
+ headers: {
111
+ "Content-Type": "multipart/form-data",
112
+ Authorization: `Bearer ${t}`
113
+ },
114
+ data: o
115
+ };
116
+ try {
117
+ const i = await F.request(c), p = i.data.result.location.substring(i.data.result.location.indexOf("/") + 1);
118
+ this.context.model = `${this.$env.api.fileUploadUrl}${p}`, this.isLoading = !1, this.success = !0, await this.context.node.input({ "@id": `${this.$env.api.fileUploadUrl}${p}` });
119
+ } catch (i) {
120
+ this.isLoading = !1, this.fail = !0, console.error(i);
121
+ }
122
+ }
123
+ },
124
+ mounted() {
125
+ this.$nextTick(function() {
126
+ if (this.context.value["@id"])
127
+ return this.uploadURL = !0, this.URLValue = this.context.value["@id"], this.inputChoice = "Provide an URL", !0;
128
+ });
129
+ },
130
+ setup() {
131
+ const { t: l } = D();
132
+ q();
133
+ var e = G({
134
+ active: !1
135
+ });
136
+ const o = P("fload");
137
+ L(o, (t) => {
138
+ e.active = !1;
139
+ });
140
+ function s(t) {
141
+ e.active = !e.active;
142
+ }
143
+ return {
144
+ drop: e,
145
+ onClickOutside: L,
146
+ triggerDropdown: s,
147
+ t: l
148
+ };
149
+ }
150
+ }, H = { class: "position-relative w-100" }, K = {
151
+ key: 0,
152
+ ref: "fLoad",
153
+ class: "selectListUpload fileuploadList"
154
+ }, M = {
155
+ key: 0,
156
+ class: "w-100 position-relative"
157
+ }, W = ["data-type"], j = { class: "file-div position-relative" }, z = ["accept"], J = {
158
+ class: "upload-feedback position-absolute d-flex",
159
+ style: { right: "0" }
160
+ }, Q = {
161
+ key: 0,
162
+ class: "lds-ring"
163
+ }, X = { key: 1 }, Y = { key: 2 }, Z = {
164
+ key: 0,
165
+ class: "dURLText my-3"
166
+ }, $ = ["href"], ee = {
167
+ key: 1,
168
+ class: "allowedTypesWrapper"
169
+ }, te = {
170
+ key: 0,
171
+ class: "errorSub my-3 d-flex"
172
+ }, ie = { class: "d-flex flex-wrap w-100" };
173
+ function le(l, e, o, s, t, r) {
174
+ const c = E("FormKit");
175
+ return n(), a(x, null, [
176
+ d("div", H, [
177
+ y(c, {
178
+ name: "mode",
179
+ validation: "required",
180
+ type: "text",
181
+ class: "selectInputField formkit-inner",
182
+ readonly: "readonly",
183
+ onClick: e[0] || (e[0] = (i) => s.triggerDropdown()),
184
+ placeholder: s.t("message.dataupload.info.preferredInput"),
185
+ modelValue: t.inputChoice,
186
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => t.inputChoice = i),
187
+ "validation-messages": {
188
+ required: s.t("message.dataupload.info.preferredInput")
189
+ }
190
+ }, null, 8, ["placeholder", "modelValue", "validation-messages"]),
191
+ s.drop.active ? (n(), a("ul", K, [
192
+ d("li", {
193
+ onClick: e[2] || (e[2] = (i) => {
194
+ t.uploadFileSwitch = !0, r.toggleUploadUrl();
195
+ }),
196
+ class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
197
+ }, f(l.$t("message.dataupload.datasets.conditional.fileupload")), 1),
198
+ d("li", {
199
+ onClick: e[3] || (e[3] = (i) => {
200
+ t.uploadURL = !0, r.toggleUploadFileSwitch();
201
+ }),
202
+ class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
203
+ }, f(l.$t("message.dataupload.datasets.conditional.URL")), 1)
204
+ ], 512)) : u("", !0)
205
+ ]),
206
+ t.uploadURL && !t.uploadFileSwitch ? (n(), a("div", M, [
207
+ y(c, {
208
+ id: "aUrlLink",
209
+ modelValue: t.URLValue,
210
+ "onUpdate:modelValue": e[4] || (e[4] = (i) => t.URLValue = i),
211
+ class: "selectInputField formkit-inner",
212
+ type: "url",
213
+ name: "@id",
214
+ placeholder: o.context.attrs.placeholder,
215
+ onInput: r.saveUrl,
216
+ validation: "required|url",
217
+ "validation-visibility": "live",
218
+ "validation-messages": {
219
+ required: s.t("message.dataupload.datasets.conditional.URL"),
220
+ url: s.t("message.dataupload.info.urlFormat")
221
+ }
222
+ }, null, 8, ["modelValue", "placeholder", "onInput", "validation-messages"])
223
+ ])) : u("", !0),
224
+ t.uploadFileSwitch ? (n(), a("div", _({
225
+ key: 1,
226
+ ref: "fileupload",
227
+ class: ["p-3 w-100", `formkit-input-element formkit-input-element--${o.context.type}`],
228
+ "data-type": o.context.type
229
+ }, l.$attrs), [
230
+ O(d("input", {
231
+ type: "text",
232
+ "onUpdate:modelValue": e[5] || (e[5] = (i) => o.context.model = i),
233
+ onBlur: e[6] || (e[6] = (...i) => o.context.blurHandler && o.context.blurHandler(...i)),
234
+ hidden: ""
235
+ }, null, 544), [
236
+ [S, o.context.model]
237
+ ]),
238
+ d("div", j, [
239
+ d("input", {
240
+ class: "mt-3",
241
+ type: "file",
242
+ id: "aUrlFL",
243
+ name: "fileUpload",
244
+ onChange: e[7] || (e[7] = (i) => r.validateFile(i)),
245
+ accept: t.validExtensions
246
+ }, null, 40, z),
247
+ d("div", J, [
248
+ t.isLoading ? (n(), a("div", Q)) : u("", !0),
249
+ t.success ? (n(), a("div", X, e[8] || (e[8] = [
250
+ d("i", { class: "material-icons d-flex check-icon" }, "check_circle", -1)
251
+ ]))) : u("", !0),
252
+ t.fail ? (n(), a("div", Y, e[9] || (e[9] = [
253
+ d("i", { class: "material-icons d-flex close-icon" }, "error", -1)
254
+ ]))) : u("", !0)
255
+ ])
256
+ ]),
257
+ t.success ? (n(), a("p", Z, [
258
+ A(f(l.$t("message.metadata.downloadUrl")) + ": ", 1),
259
+ d("a", {
260
+ href: o.context.model
261
+ }, f(o.context.model), 9, $)
262
+ ])) : u("", !0),
263
+ t.validExtensions && t.validExtensions.length ? (n(), a("div", ee, [
264
+ t.success ? u("", !0) : (n(), a("p", te, "Allowed types: ")),
265
+ d("div", ie, [
266
+ (n(!0), a(x, null, T(t.validExtensions, (i) => (n(), a("span", {
267
+ key: i,
268
+ class: "mr-1 mb-1 allowedFTypes"
269
+ }, f(i), 1))), 128))
270
+ ])
271
+ ])) : u("", !0)
272
+ ], 16, W)) : u("", !0)
273
+ ], 64);
274
+ }
275
+ const me = /* @__PURE__ */ N(B, [["render", le], ["__scopeId", "data-v-1453da2b"]]);
276
+ export {
277
+ me as default
278
+ };
@@ -0,0 +1,106 @@
1
+ import { ref as i, computed as D, onMounted as P, createElementBlock as m, openBlock as f, createElementVNode as o, createCommentVNode as C, createVNode as v, toDisplayString as d, unref as p, getCurrentInstance as H } from "vue";
2
+ import { useI18n as I } from "vue-i18n";
3
+ import { getHvdCategories as x } from "../HappyFlowComponents/services/dpiV3_apis.js";
4
+ /* empty css */
5
+ /* empty css */
6
+ import k from "../HappyFlowComponents/ui/SwitchV3.vue.js";
7
+ import F from "../HappyFlowComponents/ui/Dropdown.vue.js";
8
+ import { PhWarning as T } from "@phosphor-icons/vue";
9
+ /* empty css */
10
+ import $ from "../../_virtual/_plugin-vue_export-helper.js";
11
+ const W = { class: "V3-typography" }, B = { class: "dpiV3_Frame_831" }, E = { class: "dpiV3_Frame_840" }, K = { class: "dpiV3_title" }, N = { class: "dpiV3_intro copy-large-regular" }, O = { class: "dpiV3_Frame_830" }, z = { class: "dpiV3_Switch" }, L = { class: "dpiV3_Switch_Label copy-large-semi-bold" }, M = { class: "dpiV3_Sub_Info copy-large-regular" }, U = {
12
+ key: 0,
13
+ class: "dpiV3_errormsgWrapper"
14
+ }, j = {
15
+ __name: "HVDPage",
16
+ props: {
17
+ context: Object
18
+ },
19
+ setup(g) {
20
+ const { t: A } = I(), s = i(!1), r = i(""), _ = i([]), h = i(null), c = i([]);
21
+ let l = i([{ isValid: !0 }]);
22
+ const V = (e) => {
23
+ s.value = !e, s.value ? (l.value[0] = { isValid: !1 }, r.value = "") : (l.value[0] = { isValid: !0 }, r.value = ""), console.log("switchStateValue: ", s.value);
24
+ }, u = g;
25
+ u.context.node.value.length === 0 && u.context.node.input(l.value);
26
+ const b = D(
27
+ () => c.value.map((e) => ({
28
+ "@value": e.label,
29
+ selected: !1
30
+ }))
31
+ ), w = (e) => {
32
+ const t = c.value.find(
33
+ (a) => a.label === e.target.innerHTML
34
+ );
35
+ u.context.node.input([
36
+ { isValid: !0, label: t.label, uri: t.uri }
37
+ ]), console.log(t);
38
+ }, S = async () => {
39
+ try {
40
+ const e = H().appContext.app.config.globalProperties.$env, a = (await x(e.api.baseUrl)).sort(
41
+ (n, y) => n.pref_label.de.localeCompare(y.pref_label.de)
42
+ );
43
+ _.value = a, c.value = a.map((n) => ({
44
+ label: n.pref_label.de,
45
+ uri: n.resource
46
+ }));
47
+ } catch (e) {
48
+ console.error("Error in component:", e), h.value = e;
49
+ }
50
+ };
51
+ return P(() => {
52
+ S();
53
+ }), (e, t) => (f(), m("div", W, [
54
+ o("div", B, [
55
+ o("div", E, [
56
+ o("h4", K, d(e.$t("message.dataupload.datasets.hvdPage.title")), 1),
57
+ o("div", N, d(e.$t("message.dataupload.datasets.hvdPage.intro-text")), 1),
58
+ o("div", O, [
59
+ o("div", z, [
60
+ v(k, {
61
+ onSwitchToggled: t[0] || (t[0] = (a) => p(l)[0].isValid === !0 ? V(s.value) : (p(l)[0].isValid = !0, s.value = !s.value)),
62
+ hasIcon: !1,
63
+ defaultChecked: !1,
64
+ disabled: !1
65
+ })
66
+ ]),
67
+ o("div", L, d(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
68
+ ]),
69
+ o("div", M, d(e.$t("message.dataupload.datasets.hvdPage.sub-info")), 1),
70
+ v(F, {
71
+ dropdownWidth: "large",
72
+ isDisabled: !s.value,
73
+ type: "inputField",
74
+ modelValue: r.value,
75
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => r.value = a),
76
+ inputFieldProps: {
77
+ isDisabled: !s.value,
78
+ addOnText: !1,
79
+ initialHintText: !1,
80
+ datePicker: !1,
81
+ infoIcon: !1,
82
+ preIcon: !1,
83
+ label: "HVD-Kategorie",
84
+ dropdown_dpiV3: !0,
85
+ placeholder: "Wählen Sie eine HVD-Kategorie",
86
+ inputFieldSize: "large",
87
+ modelValue: r.value
88
+ },
89
+ data: b.value,
90
+ onClick: t[2] || (t[2] = (a) => w(a))
91
+ }, null, 8, ["isDisabled", "modelValue", "inputFieldProps", "data"])
92
+ ]),
93
+ p(l).find((a) => a.isValid === !1) ? (f(), m("div", U, [
94
+ v(p(T), {
95
+ size: 16,
96
+ weight: "fill"
97
+ }),
98
+ t[3] || (t[3] = o("span", { class: "copy-mini-regular" }, "Bitte wählen Sie eine HVD-Kategorie aus, bevor Sie fortfahren.", -1))
99
+ ])) : C("", !0)
100
+ ])
101
+ ]));
102
+ }
103
+ }, ae = /* @__PURE__ */ $(j, [["__scopeId", "data-v-9c7f317c"]]);
104
+ export {
105
+ ae as default
106
+ };