@sealcode/sealgen 0.19.23 → 0.19.25-hotfix1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/forms/controls/array.d.ts +3 -1
- package/@types/forms/controls/controls.d.ts +0 -1
- package/@types/forms/controls/dropdown.d.ts +6 -6
- package/@types/forms/controls/single-reference.d.ts +8 -6
- package/@types/forms/fields/CollectionField.d.ts +1 -0
- package/@types/forms/fields/boolean.d.ts +1 -2
- package/@types/forms/fields/collection-field.d.ts +12 -5
- package/@types/forms/fields/coordinates.d.ts +2 -2
- package/@types/forms/fields/date.d.ts +1 -2
- package/@types/forms/fields/datetime.d.ts +1 -2
- package/@types/forms/fields/deep-reverse-single-reference-list.d.ts +1 -1
- package/@types/forms/fields/deep-reverse-single-reference-table.d.ts +1 -2
- package/@types/forms/fields/enum-multiple-sealious.d.ts +1 -2
- package/@types/forms/fields/field.d.ts +8 -4
- package/@types/forms/fields/fields.d.ts +1 -0
- package/@types/forms/fields/file.d.ts +4 -3
- package/@types/forms/fields/int.d.ts +1 -2
- package/@types/forms/fields/json.d.ts +1 -2
- package/@types/forms/fields/phone-number-with-country-code.d.ts +1 -2
- package/@types/forms/fields/pick-from-list.d.ts +2 -2
- package/@types/forms/fields/regexp.d.ts +1 -2
- package/@types/forms/fields/simple-form-field.d.ts +3 -4
- package/@types/forms/fields/single-reference.d.ts +2 -3
- package/@types/forms/fields/structured-array.d.ts +1 -2
- package/@types/forms/fields/structured.d.ts +19 -0
- package/@types/forms/fields/text.d.ts +1 -2
- package/@types/forms/fields/url.d.ts +1 -2
- package/@types/forms/multiform.d.ts +4 -3
- package/@types/index.d.ts +29 -18
- package/@types/page/stateful-page.d.ts +3 -2
- package/@types/src/add-collection.d.ts +1 -0
- package/@types/src/add-crud.d.ts +3 -0
- package/@types/src/add-crud.test.d.ts +1 -0
- package/@types/src/add-jdd-component.d.ts +1 -0
- package/@types/src/add-list-route.test.d.ts +1 -0
- package/@types/src/add-route.d.ts +3 -0
- package/@types/src/add-route.test.d.ts +1 -0
- package/@types/src/build.d.ts +3 -0
- package/@types/src/builders/backend-ts-builder.d.ts +7 -0
- package/@types/src/builders/builder.d.ts +11 -0
- package/@types/src/builders/colors-builder.d.ts +10 -0
- package/@types/src/builders/css-builder.d.ts +19 -0
- package/@types/src/builders/fonts-builder.d.ts +7 -0
- package/@types/src/builders/frontend-ts-builder.d.ts +11 -0
- package/@types/src/cli.d.ts +2 -0
- package/@types/src/components/components.d.ts +2 -0
- package/@types/src/components/tabs.d.ts +2 -0
- package/@types/src/components/toggle-modal.d.ts +6 -0
- package/@types/src/controllers/password-generate-button.stimulus.d.ts +5 -0
- package/@types/src/controllers/sealgen-table.stimulus.d.ts +13 -0
- package/@types/src/embeddable-file-extensions.d.ts +1 -0
- package/@types/src/esbuild-plugins/load-assets.d.ts +5 -0
- package/@types/src/esbuild-plugins/rewrite-asset-imports.d.ts +5 -0
- package/@types/src/example.test.d.ts +1 -0
- package/@types/src/forms/controls/array.d.ts +33 -0
- package/@types/src/forms/controls/autocomplete.d.ts +22 -0
- package/@types/src/forms/controls/big-radio-group.d.ts +14 -0
- package/@types/src/forms/controls/checkbox-group.d.ts +21 -0
- package/@types/src/forms/controls/checkbox.d.ts +17 -0
- package/@types/src/forms/controls/checkboxed-list-input.d.ts +21 -0
- package/@types/src/forms/controls/checkboxed-list-input.test.d.ts +1 -0
- package/@types/src/forms/controls/collapsible-checkbox-group.d.ts +11 -0
- package/@types/src/forms/controls/collapsible-field-group.d.ts +21 -0
- package/@types/src/forms/controls/controls.d.ts +32 -0
- package/@types/src/forms/controls/derived-frame.d.ts +19 -0
- package/@types/src/forms/controls/derived.d.ts +13 -0
- package/@types/src/forms/controls/dropdown.d.ts +30 -0
- package/@types/src/forms/controls/editable-collection-subset.d.ts +20 -0
- package/@types/src/forms/controls/field-group.d.ts +23 -0
- package/@types/src/forms/controls/file.d.ts +12 -0
- package/@types/src/forms/controls/file.test.d.ts +1 -0
- package/@types/src/forms/controls/form-control.d.ts +23 -0
- package/@types/src/forms/controls/form-field-control.d.ts +13 -0
- package/@types/src/forms/controls/form-header.d.ts +8 -0
- package/@types/src/forms/controls/form-paragraph.d.ts +7 -0
- package/@types/src/forms/controls/frame.d.ts +17 -0
- package/@types/src/forms/controls/hidden-input.d.ts +9 -0
- package/@types/src/forms/controls/html.d.ts +11 -0
- package/@types/src/forms/controls/hybrid.d.ts +10 -0
- package/@types/src/forms/controls/image.d.ts +19 -0
- package/@types/src/forms/controls/image.test.d.ts +1 -0
- package/@types/src/forms/controls/multiple-files.d.ts +42 -0
- package/@types/src/forms/controls/multiple-images.d.ts +19 -0
- package/@types/src/forms/controls/number.d.ts +13 -0
- package/@types/src/forms/controls/password-with-generator.d.ts +6 -0
- package/@types/src/forms/controls/radio.d.ts +16 -0
- package/@types/src/forms/controls/simple-input.d.ts +35 -0
- package/@types/src/forms/controls/single-reference.d.ts +14 -0
- package/@types/src/forms/controls/single-reference.test.d.ts +1 -0
- package/@types/{forms/controls/table.d.sync-conflict-20260502-145940-GP5D735.ts → src/forms/controls/table.d.ts} +2 -0
- package/@types/src/forms/controls/textarea.d.ts +25 -0
- package/@types/src/forms/controls/tickable.d.ts +25 -0
- package/@types/src/forms/fields/boolean.d.ts +22 -0
- package/@types/src/forms/fields/boolean.test.d.ts +1 -0
- package/@types/src/forms/fields/checkboxed-list.d.ts +23 -0
- package/@types/src/forms/fields/collection-field.d.ts +22 -0
- package/@types/src/forms/fields/color.d.ts +4 -0
- package/@types/src/forms/fields/coordinates.d.ts +14 -0
- package/@types/src/forms/fields/date.d.ts +13 -0
- package/@types/src/forms/fields/datetime.d.ts +14 -0
- package/@types/src/forms/fields/deep-reverse-single-reference-list.d.ts +20 -0
- package/@types/src/forms/fields/deep-reverse-single-reference-table.d.ts +16 -0
- package/@types/src/forms/fields/email.d.ts +10 -0
- package/@types/src/forms/fields/email.test.d.ts +1 -0
- package/@types/src/forms/fields/enum-multiple-sealious.d.ts +16 -0
- package/@types/src/forms/fields/existing-sealious-value.d.ts +6 -0
- package/@types/src/forms/fields/field.d.ts +85 -0
- package/@types/src/forms/fields/field.test.d.ts +1 -0
- package/@types/src/forms/fields/fields.d.ts +34 -0
- package/@types/src/forms/fields/file.d.ts +25 -0
- package/@types/src/forms/fields/file.test.d.ts +1 -0
- package/@types/src/forms/fields/float.d.ts +4 -0
- package/@types/src/forms/fields/get-field-for-sealious.d.ts +33 -0
- package/@types/src/forms/fields/html.d.ts +6 -0
- package/@types/src/forms/fields/hybrid.d.ts +11 -0
- package/@types/src/forms/fields/image.d.ts +5 -0
- package/@types/src/forms/fields/int.d.ts +6 -0
- package/@types/src/forms/fields/item-draft.d.ts +20 -0
- package/@types/src/forms/fields/json.d.ts +13 -0
- package/@types/src/forms/fields/markdown.d.ts +6 -0
- package/@types/src/forms/fields/multiple-files.d.ts +16 -0
- package/@types/src/forms/fields/number.d.ts +25 -0
- package/@types/src/forms/fields/number.test.d.ts +1 -0
- package/@types/src/forms/fields/password.d.ts +10 -0
- package/@types/src/forms/fields/phone-number-with-country-code.d.ts +13 -0
- package/@types/src/forms/fields/phone-number.d.ts +17 -0
- package/@types/src/forms/fields/pick-from-list-sealious.d.ts +11 -0
- package/@types/src/forms/fields/pick-from-list.d.ts +15 -0
- package/@types/src/forms/fields/pick-from-list.test.d.ts +1 -0
- package/@types/src/forms/fields/proxy-field.d.ts +15 -0
- package/@types/src/forms/fields/regexp.d.ts +21 -0
- package/@types/src/forms/fields/regexp.test.d.ts +1 -0
- package/@types/src/forms/fields/simple-form-field.d.ts +31 -0
- package/@types/src/forms/fields/single-reference.d.ts +19 -0
- package/@types/src/forms/fields/structured-array.d.ts +23 -0
- package/@types/src/forms/fields/table.d.ts +16 -0
- package/@types/src/forms/fields/text.d.ts +6 -0
- package/@types/src/forms/fields/url.d.ts +6 -0
- package/@types/src/forms/form-types.d.ts +28 -0
- package/@types/src/forms/form.d.ts +34 -0
- package/@types/src/forms/form.test.d.ts +6 -0
- package/@types/src/forms/multiform.d.ts +23 -0
- package/@types/src/forms/multiform.test.d.ts +1 -0
- package/@types/src/generate-collections.d.ts +2 -0
- package/@types/src/generate-components.d.ts +1 -0
- package/@types/src/generate-routes.d.ts +5 -0
- package/@types/src/generate-routes.test.d.ts +1 -0
- package/@types/src/generate-stimulus.d.ts +1 -0
- package/@types/src/get-fonts.d.ts +2 -0
- package/@types/{index.d.sync-conflict-20260502-145557-GP5D735.ts → src/index.d.ts} +1 -0
- package/@types/src/make-env.d.ts +1 -0
- package/@types/src/make-hidden-inputs.d.ts +5 -0
- package/@types/src/mount.d.ts +6 -0
- package/@types/src/notifier.d.ts +2 -0
- package/@types/src/page/access-control.d.ts +6 -0
- package/@types/src/page/default-list-filters.d.ts +18 -0
- package/@types/src/page/list.d.ts +49 -0
- package/@types/src/page/mountable-with-fields.d.ts +49 -0
- package/@types/src/page/mountable-with-fields.test.d.ts +1 -0
- package/@types/src/page/mountable.d.ts +10 -0
- package/@types/src/page/page.d.ts +18 -0
- package/@types/src/page/props-parser.d.ts +15 -0
- package/@types/src/page/sealious-list.d.ts +20 -0
- package/@types/src/page/sealious-list.test.d.ts +1 -0
- package/@types/src/page/stateful-page.d.ts +63 -0
- package/@types/src/page/stateful-page.test.d.ts +1 -0
- package/@types/src/register-external.d.ts +2 -0
- package/@types/src/register-external.test.d.ts +1 -0
- package/@types/src/run.d.ts +1 -0
- package/@types/src/sanitize.d.ts +1 -0
- package/@types/src/target-locreq.d.ts +4 -0
- package/@types/src/templates/collection.d.ts +1 -0
- package/@types/src/templates/form.d.ts +14 -0
- package/@types/src/templates/form.test.d.ts +1 -0
- package/@types/src/templates/jdd-component.d.ts +1 -0
- package/@types/src/templates/jdd-editor.d.ts +1 -0
- package/@types/src/templates/list.d.ts +1 -0
- package/@types/src/templates/long-running-process.d.ts +1 -0
- package/@types/src/templates/multiform.d.ts +1 -0
- package/@types/src/templates/page.d.ts +1 -0
- package/@types/src/templates/post.d.ts +1 -0
- package/@types/src/templates/redirect.d.ts +1 -0
- package/@types/src/templates/route-test.d.ts +1 -0
- package/@types/src/templates/shared/collection-create-form.d.ts +1 -0
- package/@types/src/templates/shared/collection-edit-form.d.ts +1 -0
- package/@types/src/templates/shared/collection-list.d.ts +16 -0
- package/@types/src/templates/shared/item-delete.d.ts +1 -0
- package/@types/src/templates/shared/shared-crud-form-fields.d.ts +1 -0
- package/@types/src/templates/stateful-page.d.ts +1 -0
- package/@types/src/templates/stimulus-controller.d.ts +1 -0
- package/@types/src/templates/templates.d.ts +1 -0
- package/@types/src/test_utils/exec_async.d.ts +1 -0
- package/@types/src/test_utils/locator_is_visible.d.ts +2 -0
- package/@types/src/test_utils/test-on-real-app.d.ts +26 -0
- package/@types/src/utils/assert-throws.d.ts +1 -0
- package/@types/src/utils/base64.d.ts +2 -0
- package/@types/src/utils/browser-creator.d.ts +1 -0
- package/@types/src/utils/escape-url-params.d.ts +2 -0
- package/@types/src/utils/exec.d.ts +5 -0
- package/@types/src/utils/extract-fields-from-collection.d.ts +14 -0
- package/@types/src/utils/format-external-url.d.ts +1 -0
- package/@types/src/utils/import-path.d.ts +2 -0
- package/@types/src/utils/input-wrapper.d.ts +5 -0
- package/@types/src/utils/list-collections.d.ts +1 -0
- package/@types/src/utils/make-slug.d.ts +1 -0
- package/@types/src/utils/module-dirname.d.ts +1 -0
- package/@types/src/utils/natural-numbers.d.ts +1 -0
- package/@types/src/utils/prettier.d.ts +3 -0
- package/@types/src/utils/question.d.ts +1 -0
- package/@types/src/utils/render-attributes.d.ts +1 -0
- package/@types/src/utils/sleep.d.ts +1 -0
- package/@types/src/utils/translate.d.ts +4 -0
- package/@types/src/utils/url-with-new-params.d.ts +2 -0
- package/@types/src/utils/utils.d.ts +17 -0
- package/@types/src/utils/walk.d.ts +1 -0
- package/@types/src/utils/with-fallback.d.ts +2 -0
- package/@types/src/utils/wrap-attributes.d.ts +3 -0
- package/@types/src/utils/write-file.d.ts +1 -0
- package/@types/templates/long-running-process.d.ts +1 -1
- package/@types/templates/multiform.d.ts +1 -1
- package/@types/templates/route-test.d.ts +1 -1
- package/@types/templates/shared/item-delete.d.ts +1 -1
- package/@types/templates/stateful-page.d.ts +1 -1
- package/lib/add-crud.js +2 -8
- package/lib/builders/backend-ts-builder.js +1 -1
- package/lib/forms/controls/textarea.js +2 -1
- package/lib/templates/long-running-process.js +2 -4
- package/lib/templates/multiform.js +2 -4
- package/lib/templates/route-test.js +4 -8
- package/lib/templates/shared/item-delete.js +3 -7
- package/lib/templates/stateful-page.js +2 -4
- package/package.json +1 -1
- package/src/add-crud.ts +2 -8
- package/src/builders/backend-ts-builder.ts +1 -0
- package/src/forms/controls/textarea.ts +5 -4
- package/src/templates/long-running-process.ts +2 -5
- package/src/templates/multiform.ts +2 -8
- package/src/templates/route-test.ts +4 -11
- package/src/templates/shared/item-delete.ts +3 -8
- package/src/templates/stateful-page.ts +2 -5
package/src/add-crud.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { toKebabCase, toPascalCase } from "js-convert-case";
|
|
|
5
5
|
import { listCollections } from "./utils/list-collections.js";
|
|
6
6
|
import { collectionListTemplate } from "./templates/shared/collection-list.js";
|
|
7
7
|
import { writeFile } from "./utils/write-file.js";
|
|
8
|
-
import { curryImportPath, importPath } from "./utils/import-path.js";
|
|
9
8
|
import { sharedCrudFormFields } from "./templates/shared/shared-crud-form-fields.js";
|
|
10
9
|
import { generateRoutes } from "./generate-routes.js";
|
|
11
10
|
import { createItemFormTemplate } from "./templates/shared/collection-create-form.js";
|
|
@@ -57,10 +56,7 @@ export async function addCRUD(
|
|
|
57
56
|
list_action_name,
|
|
58
57
|
list_path,
|
|
59
58
|
{
|
|
60
|
-
post_import_js: `import { ${create_action_name}URL, ${edit_action_name}URL, ${delete_action_name}URL } from "
|
|
61
|
-
list_path,
|
|
62
|
-
"src/back/routes/urls.ts"
|
|
63
|
-
)}";`,
|
|
59
|
+
post_import_js: `import { ${create_action_name}URL, ${edit_action_name}URL, ${delete_action_name}URL } from "src/back/routes/urls.js";`,
|
|
64
60
|
post_header_html: `<a href={${create_action_name}URL}> Create </a>`,
|
|
65
61
|
render_item: (
|
|
66
62
|
collection_name: string
|
|
@@ -119,12 +115,10 @@ export async function addCRUD(
|
|
|
119
115
|
const delete_path = target_locreq.resolve(
|
|
120
116
|
`src/back/routes/${escape_url_params(url)}/[id]/delete.page.tsx`
|
|
121
117
|
);
|
|
122
|
-
const base_import_path = curryImportPath(delete_path);
|
|
123
118
|
const delete_content = await itemDeleteTemplate(
|
|
124
119
|
delete_action_name,
|
|
125
120
|
collection_name,
|
|
126
|
-
list_action_name
|
|
127
|
-
base_import_path
|
|
121
|
+
list_action_name
|
|
128
122
|
);
|
|
129
123
|
await writeFile(delete_path, delete_content);
|
|
130
124
|
|
|
@@ -22,6 +22,7 @@ export class BackendTSBuilder extends Builder {
|
|
|
22
22
|
!file_path.endsWith("src/back/collections/collections.ts") &&
|
|
23
23
|
!file_path.endsWith("src/back/routes/routes.ts") &&
|
|
24
24
|
!file_path.endsWith("src/back/routes/urls.ts") &&
|
|
25
|
+
!file_path.endsWith("src/back/jdd-components/components.ts") &&
|
|
25
26
|
!file_path.endsWith("stimulus.ts") &&
|
|
26
27
|
!file_path.startsWith("src/front")
|
|
27
28
|
);
|
|
@@ -3,6 +3,7 @@ import { FormField } from "../fields/field.js";
|
|
|
3
3
|
import { FormDataValue } from "../form-types.js";
|
|
4
4
|
import { FormControlContext } from "./form-control.js";
|
|
5
5
|
import { SimpleInput, SimpleInputOptions } from "./simple-input.js";
|
|
6
|
+
import { htmlEscape } from "escape-goat";
|
|
6
7
|
|
|
7
8
|
export class Textarea extends SimpleInput {
|
|
8
9
|
constructor(
|
|
@@ -19,11 +20,11 @@ export class Textarea extends SimpleInput {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
renderDescription() {
|
|
22
|
-
return this.options.description
|
|
23
|
-
|
|
23
|
+
return this.options.description ?
|
|
24
|
+
/* HTML */ `<div class="form-input__description">
|
|
24
25
|
${this.options.description}
|
|
25
26
|
</div>`
|
|
26
|
-
:
|
|
27
|
+
: "";
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
async getInputAttributes(
|
|
@@ -51,7 +52,7 @@ export class Textarea extends SimpleInput {
|
|
|
51
52
|
) {
|
|
52
53
|
const { parsed: value } = await this.field.getParsedValue(ctx, data);
|
|
53
54
|
return /* HTML */ `<textarea ${attributes}>
|
|
54
|
-
${String(value) || ""}</textarea
|
|
55
|
+
${htmlEscape(String(value)) || ""}</textarea
|
|
55
56
|
>`;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { toSentenceCase } from "js-convert-case";
|
|
2
|
-
import { curryImportPath } from "../utils/import-path.js";
|
|
3
2
|
|
|
4
3
|
export async function LongRunningProcessTemplate(
|
|
5
|
-
action_name: string
|
|
6
|
-
newfilefullpath: string
|
|
4
|
+
action_name: string
|
|
7
5
|
): Promise<string> {
|
|
8
|
-
const rel = curryImportPath(newfilefullpath);
|
|
9
6
|
return `import { Context } from "koa";
|
|
10
7
|
import { TempstreamJSX } from "tempstream";
|
|
11
8
|
import { Page } from "@sealcode/sealgen";
|
|
12
9
|
import type { BreadcrumbLabel } from "@sealcode/sealgen";
|
|
13
|
-
import html from "
|
|
10
|
+
import html from "src/back/html.js";
|
|
14
11
|
import { LongRunningProcess } from "sealious";
|
|
15
12
|
|
|
16
13
|
export const actionName = "${action_name}";
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export async function multiformTemplate(
|
|
4
|
-
action_name: string,
|
|
5
|
-
newfilefullpath: string
|
|
6
|
-
): Promise<string> {
|
|
7
|
-
const rel = curryImportPath(newfilefullpath);
|
|
1
|
+
export async function multiformTemplate(action_name: string): Promise<string> {
|
|
8
2
|
return `import { Context } from "koa";
|
|
9
|
-
import html from "
|
|
3
|
+
import html from "src/back/html.js";
|
|
10
4
|
import { Controls, Fields, Form, FormMessage, Multiform } from "@sealcode/sealgen";
|
|
11
5
|
import type { BreadcrumbLabel } from "@sealcode/sealgen";
|
|
12
6
|
import { FlatTemplatable } from "tempstream";
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { curryImportPath } from "../utils/import-path.js";
|
|
2
1
|
import { formatWithPrettier } from "../utils/prettier.js";
|
|
3
2
|
|
|
4
|
-
export async function testTemplate(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const rel = curryImportPath(new_file_fullpath);
|
|
9
|
-
const content = `import { withProdApp } from "${rel(
|
|
10
|
-
"src/back/test_utils/with-prod-app.js"
|
|
11
|
-
)}";
|
|
12
|
-
import { ${action_name}URL } from "${rel("src/back/routes/urls.js")}";
|
|
13
|
-
import { getBrowser } from "${rel("src/back/test_utils/browser-creator.js")}";
|
|
3
|
+
export async function testTemplate(action_name: string) {
|
|
4
|
+
const content = `import { withProdApp } from ""src/back/test_utils/with-prod-app.js";
|
|
5
|
+
import { ${action_name}URL } from "src/back/routes/urls.js";
|
|
6
|
+
import { getBrowser } from "src/back/test_utils/browser-creator.js";
|
|
14
7
|
import type { Browser, BrowserContext, Page } from "@playwright/test";
|
|
15
8
|
|
|
16
9
|
describe("${action_name}", () => {
|
|
@@ -4,21 +4,16 @@ import { formatWithPrettier } from "../../utils/prettier.js";
|
|
|
4
4
|
export function itemDeleteTemplate(
|
|
5
5
|
delete_action_name: string,
|
|
6
6
|
collection_name: string,
|
|
7
|
-
list_action_name: string
|
|
8
|
-
importPath: (path: string) => string
|
|
7
|
+
list_action_name: string
|
|
9
8
|
): Promise<string> {
|
|
10
9
|
const result = `import type { Context } from "koa";
|
|
11
10
|
import { Mountable } from "@sealcode/sealgen";
|
|
12
11
|
import type Router from "@koa/router";
|
|
13
12
|
import type { BreadcrumbLabel } from "@sealcode/sealgen";
|
|
14
13
|
|
|
15
|
-
import { ${toPascalCase(collection_name)} } from "
|
|
16
|
-
"src/back/collections/collections.js"
|
|
17
|
-
)}";
|
|
14
|
+
import { ${toPascalCase(collection_name)} } from "src/back/collections/collections.js";
|
|
18
15
|
|
|
19
|
-
import { ${list_action_name}URL } from "
|
|
20
|
-
"src/back/routes/urls.js"
|
|
21
|
-
)}";
|
|
16
|
+
import { ${list_action_name}URL } from "src/back/routes/urls.js";
|
|
22
17
|
|
|
23
18
|
export const actionName = "${delete_action_name}";
|
|
24
19
|
export const breadcrumbLabel: BreadcrumbLabel = "${delete_action_name}";
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { curryImportPath } from "../utils/import-path.js";
|
|
2
1
|
import { formatWithPrettier } from "../utils/prettier.js";
|
|
3
2
|
|
|
4
3
|
export async function statefulPageTemplate(
|
|
5
|
-
action_name: string
|
|
6
|
-
newfilefullpath: string
|
|
4
|
+
action_name: string
|
|
7
5
|
): Promise<string> {
|
|
8
|
-
const rel = curryImportPath(newfilefullpath);
|
|
9
6
|
return formatWithPrettier(`import { TempstreamJSX, Templatable } from "tempstream";
|
|
10
7
|
import { Context } from "koa";
|
|
11
8
|
import { StatefulPage, StatefulPageActionArgument } from "@sealcode/sealgen";
|
|
12
9
|
import type { BreadcrumbLabel } from "@sealcode/sealgen";
|
|
13
|
-
import html from "
|
|
10
|
+
import html from "src/back/html.js";
|
|
14
11
|
|
|
15
12
|
export const actionName = "${action_name}";
|
|
16
13
|
export const breadcrumbLabel: BreadcrumbLabel = "${action_name}";
|