@piveau/dpi 0.1.0-beta.5 → 0.1.0-beta.50

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 (74) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/DPIMenu.vue.js +2 -2
  3. package/dist/data-provider-interface/DataProviderInterface.vue2.js +45 -40
  4. package/dist/data-provider-interface/HappyFlowComponents/ComponentLibrary.vue.js +1 -1
  5. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +58 -53
  6. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +78 -66
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/CloseOpenButtonV3.vue.js +11 -10
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +100 -76
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField.vue.js +1 -1
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalSimpleV3.vue.js +7 -7
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +434 -360
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +103 -71
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +17 -22
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +130 -77
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +91 -61
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +111 -74
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +170 -99
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +109 -52
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +65 -86
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +29 -28
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +153 -102
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +571 -207
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +100 -53
  24. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +34 -56
  25. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +301 -100
  26. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +46 -27
  27. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +70 -39
  28. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +182 -105
  29. package/dist/data-provider-interface/HappyFlowComponents/ui/TextAreaV3.vue.js +19 -14
  30. package/dist/data-provider-interface/HappyFlowComponents/ui/TextButtonSmall.vue.js +1 -1
  31. package/dist/data-provider-interface/HappyFlowComponents/ui/Toast.vue.js +30 -29
  32. package/dist/data-provider-interface/components/ContactPage.vue.js +153 -105
  33. package/dist/data-provider-interface/components/DiscoverabilityPage.vue.js +32 -32
  34. package/dist/data-provider-interface/components/DistLicense.vue.js +198 -99
  35. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +856 -790
  36. package/dist/data-provider-interface/components/Dropup.vue.js +6 -6
  37. package/dist/data-provider-interface/components/HVDPage.vue.js +105 -82
  38. package/dist/data-provider-interface/components/InfoSlot.vue.js +5 -5
  39. package/dist/data-provider-interface/components/PolGeoUriPage.vue.js +89 -46
  40. package/dist/data-provider-interface/components/PublisherPage.vue.js +111 -81
  41. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +302 -251
  42. package/dist/data-provider-interface/components/TempResPage.vue.js +267 -187
  43. package/dist/data-provider-interface/components/TempResPageInModal.vue.js +395 -0
  44. package/dist/data-provider-interface/components/UpdateDate.vue.js +33 -29
  45. package/dist/data-provider-interface/components/dpiV3Description.vue.js +7 -6
  46. package/dist/data-provider-interface/composables/useDpiContext.js +5 -7
  47. package/dist/data-provider-interface/composables/useDpiEditMode.js +15 -13
  48. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +397 -244
  49. package/dist/data-provider-interface/config/dcatapde/vocab-prefixes.js +1 -1
  50. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +478 -91
  51. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +104 -152
  52. package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +10 -3
  53. package/dist/data-provider-interface/store/index.js +32 -0
  54. package/dist/data-provider-interface/store/modules/authStore.js +301 -0
  55. package/dist/data-provider-interface/store/modules/catalogueDetailsStore.js +34 -0
  56. package/dist/data-provider-interface/store/modules/cataloguesStore.js +256 -0
  57. package/dist/data-provider-interface/store/modules/datasetDetailsStore.js +644 -0
  58. package/dist/data-provider-interface/store/modules/datasetsStore.js +361 -0
  59. package/dist/data-provider-interface/store/{dpiStore.js → modules/dpiStore.js} +11 -12
  60. package/dist/data-provider-interface/store/modules/snackbarStore.js +45 -0
  61. package/dist/data-provider-interface/views/DraftsPage.vue.js +3 -3
  62. package/dist/data-provider-interface/views/InputPage.vue.js +378 -752
  63. package/dist/index.js +4 -4
  64. package/dist/styles/_dpi.scss +1614 -0
  65. package/dist/styles/_maps.scss +24 -0
  66. package/dist/styles/_variables.scss +973 -0
  67. package/dist/utils/draftApi.js +33 -0
  68. package/dist/utils/helpers.js +36 -22
  69. package/dist/utils/identifiersApi.js +16 -0
  70. package/dist/utils/jwt.js +7 -0
  71. package/package.json +12 -7
  72. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +0 -41
  73. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LicenseAttributionByText.vue.js +0 -46
  74. package/dist/data-provider-interface/store/modules/formSchemaStore.js +0 -94
