@startinblox/components-ds4go 3.3.8 → 4.1.0

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 (31) hide show
  1. package/dist/components-ds4go.css +1 -1
  2. package/dist/index.js +3534 -3602
  3. package/locales/en.xlf +187 -3
  4. package/package.json +2 -2
  5. package/src/component.d.ts +0 -5
  6. package/src/components/cards/ds4go-card-dataspace-catalog.ts +82 -227
  7. package/src/components/cards/ds4go-card-fact.ts +128 -0
  8. package/src/components/catalog/ds4go-catalog-data-holder.ts +158 -0
  9. package/src/components/catalog/ds4go-fact-holder.ts +149 -0
  10. package/src/components/modal/catalog-modal/agreement-info.ts +110 -0
  11. package/src/components/modal/catalog-modal/index.ts +4 -0
  12. package/src/components/modal/catalog-modal/negotiation-button.ts +111 -0
  13. package/src/components/modal/catalog-modal/policy-display.ts +66 -0
  14. package/src/components/modal/catalog-modal/policy-selection.ts +71 -0
  15. package/src/components/modal/ds4go-catalog-modal.ts +158 -1105
  16. package/src/components/modal/ds4go-fact-modal.ts +217 -0
  17. package/src/components/odrl/policy-composer.ts +1 -1
  18. package/src/components/odrl-policy-viewer.ts +0 -21
  19. package/src/components/solid-dsp-catalog.ts +2 -43
  20. package/src/components/solid-fact-list.ts +307 -0
  21. package/src/ds4go.d.ts +78 -1
  22. package/src/helpers/dsp/agreementStorage.ts +243 -0
  23. package/src/helpers/dsp/policyHelpers.ts +223 -0
  24. package/src/helpers/index.ts +7 -0
  25. package/src/styles/cards/ds4go-card-catalog.scss +1 -1
  26. package/src/styles/cards/ds4go-card-dataspace-catalog.scss +22 -165
  27. package/src/styles/cards/ds4go-card-fact.scss +112 -0
  28. package/src/styles/index.scss +42 -0
  29. package/src/styles/modal/ds4go-catalog-modal.scss +1 -1
  30. package/src/styles/modal/ds4go-fact-modal.scss +161 -0
  31. package/src/components/modal/ds4go-catalog-data-holder.ts +0 -349
