Skip to content

Commit

Permalink
Still dealing with CSS changes, bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoffat committed Sep 12, 2024
1 parent 2b01eab commit 166cbfa
Show file tree
Hide file tree
Showing 20 changed files with 228 additions and 188 deletions.
114 changes: 64 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kite9/fdc3",
"version": "2.2.0-beta.8",
"version": "2.2.0-beta.16",
"author": "Fintech Open Source Foundation (FINOS)",
"homepage": "https://fdc3.finos.org",
"repository": {
Expand All @@ -26,8 +26,8 @@
"toolbox/fdc3-for-web/fdc3-web-impl",
"packages/fdc3-get-agent",
"toolbox/fdc3-for-web/demo",
"toolbox/fdc3-workbench",
"package/fdc3"
"packages/fdc3",
"toolbox/fdc3-workbench"
],
"scripts": {
"clean": "npm run clean --workspaces --if-present",
Expand All @@ -51,4 +51,4 @@
"devDependencies": {
"concurrently": "^8.2.2"
}
}
}
6 changes: 3 additions & 3 deletions packages/fdc3-agent-proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kite9/fdc3-agent-proxy",
"version": "2.2.0-beta.8",
"version": "2.2.0-beta.16",
"files": [
"dist"
],
Expand All @@ -12,7 +12,7 @@
"clean": "rimraf dist; rimraf cucumber-report.html; rimraf coverage; rimraf .nyc_output; rimraf node_modules"
},
"dependencies": {
"@kite9/fdc3-standard": "2.2.0-beta.8"
"@kite9/fdc3-standard": "2.2.0-beta.16"
},
"devDependencies": {
"@cucumber/cucumber": "10.3.1",
Expand All @@ -33,7 +33,7 @@
"is-ci": "2.0.0",
"jsonpath-plus": "^9.0.0",
"nyc": "15.1.0",
"@kite9/testing": "2.2.0-beta.8",
"@kite9/testing": "2.2.0-beta.16",
"prettier": "3.2.5",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/fdc3-context/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kite9/fdc3-context",
"version": "2.2.0-beta.8",
"version": "2.2.0-beta.16",
"author": "Fintech Open Source Foundation (FINOS)",
"homepage": "https://fdc3.finos.org",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/fdc3-context/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"include": [
"src/**/*.ts",
"generated/**/*.ts",
"generated/**/*",
"schemas/**/*.json"
],
"exclude": [
Expand Down
14 changes: 7 additions & 7 deletions packages/fdc3-get-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kite9/fdc3-get-agent",
"version": "2.2.0-beta.8",
"version": "2.2.0-beta.16",
"files": [
"dist"
],
Expand All @@ -12,17 +12,17 @@
"clean": "rimraf dist; rimraf cucumber-report.html; rimraf coverage; rimraf .nyc_output; rimraf node_modules"
},
"dependencies": {
"@kite9/fdc3-standard": "2.2.0-beta.8",
"@kite9/fdc3-agent-proxy": "2.2.0-beta.8",
"@kite9/fdc3-schema": "2.2.0-beta.8",
"@kite9/fdc3-context": "2.2.0-beta.8",
"@kite9/fdc3-standard": "2.2.0-beta.16",
"@kite9/fdc3-agent-proxy": "2.2.0-beta.16",
"@kite9/fdc3-schema": "2.2.0-beta.16",
"@kite9/fdc3-context": "2.2.0-beta.16",
"@types/uuid": "^10.0.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"@cucumber/cucumber": "10.3.1",
"@kite9/fdc3-web-impl": "2.2.0-beta.8",
"@kite9/testing": "2.2.0-beta.8",
"@kite9/fdc3-web-impl": "2.2.0-beta.16",
"@kite9/testing": "2.2.0-beta.16",
"@types/node": "^20.14.11",
"@types/wtfnode": "^0.7.3",
"expect": "^29.7.0",
Expand Down
22 changes: 12 additions & 10 deletions packages/fdc3-get-agent/src/ui/AbstractUIComponent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IframeHello } from "@kite9/fdc3-schema/generated/api/BrowserTypes";
import { IframeHello, InitialCSS, UpdatedCSS } from "@kite9/fdc3-schema/generated/api/BrowserTypes";
import { Connectable } from "@kite9/fdc3-standard";

export interface CSSPositioning { [key: string]: string }
Expand Down Expand Up @@ -61,7 +61,7 @@ export abstract class AbstractUIComponent implements Connectable {
const data = e.data
if (data.type == 'iframeRestyle') {
// console.log(`Restyling ${JSON.stringify(data.payload)}`)
const css = data.payload.css
const css = data.payload.updatedCSS
this.themeContainer(css)
}
})
Expand Down Expand Up @@ -105,14 +105,16 @@ export abstract class AbstractUIComponent implements Connectable {
document.body.appendChild(this.container)
}

themeContainer(css: CSSPositioning) {
for (let i = 0; i < ALLOWED_CSS_ELEMENTS.length; i++) {
const k = ALLOWED_CSS_ELEMENTS[i]
const value: string | undefined = css[(k as string)]
if (value != null) {
this.container?.style.setProperty(k, value)
} else {
this.container?.style.removeProperty(k)
themeContainer(css: UpdatedCSS | InitialCSS) {
if (css) {
for (let i = 0; i < ALLOWED_CSS_ELEMENTS.length; i++) {
const k = ALLOWED_CSS_ELEMENTS[i]
const value: string | undefined = css[(k as string)]
if (value != null) {
this.container?.style.setProperty(k, value)
} else {
this.container?.style.removeProperty(k)
}
}
}
}
Expand Down
Loading

0 comments on commit 166cbfa

Please sign in to comment.