Skip to content

Commit ad2a1da

Browse files
committed
Merge branch 'main' of https://github.com/platform-mesh/portal-ui-lib into strict-null-check
2 parents 3ecb4ec + 98bf219 commit ad2a1da

File tree

12 files changed

+255
-231
lines changed

12 files changed

+255
-231
lines changed

CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Default code owners
2+
* @platform-mesh/tsc @platform-mesh/ui-approvers @platform-mesh/frame
3+
package.json
4+
package-lock.json

docs/readme-generic-ui.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Each field definition supports the following properties:
5858
- `"fontStyle"`: Font style for the value (CSS font-style value)
5959
- `"textDecoration"`: Text decoration for the value (CSS text-decoration value)
6060
- `"textTransform"`: Text transformation for the value (CSS text-transform value)
61+
- `"displayAsPlainText"`: Boolean valu that give you ability to render value as it is, without any built-in transformation.
6162
- `"dynamicValuesDefinition"`: Configuration for dynamic value loading:
6263
- `"operation"`: GraphQL operation name
6364
- `"gqlQuery"`: GraphQL query string

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@platform-mesh/portal-ui-lib",
3-
"version": "0.15.4",
3+
"version": "0.16.1",
44
"scripts": {
55
"ng": "ng",
66
"build": "npm run build:lib && npm run build:wc",
@@ -18,7 +18,7 @@
1818
},
1919
"prettier": "@openmfp/config-prettier",
2020
"dependencies": {
21-
"tslib": "^2.3.0"
21+
"tslib": "2.8.1"
2222
},
2323
"devDependencies": {
2424
"@angular-builders/jest": "^20.0.0",
@@ -28,22 +28,22 @@
2828
"@angular/cli": "^20.2.0",
2929
"@angular/compiler-cli": "^20.2.1",
3030
"@angular/localize": "^20.2.1",
31-
"@briebug/jest-schematic": "^6.0.0",
32-
"@openmfp/portal-ui-lib": ">=0.180.0",
33-
"@openmfp/config-prettier": "^0.8.1",
31+
"@briebug/jest-schematic": "6.0.0",
32+
"@openmfp/portal-ui-lib": "0.181.8",
33+
"@openmfp/config-prettier": "0.8.1",
3434
"@types/jest": "^30.0.0",
3535
"@types/jmespath": "0.15.2",
36-
"@types/jsonpath": "^0.2.4",
37-
"@ui5/webcomponents-ngx": "^0.5.0",
38-
"kubernetes-types": "^1.30.0",
39-
"cpx2": "^8.0.0",
36+
"@types/jsonpath": "0.2.4",
37+
"@ui5/webcomponents-ngx": "0.5.6",
38+
"kubernetes-types": "1.30.0",
39+
"cpx2": "8.0.0",
4040
"jest": "^29.7.0",
4141
"jest-jasmine2": "29.7.0",
4242
"jest-junit": "16.0.0",
4343
"jest-mock-extended": "3.0.7",
4444
"jmespath": "0.16.0",
45-
"mkdirp": "^3.0.1",
46-
"move-cli": "^2.0.0",
45+
"mkdirp": "3.0.1",
46+
"move-cli": "2.0.0",
4747
"ng-packagr": "^20.2.0",
4848
"ngx-build-plus": "^20.0.0",
4949
"nodemon": "3.1.10",

projects/lib/models/models/resource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface FieldDefinition {
2323
multiline?: boolean;
2424
};
2525
labelDisplay?: LabelDisplay | boolean;
26+
displayAsPlainText?: boolean;
2627
dynamicValuesDefinition?: {
2728
operation: string;
2829
gqlQuery: string;

projects/lib/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "@platform-mesh/portal-ui-lib",
33
"version": "0.0.0",
44
"dependencies": {
5-
"tslib": "^2.3.0"
5+
"tslib": "2.8.1"
66
},
77
"prettier": "@openmfp/config-prettier",
88
"peerDependencies": {
9-
"@openmfp/portal-ui-lib": ">=0.180.0",
9+
"@openmfp/portal-ui-lib": "0.181.8",
1010
"@angular/common": "^19.0.0 || ^20.0.0",
1111
"@angular/compiler": "^19.0.0 || ^20.0.0",
1212
"@angular/core": "^19.0.0 || ^20.0.0",
@@ -15,13 +15,13 @@
1515
"@angular/platform-browser": "^19.0.0 || ^20.0.0",
1616
"@angular/platform-browser-dynamic": "^19.0.0 || ^20.0.0",
1717
"@angular/router": "^19.0.0 || ^20.0.0",
18-
"@ui5/webcomponents-ngx": "^0.4.8 || ^0.5.0",
18+
"@ui5/webcomponents-ngx": "0.5.6",
1919
"apollo-angular": "^10.0.0 || ^11.0.0",
20-
"gql-query-builder": "^3.8.0",
21-
"graphql": "^17.0.0 || ^16.10.0",
20+
"gql-query-builder": "3.8.0",
21+
"graphql": "16.11.0",
2222
"graphql-sse": "2.6.0",
2323
"rxjs": "~7.8.0",
2424
"zone.js": "~0.15.1",
25-
"jsonpath": "^1.1.1"
25+
"jsonpath": "1.1.1"
2626
}
2727
}

projects/wc/src/app/components/generic-ui/detail-view/detail-view.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
@for (field of viewField.group.fields; let last = $last; track field.label) {
4949
<span [class.multiline]="viewField.group.multiline ?? true">
5050
<span>{{ field.label }}: </span>
51-
<value-cell [labelDisplay]="field.labelDisplay" [value]="getResourceValueByJsonPath(resource, field)"></value-cell>
51+
<value-cell
52+
[labelDisplay]="field.labelDisplay"
53+
[value]="getResourceValueByJsonPath(resource, field)"
54+
[displayAsPlainText]="!!field.displayAsPlainText" />
5255
</span>
5356
@if (!last && viewField.group.delimiter) {
5457
<span>{{ viewField.group.delimiter }}</span>
@@ -58,7 +61,10 @@
5861
} @else {
5962
<ui5-label>{{ viewField.label }}</ui5-label>
6063
<p>
61-
<value-cell [labelDisplay]="viewField.labelDisplay" [value]="getResourceValueByJsonPath(resource, viewField)"></value-cell>
64+
<value-cell
65+
[labelDisplay]="viewField.labelDisplay"
66+
[value]="getResourceValueByJsonPath(resource, viewField)"
67+
[displayAsPlainText]="!!viewField.displayAsPlainText" />
6268
</p>
6369
}
6470
</div>

projects/wc/src/app/components/generic-ui/list-view/list-view.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@
6767
@for (field of column.group.fields; let last = $last; track field.label) {
6868
<div>
6969
<span>{{ field.label }}: </span>
70-
<value-cell [labelDisplay]="field.labelDisplay" [value]="getResourceValueByJsonPath(item, field)"></value-cell>
70+
<value-cell
71+
[labelDisplay]="field.labelDisplay"
72+
[displayAsPlainText]="!!field.displayAsPlainText"
73+
[value]="getResourceValueByJsonPath(item, field)" />
7174
</div>
7275
@if (!last && column.group.delimiter) {
7376
<span>{{ column.group.delimiter }}</span>
@@ -76,7 +79,10 @@
7679
</ui5-table-cell>
7780
} @else {
7881
<ui5-table-cell>
79-
<value-cell [labelDisplay]="column.labelDisplay" [value]="getResourceValueByJsonPath(item, column)"></value-cell>
82+
<value-cell
83+
[labelDisplay]="column.labelDisplay"
84+
[displayAsPlainText]="!!column.displayAsPlainText"
85+
[value]="getResourceValueByJsonPath(item, column)" />
8086
</ui5-table-cell>
8187
}
8288
}

0 commit comments

Comments
 (0)