@@ -19,197 +19,54 @@ article {
19
19
  width: 100%;
20
20
  display: flex;
21
21
  font-family: var(--font-family-body);
22
- &.vertical {
23
- min-width: 295px;
24
- .card-content {
25
- max-height: 180px;
26
- tems-division {
27
- max-height: 180px;
28
- }
29
- }
30
- }
31
- &.horizontal,
32
- &.billImage {
33
- header {
34
- width: auto;
35
- border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
36
- }
37
- header.image {
38
- flex-shrink: 0;
39
- width: 33%;
40
- height: 100%;
41
- }
42
- main {
43
- flex-grow: 1;
44
- .card-content {
45
- max-height: 78px;
46
- tems-division {
47
- max-height: 78px;
48
- }
49
- }
50
- }
51
- }
52
- &.billImage {
53
- header.image {
54
- width: 50%;
55
- }
56
- .card-content {
57
- max-height: 206px;
58
- tems-division {
59
- max-height: 206px;
60
- }
61
- }
62
- }
22
+ min-width: 295px;
23
+ flex-direction: column;
24
+
63
25
  header {
64
26
  display: flex;
65
27
  background-repeat: no-repeat;
66
- background-size: cover;
28
+ background-size: contain;
67
29
  background-position: center center;
68
30
  box-sizing: border-box;
31
+ padding: var(--scale-400);
69
32
  width: 100%;
70
- padding: 16px;
33
+ border-bottom: var(--border-width-sm) solid var(--color-border-primary);
34
+ border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
35
+ height: 167px;
36
+ }
37
+
38
+ .card-content {
39
+ max-height: 180px;
40
+ tems-division {
41
+ max-height: 180px;
42
+ }
71
43
  }
44
+
72
45
  main {
73
46
  display: flex;
74
47
  flex-direction: column;
75
48
  gap: var(--scale-400);
76
49
  flex: 1;
50
+ padding: var(--scale-600);
51
+ padding-bottom: var(--scale-800);
52
+
77
53
  .content {
78
54
  flex: 1;
79
55
  }
80
- .orgLogo {
81
- background-repeat: no-repeat;
82
- background-size: contain;
83
- background-position: center center;
84
- width: 48px;
85
- height: 48px;
86
- }
56
+
87
57
  .card-content {
88
58
  flex-grow: 1;
89
59
  overflow: hidden;
90
60
  text-overflow: ellipsis;
91
61
  width: 100%;
92
62
  }
93
- .address-line {
94
- display: flex;
95
- flex-direction: row;
96
- justify-content: space-between;
97
- align-items: end;
98
- width: 100%;
99
- > div:first-child {
100
- flex: 1;
101
- display: flex;
102
- gap: 16px;
103
- flex-direction: column;
104
- }
105
- }
106
- .lang-date {
107
- width: fit-content;
108
- display: flex;
109
- gap: 24px;
110
- flex-direction: row;
111
- color: var(--color-text-disabled-on);
112
- font-size: var(--typography-size-body-sm);
113
-
114
- font-weight: var(--font-weight-regular);
115
- line-height: var(--line-height-body-sm);
116
- text-transform: uppercase;
117
- }
118
- .address,
119
- .source-logo {
120
- display: flex;
121
- flex-direction: row;
122
- align-items: center;
123
- gap: var(--scale-200);
124
- color: var(--color-text-information);
125
- font-size: var(--typography-size-body-sm);
126
- font-style: normal;
127
- font-weight: var(--font-weight-regular);
128
- line-height: var(--line-height-body-sm);
129
- text-decoration: underline;
130
- a {
131
- color: var(--color-text-information);
132
- }
133
- svg {
134
- color: var(--color-text-information);
135
- width: var(--icon-size-sm);
136
- height: var(--icon-size-sm);
137
- display: flex;
138
- }
139
- .source,
140
- .logo {
141
- display: flex;
142
- flex-direction: row;
143
- align-items: center;
144
- gap: var(--scale-200);
145
- }
146
- // logo image in source block
147
- .logo {
148
- margin-left: auto;
149
- background-repeat: no-repeat;
150
- background-size: contain;
151
- background-position: center center;
152
- width: 76px;
153
- height: 24px;
154
- }
155
- }
156
63
  }
157
- .tags,
158
- .action {
64
+
65
+ .tags {
159
66
  display: flex;
160
67
  flex-direction: row;
161
68
  flex-wrap: wrap;
162
69
  align-items: flex-start;
163
70
  gap: var(--scale-200);
164
71
  }
165
- .action ::slotted(*) {
166
- width: 100%;
167
- padding: var(--scale-400);
168
- border-top: var(--border-width-sm) solid var(--color-border-primary);
169
- }
170
- .action slot:not(:has-slotted) {
171
- display: none;
172
- }
173
-
174
- &.vertical {
175
- flex-direction: column;
176
- header {
177
- width: 100%;
178
- border-bottom: var(--border-width-sm) solid var(--color-border-primary);
179
- border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
180
- &.image {
181
- height: 167px;
182
- }
183
- }
184
- main {
185
- padding: var(--scale-600);
186
- padding-bottom: var(--scale-800);
187
- }
188
-
189
- }
190
-
191
- &.vertical,
192
- &.billImage {
193
- .lang-date {
194
- width: 100%;
195
- justify-content: space-between;
196
- }
197
- }
198
-
199
- &.horizontal,
200
- &.billImage {
201
-
202
- main {
203
- padding: var(--scale-600);
204
- padding-bottom: var(--scale-800);
205
-
206
-
207
- .source-logo .logo {
208
- margin-left: 0px;
209
- }
210
- }
211
- }
212
- div:has(slot:not(:has-slotted)) {
213
- display: none;
214
- }
215
72
  }
@@ -0,0 +1,112 @@
1
+ @mixin card-content-max-height($height) {
2
+ max-height: $height;
3
+ tems-division {
4
+ max-height: $height;
5
+ }
6
+ }
7
+
8
+ :host {
9
+ box-sizing: border-box;
10
+ display: flex;
11
+ width: 100%;
12
+ max-width: 100%;
13
+ height: fit-content;
14
+ }
15
+
16
+ article {
17
+ border-radius: var(--border-radius-lg);
18
+ border: var(--border-width-sm) solid var(--color-border-primary);
19
+ width: 100%;
20
+ display: flex;
21
+ font-family: var(--font-family-body);
22
+ min-width: 295px;
23
+ flex-direction: column;
24
+ cursor: pointer;
25
+ transition: box-shadow 0.2s ease-in-out;
26
+
27
+ &:hover {
28
+ box-shadow: var(--shadow-md);
29
+ }
30
+
31
+ header {
32
+ display: flex;
33
+ background-repeat: no-repeat;
34
+ background-size: cover;
35
+ background-position: center center;
36
+ box-sizing: border-box;
37
+ padding: var(--scale-400);
38
+ width: 100%;
39
+ border-bottom: var(--border-width-sm) solid var(--color-border-primary);
40
+ border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
41
+ height: 167px;
42
+ }
43
+
44
+ main {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: var(--scale-400);
48
+ flex: 1;
49
+ padding: var(--scale-600);
50
+ padding-bottom: var(--scale-800);
51
+
52
+ .meta-info {
53
+ display: flex;
54
+ flex-direction: column;
55
+ justify-items: center;
56
+ gap: var(--scale-200);
57
+ font-size: var(--typography-size-body-sm);
58
+ color: var(--color-text-disabled-on);
59
+ font-weight: var(--font-weight-regular);
60
+ line-height: var(--line-height-body-sm);
61
+
62
+ .author {
63
+ color: var(--color-text-primary);
64
+ }
65
+
66
+ .separator {
67
+ color: var(--color-border-primary);
68
+ }
69
+
70
+ .date {
71
+ color: var(--color-text-disabled-on);
72
+ }
73
+ }
74
+
75
+ .content {
76
+ flex: 1;
77
+ display: flex;
78
+ flex-direction: column;
79
+ gap: var(--scale-200);
80
+ }
81
+
82
+ .card-header {
83
+ tems-division {
84
+ font-weight: var(--font-weight-semibold);
85
+ }
86
+ }
87
+
88
+ .card-content {
89
+ max-height: 180px;
90
+ overflow: hidden;
91
+ text-overflow: ellipsis;
92
+ width: 100%;
93
+
94
+ tems-division {
95
+ max-height: 180px;
96
+ overflow: hidden;
97
+ text-overflow: ellipsis;
98
+ display: -webkit-box;
99
+ -webkit-line-clamp: 4;
100
+ -webkit-box-orient: vertical;
101
+ }
102
+ }
103
+ }
104
+
105
+ .tags {
106
+ display: flex;
107
+ flex-direction: row;
108
+ flex-wrap: wrap;
109
+ align-items: flex-start;
110
+ gap: var(--scale-200);
111
+ }
112
+ }
@@ -12,3 +12,45 @@
12
12
  --color-heading: #181d27;
13
13
  font-family: var(--font-family);
14
14
  }
