@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,34 @@
1
+ import { ref as r, reactive as c, watch as p, toRef as f } from "vue";
2
+ import { getNode as v, createMessage as m } from "@formkit/core";
3
+ function k() {
4
+ const s = r(""), a = c({});
5
+ let n = r([]);
6
+ const u = r([]);
7
+ return p(s, (e, t) => {
8
+ t && !u.value.includes(t) && u.value.push(t), u.value.forEach((l) => {
9
+ const i = v(l);
10
+ i !== void 0 && i.walk((o) => {
11
+ o.store.set(
12
+ m({
13
+ key: "submitted",
14
+ value: !0,
15
+ visible: !1
16
+ })
17
+ );
18
+ });
19
+ });
20
+ }), { visitedSteps: u, activeStep: s, steps: a, subSteps: n, stepPlugin: (e) => {
21
+ if (e.props.type == "group")
22
+ return a[e.name] = a[e.name] || {}, e.on("created", () => {
23
+ const t = f(e.context.state, "valid");
24
+ a[e.name].valid = t;
25
+ }), e.on("count:blocking", ({ payload: t }) => {
26
+ a[e.name].blockingCount = t;
27
+ }), e.on("count:errors", ({ payload: t }) => {
28
+ a[e.name].errorCount = t;
29
+ }), s.value === "" && (s.value = e.name), n.value.push(e.value), !1;
30
+ } };
31
+ }
32
+ export {
33
+ k as default
34
+ };
@@ -0,0 +1,100 @@
1
+ import { ref as p, onMounted as k, nextTick as C, resolveComponent as A, createElementBlock as u, openBlock as r, Fragment as m, createElementVNode as i, toDisplayString as a, createVNode as v, withCtx as $, renderList as w, normalizeClass as V } from "vue";
2
+ import { useStore as F } from "vuex";
3
+ import S from "../components/DistributionStepper.vue.js";
4
+ import { cloneDeep as h } from "lodash-es";
5
+ const j = {
6
+ name: "distribution-stepper-list",
7
+ class: "distributionsListClass"
8
+ }, E = { class: "d-flex m-4 align-items-center justify-content-between" }, I = { class: "m-0" }, O = ["onClick"], B = ["onClick"], P = {
9
+ __name: "DistributionInputPage",
10
+ props: {
11
+ values: Object,
12
+ schema: Object
13
+ },
14
+ setup(L) {
15
+ const n = L, d = p([]), c = F(), s = p({
16
+ disList: []
17
+ });
18
+ k(async () => {
19
+ if (await C(), n.values.Distributions.distributionList.length != 0)
20
+ for (let t = 0; t < n.values.Distributions.distributionList.length; t++)
21
+ d.value.push("distribution " + t), s.value.disList.push({ name: "distribution " + t, isActive: !1 });
22
+ });
23
+ const f = () => {
24
+ s.value.disList.push({ name: "distribution " + s.value.disList.length, isActive: !1 }), b(s.value.disList.length - 1);
25
+ }, b = (t) => {
26
+ s.value.disList.forEach(
27
+ (e, l) => {
28
+ t != l && (e.isActive = !1);
29
+ }
30
+ ), s.value.disList[t].isActive = !s.value.disList[t].isActive;
31
+ }, D = (t) => {
32
+ const e = h(n.values);
33
+ e.Distributions.distributionList.splice(t, 1), c.dispatch("dpiStore/saveFormValues", { property: "datasets", values: e }), s.value.disList.splice(t, 1);
34
+ }, y = () => {
35
+ const t = h(n.values);
36
+ t.Distributions.distributionList = [], c.dispatch("dpiStore/saveFormValues", { property: "datasets", values: t }), s.value.disList = [];
37
+ };
38
+ return (t, e) => {
39
+ const l = A("FormKit");
40
+ return r(), u(m, null, [
41
+ i("h1", null, a(t.$t("message.dataupload.info.distributions")), 1),
42
+ e[0] || (e[0] = i("hr", null, null, -1)),
43
+ i("div", j, [
44
+ v(l, {
45
+ type: "list",
46
+ name: "distributionList"
47
+ }, {
48
+ default: $(() => [
49
+ (r(!0), u(m, null, w(s.value.disList, (g, o) => (r(), u("section", {
50
+ key: o,
51
+ class: "distributionOuter"
52
+ }, [
53
+ i("div", E, [
54
+ i("h2", I, "Distribution " + a(o + 1), 1),
55
+ i("div", null, [
56
+ i("button", {
57
+ class: "btn btn-secondary",
58
+ type: "button",
59
+ onClick: (_) => b(o)
60
+ }, a(t.$t("message.datasetDetails.edit")), 9, O),
61
+ i("button", {
62
+ class: "btn btn-secondary",
63
+ type: "button",
64
+ onClick: (_) => D(o)
65
+ }, a(t.$t("message.datasetDetails.delete")), 9, B)
66
+ ])
67
+ ]),
68
+ i("div", {
69
+ class: V(["disInputWrapper", { "d-none": !s.value.disList[o].isActive }])
70
+ }, [
71
+ v(S, {
72
+ name: g.name,
73
+ index: o,
74
+ schema: n.schema,
75
+ values: n.values,
76
+ distributionList: d.value
77
+ }, null, 8, ["name", "index", "schema", "values", "distributionList"])
78
+ ], 2)
79
+ ]))), 128))
80
+ ]),
81
+ _: 1
82
+ }),
83
+ i("button", {
84
+ type: "button",
85
+ class: "btn btn-secondary",
86
+ onClick: f
87
+ }, a(t.$t("message.dataupload.info.newDistribution")), 1),
88
+ i("button", {
89
+ type: "button",
90
+ class: "btn btn-secondary",
91
+ onClick: y
92
+ }, a(t.$t("message.dataupload.info.deleteDistribution")), 1)
93
+ ])
94
+ ], 64);
95
+ };
96
+ }
97
+ };
98
+ export {
99
+ P as default
100
+ };
@@ -0,0 +1,201 @@
1
+ import b from "jquery";
2
+ import { has as m, isEmpty as s } from "lodash-es";
3
+ import { mapActions as v, mapGetters as p } from "vuex";
4
+ import { truncate as g } from "../../utils/helpers.js";
5
+ import { createElementBlock as l, openBlock as d, createElementVNode as e, createCommentVNode as n, toDisplayString as o, Fragment as f, renderList as D, createTextVNode as y } from "vue";
6
+ /* empty css */
7
+ import $ from "../../_virtual/_plugin-vue_export-helper.js";
8
+ const _ = {
9
+ props: ["distributionOverviewPage"],
10
+ data() {
11
+ return {
12
+ distributionToDelete: 0,
13
+ distributionData: []
14
+ };
15
+ },
16
+ computed: {
17
+ ...p("dpiStore", [
18
+ "getNumberOfDistributions",
19
+ "getNavSteps",
20
+ "getData"
21
+ ])
22
+ },
23
+ methods: {
24
+ ...v("dpiStore", [
25
+ "addDistribution",
26
+ "saveLocalstorageValues",
27
+ "deleteDistribution",
28
+ "setDeleteDistributionInline"
29
+ ]),
30
+ truncate: g,
31
+ deleteDist() {
32
+ this.deleteDistribution(this.distributionToDelete), this.setDeleteDistributionInline(!0), b("#deleteDistributionModal").modal("hide"), this.$router.push({ path: `${this.$env.content.dataProviderInterface.basePath}/datasets/distoverview`, query: { locale: this.$route.query.locale } }).catch(() => {
33
+ });
34
+ },
35
+ triggerDeleteModal(t) {
36
+ this.distributionToDelete = t, b("#deleteDistributionModal").modal({ show: !0 });
37
+ },
38
+ getDistributionFormat(t) {
39
+ return s(t["dct:format"]) ? "UNKNOWN" : t["dct:format"].substring(t["dct:format"].lastIndexOf("/") + 1);
40
+ },
41
+ redirectToDistributionForm(t) {
42
+ const i = this.getNavSteps(this.$env.content.dataProviderInterface.specification).distributions[0];
43
+ this.$router.push({
44
+ path: `${this.$env.content.dataProviderInterface.basePath}/distributions/${i}/${t}`,
45
+ query: {
46
+ locale: this.$route.query.locale,
47
+ edit: t
48
+ }
49
+ }).catch(() => {
50
+ });
51
+ },
52
+ createDistribution() {
53
+ this.addDistribution();
54
+ const i = this.getNumberOfDistributions - 1, u = this.getNavSteps(this.$env.content.dataProviderInterface.specification).distributions[0];
55
+ this.$router.push(`${this.$env.content.dataProviderInterface.basePath}/distributions/${u}/${i}?locale=${this.$i18n.locale}`);
56
+ },
57
+ titleExists(t) {
58
+ return !s(t["dct:title"]) && !s(t["dct:title"][0]) && m(t["dct:title"][0], "@value") && !s(t["dct:title"][0]["@value"]);
59
+ },
60
+ descriptionExists(t) {
61
+ return !s(t["dct:description"]) && !s(t["dct:description"][0]) && m(t["dct:description"][0], "@value") && !s(t["dct:description"][0]["@value"]);
62
+ },
63
+ accessExists(t) {
64
+ return !s(t["dcat:accessURL"]) && !s(t["dcat:accessURL"][0]) && m(t["dcat:accessURL"][0], "@id") && !s(t["dcat:accessURL"][0]["@id"]);
65
+ }
66
+ }
67
+ }, w = { class: "dist-list" }, L = {
68
+ key: 0,
69
+ class: "list-unstyled"
70
+ }, k = { class: "dist-details" }, N = { class: "dist-info" }, P = {
71
+ key: 0,
72
+ style: { "font-weight": "bold" }
73
+ }, M = {
74
+ key: 1,
75
+ style: { color: "#868e96" }
76
+ }, C = {
77
+ key: 2,
78
+ style: { color: "#868e96" }
79
+ }, x = { class: "dist-edit justify-content-end" }, E = ["onClick"], I = ["onClick"], O = {
80
+ key: 1,
81
+ class: "list-unstyled"
82
+ }, z = {
83
+ class: "modal fade",
84
+ id: "deleteDistributionModal",
85
+ tabindex: "-1",
86
+ role: "dialog",
87
+ "aria-labelledby": "deleteModalLabel",
88
+ "aria-hidden": "true",
89
+ "data-cy": "citation-modal"
90
+ }, S = {
91
+ class: "modal-dialog modal-lg",
92
+ role: "document"
93
+ }, T = { class: "modal-content" }, U = { class: "modal-header" }, q = {
94
+ class: "modal-title",
95
+ id: "deleteModalLabel"
96
+ }, A = { class: "modal-body" }, R = { class: "modal-footer" }, B = {
97
+ "data-dismiss": "modal",
98
+ id: "cancel"
99
+ };
100
+ function F(t, i, u, V, j, r) {
101
+ return d(), l("div", null, [
102
+ e("div", w, [
103
+ e("h3", null, o(t.$t("message.metadata.distributions")), 1),
104
+ i[6] || (i[6] = e("hr", null, null, -1)),
105
+ t.getData("distributions").length > 0 ? (d(), l("ul", L, [
106
+ (d(!0), l(f, null, D(t.getData("distributions"), (a, c) => (d(), l("li", {
107
+ key: c,
108
+ class: "dist-item"
109
+ }, [
110
+ e("div", k, [
111
+ e("div", N, [
112
+ r.accessExists(a) ? (d(), l("span", P, o(a["dcat:accessURL"][0]["@id"]), 1)) : n("", !0),
113
+ i[3] || (i[3] = e("br", null, null, -1)),
114
+ r.titleExists(a) ? (d(), l("span", M, [
115
+ y(o(a["dct:title"][0]["@value"]), 1),
116
+ i[2] || (i[2] = e("br", null, null, -1))
117
+ ])) : n("", !0),
118
+ r.descriptionExists(a) ? (d(), l("span", C, o(a["dct:description"][0]["@value"]), 1)) : n("", !0)
119
+ ]),
120
+ e("div", x, [
121
+ e("span", {
122
+ onClick: (h) => r.redirectToDistributionForm(c),
123
+ class: "dist-edit-button p-2"
124
+ }, i[4] || (i[4] = [
125
+ e("svg", {
126
+ xmlns: "http://www.w3.org/2000/svg",
127
+ width: "25",
128
+ height: "25",
129
+ fill: "currentColor",
130
+ class: "bi bi-pencil-square",
131
+ viewBox: "0 0 16 16"
132
+ }, [
133
+ e("path", { d: "M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" }),
134
+ e("path", {
135
+ "fill-rule": "evenodd",
136
+ d: "M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z"
137
+ })
138
+ ], -1)
139
+ ]), 8, E),
140
+ e("span", {
141
+ onClick: (h) => r.triggerDeleteModal(c),
142
+ class: "dist-delete-button p-2"
143
+ }, i[5] || (i[5] = [
144
+ e("svg", {
145
+ xmlns: "http://www.w3.org/2000/svg",
146
+ width: "25",
147
+ height: "25",
148
+ fill: "currentColor",
149
+ class: "bi bi-x-circle",
150
+ viewBox: "0 0 16 16"
151
+ }, [
152
+ e("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" }),
153
+ e("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" })
154
+ ], -1)
155
+ ]), 8, I)
156
+ ])
157
+ ])
158
+ ]))), 128))
159
+ ])) : (d(), l("ul", O, [
160
+ e("li", null, o(t.$t("message.dataupload.noDistributions")), 1)
161
+ ])),
162
+ u.distributionOverviewPage ? (d(), l("button", {
163
+ key: 2,
164
+ class: "default",
165
+ onClick: i[0] || (i[0] = (...a) => r.createDistribution && r.createDistribution(...a))
166
+ }, o(t.$t("message.dataupload.newDistribution")), 1)) : n("", !0)
167
+ ]),
168
+ e("div", z, [
169
+ e("div", S, [
170
+ e("div", T, [
171
+ e("div", U, [
172
+ e("h2", q, o(t.$t("message.dataupload.deletemodal.deleteDistribution")), 1),
173
+ i[7] || (i[7] = e("button", {
174
+ type: "button",
175
+ class: "close",
176
+ "data-dismiss": "modal",
177
+ "aria-label": "Close"
178
+ }, [
179
+ e("span", { "aria-hidden": "true" }, "×")
180
+ ], -1))
181
+ ]),
182
+ e("div", A, [
183
+ e("h3", null, o(t.$t("message.dataupload.deletemodal.areyousure")), 1),
184
+ i[8] || (i[8] = e("div", { class: "mt-3 d-flex justify-content-start align-items-center" }, null, -1))
185
+ ]),
186
+ e("div", R, [
187
+ e("button", B, o(t.$t("message.datasetDetails.datasets.modal.cancel")), 1),
188
+ e("button", {
189
+ onClick: i[1] || (i[1] = (a) => r.deleteDist()),
190
+ id: "delete"
191
+ }, o(t.$t("message.datasetDetails.delete")), 1)
192
+ ])
193
+ ])
194
+ ])
195
+ ])
196
+ ]);
197
+ }
198
+ const Y = /* @__PURE__ */ $(_, [["render", F], ["__scopeId", "data-v-604e83ef"]]);
199
+ export {
200
+ Y as default
201
+ };
@@ -0,0 +1,278 @@
1
+ import { mapActions as h, mapGetters as y } from "vuex";
2
+ import c from "jquery";
3
+ import k from "../../widgets/AppLink.vue.js";
4
+ import { useRuntimeEnv as v } from "../../composables/useRuntimeEnv.js";
5
+ import { resolveComponent as b, createElementBlock as f, openBlock as g, createElementVNode as t, createVNode as d, toDisplayString as o, Fragment as w, renderList as $, withCtx as i, createTextVNode as P } from "vue";
6
+ /* empty css */
7
+ import I from "../../_virtual/_plugin-vue_export-helper.js";
8
+ const C = {
9
+ props: [],
10
+ components: {
11
+ AppLink: k
12
+ },
13
+ data() {
14
+ return {
15
+ env: v(),
16
+ values: {},
17
+ isDuplication: localStorage.getItem("dpi_duplicate"),
18
+ duplicatedID: "",
19
+ modalProps: {
20
+ loading: !1,
21
+ message: this.$t("message.dataupload.modal.deleteDraft"),
22
+ confirm: () => null
23
+ }
24
+ };
25
+ },
26
+ computed: {
27
+ ...y("auth", [
28
+ "getUserDrafts",
29
+ "getUserData"
30
+ ]),
31
+ token() {
32
+ return this.getUserData.rtpToken;
33
+ }
34
+ },
35
+ methods: {
36
+ ...h("auth", [
37
+ "setIsDraft",
38
+ "updateUserDrafts",
39
+ "setIsEditMode"
40
+ ]),
41
+ ...h("snackbar", [
42
+ "showSnackbar"
43
+ ]),
44
+ ...h("dpiStore", [
45
+ "convertToRDF",
46
+ "clearAll",
47
+ "convertToInput"
48
+ // 'deleteDistribution',
49
+ // 'setDeleteDistributionInline',
50
+ ]),
51
+ createLinkedMetricsURL(a, e, m) {
52
+ return {
53
+ path: `/dpi/draft/${a}.${m}`,
54
+ query: {
55
+ useNormalizedId: !0,
56
+ locale: this.$route.query.locale,
57
+ catalogue: e
58
+ }
59
+ };
60
+ },
61
+ handleEdit(a, e) {
62
+ this.setIsDraft(!0), localStorage.removeItem("dpi_duplicate"), this.$router.push({ name: "DataProviderInterface-Edit", params: { catalog: e, property: "datasets", id: a }, query: { locale: this.$route.query.locale } }).catch(() => {
63
+ });
64
+ },
65
+ async handleDelete(a, e) {
66
+ await this.doRequest("auth/deleteUserDraftById", { id: a, catalog: e }), c("#modal").modal("hide"), this.showSnackbar({
67
+ message: this.$t("message.dataupload.snackBar.draftDeleted"),
68
+ variant: "success"
69
+ });
70
+ },
71
+ async handlePublish(a, e) {
72
+ await this.doRequest("auth/publishUserDraftById", { id: a, catalog: e }), c("#modal").modal("hide"), this.showSnackbar({
73
+ message: this.$t("message.dataupload.snackBar.datasetPublished"),
74
+ variant: "success"
75
+ }), this.$router.push({ name: "DatasetDetailsDataset", params: { ds_id: a }, query: { locale: this.$route.query.locale } }).catch(() => {
76
+ }), setTimeout(() => {
77
+ localStorage.removeItem("dpi_duplicate"), this.$router.go();
78
+ });
79
+ },
80
+ handleConfirmPublish(a, e) {
81
+ this.modalProps.message = this.$t("message.dataupload.modal.publishDataset"), this.modalProps.confirm = () => this.handlePublish(a, e), c("#modal").modal("show"), localStorage.removeItem("dpi_duplicate");
82
+ },
83
+ handleConfirmDelete(a, e) {
84
+ this.modalProps.message = this.$t("message.dataupload.modal.deleteDraft"), this.modalProps.confirm = () => this.handleDelete(a, e), c("#modal").modal("show"), localStorage.removeItem("dpi_duplicate");
85
+ },
86
+ handleConfirmDuplication(a, e) {
87
+ this.setIsDraft(!0), localStorage.setItem("dpi_duplicate", !0), this.$router.push({ name: "DataProviderInterface-Edit", params: { catalog: e, property: "datasets", id: a }, query: { locale: this.$route.query.locale } }).catch(() => {
88
+ console.log(error);
89
+ });
90
+ },
91
+ async doRequest(a, { id: e, newId: m, catalog: _, url: p, token: r }) {
92
+ this.$Progress.start(), this.modalProps.loading = !0;
93
+ try {
94
+ await this.$store.dispatch(a, { id: e, newId: m, catalog: _, url: p, token: r }), this.$Progress.finish();
95
+ } catch (n) {
96
+ this.showSnackbar({
97
+ message: n.message,
98
+ color: "error"
99
+ }), this.$Progress.fail();
100
+ } finally {
101
+ await new Promise((n) => setTimeout(n, 500)), this.modalProps.loading = !1;
102
+ }
103
+ }
104
+ },
105
+ created() {
106
+ this.updateUserDrafts();
107
+ }
108
+ }, L = { class: "d-flex flex-column bg-transparent container-fluid justify-content-between content draftWrapper" }, S = { class: "d-flex mt-3" }, U = { class: "logoDPIPiveau" }, x = { class: "" }, M = { class: "infoBox" }, R = { class: "d-flex" }, q = ["innerHTML"], T = { class: "d-flex align-items-center justify-content-center" }, B = { class: "table" }, E = { scope: "col" }, N = { scope: "col" }, A = { scope: "col" }, j = ["data-cy"], F = { class: "w33" }, V = { class: "w33" }, W = { class: "buttonWrapper" }, z = {
109
+ type: "button",
110
+ class: "btn btn-secondary dropDownWrap"
111
+ }, H = ["title"], G = {
112
+ class: "dropdown-menu dropdown-menu-right",
113
+ "aria-labelledby": "linkedDataDropdown"
114
+ }, J = ["onClick"], O = ["onClick"], X = ["onClick"], K = ["onClick"];
115
+ function Q(a, e, m, _, p, r) {
116
+ const n = b("app-link"), D = b("app-confirmation-dialog");
117
+ return g(), f("div", L, [
118
+ t("div", S, [
119
+ t("div", U, [
120
+ e[0] || (e[0] = t("h2", null, "DPI", -1)),
121
+ e[1] || (e[1] = t("div", { class: "dpiLogoSeperator" }, null, -1)),
122
+ t("h4", x, o(a.$t("message.dataupload.menu.draftDatasets")), 1)
123
+ ])
124
+ ]),
125
+ t("div", M, [
126
+ t("div", R, [
127
+ e[2] || (e[2] = t("svg", {
128
+ xmlns: "http://www.w3.org/2000/svg",
129
+ width: "30px",
130
+ height: "30px",
131
+ fill: "currentColor",
132
+ class: "bi bi-info-circle mr-3 mb-3 infoboxI",
133
+ viewBox: "0 0 16 16"
134
+ }, [
135
+ t("path", { d: "M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" }),
136
+ t("path", { d: "m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0" })
137
+ ], -1)),
138
+ t("p", {
139
+ innerHTML: a.$t("message.dataupload.drafts.intro")
140
+ }, null, 8, q)
141
+ ])
142
+ ]),
143
+ t("div", T, [
144
+ t("table", B, [
145
+ t("thead", null, [
146
+ t("tr", null, [
147
+ t("th", E, o(a.$t("message.dataupload.menu.Dataset")) + " ID", 1),
148
+ t("th", N, o(a.$t("message.dataupload.menu.Catalogue")) + " ID", 1),
149
+ t("th", A, o(a.$t("message.dataupload.menu.actions")), 1)
150
+ ])
151
+ ]),
152
+ t("tbody", null, [
153
+ (g(!0), f(w, null, $(a.getUserDrafts, ({ id: s, catalog: l }) => (g(), f("tr", {
154
+ key: `draft@${s}`,
155
+ "data-cy": `draft@${s}`
156
+ }, [
157
+ t("td", F, o(s), 1),
158
+ t("td", V, o(l), 1),
159
+ t("td", W, [
160
+ t("button", z, [
161
+ d(n, {
162
+ class: "dropdown-toggle text-nowrap text-decoration-none",
163
+ fragment: "#",
164
+ role: "button",
165
+ id: "linkedDataDropdown",
166
+ "data-toggle": "dropdown",
167
+ "aria-haspopup": "true",
168
+ "aria-expanded": "false"
169
+ }, {
170
+ default: i(() => [
171
+ t("span", {
172
+ title: a.$t("message.metadata.linkedData"),
173
+ "data-toggle": "tooltip",
174
+ "data-placement": "top"
175
+ }, o(a.$t("message.metadata.linkedData")), 9, H)
176
+ ]),
177
+ _: 1
178
+ }),
179
+ t("div", G, [
180
+ d(n, {
181
+ to: r.createLinkedMetricsURL(s, l, "rdf"),
182
+ target: "_blank",
183
+ class: "dropdown-item"
184
+ }, {
185
+ default: i(() => e[3] || (e[3] = [
186
+ t("div", { class: "px-2 py-1" }, "RDF/XML", -1)
187
+ ])),
188
+ _: 2,
189
+ __: [3]
190
+ }, 1032, ["to"]),
191
+ d(n, {
192
+ to: r.createLinkedMetricsURL(s, l, "ttl"),
193
+ target: "_blank",
194
+ class: "dropdown-item"
195
+ }, {
196
+ default: i(() => e[4] || (e[4] = [
197
+ t("div", { class: "px-2 py-1" }, "Turtle", -1)
198
+ ])),
199
+ _: 2,
200
+ __: [4]
201
+ }, 1032, ["to"]),
202
+ d(n, {
203
+ to: r.createLinkedMetricsURL(s, l, "n3"),
204
+ target: "_blank",
205
+ class: "dropdown-item"
206
+ }, {
207
+ default: i(() => e[5] || (e[5] = [
208
+ t("div", { class: "px-2 py-1" }, "Notation3", -1)
209
+ ])),
210
+ _: 2,
211
+ __: [5]
212
+ }, 1032, ["to"]),
213
+ d(n, {
214
+ to: r.createLinkedMetricsURL(s, l, "nt"),
215
+ target: "_blank",
216
+ class: "dropdown-item"
217
+ }, {
218
+ default: i(() => e[6] || (e[6] = [
219
+ t("div", { class: "px-2 py-1" }, "N-Triples", -1)
220
+ ])),
221
+ _: 2,
222
+ __: [6]
223
+ }, 1032, ["to"]),
224
+ d(n, {
225
+ to: r.createLinkedMetricsURL(s, l, "jsonld"),
226
+ target: "_blank",
227
+ class: "dropdown-item"
228
+ }, {
229
+ default: i(() => e[7] || (e[7] = [
230
+ t("div", { class: "px-2 py-1" }, "JSON-LD", -1)
231
+ ])),
232
+ _: 2,
233
+ __: [7]
234
+ }, 1032, ["to"])
235
+ ])
236
+ ]),
237
+ t("button", {
238
+ type: "button",
239
+ class: "btn btn-secondary",
240
+ onClick: (u) => r.handleEdit(s, l)
241
+ }, o(a.$t("message.dataupload.menu.edit")), 9, J),
242
+ t("button", {
243
+ type: "button",
244
+ class: "btn btn-primary",
245
+ onClick: (u) => r.handleConfirmPublish(s, l)
246
+ }, o(a.$t("message.dataupload.menu.publish")), 9, O),
247
+ t("button", {
248
+ type: "button",
249
+ class: "btn btn-primary",
250
+ onClick: (u) => r.handleConfirmDuplication(s, l)
251
+ }, o(a.$t("message.dataupload.menu.duplicate")), 9, X),
252
+ t("button", {
253
+ type: "button",
254
+ class: "btn btn-danger",
255
+ onClick: (u) => r.handleConfirmDelete(s, l)
256
+ }, o(a.$t("message.dataupload.menu.delete")), 9, K)
257
+ ])
258
+ ], 8, j))), 128))
259
+ ])
260
+ ])
261
+ ]),
262
+ d(D, {
263
+ id: "modal",
264
+ confirm: "Confirm",
265
+ loading: p.modalProps.loading,
266
+ onConfirm: p.modalProps.confirm
267
+ }, {
268
+ default: i(() => [
269
+ P(o(p.modalProps.message), 1)
270
+ ]),
271
+ _: 1
272
+ }, 8, ["loading", "onConfirm"])
273
+ ]);
274
+ }
275
+ const rt = /* @__PURE__ */ I(C, [["render", Q], ["__scopeId", "data-v-c1089285"]]);
276
+ export {
277
+ rt as default
278
+ };