@startinblox/components-ds4go 3.0.3 → 3.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 (33) hide show
  1. package/.storybook/preview.ts +1 -0
  2. package/biome.json +1 -1
  3. package/dist/custom-getter-ZPFnoSjt-BCNOlbJZ-B4tuxA42.js +338 -0
  4. package/dist/en-BySYJZMr-CWZl5AwU-CWZl5AwU.js +14 -0
  5. package/dist/fr-BZZDTsmw-CNDWt66j-CNDWt66j.js +14 -0
  6. package/dist/index-BSwVRtNS.js +104980 -0
  7. package/dist/index.js +1 -3032
  8. package/dist/quill.snow-C_A_QkE8-D-uedtvC-D-uedtvC.js +13 -0
  9. package/dist/slimselect-NFLzJMfV-DZ7j6Vsj-DZ7j6Vsj.js +5 -0
  10. package/package.json +9 -8
  11. package/src/components/cards/ds4go-card-catalog.ts +132 -0
  12. package/src/components/catalog/ds4go-catalog-filter-holder.ts +459 -0
  13. package/src/components/catalog/ds4go-customer-holder.ts +162 -0
  14. package/src/components/catalog/ds4go-fact-bundle-holder.ts +7 -7
  15. package/src/components/modal/ds4go-customer-modal.ts +134 -0
  16. package/src/components/modal/ds4go-fact-bundle-modal.ts +2 -2
  17. package/src/components/solid-customer-list.ts +195 -0
  18. package/src/components/solid-dsif-explorer-poc.ts +8 -8
  19. package/src/components/solid-dsp-connector.ts +12 -4
  20. package/src/components/solid-fact-bundle-creation.ts +244 -151
  21. package/src/components/solid-fact-bundle.ts +9 -4
  22. package/src/helpers/components/orbitComponent.ts +12 -13
  23. package/src/helpers/i18n/configureLocalization.ts +12 -5
  24. package/src/helpers/index.ts +0 -2
  25. package/src/styles/cards/ds4go-card-catalog.scss +149 -0
  26. package/src/styles/fact-bundle-creation.scss +6 -2
  27. package/src/styles/modal/ds4go-customer-modal.scss +91 -0
  28. package/src/styles/modal/ds4go-fact-bundle-modal.scss +1 -1
  29. package/vite.config.ts +7 -7
  30. package/src/components/solid-boilerplate.ts +0 -76
  31. package/src/helpers/components/ResourceMapper.ts +0 -469
  32. package/src/helpers/components/orbitDspComponent.ts +0 -250
  33. package/src/helpers/mappings/dsp-mapping-config.ts +0 -545