15
+
16
+ .swal2-container {
17
+ display: grid;
18
+
19
+ .swal2-modal {
20
+ box-shadow: none;
21
+ border: 1px solid var(--color-border-primary);
22
+ }
23
+ }
24
+
25
+ .swal2-html-container,
26
+ .swal2-title {
27
+ white-space: break-spaces;
28
+ text-align: center;
29
+ line-height: initial;
30
+ }
31
+
32
+ .swal2-container {
33
+ button {
34
+ &.swal2-styled.swal2-confirm {
35
+ border: var(--border-width-sm) solid var(--color-surface-action-solid) !important;
36
+ background-color: var(--color-surface-action-solid) !important;
37
+ color: var(--color-text-action-on) !important;
38
+
39
+ &:hover {
40
+ background-color: var(--color-surface-action-solid-hover) !important;
41
+ }
42
+ }
43
+
44
+ &.swal2-styled.swal2-cancel {
45
+ background-color: inherit !important;
46
+ border: var(--border-width-sm) solid var(--color-border-secondary) !important;
47
+ color: var(--color-text-action) !important;
48
+
49
+ &:hover {
50
+ background-color: var(--color-surface-action-solid-hover-light) !important;
51
+ border-color: var(--color-border-action-hover) !important;
52
+ color: var(--color-text-action-hover) !important;
53
+ }
54
+ }
55
+ }
56
+ }
@@ -38,7 +38,7 @@ svg {
38
38
  flex-direction: row;
39
39
  gap: var(--scale-400);
40
40
 
41
- tems-button:nth-child(2) {
41
+ catalog-modal-negotiation-button {
42
42
  margin-left: auto;
43
43
  }
44
44
  }
@@ -0,0 +1,161 @@
1
+ @use "sass:meta";
2
+
3
+ @include meta.load-css("../_helpers/flex");
4
+
5
+ .modal {
6
+ width: 90vw;
7
+ height: 90vh;
8
+ border-radius: var(--border-radius-lg);
9
+ background-color: var(--color-surface-primary);
10
+ border: var(--border-width-sm) solid var(--color-border-primary);
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: var(--scale-600);
14
+ padding: var(--scale-600) var(--scale-900);
15
+
16
+ color: var(--color-text-body);
17
+ font-family: var(--font-family-body);
18
+ font-size: var(--typography-size-body-md);
19
+ font-style: normal;
20
+ font-weight: var(--font-weight-regular);
21
+ line-height: var(--line-height-body-md);
22
+ letter-spacing: var(--font-letter-spacing-default);
23
+
24
+ .topbar {
25
+ width: 100%;
26
+ display: flex;
27
+ flex-direction: row;
28
+ gap: var(--scale-400);
29
+
30
+ tems-button:nth-child(2) {
31
+ margin-left: auto;
32
+ }
33
+ }
34
+
35
+ .modal-content-wrapper {
36
+ overflow: hidden;
37
+ flex: 1;
38
+ display: flex;
39
+ flex-direction: column;
40
+
41
+ .modal-box {
42
+ flex: 1;
43
+ display: flex;
44
+ overflow-y: scroll;
45
+ overflow-x: hidden;
46
+ }
47
+
48
+ .modal-content {
49
+ display: flex;
50
+ flex-direction: column;
51
+ gap: var(--scale-400);
52
+ height: fit-content;
53
+ width: 100%;
54
+ }
55
+
56
+ .cover-image {
57
+ width: 100%;
58
+ height: 300px;
59
+ overflow: hidden;
60
+ border-radius: var(--border-radius-md);
61
+ margin-bottom: var(--scale-200);
62
+
63
+ img {
64
+ width: 100%;
65
+ height: 100%;
66
+ object-fit: cover;
67
+ display: block;
68
+ }
69
+ }
70
+
71
+ tems-division {
72
+ width: fit-content;
73
+ div {
74
+ display: block;
75
+ height: auto;
76
+ overflow: hidden;
77
+ text-overflow: ellipsis;
78
+ }
79
+
80
+ &[type="h3"] {
81
+ margin-top: var(--scale-300);
82
+ margin-bottom: var(--scale-500);
83
+ }
84
+
85
+ &[type="h4"] {
86
+ margin-top: var(--scale-500);
87
+ margin-bottom: var(--scale-200);
88
+ }
89
+ }
90
+
91
+ .author-section {
92
+ text-align: center;
93
+ width: 100%;
94
+ margin-top: var(--scale-200);
95
+ margin-bottom: var(--scale-200);
96
+
97
+ div {
98
+ display: block;
99
+ height: auto;
100
+ overflow: hidden;
101
+ text-overflow: ellipsis;
102
+ }
103
+ }
104
+
105
+ .categories-list {
106
+ display: flex;
107
+ flex-direction: row;
108
+ flex-wrap: wrap;
109
+ gap: var(--scale-200);
110
+ }
111
+
112
+ .medias-gallery {
113
+ display: grid;
114
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
115
+ gap: var(--scale-300);
116
+
117
+ .media-item {
118
+ aspect-ratio: 1;
119
+ overflow: hidden;
120
+ border-radius: var(--border-radius-md);
121
+ cursor: pointer;
122
+ transition:
123
+ transform var(--transition-duration-fast) ease,
124
+ box-shadow var(--transition-duration-fast) ease;
125
+
126
+ &:hover {
127
+ transform: scale(1.05);
128
+ box-shadow: var(--shadow-md);
129
+ }
130
+
131
+ img {
132
+ width: 100%;
133
+ height: 100%;
134
+ object-fit: cover;
135
+ display: block;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+
142
+ @media screen and (min-width: 1100px) {
143
+ div.modal {
144
+ width: fit-content;
145
+ max-width: 80vw;
146
+ height: fit-content;
147
+ max-height: 80vh;
148
+ min-width: 50vw;
149
+ min-height: 50vh;
150
+
151
+ .modal-content-wrapper {
152
+ .cover-image {
153
+ height: 400px;
154
+ }
155
+
156
+ .medias-gallery {
157
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
158
+ }
159
+ }
160
+ }
161
+ }