@nivaro/react 0.2.53 → 0.2.55
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 +99 -98
- package/dist/index.d.ts +452 -4
- package/dist/index.js +644 -618
- package/dist/layout-editor.d.ts +252 -2
- package/dist/shared/components/BackgroundRunOffer.js +117 -0
- package/dist/shared/components/BroadcastView.js +214 -213
- package/dist/shared/components/CollectionBrowserView.js +2592 -2695
- package/dist/shared/components/FormWhatsNew.js +60 -0
- package/dist/shared/components/ItemEditForm.js +3968 -3618
- package/dist/shared/components/JobsTray.js +100 -55
- package/dist/shared/components/MyWorkView.js +91 -89
- package/dist/shared/components/NotificationBell.js +80 -79
- package/dist/shared/components/ProfileView.js +568 -520
- package/dist/shared/components/RecordCompare.js +254 -0
- package/dist/shared/components/RecordReadView.js +598 -543
- package/dist/shared/components/ReportView.js +578 -543
- package/dist/shared/components/RowPresence.js +91 -0
- package/dist/shared/components/TipLayer.js +27 -27
- package/dist/shared/components/WidgetSlot.js +474 -458
- package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
- package/dist/shared/components/ai/AskPanel.js +139 -119
- package/dist/shared/components/ai/FirstWeekCard.js +126 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
- package/dist/shared/components/bulk/bulk-field-options.js +45 -0
- package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
- package/dist/shared/components/chat/ChannelArchive.js +326 -0
- package/dist/shared/components/chat/ChannelExtras.js +141 -121
- package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
- package/dist/shared/components/chat/ChatPanel.js +1695 -1733
- package/dist/shared/components/chat/Composer.js +357 -303
- package/dist/shared/components/chat/MessageActions.js +92 -0
- package/dist/shared/components/chat/MessageFormat.js +290 -264
- package/dist/shared/components/chat/OutboxBubbles.js +146 -0
- package/dist/shared/components/chat/RequestIdCard.js +135 -0
- package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
- package/dist/shared/components/chat/RoomParts.js +213 -274
- package/dist/shared/components/chat/ScreenClip.js +184 -0
- package/dist/shared/components/chat/chat-core.js +402 -483
- package/dist/shared/components/chat/chat-drafts.js +59 -0
- package/dist/shared/components/chat/chat-emoji.js +348 -0
- package/dist/shared/components/chat/chat-local-time.js +41 -0
- package/dist/shared/components/chat/chat-outbox.js +303 -0
- package/dist/shared/components/chat/chat-window.js +163 -0
- package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
- package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
- package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
- package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
- package/dist/shared/components/help-videos/api.js +80 -67
- package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
- package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
- package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
- package/dist/shared/components/item-edit/FieldAffordances.js +9 -8
- package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
- package/dist/shared/components/item-edit/FieldRow.js +382 -320
- package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
- package/dist/shared/components/item-edit/GroupSection.js +786 -639
- package/dist/shared/components/item-edit/HeaderTools.js +59 -56
- package/dist/shared/components/item-edit/InlineTableField.js +3 -1
- package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
- package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
- package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
- package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
- package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
- package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
- package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
- package/dist/shared/components/item-edit/lazy-sections.js +36 -0
- package/dist/shared/components/item-edit/lock-why.js +94 -0
- package/dist/shared/components/item-edit/picker-miss.js +26 -0
- package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +65 -0
- package/dist/shared/components/layout-editor/AddPanel.js +226 -151
- package/dist/shared/components/layout-editor/ArrangeButton.js +34 -0
- package/dist/shared/components/layout-editor/AutoArrange.js +86 -0
- package/dist/shared/components/layout-editor/CanvasCompare.js +79 -0
- package/dist/shared/components/layout-editor/ChangeNote.js +147 -0
- package/dist/shared/components/layout-editor/CollabParts.js +175 -0
- package/dist/shared/components/layout-editor/DesignNode.js +311 -116
- package/dist/shared/components/layout-editor/EditorCanvas.js +30 -26
- package/dist/shared/components/layout-editor/EditorTopBar.js +463 -175
- package/dist/shared/components/layout-editor/FindReplace.js +188 -0
- package/dist/shared/components/layout-editor/FormMapButton.js +141 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +250 -109
- package/dist/shared/components/layout-editor/LayoutEditor.js +1196 -305
- package/dist/shared/components/layout-editor/LayoutsRail.js +94 -67
- package/dist/shared/components/layout-editor/NoteMarker.js +38 -0
- package/dist/shared/components/layout-editor/PlacementsTable.js +187 -0
- package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
- package/dist/shared/components/layout-editor/ScheduleChange.js +106 -0
- package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
- package/dist/shared/components/layout-editor/StagedChip.js +22 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +464 -0
- package/dist/shared/components/layout-editor/UnsavedConfirm.js +103 -0
- package/dist/shared/components/layout-editor/ai/AiToolsButton.js +625 -0
- package/dist/shared/components/layout-editor/ai/ChangeCheck.js +153 -0
- package/dist/shared/components/layout-editor/ai/ai-tools-api.js +80 -0
- package/dist/shared/components/layout-editor/ai/assist-ops.js +38 -0
- package/dist/shared/components/layout-editor/ai/autofill-ops.js +73 -0
- package/dist/shared/components/layout-editor/ai/canvas-capture.js +41 -0
- package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +271 -0
- package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +182 -0
- package/dist/shared/components/layout-editor/ai-forms/MeaningSuggestions.js +109 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +170 -0
- package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +40 -0
- package/dist/shared/components/layout-editor/ai-forms/pending.js +25 -0
- package/dist/shared/components/layout-editor/ai-forms/plan.js +263 -0
- package/dist/shared/components/layout-editor/ai-rules/AiAskPopover.js +160 -0
- package/dist/shared/components/layout-editor/ai-rules/CascadeWriter.js +175 -0
- package/dist/shared/components/layout-editor/ai-rules/FieldRuleWriter.js +97 -0
- package/dist/shared/components/layout-editor/ai-rules/RuleWriter.js +94 -0
- package/dist/shared/components/layout-editor/ai-rules/ValidationSuggest.js +153 -0
- package/dist/shared/components/layout-editor/ai-rules/api.js +6 -0
- package/dist/shared/components/layout-editor/ai-text/AiTextTools.js +383 -0
- package/dist/shared/components/layout-editor/ai-text/text-ops.js +125 -0
- package/dist/shared/components/layout-editor/assist/AskPanel.js +278 -0
- package/dist/shared/components/layout-editor/assist/ExplainDiff.js +93 -0
- package/dist/shared/components/layout-editor/assist/ProposalsButton.js +150 -0
- package/dist/shared/components/layout-editor/assist/assist-api.js +63 -0
- package/dist/shared/components/layout-editor/assist/jump.js +142 -0
- package/dist/shared/components/layout-editor/assist/settings-index.js +118 -0
- package/dist/shared/components/layout-editor/auto-arrange.js +101 -0
- package/dist/shared/components/layout-editor/bulk/BulkChangesButton.js +221 -0
- package/dist/shared/components/layout-editor/bulk/BulkRun.js +237 -0
- package/dist/shared/components/layout-editor/bulk/MacrosPanel.js +230 -0
- package/dist/shared/components/layout-editor/bulk/bulk-api.js +65 -0
- package/dist/shared/components/layout-editor/bulk/field-labels.js +22 -0
- package/dist/shared/components/layout-editor/bulk/macro-record.js +142 -0
- package/dist/shared/components/layout-editor/bulk/useMacroRecorder.js +65 -0
- package/dist/shared/components/layout-editor/bundle-to-active.js +1 -0
- package/dist/shared/components/layout-editor/canvas-diff.js +157 -0
- package/dist/shared/components/layout-editor/collab/FormFollowShare.js +388 -0
- package/dist/shared/components/layout-editor/collab/collab-api.js +80 -0
- package/dist/shared/components/layout-editor/commands/CommandPalette.js +221 -0
- package/dist/shared/components/layout-editor/commands/intents.js +214 -0
- package/dist/shared/components/layout-editor/commands/parse.js +242 -0
- package/dist/shared/components/layout-editor/design-context.js +26 -6
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +181 -164
- package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
- package/dist/shared/components/layout-editor/dnd/node.js +69 -57
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
- package/dist/shared/components/layout-editor/draft-recovery.js +131 -0
- package/dist/shared/components/layout-editor/editor-notes.js +78 -0
- package/dist/shared/components/layout-editor/editors/swap-config.js +1 -0
- package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
- package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
- package/dist/shared/components/layout-editor/entry/presets.js +71 -0
- package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
- package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
- package/dist/shared/components/layout-editor/explain/CanvasRules.js +142 -0
- package/dist/shared/components/layout-editor/explain/default-ghosts.js +81 -0
- package/dist/shared/components/layout-editor/explain/driver-hover.js +62 -0
- package/dist/shared/components/layout-editor/explain/field-sources.js +246 -0
- package/dist/shared/components/layout-editor/explain/rule-graph.js +215 -0
- package/dist/shared/components/layout-editor/explain/use-explain.js +132 -0
- package/dist/shared/components/layout-editor/field-zones.js +116 -0
- package/dist/shared/components/layout-editor/form-map.js +138 -0
- package/dist/shared/components/layout-editor/grid-guides.js +142 -0
- package/dist/shared/components/layout-editor/history-api.js +87 -0
- package/dist/shared/components/layout-editor/inheritance.js +55 -0
- package/dist/shared/components/layout-editor/inspect/inspect-api.js +66 -0
- package/dist/shared/components/layout-editor/inspect/picker-preview.js +48 -0
- package/dist/shared/components/layout-editor/inspect/width-fit.js +87 -0
- package/dist/shared/components/layout-editor/inspector/AiFillSetting.js +85 -0
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +36 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +179 -0
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +291 -141
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
- package/dist/shared/components/layout-editor/inspector/Inspector.js +282 -180
- package/dist/shared/components/layout-editor/inspector/LookTab.js +166 -109
- package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
- package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +146 -118
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +162 -111
- package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +71 -70
- package/dist/shared/components/layout-editor/inspector/tab-request.js +21 -0
- package/dist/shared/components/layout-editor/is-typing.js +9 -0
- package/dist/shared/components/layout-editor/keyboard-move.js +66 -0
- package/dist/shared/components/layout-editor/lint/LintPanel.js +190 -0
- package/dist/shared/components/layout-editor/lint/lint-api.js +52 -0
- package/dist/shared/components/layout-editor/load-error.js +37 -0
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +305 -0
- package/dist/shared/components/layout-editor/matrix/MatrixGrid.js +181 -0
- package/dist/shared/components/layout-editor/matrix/RoleSectionMatrix.js +147 -0
- package/dist/shared/components/layout-editor/matrix/matrix-api.js +48 -0
- package/dist/shared/components/layout-editor/matrix/role-matrix.js +36 -0
- package/dist/shared/components/layout-editor/matrix/state-matrix.js +145 -0
- package/dist/shared/components/layout-editor/nav/FindPanel.js +109 -0
- package/dist/shared/components/layout-editor/nav/NavTools.js +114 -0
- package/dist/shared/components/layout-editor/nav/OutlinePanel.js +228 -0
- package/dist/shared/components/layout-editor/nav/ShortcutSheet.js +31 -0
- package/dist/shared/components/layout-editor/nav/find.js +20 -0
- package/dist/shared/components/layout-editor/nav/tree.js +142 -0
- package/dist/shared/components/layout-editor/nav/useEditorNav.js +101 -0
- package/dist/shared/components/layout-editor/nav/view-prefs.js +34 -0
- package/dist/shared/components/layout-editor/ops/ChangeRequestsPanel.js +143 -0
- package/dist/shared/components/layout-editor/ops/DependencyDiagram.js +179 -0
- package/dist/shared/components/layout-editor/ops/LayoutOpsBlocks.js +92 -0
- package/dist/shared/components/layout-editor/ops/PromotePanel.js +287 -0
- package/dist/shared/components/layout-editor/ops/ops-api.js +122 -0
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
- package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
- package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -3
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +24 -14
- package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
- package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
- package/dist/shared/components/layout-editor/panel-style.js +8 -7
- package/dist/shared/components/layout-editor/parity-keys.json.js +4 -0
- package/dist/shared/components/layout-editor/pin.js +25 -0
- package/dist/shared/components/layout-editor/presence.js +111 -0
- package/dist/shared/components/layout-editor/preview/PreviewModes.js +224 -0
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +262 -0
- package/dist/shared/components/layout-editor/preview/preview-api.js +57 -0
- package/dist/shared/components/layout-editor/preview/preview-model.js +157 -0
- package/dist/shared/components/layout-editor/restore-piece.js +192 -0
- package/dist/shared/components/layout-editor/reuse/FieldMapStep.js +70 -0
- package/dist/shared/components/layout-editor/reuse/FormMoreMenu.js +127 -0
- package/dist/shared/components/layout-editor/reuse/LibraryRows.js +150 -0
- package/dist/shared/components/layout-editor/reuse/NewFormStart.js +20 -0
- package/dist/shared/components/layout-editor/reuse/SectionReuseActions.js +291 -0
- package/dist/shared/components/layout-editor/reuse/field-match.js +77 -0
- package/dist/shared/components/layout-editor/reuse/reuse-api.js +73 -0
- package/dist/shared/components/layout-editor/reuse/seed.js +13 -0
- package/dist/shared/components/layout-editor/reuse/useFormFromRecord.js +43 -0
- package/dist/shared/components/layout-editor/reuse/useRailCopy.js +34 -0
- package/dist/shared/components/layout-editor/section-structure.js +241 -0
- package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +125 -103
- package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +215 -105
- package/dist/shared/components/layout-editor/settings/WhoSection.js +139 -100
- package/dist/shared/components/layout-editor/settings/controls.js +8 -8
- package/dist/shared/components/layout-editor/settings/settings-registry.js +142 -21
- package/dist/shared/components/layout-editor/shortcuts.js +88 -0
- package/dist/shared/components/layout-editor/show-when.js +35 -0
- package/dist/shared/components/layout-editor/slot-names.js +4 -3
- package/dist/shared/components/layout-editor/staged-api.js +64 -0
- package/dist/shared/components/layout-editor/structure-ops.js +403 -0
- package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +556 -0
- package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
- package/dist/shared/components/layout-editor/testing/testing-model.js +406 -0
- package/dist/shared/components/layout-editor/testing/use-record-check.js +44 -0
- package/dist/shared/components/layout-editor/toolbar-kit.js +242 -0
- package/dist/shared/components/layout-editor/unsaved-marks.js +72 -0
- package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
- package/dist/shared/components/layout-editor/usage/FillChip.js +27 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +232 -0
- package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
- package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
- package/dist/shared/components/layout-editor/usage/suggest-sections.js +55 -0
- package/dist/shared/components/layout-editor/usage/usage-api.js +104 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +573 -306
- package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
- package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
- package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
- package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
- package/dist/shared/components/profile/AgentsPanel.js +479 -0
- package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
- package/dist/shared/components/support/SuggestFormChange.js +143 -0
- package/dist/shared/components/support/SupportAnalytics.js +171 -0
- package/dist/shared/components/support/SupportView.js +75 -73
- package/dist/shared/lib/ai-fill.js +37 -0
- package/dist/shared/lib/background-runs.js +150 -0
- package/dist/shared/lib/delivery-ack.js +9 -0
- package/dist/shared/lib/entry-badge-style.js +13 -0
- package/dist/shared/lib/entry-config.js +71 -0
- package/dist/shared/lib/form-sections.js +64 -0
- package/dist/shared/lib/form-structure.js +99 -0
- package/dist/shared/lib/form-usage-beacon.js +133 -0
- package/dist/shared/lib/jobs-tray.js +25 -23
- package/dist/shared/lib/keyset-pager.js +37 -0
- package/dist/shared/lib/layout-i18n.js +66 -0
- package/dist/shared/lib/layout-lint.js +490 -0
- package/dist/shared/lib/layout-ops.js +116 -110
- package/dist/shared/lib/layout-resolve.js +113 -0
- package/dist/shared/lib/placement-behaviour.js +144 -0
- package/dist/shared/lib/prefetch.js +149 -0
- package/dist/shared/lib/presence-hooks.js +199 -0
- package/dist/shared/lib/record-outbox.js +82 -81
- package/dist/shared/lib/replay-socket.js +93 -0
- package/dist/shared/lib/request-gate.js +51 -50
- package/dist/shared/lib/room-gaps.js +96 -0
- package/dist/shared/lib/screenshot.js +54 -28
- package/dist/shared/lib/search-log.js +27 -0
- package/dist/shared/lib/socket-realtime.js +101 -80
- package/dist/shared/lib/visible-when.js +34 -0
- package/dist/shared/lib/worker-socket.js +200 -0
- package/package.json +1 -1
|
@@ -1,206 +1,245 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as u, jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { RecordConditionsEditor as
|
|
4
|
-
import { RolesPicker as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsxs as a, Fragment as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y } from "react";
|
|
3
|
+
import { RecordConditionsEditor as I, RecordConditionsJson as P } from "../editors/RecordConditionsEditor.js";
|
|
4
|
+
import { RolesPicker as z } from "../editors/RolesPicker.js";
|
|
5
|
+
import { DependencyDiagram as w } from "../ops/DependencyDiagram.js";
|
|
6
|
+
import { useLayoutDependencies as L } from "../ops/ops-api.js";
|
|
7
|
+
import { LAYOUT_TYPES as D } from "../overview/OverviewActions.js";
|
|
8
|
+
import { useRoleNames as F } from "../overview/overview-api.js";
|
|
9
|
+
import { roleIdsPatch as Y } from "../testing/testing-model.js";
|
|
10
|
+
import { Setting as p, smallBtn as d, quietText as x, Segmented as j } from "./controls.js";
|
|
11
|
+
import { ActiveDatesSetting as K, PhoneVersionSetting as M } from "./ResolveSettings.js";
|
|
12
|
+
import { changeLabel as _, flag as C } from "./section-props.js";
|
|
13
|
+
import { useFieldSources as U, useCollectionLayoutList as $ } from "./settings-api.js";
|
|
14
|
+
import { layoutKindOf as B } from "./settings-registry.js";
|
|
15
|
+
import { TextSetting as S } from "./TextSetting.js";
|
|
16
|
+
import { ToggleSetting as E } from "./ToggleSetting.js";
|
|
17
|
+
const g = (t) => {
|
|
18
|
+
var e;
|
|
19
|
+
return ((e = D.find((o) => o.type === t)) == null ? void 0 : e.label) ?? t;
|
|
20
|
+
}, G = (t) => t.toLowerCase().replace(/[^a-z0-9_]/g, "_"), v = (t) => t.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
|
|
21
|
+
function J(t) {
|
|
22
|
+
let e = t;
|
|
23
|
+
if (typeof e == "string")
|
|
20
24
|
try {
|
|
21
|
-
|
|
25
|
+
e = JSON.parse(e);
|
|
22
26
|
} catch {
|
|
23
27
|
return [];
|
|
24
28
|
}
|
|
25
|
-
const
|
|
26
|
-
return Array.isArray(
|
|
29
|
+
const o = e == null ? void 0 : e.role_ids;
|
|
30
|
+
return Array.isArray(o) ? o.map(String) : [];
|
|
27
31
|
}
|
|
28
|
-
function
|
|
29
|
-
const { layout:
|
|
32
|
+
function me(t) {
|
|
33
|
+
const { layout: e, collection: o } = t, { fields: c, columns: l, relations: i } = U(o), { data: m = [] } = F(!0), f = J(e.conditions);
|
|
30
34
|
return /* @__PURE__ */ a(u, { children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
35
|
+
/* @__PURE__ */ n(V, { ...t }),
|
|
36
|
+
/* @__PURE__ */ n(
|
|
37
|
+
p,
|
|
34
38
|
{
|
|
35
39
|
k: "layout.record_conditions",
|
|
36
|
-
note: /* @__PURE__ */
|
|
37
|
-
|
|
40
|
+
note: /* @__PURE__ */ n(
|
|
41
|
+
P,
|
|
38
42
|
{
|
|
39
|
-
value:
|
|
40
|
-
onApply: (
|
|
43
|
+
value: e.record_conditions,
|
|
44
|
+
onApply: (s) => t.set({ record_conditions: s }, _("layout.record_conditions"))
|
|
41
45
|
}
|
|
42
46
|
),
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
-
|
|
47
|
+
children: /* @__PURE__ */ n(
|
|
48
|
+
I,
|
|
45
49
|
{
|
|
46
50
|
json: !1,
|
|
47
|
-
collection:
|
|
48
|
-
value:
|
|
49
|
-
fields:
|
|
50
|
-
columns:
|
|
51
|
-
relations:
|
|
52
|
-
onBlur:
|
|
53
|
-
onChange: (
|
|
54
|
-
{ record_conditions:
|
|
55
|
-
|
|
51
|
+
collection: o,
|
|
52
|
+
value: e.record_conditions,
|
|
53
|
+
fields: c,
|
|
54
|
+
columns: l,
|
|
55
|
+
relations: i,
|
|
56
|
+
onBlur: t.flush,
|
|
57
|
+
onChange: (s, { text: h }) => (h ? t.setText : t.set)(
|
|
58
|
+
{ record_conditions: s },
|
|
59
|
+
_("layout.record_conditions")
|
|
56
60
|
)
|
|
57
61
|
}
|
|
58
62
|
)
|
|
59
63
|
}
|
|
60
64
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
65
|
+
/* @__PURE__ */ n(p, { k: "layout.conditions.role_ids", children: /* @__PURE__ */ n(
|
|
66
|
+
z,
|
|
63
67
|
{
|
|
64
|
-
value:
|
|
65
|
-
roles:
|
|
66
|
-
onChange: (
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
value: f,
|
|
69
|
+
roles: m,
|
|
70
|
+
onChange: (s) => t.set(
|
|
71
|
+
// Keeps the layout's pinned test records (conditions.testing).
|
|
72
|
+
Y(e.conditions, s),
|
|
73
|
+
s.length > f.length ? "Add a role" : "Remove a role"
|
|
69
74
|
)
|
|
70
75
|
}
|
|
71
76
|
) }),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
77
|
+
/* @__PURE__ */ n(
|
|
78
|
+
S,
|
|
74
79
|
{
|
|
75
80
|
k: "layout.slug",
|
|
76
|
-
props:
|
|
81
|
+
props: t,
|
|
77
82
|
mono: !0,
|
|
78
83
|
placeholder: "e.g. unit_order",
|
|
79
|
-
sanitize:
|
|
84
|
+
sanitize: G,
|
|
80
85
|
blurOnly: !0,
|
|
81
|
-
extra: !
|
|
86
|
+
extra: !e.slug && typeof e.name == "string" && v(e.name) ? /* @__PURE__ */ n(
|
|
82
87
|
"button",
|
|
83
88
|
{
|
|
84
89
|
type: "button",
|
|
85
|
-
className:
|
|
86
|
-
onClick: () =>
|
|
90
|
+
className: d,
|
|
91
|
+
onClick: () => t.set({ slug: v(String(e.name)) }, "Generate link name"),
|
|
87
92
|
children: "Generate"
|
|
88
93
|
}
|
|
89
94
|
) : null,
|
|
90
|
-
note:
|
|
95
|
+
note: e.slug ? /* @__PURE__ */ a(u, { children: [
|
|
91
96
|
"Opens with ",
|
|
92
97
|
/* @__PURE__ */ a("code", { className: "font-mono", children: [
|
|
93
98
|
"?layout=",
|
|
94
|
-
String(
|
|
95
|
-
] })
|
|
99
|
+
String(e.slug)
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ n(q, { layoutId: Number(e.id) })
|
|
96
102
|
] }) : null
|
|
97
103
|
}
|
|
98
104
|
),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
105
|
+
/* @__PURE__ */ n(
|
|
106
|
+
S,
|
|
101
107
|
{
|
|
102
108
|
k: "layout.create_label",
|
|
103
|
-
props:
|
|
104
|
-
placeholder: typeof
|
|
109
|
+
props: t,
|
|
110
|
+
placeholder: typeof e.name == "string" ? e.name : ""
|
|
105
111
|
}
|
|
106
112
|
),
|
|
107
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ n(E, { k: "layout.create_hidden", props: t }),
|
|
114
|
+
/* @__PURE__ */ n(K, { ...t }),
|
|
115
|
+
/* @__PURE__ */ n(M, { ...t })
|
|
108
116
|
] });
|
|
109
117
|
}
|
|
110
|
-
function
|
|
111
|
-
const {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
function q({ layoutId: t }) {
|
|
119
|
+
const { data: e } = L(t), [o, c] = y(!1), l = ((e == null ? void 0 : e.nodes) ?? []).filter((i) => i.breaks.includes("slug")).length;
|
|
120
|
+
return l ? /* @__PURE__ */ a(u, { children: [
|
|
121
|
+
" · ",
|
|
122
|
+
/* @__PURE__ */ a(
|
|
123
|
+
"button",
|
|
124
|
+
{
|
|
125
|
+
type: "button",
|
|
126
|
+
"data-slug-users": !0,
|
|
127
|
+
className: "font-medium text-amber-700 hover:underline dark:text-amber-300",
|
|
128
|
+
onClick: () => c((i) => !i),
|
|
129
|
+
children: [
|
|
130
|
+
l,
|
|
131
|
+
" ",
|
|
132
|
+
l === 1 ? "thing finds" : "things find",
|
|
133
|
+
" it by this name"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
o && /* @__PURE__ */ n(w, { layoutId: t, change: "slug", compact: !0, className: "mt-2" })
|
|
138
|
+
] }) : null;
|
|
139
|
+
}
|
|
140
|
+
function V(t) {
|
|
141
|
+
const { layout: e, kind: o, bundle: c } = t, [l, i] = y(null), { data: m } = L(Number(e.id)), f = ((m == null ? void 0 : m.nodes.length) ?? 0) > 0, s = c.placements.length + c.groups.length, h = (r) => t.set({ layout_type: r }, `Change kind to ${g(r)}`), T = C(e.is_active), [O, b] = y(!1), k = $(t.collection).find(
|
|
142
|
+
(r) => r.id !== Number(e.id) && B(r) === o && C(r.is_active)
|
|
143
|
+
), N = o === "grouped" ? "form" : `${g(o).toLowerCase()} layout`, A = () => {
|
|
144
|
+
t.set({ is_active: !0 }, "Make default", { undoable: !1 }), b(!1);
|
|
145
|
+
}, R = o === "file" ? null : /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: T ? /* @__PURE__ */ a("span", { className: x, "data-default-layout": !0, children: [
|
|
116
146
|
"This is the default ",
|
|
117
|
-
|
|
147
|
+
g(o).toLowerCase(),
|
|
118
148
|
" layout: records no rule or role catches use it."
|
|
119
|
-
] }) :
|
|
149
|
+
] }) : O ? /* @__PURE__ */ a(
|
|
120
150
|
"div",
|
|
121
151
|
{
|
|
122
152
|
"data-make-default-confirm": !0,
|
|
123
153
|
className: "w-full rounded-md border border-amber-300 bg-amber-50 p-2 text-[12px] text-amber-900 dark:border-amber-400/30 dark:bg-amber-400/10 dark:text-amber-200",
|
|
124
154
|
children: [
|
|
125
155
|
/* @__PURE__ */ a("p", { children: [
|
|
126
|
-
|
|
127
|
-
/* @__PURE__ */
|
|
156
|
+
k ? /* @__PURE__ */ a(u, { children: [
|
|
157
|
+
/* @__PURE__ */ n("strong", { className: "font-semibold", children: k.name }),
|
|
128
158
|
" stops being the default",
|
|
129
159
|
" ",
|
|
130
|
-
|
|
160
|
+
N,
|
|
131
161
|
" for records no rule catches."
|
|
132
162
|
] }) : /* @__PURE__ */ a(u, { children: [
|
|
133
163
|
"No ",
|
|
134
|
-
|
|
164
|
+
N,
|
|
135
165
|
" is the default yet; this one becomes it."
|
|
136
166
|
] }),
|
|
137
167
|
" ",
|
|
138
168
|
"This cannot be undone with Undo."
|
|
139
169
|
] }),
|
|
140
170
|
/* @__PURE__ */ a("div", { className: "mt-1.5 flex gap-1.5", children: [
|
|
141
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ n(
|
|
142
172
|
"button",
|
|
143
173
|
{
|
|
144
174
|
type: "button",
|
|
145
175
|
"data-action": "make-default-confirm",
|
|
146
|
-
className:
|
|
147
|
-
onClick:
|
|
176
|
+
className: d,
|
|
177
|
+
onClick: A,
|
|
148
178
|
children: "Yes, make default"
|
|
149
179
|
}
|
|
150
180
|
),
|
|
151
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ n("button", { type: "button", className: d, onClick: () => b(!1), children: "Cancel" })
|
|
152
182
|
] })
|
|
153
183
|
]
|
|
154
184
|
}
|
|
155
185
|
) : /* @__PURE__ */ a(u, { children: [
|
|
156
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ n(
|
|
157
187
|
"button",
|
|
158
188
|
{
|
|
159
189
|
type: "button",
|
|
160
190
|
"data-action": "make-default",
|
|
161
|
-
className:
|
|
162
|
-
onClick: () =>
|
|
191
|
+
className: d,
|
|
192
|
+
onClick: () => b(!0),
|
|
163
193
|
children: "Make default"
|
|
164
194
|
}
|
|
165
195
|
),
|
|
166
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ n("span", { className: x, children: "Records no rule or role catches would open with this layout." })
|
|
167
197
|
] }) });
|
|
168
|
-
return /* @__PURE__ */ a(
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
198
|
+
return /* @__PURE__ */ a(p, { k: "layout.layout_type", note: R, children: [
|
|
199
|
+
/* @__PURE__ */ n(
|
|
200
|
+
j,
|
|
171
201
|
{
|
|
172
202
|
ariaLabel: "Kind of layout",
|
|
173
|
-
value:
|
|
174
|
-
options:
|
|
175
|
-
onChange: (
|
|
203
|
+
value: o,
|
|
204
|
+
options: D.map((r) => ({ value: r.type, label: r.label })),
|
|
205
|
+
onChange: (r) => s > 0 || f ? i(r) : h(r)
|
|
176
206
|
}
|
|
177
207
|
),
|
|
178
|
-
|
|
208
|
+
l && /* @__PURE__ */ a(
|
|
179
209
|
"div",
|
|
180
210
|
{
|
|
181
|
-
"data-kind-confirm":
|
|
211
|
+
"data-kind-confirm": l,
|
|
182
212
|
className: "rounded-md border border-amber-300 bg-amber-50 p-2.5 text-[12px] text-amber-900 dark:border-amber-400/30 dark:bg-amber-400/10 dark:text-amber-200",
|
|
183
213
|
children: [
|
|
184
214
|
/* @__PURE__ */ a("p", { children: [
|
|
185
215
|
"Make this a ",
|
|
186
|
-
|
|
216
|
+
g(l),
|
|
187
217
|
" layout? Its sections and fields stay, but",
|
|
188
218
|
" ",
|
|
189
|
-
|
|
219
|
+
l === "file" ? "tabs, widgets and slot cards do not appear in a PDF." : l === "table" ? "grid columns use only its fields, not its sections." : "some of them may not apply to this kind."
|
|
190
220
|
] }),
|
|
221
|
+
f && /* @__PURE__ */ n(
|
|
222
|
+
w,
|
|
223
|
+
{
|
|
224
|
+
layoutId: Number(e.id),
|
|
225
|
+
change: "type",
|
|
226
|
+
compact: !0,
|
|
227
|
+
className: "mt-2 rounded-md bg-white p-2 text-slate-800 dark:bg-card dark:text-foreground"
|
|
228
|
+
}
|
|
229
|
+
),
|
|
191
230
|
/* @__PURE__ */ a("div", { className: "mt-1.5 flex gap-1.5", children: [
|
|
192
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ n(
|
|
193
232
|
"button",
|
|
194
233
|
{
|
|
195
234
|
type: "button",
|
|
196
|
-
className:
|
|
235
|
+
className: d,
|
|
197
236
|
onClick: () => {
|
|
198
|
-
|
|
237
|
+
h(l), i(null);
|
|
199
238
|
},
|
|
200
239
|
children: "Yes, change it"
|
|
201
240
|
}
|
|
202
241
|
),
|
|
203
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ n("button", { type: "button", className: d, onClick: () => i(null), children: "Cancel" })
|
|
204
243
|
] })
|
|
205
244
|
]
|
|
206
245
|
}
|
|
@@ -208,6 +247,6 @@ function P(e) {
|
|
|
208
247
|
] });
|
|
209
248
|
}
|
|
210
249
|
export {
|
|
211
|
-
|
|
212
|
-
|
|
250
|
+
me as WhoSection,
|
|
251
|
+
G as sanitizeSlug
|
|
213
252
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronsUpDown as k, Check as f, X as w } from "lucide-react";
|
|
3
|
-
import { createContext as C,
|
|
3
|
+
import { createContext as C, useState as S, isValidElement as T, useContext as P } from "react";
|
|
4
4
|
import { cn as i } from "../../../lib/utils.js";
|
|
5
5
|
import { Command as j, CommandInput as O, CommandList as V, CommandEmpty as B, CommandItem as b } from "../../ui/command.js";
|
|
6
6
|
import { Popover as D, PopoverTrigger as E, PopoverContent as I } from "../../ui/popover.js";
|
|
7
|
-
import { inputBase as v, effectText as $,
|
|
7
|
+
import { inputBase as v, effectText as $, segOption as q, segTrack as U, labelText as X } from "../panel-style.js";
|
|
8
8
|
import { settingDef as z } from "./settings-registry.js";
|
|
9
9
|
const A = C(null);
|
|
10
10
|
function F(e) {
|
|
@@ -21,10 +21,10 @@ function L({
|
|
|
21
21
|
}) {
|
|
22
22
|
const s = F(e), d = z(e);
|
|
23
23
|
if (!s || !d) return null;
|
|
24
|
-
const m =
|
|
24
|
+
const m = T(n) && n.type === G;
|
|
25
25
|
return /* @__PURE__ */ l("div", { "data-setting": e, className: "space-y-1.5", children: [
|
|
26
26
|
/* @__PURE__ */ l("div", { className: "flex min-h-5 items-center justify-between gap-3", children: [
|
|
27
|
-
/* @__PURE__ */ t("label", { htmlFor: c, className: i(
|
|
27
|
+
/* @__PURE__ */ t("label", { htmlFor: c, className: i(X, "min-w-0"), children: d.label }),
|
|
28
28
|
m && /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center", children: n })
|
|
29
29
|
] }),
|
|
30
30
|
n && !m && /* @__PURE__ */ t("div", { children: n }),
|
|
@@ -75,7 +75,7 @@ function ee({
|
|
|
75
75
|
"fieldset",
|
|
76
76
|
{
|
|
77
77
|
"aria-label": r,
|
|
78
|
-
className: i("m-0 min-w-0 border-0",
|
|
78
|
+
className: i("m-0 min-w-0 border-0", U(n.length)),
|
|
79
79
|
children: n.map((s) => /* @__PURE__ */ t(
|
|
80
80
|
"button",
|
|
81
81
|
{
|
|
@@ -83,7 +83,7 @@ function ee({
|
|
|
83
83
|
"aria-pressed": e === s.value,
|
|
84
84
|
disabled: c,
|
|
85
85
|
onClick: () => e !== s.value && o(s.value),
|
|
86
|
-
className:
|
|
86
|
+
className: q(e === s.value),
|
|
87
87
|
children: s.label
|
|
88
88
|
},
|
|
89
89
|
s.value
|
|
@@ -102,7 +102,7 @@ function te({
|
|
|
102
102
|
className: m,
|
|
103
103
|
emptyText: N = "Nothing to pick"
|
|
104
104
|
}) {
|
|
105
|
-
const [y, u] =
|
|
105
|
+
const [y, u] = S(!1), p = n.find((a) => a.value === e), h = (a) => {
|
|
106
106
|
o(a), u(!1);
|
|
107
107
|
}, x = "gap-1.5 px-2 py-1 text-[12px] text-slate-700 data-[selected=true]:bg-muted dark:text-foreground";
|
|
108
108
|
return /* @__PURE__ */ l(D, { open: y, onOpenChange: u, children: [
|
|
@@ -6,9 +6,10 @@ const y = [
|
|
|
6
6
|
{ id: "pdf", title: "PDF" },
|
|
7
7
|
{ id: "addendum", title: "Addendum" },
|
|
8
8
|
{ id: "defaults", title: "Defaults for new records" },
|
|
9
|
+
{ id: "entry", title: "Entering data" },
|
|
9
10
|
{ id: "inheritance", title: "Inheritance" },
|
|
10
11
|
{ id: "tools", title: "AI review, previews, version history" }
|
|
11
|
-
], o = ["grouped", "table", "file", "addendum", "detail", "summary"], t = ["grouped", "table", "detail", "summary"],
|
|
12
|
+
], o = ["grouped", "table", "file", "addendum", "detail", "summary"], t = ["grouped", "table", "detail", "summary"], l = ["grouped", "detail", "summary"], s = ["grouped"], c = [
|
|
12
13
|
// ── Who gets this form ────────────────────────────────────────────────────
|
|
13
14
|
{
|
|
14
15
|
key: "layout.layout_type",
|
|
@@ -44,14 +45,30 @@ const y = [
|
|
|
44
45
|
section: "who",
|
|
45
46
|
label: "New-menu label",
|
|
46
47
|
effect: "The name shown in the New menu of the collection list. Empty uses the layout name.",
|
|
47
|
-
types:
|
|
48
|
+
types: s
|
|
48
49
|
},
|
|
49
50
|
{
|
|
50
51
|
key: "layout.create_hidden",
|
|
51
52
|
section: "who",
|
|
52
53
|
label: "Hide from New menu",
|
|
53
54
|
effect: "Leaves this layout out of the New menu; its link name keeps working.",
|
|
54
|
-
types:
|
|
55
|
+
types: s
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: "layout.conditions.active_window",
|
|
59
|
+
section: "who",
|
|
60
|
+
label: "Active dates",
|
|
61
|
+
effect: "The form applies only on these days, both included; outside them records open with the next form that fits.",
|
|
62
|
+
types: ["grouped"],
|
|
63
|
+
keywords: "window from until year end close season schedule period"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: "layout.conditions.phone_of",
|
|
67
|
+
section: "who",
|
|
68
|
+
label: "Phone version",
|
|
69
|
+
effect: "A lighter copy of a form that opens instead of it on small screens; it never opens on its own.",
|
|
70
|
+
types: ["grouped"],
|
|
71
|
+
keywords: "mobile small screen variant device lighter"
|
|
55
72
|
},
|
|
56
73
|
// ── How it's laid out ─────────────────────────────────────────────────────
|
|
57
74
|
{
|
|
@@ -95,14 +112,14 @@ const y = [
|
|
|
95
112
|
section: "buttons",
|
|
96
113
|
label: "Dossier button",
|
|
97
114
|
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:
|
|
115
|
+
types: l
|
|
99
116
|
},
|
|
100
117
|
{
|
|
101
118
|
key: "layout.dossier_label",
|
|
102
119
|
section: "buttons",
|
|
103
120
|
label: "Dossier button label",
|
|
104
121
|
effect: "Text on the Dossier button. Empty shows “Dossier”. Only the default form's label counts.",
|
|
105
|
-
types:
|
|
122
|
+
types: l
|
|
106
123
|
},
|
|
107
124
|
{
|
|
108
125
|
key: "layout.disable_comments",
|
|
@@ -180,14 +197,14 @@ const y = [
|
|
|
180
197
|
section: "read",
|
|
181
198
|
label: "Summary side panel",
|
|
182
199
|
effect: "Shows a side panel with the summary fields beside the form.",
|
|
183
|
-
types:
|
|
200
|
+
types: l
|
|
184
201
|
},
|
|
185
202
|
{
|
|
186
203
|
key: "layout.summary_hide_empty",
|
|
187
204
|
section: "read",
|
|
188
205
|
label: "Summary: hide empty fields",
|
|
189
206
|
effect: "Fields with no value are left out of the summary panel.",
|
|
190
|
-
types:
|
|
207
|
+
types: l
|
|
191
208
|
},
|
|
192
209
|
{
|
|
193
210
|
key: "layout.display_mode",
|
|
@@ -346,6 +363,70 @@ const y = [
|
|
|
346
363
|
effect: "Replaces the steps with the cascade chain of this collection, parents first.",
|
|
347
364
|
types: t
|
|
348
365
|
},
|
|
366
|
+
// ── Entering data ─────────────────────────────────────────────────────────
|
|
367
|
+
{
|
|
368
|
+
key: "layout.focus_first",
|
|
369
|
+
section: "entry",
|
|
370
|
+
label: "Start on the first empty required field",
|
|
371
|
+
effect: "When the form opens, the cursor is already in the first required field with no value.",
|
|
372
|
+
types: s,
|
|
373
|
+
keywords: "keyboard focus autofocus cursor"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
key: "layout.enter_next",
|
|
377
|
+
section: "entry",
|
|
378
|
+
label: "Enter moves to the next field",
|
|
379
|
+
effect: "Pressing Enter in a field goes to the next one instead of saving; Ctrl or ⌘ + Enter still saves.",
|
|
380
|
+
types: s,
|
|
381
|
+
keywords: "keyboard submit return"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
key: "layout.tab_order",
|
|
385
|
+
section: "entry",
|
|
386
|
+
label: "Tab order",
|
|
387
|
+
effect: "The order the Tab key visits fields in. Set it by clicking fields in order on the canvas.",
|
|
388
|
+
types: s,
|
|
389
|
+
keywords: "keyboard accessibility sequence"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
key: "layout.adaptive_mode",
|
|
393
|
+
section: "entry",
|
|
394
|
+
label: "Guided steps for new people",
|
|
395
|
+
effect: "A person making their first records sees this form as steps; after that it shows as tabs. Each person can switch.",
|
|
396
|
+
types: s,
|
|
397
|
+
keywords: "beginner expert onboarding steps tabs"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
key: "layout.adaptive_threshold",
|
|
401
|
+
section: "entry",
|
|
402
|
+
label: "Records before tabs",
|
|
403
|
+
effect: "How many records of their own a person makes before the form switches to tabs.",
|
|
404
|
+
types: s
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
key: "layout.badge",
|
|
408
|
+
section: "entry",
|
|
409
|
+
label: "Form badge",
|
|
410
|
+
effect: "A colour and short tag on the record header, so people can tell which form they are in.",
|
|
411
|
+
types: s,
|
|
412
|
+
keywords: "identity chip tag colour label"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
key: "layout.glossary",
|
|
416
|
+
section: "entry",
|
|
417
|
+
label: "Glossary tooltips in help text",
|
|
418
|
+
effect: "Glossary terms in help text get a dotted underline that shows their definition.",
|
|
419
|
+
types: s,
|
|
420
|
+
keywords: "definition term hover"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
key: "layout.presets",
|
|
424
|
+
section: "entry",
|
|
425
|
+
label: "Placement presets",
|
|
426
|
+
effect: "Named bundles of field settings (width, required, help text) that apply to other fields in one click.",
|
|
427
|
+
types: s,
|
|
428
|
+
keywords: "template reuse bundle"
|
|
429
|
+
},
|
|
349
430
|
// ── Inheritance ───────────────────────────────────────────────────────────
|
|
350
431
|
{
|
|
351
432
|
key: "layout.parent_layout_id",
|
|
@@ -383,6 +464,14 @@ const y = [
|
|
|
383
464
|
effect: "AI looks for problems (missing required fields, odd order) and offers fixes you can undo.",
|
|
384
465
|
types: o
|
|
385
466
|
},
|
|
467
|
+
{
|
|
468
|
+
key: "tool.ai_text",
|
|
469
|
+
section: "tools",
|
|
470
|
+
label: "AI wording",
|
|
471
|
+
effect: "AI checks labels, help and choices against the glossary and plain language, and drafts section intros, placeholders and translations; you pick what to apply.",
|
|
472
|
+
types: t,
|
|
473
|
+
keywords: "glossary intro placeholder choices reading level plain language translation"
|
|
474
|
+
},
|
|
386
475
|
{
|
|
387
476
|
key: "tool.version_history",
|
|
388
477
|
section: "tools",
|
|
@@ -404,6 +493,38 @@ const y = [
|
|
|
404
493
|
effect: "Puts the layout back exactly as a version was; the current one is kept as a version.",
|
|
405
494
|
types: o
|
|
406
495
|
},
|
|
496
|
+
{
|
|
497
|
+
key: "layout.change_note",
|
|
498
|
+
section: "tools",
|
|
499
|
+
label: "Ask why on every save",
|
|
500
|
+
effect: "Save asks for a short reason, and a ticket link if you choose, and keeps it with the version in History.",
|
|
501
|
+
types: o,
|
|
502
|
+
keywords: "change note reason ticket audit required"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
key: "layout.email_summary_group",
|
|
506
|
+
section: "tools",
|
|
507
|
+
label: "Section for notification emails",
|
|
508
|
+
effect: "Notification emails summarise the record with this section’s fields, in this form’s order, cut to what each person may see. None keeps the header strip. Only the default form’s choice counts.",
|
|
509
|
+
types: s,
|
|
510
|
+
keywords: "email mail notification summary body section"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
key: "layout.conditions.freeze",
|
|
514
|
+
section: "tools",
|
|
515
|
+
label: "Freeze edits",
|
|
516
|
+
effect: "Until the date, saves to this layout are refused with your reason; an administrator can still save by giving a note.",
|
|
517
|
+
types: o,
|
|
518
|
+
keywords: "freeze lock go-live audit read-only block edits override"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
key: "tool.cost_limit",
|
|
522
|
+
section: "tools",
|
|
523
|
+
label: "Form cost limit",
|
|
524
|
+
effect: "Test and Check impact warn when opening a record on this form takes more requests than this.",
|
|
525
|
+
types: l,
|
|
526
|
+
keywords: "requests pickers grids widgets queries slow"
|
|
527
|
+
},
|
|
407
528
|
{
|
|
408
529
|
key: "tool.layout_drift",
|
|
409
530
|
section: "tools",
|
|
@@ -416,24 +537,24 @@ function h(e) {
|
|
|
416
537
|
return f.get(e);
|
|
417
538
|
}
|
|
418
539
|
function p(e) {
|
|
419
|
-
const
|
|
420
|
-
return
|
|
540
|
+
const a = e == null ? void 0 : e.layout_type;
|
|
541
|
+
return a === "table" || a === "file" || a === "addendum" || a === "detail" || a === "summary" ? a : "grouped";
|
|
421
542
|
}
|
|
422
|
-
function u(e,
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
425
|
-
const
|
|
426
|
-
return
|
|
543
|
+
function u(e, a) {
|
|
544
|
+
const i = a.toLowerCase().split(/\s+/).filter(Boolean);
|
|
545
|
+
if (i.length === 0) return !0;
|
|
546
|
+
const n = `${e.label} ${e.effect} ${e.key} ${e.keywords ?? ""}`.toLowerCase();
|
|
547
|
+
return i.every((r) => n.includes(r));
|
|
427
548
|
}
|
|
428
|
-
function m(e,
|
|
429
|
-
const
|
|
430
|
-
for (const
|
|
431
|
-
const
|
|
432
|
-
(d) => d.section ===
|
|
549
|
+
function m(e, a = "") {
|
|
550
|
+
const i = [];
|
|
551
|
+
for (const n of y) {
|
|
552
|
+
const r = c.filter(
|
|
553
|
+
(d) => d.section === n.id && d.types.includes(e) && u(d, a)
|
|
433
554
|
);
|
|
434
|
-
|
|
555
|
+
r.length && i.push({ section: n, settings: r });
|
|
435
556
|
}
|
|
436
|
-
return
|
|
557
|
+
return i;
|
|
437
558
|
}
|
|
438
559
|
export {
|
|
439
560
|
y as SECTIONS,
|