@startinblox/boilerplate 4.0.0 → 4.2.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.
- package/.gitlab-ci.yml +17 -16
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/src/helpers/components/orbitComponent.ts +11 -14
- package/vite.config.ts +1 -2
- package/cypress/cypress.d.ts +0 -1
package/.gitlab-ci.yml
CHANGED
|
@@ -14,7 +14,7 @@ default:
|
|
|
14
14
|
|
|
15
15
|
stages:
|
|
16
16
|
- prepare
|
|
17
|
-
- test
|
|
17
|
+
# - test
|
|
18
18
|
- publish
|
|
19
19
|
|
|
20
20
|
prepare:
|
|
@@ -31,22 +31,23 @@ prepare:
|
|
|
31
31
|
paths:
|
|
32
32
|
- dist
|
|
33
33
|
expire_in: 1 day
|
|
34
|
-
tags:
|
|
35
|
-
|
|
34
|
+
# tags:
|
|
35
|
+
# - test
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
# Temp: https://github.com/cypress-io/cypress/issues/31882
|
|
38
|
+
# test:
|
|
39
|
+
# stage: test
|
|
40
|
+
# image:
|
|
41
|
+
# name: cypress/included:14.2.0
|
|
42
|
+
# entrypoint: [""]
|
|
43
|
+
# before_script:
|
|
44
|
+
# - npm ci --cache .npm --prefer-offline
|
|
45
|
+
# script:
|
|
46
|
+
# - npm run cy:run
|
|
47
|
+
# except:
|
|
48
|
+
# - tags
|
|
49
|
+
# tags:
|
|
50
|
+
# - test
|
|
50
51
|
|
|
51
52
|
publish:
|
|
52
53
|
stage: publish
|
package/dist/index.js
CHANGED
|
@@ -748,7 +748,7 @@ class $ extends lt {
|
|
|
748
748
|
o[n.value],
|
|
749
749
|
e,
|
|
750
750
|
r
|
|
751
|
-
)), n.cast && (o[n.value] = n.cast(o[n.value])));
|
|
751
|
+
)), n.cast && (o[n.value] = await n.cast(o[n.value])));
|
|
752
752
|
return await this._responseAdaptator(o);
|
|
753
753
|
}
|
|
754
754
|
async _getProxyValue(t, e = !0, r = this.cherryPickedProperties) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/boilerplate",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Startin'blox Boilerplate",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -76,15 +76,15 @@
|
|
|
76
76
|
"postcss-scss": "^4.0.9",
|
|
77
77
|
"sass": "^1.89.2",
|
|
78
78
|
"unplugin-icons": "^22.1.0",
|
|
79
|
-
"vite": "^
|
|
79
|
+
"vite": "^7.0.0"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@lit/localize-tools": "^0.8.0",
|
|
83
|
-
"@storybook/
|
|
83
|
+
"@storybook/addon-docs": "^9.0.13",
|
|
84
|
+
"@storybook/web-components-vite": "^9.0.13",
|
|
84
85
|
"cypress": "^14.5.0",
|
|
85
86
|
"cypress-ct-lit": "^1.0.0",
|
|
86
87
|
"lorem-ipsum": "^2.0.8",
|
|
87
|
-
"storybook": "^9.0.
|
|
88
|
-
"@storybook/addon-docs": "^9.0.12"
|
|
88
|
+
"storybook": "^9.0.13"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { nothing } from "lit";
|
|
2
|
-
import { property, state } from "lit/decorators.js";
|
|
3
|
-
|
|
4
1
|
import {
|
|
5
2
|
CLIENT_CONTEXT,
|
|
6
3
|
requestNavigation,
|
|
7
4
|
setupComponentSubscriptions,
|
|
8
5
|
} from "@helpers";
|
|
9
|
-
|
|
10
6
|
import { ComponentObjectsHandler } from "@helpers/components/componentObjectsHandler";
|
|
11
|
-
|
|
12
7
|
import type {
|
|
13
8
|
Container,
|
|
14
9
|
LiveOrbit,
|
|
@@ -17,6 +12,8 @@ import type {
|
|
|
17
12
|
Resource,
|
|
18
13
|
UnknownResource,
|
|
19
14
|
} from "@src/component";
|
|
15
|
+
import { nothing } from "lit";
|
|
16
|
+
import { property, state } from "lit/decorators.js";
|
|
20
17
|
|
|
21
18
|
export default class extends ComponentObjectsHandler {
|
|
22
19
|
constructor({
|
|
@@ -68,7 +65,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
68
65
|
protected async _attach(
|
|
69
66
|
defaultRoute: boolean,
|
|
70
67
|
setupSubscriptions: boolean,
|
|
71
|
-
ignoreRouter: boolean
|
|
68
|
+
ignoreRouter: boolean,
|
|
72
69
|
) {
|
|
73
70
|
if (!this.orbit) {
|
|
74
71
|
if (window.orbit) {
|
|
@@ -112,7 +109,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
112
109
|
const rdfType = navigator.getAttribute("navigation-rdf-type");
|
|
113
110
|
if (rdfType) {
|
|
114
111
|
const compatibleComponents = window.orbit?.components?.filter(
|
|
115
|
-
(c) => c?.routeAttributes?.["rdf-type"] === rdfType
|
|
112
|
+
(c) => c?.routeAttributes?.["rdf-type"] === rdfType,
|
|
116
113
|
);
|
|
117
114
|
if (compatibleComponents) target = compatibleComponents[0]?.uniq;
|
|
118
115
|
}
|
|
@@ -120,7 +117,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
120
117
|
requestNavigation(
|
|
121
118
|
(window.orbit ? window.orbit.getRoute(target, true) : target) +
|
|
122
119
|
(subrouter ? `-${subrouter}` : ""),
|
|
123
|
-
resource
|
|
120
|
+
resource,
|
|
124
121
|
);
|
|
125
122
|
}
|
|
126
123
|
e.preventDefault();
|
|
@@ -135,7 +132,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
135
132
|
|
|
136
133
|
async _expandContainer(
|
|
137
134
|
value: Resource[],
|
|
138
|
-
recursive = true
|
|
135
|
+
recursive = true,
|
|
139
136
|
): Promise<UnknownResource[]> {
|
|
140
137
|
const expandedContainer: UnknownResource[] = [];
|
|
141
138
|
for (const entry of value) {
|
|
@@ -148,7 +145,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
148
145
|
async _getProperties(
|
|
149
146
|
resource: Resource,
|
|
150
147
|
recursive = true,
|
|
151
|
-
targetProperties: PropertiesPicker[] = this.cherryPickedProperties
|
|
148
|
+
targetProperties: PropertiesPicker[] = this.cherryPickedProperties,
|
|
152
149
|
) {
|
|
153
150
|
const properties = await resource.properties;
|
|
154
151
|
const response: Resource = {
|
|
@@ -164,11 +161,11 @@ export default class extends ComponentObjectsHandler {
|
|
|
164
161
|
response[prop.value] = await this._getProxyValue(
|
|
165
162
|
response[prop.value],
|
|
166
163
|
recursive,
|
|
167
|
-
targetProperties
|
|
164
|
+
targetProperties,
|
|
168
165
|
);
|
|
169
166
|
}
|
|
170
167
|
if (prop.cast) {
|
|
171
|
-
response[prop.value] = prop.cast(response[prop.value]);
|
|
168
|
+
response[prop.value] = await prop.cast(response[prop.value]);
|
|
172
169
|
}
|
|
173
170
|
}
|
|
174
171
|
}
|
|
@@ -181,7 +178,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
181
178
|
| Resource
|
|
182
179
|
| ProxyValue<Resource | Container<ProxyValue<Resource> | Resource>>,
|
|
183
180
|
recursive = true,
|
|
184
|
-
targetProperties: PropertiesPicker[] = this.cherryPickedProperties
|
|
181
|
+
targetProperties: PropertiesPicker[] = this.cherryPickedProperties,
|
|
185
182
|
) {
|
|
186
183
|
try {
|
|
187
184
|
if (resource) {
|
|
@@ -193,7 +190,7 @@ export default class extends ComponentObjectsHandler {
|
|
|
193
190
|
if (!resource.isFullResource?.()) {
|
|
194
191
|
target = await window.sibStore.getData(
|
|
195
192
|
resource["@id"],
|
|
196
|
-
CLIENT_CONTEXT
|
|
193
|
+
CLIENT_CONTEXT,
|
|
197
194
|
);
|
|
198
195
|
}
|
|
199
196
|
}
|
package/vite.config.ts
CHANGED
package/cypress/cypress.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|