Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/weather-forecast/dev/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class FakeBaseClass extends window.HTMLElement implements BaseBlock {
const { name, value: attribute } = attr;
if (attribute) {
const key = name as keyof T;
acc[key] = fromDataUri<any>(attribute);
acc[key] = fromDataUri<unknown>(attribute) as T[keyof T];
}

return acc;
Expand Down
24 changes: 12 additions & 12 deletions samples/weather-forecast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"author": "",
"license": "ISC",
"dependencies": {
"@staffbase/widget-sdk": "^3.15.0",
"@staffbase/widget-sdk": "^3.15.5",
"acorn": "^8.15.0",
"axios": "1.12.2",
"date-fns": "^2.23.0",
"date-fns": "^2.30.0",
"dayjs": "1.11.18",
"react": "^18.3.1",
"react-cool-dimensions": "^3.0.1",
Expand All @@ -38,9 +38,9 @@
"@babel/preset-typescript": "^7.27.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^6.3.0",
"@mui/material": "^6.3.0",
"@mui/system": "^6.1.4",
"@mui/icons-material": "^6.5.0",
"@mui/material": "^6.5.0",
"@mui/system": "^6.5.0",
"@rjsf/core": "5.24.13",
"@rjsf/mui": "5.24.13",
"@rjsf/utils": "5.24.13",
Expand All @@ -52,20 +52,21 @@
"@types/jest": "^29.5.14",
"@types/json-schema": "^7.0.15",
"@types/node": "24.5.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^18.3.24",
"@types/react-dom": "^18.3.7",
"@types/webpack": "5.28.5",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@ungap/custom-elements": "1.3.0",
"babel-eslint": "10.1.0",
"babel-loader": "^9.2.1",
"copy-webpack-plugin": "^12.0.2",
"core-js": "3.45.1",
"eslint": "8.3.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "10.1.8",
"file-loader": "^6.2.0",
"jest": "27.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^30.1.2",
"jest-json-schema": "^6.1.0",
"js-base64": "3.7.8",
"minimal-polyfills": "2.2.3",
Expand All @@ -74,7 +75,6 @@
"ts-loader": "^9.5.4",
"ts-node": "10.9.2",
"typescript": "5.9.2",
"url-loader": "^4.1.1",
"webpack": "^5.101.3",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2",
Expand Down
2 changes: 1 addition & 1 deletion samples/weather-forecast/src/api/useCity.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false } },
});

const wrapper: FunctionComponent = ({ children }) => (
const wrapper: FunctionComponent<{ children: React.ReactNode }> = ({ children }) => (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);

Expand Down
2 changes: 1 addition & 1 deletion samples/weather-forecast/src/api/useWeather.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false } },
});

const wrapper: FunctionComponent = ({ children }) => (
const wrapper: FunctionComponent<{ children: React.ReactNode }> = ({ children }) => (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);

Expand Down
2 changes: 1 addition & 1 deletion samples/weather-forecast/src/api/useWeather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const getWeather = async ({
} = options;
const params = { appid, lang, units, lat, lon };

if (typeof lat === undefined || typeof lon === undefined) {
if (lat === undefined || lon === undefined) {
return Promise.reject(new Error("Missing coordinates."));
}

Expand Down
2 changes: 1 addition & 1 deletion samples/weather-forecast/src/components/Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CSS from "csstype";
export interface CardProperties {
color: string;
smallWidth: boolean;
children: any;
children: React.ReactNode;
}

export const Card: FunctionComponent<CardProperties> = (props) => {
Expand Down
2 changes: 1 addition & 1 deletion samples/weather-forecast/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
},
"typeRoots": ["./typings", "node_modules/@types"]
},
"include": ["src/*"],
"include": ["src/**/*", "dev/**/*"],
"exclude": ["node_modules", "dist"]
}
7 changes: 2 additions & 5 deletions samples/weather-forecast/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ const config: webpack.Configuration = {
},
{
test: /\.svg$/i,
exclude: /weather-forecast\.svg$/,
use: [{ loader: "@svgr/webpack", options: { icon: true } }],
},
{
test: /weather-forecast\.svg$/,
use: [
{
loader: "url-loader",
},
],
type: "asset/inline",
},
],
},
Expand Down
Loading
Loading