@nivaro/react 0.2.51 → 0.2.52
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +204 -6
- package/dist/index.js +442 -439
- package/dist/layout-editor.d.ts +80 -0
- package/dist/layout-editor.js +11 -0
- package/dist/shared/components/ItemEditForm.js +4044 -3866
- package/dist/shared/components/RecordDrilldownSheet.js +114 -97
- package/dist/shared/components/RecordReadView.js +637 -570
- package/dist/shared/components/ai/ExplainButton.js +1 -1
- package/dist/shared/components/item-edit/GroupSection.js +489 -466
- package/dist/shared/components/item-edit/HeaderBand.js +47 -44
- package/dist/shared/components/item-edit/M2MStagingContext.js +3 -3
- package/dist/shared/components/item-edit/O2MStagingContext.js +1 -1
- package/dist/shared/components/item-edit/RecordGrantTools.js +206 -0
- package/dist/shared/components/item-edit/StepsBar.js +49 -43
- package/dist/shared/components/item-edit/SummaryPanel.js +1 -1
- package/dist/shared/components/item-edit/config-update.js +6 -0
- package/dist/shared/components/item-edit/layout-editing-quiet.js +25 -0
- package/dist/shared/components/layout-editor/AddPanel.js +301 -0
- package/dist/shared/components/layout-editor/DesignNode.js +173 -0
- package/dist/shared/components/layout-editor/EditorCanvas.js +52 -0
- package/dist/shared/components/layout-editor/EditorTopBar.js +241 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +179 -0
- package/dist/shared/components/layout-editor/LayoutEditor.js +393 -0
- package/dist/shared/components/layout-editor/LayoutsRail.js +89 -0
- package/dist/shared/components/layout-editor/add-target.js +103 -0
- package/dist/shared/components/layout-editor/bundle-to-active.js +86 -0
- package/dist/shared/components/layout-editor/canvases/PdfCanvas.js +90 -0
- package/dist/shared/components/layout-editor/canvases/TableColumnsCanvas.js +246 -0
- package/dist/shared/components/layout-editor/collection-meta.js +22 -0
- package/dist/shared/components/layout-editor/design-canvas.js +81 -0
- package/dist/shared/components/layout-editor/design-context.js +21 -0
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +225 -0
- package/dist/shared/components/layout-editor/dnd/collision.js +107 -0
- package/dist/shared/components/layout-editor/dnd/node.js +164 -0
- package/dist/shared/components/layout-editor/dnd/order.js +122 -0
- package/dist/shared/components/layout-editor/editors/DefaultValuesEditor.js +223 -0
- package/dist/shared/components/layout-editor/editors/QuickPickerStepsEditor.js +129 -0
- package/dist/shared/components/layout-editor/editors/ReadPresentationEditor.js +134 -0
- package/dist/shared/components/layout-editor/editors/RecordConditionsEditor.js +249 -0
- package/dist/shared/components/layout-editor/editors/RolesPicker.js +77 -0
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +556 -0
- package/dist/shared/components/layout-editor/editors/cascade-rule-row.js +150 -0
- package/dist/shared/components/layout-editor/editors/controls.js +73 -0
- package/dist/shared/components/layout-editor/editors/editor-api.js +21 -0
- package/dist/shared/components/layout-editor/editors/editor-queries.js +25 -0
- package/dist/shared/components/layout-editor/editors/field-default-value.js +131 -0
- package/dist/shared/components/layout-editor/editors/grid-presets.js +310 -0
- package/dist/shared/components/layout-editor/editors/inline-display.js +157 -0
- package/dist/shared/components/layout-editor/editors/layout-picker.js +80 -0
- package/dist/shared/components/layout-editor/editors/layout-rows.js +55 -0
- package/dist/shared/components/layout-editor/editors/lock-conditions.js +109 -0
- package/dist/shared/components/layout-editor/editors/o2m-agg-field.js +25 -0
- package/dist/shared/components/layout-editor/editors/pdf-field-config.js +107 -0
- package/dist/shared/components/layout-editor/editors/report-widget-config.js +94 -0
- package/dist/shared/components/layout-editor/editors/row-rule-check.js +225 -0
- package/dist/shared/components/layout-editor/editors/row-rule-row.js +1353 -0
- package/dist/shared/components/layout-editor/editors/swap-config.js +245 -0
- package/dist/shared/components/layout-editor/focus-buffer.js +32 -0
- package/dist/shared/components/layout-editor/host.js +15 -0
- package/dist/shared/components/layout-editor/inspector/AdvancedTab.js +296 -0
- package/dist/shared/components/layout-editor/inspector/GridTab.js +767 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +456 -0
- package/dist/shared/components/layout-editor/inspector/HeaderItemInspector.js +268 -0
- package/dist/shared/components/layout-editor/inspector/Inspector.js +332 -0
- package/dist/shared/components/layout-editor/inspector/LookTab.js +310 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +333 -0
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +323 -0
- package/dist/shared/components/layout-editor/inspector/SlotInspector.js +179 -0
- package/dist/shared/components/layout-editor/inspector/SubtitleInspector.js +154 -0
- package/dist/shared/components/layout-editor/inspector/WidgetInspector.js +262 -0
- package/dist/shared/components/layout-editor/inspector/applies.js +27 -0
- package/dist/shared/components/layout-editor/inspector/field-context.js +134 -0
- package/dist/shared/components/layout-editor/inspector/interfaces.js +126 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +595 -0
- package/dist/shared/components/layout-editor/inspector/model.js +307 -0
- package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -0
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +121 -0
- package/dist/shared/components/layout-editor/overview/overview-api.js +141 -0
- package/dist/shared/components/layout-editor/overview/purpose.js +62 -0
- package/dist/shared/components/layout-editor/overview/record-count.js +65 -0
- package/dist/shared/components/layout-editor/panel-frame.js +99 -0
- package/dist/shared/components/layout-editor/panel-style.js +19 -0
- package/dist/shared/components/layout-editor/pickers/field-picker.js +230 -0
- package/dist/shared/components/layout-editor/pickers/icon-picker.js +233 -0
- package/dist/shared/components/layout-editor/pickers/relation-label.js +34 -0
- package/dist/shared/components/layout-editor/pickers/relation-picker.js +136 -0
- package/dist/shared/components/layout-editor/record-queries.js +15 -0
- package/dist/shared/components/layout-editor/settings/AddendumSection.js +52 -0
- package/dist/shared/components/layout-editor/settings/ButtonsSection.js +45 -0
- package/dist/shared/components/layout-editor/settings/DefaultsSection.js +67 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +146 -0
- package/dist/shared/components/layout-editor/settings/InheritanceSection.js +37 -0
- package/dist/shared/components/layout-editor/settings/LayoutSection.js +70 -0
- package/dist/shared/components/layout-editor/settings/PdfSection.js +176 -0
- package/dist/shared/components/layout-editor/settings/ReadSection.js +79 -0
- package/dist/shared/components/layout-editor/settings/TextSetting.js +55 -0
- package/dist/shared/components/layout-editor/settings/ToggleSetting.js +33 -0
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +179 -0
- package/dist/shared/components/layout-editor/settings/WhoSection.js +213 -0
- package/dist/shared/components/layout-editor/settings/controls.js +214 -0
- package/dist/shared/components/layout-editor/settings/section-props.js +17 -0
- package/dist/shared/components/layout-editor/settings/settings-api.js +151 -0
- package/dist/shared/components/layout-editor/settings/settings-registry.js +445 -0
- package/dist/shared/components/layout-editor/slot-names.js +20 -0
- package/dist/shared/components/layout-editor/summary-pref.js +21 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +474 -0
- package/dist/shared/components/pipeline/relations.js +28 -23
- package/dist/shared/components/ui/popover.js +17 -17
- package/dist/shared/components/ui/scroll-area.js +38 -0
- package/dist/shared/hooks/useRelationOptions.js +60 -0
- package/dist/shared/lib/layout-grants.js +9 -0
- package/dist/shared/lib/layout-ops.js +348 -0
- package/dist/shared/lib/layout-slots.js +11 -7
- package/dist/shared/lib/request-gate.js +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
const y = [
|
|
2
|
+
{ id: "who", title: "Who gets this form" },
|
|
3
|
+
{ id: "layout", title: "How it's laid out" },
|
|
4
|
+
{ id: "buttons", title: "Buttons & panels" },
|
|
5
|
+
{ id: "read", title: "Read view & summary" },
|
|
6
|
+
{ id: "pdf", title: "PDF" },
|
|
7
|
+
{ id: "addendum", title: "Addendum" },
|
|
8
|
+
{ id: "defaults", title: "Defaults for new records" },
|
|
9
|
+
{ id: "inheritance", title: "Inheritance" },
|
|
10
|
+
{ id: "tools", title: "AI review, previews, version history" }
|
|
11
|
+
], o = ["grouped", "table", "file", "addendum", "detail", "summary"], t = ["grouped", "table", "detail", "summary"], n = ["grouped", "detail", "summary"], r = ["grouped"], c = [
|
|
12
|
+
// ── Who gets this form ────────────────────────────────────────────────────
|
|
13
|
+
{
|
|
14
|
+
key: "layout.layout_type",
|
|
15
|
+
section: "who",
|
|
16
|
+
label: "Kind of layout",
|
|
17
|
+
effect: "Decides where this layout is used: the record form, read mode, a drill-down, a PDF, an addendum or grid columns.",
|
|
18
|
+
types: o,
|
|
19
|
+
keywords: "make default fallback active"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: "layout.record_conditions",
|
|
23
|
+
section: "who",
|
|
24
|
+
label: "Show for matching records",
|
|
25
|
+
effect: "Records that match every rule open with this form instead of the default.",
|
|
26
|
+
types: ["grouped"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "layout.conditions.role_ids",
|
|
30
|
+
section: "who",
|
|
31
|
+
label: "Roles",
|
|
32
|
+
effect: "Only people in these roles get this layout. With no roles, everyone can.",
|
|
33
|
+
types: o
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "layout.slug",
|
|
37
|
+
section: "who",
|
|
38
|
+
label: "Link name",
|
|
39
|
+
effect: "Lets links, buttons and code open this exact layout (?layout=…). Letters, digits and _ only.",
|
|
40
|
+
types: o
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: "layout.create_label",
|
|
44
|
+
section: "who",
|
|
45
|
+
label: "New-menu label",
|
|
46
|
+
effect: "The name shown in the New menu of the collection list. Empty uses the layout name.",
|
|
47
|
+
types: r
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: "layout.create_hidden",
|
|
51
|
+
section: "who",
|
|
52
|
+
label: "Hide from New menu",
|
|
53
|
+
effect: "Leaves this layout out of the New menu; its link name keeps working.",
|
|
54
|
+
types: r
|
|
55
|
+
},
|
|
56
|
+
// ── How it's laid out ─────────────────────────────────────────────────────
|
|
57
|
+
{
|
|
58
|
+
key: "layout.tab_mode",
|
|
59
|
+
section: "layout",
|
|
60
|
+
label: "Loose tabs show as",
|
|
61
|
+
effect: "How tabs outside a tab container appear: side by side, or as numbered steps. Tab containers set their own.",
|
|
62
|
+
types: ["grouped", "addendum"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "layout.validate_before_next",
|
|
66
|
+
section: "layout",
|
|
67
|
+
label: "Check each step before Next",
|
|
68
|
+
effect: "In steps, Next stays blocked until the current step's required fields are filled.",
|
|
69
|
+
types: ["grouped", "addendum"]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "layout.accordion_mode",
|
|
73
|
+
section: "layout",
|
|
74
|
+
label: "One section open at a time",
|
|
75
|
+
effect: "Opening a section closes the others.",
|
|
76
|
+
types: t
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: "layout.row_order_field",
|
|
80
|
+
section: "layout",
|
|
81
|
+
label: "Let people reorder rows",
|
|
82
|
+
effect: "Rows get a drag handle and their order is saved into the number field you pick.",
|
|
83
|
+
types: ["table"]
|
|
84
|
+
},
|
|
85
|
+
// ── Buttons & panels ──────────────────────────────────────────────────────
|
|
86
|
+
{
|
|
87
|
+
key: "layout.ai_enabled",
|
|
88
|
+
section: "buttons",
|
|
89
|
+
label: "AI buttons",
|
|
90
|
+
effect: "Shows the AI fill and summarise buttons on records opened with this layout.",
|
|
91
|
+
types: t
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
key: "layout.dossier_enabled",
|
|
95
|
+
section: "buttons",
|
|
96
|
+
label: "Dossier button",
|
|
97
|
+
effect: "Adds a Dossier button on saved records: one PDF with values, workflow history, comments and tasks. Only the default form's switch counts.",
|
|
98
|
+
types: n
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "layout.dossier_label",
|
|
102
|
+
section: "buttons",
|
|
103
|
+
label: "Dossier button label",
|
|
104
|
+
effect: "Text on the Dossier button. Empty shows “Dossier”. Only the default form's label counts.",
|
|
105
|
+
types: n
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: "layout.disable_comments",
|
|
109
|
+
section: "buttons",
|
|
110
|
+
label: "Hide comments",
|
|
111
|
+
effect: "Removes the comments panel.",
|
|
112
|
+
types: t
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
key: "layout.disable_tasks",
|
|
116
|
+
section: "buttons",
|
|
117
|
+
label: "Hide tasks",
|
|
118
|
+
effect: "Removes the tasks panel.",
|
|
119
|
+
types: t
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: "layout.disable_revisions",
|
|
123
|
+
section: "buttons",
|
|
124
|
+
label: "Hide revisions",
|
|
125
|
+
effect: "Removes the revision history panel.",
|
|
126
|
+
types: t
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
key: "layout.disable_clone",
|
|
130
|
+
section: "buttons",
|
|
131
|
+
label: "Hide Clone button",
|
|
132
|
+
effect: "People cannot copy a record from here.",
|
|
133
|
+
types: t
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
key: "layout.disable_delete",
|
|
137
|
+
section: "buttons",
|
|
138
|
+
label: "Hide Delete button",
|
|
139
|
+
effect: "People cannot delete a record from here.",
|
|
140
|
+
types: t
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
key: "layout.hide_integrity_banner",
|
|
144
|
+
section: "buttons",
|
|
145
|
+
label: "Hide data-integrity banner",
|
|
146
|
+
effect: "Records with data-integrity findings no longer show the warning strip.",
|
|
147
|
+
types: t
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "layout.hide_sla_banner",
|
|
151
|
+
section: "buttons",
|
|
152
|
+
label: "Hide SLA banner",
|
|
153
|
+
effect: "Records past an SLA no longer show the breach strip.",
|
|
154
|
+
types: t
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
key: "layout.changes_tray",
|
|
158
|
+
section: "buttons",
|
|
159
|
+
label: "Unsaved-changes tray",
|
|
160
|
+
effect: "Lists every unsaved field and line while editing, each with its own undo.",
|
|
161
|
+
types: t
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: "layout.allow_schedule",
|
|
165
|
+
section: "buttons",
|
|
166
|
+
label: "Schedule button for everyone",
|
|
167
|
+
effect: "Everyone who can edit may schedule a change for later, not only admins.",
|
|
168
|
+
types: t
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: "layout.allow_disable_pickers",
|
|
172
|
+
section: "buttons",
|
|
173
|
+
label: "Hide-from-pickers button for everyone",
|
|
174
|
+
effect: "Everyone who can edit may hide a record from pickers, not only admins.",
|
|
175
|
+
types: t
|
|
176
|
+
},
|
|
177
|
+
// ── Read view & summary ───────────────────────────────────────────────────
|
|
178
|
+
{
|
|
179
|
+
key: "layout.summary_enabled",
|
|
180
|
+
section: "read",
|
|
181
|
+
label: "Summary side panel",
|
|
182
|
+
effect: "Shows a side panel with the summary fields beside the form.",
|
|
183
|
+
types: n
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: "layout.summary_hide_empty",
|
|
187
|
+
section: "read",
|
|
188
|
+
label: "Summary: hide empty fields",
|
|
189
|
+
effect: "Fields with no value are left out of the summary panel.",
|
|
190
|
+
types: n
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
key: "layout.display_mode",
|
|
194
|
+
section: "read",
|
|
195
|
+
label: "Drill-down opens as",
|
|
196
|
+
effect: "Whether a drill-down shows this layout as an editable form or as a read view.",
|
|
197
|
+
types: ["detail"]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
key: "layout.sheet_width",
|
|
201
|
+
section: "read",
|
|
202
|
+
label: "Read view width",
|
|
203
|
+
effect: "Width of the read view sheet in pixels, 320 to 2000. Empty uses 640.",
|
|
204
|
+
types: ["detail", "summary"]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
key: "layout.header_fields",
|
|
208
|
+
section: "read",
|
|
209
|
+
label: "Header band fields",
|
|
210
|
+
effect: "Up to 8 fields shown in the band at the top of the read view. The first is the title.",
|
|
211
|
+
types: ["detail", "summary"]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
key: "layout.hide_empty",
|
|
215
|
+
section: "read",
|
|
216
|
+
label: "Hide empty values",
|
|
217
|
+
effect: "Fields with no value are left out of the read view.",
|
|
218
|
+
types: ["detail", "summary"]
|
|
219
|
+
},
|
|
220
|
+
// ── PDF ───────────────────────────────────────────────────────────────────
|
|
221
|
+
{
|
|
222
|
+
key: "layout.pdf_export_active",
|
|
223
|
+
section: "pdf",
|
|
224
|
+
label: "PDF button on records",
|
|
225
|
+
effect: "Records show a button that downloads this PDF. Several PDF layouts can be on at once.",
|
|
226
|
+
types: ["file"]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
key: "layout.pdf_theme",
|
|
230
|
+
section: "pdf",
|
|
231
|
+
label: "Theme",
|
|
232
|
+
effect: "The look of the generated PDF.",
|
|
233
|
+
types: ["file"]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
key: "layout.pdf_template_id",
|
|
237
|
+
section: "pdf",
|
|
238
|
+
label: "Custom template",
|
|
239
|
+
effect: "Builds the PDF from one of your PDF templates instead of a built-in theme.",
|
|
240
|
+
types: ["file"]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
key: "layout.pdf_cover_enabled",
|
|
244
|
+
section: "pdf",
|
|
245
|
+
label: "Cover page",
|
|
246
|
+
effect: "Starts the PDF with a cover page.",
|
|
247
|
+
types: ["file"]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
key: "layout.pdf_cover_title_field",
|
|
251
|
+
section: "pdf",
|
|
252
|
+
label: "Cover title",
|
|
253
|
+
effect: "The field whose value becomes the cover's title.",
|
|
254
|
+
types: ["file"]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
key: "layout.pdf_cover_subtitle",
|
|
258
|
+
section: "pdf",
|
|
259
|
+
label: "Cover subtitle",
|
|
260
|
+
effect: "Fixed text printed under the cover title.",
|
|
261
|
+
types: ["file"]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
key: "layout.pdf_button_label",
|
|
265
|
+
section: "pdf",
|
|
266
|
+
label: "Button label",
|
|
267
|
+
effect: "Text on the download button. Empty shows “Download PDF”.",
|
|
268
|
+
types: ["file"]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
key: "layout.pdf_show_logo",
|
|
272
|
+
section: "pdf",
|
|
273
|
+
label: "Include logo",
|
|
274
|
+
effect: "Prints the logo at the top of the PDF.",
|
|
275
|
+
types: ["file"]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
key: "layout.pdf_page_size",
|
|
279
|
+
section: "pdf",
|
|
280
|
+
label: "Page size",
|
|
281
|
+
effect: "A4 or US Letter paper.",
|
|
282
|
+
types: ["file"]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
key: "layout.pdf_orientation",
|
|
286
|
+
section: "pdf",
|
|
287
|
+
label: "Orientation",
|
|
288
|
+
effect: "Portrait or landscape pages.",
|
|
289
|
+
types: ["file"]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
key: "layout.pdf_preview",
|
|
293
|
+
section: "pdf",
|
|
294
|
+
label: "Preview PDF",
|
|
295
|
+
effect: "Opens the PDF this layout makes, filled with sample values, in a new tab.",
|
|
296
|
+
types: ["file"]
|
|
297
|
+
},
|
|
298
|
+
// ── Addendum ──────────────────────────────────────────────────────────────
|
|
299
|
+
{
|
|
300
|
+
key: "layout.workflow_template_id",
|
|
301
|
+
section: "addendum",
|
|
302
|
+
label: "Addendum workflow",
|
|
303
|
+
effect: "The workflow every addendum made with this form goes through.",
|
|
304
|
+
types: ["addendum"]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
key: "layout.single_active_addendum",
|
|
308
|
+
section: "addendum",
|
|
309
|
+
label: "One addendum at a time",
|
|
310
|
+
effect: "A new addendum cannot start while another one on the record is still open.",
|
|
311
|
+
types: ["addendum"]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
key: "layout.addendum_layout_id",
|
|
315
|
+
section: "addendum",
|
|
316
|
+
label: "Addendum form",
|
|
317
|
+
effect: "The form people use to raise an addendum on these records. Empty uses the collection's default addendum form.",
|
|
318
|
+
types: ["grouped"]
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
key: "layout.addendum_default_view",
|
|
322
|
+
section: "addendum",
|
|
323
|
+
label: "Open on the addendum's changes",
|
|
324
|
+
effect: "A record with an open addendum opens on its proposed changes first.",
|
|
325
|
+
types: ["grouped"]
|
|
326
|
+
},
|
|
327
|
+
// ── Defaults for new records ──────────────────────────────────────────────
|
|
328
|
+
{
|
|
329
|
+
key: "layout.default_values",
|
|
330
|
+
section: "defaults",
|
|
331
|
+
label: "Starting values",
|
|
332
|
+
effect: "Filled in on every new record made with this form; people can still change them.",
|
|
333
|
+
types: ["grouped", "addendum"]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
key: "layout.quick_picker",
|
|
337
|
+
section: "defaults",
|
|
338
|
+
label: "Quick picker steps",
|
|
339
|
+
effect: "Before a new record opens, people pick these fields one at a time, each narrowed by the ones before.",
|
|
340
|
+
types: t
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
key: "layout.quick_picker_seed",
|
|
344
|
+
section: "defaults",
|
|
345
|
+
label: "Fill steps from cascade rules",
|
|
346
|
+
effect: "Replaces the steps with the cascade chain of this collection, parents first.",
|
|
347
|
+
types: t
|
|
348
|
+
},
|
|
349
|
+
// ── Inheritance ───────────────────────────────────────────────────────────
|
|
350
|
+
{
|
|
351
|
+
key: "layout.parent_layout_id",
|
|
352
|
+
section: "inheritance",
|
|
353
|
+
label: "Inherit from",
|
|
354
|
+
effect: "Fields this layout does not place come from the layout you pick (same collection, one level).",
|
|
355
|
+
types: o
|
|
356
|
+
},
|
|
357
|
+
// ── AI review, previews, version history ──────────────────────────────────
|
|
358
|
+
{
|
|
359
|
+
key: "tool.preview_record",
|
|
360
|
+
section: "tools",
|
|
361
|
+
label: "Preview with a record",
|
|
362
|
+
effect: "Opens a real record with this layout in a new tab.",
|
|
363
|
+
types: o
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
key: "tool.preview_as_role",
|
|
367
|
+
section: "tools",
|
|
368
|
+
label: "Preview as role",
|
|
369
|
+
effect: "Shows which layout someone in a role gets and which fields they cannot see or edit.",
|
|
370
|
+
types: o
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
key: "tool.describe",
|
|
374
|
+
section: "tools",
|
|
375
|
+
label: "Describe this layout",
|
|
376
|
+
effect: "A short plain-words description of what this layout does and who sees it.",
|
|
377
|
+
types: o
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
key: "tool.ai_review",
|
|
381
|
+
section: "tools",
|
|
382
|
+
label: "Review this layout",
|
|
383
|
+
effect: "AI looks for problems (missing required fields, odd order) and offers fixes you can undo.",
|
|
384
|
+
types: o
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
key: "tool.version_history",
|
|
388
|
+
section: "tools",
|
|
389
|
+
label: "Version history",
|
|
390
|
+
effect: "Every save keeps a version of the layout.",
|
|
391
|
+
types: o
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
key: "tool.version_diff",
|
|
395
|
+
section: "tools",
|
|
396
|
+
label: "What changed",
|
|
397
|
+
effect: "Compares the last save, or any version, with the layout now.",
|
|
398
|
+
types: o
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
key: "tool.version_restore",
|
|
402
|
+
section: "tools",
|
|
403
|
+
label: "Restore a version",
|
|
404
|
+
effect: "Puts the layout back exactly as a version was; the current one is kept as a version.",
|
|
405
|
+
types: o
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
key: "tool.layout_drift",
|
|
409
|
+
section: "tools",
|
|
410
|
+
label: "Layout drift",
|
|
411
|
+
effect: "Checks whether something outside the editor changed this layout since its last save.",
|
|
412
|
+
types: o
|
|
413
|
+
}
|
|
414
|
+
], f = new Map(c.map((e) => [e.key, e]));
|
|
415
|
+
function h(e) {
|
|
416
|
+
return f.get(e);
|
|
417
|
+
}
|
|
418
|
+
function p(e) {
|
|
419
|
+
const s = e == null ? void 0 : e.layout_type;
|
|
420
|
+
return s === "table" || s === "file" || s === "addendum" || s === "detail" || s === "summary" ? s : "grouped";
|
|
421
|
+
}
|
|
422
|
+
function u(e, s) {
|
|
423
|
+
const a = s.toLowerCase().split(/\s+/).filter(Boolean);
|
|
424
|
+
if (a.length === 0) return !0;
|
|
425
|
+
const l = `${e.label} ${e.effect} ${e.key} ${e.keywords ?? ""}`.toLowerCase();
|
|
426
|
+
return a.every((i) => l.includes(i));
|
|
427
|
+
}
|
|
428
|
+
function m(e, s = "") {
|
|
429
|
+
const a = [];
|
|
430
|
+
for (const l of y) {
|
|
431
|
+
const i = c.filter(
|
|
432
|
+
(d) => d.section === l.id && d.types.includes(e) && u(d, s)
|
|
433
|
+
);
|
|
434
|
+
i.length && a.push({ section: l, settings: i });
|
|
435
|
+
}
|
|
436
|
+
return a;
|
|
437
|
+
}
|
|
438
|
+
export {
|
|
439
|
+
y as SECTIONS,
|
|
440
|
+
c as SETTINGS,
|
|
441
|
+
p as layoutKindOf,
|
|
442
|
+
u as matchesQuery,
|
|
443
|
+
h as settingDef,
|
|
444
|
+
m as visibleSections
|
|
445
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { titleCase as t } from "../../lib/utils.js";
|
|
2
|
+
const r = {
|
|
3
|
+
__pipeline__: "Pipeline",
|
|
4
|
+
__comments__: "Comments",
|
|
5
|
+
__tasks__: "Tasks",
|
|
6
|
+
__owners__: "Owners",
|
|
7
|
+
__pdf__: "PDF button",
|
|
8
|
+
__subtitle__: "Subtitle",
|
|
9
|
+
__addendums__: "Addendums",
|
|
10
|
+
__referenced_by__: "Referenced by",
|
|
11
|
+
__related_records__: "Related records"
|
|
12
|
+
};
|
|
13
|
+
function s(_) {
|
|
14
|
+
if (r[_]) return r[_];
|
|
15
|
+
const e = _.match(/^__ext_([a-z][a-z0-9-]*)__$/);
|
|
16
|
+
return e ? t(e[1].replace(/-/g, "_")) : /^__widget_\d+__$/.test(_) ? "Widget" : t(_.replace(/^_+|_+$/g, ""));
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
s as slotName
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const o = "nvr:layout-editor:summary-collapsed", n = (t) => t ? `${o}:${t}` : o;
|
|
2
|
+
function r(t) {
|
|
3
|
+
try {
|
|
4
|
+
const e = window.localStorage.getItem(n(t));
|
|
5
|
+
return e === "1" ? !0 : e === "0" ? !1 : null;
|
|
6
|
+
} catch {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const l = 720;
|
|
11
|
+
function a(t, e) {
|
|
12
|
+
try {
|
|
13
|
+
window.localStorage.setItem(n(t), e ? "1" : "0");
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
l as DESIGN_SUMMARY_MIN_CANVAS,
|
|
19
|
+
r as readDesignSummaryCollapsed,
|
|
20
|
+
a as writeDesignSummaryCollapsed
|
|
21
|
+
};
|