pgkiln 0.82.0 → 0.84.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/db/migrations/153_component_events.sql +21 -0
- package/db/migrations/154_notifications.sql +186 -0
- package/docs/apex-feature-parity.md +4 -3
- package/docs/guide/03-builder.md +10 -1
- package/docs/guide/04-pages-and-regions.md +44 -1
- package/docs/guide/06-processing.md +22 -1
- package/docs/guide/07-dynamic-actions.md +28 -0
- package/docs/guide/09-reference.md +15 -0
- package/docs/guide/11-from-apex.md +3 -1
- package/docs/guide/12-development.md +16 -1
- package/package.json +1 -1
- package/public/app.css +31 -0
- package/public/app.js +163 -4
- package/public/builder.css +25 -2
- package/public/data-modeler.js +8 -5
- package/public/sql-monitor.js +5 -2
- package/public/sw.js +5 -1
- package/src/app.ts +2 -0
- package/src/builder/ai-builder.ts +50 -46
- package/src/builder/api.ts +49 -49
- package/src/builder/autorest.ts +92 -87
- package/src/builder/changelog.ts +39 -37
- package/src/builder/code-editor.ts +1 -1
- package/src/builder/components.ts +13 -8
- package/src/builder/data-modeler.ts +89 -84
- package/src/builder/data-security.ts +39 -37
- package/src/builder/dataload.ts +69 -65
- package/src/builder/datapump.ts +108 -97
- package/src/builder/ddl-tools.ts +38 -34
- package/src/builder/document-view.ts +11 -11
- package/src/builder/i18n/de.ts +1635 -0
- package/src/builder/i18n/en.ts +1635 -0
- package/src/builder/i18n/es.ts +1635 -0
- package/src/builder/i18n/fr.ts +1635 -0
- package/src/builder/i18n/it.ts +1635 -0
- package/src/builder/i18n/ja.ts +1635 -0
- package/src/builder/i18n/ko.ts +1635 -0
- package/src/builder/i18n/nl.ts +1635 -0
- package/src/builder/i18n/pt.ts +1635 -0
- package/src/builder/i18n/zh-cn.ts +1635 -0
- package/src/builder/i18n/zh-tw.ts +1635 -0
- package/src/builder/i18n.ts +18 -0
- package/src/builder/notification-settings.ts +27 -0
- package/src/builder/object-actions.ts +18 -16
- package/src/builder/object-browser.ts +2 -2
- package/src/builder/querybuilder.ts +42 -36
- package/src/builder/quicksql.ts +16 -18
- package/src/builder/region-settings.ts +201 -199
- package/src/builder/report-settings.ts +64 -60
- package/src/builder/rest-modules.ts +145 -143
- package/src/builder/routes.ts +3 -0
- package/src/builder/sampledata.ts +59 -52
- package/src/builder/scheduling.ts +180 -159
- package/src/builder/scripts.ts +71 -65
- package/src/builder/sql-charts.ts +36 -30
- package/src/builder/sql-monitor.ts +95 -89
- package/src/builder/sql-utilities.ts +47 -40
- package/src/builder/top-sql.ts +21 -17
- package/src/builder/unload.ts +48 -44
- package/src/builder/worksheet.ts +3 -3
- package/src/cli/replace.ts +2 -0
- package/src/cron-schedule.ts +47 -17
- package/src/i18n/ar.ts +9 -0
- package/src/i18n/cs.ts +9 -0
- package/src/i18n/da.ts +9 -0
- package/src/i18n/de.ts +9 -0
- package/src/i18n/el.ts +9 -0
- package/src/i18n/es.ts +9 -0
- package/src/i18n/fi.ts +9 -0
- package/src/i18n/fr.ts +9 -0
- package/src/i18n/he.ts +9 -0
- package/src/i18n/it.ts +9 -0
- package/src/i18n/ja.ts +9 -0
- package/src/i18n/ko.ts +9 -0
- package/src/i18n/nb.ts +9 -0
- package/src/i18n/pl.ts +9 -0
- package/src/i18n/pt.ts +9 -0
- package/src/i18n/ru.ts +9 -0
- package/src/i18n/sv.ts +9 -0
- package/src/i18n/tr.ts +9 -0
- package/src/i18n/uk.ts +9 -0
- package/src/i18n/zh.ts +9 -0
- package/src/i18n.ts +18 -0
- package/src/metadata.ts +11 -3
- package/src/runtime/calendar.ts +3 -2
- package/src/runtime/context.ts +2 -0
- package/src/runtime/engine.ts +2 -1
- package/src/runtime/feedback.ts +1 -1
- package/src/runtime/grid.ts +1 -0
- package/src/runtime/lists.ts +43 -11
- package/src/runtime/maps.ts +7 -4
- package/src/runtime/notifications.ts +237 -0
- package/src/runtime/processes.ts +45 -1
- package/src/runtime/regions.ts +11 -15
- package/src/runtime/render.ts +18 -4
- package/src/runtime/routes.ts +16 -4
- package/src/runtime/signin.ts +2 -1
- package/src/runtime/tree.ts +4 -3
- package/src/session.ts +13 -4
|
@@ -45,10 +45,10 @@ async function page(req: Req, reply: FastifyReply) {
|
|
|
45
45
|
|
|
46
46
|
const errors: string[] = [];
|
|
47
47
|
let ddl: string[] = [];
|
|
48
|
-
if (!key.length) errors.push(
|
|
48
|
+
if (!key.length) errors.push(tx('docv.no_key', { table }));
|
|
49
49
|
if (isPost && !errors.length) {
|
|
50
50
|
for (const n of [view, document]) if (!NAME.test(n)) errors.push(tx('fts.bad_name', { name: n }));
|
|
51
|
-
if (key.includes(document)) errors.push(
|
|
51
|
+
if (key.includes(document)) errors.push(tx('docv.doc_is_key', { name: document }));
|
|
52
52
|
if (NAME.test(view) && (await db.one('select 1 as x from pg_class where relnamespace = $1::regnamespace and relname = $2', [ident(t.schema), view]))) errors.push(tx('fts.exists', { name: view }));
|
|
53
53
|
if (!errors.length) {
|
|
54
54
|
const kids = [];
|
|
@@ -77,7 +77,7 @@ async function page(req: Req, reply: FastifyReply) {
|
|
|
77
77
|
clearCompletions();
|
|
78
78
|
if (!failed) {
|
|
79
79
|
await recordChanges({ workspaceId: currentWorkspace(s), author: s.username ?? '?', source: 'table', defaultSchema: t.schema, statements: [joinStatements(ddl)] });
|
|
80
|
-
flash(s,
|
|
80
|
+
flash(s, tx('docv.made', { view: `${t.schema}.${view}` }));
|
|
81
81
|
return back(reply, s, `${BASE}/sql/objects/table?${new URLSearchParams({ o: `${ident(t.schema)}.${ident(view)}` })}`);
|
|
82
82
|
}
|
|
83
83
|
errors.push(`${tx('te.nothing_changed')}: ${failed}`);
|
|
@@ -87,15 +87,15 @@ async function page(req: Req, reply: FastifyReply) {
|
|
|
87
87
|
const title = `${tx('docv.add')}: ${table}`;
|
|
88
88
|
const form: Raw = key.length ? html`<form method="post" action="${BASE}/sql/objects/document" class="fts-form">${csrf(s)}
|
|
89
89
|
<input type="hidden" name="o" value="${table}">
|
|
90
|
-
<fieldset class="prop-group"><legend
|
|
91
|
-
${children.length ? html`<div class="table-wrap"><table class="report"><thead><tr><th scope="col">${tx('fts.include')}</th><th scope="col"
|
|
90
|
+
<fieldset class="prop-group"><legend>${tx('docv.children')}</legend>
|
|
91
|
+
${children.length ? html`<div class="table-wrap"><table class="report"><thead><tr><th scope="col">${tx('fts.include')}</th><th scope="col">${tx('dl.table')}</th><th scope="col">${tx('docv.list')}</th><th scope="col">${tx('docv.fk')}</th></tr></thead><tbody>
|
|
92
92
|
${children.map((c, i) => html`<tr><td class="te-c"><input type="hidden" name="c.${i}.name" value="${c.schema}.${c.table}"><input type="checkbox" id="dv-c${i}" name="c.${i}.use"${picked.has(i) ? raw(' checked') : ''}></td>
|
|
93
93
|
<td><label for="dv-c${i}">${c.schema}.${c.table}</label></td><td><code>${c.name}</code></td><td><code>${c.fk.map(([col, p]) => `${col} → ${p}`).join(', ')}</code></td></tr>`)}
|
|
94
|
-
</tbody></table></div>` : html`<p class="muted"
|
|
95
|
-
<small class="help"
|
|
94
|
+
</tbody></table></div>` : html`<p class="muted">${tx('docv.no_children', { table })}</p>`}
|
|
95
|
+
<small class="help">${tx('docv.children_help')}</small></fieldset>
|
|
96
96
|
<div class="form-grid u-mt1">
|
|
97
|
-
<div class="field"><label class="label" for="dv-view"
|
|
98
|
-
<div class="field"><label class="label" for="dv-doc"
|
|
97
|
+
<div class="field"><label class="label" for="dv-view">${tx('docv.view')}</label><input id="dv-view" name="view" value="${view}" required autocomplete="off" spellcheck="false" class="code"></div>
|
|
98
|
+
<div class="field"><label class="label" for="dv-doc">${tx('docv.doc_column')}</label><input id="dv-doc" name="document" value="${document}" required autocomplete="off" spellcheck="false" class="code"></div>
|
|
99
99
|
</div>
|
|
100
100
|
${ddl.length ? html`<h2>DDL</h2><pre class="source te-ddl" data-code-view="sql" tabindex="0" aria-label="DDL">${ddl.map((x) => `${x};`).join('\n\n')}</pre>` : ''}
|
|
101
101
|
<div class="buttons te-buttons">
|
|
@@ -105,10 +105,10 @@ async function page(req: Req, reply: FastifyReply) {
|
|
|
105
105
|
<a class="btn" href="${BASE}/sql/objects/table?${new URLSearchParams({ o: table })}">${tx('common.cancel')}</a>
|
|
106
106
|
</div></form>` : html``;
|
|
107
107
|
const main = html`<h1 class="u-mb1">${title}</h1>${workshopTabs('objects', s)}
|
|
108
|
-
<p class="muted"
|
|
108
|
+
<p class="muted">${tx('docv.intro', { table })}</p>
|
|
109
109
|
${errors.length ? html`<div class="alert alert-error" role="alert"><ul>${errors.map((e) => html`<li>${e}</li>`)}</ul></div>` : ''}
|
|
110
110
|
${form}`;
|
|
111
|
-
return send(reply, s, shell(s, title, [['
|
|
111
|
+
return send(reply, s, shell(s, title, [[tx('rail.sql_workshop'), `${BASE}/sql`], [tx('ob.title'), `${BASE}/sql/objects`], [tx('te.title_table', { table }), `${BASE}/sql/objects/table?${new URLSearchParams({ o: table })}`], [tx('docv.add')]], main, 'sql'));
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
export async function documentViewRoutes(app: FastifyInstance) {
|