@@ -0,0 +1,149 @@
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
+ &.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
+ }
63
+ header {
64
+ display: flex;
65
+ background-repeat: no-repeat;
66
+ background-size: cover;
67
+ background-position: center center;
68
+ box-sizing: border-box;
69
+ width: 100%;
70
+ padding: 16px;
71
+ }
72
+ main {
73
+ display: flex;
74
+ flex-direction: column;
75
+ gap: var(--scale-400);
76
+ flex: 1;
77
+ .content {
78
+ flex: 1;
79
+ }
80
+ .card-content {
81
+ flex-grow: 1;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ width: 100%;
85
+ }
86
+ .date {
87
+ width: fit-content;
88
+ display: flex;
89
+ gap: 24px;
90
+ flex-direction: row;
91
+ color: var(--color-text-disabled-on);
92
+ font-size: var(--typography-size-body-sm);
93
+ font-weight: var(--font-weight-regular);
94
+ line-height: var(--line-height-body-sm);
95
+ text-transform: uppercase;
96
+ }
97
+ }
98
+ .tags,
99
+ .action {
100
+ display: flex;
101
+ flex-direction: row;
102
+ flex-wrap: wrap;
103
+ align-items: flex-start;
104
+ gap: var(--scale-200);
105
+ }
106
+ .action ::slotted(*) {
107
+ width: 100%;
108
+ padding: var(--scale-400);
109
+ border-top: var(--border-width-sm) solid var(--color-border-primary);
110
+ }
111
+ .action slot:not(:has-slotted) {
112
+ display: none;
113
+ }
114
+
115
+ &.vertical {
116
+ flex-direction: column;
117
+ header {
118
+ width: 100%;
119
+ border-bottom: var(--border-width-sm) solid var(--color-border-primary);
120
+ border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
121
+ &.image {
122
+ height: 167px;
123
+ }
124
+ }
125
+ main {
126
+ padding: var(--scale-600);
127
+ padding-bottom: var(--scale-800);
128
+ }
129
+ }
130
+
131
+ &.vertical,
132
+ &.billImage {
133
+ .date {
134
+ width: 100%;
135
+ justify-content: space-between;
136
+ }
137
+ }
138
+
139
+ &.horizontal,
140
+ &.billImage {
141
+ main {
142
+ padding: var(--scale-600);
143
+ padding-bottom: var(--scale-800);
144
+ }
145
+ }
146
+ div:has(slot:not(:has-slotted)) {
147
+ display: none;
148
+ }
149
+ }
@@ -37,13 +37,13 @@ section {
37
37
  .card-grid-vertical {
38
38
  justify-content: stretch;
39
39
 
40
- tems-card-catalog {
40
+ ds4go-card-catalog {
41
41
  width: 354px;
42
42
  height: fit-content;
43
43
  }
44
44
  }
45
45
 
46
- tems-card-catalog {
46
+ ds4go-card-catalog {
47
47
  cursor: pointer;
48
48
 
49
49
  &[selected] {
@@ -67,6 +67,10 @@ div.select {
67
67
  width: 100%;
68
68
  }
69
69
 
70
+ div:has(> tems-textarea) {
71
+ margin-bottom: -2px;
72
+ }
73
+
70
74
  select {
71
75
  width: 100%;
72
76
  background-color: var(--color-surface-primary);
@@ -0,0 +1,91 @@
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
+ tems-division {
57
+ width: fit-content;
58
+ div {
59
+ display: block;
60
+ height: auto;
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ }
64
+ }
65
+
66
+ .card-grid {
67
+ display: flex;
68
+ flex-direction: row;
69
+ flex-wrap: wrap;
70
+ gap: 20px;
71
+ }
72
+
73
+ .card-grid-vertical {
74
+ justify-content: stretch;
75
+ }
76
+
77
+ .card-grid-vertical ds4go-card-catalog {
78
+ width: 354px;
79
+ height: auto;
80
+ }
81
+ }
82
+ }
83
+
84
+ @media screen and (min-width: 1100px) {
85
+ div.modal {
86
+ width: fit-content;
87
+ max-width: 80vw;
88
+ height: fit-content;
89
+ max-height: 80vw;
90
+ }
91
+ }
@@ -74,7 +74,7 @@
74
74
  justify-content: stretch;
75
75
  }
76
76
 
77
- .card-grid-vertical tems-card-catalog {
77
+ .card-grid-vertical ds4go-card-catalog {
78
78
  width: 354px;
79
79
  height: auto;
80
80
  }
package/vite.config.ts CHANGED
@@ -31,13 +31,13 @@ export default defineConfig({
31
31
  ],
32
32
  resolve: {
33
33
  alias: {
34
- "@components": "/src/components",
35
- "@cypress": "/cypress",
36
- "@helpers": "/src/helpers",
37
- "@mocks": "/src/mocks",
38
- "@stories": "/stories",
39
- "@styles": "/src/styles",
40
- "@src": "/src",
34
+ "@components": resolve(__dirname, "./src/components"),
35
+ "@cypress": resolve(__dirname, "./cypress"),
36
+ "@helpers": resolve(__dirname, "./src/helpers"),
37
+ "@mocks": resolve(__dirname, "./src/mocks"),
38
+ "@stories": resolve(__dirname, "./stories"),
39
+ "@styles": resolve(__dirname, "./src/styles"),
40
+ "@src": resolve(__dirname, "./src"),
41
41
  },
42
42
  },
43
43
  });
@@ -1,76 +0,0 @@
1
- import { Task } from "@lit/task";
2
- import type { PropertiesPicker } from "@src/component";
3
- import { css, html, nothing } from "lit";
4
- import { customElement } from "lit/decorators.js";
5
-
6
- import "@src/initializer";
7
- import * as utils from "@helpers";
8
-
9
- @customElement("solid-boilerplate")
10
- export class SolidBoilerplate extends utils.OrbitComponent {
11
- async _afterAttach() {
12
- // Eg. https://api.server/some-keyword/1/ should trigger an update:
13
- utils.setupCacheInvalidation(this, {
14
- keywords: ["some-keyword", "for-invalidating", "cache"],
15
- });
16
- return Promise.resolve();
17
- }
18
-
19
- static styles = css`
20
- div {
21
- background-color: red;
22
- position: absolute;
23
- top: 0;
24
- left: 0;
25
- right: 0;
26
- bottom: 0;
27
- }
28
- `;
29
-
30
- cherryPickedProperties: PropertiesPicker[] = [{ key: "name", value: "name" }];
31
-
32
- _getResource = new Task(this, {
33
- task: async ([dataSrc]) => {
34
- if (
35
- !dataSrc ||
36
- !this.orbit ||
37
- (!this.noRouter &&
38
- this.route &&
39
- this.currentRoute &&
40
- !this.route.startsWith(this.currentRoute))
41
- )
42
- return;
43
-
44
- if (!this.hasCachedDatas || this.oldDataSrc !== dataSrc) {
45
- if (!dataSrc) return;
46
- this.datas = await this._getProxyValue(dataSrc);
47
- this.hasCachedDatas = true;
48
- }
49
-
50
- if (this.oldDataSrc !== dataSrc) {
51
- this.oldDataSrc = dataSrc;
52
- }
53
-
54
- return utils.sort(this.datas, "name", "asc");
55
- },
56
- args: () => [this.dataSrc, this.caching, this.currentRoute],
57
- });
58
-
59
- render() {
60
- return (
61
- this.gatekeeper() ||
62
- this._getResource.render({
63
- pending: () => html`<solid-loader></solid-loader>`,
64
- complete: (datas) => {
65
- if (!datas) {
66
- return nothing;
67
- }
68
-
69
- return html`<div>
70
- <sample-objects .objects=${datas}></sample-objects>
71
- </div>`;
72
- },
73
- })
74
- );
75
- }
76
- }