@startinblox/components-ds4go 3.3.6 → 3.3.8
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/dist/index.js +1612 -2255
- package/package.json +1 -1
- package/src/component.d.ts +2 -1
- package/src/components/modal/customer-modal/ds4go-contract-modal-part.ts +7 -7
- package/src/components/modal/ds4go-catalog-modal.ts +2 -896
- package/src/components/modal/ds4go-customer-modal.ts +5 -5
- package/src/components/modal/ds4go-fact-bundle-modal.ts +4 -4
- package/src/components/solid-customer-list.ts +6 -3
- package/src/components/solid-fact-bundle-creation.ts +18 -15
- package/src/components/solid-fact-bundle.ts +9 -6
- package/src/ds4go.d.ts +45 -0
package/package.json
CHANGED
package/src/component.d.ts
CHANGED
|
@@ -111,6 +111,8 @@ export interface LimitedResource {
|
|
|
111
111
|
permissions?: Permission[];
|
|
112
112
|
clientContext?: Context | Promise<Context>;
|
|
113
113
|
serverContext?: Context | Promise<Context>;
|
|
114
|
+
created_at?: DateTime;
|
|
115
|
+
updated_at?: DateTime;
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
export interface Resource extends LimitedResource {
|
|
@@ -156,7 +158,6 @@ export interface SearchObject {
|
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
export interface DSPComponentParameters extends ComponentParameters {
|
|
159
|
-
"api-gateway-config"?: string;
|
|
160
161
|
"participant-connector-uri"?: string;
|
|
161
162
|
"participant-id"?: string;
|
|
162
163
|
"participant-api-key"?: string;
|
|
@@ -3,14 +3,14 @@ import type {
|
|
|
3
3
|
Asset,
|
|
4
4
|
ContractAgreement,
|
|
5
5
|
PolicyDefinition,
|
|
6
|
-
Resource,
|
|
7
6
|
} from "@src/component";
|
|
7
|
+
import type { Category, Fact, FactBundle } from "@src/ds4go";
|
|
8
8
|
import ComponentStyle from "@styles/modal/customer-modal/ds4go-contract-modal-part.scss?inline";
|
|
9
9
|
import { css, html, LitElement, nothing, unsafeCSS } from "lit";
|
|
10
10
|
import { customElement, state } from "lit/decorators.js";
|
|
11
11
|
|
|
12
12
|
type ExtendedContractAgreement = ContractAgreement & {
|
|
13
|
-
relatedBundle?:
|
|
13
|
+
relatedBundle?: FactBundle;
|
|
14
14
|
relatedAsset?: Asset;
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -28,7 +28,7 @@ export class DS4GOCustomerContractModalPart extends LitElement {
|
|
|
28
28
|
assets?: Asset[] = [];
|
|
29
29
|
|
|
30
30
|
@state()
|
|
31
|
-
bundles?:
|
|
31
|
+
bundles?: FactBundle[] = [];
|
|
32
32
|
|
|
33
33
|
@state()
|
|
34
34
|
policies?: PolicyDefinition[] = [];
|
|
@@ -52,12 +52,12 @@ export class DS4GOCustomerContractModalPart extends LitElement {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
_getRelatedBundle(asset?: Asset):
|
|
55
|
+
_getRelatedBundle(asset?: Asset): FactBundle | undefined {
|
|
56
56
|
if (!asset?.dataAddress?.baseUrl) {
|
|
57
57
|
return undefined;
|
|
58
58
|
}
|
|
59
59
|
const baseUrl = asset.dataAddress.baseUrl;
|
|
60
|
-
return this.bundles?.find((bundle:
|
|
60
|
+
return this.bundles?.find((bundle: FactBundle) =>
|
|
61
61
|
bundle["@id"].includes(baseUrl),
|
|
62
62
|
);
|
|
63
63
|
}
|
|
@@ -184,9 +184,9 @@ export class DS4GOCustomerContractModalPart extends LitElement {
|
|
|
184
184
|
>${msg("Facts in this bundle")}</tems-division
|
|
185
185
|
>
|
|
186
186
|
<div class="facts-list">
|
|
187
|
-
${this.agreement.relatedBundle.facts?.map((fact:
|
|
187
|
+
${this.agreement.relatedBundle.facts?.map((fact: Fact) => {
|
|
188
188
|
const tags =
|
|
189
|
-
fact.categories
|
|
189
|
+
(fact.categories || []).map((c: Category) => ({
|
|
190
190
|
name: c.name,
|
|
191
191
|
type: "information",
|
|
192
192
|
})) || [];
|