@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,56 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import { jsxs as r, jsx as t, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as U, useEffect as ae } from "react";
|
|
3
|
+
import { readGroupStructure as ne } from "../../../lib/form-structure.js";
|
|
4
|
+
import { lazySectionsOf as oe, lazySectionPatch as ie } from "../../../lib/layout-resolve.js";
|
|
5
|
+
import { titleCase as W } from "../../../lib/utils.js";
|
|
6
|
+
import { RuleWriter as se } from "../ai-rules/RuleWriter.js";
|
|
7
|
+
import { RoleConditionRow as q } from "../editors/lock-conditions.js";
|
|
8
|
+
import { O2MAggFieldCombobox as re } from "../editors/o2m-agg-field.js";
|
|
9
|
+
import { SwapConfigEditor as de } from "../editors/swap-config.js";
|
|
10
|
+
import { IconPicker as ce } from "../pickers/icon-picker.js";
|
|
11
|
+
import { SectionReuseActions as he } from "../reuse/SectionReuseActions.js";
|
|
12
|
+
import { emptyTextOp as pe, stickyPlan as fe, rowUpdatePlan as X } from "../section-structure.js";
|
|
13
|
+
import { useCollectionMeta as ue } from "./field-context.js";
|
|
14
|
+
import { useInspectorEnv as me, Setting as d, TextInput as S, Choice as F, Segmented as y, Toggle as g, TextArea as Y, Section as $, FieldMultiPicker as be, ConditionBuilder as ye } from "./kit.js";
|
|
15
|
+
import { groupFields as ge, asArray as k, describeField as Z, relKindOf as ke, relatedCollectionOf as _e } from "./model.js";
|
|
16
|
+
import { GroupTranslations as ve } from "./Translations.js";
|
|
17
|
+
const T = {
|
|
12
18
|
section: "Section",
|
|
13
19
|
tab: "Tab or step",
|
|
14
20
|
metadata: "Record info (read-only)",
|
|
15
21
|
container: "Tabs or steps holder",
|
|
16
22
|
content: "Text block"
|
|
17
23
|
};
|
|
18
|
-
function
|
|
24
|
+
function we(l) {
|
|
19
25
|
return typeof l == "string" ? { field: l } : l && typeof l == "object" && typeof l.field == "string" ? l : null;
|
|
20
26
|
}
|
|
21
|
-
function
|
|
22
|
-
const { field:
|
|
23
|
-
return !
|
|
24
|
-
field:
|
|
25
|
-
...
|
|
26
|
-
...
|
|
27
|
+
function xe(l) {
|
|
28
|
+
const { field: u, label: o, agg: p, agg_field: m, field_options: f } = l;
|
|
29
|
+
return !o && !p ? u : {
|
|
30
|
+
field: u,
|
|
31
|
+
...o ? { label: o } : {},
|
|
32
|
+
...p ? { agg: p, agg_field: m, ...f ? { field_options: f } : {} } : {}
|
|
27
33
|
};
|
|
28
34
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
31
|
-
var
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(e) => JSON.stringify(e.filter((
|
|
35
|
+
const _ = (l) => l.length ? JSON.stringify(l) : null;
|
|
36
|
+
function je({ group: l, readOnly: u }) {
|
|
37
|
+
var B, H;
|
|
38
|
+
const o = me(), { data: p } = ue(o.collection), m = (p == null ? void 0 : p.fields) ?? [], f = (p == null ? void 0 : p.relations) ?? [], n = l.label || W(l.key), i = l.type, s = (e, a, c) => o.apply([{ op: "group_update", key: l.key, patch: e }], { label: a, text: c }), L = o.bundle.groups.filter((e) => e.parent_key === l.key), Q = o.bundle.groups.filter((e) => e.type === "container" && e.key !== l.key), P = o.bundle.placements.some((e) => e.group_key === l.key), V = (l.parent_key ? ["tab"] : Object.keys(T)).filter((e) => e === i || !(P && (e === "container" || e === "content"))).map((e) => ({ value: e, label: T[e] })), v = i === "section" || i === "metadata" || i === "tab", R = oe(o.bundle.layout.conditions).includes(l.key), M = !!o.bundle.layout.accordion_mode, w = ne(l.swap_config), D = m.filter((e) => !e.field.startsWith("__") && e.type !== "alias").map((e) => ({ value: e.field, label: e.label || W(e.field) })).sort((e, a) => e.label.localeCompare(a.label)), j = ge(o.bundle, l.key), x = k(l.summary_fields).map(we).filter((e) => !!e), G = (e, a, c) => s({ summary_fields: _(e.map(xe)) }, a, c), J = k(l.visible_when), C = JSON.stringify(J), [ee, K] = U(J);
|
|
39
|
+
ae(() => {
|
|
40
|
+
K(
|
|
41
|
+
(e) => JSON.stringify(e.filter((a) => a.field)) === C ? e : JSON.parse(C)
|
|
36
42
|
);
|
|
37
|
-
}, [
|
|
38
|
-
const [
|
|
39
|
-
return /* @__PURE__ */
|
|
43
|
+
}, [C]);
|
|
44
|
+
const [te, z] = U(!1);
|
|
45
|
+
return /* @__PURE__ */ r("fieldset", { disabled: u, className: "min-w-0 space-y-5", children: [
|
|
40
46
|
/* @__PURE__ */ t(d, { k: "group.label", label: "Name", effect: "The heading people see.", children: /* @__PURE__ */ t(
|
|
41
|
-
|
|
47
|
+
S,
|
|
42
48
|
{
|
|
43
49
|
ariaLabel: "Name",
|
|
44
50
|
value: l.label,
|
|
45
|
-
onChange: (e) =>
|
|
51
|
+
onChange: (e) => s({ label: e }, `Rename ${n}`, !0)
|
|
46
52
|
}
|
|
47
53
|
) }),
|
|
48
54
|
/* @__PURE__ */ t(d, { k: "group.icon", label: "Icon", effect: "Shown before the section title.", children: /* @__PURE__ */ t(
|
|
49
|
-
|
|
55
|
+
ce,
|
|
50
56
|
{
|
|
51
57
|
className: "h-8 rounded-md border-slate-200 bg-white px-2.5 text-[13px] hover:bg-white dark:border-border dark:bg-background dark:hover:bg-background",
|
|
52
58
|
value: l.icon ?? "",
|
|
53
|
-
onChange: (e) =>
|
|
59
|
+
onChange: (e) => s({ icon: e || null }, `Change the icon of ${n}`)
|
|
54
60
|
}
|
|
55
61
|
) }),
|
|
56
62
|
/* @__PURE__ */ t(
|
|
@@ -58,60 +64,60 @@ function ve({ group: l, readOnly: y }) {
|
|
|
58
64
|
{
|
|
59
65
|
k: "group.type",
|
|
60
66
|
label: "Kind",
|
|
61
|
-
effect:
|
|
67
|
+
effect: i === "container" && L.length ? "Move its tabs out before changing what this is." : P && !l.parent_key ? "What this part of the form is. To make it a tabs holder or a text block, move its fields out first." : "What this part of the form is.",
|
|
62
68
|
children: /* @__PURE__ */ t(
|
|
63
|
-
|
|
69
|
+
F,
|
|
64
70
|
{
|
|
65
71
|
ariaLabel: "Kind",
|
|
66
|
-
disabled:
|
|
67
|
-
value:
|
|
68
|
-
options:
|
|
72
|
+
disabled: i === "container" && L.length > 0,
|
|
73
|
+
value: i,
|
|
74
|
+
options: V,
|
|
69
75
|
onChange: (e) => {
|
|
70
|
-
var
|
|
71
|
-
return
|
|
76
|
+
var a;
|
|
77
|
+
return s(
|
|
72
78
|
e === "container" ? { type: e, tab_mode: l.tab_mode ?? "tabs" } : { type: e },
|
|
73
|
-
`Make ${
|
|
79
|
+
`Make ${n} a ${(a = T[e]) == null ? void 0 : a.toLowerCase()}`
|
|
74
80
|
);
|
|
75
81
|
}
|
|
76
82
|
}
|
|
77
83
|
)
|
|
78
84
|
}
|
|
79
85
|
),
|
|
80
|
-
|
|
86
|
+
i === "container" && /* @__PURE__ */ t(
|
|
81
87
|
d,
|
|
82
88
|
{
|
|
83
89
|
k: "group.tab_mode",
|
|
84
90
|
label: "Show its tabs as",
|
|
85
91
|
effect: "Steps walk people through in order.",
|
|
86
92
|
children: /* @__PURE__ */ t(
|
|
87
|
-
|
|
93
|
+
y,
|
|
88
94
|
{
|
|
89
95
|
value: l.tab_mode === "steps" ? "steps" : "tabs",
|
|
90
96
|
options: [
|
|
91
97
|
{ value: "tabs", label: "Tabs" },
|
|
92
98
|
{ value: "steps", label: "Steps" }
|
|
93
99
|
],
|
|
94
|
-
onChange: (e) =>
|
|
100
|
+
onChange: (e) => s({ tab_mode: e }, `Show ${n} as ${e}`)
|
|
95
101
|
}
|
|
96
102
|
)
|
|
97
103
|
}
|
|
98
104
|
),
|
|
99
|
-
|
|
105
|
+
i === "tab" && /* @__PURE__ */ t(
|
|
100
106
|
d,
|
|
101
107
|
{
|
|
102
108
|
k: "group.container_id",
|
|
103
109
|
label: "Sits in",
|
|
104
110
|
effect: "Tabs show inside a tabs or steps holder.",
|
|
105
111
|
children: /* @__PURE__ */ t(
|
|
106
|
-
|
|
112
|
+
F,
|
|
107
113
|
{
|
|
108
114
|
ariaLabel: "Sits in",
|
|
109
115
|
value: l.parent_key ?? "",
|
|
110
116
|
options: [
|
|
111
117
|
{ value: "", label: "The form itself" },
|
|
112
|
-
...
|
|
118
|
+
...Q.map((e) => ({ value: e.key, label: e.label || W(e.key) }))
|
|
113
119
|
],
|
|
114
|
-
onChange: (e) =>
|
|
120
|
+
onChange: (e) => o.apply(
|
|
115
121
|
[
|
|
116
122
|
{
|
|
117
123
|
op: "group_move",
|
|
@@ -120,23 +126,42 @@ function ve({ group: l, readOnly: y }) {
|
|
|
120
126
|
index: Number.MAX_SAFE_INTEGER
|
|
121
127
|
}
|
|
122
128
|
],
|
|
123
|
-
{ label: e ? `Move ${
|
|
129
|
+
{ label: e ? `Move ${n} into a holder` : `Move ${n} out of its holder` }
|
|
124
130
|
)
|
|
125
131
|
}
|
|
126
132
|
)
|
|
127
133
|
}
|
|
128
134
|
),
|
|
129
|
-
(
|
|
130
|
-
|
|
135
|
+
(i === "section" || i === "metadata") && /* @__PURE__ */ t(
|
|
136
|
+
g,
|
|
131
137
|
{
|
|
132
138
|
k: "group.is_collapsed",
|
|
133
139
|
label: "Starts collapsed",
|
|
134
140
|
effect: "The section opens folded; people unfold it.",
|
|
135
141
|
checked: l.is_collapsed,
|
|
136
|
-
onChange: (e) =>
|
|
142
|
+
onChange: (e) => s({ is_collapsed: e }, e ? `Collapse ${n}` : `Expand ${n}`)
|
|
137
143
|
}
|
|
138
144
|
),
|
|
139
|
-
|
|
145
|
+
(i === "section" || i === "metadata") && /* @__PURE__ */ t(
|
|
146
|
+
g,
|
|
147
|
+
{
|
|
148
|
+
k: "group.load_on_open",
|
|
149
|
+
label: "Load when opened",
|
|
150
|
+
effect: l.is_collapsed || M ? "Its pickers, grids and widgets load only once someone opens it; a lighter open for every record." : "Turn on Starts collapsed first: an open section loads straight away.",
|
|
151
|
+
checked: R,
|
|
152
|
+
disabled: !R && !l.is_collapsed && !M,
|
|
153
|
+
onChange: (e) => o.apply(
|
|
154
|
+
[
|
|
155
|
+
{
|
|
156
|
+
op: "layout_update",
|
|
157
|
+
patch: ie(o.bundle.layout.conditions, l.key, e)
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
{ label: e ? `Load ${n} when opened` : `Load ${n} with the form` }
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
i === "content" && /* @__PURE__ */ r(I, { children: [
|
|
140
165
|
/* @__PURE__ */ t(
|
|
141
166
|
d,
|
|
142
167
|
{
|
|
@@ -144,7 +169,7 @@ function ve({ group: l, readOnly: y }) {
|
|
|
144
169
|
label: "Style",
|
|
145
170
|
effect: "Note and Warning are coloured boxes; Divider is a line with the text.",
|
|
146
171
|
children: /* @__PURE__ */ t(
|
|
147
|
-
|
|
172
|
+
y,
|
|
148
173
|
{
|
|
149
174
|
value: l.content_tone ?? "info",
|
|
150
175
|
options: [
|
|
@@ -152,21 +177,58 @@ function ve({ group: l, readOnly: y }) {
|
|
|
152
177
|
{ value: "warn", label: "Warning" },
|
|
153
178
|
{ value: "divider", label: "Divider" }
|
|
154
179
|
],
|
|
155
|
-
onChange: (e) =>
|
|
180
|
+
onChange: (e) => s({ content_tone: e }, `Change the style of ${n}`)
|
|
156
181
|
}
|
|
157
182
|
)
|
|
158
183
|
}
|
|
159
184
|
),
|
|
160
185
|
/* @__PURE__ */ t(d, { k: "group.content", label: "Text", effect: "The words this block shows on the form.", children: /* @__PURE__ */ t(
|
|
161
|
-
|
|
186
|
+
Y,
|
|
162
187
|
{
|
|
163
188
|
ariaLabel: "Text",
|
|
164
189
|
value: l.content ?? "",
|
|
165
|
-
onChange: (e) =>
|
|
190
|
+
onChange: (e) => s({ content: e || null }, `Edit the text of ${n}`, !0)
|
|
166
191
|
}
|
|
167
192
|
) })
|
|
168
193
|
] }),
|
|
169
|
-
|
|
194
|
+
(i === "section" || i === "tab") && /* @__PURE__ */ r(I, { children: [
|
|
195
|
+
/* @__PURE__ */ t(
|
|
196
|
+
d,
|
|
197
|
+
{
|
|
198
|
+
k: "group.content",
|
|
199
|
+
label: "Intro",
|
|
200
|
+
effect: "A short note at the top: what to fill in here and why. Empty shows none.",
|
|
201
|
+
children: /* @__PURE__ */ t(
|
|
202
|
+
Y,
|
|
203
|
+
{
|
|
204
|
+
ariaLabel: "Intro",
|
|
205
|
+
value: l.content ?? "",
|
|
206
|
+
onChange: (e) => s({ content: e || null }, `Edit the intro of ${n}`, !0)
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
!!((B = l.content) != null && B.trim()) && /* @__PURE__ */ t(
|
|
212
|
+
d,
|
|
213
|
+
{
|
|
214
|
+
k: "group.content_tone",
|
|
215
|
+
label: "Intro style",
|
|
216
|
+
effect: "Note is a quiet box; Warning is amber.",
|
|
217
|
+
children: /* @__PURE__ */ t(
|
|
218
|
+
y,
|
|
219
|
+
{
|
|
220
|
+
value: l.content_tone === "warn" ? "warn" : "info",
|
|
221
|
+
options: [
|
|
222
|
+
{ value: "info", label: "Note" },
|
|
223
|
+
{ value: "warn", label: "Warning" }
|
|
224
|
+
],
|
|
225
|
+
onChange: (e) => s({ content_tone: e }, `Change the intro style of ${n}`)
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
] }),
|
|
231
|
+
v && /* @__PURE__ */ r(I, { children: [
|
|
170
232
|
/* @__PURE__ */ t(
|
|
171
233
|
d,
|
|
172
234
|
{
|
|
@@ -174,7 +236,7 @@ function ve({ group: l, readOnly: y }) {
|
|
|
174
236
|
label: "Show",
|
|
175
237
|
effect: "On new records, existing ones or both.",
|
|
176
238
|
children: /* @__PURE__ */ t(
|
|
177
|
-
|
|
239
|
+
y,
|
|
178
240
|
{
|
|
179
241
|
value: l.visibility_mode ?? "always",
|
|
180
242
|
options: [
|
|
@@ -182,19 +244,19 @@ function ve({ group: l, readOnly: y }) {
|
|
|
182
244
|
{ value: "new_only", label: "New records" },
|
|
183
245
|
{ value: "existing_only", label: "Existing" }
|
|
184
246
|
],
|
|
185
|
-
onChange: (e) =>
|
|
247
|
+
onChange: (e) => s({ visibility_mode: e }, `Change when ${n} shows`)
|
|
186
248
|
}
|
|
187
249
|
)
|
|
188
250
|
}
|
|
189
251
|
),
|
|
190
252
|
/* @__PURE__ */ t(
|
|
191
|
-
|
|
253
|
+
g,
|
|
192
254
|
{
|
|
193
255
|
k: "group.hide_when_empty",
|
|
194
256
|
label: "Hide when all its fields are empty",
|
|
195
257
|
effect: "The section disappears while none of its fields has a value.",
|
|
196
258
|
checked: l.hide_when_empty,
|
|
197
|
-
onChange: (e) =>
|
|
259
|
+
onChange: (e) => s({ hide_when_empty: e }, `Change when ${n} hides`)
|
|
198
260
|
}
|
|
199
261
|
),
|
|
200
262
|
/* @__PURE__ */ t(
|
|
@@ -204,7 +266,7 @@ function ve({ group: l, readOnly: y }) {
|
|
|
204
266
|
label: "Width when reading",
|
|
205
267
|
effect: "On the read view, summary and detail panels. Automatic: half for a short list, full for grids.",
|
|
206
268
|
children: /* @__PURE__ */ t(
|
|
207
|
-
|
|
269
|
+
y,
|
|
208
270
|
{
|
|
209
271
|
value: l.read_width ?? "",
|
|
210
272
|
options: [
|
|
@@ -213,13 +275,87 @@ function ve({ group: l, readOnly: y }) {
|
|
|
213
275
|
{ value: "half", label: "½" },
|
|
214
276
|
{ value: "third", label: "⅓" }
|
|
215
277
|
],
|
|
216
|
-
onChange: (e) =>
|
|
278
|
+
onChange: (e) => s({ read_width: e || null }, `Change the read width of ${n}`)
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
/* @__PURE__ */ t(
|
|
284
|
+
d,
|
|
285
|
+
{
|
|
286
|
+
k: "group.empty_text",
|
|
287
|
+
label: "When nothing is filled",
|
|
288
|
+
effect: "Shown in the read view and the PDF instead of empty values, such as “No shipping details yet”. Empty: the values show as dashes.",
|
|
289
|
+
children: /* @__PURE__ */ t(
|
|
290
|
+
S,
|
|
291
|
+
{
|
|
292
|
+
ariaLabel: "When nothing is filled",
|
|
293
|
+
value: w.emptyText ?? "",
|
|
294
|
+
placeholder: "No details yet",
|
|
295
|
+
onChange: (e) => o.apply([pe(l, e)], {
|
|
296
|
+
label: `Change the empty text of ${n}`,
|
|
297
|
+
text: !0
|
|
298
|
+
})
|
|
217
299
|
}
|
|
218
300
|
)
|
|
219
301
|
}
|
|
302
|
+
),
|
|
303
|
+
i === "section" && !l.parent_key && /* @__PURE__ */ t(
|
|
304
|
+
g,
|
|
305
|
+
{
|
|
306
|
+
k: "group.sticky",
|
|
307
|
+
label: "Stick to the top",
|
|
308
|
+
effect: "Stays at the top of the form while people scroll the rest, for totals or status. One section per form; not on phones.",
|
|
309
|
+
checked: w.sticky,
|
|
310
|
+
onChange: (e) => {
|
|
311
|
+
const a = fe(o.bundle, l.key, e);
|
|
312
|
+
a.ok && o.apply(a.ops, { label: a.label });
|
|
313
|
+
}
|
|
314
|
+
}
|
|
220
315
|
)
|
|
221
316
|
] }),
|
|
222
|
-
|
|
317
|
+
(i === "section" || i === "tab") && /* @__PURE__ */ t($, { title: "Side by side", children: /* @__PURE__ */ t(
|
|
318
|
+
d,
|
|
319
|
+
{
|
|
320
|
+
k: "group.row_groups",
|
|
321
|
+
label: "Rows of fields",
|
|
322
|
+
effect: "Short fields that share one row under one label, like Street / City / Zip. To add one, select the fields on the form, right-click and pick Put side by side.",
|
|
323
|
+
children: w.rows.length === 0 ? /* @__PURE__ */ t("p", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "No rows yet." }) : /* @__PURE__ */ t("div", { className: "space-y-2", children: w.rows.map((e) => /* @__PURE__ */ r("div", { className: "space-y-1", "data-row-group-setting": e.key, children: [
|
|
324
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: [
|
|
325
|
+
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ t(
|
|
326
|
+
S,
|
|
327
|
+
{
|
|
328
|
+
ariaLabel: `Label of the row ${e.label}`,
|
|
329
|
+
value: e.label,
|
|
330
|
+
onChange: (a) => {
|
|
331
|
+
const c = X(o.bundle, l.key, e.key, { label: a });
|
|
332
|
+
c.ok && o.apply(c.ops, { label: c.label, text: !0 });
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
) }),
|
|
336
|
+
/* @__PURE__ */ t(
|
|
337
|
+
"button",
|
|
338
|
+
{
|
|
339
|
+
type: "button",
|
|
340
|
+
onClick: () => {
|
|
341
|
+
const a = X(o.bundle, l.key, e.key, null);
|
|
342
|
+
a.ok && o.apply(a.ops, { label: a.label });
|
|
343
|
+
},
|
|
344
|
+
className: "shrink-0 rounded-md px-2 py-1 text-[12px] text-slate-600 hover:bg-muted hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",
|
|
345
|
+
children: "Take apart"
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
] }),
|
|
349
|
+
/* @__PURE__ */ t("p", { className: "truncate text-[12px] text-slate-500 dark:text-muted-foreground", children: e.fields.map((a) => {
|
|
350
|
+
const c = o.bundle.placements.find(
|
|
351
|
+
(N) => N.field === a && N.group_key === l.key
|
|
352
|
+
) ?? null;
|
|
353
|
+
return Z(a, m, f, c).label;
|
|
354
|
+
}).join(" · ") })
|
|
355
|
+
] }, e.key)) })
|
|
356
|
+
}
|
|
357
|
+
) }),
|
|
358
|
+
i === "tab" && /* @__PURE__ */ r($, { title: "As a step", children: [
|
|
223
359
|
/* @__PURE__ */ t(
|
|
224
360
|
d,
|
|
225
361
|
{
|
|
@@ -227,38 +363,50 @@ function ve({ group: l, readOnly: y }) {
|
|
|
227
363
|
label: "Skip as the first step when filled",
|
|
228
364
|
effect: "Opens on a later step when these fields already have values.",
|
|
229
365
|
children: /* @__PURE__ */ t(
|
|
230
|
-
|
|
366
|
+
be,
|
|
231
367
|
{
|
|
232
368
|
ariaLabel: "Skip as the first step when filled",
|
|
233
|
-
value:
|
|
234
|
-
options:
|
|
235
|
-
onChange: (e) =>
|
|
369
|
+
value: k(l.skip_if_filled),
|
|
370
|
+
options: D,
|
|
371
|
+
onChange: (e) => s({ skip_if_filled: _(e) }, `Change when ${n} is skipped`)
|
|
236
372
|
}
|
|
237
373
|
)
|
|
238
374
|
}
|
|
239
375
|
),
|
|
240
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ r(
|
|
241
377
|
d,
|
|
242
378
|
{
|
|
243
379
|
k: "group.visible_when",
|
|
244
380
|
label: "Only when",
|
|
245
381
|
effect: "The step shows only while every condition holds. No conditions: always.",
|
|
246
|
-
children:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ t(
|
|
384
|
+
ye,
|
|
385
|
+
{
|
|
386
|
+
value: ee,
|
|
387
|
+
fields: D,
|
|
388
|
+
onChange: (e) => {
|
|
389
|
+
K(e);
|
|
390
|
+
const a = e.filter((c) => c.field);
|
|
391
|
+
JSON.stringify(a) !== C && s({ visible_when: _(a) }, `Change when ${n} shows`, !0);
|
|
392
|
+
}
|
|
255
393
|
}
|
|
256
|
-
|
|
257
|
-
|
|
394
|
+
),
|
|
395
|
+
/* @__PURE__ */ t(
|
|
396
|
+
se,
|
|
397
|
+
{
|
|
398
|
+
layoutId: Number(o.bundle.layout.id),
|
|
399
|
+
target: { kind: "step", group: l.key },
|
|
400
|
+
bundle: o.bundle,
|
|
401
|
+
apply: (e, a) => o.apply(e, a),
|
|
402
|
+
disabled: u
|
|
403
|
+
}
|
|
404
|
+
)
|
|
405
|
+
]
|
|
258
406
|
}
|
|
259
407
|
)
|
|
260
408
|
] }),
|
|
261
|
-
|
|
409
|
+
v && /* @__PURE__ */ r($, { title: "Who", children: [
|
|
262
410
|
/* @__PURE__ */ t(
|
|
263
411
|
d,
|
|
264
412
|
{
|
|
@@ -266,10 +414,10 @@ function ve({ group: l, readOnly: y }) {
|
|
|
266
414
|
label: "Hidden for",
|
|
267
415
|
effect: "People in these roles do not see it. Admins always do.",
|
|
268
416
|
children: /* @__PURE__ */ t(
|
|
269
|
-
|
|
417
|
+
q,
|
|
270
418
|
{
|
|
271
|
-
roleIds:
|
|
272
|
-
onRoleIdsChange: (e) =>
|
|
419
|
+
roleIds: k(l.hidden_for_roles),
|
|
420
|
+
onRoleIdsChange: (e) => s({ hidden_for_roles: _(e) }, `Change who sees ${n}`)
|
|
273
421
|
}
|
|
274
422
|
)
|
|
275
423
|
}
|
|
@@ -281,69 +429,69 @@ function ve({ group: l, readOnly: y }) {
|
|
|
281
429
|
label: "Read-only for",
|
|
282
430
|
effect: "People in these roles cannot change it; the server drops their writes. Admins are exempt.",
|
|
283
431
|
children: /* @__PURE__ */ t(
|
|
284
|
-
|
|
432
|
+
q,
|
|
285
433
|
{
|
|
286
|
-
roleIds:
|
|
287
|
-
onRoleIdsChange: (e) =>
|
|
434
|
+
roleIds: k(l.locked_for_roles),
|
|
435
|
+
onRoleIdsChange: (e) => s({ locked_for_roles: _(e) }, `Change who can edit ${n}`)
|
|
288
436
|
}
|
|
289
437
|
)
|
|
290
438
|
}
|
|
291
439
|
)
|
|
292
440
|
] }),
|
|
293
|
-
|
|
441
|
+
v && /* @__PURE__ */ r($, { title: "When collapsed", children: [
|
|
294
442
|
/* @__PURE__ */ t(
|
|
295
443
|
d,
|
|
296
444
|
{
|
|
297
445
|
k: "group.summary_fields",
|
|
298
446
|
label: "Show these values in the heading",
|
|
299
447
|
effect: "A short summary while the section is closed.",
|
|
300
|
-
children:
|
|
448
|
+
children: j.length === 0 ? /* @__PURE__ */ r("p", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: [
|
|
301
449
|
"Place fields in ",
|
|
302
|
-
|
|
450
|
+
n,
|
|
303
451
|
" first."
|
|
304
|
-
] }) : /* @__PURE__ */ t("div", { className: "space-y-1.5", children:
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
452
|
+
] }) : /* @__PURE__ */ t("div", { className: "space-y-1.5", children: j.map((e) => {
|
|
453
|
+
const a = x.find((h) => h.field === e), c = ke(e, f) === "O2M", N = o.bundle.placements.find((h) => h.field === e) ?? null, O = Z(e, m, f, N).label, E = (h, b, le) => G(
|
|
454
|
+
x.map((A) => A.field === e ? { ...A, ...h } : A),
|
|
455
|
+
b,
|
|
456
|
+
le
|
|
309
457
|
);
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
458
|
+
return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
459
|
+
/* @__PURE__ */ r("label", { className: "flex items-center gap-2 text-[12px]", children: [
|
|
312
460
|
/* @__PURE__ */ t(
|
|
313
461
|
"input",
|
|
314
462
|
{
|
|
315
463
|
type: "checkbox",
|
|
316
|
-
checked: !!
|
|
317
|
-
onChange: (
|
|
318
|
-
|
|
319
|
-
`Change the summary of ${
|
|
464
|
+
checked: !!a,
|
|
465
|
+
onChange: (h) => G(
|
|
466
|
+
h.target.checked ? [...x, c ? { field: e, agg: "count" } : { field: e }] : x.filter((b) => b.field !== e),
|
|
467
|
+
`Change the summary of ${n}`
|
|
320
468
|
),
|
|
321
469
|
className: "h-3.5 w-3.5 accent-nvr-cyan"
|
|
322
470
|
}
|
|
323
471
|
),
|
|
324
|
-
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children:
|
|
325
|
-
|
|
472
|
+
/* @__PURE__ */ t("span", { className: "flex-1 truncate", children: O }),
|
|
473
|
+
c && /* @__PURE__ */ t("span", { className: "text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "list" })
|
|
326
474
|
] }),
|
|
327
|
-
|
|
475
|
+
a && /* @__PURE__ */ r("div", { className: "space-y-1 pl-5", children: [
|
|
328
476
|
/* @__PURE__ */ t("div", { "data-setting": "group.summary_fields.label", children: /* @__PURE__ */ t(
|
|
329
|
-
|
|
477
|
+
S,
|
|
330
478
|
{
|
|
331
|
-
ariaLabel: `Label for ${
|
|
332
|
-
value:
|
|
333
|
-
placeholder: `Label (${
|
|
334
|
-
onChange: (
|
|
335
|
-
{ label:
|
|
336
|
-
`Change the summary of ${
|
|
479
|
+
ariaLabel: `Label for ${O}`,
|
|
480
|
+
value: a.label ?? "",
|
|
481
|
+
placeholder: `Label (${O})`,
|
|
482
|
+
onChange: (h) => E(
|
|
483
|
+
{ label: h || null },
|
|
484
|
+
`Change the summary of ${n}`,
|
|
337
485
|
!0
|
|
338
486
|
)
|
|
339
487
|
}
|
|
340
488
|
) }),
|
|
341
|
-
|
|
489
|
+
c && /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
|
|
342
490
|
/* @__PURE__ */ t("div", { className: "flex-1", "data-setting": "group.summary_fields.agg", children: /* @__PURE__ */ t(
|
|
343
|
-
|
|
491
|
+
F,
|
|
344
492
|
{
|
|
345
493
|
ariaLabel: "Show",
|
|
346
|
-
value:
|
|
494
|
+
value: a.agg ?? "count",
|
|
347
495
|
options: [
|
|
348
496
|
{ value: "count", label: "Count" },
|
|
349
497
|
{ value: "sum", label: "Sum" },
|
|
@@ -351,25 +499,25 @@ function ve({ group: l, readOnly: y }) {
|
|
|
351
499
|
{ value: "min", label: "Smallest" },
|
|
352
500
|
{ value: "max", label: "Largest" }
|
|
353
501
|
],
|
|
354
|
-
onChange: (
|
|
355
|
-
|
|
356
|
-
`Change the summary of ${
|
|
502
|
+
onChange: (h) => E(
|
|
503
|
+
h === "count" ? { agg: h, agg_field: void 0, field_options: void 0 } : { agg: h },
|
|
504
|
+
`Change the summary of ${n}`
|
|
357
505
|
)
|
|
358
506
|
}
|
|
359
507
|
) }),
|
|
360
|
-
(
|
|
508
|
+
(a.agg ?? "count") !== "count" && /* @__PURE__ */ t(
|
|
361
509
|
"div",
|
|
362
510
|
{
|
|
363
511
|
className: "flex-1",
|
|
364
512
|
"data-setting": "group.summary_fields.agg_field",
|
|
365
513
|
children: /* @__PURE__ */ t(
|
|
366
|
-
|
|
514
|
+
re,
|
|
367
515
|
{
|
|
368
|
-
relatedCollection:
|
|
369
|
-
value:
|
|
370
|
-
onChange: (
|
|
371
|
-
{ agg_field:
|
|
372
|
-
`Change the summary of ${
|
|
516
|
+
relatedCollection: _e(e, f),
|
|
517
|
+
value: a.agg_field ?? "",
|
|
518
|
+
onChange: (h, b) => E(
|
|
519
|
+
{ agg_field: h, field_options: b },
|
|
520
|
+
`Change the summary of ${n}`
|
|
373
521
|
)
|
|
374
522
|
}
|
|
375
523
|
)
|
|
@@ -382,44 +530,46 @@ function ve({ group: l, readOnly: y }) {
|
|
|
382
530
|
}
|
|
383
531
|
),
|
|
384
532
|
/* @__PURE__ */ t(
|
|
385
|
-
|
|
533
|
+
g,
|
|
386
534
|
{
|
|
387
535
|
k: "group.summary_hide_empty",
|
|
388
536
|
label: "Leave out empty values",
|
|
389
537
|
effect: "Fields without a value are left out of the summary line.",
|
|
390
538
|
checked: l.summary_hide_empty,
|
|
391
|
-
onChange: (e) =>
|
|
539
|
+
onChange: (e) => s({ summary_hide_empty: e }, `Change the summary of ${n}`)
|
|
392
540
|
}
|
|
393
541
|
)
|
|
394
542
|
] }),
|
|
395
|
-
|
|
396
|
-
|
|
543
|
+
v && /* @__PURE__ */ t(
|
|
544
|
+
de,
|
|
397
545
|
{
|
|
398
546
|
group: { id: l.id ?? 0, swap_config: l.swap_config },
|
|
399
547
|
allFields: m.map((e) => ({ field: e.field, type: e.type ?? void 0 })),
|
|
400
|
-
onGroupSettings: (e,
|
|
548
|
+
onGroupSettings: (e, a) => s(a, `Change the field swap of ${n}`)
|
|
401
549
|
}
|
|
402
550
|
),
|
|
551
|
+
!u && /* @__PURE__ */ t(he, { bundle: o.bundle, collection: o.collection, group: l }),
|
|
552
|
+
/* @__PURE__ */ t(ve, { group: l }),
|
|
403
553
|
/* @__PURE__ */ t(
|
|
404
554
|
"div",
|
|
405
555
|
{
|
|
406
556
|
"data-setting": "group.delete",
|
|
407
557
|
className: "border-t border-slate-200 pt-3 dark:border-border",
|
|
408
|
-
children:
|
|
409
|
-
/* @__PURE__ */
|
|
558
|
+
children: te ? /* @__PURE__ */ r("div", { className: "space-y-2 rounded-md border border-red-200 bg-red-50 p-2.5 text-[12px] text-red-900 dark:border-red-800/60 dark:bg-red-950/30 dark:text-red-100", children: [
|
|
559
|
+
/* @__PURE__ */ r("p", { children: [
|
|
410
560
|
"Delete ",
|
|
411
|
-
|
|
561
|
+
n,
|
|
412
562
|
"? Its fields move to the top of the form",
|
|
413
|
-
|
|
563
|
+
L.length ? " and its tabs move out" : "",
|
|
414
564
|
". Undo brings it back."
|
|
415
565
|
] }),
|
|
416
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
417
567
|
/* @__PURE__ */ t(
|
|
418
568
|
"button",
|
|
419
569
|
{
|
|
420
570
|
type: "button",
|
|
421
|
-
onClick: () =>
|
|
422
|
-
label: `Delete ${
|
|
571
|
+
onClick: () => o.apply([{ op: "group_remove", key: l.key, placements: "ungroup" }], {
|
|
572
|
+
label: `Delete ${n}`
|
|
423
573
|
}),
|
|
424
574
|
className: "rounded-md bg-red-600 px-2.5 py-1 text-[12px] font-medium text-white hover:bg-red-700",
|
|
425
575
|
children: "Delete"
|
|
@@ -429,21 +579,21 @@ function ve({ group: l, readOnly: y }) {
|
|
|
429
579
|
"button",
|
|
430
580
|
{
|
|
431
581
|
type: "button",
|
|
432
|
-
onClick: () =>
|
|
582
|
+
onClick: () => z(!1),
|
|
433
583
|
className: "rounded-md px-2.5 py-1 text-[12px] hover:bg-red-100 dark:hover:bg-red-900/40",
|
|
434
584
|
children: "Keep"
|
|
435
585
|
}
|
|
436
586
|
)
|
|
437
587
|
] })
|
|
438
|
-
] }) : /* @__PURE__ */
|
|
588
|
+
] }) : /* @__PURE__ */ r(
|
|
439
589
|
"button",
|
|
440
590
|
{
|
|
441
591
|
type: "button",
|
|
442
|
-
onClick: () =>
|
|
592
|
+
onClick: () => z(!0),
|
|
443
593
|
className: "text-[12px] text-red-600 hover:underline dark:text-red-400",
|
|
444
594
|
children: [
|
|
445
595
|
"Delete ",
|
|
446
|
-
((
|
|
596
|
+
((H = T[i]) == null ? void 0 : H.toLowerCase()) ?? "section"
|
|
447
597
|
]
|
|
448
598
|
}
|
|
449
599
|
)
|
|
@@ -452,5 +602,5 @@ function ve({ group: l, readOnly: y }) {
|
|
|
452
602
|
] });
|
|
453
603
|
}
|
|
454
604
|
export {
|
|
455
|
-
|
|
605
|
+
je as GroupInspector
|
|
456
606
|
};
|