From de6e676dfafbb1cb39bba54aee4416b6f033a12f Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Thu, 8 Feb 2024 16:22:58 +0100 Subject: [PATCH] Update sealgen, fix type issues --- package-lock.json | 8 ++++---- package.json | 2 +- src/back/jdd-components/components.ts | 9 --------- src/back/routes/components.sreact.tsx | 16 +--------------- src/includes.scss | 1 - 5 files changed, 6 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index f137edf..f1ddb7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@koa/router": "^12.0.1", "@playwright/test": "^1.36.1", "@sealcode/jdd": "^0.2.4", - "@sealcode/sealgen": "^0.11.1", + "@sealcode/sealgen": "^0.11.2", "@sealcode/ts-predicates": "^0.4.3", "@types/kill-port": "^2.0.0", "get-port": "^7.0.0", @@ -1301,9 +1301,9 @@ } }, "node_modules/@sealcode/sealgen": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@sealcode/sealgen/-/sealgen-0.11.1.tgz", - "integrity": "sha512-RH4TUwwHNgz4NE0vVDsXQ45xcPo/NqhmmcFaZhv8od0uXRfzvf5WrugHtrWdEEif4naYXSmJ8te7yaoa9Y5ubg==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@sealcode/sealgen/-/sealgen-0.11.2.tgz", + "integrity": "sha512-CS/RyR3KvzsVRZ2wOrCfA1n54xUvkitDTG7OgMrfUKNVSQLp4Cvg8ewmff8WeknfLNsVz4ALcwrVI8GfSCqCOA==", "dependencies": { "@koa/router": "^12.0.1", "@sealcode/ts-predicates": "^0.4.3", diff --git a/package.json b/package.json index 5bc182f..e7848d8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@koa/router": "^12.0.1", "@playwright/test": "^1.36.1", "@sealcode/jdd": "^0.2.4", - "@sealcode/sealgen": "^0.11.1", + "@sealcode/sealgen": "^0.11.2", "@sealcode/ts-predicates": "^0.4.3", "@types/kill-port": "^2.0.0", "get-port": "^7.0.0", diff --git a/src/back/jdd-components/components.ts b/src/back/jdd-components/components.ts index c45b954..c63b7a9 100644 --- a/src/back/jdd-components/components.ts +++ b/src/back/jdd-components/components.ts @@ -3,14 +3,5 @@ import { Registry } from "@sealcode/jdd"; export const registry = new Registry(); -import { BeigeBox } from "./beige-box/beige-box.jdd.js"; -registry.add("beige-box", BeigeBox); - import { NiceBox } from "./nice-box/nice-box.jdd.js"; registry.add("nice-box", NiceBox); - -import { NicerBox } from "./nicer-box/nicer-box.jdd.js"; -registry.add("nicer-box", NicerBox); - -import { SomeExampleForYouAll } from "./some-example-for-you-all/some-example-for-you-all.jdd.js"; -registry.add("some-example-for-you-all", SomeExampleForYouAll); diff --git a/src/back/routes/components.sreact.tsx b/src/back/routes/components.sreact.tsx index 51af4da..1e6ef37 100644 --- a/src/back/routes/components.sreact.tsx +++ b/src/back/routes/components.sreact.tsx @@ -7,21 +7,7 @@ import { render, simpleJDDContext } from "@sealcode/jdd"; export const actionName = "Components"; -const actions = { - add: (state: State, inputs: Record) => { - console.log({ inputs }); - return { - ...state, - elements: [...state.elements, inputs.element_to_add || "new element"], - }; - }, - remove: (state: State, _: unknown, index_to_remove: number) => { - return { - ...state, - elements: state.elements.filter((_, index) => index != index_to_remove), - }; - }, -} as const; +const actions = {} as const; type State = { component: string; diff --git a/src/includes.scss b/src/includes.scss index e25b10e..42ff604 100644 --- a/src/includes.scss +++ b/src/includes.scss @@ -1,6 +1,5 @@ // DO NOT EDIT! This file is generated automaticaly with npx sealgen generate-scss-includes @import "../node_modules/@sealcode/sealgen/src/forms/forms.scss"; -@import "back/jdd-components/some-example-for-you-all/some-example-for-you-all.scss"; @import "back/routes/common/ui/input.scss"; @import "tables.scss";