@kozou/svelte-ui 1.9.0 → 1.10.0
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/build/client/_app/immutable/chunks/{BZk9awWK.js → 2V_Gzacq.js} +1 -1
- package/build/client/_app/immutable/chunks/2V_Gzacq.js.br +0 -0
- package/build/client/_app/immutable/chunks/2V_Gzacq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BTvT2hJZ.js → BMcjSLVU.js} +1 -1
- package/build/client/_app/immutable/chunks/BMcjSLVU.js.br +0 -0
- package/build/client/_app/immutable/chunks/BMcjSLVU.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DBJh8-5e.js → BgLGDesB.js} +1 -1
- package/build/client/_app/immutable/chunks/BgLGDesB.js.br +0 -0
- package/build/client/_app/immutable/chunks/BgLGDesB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DZGkWpOy.js → CVx7yMSI.js} +2 -2
- package/build/client/_app/immutable/chunks/CVx7yMSI.js.br +0 -0
- package/build/client/_app/immutable/chunks/CVx7yMSI.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CfACBkhZ.js +1 -0
- package/build/client/_app/immutable/chunks/CfACBkhZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/CfACBkhZ.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.5P3IlGqQ.js → app.LzNl--Wi.js} +2 -2
- package/build/client/_app/immutable/entry/app.LzNl--Wi.js.br +0 -0
- package/build/client/_app/immutable/entry/app.LzNl--Wi.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.nUhd6512.js +1 -0
- package/build/client/_app/immutable/entry/start.nUhd6512.js.br +0 -0
- package/build/client/_app/immutable/entry/start.nUhd6512.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.BJ7Mx76S.js → 1.rmhLZZDX.js} +1 -1
- package/build/client/_app/immutable/nodes/1.rmhLZZDX.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.rmhLZZDX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.DSbTe_mO.js → 3.nxviakdn.js} +1 -1
- package/build/client/_app/immutable/nodes/3.nxviakdn.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.nxviakdn.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.C486-zEy.js → 4.CyMRYzSq.js} +1 -1
- package/build/client/_app/immutable/nodes/4.CyMRYzSq.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CyMRYzSq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.9yC9mSHh.js +1 -0
- package/build/client/_app/immutable/nodes/5.9yC9mSHh.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.9yC9mSHh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.Ch1OuWsA.js +1 -0
- package/build/client/_app/immutable/nodes/6.Ch1OuWsA.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Ch1OuWsA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.nRICc5kB.js +1 -0
- package/build/client/_app/immutable/nodes/7.nRICc5kB.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.nRICc5kB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.Cb70WGbk.js → 8.ByJ3R-gj.js} +1 -1
- package/build/client/_app/immutable/nodes/8.ByJ3R-gj.js.br +2 -0
- package/build/client/_app/immutable/nodes/8.ByJ3R-gj.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{1-sBhukYle.js → 1-DaJg-gl6.js} +3 -3
- package/build/server/chunks/{1-sBhukYle.js.map → 1-DaJg-gl6.js.map} +1 -1
- package/build/server/chunks/{2-BxKRDuEr.js → 2-D9Vt3cQd.js} +2 -2
- package/build/server/chunks/{2-BxKRDuEr.js.map → 2-D9Vt3cQd.js.map} +1 -1
- package/build/server/chunks/{3-j42FDPLO.js → 3-C7h5bnfF.js} +7 -7
- package/build/server/chunks/{3-j42FDPLO.js.map → 3-C7h5bnfF.js.map} +1 -1
- package/build/server/chunks/{4-DoVhcDaV.js → 4-DmwBYNUT.js} +5 -5
- package/build/server/chunks/{4-DoVhcDaV.js.map → 4-DmwBYNUT.js.map} +1 -1
- package/build/server/chunks/{5-BoDqBupn.js → 5-DGAcoras.js} +13 -6
- package/build/server/chunks/5-DGAcoras.js.map +1 -0
- package/build/server/chunks/{6-B9O8HmQL.js → 6-D-pZe3TH.js} +19 -8
- package/build/server/chunks/6-D-pZe3TH.js.map +1 -0
- package/build/server/chunks/{7-CC5cFRLI.js → 7-CnoZs_hs.js} +21 -8
- package/build/server/chunks/7-CnoZs_hs.js.map +1 -0
- package/build/server/chunks/{8-C5GP7CcL.js → 8-BtLS_jIL.js} +5 -5
- package/build/server/chunks/{8-C5GP7CcL.js.map → 8-BtLS_jIL.js.map} +1 -1
- package/build/server/chunks/{ListTable-DzHBYe8D.js → ListTable-wSR_j9wZ.js} +5 -4
- package/build/server/chunks/ListTable-wSR_j9wZ.js.map +1 -0
- package/build/server/chunks/{_page.svelte-DCj38zDu.js → _page.svelte-CDUl4uI5.js} +13 -8
- package/build/server/chunks/_page.svelte-CDUl4uI5.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BnMm7OgR.js → _page.svelte-D9z7ezJ4.js} +2 -2
- package/build/server/chunks/{_page.svelte-BnMm7OgR.js.map → _page.svelte-D9z7ezJ4.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Bdgx6yFd.js → _page.svelte-DEk5Qg_F.js} +10 -5
- package/build/server/chunks/_page.svelte-DEk5Qg_F.js.map +1 -0
- package/build/server/chunks/{_page.svelte-CKUYgmkB.js → _page.svelte-Dc-4PQI9.js} +13 -8
- package/build/server/chunks/_page.svelte-Dc-4PQI9.js.map +1 -0
- package/build/server/chunks/{_page.svelte-CUD8rWua.js → _page.svelte-q1skzbuu.js} +4 -4
- package/build/server/chunks/{_page.svelte-CUD8rWua.js.map → _page.svelte-q1skzbuu.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-D3uAY11y.js → _page.svelte-swWuZCGb.js} +2 -2
- package/build/server/chunks/{_page.svelte-D3uAY11y.js.map → _page.svelte-swWuZCGb.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CuaQnLcJ.js → _server.ts-CUXOXc9X.js} +2 -2
- package/build/server/chunks/{_server.ts-CuaQnLcJ.js.map → _server.ts-CUXOXc9X.js.map} +1 -1
- package/build/server/chunks/{adapter-vyAhx2Gv.js → adapter-DVhZVTjg.js} +13 -3
- package/build/server/chunks/adapter-DVhZVTjg.js.map +1 -0
- package/build/server/chunks/adapter-error-yHvEGaY7.js +34 -0
- package/build/server/chunks/adapter-error-yHvEGaY7.js.map +1 -0
- package/build/server/chunks/{client-S2G4ymSQ.js → client-C8xikVyn.js} +2 -2
- package/build/server/chunks/{client-S2G4ymSQ.js.map → client-C8xikVyn.js.map} +1 -1
- package/build/server/chunks/{composite-form-CSPGUOcu.js → composite-form-BwC3SrN2.js} +3 -3
- package/build/server/chunks/{composite-form-CSPGUOcu.js.map → composite-form-BwC3SrN2.js.map} +1 -1
- package/build/server/chunks/{error.svelte-h71s3LwW.js → error.svelte-DK-BFOzh.js} +3 -3
- package/build/server/chunks/{error.svelte-h71s3LwW.js.map → error.svelte-DK-BFOzh.js.map} +1 -1
- package/build/server/chunks/{hooks.server-CdYxszMM.js → hooks.server-DfgZ27aW.js} +17 -8
- package/build/server/chunks/hooks.server-DfgZ27aW.js.map +1 -0
- package/build/server/chunks/{internal-n_iFrIjj.js → internal-BZCjK-Az.js} +3 -3
- package/build/server/chunks/{internal-n_iFrIjj.js.map → internal-BZCjK-Az.js.map} +1 -1
- package/build/server/chunks/{list-params-Ey5Uu3d5.js → list-params-DiCLPOBj.js} +4 -2
- package/build/server/chunks/list-params-DiCLPOBj.js.map +1 -0
- package/build/server/chunks/{relation-select-composite-field-B3fIBbzC.js → relation-select-composite-field-BBsC7qTS.js} +2 -2
- package/build/server/chunks/{relation-select-composite-field-B3fIBbzC.js.map → relation-select-composite-field-BBsC7qTS.js.map} +1 -1
- package/build/server/index.js +1 -1
- package/build/server/manifest.js +10 -10
- package/build/server/manifest.js.map +1 -1
- package/package.json +5 -5
- package/build/client/_app/immutable/chunks/BAfs2EwQ.js +0 -1
- package/build/client/_app/immutable/chunks/BAfs2EwQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BAfs2EwQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BTvT2hJZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTvT2hJZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BZk9awWK.js.br +0 -0
- package/build/client/_app/immutable/chunks/BZk9awWK.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DBJh8-5e.js.br +0 -0
- package/build/client/_app/immutable/chunks/DBJh8-5e.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DZGkWpOy.js.br +0 -0
- package/build/client/_app/immutable/chunks/DZGkWpOy.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.5P3IlGqQ.js.br +0 -0
- package/build/client/_app/immutable/entry/app.5P3IlGqQ.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DpLxg-uF.js +0 -1
- package/build/client/_app/immutable/entry/start.DpLxg-uF.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DpLxg-uF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BJ7Mx76S.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BJ7Mx76S.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.DSbTe_mO.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.DSbTe_mO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.C486-zEy.js.br +0 -2
- package/build/client/_app/immutable/nodes/4.C486-zEy.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.u-bVCB_Y.js +0 -1
- package/build/client/_app/immutable/nodes/5.u-bVCB_Y.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.u-bVCB_Y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.CuNooc7E.js +0 -1
- package/build/client/_app/immutable/nodes/6.CuNooc7E.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.CuNooc7E.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.BNuv-TTZ.js +0 -1
- package/build/client/_app/immutable/nodes/7.BNuv-TTZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.BNuv-TTZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.Cb70WGbk.js.br +0 -1
- package/build/client/_app/immutable/nodes/8.Cb70WGbk.js.gz +0 -0
- package/build/server/chunks/5-BoDqBupn.js.map +0 -1
- package/build/server/chunks/6-B9O8HmQL.js.map +0 -1
- package/build/server/chunks/7-CC5cFRLI.js.map +0 -1
- package/build/server/chunks/ListTable-DzHBYe8D.js.map +0 -1
- package/build/server/chunks/_page.svelte-Bdgx6yFd.js.map +0 -1
- package/build/server/chunks/_page.svelte-CKUYgmkB.js.map +0 -1
- package/build/server/chunks/_page.svelte-DCj38zDu.js.map +0 -1
- package/build/server/chunks/adapter-vyAhx2Gv.js.map +0 -1
- package/build/server/chunks/hooks.server-CdYxszMM.js.map +0 -1
- package/build/server/chunks/list-params-Ey5Uu3d5.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3-j42FDPLO.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/actions/_fn_/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../chunks/adapter.js\";\nimport { n as loadInitialRelationOptions } from \"../../../../chunks/relation-options.js\";\nimport { t as superValidate } from \"../../../../chunks/dist.js\";\nimport { i as buildMutationPayload, o as zod, r as zodFromTable, t as readActionFormSubmission } from \"../../../../chunks/composite-form.js\";\nimport { c as scalarWidgetForDataType, n as buildArgRelationConfig } from \"../../../../chunks/relation-field-config.js\";\nimport { error, fail } from \"@sveltejs/kit\";\n//#region src/lib/form/action-form.ts\n/** Sentinel `defaultExpr` so `dbCanSupplyColumn` reports an argument with a\n* DEFAULT as DB-suppliable (optional). Never used as a value — the payload\n* drops the empty submission and PostgreSQL supplies the real default. */\nvar ARG_DEFAULT_SENTINEL = \"__rpc_arg_default__\";\n/** Title-case a snake_case argument name for the field label (mirrors core's\n* deriveLabel). */\nfunction deriveLabel(name) {\n\treturn name.replace(/_/g, \" \").replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\nfunction buildActionForm(fn, schema) {\n\tconst relations = [];\n\tconst columns = [];\n\tconst argViews = [];\n\tfor (const arg of fn.args) {\n\t\tlet widget = arg.widget;\n\t\tif (arg.widget === \"relation-select\") {\n\t\t\tconst config = arg.relation ? buildArgRelationConfig(arg.name, arg.relation, schema) : null;\n\t\t\tif (config !== null) relations.push(config);\n\t\t\telse widget = scalarWidgetForDataType(arg.typeName);\n\t\t}\n\t\tconst enumValues = arg.enumValues ?? null;\n\t\tcolumns.push({\n\t\t\tname: arg.name,\n\t\t\tdataType: arg.typeName,\n\t\t\tnullable: false,\n\t\t\tdefaultExpr: arg.hasDefault ? ARG_DEFAULT_SENTINEL : null,\n\t\t\tisPrimaryKey: false,\n\t\t\tisForeignKey: arg.widget === \"relation-select\",\n\t\t\tlabel: deriveLabel(arg.name),\n\t\t\tdescription: null,\n\t\t\taiDescription: null,\n\t\t\twidget,\n\t\t\tenumValues,\n\t\t\treadonly: false\n\t\t});\n\t\targViews.push({\n\t\t\tname: arg.name,\n\t\t\tlabel: deriveLabel(arg.name),\n\t\t\twidget,\n\t\t\tenumValues: enumValues ?? [],\n\t\t\trequired: !arg.hasDefault\n\t\t});\n\t}\n\treturn {\n\t\tcolumns,\n\t\trelations,\n\t\tview: {\n\t\t\tqualifiedName: fn.qualifiedName,\n\t\t\tlabel: fn.label,\n\t\t\tdescription: fn.description,\n\t\t\taiDescription: fn.aiDescription,\n\t\t\tpolicy: fn.policy ?? [],\n\t\t\tsecurity: fn.security,\n\t\t\tvolatility: fn.volatility,\n\t\t\targs: argViews\n\t\t}\n\t};\n}\n//#endregion\n//#region src/routes/actions/[fn]/+page.server.ts\n/** Resolve the exposed function, 404ing both when it is absent and when the\n* backend cannot invoke it (no enumeration channel, and no dead form). */\nfunction resolveExposedFunction(functions, slug, canCall) {\n\tif (!canCall) throw error(404, \"RPC actions are not available on this backend.\");\n\tconst fn = (functions ?? []).find((f) => f.qualifiedName === slug);\n\tif (fn === void 0) throw error(404, `Unknown action: ${slug}`);\n\treturn fn;\n}\nvar load = async ({ params, locals }) => {\n\tconst adapter = getAdapter(locals.schema);\n\tconst action = buildActionForm(resolveExposedFunction(locals.schema.functions, params.fn, typeof adapter.callFunction === \"function\"), locals.schema);\n\tconst form = await superValidate(zod(zodFromTable({ columns: action.columns })));\n\tconst initialOptions = await loadInitialRelationOptions(adapter, action.relations);\n\treturn {\n\t\taction: action.view,\n\t\tform,\n\t\trelations: action.relations,\n\t\tinitialOptions\n\t};\n};\nvar actions = { default: async ({ request, params, locals }) => {\n\tconst adapter = getAdapter(locals.schema);\n\tconst fn = resolveExposedFunction(locals.schema.functions, params.fn, typeof adapter.callFunction === \"function\");\n\tconst action = buildActionForm(fn, locals.schema);\n\tconst form = await superValidate(await readActionFormSubmission(request), zod(zodFromTable({ columns: action.columns })));\n\tif (!form.valid) return fail(400, { form });\n\tconst args = buildMutationPayload({ columns: action.columns }, form.data);\n\ttry {\n\t\treturn {\n\t\t\tform,\n\t\t\trpcOk: true,\n\t\t\trpcResult: await adapter.callFunction(fn.qualifiedName, args) ?? null\n\t\t};\n\t} catch (err) {\n\t\tconst raw = err.status;\n\t\tconst status = typeof raw === \"number\" && raw >= 400 && raw < 600 ? raw : 500;\n\t\treturn fail(status, {\n\t\t\tform,\n\t\t\trpcError: rpcErrorMessage(status)\n\t\t});\n\t}\n} };\nfunction rpcErrorMessage(status) {\n\tswitch (status) {\n\t\tcase 400: return \"The action rejected the supplied arguments.\";\n\t\tcase 403: return \"You do not have permission to run this action.\";\n\t\tcase 404: return \"The action no longer exists.\";\n\t\tcase 409: return \"The action conflicted with the current data (a constraint was violated).\";\n\t\tdefault: return \"The action failed. See the server logs for details.\";\n\t}\n}\n//#endregion\nexport { actions, load };\n","import * as server from '../entries/pages/actions/_fn_/_page.server.ts.js';\n\nexport const index = 3;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/actions/_fn_/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/actions/[fn]/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/3.DSbTe_mO.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/BTvT2hJZ.js\",\"_app/immutable/chunks/DZGkWpOy.js\",\"_app/immutable/chunks/DBJh8-5e.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/D5sfkRNZ.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA,IAAI,oBAAoB,GAAG,qBAAqB;AAChD;AACA;AACA,SAAS,WAAW,CAAC,IAAI,EAAE;AAC3B,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACxE;AACA,SAAS,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE;AACrC,CAAC,MAAM,SAAS,GAAG,EAAE;AACrB,CAAC,MAAM,OAAO,GAAG,EAAE;AACnB,CAAC,MAAM,QAAQ,GAAG,EAAE;AACpB,CAAC,KAAK,MAAM,GAAG,IAAI,EAAE,CAAC,IAAI,EAAE;AAC5B,EAAE,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM;AACzB,EAAE,IAAI,GAAG,CAAC,MAAM,KAAK,iBAAiB,EAAE;AACxC,GAAG,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,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CAAC,MAAM;AACxB,EAAE,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAC/E,EAAE,OAAO,IAAI,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI;AACP,GAAG,QAAQ,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG,CAAC;AACJ,CAAC;AACD,CAAC,EAAE;AACH,SAAS,eAAe,CAAC,MAAM,EAAE;AACjC,CAAC,QAAQ,MAAM;AACf,EAAE,KAAK,GAAG,EAAE,OAAO,6CAA6C;AAChE,EAAE,KAAK,GAAG,EAAE,OAAO,gDAAgD;AACnE,EAAE,KAAK,GAAG,EAAE,OAAO,8BAA8B;AACjD,EAAE,KAAK,GAAG,EAAE,OAAO,0EAA0E;AAC7F,EAAE,SAAS,OAAO,qDAAqD;AACvE;AACA;;;;;;;;ACnHY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA+C,CAAC,EAAE;AAE7G,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"3-C7h5bnfF.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/actions/_fn_/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../chunks/adapter.js\";\nimport { n as loadInitialRelationOptions } from \"../../../../chunks/relation-options.js\";\nimport { t as superValidate } from \"../../../../chunks/dist.js\";\nimport { i as buildMutationPayload, o as zod, r as zodFromTable, t as readActionFormSubmission } from \"../../../../chunks/composite-form.js\";\nimport { c as scalarWidgetForDataType, n as buildArgRelationConfig } from \"../../../../chunks/relation-field-config.js\";\nimport { error, fail } from \"@sveltejs/kit\";\n//#region src/lib/form/action-form.ts\n/** Sentinel `defaultExpr` so `dbCanSupplyColumn` reports an argument with a\n* DEFAULT as DB-suppliable (optional). Never used as a value — the payload\n* drops the empty submission and PostgreSQL supplies the real default. */\nvar ARG_DEFAULT_SENTINEL = \"__rpc_arg_default__\";\n/** Title-case a snake_case argument name for the field label (mirrors core's\n* deriveLabel). */\nfunction deriveLabel(name) {\n\treturn name.replace(/_/g, \" \").replace(/\\b\\w/g, (c) => c.toUpperCase());\n}\nfunction buildActionForm(fn, schema) {\n\tconst relations = [];\n\tconst columns = [];\n\tconst argViews = [];\n\tfor (const arg of fn.args) {\n\t\tlet widget = arg.widget;\n\t\tif (arg.widget === \"relation-select\") {\n\t\t\tconst config = arg.relation ? buildArgRelationConfig(arg.name, arg.relation, schema) : null;\n\t\t\tif (config !== null) relations.push(config);\n\t\t\telse widget = scalarWidgetForDataType(arg.typeName);\n\t\t}\n\t\tconst enumValues = arg.enumValues ?? null;\n\t\tcolumns.push({\n\t\t\tname: arg.name,\n\t\t\tdataType: arg.typeName,\n\t\t\tnullable: false,\n\t\t\tdefaultExpr: arg.hasDefault ? ARG_DEFAULT_SENTINEL : null,\n\t\t\tisPrimaryKey: false,\n\t\t\tisForeignKey: arg.widget === \"relation-select\",\n\t\t\tlabel: deriveLabel(arg.name),\n\t\t\tdescription: null,\n\t\t\taiDescription: null,\n\t\t\twidget,\n\t\t\tenumValues,\n\t\t\treadonly: false\n\t\t});\n\t\targViews.push({\n\t\t\tname: arg.name,\n\t\t\tlabel: deriveLabel(arg.name),\n\t\t\twidget,\n\t\t\tenumValues: enumValues ?? [],\n\t\t\trequired: !arg.hasDefault\n\t\t});\n\t}\n\treturn {\n\t\tcolumns,\n\t\trelations,\n\t\tview: {\n\t\t\tqualifiedName: fn.qualifiedName,\n\t\t\tlabel: fn.label,\n\t\t\tdescription: fn.description,\n\t\t\taiDescription: fn.aiDescription,\n\t\t\tpolicy: fn.policy ?? [],\n\t\t\tsecurity: fn.security,\n\t\t\tvolatility: fn.volatility,\n\t\t\targs: argViews\n\t\t}\n\t};\n}\n//#endregion\n//#region src/routes/actions/[fn]/+page.server.ts\n/** Resolve the exposed function, 404ing both when it is absent and when the\n* backend cannot invoke it (no enumeration channel, and no dead form). */\nfunction resolveExposedFunction(functions, slug, canCall) {\n\tif (!canCall) throw error(404, \"RPC actions are not available on this backend.\");\n\tconst fn = (functions ?? []).find((f) => f.qualifiedName === slug);\n\tif (fn === void 0) throw error(404, `Unknown action: ${slug}`);\n\treturn fn;\n}\nvar load = async ({ params, locals }) => {\n\tconst adapter = getAdapter(locals.schema);\n\tconst action = buildActionForm(resolveExposedFunction(locals.schema.functions, params.fn, typeof adapter.callFunction === \"function\"), locals.schema);\n\tconst form = await superValidate(zod(zodFromTable({ columns: action.columns })));\n\tconst initialOptions = await loadInitialRelationOptions(adapter, action.relations);\n\treturn {\n\t\taction: action.view,\n\t\tform,\n\t\trelations: action.relations,\n\t\tinitialOptions\n\t};\n};\nvar actions = { default: async ({ request, params, locals }) => {\n\tconst adapter = getAdapter(locals.schema);\n\tconst fn = resolveExposedFunction(locals.schema.functions, params.fn, typeof adapter.callFunction === \"function\");\n\tconst action = buildActionForm(fn, locals.schema);\n\tconst form = await superValidate(await readActionFormSubmission(request), zod(zodFromTable({ columns: action.columns })));\n\tif (!form.valid) return fail(400, { form });\n\tconst args = buildMutationPayload({ columns: action.columns }, form.data);\n\ttry {\n\t\treturn {\n\t\t\tform,\n\t\t\trpcOk: true,\n\t\t\trpcResult: await adapter.callFunction(fn.qualifiedName, args) ?? null\n\t\t};\n\t} catch (err) {\n\t\tconst raw = err.status;\n\t\tconst status = typeof raw === \"number\" && raw >= 400 && raw < 600 ? raw : 500;\n\t\treturn fail(status, {\n\t\t\tform,\n\t\t\trpcError: rpcErrorMessage(status)\n\t\t});\n\t}\n} };\nfunction rpcErrorMessage(status) {\n\tswitch (status) {\n\t\tcase 400: return \"The action rejected the supplied arguments.\";\n\t\tcase 403: return \"You do not have permission to run this action.\";\n\t\tcase 404: return \"The action no longer exists.\";\n\t\tcase 409: return \"The action conflicted with the current data (a constraint was violated).\";\n\t\tdefault: return \"The action failed. See the server logs for details.\";\n\t}\n}\n//#endregion\nexport { actions, load };\n","import * as server from '../entries/pages/actions/_fn_/_page.server.ts.js';\n\nexport const index = 3;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/actions/_fn_/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/actions/[fn]/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/3.nxviakdn.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/BMcjSLVU.js\",\"_app/immutable/chunks/CVx7yMSI.js\",\"_app/immutable/chunks/BgLGDesB.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/D5sfkRNZ.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA;AACA;AACA;AACA;AACA,IAAI,oBAAoB,GAAG,qBAAqB;AAChD;AACA;AACA,SAAS,WAAW,CAAC,IAAI,EAAE;AAC3B,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACxE;AACA,SAAS,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE;AACrC,CAAC,MAAM,SAAS,GAAG,EAAE;AACrB,CAAC,MAAM,OAAO,GAAG,EAAE;AACnB,CAAC,MAAM,QAAQ,GAAG,EAAE;AACpB,CAAC,KAAK,MAAM,GAAG,IAAI,EAAE,CAAC,IAAI,EAAE;AAC5B,EAAE,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM;AACzB,EAAE,IAAI,GAAG,CAAC,M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ACH,CAAC,CAAC,CAAC,OAAO,GAAG,EAAE;AACf,EAAE,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM;AACxB,EAAE,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAC/E,EAAE,OAAO,IAAI,CAAC,MAAM,EAAE;AACtB,GAAG,IAAI;AACP,GAAG,QAAQ,EAAE,eAAe,CAAC,MAAM;AACnC,GAAG,CAAC;AACJ,CAAC;AACD,CAAC,EAAE;AACH,SAAS,eAAe,CAAC,MAAM,EAAE;AACjC,CAAC,QAAQ,MAAM;AACf,EAAE,KAAK,GAAG,EAAE,OAAO,6CAA6C;AAChE,EAAE,KAAK,GAAG,EAAE,OAAO,gDAAgD;AACnE,EAAE,KAAK,GAAG,EAAE,OAAO,8BAA8B;AACjD,EAAE,KAAK,GAAG,EAAE,OAAO,0EAA0E;AAC7F,EAAE,SAAS,OAAO,qDAAqD;AACvE;AACA;;;;;;;;ACnHY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA+C,CAAC,EAAE;AAE7G,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getAdapter } from './adapter-
|
|
2
|
-
import { p as parseListParamsFromUrl } from './list-params-
|
|
1
|
+
import { g as getAdapter } from './adapter-DVhZVTjg.js';
|
|
2
|
+
import { p as parseListParamsFromUrl } from './list-params-DiCLPOBj.js';
|
|
3
3
|
import { e as error } from './index-CVekYGHP.js';
|
|
4
4
|
import './index-DBqjc0Yf.js';
|
|
5
5
|
|
|
@@ -60,11 +60,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
|
60
60
|
|
|
61
61
|
const index = 4;
|
|
62
62
|
let component_cache;
|
|
63
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-
|
|
63
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-D9z7ezJ4.js')).default;
|
|
64
64
|
const server_id = "src/routes/tables/[table]/+page.server.ts";
|
|
65
|
-
const imports = ["_app/immutable/nodes/4.
|
|
65
|
+
const imports = ["_app/immutable/nodes/4.CyMRYzSq.js","_app/immutable/chunks/ClT4djUO.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/CfACBkhZ.js","_app/immutable/chunks/D5sfkRNZ.js"];
|
|
66
66
|
const stylesheets = [];
|
|
67
67
|
const fonts = [];
|
|
68
68
|
|
|
69
69
|
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
70
|
-
//# sourceMappingURL=4-
|
|
70
|
+
//# sourceMappingURL=4-DmwBYNUT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4-
|
|
1
|
+
{"version":3,"file":"4-DmwBYNUT.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/tables/_table_/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/4.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../chunks/adapter.js\";\nimport { t as parseListParamsFromUrl } from \"../../../../chunks/list-params.js\";\nimport { error } from \"@sveltejs/kit\";\n//#region src/routes/tables/[table]/+page.server.ts\nvar DISPLAY_COLUMN_LIMIT = 5;\nvar TEXT_LIKE_TYPE_PREFIXES = [\n\t\"text\",\n\t\"character\",\n\t\"varchar\",\n\t\"citext\",\n\t\"name\"\n];\nvar load = async ({ params, locals, url }) => {\n\tconst table = locals.schema.tables.find((t) => t.qualifiedName === params.table);\n\tif (!table) throw error(404, `Unknown table: ${params.table}`);\n\tconst displayColumns = pickDisplayColumns(table);\n\tconst listParams = parseListParamsFromUrl({\n\t\turl,\n\t\tsearchFields: pickSearchFields(table)\n\t});\n\tconst result = await getAdapter(locals.schema).list(table.qualifiedName, listParams);\n\treturn {\n\t\ttable: {\n\t\t\tqualifiedName: table.qualifiedName,\n\t\t\tlabel: table.label,\n\t\t\tprimaryKey: table.primaryKey,\n\t\t\tdisplayField: table.displayField,\n\t\t\tcolumns: displayColumns.map((c) => ({\n\t\t\t\tname: c.name,\n\t\t\t\tlabel: c.label\n\t\t\t}))\n\t\t},\n\t\tlist: result,\n\t\tlistParams: {\n\t\t\tsearch: listParams.search,\n\t\t\tsort: listParams.sort,\n\t\t\tpage: listParams.page,\n\t\t\tpageSize: listParams.pageSize\n\t\t}\n\t};\n};\nfunction pickDisplayColumns(table) {\n\tconst display = table.displayField;\n\treturn [...table.columns].sort((a, b) => {\n\t\tif (a.name === display && b.name !== display) return -1;\n\t\tif (b.name === display && a.name !== display) return 1;\n\t\treturn 0;\n\t}).slice(0, DISPLAY_COLUMN_LIMIT);\n}\nfunction pickSearchFields(table) {\n\treturn table.columns.filter((c) => TEXT_LIKE_TYPE_PREFIXES.some((prefix) => c.dataType.toLowerCase().startsWith(prefix))).map((c) => c.name);\n}\n//#endregion\nexport { load };\n","import * as server from '../entries/pages/tables/_table_/_page.server.ts.js';\n\nexport const index = 4;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/tables/_table_/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/tables/[table]/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/4.CyMRYzSq.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/CfACBkhZ.js\",\"_app/immutable/chunks/D5sfkRNZ.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;AAGA;AACA,IAAI,oBAAoB,GAAG,CAAC;AAC5B,IAAI,uBAAuB,GAAG;AAC9B,C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 -1,6 +1,7 @@
|
|
|
1
|
-
import { g as getAdapter } from './adapter-
|
|
1
|
+
import { g as getAdapter } from './adapter-DVhZVTjg.js';
|
|
2
2
|
import { p as parseResourceId, e as encodeResourceId } from './resource-id-CFSW_3aR.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as adapterErrorToFailure } from './adapter-error-yHvEGaY7.js';
|
|
4
|
+
import { e as error, f as fail, r as redirect } from './index-CVekYGHP.js';
|
|
4
5
|
import './index-DBqjc0Yf.js';
|
|
5
6
|
|
|
6
7
|
//#region ../ui-core/dist/detail/resolve-fk-labels.js
|
|
@@ -128,7 +129,13 @@ var actions = { delete: async ({ params, locals }) => {
|
|
|
128
129
|
if (!table) throw error(404, `Unknown table: ${params.table}`);
|
|
129
130
|
if (table.rawTable.privileges?.delete === false) throw error(403, `The configured role may not delete from ${table.qualifiedName}.`);
|
|
130
131
|
const id = parseResourceId(params.id, table.primaryKey);
|
|
131
|
-
|
|
132
|
+
try {
|
|
133
|
+
await getAdapter(locals.schema).delete(table.qualifiedName, id);
|
|
134
|
+
} catch (err) {
|
|
135
|
+
const failure = adapterErrorToFailure(err);
|
|
136
|
+
if (failure !== null) return fail(failure.status, { message: failure.message });
|
|
137
|
+
throw err;
|
|
138
|
+
}
|
|
132
139
|
throw redirect(303, `/tables/${table.qualifiedName}`);
|
|
133
140
|
} };
|
|
134
141
|
|
|
@@ -140,11 +147,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
|
140
147
|
|
|
141
148
|
const index = 5;
|
|
142
149
|
let component_cache;
|
|
143
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-
|
|
150
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-DEk5Qg_F.js')).default;
|
|
144
151
|
const server_id = "src/routes/tables/[table]/[id]/+page.server.ts";
|
|
145
|
-
const imports = ["_app/immutable/nodes/5.
|
|
152
|
+
const imports = ["_app/immutable/nodes/5.9yC9mSHh.js","_app/immutable/chunks/ClT4djUO.js","_app/immutable/chunks/BgLGDesB.js","_app/immutable/chunks/CVx7yMSI.js","_app/immutable/chunks/xihTtKlq.js"];
|
|
146
153
|
const stylesheets = [];
|
|
147
154
|
const fonts = [];
|
|
148
155
|
|
|
149
156
|
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
150
|
-
//# sourceMappingURL=5-
|
|
157
|
+
//# sourceMappingURL=5-DGAcoras.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5-DGAcoras.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/tables/_table_/_id_/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../../chunks/adapter.js\";\nimport { n as parseResourceId, t as encodeResourceId } from \"../../../../../chunks/resource-id.js\";\nimport { t as adapterErrorToFailure } from \"../../../../../chunks/adapter-error.js\";\nimport { error, fail, redirect } from \"@sveltejs/kit\";\n//#region ../ui-core/dist/detail/resolve-fk-labels.js\nasync function resolveFkLabels(args) {\n\tconst { table, row, schema, loadRow } = args;\n\tconst out = {};\n\tconst lookups = [];\n\tconst claims = /* @__PURE__ */ new Map();\n\tfor (const relation of table.relations) {\n\t\tconst first = (relation.fields ?? [relation.field])[0];\n\t\tclaims.set(first, (claims.get(first) ?? 0) + 1);\n\t}\n\tfor (const relation of table.relations) {\n\t\tconst fields = relation.fields ?? [relation.field];\n\t\tif (fields.length > 1) {\n\t\t\tif ((claims.get(fields[0]) ?? 0) > 1) continue;\n\t\t\tconst lookup = compositeLookup(fields, relation, row, schema, loadRow, out);\n\t\t\tif (lookup !== null) lookups.push(lookup);\n\t\t\tcontinue;\n\t\t}\n\t\tconst rawValue = row[relation.field];\n\t\tif (rawValue === null || rawValue === void 0) continue;\n\t\tif (typeof rawValue !== \"string\" && typeof rawValue !== \"number\") continue;\n\t\tconst value = rawValue;\n\t\tconst referencedQualifiedName = `${relation.references.schema}.${relation.references.table}`;\n\t\tconst referencedTable = schema.tables.find((t) => t.qualifiedName === referencedQualifiedName);\n\t\tif (referencedTable === void 0) {\n\t\t\tout[relation.field] = {\n\t\t\t\tvalue,\n\t\t\t\tlabel: null,\n\t\t\t\treferencedQualifiedName\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\tlookups.push(loadRow(referencedQualifiedName, value).then((targetRow) => {\n\t\t\tconst label = projectLabel(referencedTable, targetRow);\n\t\t\tout[relation.field] = {\n\t\t\t\tvalue,\n\t\t\t\tlabel,\n\t\t\t\treferencedQualifiedName\n\t\t\t};\n\t\t}));\n\t}\n\tawait Promise.all(lookups);\n\treturn out;\n}\n/** Build the lookup for a composite relation, or return `null` when it\n* cannot be resolved (the raw values then render as-is). The target row is\n* fetched by primary key, so the relation must reference the target's full\n* primary key (in any column order) and every component must be present.\n* The resolved entry is keyed by the relation's first column. */\nfunction compositeLookup(fields, relation, row, schema, loadRow, out) {\n\tconst referencedQualifiedName = `${relation.references.schema}.${relation.references.table}`;\n\tconst referencedTable = schema.tables.find((t) => t.qualifiedName === referencedQualifiedName);\n\tif (referencedTable === void 0) return null;\n\tconst refColumns = relation.references.columns ?? [relation.references.column];\n\tif (refColumns.length !== fields.length) return null;\n\tconst primaryKey = referencedTable.primaryKey;\n\tif (primaryKey.length !== refColumns.length || !primaryKey.every((column) => refColumns.includes(column))) return null;\n\tconst components = [];\n\tfor (const keyColumn of primaryKey) {\n\t\tconst raw = row[fields[refColumns.indexOf(keyColumn)]];\n\t\tif (raw === null || raw === void 0) return null;\n\t\tif (typeof raw !== \"string\" && typeof raw !== \"number\") return null;\n\t\tcomponents.push(raw);\n\t}\n\tconst value = encodeResourceId(components);\n\treturn loadRow(referencedQualifiedName, components).then((targetRow) => {\n\t\tconst label = projectLabel(referencedTable, targetRow);\n\t\tout[fields[0]] = {\n\t\t\tvalue,\n\t\t\tlabel,\n\t\t\treferencedQualifiedName\n\t\t};\n\t});\n}\nfunction projectLabel(referencedTable, targetRow) {\n\tif (targetRow === null) return null;\n\tconst display = referencedTable.displayField;\n\tif (display === null) return null;\n\tconst value = targetRow[display];\n\tif (value === null || value === void 0) return null;\n\treturn String(value);\n}\n//#endregion\n//#region src/routes/tables/[table]/[id]/+page.server.ts\nfunction findTable(tables, slug) {\n\treturn tables.find((t) => t.qualifiedName === slug) ?? null;\n}\nfunction tableViewModel(table) {\n\treturn {\n\t\tqualifiedName: table.qualifiedName,\n\t\tlabel: table.label,\n\t\tcanDelete: table.rawTable.privileges?.delete !== false,\n\t\tcolumns: table.columns.map((c) => ({\n\t\t\tname: c.name,\n\t\t\tlabel: c.label,\n\t\t\twidget: c.widget,\n\t\t\tisPrimaryKey: c.isPrimaryKey,\n\t\t\tisForeignKey: c.isForeignKey\n\t\t}))\n\t};\n}\nvar load = async ({ params, locals }) => {\n\tconst table = findTable(locals.schema.tables, params.table);\n\tif (!table) throw error(404, `Unknown table: ${params.table}`);\n\tconst adapter = getAdapter(locals.schema);\n\tconst id = parseResourceId(params.id, table.primaryKey);\n\tconst row = await adapter.get(table.qualifiedName, id);\n\tconst fkLabels = await resolveFkLabels({\n\t\ttable,\n\t\trow,\n\t\tschema: locals.schema,\n\t\tloadRow: (qualifiedName, id) => locals.fkRowCache.get(qualifiedName, id, (qn, identifier) => adapter.get(qn, identifier).catch(() => null))\n\t});\n\treturn {\n\t\ttable: tableViewModel(table),\n\t\trow,\n\t\tfkLabels,\n\t\tid: encodeResourceId(id)\n\t};\n};\nvar actions = { delete: async ({ params, locals }) => {\n\tconst table = findTable(locals.schema.tables, params.table);\n\tif (!table) throw error(404, `Unknown table: ${params.table}`);\n\tif (table.rawTable.privileges?.delete === false) throw error(403, `The configured role may not delete from ${table.qualifiedName}.`);\n\tconst id = parseResourceId(params.id, table.primaryKey);\n\ttry {\n\t\tawait getAdapter(locals.schema).delete(table.qualifiedName, id);\n\t} catch (err) {\n\t\tconst failure = adapterErrorToFailure(err);\n\t\tif (failure !== null) return fail(failure.status, { message: failure.message });\n\t\tthrow err;\n\t}\n\tthrow redirect(303, `/tables/${table.qualifiedName}`);\n} };\n//#endregion\nexport { actions, load };\n","import * as server from '../entries/pages/tables/_table_/_id_/_page.server.ts.js';\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/tables/_table_/_id_/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/tables/[table]/[id]/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/5.9yC9mSHh.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/BgLGDesB.js\",\"_app/immutable/chunks/CVx7yMSI.js\",\"_app/immutable/chunks/xihTtKlq.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;AAIA;AACA,eAAe,eAAe,CAAC,IAAI,EAAE;AACrC,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI;AAC7C,CAAC,MAAM,GAAG,GAAG,EAAE;AACf,CAAC,MAAM,OAAO,GAAG,EAAE;AACnB,CAAC,MAAM,MAAM,mBAAmB,IAAI,GAAG,EAAE;AACzC,CAAC,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE;AACzC,EAAE,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACxD,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC;AACD,CAAC,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE;AACzC,EAAE,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACpD,EAAE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;AACzB,GAAG,IAAI,CAAC,MAAM,CAAC,GAA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AAG;AACX,CAAC;AACD,CAAC,MAAM,QAAQ,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;AACtD,CAAC,EAAE;;;;;;;;ACvIS,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsD,CAAC,EAAE;AAEpH,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { g as getAdapter } from './adapter-
|
|
1
|
+
import { g as getAdapter } from './adapter-DVhZVTjg.js';
|
|
2
2
|
import { p as parseResourceId, e as encodeResourceId } from './resource-id-CFSW_3aR.js';
|
|
3
3
|
import { l as loadInitialRelationOptions, e as ensureSelectedOptions } from './relation-options-jz3t9Tvk.js';
|
|
4
|
-
import { g as relationFieldConfigs, p as promoteCompositeMemberWidgets, e as demoteUnpickableRelations, f as readFormWithCompositePicks, j as superValidate, z as zod, k as zodFromTable, a as buildMutationPayload } from './composite-form-
|
|
4
|
+
import { g as relationFieldConfigs, p as promoteCompositeMemberWidgets, e as demoteUnpickableRelations, f as readFormWithCompositePicks, j as superValidate, z as zod, k as zodFromTable, a as buildMutationPayload } from './composite-form-BwC3SrN2.js';
|
|
5
|
+
import { a as adapterErrorToFailure } from './adapter-error-yHvEGaY7.js';
|
|
5
6
|
import { a as applyPrivilegeReadonly } from './privilege-readonly-CK4k2aYO.js';
|
|
6
7
|
import { e as error, f as fail, r as redirect } from './index-CVekYGHP.js';
|
|
7
|
-
import './internal-
|
|
8
|
+
import './internal-BZCjK-Az.js';
|
|
8
9
|
import 'node:module';
|
|
9
10
|
import './dev-aF1HGl8f.js';
|
|
10
11
|
import 'clsx';
|
|
11
12
|
import './index-DBqjc0Yf.js';
|
|
12
|
-
import './client-
|
|
13
|
+
import './client-C8xikVyn.js';
|
|
13
14
|
import './app-Do0K3Mhs.js';
|
|
14
15
|
import 'zod/v4/core';
|
|
15
16
|
import 'zod';
|
|
@@ -66,7 +67,17 @@ var actions = { default: async ({ request, params, locals }) => {
|
|
|
66
67
|
if (!form.valid) return fail(400, { form });
|
|
67
68
|
const payload = buildMutationPayload(formTable, form.data, "update");
|
|
68
69
|
const id = parseResourceId(params.id, table.primaryKey);
|
|
69
|
-
|
|
70
|
+
try {
|
|
71
|
+
await getAdapter(locals.schema).update(table.qualifiedName, id, payload);
|
|
72
|
+
} catch (err) {
|
|
73
|
+
const failure = adapterErrorToFailure(err);
|
|
74
|
+
if (failure !== null) {
|
|
75
|
+
form.valid = false;
|
|
76
|
+
form.message = failure.message;
|
|
77
|
+
return fail(failure.status, { form });
|
|
78
|
+
}
|
|
79
|
+
throw err;
|
|
80
|
+
}
|
|
70
81
|
throw redirect(303, `/tables/${table.qualifiedName}/${encodeResourceId(id)}`);
|
|
71
82
|
} };
|
|
72
83
|
|
|
@@ -78,11 +89,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
|
78
89
|
|
|
79
90
|
const index = 6;
|
|
80
91
|
let component_cache;
|
|
81
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-
|
|
92
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-CDUl4uI5.js')).default;
|
|
82
93
|
const server_id = "src/routes/tables/[table]/[id]/edit/+page.server.ts";
|
|
83
|
-
const imports = ["_app/immutable/nodes/6.
|
|
94
|
+
const imports = ["_app/immutable/nodes/6.Ch1OuWsA.js","_app/immutable/chunks/ClT4djUO.js","_app/immutable/chunks/BMcjSLVU.js","_app/immutable/chunks/CVx7yMSI.js","_app/immutable/chunks/BgLGDesB.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/D5sfkRNZ.js","_app/immutable/chunks/2V_Gzacq.js"];
|
|
84
95
|
const stylesheets = [];
|
|
85
96
|
const fonts = [];
|
|
86
97
|
|
|
87
98
|
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
88
|
-
//# sourceMappingURL=6-
|
|
99
|
+
//# sourceMappingURL=6-D-pZe3TH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6-D-pZe3TH.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/tables/_table_/_id_/edit/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/6.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../../../chunks/adapter.js\";\nimport { n as parseResourceId, t as encodeResourceId } from \"../../../../../../chunks/resource-id.js\";\nimport { n as loadInitialRelationOptions, t as ensureSelectedOptions } from \"../../../../../../chunks/relation-options.js\";\nimport { t as superValidate } from \"../../../../../../chunks/dist.js\";\nimport { i as buildMutationPayload, n as readFormWithCompositePicks, o as zod, r as zodFromTable } from \"../../../../../../chunks/composite-form.js\";\nimport { i as demoteUnpickableRelations, o as promoteCompositeMemberWidgets, s as relationFieldConfigs } from \"../../../../../../chunks/relation-field-config.js\";\nimport { t as adapterErrorToFailure } from \"../../../../../../chunks/adapter-error.js\";\nimport { t as applyPrivilegeReadonly } from \"../../../../../../chunks/privilege-readonly.js\";\nimport { error, fail, redirect } from \"@sveltejs/kit\";\n//#region src/routes/tables/[table]/[id]/edit/+page.server.ts\nfunction findTable(tables, slug) {\n\treturn tables.find((t) => t.qualifiedName === slug) ?? null;\n}\nfunction tableViewModel(table) {\n\treturn {\n\t\tqualifiedName: table.qualifiedName,\n\t\tlabel: table.label,\n\t\tprimaryKey: table.primaryKey,\n\t\tcolumns: table.columns.map((c) => ({\n\t\t\tname: c.name,\n\t\t\tlabel: c.label,\n\t\t\twidget: c.widget,\n\t\t\tenumValues: c.enumValues ?? [],\n\t\t\tnullable: c.nullable,\n\t\t\treadonly: c.readonly || c.isPrimaryKey,\n\t\t\tisPrimaryKey: c.isPrimaryKey\n\t\t}))\n\t};\n}\nvar load = async ({ params, locals }) => {\n\tconst found = findTable(locals.schema.tables, params.table);\n\tif (!found) throw error(404, `Unknown table: ${params.table}`);\n\tconst table = applyPrivilegeReadonly(found, \"update\");\n\tconst adapter = getAdapter(locals.schema);\n\tconst id = parseResourceId(params.id, table.primaryKey);\n\tconst row = await adapter.get(table.qualifiedName, id);\n\tconst relations = relationFieldConfigs(table, locals.schema);\n\tconst formTable = promoteCompositeMemberWidgets(demoteUnpickableRelations(table, relations), relations);\n\tconst form = await superValidate(row, zod(zodFromTable(formTable)));\n\tconst initialOptions = await loadInitialRelationOptions(adapter, relations);\n\tawait ensureSelectedOptions(adapter, relations, row, initialOptions);\n\treturn {\n\t\ttable: tableViewModel(formTable),\n\t\tform,\n\t\tid: encodeResourceId(id),\n\t\trelations,\n\t\tinitialOptions\n\t};\n};\nvar actions = { default: async ({ request, params, locals }) => {\n\tconst found = findTable(locals.schema.tables, params.table);\n\tif (!found) throw error(404, `Unknown table: ${params.table}`);\n\tconst table = applyPrivilegeReadonly(found, \"update\");\n\tconst relations = relationFieldConfigs(table, locals.schema);\n\tconst formTable = promoteCompositeMemberWidgets(demoteUnpickableRelations(table, relations), relations);\n\tconst submission = await readFormWithCompositePicks(request, relations);\n\tif (submission === null) return fail(400, { form: await superValidate(zod(zodFromTable(formTable))) });\n\tconst form = await superValidate(submission, zod(zodFromTable(formTable)));\n\tif (!form.valid) return fail(400, { form });\n\tconst payload = buildMutationPayload(formTable, form.data, \"update\");\n\tconst id = parseResourceId(params.id, table.primaryKey);\n\ttry {\n\t\tawait getAdapter(locals.schema).update(table.qualifiedName, id, payload);\n\t} catch (err) {\n\t\tconst failure = adapterErrorToFailure(err);\n\t\tif (failure !== null) {\n\t\t\tform.valid = false;\n\t\t\tform.message = failure.message;\n\t\t\treturn fail(failure.status, { form });\n\t\t}\n\t\tthrow err;\n\t}\n\tthrow redirect(303, `/tables/${table.qualifiedName}/${encodeResourceId(id)}`);\n} };\n//#endregion\nexport { actions, load };\n","import * as server from '../entries/pages/tables/_table_/_id_/edit/_page.server.ts.js';\n\nexport const index = 6;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/tables/_table_/_id_/edit/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/tables/[table]/[id]/edit/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/6.Ch1OuWsA.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/BMcjSLVU.js\",\"_app/immutable/chunks/CVx7yMSI.js\",\"_app/immutable/chunks/BgLGDesB.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/D5sfkRNZ.js\",\"_app/immutable/chunks/2V_Gzacq.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AASA;AACA,SAAS,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE;AACjC,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,KAAK,IAAI,CAAC,IAAI,IAAI;AAC5D;AACA,SAAS,cAAc,CAAC,KAAK,EAAE;AAC/B,CAAC,OAAO;AACR,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa;AACpC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK;AACpB,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU;AAC9B,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;AACrC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI;AACf,GAAG,KAAK,EAAE,CAAC,CAAC,KAAK;AACjB,GAAG,MAAM,EAAE,CAAC,CAAC,MAAM;AACnB,GAAG,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE;AACjC,GAAG,QAAQ,EAAE,CAAC,CAAC,QAAQ;AACvB,GAAG,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,C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FSW_3aR.js';
|
|
3
3
|
import { l as loadInitialRelationOptions } from './relation-options-jz3t9Tvk.js';
|
|
4
|
-
import { g as relationFieldConfigs, p as promoteCompositeMemberWidgets, e as demoteUnpickableRelations, f as readFormWithCompositePicks, j as superValidate, z as zod, k as zodFromTable, a as buildMutationPayload, d as dbCanSupplyColumn } from './composite-form-
|
|
4
|
+
import { g as relationFieldConfigs, p as promoteCompositeMemberWidgets, e as demoteUnpickableRelations, f as readFormWithCompositePicks, j as superValidate, z as zod, k as zodFromTable, a as buildMutationPayload, d as dbCanSupplyColumn } from './composite-form-BwC3SrN2.js';
|
|
5
|
+
import { a as adapterErrorToFailure } from './adapter-error-yHvEGaY7.js';
|
|
5
6
|
import { a as applyPrivilegeReadonly } from './privilege-readonly-CK4k2aYO.js';
|
|
6
7
|
import { e as error, f as fail, r as redirect } from './index-CVekYGHP.js';
|
|
7
|
-
import './internal-
|
|
8
|
+
import './internal-BZCjK-Az.js';
|
|
8
9
|
import 'node:module';
|
|
9
10
|
import './dev-aF1HGl8f.js';
|
|
10
11
|
import 'clsx';
|
|
11
12
|
import './index-DBqjc0Yf.js';
|
|
12
|
-
import './client-
|
|
13
|
+
import './client-C8xikVyn.js';
|
|
13
14
|
import './app-Do0K3Mhs.js';
|
|
14
15
|
import 'zod/v4/core';
|
|
15
16
|
import 'zod';
|
|
@@ -61,7 +62,19 @@ var actions = { default: async ({ request, params, locals }) => {
|
|
|
61
62
|
const form = await superValidate(submission, zod(zodFromTable(formTable)));
|
|
62
63
|
if (!form.valid) return fail(400, { form });
|
|
63
64
|
const payload = buildMutationPayload(formTable, form.data);
|
|
64
|
-
|
|
65
|
+
let created;
|
|
66
|
+
try {
|
|
67
|
+
created = await getAdapter(locals.schema).create(table.qualifiedName, payload);
|
|
68
|
+
} catch (err) {
|
|
69
|
+
const failure = adapterErrorToFailure(err);
|
|
70
|
+
if (failure !== null) {
|
|
71
|
+
form.valid = false;
|
|
72
|
+
form.message = failure.message;
|
|
73
|
+
return fail(failure.status, { form });
|
|
74
|
+
}
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
const segment = rowIdSegment(created, table.primaryKey);
|
|
65
78
|
throw redirect(303, segment !== null ? `/tables/${table.qualifiedName}/${segment}` : `/tables/${table.qualifiedName}`);
|
|
66
79
|
} };
|
|
67
80
|
|
|
@@ -73,11 +86,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
|
73
86
|
|
|
74
87
|
const index = 7;
|
|
75
88
|
let component_cache;
|
|
76
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-
|
|
89
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-Dc-4PQI9.js')).default;
|
|
77
90
|
const server_id = "src/routes/tables/[table]/new/+page.server.ts";
|
|
78
|
-
const imports = ["_app/immutable/nodes/7.
|
|
91
|
+
const imports = ["_app/immutable/nodes/7.nRICc5kB.js","_app/immutable/chunks/ClT4djUO.js","_app/immutable/chunks/BMcjSLVU.js","_app/immutable/chunks/CVx7yMSI.js","_app/immutable/chunks/BgLGDesB.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/D5sfkRNZ.js","_app/immutable/chunks/2V_Gzacq.js"];
|
|
79
92
|
const stylesheets = [];
|
|
80
93
|
const fonts = [];
|
|
81
94
|
|
|
82
95
|
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
83
|
-
//# sourceMappingURL=7-
|
|
96
|
+
//# sourceMappingURL=7-CnoZs_hs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7-CnoZs_hs.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/tables/_table_/new/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/7.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../../chunks/adapter.js\";\nimport { r as rowIdSegment } from \"../../../../../chunks/resource-id.js\";\nimport { n as loadInitialRelationOptions } from \"../../../../../chunks/relation-options.js\";\nimport { t as superValidate } from \"../../../../../chunks/dist.js\";\nimport { a as dbCanSupplyColumn, i as buildMutationPayload, n as readFormWithCompositePicks, o as zod, r as zodFromTable } from \"../../../../../chunks/composite-form.js\";\nimport { i as demoteUnpickableRelations, o as promoteCompositeMemberWidgets, s as relationFieldConfigs } from \"../../../../../chunks/relation-field-config.js\";\nimport { t as adapterErrorToFailure } from \"../../../../../chunks/adapter-error.js\";\nimport { t as applyPrivilegeReadonly } from \"../../../../../chunks/privilege-readonly.js\";\nimport { error, fail, redirect } from \"@sveltejs/kit\";\n//#region src/routes/tables/[table]/new/+page.server.ts\nfunction findTable(tables, slug) {\n\treturn tables.find((t) => t.qualifiedName === slug) ?? null;\n}\nfunction tableViewModel(table) {\n\treturn {\n\t\tqualifiedName: table.qualifiedName,\n\t\tlabel: table.label,\n\t\tprimaryKey: table.primaryKey,\n\t\tcolumns: table.columns.map((c) => ({\n\t\t\tname: c.name,\n\t\t\tlabel: c.label,\n\t\t\twidget: c.widget,\n\t\t\tenumValues: c.enumValues ?? [],\n\t\t\tnullable: c.nullable,\n\t\t\tdbCanSupply: dbCanSupplyColumn(c),\n\t\t\treadonly: c.readonly || c.isPrimaryKey && c.defaultExpr !== null,\n\t\t\tisPrimaryKey: c.isPrimaryKey\n\t\t}))\n\t};\n}\nvar load = async ({ params, locals }) => {\n\tconst found = findTable(locals.schema.tables, params.table);\n\tif (!found) throw error(404, `Unknown table: ${params.table}`);\n\tconst table = applyPrivilegeReadonly(found, \"create\");\n\tconst relations = relationFieldConfigs(table, locals.schema);\n\tconst formTable = promoteCompositeMemberWidgets(demoteUnpickableRelations(table, relations), relations);\n\tconst form = await superValidate(zod(zodFromTable(formTable)));\n\tconst initialOptions = await loadInitialRelationOptions(getAdapter(locals.schema), relations);\n\treturn {\n\t\ttable: tableViewModel(formTable),\n\t\tform,\n\t\trelations,\n\t\tinitialOptions\n\t};\n};\nvar actions = { default: async ({ request, params, locals }) => {\n\tconst found = findTable(locals.schema.tables, params.table);\n\tif (!found) throw error(404, `Unknown table: ${params.table}`);\n\tconst table = applyPrivilegeReadonly(found, \"create\");\n\tconst relations = relationFieldConfigs(table, locals.schema);\n\tconst formTable = promoteCompositeMemberWidgets(demoteUnpickableRelations(table, relations), relations);\n\tconst submission = await readFormWithCompositePicks(request, relations);\n\tif (submission === null) return fail(400, { form: await superValidate(zod(zodFromTable(formTable))) });\n\tconst form = await superValidate(submission, zod(zodFromTable(formTable)));\n\tif (!form.valid) return fail(400, { form });\n\tconst payload = buildMutationPayload(formTable, form.data);\n\tlet created;\n\ttry {\n\t\tcreated = await getAdapter(locals.schema).create(table.qualifiedName, payload);\n\t} catch (err) {\n\t\tconst failure = adapterErrorToFailure(err);\n\t\tif (failure !== null) {\n\t\t\tform.valid = false;\n\t\t\tform.message = failure.message;\n\t\t\treturn fail(failure.status, { form });\n\t\t}\n\t\tthrow err;\n\t}\n\tconst segment = rowIdSegment(created, table.primaryKey);\n\tthrow redirect(303, segment !== null ? `/tables/${table.qualifiedName}/${segment}` : `/tables/${table.qualifiedName}`);\n} };\n//#endregion\nexport { actions, load };\n","import * as server from '../entries/pages/tables/_table_/new/_page.server.ts.js';\n\nexport const index = 7;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/tables/_table_/new/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/tables/[table]/new/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/7.nRICc5kB.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/BMcjSLVU.js\",\"_app/immutable/chunks/CVx7yMSI.js\",\"_app/immutable/chunks/BgLGDesB.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/D5sfkRNZ.js\",\"_app/immutable/chunks/2V_Gzacq.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AASA;AACA,SAAS,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE;AACjC,CAAC,OAAO,MAAM,CAAC,IAAI,C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M,OAAO,4BAAqD,CAAC,EAAE;AAEnH,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5S,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getAdapter } from './adapter-
|
|
2
|
-
import { p as parseListParamsFromUrl } from './list-params-
|
|
1
|
+
import { g as getAdapter } from './adapter-DVhZVTjg.js';
|
|
2
|
+
import { p as parseListParamsFromUrl } from './list-params-DiCLPOBj.js';
|
|
3
3
|
import { e as error } from './index-CVekYGHP.js';
|
|
4
4
|
import './index-DBqjc0Yf.js';
|
|
5
5
|
|
|
@@ -56,11 +56,11 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
|
56
56
|
|
|
57
57
|
const index = 8;
|
|
58
58
|
let component_cache;
|
|
59
|
-
const component = async () => component_cache ??= (await import('./_page.svelte-
|
|
59
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-swWuZCGb.js')).default;
|
|
60
60
|
const server_id = "src/routes/views/[view]/+page.server.ts";
|
|
61
|
-
const imports = ["_app/immutable/nodes/8.
|
|
61
|
+
const imports = ["_app/immutable/nodes/8.ByJ3R-gj.js","_app/immutable/chunks/ClT4djUO.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/CfACBkhZ.js","_app/immutable/chunks/D5sfkRNZ.js"];
|
|
62
62
|
const stylesheets = [];
|
|
63
63
|
const fonts = [];
|
|
64
64
|
|
|
65
65
|
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
66
|
-
//# sourceMappingURL=8-
|
|
66
|
+
//# sourceMappingURL=8-BtLS_jIL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"8-
|
|
1
|
+
{"version":3,"file":"8-BtLS_jIL.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/views/_view_/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/8.js"],"sourcesContent":["import { t as getAdapter } from \"../../../../chunks/adapter.js\";\nimport { t as parseListParamsFromUrl } from \"../../../../chunks/list-params.js\";\nimport { error } from \"@sveltejs/kit\";\n//#region ../ui-core/dist/view/columns.js\nvar DISPLAY_COLUMN_LIMIT = 5;\nvar TEXT_LIKE_TYPE_PREFIXES = [\n\t\"text\",\n\t\"character\",\n\t\"varchar\",\n\t\"citext\",\n\t\"name\",\n\t\"uuid\"\n];\nfunction pickViewDisplayColumns(view) {\n\treturn view.columns.slice(0, DISPLAY_COLUMN_LIMIT);\n}\nfunction pickViewSearchFields(view) {\n\treturn view.columns.filter((c) => TEXT_LIKE_TYPE_PREFIXES.some((prefix) => c.dataType.toLowerCase().startsWith(prefix))).map((c) => c.name);\n}\n//#endregion\n//#region src/routes/views/[view]/+page.server.ts\nvar load = async ({ params, locals, url }) => {\n\tconst view = locals.schema.views.find((v) => v.qualifiedName === params.view);\n\tif (!view) throw error(404, `Unknown view: ${params.view}`);\n\tconst displayColumns = pickViewDisplayColumns(view);\n\tconst listParams = parseListParamsFromUrl({\n\t\turl,\n\t\tsearchFields: pickViewSearchFields(view)\n\t});\n\tconst result = await getAdapter(locals.schema).list(view.qualifiedName, listParams);\n\treturn {\n\t\tview: {\n\t\t\tqualifiedName: view.qualifiedName,\n\t\t\tlabel: view.label,\n\t\t\tcolumns: displayColumns.map((c) => ({\n\t\t\t\tname: c.name,\n\t\t\t\tlabel: c.label\n\t\t\t}))\n\t\t},\n\t\tlist: result,\n\t\tlistParams: {\n\t\t\tsearch: listParams.search,\n\t\t\tsort: listParams.sort,\n\t\t\tpage: listParams.page,\n\t\t\tpageSize: listParams.pageSize\n\t\t}\n\t};\n};\n//#endregion\nexport { load };\n","import * as server from '../entries/pages/views/_view_/_page.server.ts.js';\n\nexport const index = 8;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/views/_view_/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/views/[view]/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/8.ByJ3R-gj.js\",\"_app/immutable/chunks/ClT4djUO.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/CfACBkhZ.js\",\"_app/immutable/chunks/D5sfkRNZ.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;AAGA;AACA,IAAI,oBAAoB,GAAG,CAAC;AAC5B,IAAI,uBAAuB,GAAG;AAC9B,CAAC,MAAM;AACP,CAAC,WAAW;AACZ,CAAC,SAAS;AACV,CAAC,QAAQ;AACT,CAAC,MAAM;AACP,CAAC;AACD,CAAC;AACD,SAAS,sBAAsB,CAAC,IAAI,EAAE;AACtC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,CAAC;AACnD;AACA,SAAS,oBAAoB,CAAC,IAAI,EAAE;AACpC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,uBAAuB,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AAC5I;AACA;AACA;AACA,IAAI,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC9C,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,KAAK,MAAM,CAAC,IAAI,CAAC;AAC9E,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,cAAc,EAAE,MAAM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|
44
44
|
* used only when `readonly` is false. */
|
|
45
45
|
/** Primary-key column names used to build the per-row link target. */
|
|
46
46
|
let { title, qualifiedName, columns, rows, total, listParams, readonly = false, basePath, primaryKey = [] } = $$props;
|
|
47
|
-
const sortLookup = derived(() => new Map(listParams.sort.map((s) => [s.field, s.order])));
|
|
47
|
+
const sortLookup = derived(() => new Map([...listParams.sort].reverse().map((s) => [s.field, s.order])));
|
|
48
|
+
const primarySort = derived(() => listParams.sort[0]);
|
|
48
49
|
const totalPages = derived(() => Math.max(1, Math.ceil(total / listParams.pageSize)));
|
|
49
50
|
function rowKey(row, idx) {
|
|
50
51
|
return rowIdSegment(row, primaryKey) ?? String(idx);
|
|
51
52
|
}
|
|
52
|
-
$$renderer.push(`<h1 class="mb-1 text-2xl font-semibold">${escape_html(title)}</h1> <p class="mb-6 text-sm text-muted-foreground">${escape_html(qualifiedName)}</p> <form method="GET" class="mb-4 flex flex-wrap items-center gap-2"><input type="text" name="q"${attr("value", listParams.search)} placeholder="Search…" class="min-w-0 flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm"/> <button type="submit" class="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground">Search</button> `);
|
|
53
|
+
$$renderer.push(`<h1 class="mb-1 text-2xl font-semibold">${escape_html(title)}</h1> <p class="mb-6 text-sm text-muted-foreground">${escape_html(qualifiedName)}</p> <form method="GET" class="mb-4 flex flex-wrap items-center gap-2"><input type="text" name="q"${attr("value", listParams.search)} placeholder="Search…" aria-label="Search rows" class="min-w-0 flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm"/> <button type="submit" class="rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground">Search</button> `);
|
|
53
54
|
if (!readonly && basePath) {
|
|
54
55
|
$$renderer.push("<!--[0-->");
|
|
55
56
|
$$renderer.push(`<a${attr("href", `${basePath}/new`)} class="rounded-md border border-border px-4 py-2 text-sm font-medium">+ New</a>`);
|
|
@@ -58,7 +59,7 @@ function ListTable($$renderer, $$props) {
|
|
|
58
59
|
const each_array = ensure_array_like(columns);
|
|
59
60
|
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
60
61
|
let col = each_array[$$index];
|
|
61
|
-
$$renderer.push(`<th class="px-3 py-2 text-left font-medium"><a${attr("href", buildSortHref(listParams, col.name))} class="hover:underline">${escape_html(col.label)} `);
|
|
62
|
+
$$renderer.push(`<th class="px-3 py-2 text-left font-medium"${attr("aria-sort", primarySort()?.field === col.name ? primarySort().order === "asc" ? "ascending" : "descending" : "none")}><a${attr("href", buildSortHref(listParams, col.name))} class="hover:underline">${escape_html(col.label)} `);
|
|
62
63
|
if (sortLookup().has(col.name)) {
|
|
63
64
|
$$renderer.push("<!--[0-->");
|
|
64
65
|
$$renderer.push(`<span aria-hidden="true">${escape_html(sortLookup().get(col.name) === "asc" ? "↑" : "↓")}</span>`);
|
|
@@ -110,4 +111,4 @@ function ListTable($$renderer, $$props) {
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
export { ListTable as L };
|
|
113
|
-
//# sourceMappingURL=ListTable-
|
|
114
|
+
//# sourceMappingURL=ListTable-wSR_j9wZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListTable-wSR_j9wZ.js","sources":["../../../.svelte-kit/adapter-node/chunks/ListTable.js"],"sourcesContent":["import { H as escape_html, V as attr, i as ensure_array_like, r as derived } from \"./dev.js\";\nimport { r as rowIdSegment } from \"./resource-id.js\";\n//#region ../ui-core/dist/list/list-href.js\n/** Rebuild the current list URL with `overrides` applied (a `null`\n* override deletes that key). Mirrors the wire format parsed by\n* `parseListParamsFromUrl`; returns `.` when no params remain so the\n* link points at the bare route. */\nfunction buildHref(params, overrides = {}) {\n\tconst sp = new URLSearchParams();\n\tif (params.search.length > 0) sp.set(\"q\", params.search);\n\tif (params.sort.length > 0) sp.set(\"sort\", params.sort.map((s) => `${s.field}:${s.order}`).join(\",\"));\n\tif (params.page > 1) sp.set(\"page\", String(params.page));\n\tif (params.pageSize !== 50) sp.set(\"pageSize\", String(params.pageSize));\n\tfor (const [key, value] of Object.entries(overrides)) if (value === null) sp.delete(key);\n\telse sp.set(key, value);\n\tconst query = sp.toString();\n\treturn query.length > 0 ? `?${query}` : \".\";\n}\n/** Header link target that toggles the sort order for `field` (asc <->\n* desc, defaulting to asc) and resets back to page 1. */\nfunction buildSortHref(params, field) {\n\treturn buildHref(params, {\n\t\tsort: `${field}:${params.sort.find((s) => s.field === field)?.order === \"asc\" ? \"desc\" : \"asc\"}`,\n\t\tpage: null\n\t});\n}\n/** Stringify a cell value for the list table: objects render as JSON,\n* `null` / `undefined` render as the empty string. */\nfunction formatCell(value) {\n\tif (value === null || value === void 0) return \"\";\n\tif (typeof value === \"object\") return JSON.stringify(value);\n\treturn String(value);\n}\n//#endregion\n//#region src/lib/list/ListTable.svelte\nfunction ListTable($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\t/** Heading text (table / view label). */\n\t\t/** `schema.name`, shown under the heading. */\n\t\t/** Views render read-only: no \"+ New\", per-row links, or Actions\n\t\t* column. */\n\t\t/** Route base for the \"+ New\" and per-row links (e.g. `/tables/<qn>`);\n\t\t* used only when `readonly` is false. */\n\t\t/** Primary-key column names used to build the per-row link target. */\n\t\tlet { title, qualifiedName, columns, rows, total, listParams, readonly = false, basePath, primaryKey = [] } = $$props;\n\t\tconst sortLookup = derived(() => new Map([...listParams.sort].reverse().map((s) => [s.field, s.order])));\n\t\tconst primarySort = derived(() => listParams.sort[0]);\n\t\tconst totalPages = derived(() => Math.max(1, Math.ceil(total / listParams.pageSize)));\n\t\tfunction rowKey(row, idx) {\n\t\t\treturn rowIdSegment(row, primaryKey) ?? String(idx);\n\t\t}\n\t\t$$renderer.push(`<h1 class=\"mb-1 text-2xl font-semibold\">${escape_html(title)}</h1> <p class=\"mb-6 text-sm text-muted-foreground\">${escape_html(qualifiedName)}</p> <form method=\"GET\" class=\"mb-4 flex flex-wrap items-center gap-2\"><input type=\"text\" name=\"q\"${attr(\"value\", listParams.search)} placeholder=\"Search…\" aria-label=\"Search rows\" class=\"min-w-0 flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm\"/> <button type=\"submit\" class=\"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground\">Search</button> `);\n\t\tif (!readonly && basePath) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t$$renderer.push(`<a${attr(\"href\", `${basePath}/new`)} class=\"rounded-md border border-border px-4 py-2 text-sm font-medium\">+ New</a>`);\n\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]--></form> <div class=\"overflow-x-auto rounded-md border border-border\"><table class=\"min-w-full text-sm\"><thead class=\"bg-muted\"><tr><!--[-->`);\n\t\tconst each_array = ensure_array_like(columns);\n\t\tfor (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {\n\t\t\tlet col = each_array[$$index];\n\t\t\t$$renderer.push(`<th class=\"px-3 py-2 text-left font-medium\"${attr(\"aria-sort\", primarySort()?.field === col.name ? primarySort().order === \"asc\" ? \"ascending\" : \"descending\" : \"none\")}><a${attr(\"href\", buildSortHref(listParams, col.name))} class=\"hover:underline\">${escape_html(col.label)} `);\n\t\t\tif (sortLookup().has(col.name)) {\n\t\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t\t$$renderer.push(`<span aria-hidden=\"true\">${escape_html(sortLookup().get(col.name) === \"asc\" ? \"↑\" : \"↓\")}</span>`);\n\t\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t\t$$renderer.push(`<!--]--></a></th>`);\n\t\t}\n\t\t$$renderer.push(`<!--]-->`);\n\t\tif (!readonly) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t$$renderer.push(`<th class=\"px-3 py-2 text-left font-medium\">Actions</th>`);\n\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]--></tr></thead><tbody>`);\n\t\tif (rows.length === 0) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t$$renderer.push(`<tr><td${attr(\"colspan\", columns.length + (readonly ? 0 : 1))} class=\"px-3 py-6 text-center text-muted-foreground\">No rows.</td></tr>`);\n\t\t} else {\n\t\t\t$$renderer.push(\"<!--[-1-->\");\n\t\t\t$$renderer.push(`<!--[-->`);\n\t\t\tconst each_array_1 = ensure_array_like(rows);\n\t\t\tfor (let idx = 0, $$length = each_array_1.length; idx < $$length; idx++) {\n\t\t\t\tlet row = each_array_1[idx];\n\t\t\t\t$$renderer.push(`<tr class=\"border-t border-border\"><!--[-->`);\n\t\t\t\tconst each_array_2 = ensure_array_like(columns);\n\t\t\t\tfor (let $$index_1 = 0, $$length = each_array_2.length; $$index_1 < $$length; $$index_1++) {\n\t\t\t\t\tlet col = each_array_2[$$index_1];\n\t\t\t\t\t$$renderer.push(`<td class=\"px-3 py-2\">${escape_html(formatCell(row[col.name]))}</td>`);\n\t\t\t\t}\n\t\t\t\t$$renderer.push(`<!--]-->`);\n\t\t\t\tif (!readonly && basePath) {\n\t\t\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t\t\t$$renderer.push(`<td class=\"px-3 py-2\"><a${attr(\"href\", `${basePath}/${rowKey(row, idx)}`)} class=\"text-primary underline\">View</a></td>`);\n\t\t\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t\t\t$$renderer.push(`<!--]--></tr>`);\n\t\t\t}\n\t\t\t$$renderer.push(`<!--]-->`);\n\t\t}\n\t\t$$renderer.push(`<!--]--></tbody></table></div> <nav class=\"mt-4 flex items-center justify-between text-sm\"><span class=\"text-muted-foreground\">Page ${escape_html(listParams.page)} of ${escape_html(totalPages())} (${escape_html(total)} total)</span> <div class=\"flex gap-2\">`);\n\t\tif (listParams.page > 1) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t$$renderer.push(`<a${attr(\"href\", buildHref(listParams, { page: String(listParams.page - 1) }))} class=\"rounded-md border border-border px-3 py-1\">← Prev</a>`);\n\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]--> `);\n\t\tif (listParams.page < totalPages()) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t$$renderer.push(`<a${attr(\"href\", buildHref(listParams, { page: String(listParams.page + 1) }))} class=\"rounded-md border border-border px-3 py-1\">Next →</a>`);\n\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]--></div></nav>`);\n\t});\n}\n//#endregion\nexport { ListTable as t };\n"],"names":[],"mappings":";;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE;AAC3C,CAAC,MAAM,EAAE,GAAG,IAAI,eAAe,EAAE;AACjC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACzD,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtG,CAAC,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzD,CAAC,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACxE,CAAC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO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AAY,CAAC;AACtC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;AAC9B,EAAE,IAAI,UAAU,CAAC,IAAI,GAAG,UAAU,EAAE,EAAE;AACtC,GAAG,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC;AAC/B,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,6DAA6D,CAAC,CAAC;AAClK,EAAE,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;AACtC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AACH;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { q as escape_html,
|
|
2
|
-
import { h as superForm } from './composite-form-
|
|
1
|
+
import { q as escape_html, a6 as store_get, o as ensure_array_like, d as attr, a7 as store_mutate, m as derived, ab as unsubscribe_stores } from './dev-aF1HGl8f.js';
|
|
2
|
+
import { h as superForm } from './composite-form-BwC3SrN2.js';
|
|
3
3
|
import { R as Relation_select_field, r as resolveWidget } from './widget-registry-BCxIAl3a.js';
|
|
4
|
-
import { R as Relation_select_composite_field } from './relation-select-composite-field-
|
|
4
|
+
import { R as Relation_select_composite_field } from './relation-select-composite-field-BBsC7qTS.js';
|
|
5
5
|
import 'clsx';
|
|
6
|
-
import './internal-
|
|
6
|
+
import './internal-BZCjK-Az.js';
|
|
7
7
|
import 'node:module';
|
|
8
8
|
import './index-DBqjc0Yf.js';
|
|
9
|
-
import './client-
|
|
9
|
+
import './client-C8xikVyn.js';
|
|
10
10
|
import './app-Do0K3Mhs.js';
|
|
11
11
|
import './index-CVekYGHP.js';
|
|
12
12
|
import 'zod/v4/core';
|
|
@@ -36,7 +36,7 @@ function _page($$renderer, $$props) {
|
|
|
36
36
|
memberFields
|
|
37
37
|
};
|
|
38
38
|
});
|
|
39
|
-
const { form, errors, submitting } = superForm(data.form, { dataType: "json" });
|
|
39
|
+
const { form, errors, submitting, message } = superForm(data.form, { dataType: "json" });
|
|
40
40
|
const relationForm = form;
|
|
41
41
|
function memberColumns(config) {
|
|
42
42
|
const grouped = new Set(config.fields ?? [config.field]);
|
|
@@ -55,7 +55,12 @@ function _page($$renderer, $$props) {
|
|
|
55
55
|
let $$settled = true;
|
|
56
56
|
let $$inner_renderer;
|
|
57
57
|
function $$render_inner($$renderer) {
|
|
58
|
-
$$renderer.push(`<h1 class="mb-1 text-2xl font-semibold">Edit ${escape_html(data.table.label)}</h1> <p class="mb-6 text-sm text-muted-foreground">${escape_html(data.table.qualifiedName)} / ${escape_html(data.id)}</p> <form method="POST" class="space-y-4"
|
|
58
|
+
$$renderer.push(`<h1 class="mb-1 text-2xl font-semibold">Edit ${escape_html(data.table.label)}</h1> <p class="mb-6 text-sm text-muted-foreground">${escape_html(data.table.qualifiedName)} / ${escape_html(data.id)}</p> <form method="POST" class="space-y-4">`);
|
|
59
|
+
if (store_get($$store_subs ??= {}, "$message", message)) {
|
|
60
|
+
$$renderer.push("<!--[0-->");
|
|
61
|
+
$$renderer.push(`<p role="alert" class="rounded-md border border-destructive bg-destructive/10 px-3 py-2 text-sm text-destructive">${escape_html(store_get($$store_subs ??= {}, "$message", message))}</p>`);
|
|
62
|
+
} else $$renderer.push("<!--[-1-->");
|
|
63
|
+
$$renderer.push(`<!--]--> <!--[-->`);
|
|
59
64
|
const each_array = ensure_array_like(data.table.columns);
|
|
60
65
|
for (let $$index_2 = 0, $$length = each_array.length; $$index_2 < $$length; $$index_2++) {
|
|
61
66
|
let col = each_array[$$index_2];
|
|
@@ -165,4 +170,4 @@ function _page($$renderer, $$props) {
|
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
export { _page as default };
|
|
168
|
-
//# sourceMappingURL=_page.svelte-
|
|
173
|
+
//# sourceMappingURL=_page.svelte-CDUl4uI5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_page.svelte-CDUl4uI5.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/tables/_table_/_id_/edit/_page.svelte.js"],"sourcesContent":["import { H as escape_html, V as attr, c as unsubscribe_stores, i as ensure_array_like, o as store_get, r as derived, s as store_mutate } from \"../../../../../../chunks/dev.js\";\nimport { r as superForm } from \"../../../../../../chunks/dist.js\";\nimport { n as Relation_select_field, t as resolveWidget } from \"../../../../../../chunks/widget-registry.js\";\nimport { t as Relation_select_composite_field } from \"../../../../../../chunks/relation-select-composite-field.js\";\n//#region src/routes/tables/[table]/[id]/edit/+page.svelte\nfunction _page($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\tvar $$store_subs;\n\t\tlet { data } = $$props;\n\t\tconst relationByField = derived(() => new Map(data.relations.filter((r) => (r.fields ?? [r.field]).length === 1).map((r) => [r.field, r])));\n\t\tconst compositeLayout = derived(() => {\n\t\t\tconst hostByField = /* @__PURE__ */ new Map();\n\t\t\tconst memberFields = /* @__PURE__ */ new Set();\n\t\t\tfor (const config of data.relations) {\n\t\t\t\tconst fields = config.fields ?? [config.field];\n\t\t\t\tif (fields.length < 2) continue;\n\t\t\t\tconst grouped = new Set(fields);\n\t\t\t\tconst ordered = data.table.columns.filter((c) => grouped.has(c.name)).map((c) => c.name);\n\t\t\t\tif (ordered.length !== fields.length) continue;\n\t\t\t\thostByField.set(ordered[0], config);\n\t\t\t\tfor (const field of ordered.slice(1)) memberFields.add(field);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\thostByField,\n\t\t\t\tmemberFields\n\t\t\t};\n\t\t});\n\t\tconst { form, errors, enhance, submitting, message } = superForm(data.form, { dataType: \"json\" });\n\t\tconst relationForm = form;\n\t\tfunction memberColumns(config) {\n\t\t\tconst grouped = new Set(config.fields ?? [config.field]);\n\t\t\treturn data.table.columns.filter((c) => grouped.has(c.name));\n\t\t}\n\t\tfunction applyComposite(config, components) {\n\t\t\tconst keyFields = config.keyFields ?? [config.field];\n\t\t\trelationForm.update((current) => {\n\t\t\t\tconst next = { ...current };\n\t\t\t\tkeyFields.forEach((field, i) => {\n\t\t\t\t\tnext[field] = components === null ? \"\" : components[i];\n\t\t\t\t});\n\t\t\t\treturn next;\n\t\t\t});\n\t\t}\n\t\tlet $$settled = true;\n\t\tlet $$inner_renderer;\n\t\tfunction $$render_inner($$renderer) {\n\t\t\t$$renderer.push(`<h1 class=\"mb-1 text-2xl font-semibold\">Edit ${escape_html(data.table.label)}</h1> <p class=\"mb-6 text-sm text-muted-foreground\">${escape_html(data.table.qualifiedName)} / ${escape_html(data.id)}</p> <form method=\"POST\" class=\"space-y-4\">`);\n\t\t\tif (store_get($$store_subs ??= {}, \"$message\", message)) {\n\t\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t\t$$renderer.push(`<p role=\"alert\" class=\"rounded-md border border-destructive bg-destructive/10 px-3 py-2 text-sm text-destructive\">${escape_html(store_get($$store_subs ??= {}, \"$message\", message))}</p>`);\n\t\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t\t$$renderer.push(`<!--]--> <!--[-->`);\n\t\t\tconst each_array = ensure_array_like(data.table.columns);\n\t\t\tfor (let $$index_2 = 0, $$length = each_array.length; $$index_2 < $$length; $$index_2++) {\n\t\t\t\tlet col = each_array[$$index_2];\n\t\t\t\tconst required = !col.nullable && !col.readonly && !col.isPrimaryKey;\n\t\t\t\tconst relation = relationByField().get(col.name);\n\t\t\t\tconst composite = compositeLayout().hostByField.get(col.name);\n\t\t\t\t$$renderer.push(`<div>`);\n\t\t\t\tif (compositeLayout().memberFields.has(col.name)) $$renderer.push(\"<!--[0-->\");\n\t\t\t\telse if (composite) {\n\t\t\t\t\t$$renderer.push(\"<!--[1-->\");\n\t\t\t\t\tconst members = memberColumns(composite);\n\t\t\t\t\tconst groupRequired = members.some((c) => !c.nullable && !c.readonly && !c.isPrimaryKey);\n\t\t\t\t\tconst groupReadonly = members.some((c) => c.readonly);\n\t\t\t\t\t$$renderer.push(`<!---->`);\n\t\t\t\t\tRelation_select_composite_field($$renderer, {\n\t\t\t\t\t\tname: composite.field,\n\t\t\t\t\t\tlabel: members.map((c) => c.label).join(\", \"),\n\t\t\t\t\t\tresource: composite.resource,\n\t\t\t\t\t\tlabelField: composite.labelField,\n\t\t\t\t\t\tsearchFields: composite.searchFields,\n\t\t\t\t\t\tinitialOptions: data.initialOptions[composite.field] ?? [],\n\t\t\t\t\t\tvalues: (composite.keyFields ?? [composite.field]).map((field) => store_get($$store_subs ??= {}, \"$relationForm\", relationForm)[field]),\n\t\t\t\t\t\tonpick: (components) => applyComposite(composite, components),\n\t\t\t\t\t\trequired: groupRequired,\n\t\t\t\t\t\treadonly: groupReadonly\n\t\t\t\t\t});\n\t\t\t\t\t$$renderer.push(`<!----> <!--[-->`);\n\t\t\t\t\tconst each_array_1 = ensure_array_like(members);\n\t\t\t\t\tfor (let $$index = 0, $$length = each_array_1.length; $$index < $$length; $$index++) {\n\t\t\t\t\t\tlet member = each_array_1[$$index];\n\t\t\t\t\t\t$$renderer.push(`<input type=\"hidden\"${attr(\"name\", member.name)}${attr(\"value\", store_get($$store_subs ??= {}, \"$relationForm\", relationForm)[member.name] === null || store_get($$store_subs ??= {}, \"$relationForm\", relationForm)[member.name] === void 0 ? \"\" : String(store_get($$store_subs ??= {}, \"$relationForm\", relationForm)[member.name]))}/>`);\n\t\t\t\t\t}\n\t\t\t\t\t$$renderer.push(`<!--]--> <!--[-->`);\n\t\t\t\t\tconst each_array_2 = ensure_array_like(members);\n\t\t\t\t\tfor (let $$index_1 = 0, $$length = each_array_2.length; $$index_1 < $$length; $$index_1++) {\n\t\t\t\t\t\tlet member = each_array_2[$$index_1];\n\t\t\t\t\t\tif (store_get($$store_subs ??= {}, \"$errors\", errors)[member.name]) {\n\t\t\t\t\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t\t\t\t\t$$renderer.push(`<p class=\"mt-1 text-sm text-destructive\">${escape_html(member.label)}: ${escape_html(store_get($$store_subs ??= {}, \"$errors\", errors)[member.name])}</p>`);\n\t\t\t\t\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t\t\t\t\t$$renderer.push(`<!--]-->`);\n\t\t\t\t\t}\n\t\t\t\t\t$$renderer.push(`<!--]-->`);\n\t\t\t\t} else if (col.widget === \"relation-select\" && relation) {\n\t\t\t\t\t$$renderer.push(\"<!--[2-->\");\n\t\t\t\t\t$$renderer.push(`<!---->`);\n\t\t\t\t\tRelation_select_field($$renderer, {\n\t\t\t\t\t\tname: col.name,\n\t\t\t\t\t\tlabel: col.label,\n\t\t\t\t\t\tresource: relation.resource,\n\t\t\t\t\t\tlabelField: relation.labelField,\n\t\t\t\t\t\tsearchFields: relation.searchFields,\n\t\t\t\t\t\tinitialOptions: data.initialOptions[col.name] ?? [],\n\t\t\t\t\t\trequired,\n\t\t\t\t\t\treadonly: col.readonly,\n\t\t\t\t\t\tget value() {\n\t\t\t\t\t\t\treturn store_get($$store_subs ??= {}, \"$relationForm\", relationForm)[col.name];\n\t\t\t\t\t\t},\n\t\t\t\t\t\tset value($$value) {\n\t\t\t\t\t\t\tstore_mutate($$store_subs ??= {}, \"$relationForm\", relationForm, store_get($$store_subs ??= {}, \"$relationForm\", relationForm)[col.name] = $$value);\n\t\t\t\t\t\t\t$$settled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t$$renderer.push(`<!---->`);\n\t\t\t\t} else {\n\t\t\t\t\t$$renderer.push(\"<!--[-1-->\");\n\t\t\t\t\tconst Widget = resolveWidget(col.widget);\n\t\t\t\t\tif (Widget) {\n\t\t\t\t\t\t$$renderer.push(\"<!--[-->\");\n\t\t\t\t\t\tWidget($$renderer, {\n\t\t\t\t\t\t\tname: col.name,\n\t\t\t\t\t\t\tlabel: col.label,\n\t\t\t\t\t\t\toptions: col.enumValues,\n\t\t\t\t\t\t\trequired,\n\t\t\t\t\t\t\treadonly: col.readonly,\n\t\t\t\t\t\t\tget value() {\n\t\t\t\t\t\t\t\treturn store_get($$store_subs ??= {}, \"$form\", form)[col.name];\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tset value($$value) {\n\t\t\t\t\t\t\t\tstore_mutate($$store_subs ??= {}, \"$form\", form, store_get($$store_subs ??= {}, \"$form\", form)[col.name] = $$value);\n\t\t\t\t\t\t\t\t$$settled = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$$renderer.push(\"<!--[!-->\");\n\t\t\t\t\t\t$$renderer.push(\"<!--]-->\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$$renderer.push(`<!--]--> `);\n\t\t\t\tif (!composite && !compositeLayout().memberFields.has(col.name) && store_get($$store_subs ??= {}, \"$errors\", errors)[col.name]) {\n\t\t\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t\t\t$$renderer.push(`<p class=\"mt-1 text-sm text-destructive\">${escape_html(store_get($$store_subs ??= {}, \"$errors\", errors)[col.name])}</p>`);\n\t\t\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t\t\t$$renderer.push(`<!--]--></div>`);\n\t\t\t}\n\t\t\t$$renderer.push(`<!--]--> <div class=\"flex gap-3\"><button type=\"submit\"${attr(\"disabled\", store_get($$store_subs ??= {}, \"$submitting\", submitting), true)} class=\"rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground disabled:opacity-50\">${escape_html(store_get($$store_subs ??= {}, \"$submitting\", submitting) ? \"Saving…\" : \"Save\")}</button> <a${attr(\"href\", `/tables/${data.table.qualifiedName}/${data.id}`)} class=\"rounded-md border border-border px-4 py-2 text-sm font-medium\">Cancel</a></div></form>`);\n\t\t}\n\t\tdo {\n\t\t\t$$settled = true;\n\t\t\t$$inner_renderer = $$renderer.copy();\n\t\t\t$$render_inner($$inner_renderer);\n\t\t} while (!$$settled);\n\t\t$$renderer.subsume($$inner_renderer);\n\t\tif ($$store_subs) unsubscribe_stores($$store_subs);\n\t});\n}\n//#endregion\nexport { _page as default };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA;AACA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,KAAK;AACtC,EAAE,IAAI,YAAY;AAClB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO;AACxB,EAAE,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7I,EAAE,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM;AACxC,GAAG,MAAM,WAAW,mBAAmB,IAAI,GAAG,EAAE;AAChD,GAAG,MAAM,YAAY,mBAAmB,IAAI,GAAG,EAAE;AACjD,GAAG,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE;AACxC,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;AAClD,IAAI,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;AAC3B,IAAI,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC;AACnC,IAAI,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG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C,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACrC,GAAG;AACH,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,sDAAsD,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC,yGAAyG,EAAE,WAAW,CAAC,SAAS,CAAC,YAAY,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,8FAA8F,CAAC,CAAC;AAClhB,EAAE;AACF,EAAE,GAAG;AACL,GAAG,SAAS,GAAG,IAAI;AACnB,GAAG,gBAAgB,GAAG,UAAU,CAAC,IAAI,EAAE;AACvC,GAAG,cAAc,CAAC,gBAAgB,CAAC;AACnC,EAAE,CAAC,QAAQ,CAAC,SAAS;AACrB,EAAE,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC;AACtC,EAAE,IAAI,YAAY,EAAE,kBAAkB,CAAC,YAAY,CAAC;AACpD,CAAC,CAAC,CAAC;AACH;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'clsx';
|
|
2
|
-
import { L as ListTable } from './ListTable-
|
|
2
|
+
import { L as ListTable } from './ListTable-wSR_j9wZ.js';
|
|
3
3
|
import './dev-aF1HGl8f.js';
|
|
4
4
|
import './resource-id-CFSW_3aR.js';
|
|
5
5
|
|
|
@@ -21,4 +21,4 @@ function _page($$renderer, $$props) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export { _page as default };
|
|
24
|
-
//# sourceMappingURL=_page.svelte-
|
|
24
|
+
//# sourceMappingURL=_page.svelte-D9z7ezJ4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_page.svelte-
|
|
1
|
+
{"version":3,"file":"_page.svelte-D9z7ezJ4.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/tables/_table_/_page.svelte.js"],"sourcesContent":["import \"../../../../chunks/dev.js\";\nimport { t as ListTable } from \"../../../../chunks/ListTable.js\";\n//#region src/routes/tables/[table]/+page.svelte\nfunction _page($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\tlet { data } = $$props;\n\t\tListTable($$renderer, {\n\t\t\ttitle: data.table.label,\n\t\t\tqualifiedName: data.table.qualifiedName,\n\t\t\tcolumns: data.table.columns,\n\t\t\trows: data.list.rows,\n\t\t\ttotal: data.list.total,\n\t\t\tlistParams: data.listParams,\n\t\t\tbasePath: `/tables/${data.table.qualifiedName}`,\n\t\t\tprimaryKey: data.table.primaryKey\n\t\t});\n\t});\n}\n//#endregion\nexport { _page as default };\n"],"names":[],"mappings":";;;;;AAEA;AACA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,KAAK;AACtC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO;AACxB,EAAE,SAAS,CAAC,UAAU,EAAE;AACxB,GAAG,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;AAC1B,GAAG,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;AAC1C,GAAG,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;AAC9B,GAAG,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;AACvB,GAAG,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;AACzB,GAAG,UAAU,EAAE,IAAI,CAAC,UAAU;AAC9B,GAAG,QAAQ,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAClD,GAAG,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC;AAC1B,GAAG,CAAC;AACJ,CAAC,CAAC,CAAC;AACH;;;;"}
|