diff --git a/.github/workflows/autodev.yaml b/.github/workflows/autodev.yaml index a40f910..7715763 100644 --- a/.github/workflows/autodev.yaml +++ b/.github/workflows/autodev.yaml @@ -8,7 +8,7 @@ on: jobs: autodev: - uses: Staffbase/gha-workflows/.github/workflows/template_autodev.yml@dont-check-private-key + uses: Staffbase/gha-workflows/.github/workflows/template_autodev.yml@v5.3.0 with: comments: true secrets: diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index b430492..9e28b9f 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -7,7 +7,7 @@ on: types: [published] env: - NODE_VERSION: 16 + NODE_VERSION: 20 DEPLOYMENT_KIND: widget DEPLOYMENT_TARGET: weather DEPLOYMENT_STATIC_FILES: staffbase.user-profile-client.min.js diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3186c04..af3bfdb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,6 @@ name: CI Tests env: - NODE_VERSION: 14 + NODE_VERSION: 20 on: push: paths-ignore: @@ -8,7 +8,7 @@ on: jobs: executing-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout repository diff --git a/samples/weather-forecast/.babelrc b/samples/weather-forecast/.babelrc index ee17415..1780f56 100644 --- a/samples/weather-forecast/.babelrc +++ b/samples/weather-forecast/.babelrc @@ -5,6 +5,7 @@ { "useBuiltIns": "usage", "corejs": 3, + "targets": "> 0.25%, not dead, not ie < 11" } ], "@babel/preset-react", diff --git a/samples/weather-forecast/.eslintrc.js b/samples/weather-forecast/.eslintrc.js index a521634..26b9490 100644 --- a/samples/weather-forecast/.eslintrc.js +++ b/samples/weather-forecast/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended" + "prettier" ], rules: { "no-unused-vars": "off", diff --git a/samples/weather-forecast/README.md b/samples/weather-forecast/README.md index 4381503..e68c018 100644 --- a/samples/weather-forecast/README.md +++ b/samples/weather-forecast/README.md @@ -22,4 +22,4 @@ $ yarn install ## Building the form for configuration -This project uses [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/) for configuring the widget properties. For more information consult their [documentation](https://react-jsonschema-form.readthedocs.io/en/latest/) +This project uses [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/) for configuring the widget properties. For more information consult their [documentation](https://rjsf-team.github.io/react-jsonschema-form/docs/) diff --git a/samples/weather-forecast/dev/bootstrap.ts b/samples/weather-forecast/dev/bootstrap.ts index df85871..19e6f45 100644 --- a/samples/weather-forecast/dev/bootstrap.ts +++ b/samples/weather-forecast/dev/bootstrap.ts @@ -1,5 +1,5 @@ /*! - * Copyright 2021, Staffbase GmbH and contributors. + * Copyright 2024, Staffbase GmbH and contributors. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -55,7 +55,7 @@ class FakeBaseClass extends window.HTMLElement implements BaseBlock { } public parseConfig>( - attributes: T + attributes: T, ): Record { return prepareAttributes(attributes); } @@ -69,14 +69,14 @@ window.defineBlock = function (externalBlockDefinition) { const customElementName = externalBlockDefinition.blockDefinition.name; const CustomElementClass = externalBlockDefinition.blockDefinition.factory( FakeBaseClass, - WidgetApiMock + WidgetApiMock, ); - window.customElements.define(customElementName, CustomElementClass); ReactDOM.render( React.createElement(Config, { blockDefinition: externalBlockDefinition.blockDefinition, }), - document.getElementById("config") + document.getElementById("config"), ); + window.customElements.define(customElementName, CustomElementClass); }; diff --git a/samples/weather-forecast/dev/config.tsx b/samples/weather-forecast/dev/config.tsx index 2f34d3b..4a72ccb 100644 --- a/samples/weather-forecast/dev/config.tsx +++ b/samples/weather-forecast/dev/config.tsx @@ -1,5 +1,5 @@ /*! - * Copyright 2021, Staffbase GmbH and contributors. + * Copyright 2024, Staffbase GmbH and contributors. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -41,12 +41,11 @@ const Config: FC = ({ blockDefinition }) => { aria-label={blockDefinition.label} style={{ background: "rgb(247, 247, 247)", - cursor: "pointer", height: "96px", flex: "0 0 20%", borderRadius: "3px", padding: "0px", - margin: "0px", + margin: "5px 0px 0px 0px", display: "flex", alignItems: "center", justifyContent: "center", @@ -57,6 +56,7 @@ const Config: FC = ({ blockDefinition }) => { height="28" src={blockDefinition.iconUrl} style={{ maxWidth: "80px" }} + alt={blockDefinition.label} />