@lobb-js/studio 0.47.0 → 0.49.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/dist/actions.d.ts +2 -28
- package/dist/actions.js +4 -60
- package/dist/components/detailView/detailView.svelte +12 -62
- package/dist/components/detailView/detailView.svelte.d.ts +1 -1
- package/dist/components/detailView/fieldInput.svelte +161 -288
- package/dist/components/detailView/fieldInput.svelte.d.ts +1 -1
- package/dist/components/detailView/fields/BoolField.svelte +42 -0
- package/dist/components/detailView/fields/BoolField.svelte.d.ts +13 -0
- package/dist/components/detailView/fields/CodeField.svelte +30 -0
- package/dist/components/detailView/fields/CodeField.svelte.d.ts +13 -0
- package/dist/components/detailView/fields/CustomInputField.svelte +50 -0
- package/dist/components/detailView/fields/CustomInputField.svelte.d.ts +18 -0
- package/dist/components/detailView/fields/DateField.svelte +47 -0
- package/dist/components/detailView/fields/DateField.svelte.d.ts +14 -0
- package/dist/components/detailView/fields/EmbeddedField.svelte +139 -0
- package/dist/components/detailView/fields/EmbeddedField.svelte.d.ts +13 -0
- package/dist/components/detailView/fields/EmbeddedPolymorphicField.svelte +197 -0
- package/dist/components/detailView/fields/EmbeddedPolymorphicField.svelte.d.ts +13 -0
- package/dist/components/detailView/fields/EnumField.svelte +70 -0
- package/dist/components/detailView/fields/EnumField.svelte.d.ts +17 -0
- package/dist/components/detailView/fields/FieldWrapper.svelte +68 -0
- package/dist/components/detailView/fields/FieldWrapper.svelte.d.ts +18 -0
- package/dist/components/detailView/fields/ForeignKeyField.svelte +78 -0
- package/dist/components/detailView/fields/ForeignKeyField.svelte.d.ts +17 -0
- package/dist/components/detailView/fields/IdField.svelte +21 -0
- package/dist/components/detailView/fields/IdField.svelte.d.ts +12 -0
- package/dist/components/detailView/fields/NumberField.svelte +38 -0
- package/dist/components/detailView/fields/NumberField.svelte.d.ts +16 -0
- package/dist/components/detailView/fields/PasswordField.svelte +29 -0
- package/dist/components/detailView/fields/PasswordField.svelte.d.ts +12 -0
- package/dist/components/detailView/fields/PolymorphicField.svelte +51 -0
- package/dist/components/detailView/fields/PolymorphicField.svelte.d.ts +16 -0
- package/dist/components/detailView/fields/RichTextField.svelte +30 -0
- package/dist/components/detailView/fields/RichTextField.svelte.d.ts +13 -0
- package/dist/components/detailView/fields/StringField.svelte +35 -0
- package/dist/components/detailView/fields/StringField.svelte.d.ts +14 -0
- package/dist/components/detailView/fields/TextField.svelte +35 -0
- package/dist/components/detailView/fields/TextField.svelte.d.ts +14 -0
- package/dist/components/foreingKeyInput.svelte +1 -1
- package/dist/components/polymorphicInput.svelte +1 -1
- package/dist/components/popup/popup.svelte +23 -4
- package/dist/components/popup/popup.svelte.d.ts +2 -0
- package/dist/extensions/extension.types.d.ts +5 -2
- package/dist/extensions/extensionUtils.js +4 -1
- package/dist/popup.d.ts +31 -0
- package/dist/popup.js +104 -0
- package/package.json +7 -6
- package/src/lib/actions.ts +5 -95
- package/src/lib/components/detailView/detailView.svelte +12 -62
- package/src/lib/components/detailView/fieldInput.svelte +161 -288
- package/src/lib/components/detailView/fields/BoolField.svelte +42 -0
- package/src/lib/components/detailView/fields/CodeField.svelte +30 -0
- package/src/lib/components/detailView/fields/CustomInputField.svelte +50 -0
- package/src/lib/components/detailView/fields/DateField.svelte +47 -0
- package/src/lib/components/detailView/fields/EmbeddedField.svelte +139 -0
- package/src/lib/components/detailView/fields/EmbeddedPolymorphicField.svelte +197 -0
- package/src/lib/components/detailView/fields/EnumField.svelte +70 -0
- package/src/lib/components/detailView/fields/FieldWrapper.svelte +68 -0
- package/src/lib/components/detailView/fields/ForeignKeyField.svelte +78 -0
- package/src/lib/components/detailView/fields/IdField.svelte +21 -0
- package/src/lib/components/detailView/fields/NumberField.svelte +38 -0
- package/src/lib/components/detailView/fields/PasswordField.svelte +29 -0
- package/src/lib/components/detailView/fields/PolymorphicField.svelte +51 -0
- package/src/lib/components/detailView/fields/RichTextField.svelte +30 -0
- package/src/lib/components/detailView/fields/StringField.svelte +35 -0
- package/src/lib/components/detailView/fields/TextField.svelte +35 -0
- package/src/lib/components/foreingKeyInput.svelte +1 -1
- package/src/lib/components/polymorphicInput.svelte +1 -1
- package/src/lib/components/popup/popup.svelte +23 -4
- package/src/lib/extensions/extension.types.ts +4 -2
- package/src/lib/extensions/extensionUtils.ts +4 -1
- package/src/lib/popup.ts +147 -0
package/dist/popup.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { mount, unmount } from "svelte";
|
|
2
|
+
import DataTable from "./components/dataTable/dataTable.svelte";
|
|
3
|
+
import Popup from "./components/popup/popup.svelte";
|
|
4
|
+
import { createStudioContextMap } from "./context";
|
|
5
|
+
let activePopup = null;
|
|
6
|
+
// Props that produced the currently-mounted popup. Tracked so we can
|
|
7
|
+
// push them onto `popupHistory` when this popup is swapped out by a
|
|
8
|
+
// `replaceLast: true` opener, enabling back navigation.
|
|
9
|
+
let activePopupProps = null;
|
|
10
|
+
// Stack of popup-props that were swapped out via `replaceLast: true`.
|
|
11
|
+
// The back arrow re-opens the top of the stack; closing via X or the
|
|
12
|
+
// backdrop wipes the whole stack (a deliberate full-reset, not back).
|
|
13
|
+
const popupHistory = [];
|
|
14
|
+
// Internal mount path used by both `openPopup` (user-initiated) and
|
|
15
|
+
// `goBackPopup` (history-driven). The `fromBack` flag suppresses
|
|
16
|
+
// pushing the outgoing popup onto the history stack — when the user
|
|
17
|
+
// hits Back, the popup they're leaving shouldn't reappear if they hit
|
|
18
|
+
// Back again.
|
|
19
|
+
function mountPopup(studioContext, props, opts = {}) {
|
|
20
|
+
const targetElement = document.querySelector("main");
|
|
21
|
+
if (!targetElement)
|
|
22
|
+
throw new Error("main html element doesn't exist");
|
|
23
|
+
if (props.replaceLast && activePopup) {
|
|
24
|
+
// Swap: archive the outgoing popup's props (unless this open is
|
|
25
|
+
// itself a back-navigation) and unmount it. Outro plays in
|
|
26
|
+
// parallel with the new popup's intro.
|
|
27
|
+
if (!opts.fromBack && activePopupProps) {
|
|
28
|
+
popupHistory.push(activePopupProps);
|
|
29
|
+
}
|
|
30
|
+
const toUnmount = activePopup;
|
|
31
|
+
activePopup = null;
|
|
32
|
+
activePopupProps = null;
|
|
33
|
+
unmount(toUnmount, { outro: true });
|
|
34
|
+
}
|
|
35
|
+
else if (!props.replaceLast) {
|
|
36
|
+
// A fresh, non-stacking popup starts a new context — drop any
|
|
37
|
+
// accumulated back history from the previous chain.
|
|
38
|
+
popupHistory.length = 0;
|
|
39
|
+
}
|
|
40
|
+
const canGoBack = popupHistory.length > 0;
|
|
41
|
+
const mounted = mount(Popup, {
|
|
42
|
+
target: targetElement,
|
|
43
|
+
context: createStudioContextMap(studioContext),
|
|
44
|
+
props: {
|
|
45
|
+
component: props.component,
|
|
46
|
+
componentProps: props.componentProps,
|
|
47
|
+
title: props.title,
|
|
48
|
+
size: props.size,
|
|
49
|
+
hideHeader: props.hideHeader,
|
|
50
|
+
canGoBack,
|
|
51
|
+
onBack: () => goBackPopup(studioContext),
|
|
52
|
+
onClose: async () => {
|
|
53
|
+
if (activePopup === mounted) {
|
|
54
|
+
activePopup = null;
|
|
55
|
+
activePopupProps = null;
|
|
56
|
+
// X / backdrop is a full reset — nuke the back
|
|
57
|
+
// stack so reopening anything starts fresh.
|
|
58
|
+
popupHistory.length = 0;
|
|
59
|
+
}
|
|
60
|
+
await unmount(mounted, { outro: true });
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
activePopup = mounted;
|
|
65
|
+
activePopupProps = props;
|
|
66
|
+
}
|
|
67
|
+
export function openPopup(studioContext, props) {
|
|
68
|
+
mountPopup(studioContext, props);
|
|
69
|
+
}
|
|
70
|
+
export function goBackPopup(studioContext) {
|
|
71
|
+
const prev = popupHistory.pop();
|
|
72
|
+
if (!prev)
|
|
73
|
+
return;
|
|
74
|
+
// Force `replaceLast: true` so the swap+outro path runs, and tell
|
|
75
|
+
// `mountPopup` not to push the current popup onto history.
|
|
76
|
+
mountPopup(studioContext, { ...prev, replaceLast: true }, { fromBack: true });
|
|
77
|
+
}
|
|
78
|
+
export function openDataTablePopup(studioContext, props) {
|
|
79
|
+
// DataTable reads `searchParams` once during its initial $state setup,
|
|
80
|
+
// so sort/limit need to be folded into the searchParams object before
|
|
81
|
+
// we mount. Built here in plain TS — no Svelte reactivity to escape.
|
|
82
|
+
const searchParams = {};
|
|
83
|
+
if (props.sort)
|
|
84
|
+
searchParams.sort = props.sort;
|
|
85
|
+
if (props.limit != null)
|
|
86
|
+
searchParams.limit = String(props.limit);
|
|
87
|
+
openPopup(studioContext, {
|
|
88
|
+
component: DataTable,
|
|
89
|
+
componentProps: {
|
|
90
|
+
collectionName: props.collectionName,
|
|
91
|
+
filter: props.filter,
|
|
92
|
+
searchParams,
|
|
93
|
+
showHeader: props.showHeader,
|
|
94
|
+
showFooter: props.showFooter,
|
|
95
|
+
showFilter: props.showFilter ?? false,
|
|
96
|
+
tabs: props.tabs,
|
|
97
|
+
view: props.view,
|
|
98
|
+
},
|
|
99
|
+
title: props.title ?? props.collectionName,
|
|
100
|
+
size: props.size,
|
|
101
|
+
hideHeader: props.hideHeader,
|
|
102
|
+
replaceLast: props.replaceLast,
|
|
103
|
+
});
|
|
104
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobb-js/studio",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.49.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
38
38
|
"storybook": "storybook dev -p 6006",
|
|
39
39
|
"build-storybook": "storybook build",
|
|
40
|
-
"test": "
|
|
41
|
-
"test:
|
|
40
|
+
"test": "vitest run tests",
|
|
41
|
+
"test:watch": "vitest tests",
|
|
42
42
|
"test:unit": "vitest",
|
|
43
43
|
"test-storybook": "vitest --project=storybook",
|
|
44
44
|
"prepublishOnly": "./scripts/prepublish.sh",
|
|
45
45
|
"postpublish": "./scripts/postpublish.sh"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@lobb-js/core": "^0.40.0",
|
|
49
48
|
"@chromatic-com/storybook": "^4.1.2",
|
|
49
|
+
"@lobb-js/core": "^0.41.0",
|
|
50
50
|
"@playwright/test": "^1.60.0",
|
|
51
51
|
"@storybook/addon-a11y": "^10.0.1",
|
|
52
52
|
"@storybook/addon-docs": "^10.0.1",
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
"tw-animate-css": "^1.4.0",
|
|
75
75
|
"typescript": "~5.9.3",
|
|
76
76
|
"vite": "^8.0.13",
|
|
77
|
-
"vitest": "^4.0.5"
|
|
77
|
+
"vitest": "^4.0.5",
|
|
78
|
+
"vitest-browser-svelte": "^2.1.1"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
80
81
|
"svelte": "^5.0.0",
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"@codemirror/view": "^6.39.12",
|
|
92
93
|
"@dagrejs/dagre": "^1.1.5",
|
|
93
94
|
"@internationalized/date": "^3.12.0",
|
|
94
|
-
"@lobb-js/sdk": "^0.
|
|
95
|
+
"@lobb-js/sdk": "^0.5.0",
|
|
95
96
|
"@lucide/svelte": "^0.563.1",
|
|
96
97
|
"@tailwindcss/vite": "^4.3.0",
|
|
97
98
|
"@tiptap/core": "^3.0.0",
|
package/src/lib/actions.ts
CHANGED
|
@@ -3,8 +3,6 @@ import ConfirmationDialog from "./components/confirmationDialog/confirmationDial
|
|
|
3
3
|
import CreateDetailView from "./components/detailView/create/createDetailView.svelte";
|
|
4
4
|
import UpdateDetailView from "./components/detailView/update/updateDetailView.svelte";
|
|
5
5
|
import DataTableDrawer from "./components/dataTableDrawer/dataTableDrawer.svelte";
|
|
6
|
-
import DataTable from "./components/dataTable/dataTable.svelte";
|
|
7
|
-
import Popup from "./components/popup/popup.svelte";
|
|
8
6
|
import type { CreateDetailViewProp } from "./components/detailView/create/createDetailView.svelte";
|
|
9
7
|
import type { UpdateDetailViewProp } from "./components/detailView/update/updateDetailView.svelte";
|
|
10
8
|
import type { StudioContext } from "./context";
|
|
@@ -22,49 +20,6 @@ export interface OpenDataTableDrawerProps {
|
|
|
22
20
|
tabs?: CollectionTab[];
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
export interface OpenPopupProps {
|
|
26
|
-
// Component rendered inside the popup. It receives `componentProps`
|
|
27
|
-
// spread onto it plus `onClose` so it can close the popup itself.
|
|
28
|
-
component: any;
|
|
29
|
-
componentProps?: Record<string, any>;
|
|
30
|
-
title?: string;
|
|
31
|
-
// `default` is the wide data-table popup (max-w-7xl, fixed 85vh).
|
|
32
|
-
// `sm` is the narrow detail-view variant (max-w-2xl, content-height).
|
|
33
|
-
size?: "default" | "sm";
|
|
34
|
-
// When true, the popup renders no chrome at all (no title bar, no
|
|
35
|
-
// close button). The body uses the `onClose` prop the popup passes
|
|
36
|
-
// it to render its own close affordance.
|
|
37
|
-
hideHeader?: boolean;
|
|
38
|
-
// Close the previously-opened popup before mounting this one —
|
|
39
|
-
// drill-down semantics. Only popups participate; drawers don't.
|
|
40
|
-
replaceLast?: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface OpenDataTablePopupProps {
|
|
44
|
-
collectionName: string;
|
|
45
|
-
filter?: Record<string, any>;
|
|
46
|
-
sort?: Record<string, "asc" | "desc">;
|
|
47
|
-
limit?: number;
|
|
48
|
-
title?: string;
|
|
49
|
-
showHeader?: boolean;
|
|
50
|
-
showFooter?: boolean;
|
|
51
|
-
showFilter?: boolean;
|
|
52
|
-
tabs?: CollectionTab[];
|
|
53
|
-
view?: { id: string; [key: string]: any };
|
|
54
|
-
replaceLast?: boolean;
|
|
55
|
-
size?: "default" | "sm";
|
|
56
|
-
hideHeader?: boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
let activePopup: any = null;
|
|
60
|
-
|
|
61
|
-
function closeActivePopupIfRequested(replaceLast: boolean | undefined) {
|
|
62
|
-
if (!replaceLast || !activePopup) return;
|
|
63
|
-
const toUnmount = activePopup;
|
|
64
|
-
activePopup = null;
|
|
65
|
-
unmount(toUnmount, { outro: true });
|
|
66
|
-
}
|
|
67
|
-
|
|
68
23
|
export function showDialog(title: string, description: string): Promise<boolean> {
|
|
69
24
|
return new Promise((resolve) => {
|
|
70
25
|
const targetElement = document.querySelector("main");
|
|
@@ -145,53 +100,8 @@ export function openDataTableDrawer(studioContext: StudioContext, props: OpenDat
|
|
|
145
100
|
});
|
|
146
101
|
}
|
|
147
102
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const mounted = mount(Popup, {
|
|
155
|
-
target: targetElement,
|
|
156
|
-
context: createStudioContextMap(studioContext),
|
|
157
|
-
props: {
|
|
158
|
-
component: props.component,
|
|
159
|
-
componentProps: props.componentProps,
|
|
160
|
-
title: props.title,
|
|
161
|
-
size: props.size,
|
|
162
|
-
hideHeader: props.hideHeader,
|
|
163
|
-
onClose: async () => {
|
|
164
|
-
if (activePopup === mounted) activePopup = null;
|
|
165
|
-
await unmount(mounted, { outro: true });
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
});
|
|
169
|
-
activePopup = mounted;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export function openDataTablePopup(studioContext: StudioContext, props: OpenDataTablePopupProps) {
|
|
173
|
-
// DataTable reads `searchParams` once during its initial $state setup,
|
|
174
|
-
// so sort/limit need to be folded into the searchParams object before
|
|
175
|
-
// we mount. Built here in plain TS — no Svelte reactivity to escape.
|
|
176
|
-
const searchParams: Record<string, any> = {};
|
|
177
|
-
if (props.sort) searchParams.sort = props.sort;
|
|
178
|
-
if (props.limit != null) searchParams.limit = String(props.limit);
|
|
179
|
-
|
|
180
|
-
openPopup(studioContext, {
|
|
181
|
-
component: DataTable,
|
|
182
|
-
componentProps: {
|
|
183
|
-
collectionName: props.collectionName,
|
|
184
|
-
filter: props.filter,
|
|
185
|
-
searchParams,
|
|
186
|
-
showHeader: props.showHeader,
|
|
187
|
-
showFooter: props.showFooter,
|
|
188
|
-
showFilter: props.showFilter ?? false,
|
|
189
|
-
tabs: props.tabs,
|
|
190
|
-
view: props.view,
|
|
191
|
-
},
|
|
192
|
-
title: props.title ?? props.collectionName,
|
|
193
|
-
size: props.size,
|
|
194
|
-
hideHeader: props.hideHeader,
|
|
195
|
-
replaceLast: props.replaceLast,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
103
|
+
// Popup helpers (openPopup, openDataTablePopup, goBackPopup) live in
|
|
104
|
+
// `./popup` — they share enough state (active overlay, back-history)
|
|
105
|
+
// to warrant their own module.
|
|
106
|
+
export { openPopup, openDataTablePopup, goBackPopup } from "./popup";
|
|
107
|
+
export type { OpenPopupProps, OpenDataTablePopupProps } from "./popup";
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { CircleHelp } from "lucide-svelte";
|
|
3
|
-
import * as Tooltip from "../ui/tooltip";
|
|
4
2
|
import { getStudioContext } from "../../context";
|
|
5
|
-
import ExtensionsComponents from "../extensionsComponents.svelte";
|
|
6
|
-
import { getExtensionUtils } from "../../extensions/extensionUtils";
|
|
7
|
-
import { getField, getFieldIcon } from "../dataTable/utils";
|
|
8
3
|
import FieldInput from "./fieldInput.svelte";
|
|
9
|
-
import { getFieldTypeLabel } from "../../utils";
|
|
10
4
|
|
|
11
5
|
interface Props {
|
|
12
6
|
collectionName: string;
|
|
13
7
|
entry: Record<string, any>;
|
|
14
|
-
fieldsErrors?: Record<string,
|
|
8
|
+
fieldsErrors?: Record<string, any>;
|
|
15
9
|
changedFields?: string[];
|
|
16
10
|
}
|
|
17
11
|
|
|
@@ -22,9 +16,7 @@
|
|
|
22
16
|
changedFields = [],
|
|
23
17
|
}: Props = $props();
|
|
24
18
|
|
|
25
|
-
const {
|
|
26
|
-
// Singleton collections only ever have one row, and `id` is auto-
|
|
27
|
-
// generated for that row — there's no value to showing it in the form.
|
|
19
|
+
const { ctx } = getStudioContext();
|
|
28
20
|
const fieldNames = $derived(
|
|
29
21
|
Object.keys(ctx.meta.collections[collectionName].fields).filter(
|
|
30
22
|
(fieldName) =>
|
|
@@ -35,58 +27,16 @@
|
|
|
35
27
|
|
|
36
28
|
<div class="grid grid-cols-2 gap-4 p-4">
|
|
37
29
|
{#each fieldNames as fieldName}
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
name="detailView.field.label"
|
|
49
|
-
utils={getExtensionUtils(lobb, ctx)}
|
|
50
|
-
{collectionName}
|
|
51
|
-
{fieldName}
|
|
52
|
-
bind:value={entry[fieldName]}
|
|
53
|
-
>
|
|
54
|
-
<div class="flex items-center gap-1.5">
|
|
55
|
-
<div class="h-fit">{field.label}</div>
|
|
56
|
-
<div class="flex h-fit items-center gap-1 text-[0.7rem] text-muted-foreground">
|
|
57
|
-
<FieldIcon size="12" />
|
|
58
|
-
{getFieldTypeLabel(field.type)}
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</ExtensionsComponents>
|
|
62
|
-
{#if description}
|
|
63
|
-
<Tooltip.Root>
|
|
64
|
-
<Tooltip.Trigger>
|
|
65
|
-
<CircleHelp size="12" class="text-muted-foreground" />
|
|
66
|
-
</Tooltip.Trigger>
|
|
67
|
-
<Tooltip.Content class="max-w-64 text-xs">
|
|
68
|
-
{description}
|
|
69
|
-
</Tooltip.Content>
|
|
70
|
-
</Tooltip.Root>
|
|
71
|
-
{/if}
|
|
72
|
-
</div>
|
|
73
|
-
<div>
|
|
74
|
-
<ExtensionsComponents
|
|
75
|
-
name="dvFields.topRight.{collectionName}.{fieldName}"
|
|
76
|
-
utils={getExtensionUtils(lobb, ctx)}
|
|
77
|
-
bind:value={entry[fieldName]}
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
<FieldInput
|
|
82
|
-
{collectionName}
|
|
83
|
-
{fieldName}
|
|
84
|
-
bind:value={entry[fieldName]}
|
|
85
|
-
bind:entry
|
|
86
|
-
errorMessages={fieldsErrors[fieldName]}
|
|
87
|
-
changed={changedFields.includes(fieldName)}
|
|
88
|
-
/>
|
|
89
|
-
</div>
|
|
30
|
+
{@const fieldDef = ctx.meta.collections[collectionName].fields[fieldName]}
|
|
31
|
+
{#if !(fieldDef?.ui?.hidden) || (fieldDef as any)?.embedded}
|
|
32
|
+
<FieldInput
|
|
33
|
+
{collectionName}
|
|
34
|
+
{fieldName}
|
|
35
|
+
bind:value={entry[fieldName]}
|
|
36
|
+
bind:entry
|
|
37
|
+
errorMessages={fieldsErrors[fieldName]}
|
|
38
|
+
changed={changedFields.includes(fieldName)}
|
|
39
|
+
/>
|
|
90
40
|
{/if}
|
|
91
41
|
{/each}
|
|
92
42
|
</div>
|