@@ -0,0 +1,33 @@
1
+ import p from "axios";
2
+ const $ = ({ baseURL: n, authToken: D }) => {
3
+ const o = n.endsWith("/") ? "" : "/", s = p.create({
4
+ baseURL: `${n}${o}drafts`,
5
+ headers: {
6
+ "Content-Type": "text/turtle",
7
+ Authorization: `Bearer ${D}`
8
+ }
9
+ });
10
+ return {
11
+ createDatasetDraft: ({ id: t, catalogue: a, body: e }) => s.put(`/datasets/${t}`, e, {
12
+ headers: { "Content-Type": "application/json" },
13
+ params: { catalogue: a }
14
+ }),
15
+ getAllDatasetDrafts: () => s.get("/datasets"),
16
+ getDatasetDrafts: ({ id: t = "", catalogue: a = "", filterByProvider: e = !1 }) => {
17
+ const r = t ? `/${t}` : "";
18
+ return s.get(`/datasets${r}`, { params: { catalogue: a, filterByProvider: e } });
19
+ },
20
+ deleteDatasetDraft: ({ id: t, catalogue: a }) => s.delete(`/datasets/${t}`, { params: { catalogue: a } }),
21
+ publishDatasetDraft: ({ id: t, catalogue: a, body: e }) => {
22
+ const r = t ? `/${t}` : "";
23
+ return s.put(`/datasets/publish${r}`, e, { params: { catalogue: a } });
24
+ },
25
+ putDatasetToDraft: ({ id: t, catalogue: a }) => {
26
+ const e = t ? `/${t}` : "";
27
+ return s.put(`/datasets/hide${e}`, null, { params: { catalogue: a } });
28
+ }
29
+ };
30
+ };
31
+ export {
32
+ $ as default
33
+ };
@@ -1,32 +1,46 @@
1
- import { isNil as c, isObject as o, isString as u, has as s, isArray as d } from "lodash-es";
2
- function g(n, i, e) {
3
- if (!n || c(n) || !o(n) && !u(n))
1
+ import { isNil as g, isObject as y, isString as o, has as f, isArray as c } from "lodash-es";
2
+ function a(n, t, r) {
3
+ if (!n || g(n) || !y(n) && !o(n))
4
4
  return;
5
- if (u(n))
5
+ if (o(n))
6
6
  return n;
7
- if (s(n, i))
8
- return i;
9
- if (e && d(e)) {
10
- const f = e.find((r) => r && u(r) && s(n, r.toLowerCase()));
11
- if (f)
12
- return f;
13
- }
14
- const t = Object.keys(n)[0];
15
- if (t)
7
+ if (f(n, t))
16
8
  return t;
9
+ if (r && c(r)) {
10
+ const i = r.find((u) => u && o(u) && f(n, u.toLowerCase()));
11
+ if (i)
12
+ return i;
13
+ }
14
+ const e = Object.keys(n)[0];
15
+ if (e)
16
+ return e;
17
17
  }
18
- function y(n, i, e) {
19
- const t = g(n, i, e);
20
- return t ? n[t] : void 0;
18
+ function O(n, t, r) {
19
+ const e = a(n, t, r);
20
+ return e ? n[e] : void 0;
21
21
  }
22
- function O(n, i, e) {
22
+ function R(n, t, r) {
23
23
  if (!n)
24
24
  return "";
25
- const t = n.substring(0, i);
26
- return e || n.length <= i ? t : `${t}...`;
25
+ const e = n.substring(0, t);
26
+ return r || n.length <= t ? e : `${e}...`;
27
+ }
28
+ function T(n, t) {
29
+ const r = c(t) ? t : [t];
30
+ return (e) => new Proxy({
31
+ // Add preliminary dstProps to object so lodash _.has won't return false
32
+ ...e,
33
+ ...r.reduce((i, u) => (i[u] = e[n], i), {})
34
+ }, {
35
+ get(i, u, s) {
36
+ const d = r.includes(n) ? n : u;
37
+ return Reflect.get(i, d, s);
38
+ }
39
+ });
27
40
  }
28
41
  export {
29
- g as getRepresentativeLocaleOf,
30
- y as getTranslationFor,
31
- O as truncate
42
+ a as getRepresentativeLocaleOf,
43
+ O as getTranslationFor,
44
+ T as mirrorPropertyFn,
45
+ R as truncate
32
46
  };
@@ -0,0 +1,16 @@
1
+ import o from "axios";
2
+ const p = ({ baseURL: e, authToken: t }) => {
3
+ const r = e.endsWith("/") ? "" : "/", i = o.create({
4
+ baseURL: `${e}${r}identifiers`,
5
+ headers: {
6
+ "Content-Type": "text/turtle",
7
+ Authorization: `Bearer ${t}`
8
+ }
9
+ });
10
+ return {
11
+ createPersistentIdentifier: ({ id: a, catalogue: s, type: n = "mock" }) => i.put(`/datasets/${a}`, null, { params: { catalogue: s, type: n } })
12
+ };
13
+ };
14
+ export {
15
+ p as default
16
+ };
@@ -0,0 +1,7 @@
1
+ function t(e) {
2
+ const o = e.split(".")[1];
3
+ return JSON.parse(window.atob(o));
4
+ }
5
+ export {
6
+ t as decode
7
+ };
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.1.0-beta.5",
4
+ "version": "0.1.0-beta.50",
5
5
  "private": false,
6
6
  "sideEffects": [
7
- "*.css"
7
+ "*.css",
8
+ "*.scss"
8
9
  ],
9
10
  "exports": {
10
11
  ".": {
@@ -37,22 +38,24 @@
37
38
  },
38
39
  "devDependencies": {
39
40
  "@antfu/eslint-config": "^4.19.0",
40
- "@formkit/core": "^1",
41
- "@formkit/themes": "^1",
41
+ "@formkit/core": "^1.6.9",
42
+ "@formkit/themes": "^1.6.9",
42
43
  "@formkit/utils": "^1.6.9",
43
- "@formkit/vue": "^1",
44
+ "@formkit/vue": "^1.6.9",
44
45
  "@headlessui/vue": "^1.7.23",
45
46
  "@histoire/plugin-vue": "1.0.0-alpha.2",
46
47
  "@phosphor-icons/vue": "^2.2.1",
47
- "@piveau/jsonld": "file:../../bin/piveau-jsonld-1.0.0-beta.9.tgz",
48
+ "@piveau/jsonld": "file:../../bin/piveau-jsonld-1.0.0-beta.21.tgz",
48
49
  "@popperjs/core": "^2.11.8",
49
50
  "@types/jsonld": "^1.5.15",
50
51
  "@types/node": "^24.1.0",
52
+ "@vee-validate/zod": "^4.15.1",
51
53
  "@vitejs/plugin-vue": "^5.2.3",
54
+ "@vue/shared": "^3.5.18",
52
55
  "@vue/tsconfig": "^0.7.0",
53
56
  "@vueuse/core": "^10.11.1",
54
57
  "axios": "^1.11.0",
55
- "bootstrap": "^4.6.2",
58
+ "bootstrap": "^5.3.8",
56
59
  "dayjs": "^1.11.13",
57
60
  "eslint": "^9.31.0",
58
61
  "histoire": "1.0.0-alpha.2",
@@ -63,9 +66,11 @@
63
66
  "qs": "^6.14.0",
64
67
  "sass": "^1.89.2",
65
68
  "typescript": "~5.8.3",
69
+ "vee-validate": "^4.15.1",
66
70
  "vite": "^6.3.5",
67
71
  "vite-plugin-dts": "^4.5.4",
68
72
  "vite-plugin-lib-inject-css": "^2.2.2",
73
+ "vite-plugin-static-copy": "^3.1.3",
69
74
  "vue": "^3.5.13",
70
75
  "vue-i18n": "^11.1.11",
71
76
  "vue-router": "^4.5.1",
@@ -1,41 +0,0 @@
1
- import { ref as u, watch as r, createBlock as p, openBlock as f } from "vue";
2
- import g from "../InputField.vue.js";
3
- const I = {
4
- __name: "AccessRightsV3",
5
- props: {
6
- distributionId: { type: Number, required: !1 },
7
- showDeleteButton: { type: Boolean, default: !1 },
8
- accessRightsProp: { type: String, default: "" }
9
- },
10
- emits: ["addAccessRights", "deleteButtonClicked"],
11
- setup(n, { emit: d }) {
12
- const t = n, s = u(t.accessRightsProp), o = d, a = (l, e) => {
13
- o("addAccessRights", l.target.value, t.distributionId);
14
- };
15
- r(() => t.accessRightsProp, (l) => {
16
- s.value = l;
17
- });
18
- const c = () => {
19
- console.log("delete clicked"), o("deleteButtonClicked", t.distributionId);
20
- };
21
- return (l, e) => (f(), p(g, {
22
- onInput: e[0] || (e[0] = (i) => a(i)),
23
- modelValue: s.value,
24
- "onUpdate:modelValue": e[1] || (e[1] = (i) => s.value = i),
25
- addOnText: !1,
26
- datePicker: !1,
27
- infoIcon: !1,
28
- placeholder: "Bitte Grad der Zugänglichkeit eingeben...",
29
- preIcon: !1,
30
- inputFieldSize: "large",
31
- initialHintText: !1,
32
- label: "Grad der Zugänglichkeit (URL)",
33
- showEndIcon: !1,
34
- defaultInput: !n.showDeleteButton,
35
- onDeleteButtonClicked: c
36
- }, null, 8, ["modelValue", "defaultInput"]));
37
- }
38
- };
39
- export {
40
- I as default
41
- };
@@ -1,46 +0,0 @@
1
- import { ref as r, watch as c, createBlock as p, openBlock as f } from "vue";
2
- import m from "../InputField.vue.js";
3
- import { useI18n as B } from "vue-i18n";
4
- const b = {
5
- __name: "LicenseAttributionByText",
6
- props: {
7
- distributionId: { type: Number, required: !1 },
8
- showDeleteButton: { type: Boolean, default: !1 },
9
- nameTextByClauses: { type: String, default: "" }
10
- },
11
- emits: ["addLicenseAttrByText", "deleteButtonClicked"],
12
- setup(d, { emit: i }) {
13
- const { t: y } = B(), l = d, a = r(l.nameTextByClauses), o = i, s = (e, t) => {
14
- o("addLicenseAttrByText", e.target.value, l.distributionId);
15
- };
16
- c(() => l.nameTextByClauses, (e) => {
17
- a.value = e;
18
- });
19
- const u = () => {
20
- console.log("delete clicked"), o("deleteButtonClicked", l.distributionId);
21
- };
22
- return (e, t) => (f(), p(m, {
23
- onInput: t[0] || (t[0] = (n) => s(n)),
24
- modelValue: a.value,
25
- "onUpdate:modelValue": t[1] || (t[1] = (n) => a.value = n),
26
- addOnText: !1,
27
- datePicker: !1,
28
- infoIcon: !1,
29
- placeholder: e.$t(
30
- "message.dataupload.datasets.dcat:distribution.advanced.licenseAttrByText-placeholder"
31
- ),
32
- preIcon: !1,
33
- inputFieldSize: "large",
34
- initialHintText: !1,
35
- label: e.$t(
36
- "message.dataupload.datasets.dcat:distribution.advanced.dcatde:licenseAttributionByText"
37
- ) + " (optional)",
38
- showEndIcon: !1,
39
- defaultInput: !d.showDeleteButton,
40
- onDeleteButtonClicked: u
41
- }, null, 8, ["modelValue", "placeholder", "label", "defaultInput"]));
42
- }
43
- };
44
- export {
45
- b as default
46
- };
@@ -1,94 +0,0 @@
1
- import { isEmpty as l } from "lodash-es";
2
- import r from "../../utils/translation-helper.js";
3
- const m = {
4
- schema: {
5
- datasets: {},
6
- distributions: {},
7
- catalogues: {}
8
- },
9
- usersCatalogs: {}
10
- }, h = {
11
- getSchema: (e) => (t) => (console.log(e.schema[t]), e.schema[t])
12
- }, d = {
13
- /**
14
- * Commits page properties and related DCATAP property definitions for current view for later building of schema
15
- * @param {Object} param0
16
- * @param {Object} param1 Object containing property (datasets/catalogues), page (step1/step2/step3) and subpage (distribution1/distribution2/distribution3) of current view
17
- */
18
- createSchema({ commit: e, state: t, rootGetters: a }, { property: n, page: c }) {
19
- const s = a["dpiStore/getSpecification"], o = s.pageConent[n][c], i = s.inputDefinition[n];
20
- e("extractSchema", { pageProperties: o, propertyDefinitions: i, property: n, page: c });
21
- },
22
- /**
23
- * Calls mutation function for translating translatable properties of schema
24
- * @param {*} param0
25
- */
26
- translateSchema({ commit: e }, { property: t, page: a }) {
27
- e("translateSchemaProperties", { property: t, page: a });
28
- },
29
- /**
30
- * Commits current property and users catalogs to mutation function
31
- * @param {*} param0
32
- * @param {*} param1 Object containing curren tproperty (datasets/catalogues) and all catalog options the user has permissions for
33
- */
34
- addCatalogOptions({ commit: e }, { property: t, catalogs: a }) {
35
- e("saveCatalogOptions", { property: t, catalogs: a });
36
- }
37
- }, f = {
38
- /**
39
- * Builds schema based on given pageProperties and their definitions provided by propertyDefinition
40
- * @param {Object} state
41
- * @param {Object} param1 Object containing the properties which should be displayed within the view
42
- * (pageProperties) and the form definitions of the properties defined by DCATAP (propertyDefinition)
43
- */
44
- extractSchema(e, { pageProperties: t, propertyDefinitions: a, property: n, page: c }) {
45
- const s = [];
46
- for (let o = 0; o < t.length; o += 1) {
47
- const i = t[o];
48
- try {
49
- s.push(a[i]);
50
- } catch {
51
- console.warn(`DCATAP doens't include a property called: ${i}`);
52
- }
53
- }
54
- e.schema[n][c] = s;
55
- },
56
- /**
57
- * All translatable properties within the existing schema will be translated and added to the schema
58
- * @param {*} state
59
- * @param {String} property String defining current property (datasets/ distribution/ catalogues)
60
- */
61
- translateSchemaProperties(e, { property: t, page: a }) {
62
- r(e.schema[t][a], t);
63
- },
64
- /**
65
- * Saves all catalogs the current user has permissions for as options within the schema
66
- * @param {*} state
67
- * @param {*} param1 Object containing current property and the users catalog options
68
- */
69
- saveCatalogOptions(e, { property: t, catalogs: a }) {
70
- if (t === "datasets") {
71
- let n;
72
- for (let c in e.schema[t]) {
73
- const s = e.schema[t][c].filter((o) => o.name === "dcat:catalog");
74
- l(s) || (n = s[0]);
75
- }
76
- if (!l(n)) {
77
- const c = {};
78
- for (let s = 0; s < a.length; s += 1) {
79
- const o = a[s];
80
- c[o] = o;
81
- }
82
- n.options = c;
83
- }
84
- }
85
- }
86
- }, p = {
87
- state: m,
88
- getters: h,
89
- actions: d,
90
- mutations: f
91
- };
92
- export {
93
- p as default
94
- };