@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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HEADER_GROUP_KEY as f, UNGROUPED_KEY as p } from "../../lib/layout-ops.js";
|
|
2
|
+
import { titleCase as k } from "../../lib/utils.js";
|
|
3
|
+
import { targetKey as _ } from "./design-context.js";
|
|
4
|
+
import { slotName as m } from "./slot-names.js";
|
|
5
|
+
const l = (e) => /^__.+__$/.test(e);
|
|
6
|
+
function s(e, r) {
|
|
7
|
+
return r === f ? [{ kind: "header", field: e }] : l(e) ? [{ kind: "slot", field: e, group_key: r }] : [{ kind: "field", field: e, group_key: r }];
|
|
8
|
+
}
|
|
9
|
+
const a = (e) => ({
|
|
10
|
+
kind: "group",
|
|
11
|
+
key: e ?? p
|
|
12
|
+
});
|
|
13
|
+
function h(e) {
|
|
14
|
+
switch (e.op) {
|
|
15
|
+
case "place":
|
|
16
|
+
return s(e.field, e.group_key ?? null);
|
|
17
|
+
case "move":
|
|
18
|
+
return s(e.from.field, e.to_group_key ?? null);
|
|
19
|
+
case "update_placement":
|
|
20
|
+
return s(e.at.field, e.at.group_key ?? null);
|
|
21
|
+
case "remove":
|
|
22
|
+
return e.at.group_key === f ? [] : [a(e.at.group_key ?? null)];
|
|
23
|
+
case "group_create":
|
|
24
|
+
case "group_update":
|
|
25
|
+
return [a(e.key)];
|
|
26
|
+
case "group_move":
|
|
27
|
+
return l(e.key) ? [{ kind: "slot", field: e.key, group_key: null }] : [a(e.key)];
|
|
28
|
+
default:
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function v(e) {
|
|
33
|
+
const r = /* @__PURE__ */ new Set(), t = [];
|
|
34
|
+
for (const n of e.ops)
|
|
35
|
+
for (const u of h(n)) {
|
|
36
|
+
const i = _(u);
|
|
37
|
+
r.has(i) || (r.add(i), t.push(u));
|
|
38
|
+
}
|
|
39
|
+
return t;
|
|
40
|
+
}
|
|
41
|
+
function U(e) {
|
|
42
|
+
const r = /* @__PURE__ */ new Set();
|
|
43
|
+
for (const t of e) for (const n of v(t)) r.add(_(n));
|
|
44
|
+
return r;
|
|
45
|
+
}
|
|
46
|
+
function $(e) {
|
|
47
|
+
return e.ops.some((r) => r.op === "layout_update");
|
|
48
|
+
}
|
|
49
|
+
function R(e) {
|
|
50
|
+
const [r, t, ...n] = e.split(":");
|
|
51
|
+
if (!t) return null;
|
|
52
|
+
const u = n.join(":") || null;
|
|
53
|
+
return r === "group" ? { kind: "group", key: [t, ...n].join(":") } : r === "header" ? { kind: "header", field: t } : r === "field" || r === "slot" ? { kind: r, field: t, group_key: u } : null;
|
|
54
|
+
}
|
|
55
|
+
function j(e, r, t = []) {
|
|
56
|
+
var d;
|
|
57
|
+
const n = (o) => {
|
|
58
|
+
var g;
|
|
59
|
+
return o == null || o === p ? "Ungrouped" : ((g = r == null ? void 0 : r.groups.find((y) => y.key === o)) == null ? void 0 : g.label) || k(o);
|
|
60
|
+
};
|
|
61
|
+
if (e.kind === "group") return n(e.key);
|
|
62
|
+
const u = e.kind === "header" ? f : e.group_key, i = r == null ? void 0 : r.placements.find((o) => o.field === e.field && o.group_key === u), c = (i == null ? void 0 : i.label_override) || (l(e.field) ? m(e.field) : ((d = t.find((o) => o.field === e.field)) == null ? void 0 : d.label) || k(e.field));
|
|
63
|
+
return e.kind === "header" ? `${c} in the header` : `${c} in ${n(e.group_key)}`;
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
j as describeTarget,
|
|
67
|
+
h as opTargets,
|
|
68
|
+
v as stepTargets,
|
|
69
|
+
R as targetFromKey,
|
|
70
|
+
$ as touchesSettings,
|
|
71
|
+
U as unsavedKeys
|
|
72
|
+
};
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { jsxs as l, Fragment as k, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { FlaskConical as V } from "lucide-react";
|
|
3
|
+
import { useState as f, useMemo as H } from "react";
|
|
4
|
+
import { toast as w } from "sonner";
|
|
5
|
+
import { cn as L } from "../../../lib/utils.js";
|
|
6
|
+
import { SimpleSelect as C } from "../../ui/SimpleSelect.js";
|
|
7
|
+
import { Skeleton as S } from "../../ui/skeleton.js";
|
|
8
|
+
import { apiFailure as j, useLayoutOverview as q } from "../overview/overview-api.js";
|
|
9
|
+
import { useAbTest as U, useAbResults as K, useAbActions as B, useSplittableRoles as W } from "./ab-api.js";
|
|
10
|
+
import { formatDuration as $ } from "./usage-api.js";
|
|
11
|
+
const Y = "px-3 pb-1.5 pt-4 text-[12px] font-semibold text-slate-700 dark:text-foreground", x = "px-3 text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", R = "inline-flex h-7 items-center rounded-md bg-nvr-cyan px-2.5 text-[12px] font-medium text-white transition-opacity hover:opacity-90 disabled:opacity-40", z = "inline-flex h-7 items-center rounded-md px-2 text-[12px] text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 disabled:opacity-40 dark:text-muted-foreground dark:hover:text-foreground", A = "inline-flex h-7 items-center rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 transition-colors hover:bg-muted disabled:opacity-40 dark:border-border dark:bg-card dark:text-foreground", _ = 20, p = "__copy__", I = (e) => e ? new Date(e).toLocaleDateString(void 0, { month: "short", day: "numeric" }) : "", N = (e) => e == null ? "—" : `${Math.round(e * 100)}%`, i = (e) => e.toLocaleString();
|
|
12
|
+
function E(e, o) {
|
|
13
|
+
w.error(j(e, o).message);
|
|
14
|
+
}
|
|
15
|
+
function G(e) {
|
|
16
|
+
const o = (r, n) => r == null || n == null ? null : [r, n], a = (r) => r.created > 0 ? r.edited_after_save / r.created : null;
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
label: "People in the half",
|
|
20
|
+
a: i(e.a.people),
|
|
21
|
+
b: i(e.b.people),
|
|
22
|
+
cmp: null,
|
|
23
|
+
better: null
|
|
24
|
+
},
|
|
25
|
+
{ label: "Opened", a: i(e.a.opens), b: i(e.b.opens), cmp: null, better: null },
|
|
26
|
+
{
|
|
27
|
+
label: "Saved",
|
|
28
|
+
a: N(e.a.save_rate),
|
|
29
|
+
b: N(e.b.save_rate),
|
|
30
|
+
tipA: `${i(e.a.saves)} saves in ${i(e.a.opens)} visits`,
|
|
31
|
+
tipB: `${i(e.b.saves)} saves in ${i(e.b.opens)} visits`,
|
|
32
|
+
cmp: o(e.a.save_rate, e.b.save_rate),
|
|
33
|
+
better: "higher"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Time to save",
|
|
37
|
+
a: e.a.avg_save_ms == null ? "—" : $(e.a.avg_save_ms),
|
|
38
|
+
b: e.b.avg_save_ms == null ? "—" : $(e.b.avg_save_ms),
|
|
39
|
+
cmp: o(e.a.avg_save_ms, e.b.avg_save_ms),
|
|
40
|
+
better: "lower"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: "Left unfinished",
|
|
44
|
+
a: i(e.a.abandons),
|
|
45
|
+
b: i(e.b.abandons),
|
|
46
|
+
cmp: e.a.opens > 0 && e.b.opens > 0 ? [e.a.abandons / e.a.opens, e.b.abandons / e.b.opens] : null,
|
|
47
|
+
better: "lower"
|
|
48
|
+
},
|
|
49
|
+
{ label: "Records created", a: i(e.a.created), b: i(e.b.created), cmp: null, better: null },
|
|
50
|
+
{
|
|
51
|
+
label: "Edited again within a day",
|
|
52
|
+
a: e.a.created ? N(a(e.a)) : "—",
|
|
53
|
+
b: e.b.created ? N(a(e.b)) : "—",
|
|
54
|
+
tipA: `${i(e.a.edited_after_save)} of ${i(e.a.created)} records`,
|
|
55
|
+
tipB: `${i(e.b.edited_after_save)} of ${i(e.b.created)} records`,
|
|
56
|
+
cmp: o(a(e.a), a(e.b)),
|
|
57
|
+
better: "lower"
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
function J(e) {
|
|
62
|
+
if (!e.cmp || !e.better) return null;
|
|
63
|
+
const [o, a] = e.cmp;
|
|
64
|
+
return o === a ? null : (e.better === "higher" ? o > a : o < a) ? "a" : "b";
|
|
65
|
+
}
|
|
66
|
+
function Q({ test: e, layoutId: o }) {
|
|
67
|
+
const { data: a, isLoading: r, isError: n } = K(o, !0);
|
|
68
|
+
if (r) return /* @__PURE__ */ t(S, { className: "mx-3 h-40 rounded-lg" });
|
|
69
|
+
if (n || !a)
|
|
70
|
+
return /* @__PURE__ */ t("p", { className: x, children: "The numbers could not be loaded. Try again in a moment." });
|
|
71
|
+
const h = G(a), d = a.a.opens < _ || a.b.opens < _, u = (s, b) => /* @__PURE__ */ t(
|
|
72
|
+
"th",
|
|
73
|
+
{
|
|
74
|
+
scope: "col",
|
|
75
|
+
className: "px-2 py-1.5 text-right text-[11.5px] font-medium text-slate-500 dark:text-muted-foreground",
|
|
76
|
+
"data-tip": b,
|
|
77
|
+
children: s
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
return /* @__PURE__ */ l(k, { children: [
|
|
81
|
+
/* @__PURE__ */ t("div", { className: "mx-3 overflow-hidden rounded-lg border border-slate-200 dark:border-border", children: /* @__PURE__ */ l("table", { "data-ab-results": "", className: "w-full table-fixed text-[12px]", children: [
|
|
82
|
+
/* @__PURE__ */ l("colgroup", { children: [
|
|
83
|
+
/* @__PURE__ */ t("col", { className: "w-[40%]" }),
|
|
84
|
+
/* @__PURE__ */ t("col", {}),
|
|
85
|
+
/* @__PURE__ */ t("col", {})
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ t("thead", { className: "bg-slate-50 dark:bg-muted/40", children: /* @__PURE__ */ l("tr", { children: [
|
|
88
|
+
/* @__PURE__ */ t("th", { scope: "col", className: "px-2 py-1.5 text-left", children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Measure" }) }),
|
|
89
|
+
u("Original", e.control.name),
|
|
90
|
+
u("New", e.variant.name)
|
|
91
|
+
] }) }),
|
|
92
|
+
/* @__PURE__ */ t("tbody", { children: h.map((s) => {
|
|
93
|
+
const b = d ? null : J(s), c = (g, v) => /* @__PURE__ */ t(
|
|
94
|
+
"td",
|
|
95
|
+
{
|
|
96
|
+
"data-tip": g === "a" ? s.tipA : s.tipB,
|
|
97
|
+
className: L(
|
|
98
|
+
"whitespace-nowrap px-2 py-1.5 text-right tabular-nums",
|
|
99
|
+
b === g ? "font-semibold text-slate-900 dark:text-foreground" : "text-slate-600 dark:text-muted-foreground"
|
|
100
|
+
),
|
|
101
|
+
children: v
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
return /* @__PURE__ */ l(
|
|
105
|
+
"tr",
|
|
106
|
+
{
|
|
107
|
+
className: "border-t border-slate-100 first:border-t-0 dark:border-border",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ t(
|
|
110
|
+
"th",
|
|
111
|
+
{
|
|
112
|
+
scope: "row",
|
|
113
|
+
className: "px-2 py-1.5 text-left font-normal text-slate-700 dark:text-foreground",
|
|
114
|
+
children: s.label
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
c("a", s.a),
|
|
118
|
+
c("b", s.b)
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
s.label
|
|
122
|
+
);
|
|
123
|
+
}) })
|
|
124
|
+
] }) }),
|
|
125
|
+
/* @__PURE__ */ l("p", { className: `${x} pt-1.5`, children: [
|
|
126
|
+
d ? `Too few visits to compare yet: the better side is marked once each half has ${_} visits.` : "The better side of each comparable line is in bold.",
|
|
127
|
+
" ",
|
|
128
|
+
"Records created and edited again count records people in each half made since",
|
|
129
|
+
" ",
|
|
130
|
+
I(a.since),
|
|
131
|
+
", on any form.",
|
|
132
|
+
!a.ready && " Visits are not being recorded on this instance yet."
|
|
133
|
+
] })
|
|
134
|
+
] });
|
|
135
|
+
}
|
|
136
|
+
function X({
|
|
137
|
+
test: e,
|
|
138
|
+
layoutId: o,
|
|
139
|
+
collection: a
|
|
140
|
+
}) {
|
|
141
|
+
const r = B(o, a), [n, h] = f(!1), [d, u] = f(!1), s = async (b) => {
|
|
142
|
+
u(!0);
|
|
143
|
+
try {
|
|
144
|
+
await r.end(b), w.success(
|
|
145
|
+
b === "variant" ? `“${e.control.name}” now has the new version’s design` : "Test ended; everyone gets the original form"
|
|
146
|
+
), h(!1);
|
|
147
|
+
} catch (c) {
|
|
148
|
+
E(c, "Could not end the test");
|
|
149
|
+
} finally {
|
|
150
|
+
u(!1);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
return n ? /* @__PURE__ */ l(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
"data-ab-end-confirm": "",
|
|
157
|
+
className: "mx-3 mt-2 flex flex-col gap-2 rounded-lg border border-slate-200 bg-white p-2.5 dark:border-border dark:bg-card",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ t("p", { className: "m-0 text-[12px] leading-snug text-slate-700 dark:text-foreground", children: "Which version should everyone get?" }),
|
|
160
|
+
/* @__PURE__ */ l("p", { className: "m-0 text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: [
|
|
161
|
+
"Using the new version copies its sections and fields onto “",
|
|
162
|
+
e.control.name,
|
|
163
|
+
"”, so its links and history stay. History can put it back."
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
166
|
+
/* @__PURE__ */ t(
|
|
167
|
+
"button",
|
|
168
|
+
{
|
|
169
|
+
type: "button",
|
|
170
|
+
className: R,
|
|
171
|
+
disabled: d,
|
|
172
|
+
onClick: () => void s("variant"),
|
|
173
|
+
children: "Use the new version"
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ l(
|
|
177
|
+
"button",
|
|
178
|
+
{
|
|
179
|
+
type: "button",
|
|
180
|
+
className: A,
|
|
181
|
+
disabled: d,
|
|
182
|
+
onClick: () => void s("control"),
|
|
183
|
+
children: [
|
|
184
|
+
"Keep “",
|
|
185
|
+
e.control.name,
|
|
186
|
+
"”"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
/* @__PURE__ */ t(
|
|
191
|
+
"button",
|
|
192
|
+
{
|
|
193
|
+
type: "button",
|
|
194
|
+
className: z,
|
|
195
|
+
disabled: d,
|
|
196
|
+
onClick: () => h(!1),
|
|
197
|
+
children: "Cancel"
|
|
198
|
+
}
|
|
199
|
+
)
|
|
200
|
+
] })
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
) : /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5 px-3 pt-2", children: /* @__PURE__ */ t(
|
|
204
|
+
"button",
|
|
205
|
+
{
|
|
206
|
+
type: "button",
|
|
207
|
+
className: A,
|
|
208
|
+
onClick: () => h(!0),
|
|
209
|
+
"data-ab-end": "",
|
|
210
|
+
children: "End test"
|
|
211
|
+
}
|
|
212
|
+
) });
|
|
213
|
+
}
|
|
214
|
+
function Z({
|
|
215
|
+
bundle: e,
|
|
216
|
+
collection: o,
|
|
217
|
+
onOpenLayout: a
|
|
218
|
+
}) {
|
|
219
|
+
const r = Number(e.layout.id), { data: n = [], isLoading: h } = W(!0), { data: d } = q(o), u = B(r, o), [s, b] = f(""), [c, g] = f(p), [v, T] = f(!1), F = H(
|
|
220
|
+
() => ((d == null ? void 0 : d.rows) ?? []).filter(
|
|
221
|
+
(m) => m.layout_id !== r && m.layout_type === "grouped" && !m.is_default && m.reason.kind !== "ab"
|
|
222
|
+
),
|
|
223
|
+
[d, r]
|
|
224
|
+
);
|
|
225
|
+
if (h) return /* @__PURE__ */ t(S, { className: "mx-3 h-16 rounded-lg" });
|
|
226
|
+
if (n.length === 0)
|
|
227
|
+
return /* @__PURE__ */ t("p", { className: x, children: "There is no role to split: administrators always get the original form." });
|
|
228
|
+
const P = async () => {
|
|
229
|
+
var m;
|
|
230
|
+
if (s) {
|
|
231
|
+
T(!0);
|
|
232
|
+
try {
|
|
233
|
+
const y = c === p ? await u.copy(String(e.layout.name ?? "Form")) : Number(c);
|
|
234
|
+
await u.start(y, s);
|
|
235
|
+
const D = ((m = n.find((M) => M.id === s)) == null ? void 0 : m.name) ?? "the role";
|
|
236
|
+
w.success(`Test started: half of ${D} get the new version`), c === p && (a == null || a(y));
|
|
237
|
+
} catch (y) {
|
|
238
|
+
E(y, "Could not start the test");
|
|
239
|
+
} finally {
|
|
240
|
+
T(!1);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
return /* @__PURE__ */ l("div", { "data-ab-start": "", className: "flex flex-col gap-2 px-3", children: [
|
|
245
|
+
/* @__PURE__ */ t("p", { className: "m-0 text-[12px] leading-snug text-slate-500 dark:text-muted-foreground", children: "Show a new version of this form to half of one role, then compare how quickly each half saves and how often their records are edited again." }),
|
|
246
|
+
/* @__PURE__ */ t(
|
|
247
|
+
C,
|
|
248
|
+
{
|
|
249
|
+
value: s,
|
|
250
|
+
onChange: b,
|
|
251
|
+
ariaLabel: "Role to split",
|
|
252
|
+
className: "h-8 w-full text-[12.5px]",
|
|
253
|
+
options: [
|
|
254
|
+
{ value: "", label: "Pick a role to split" },
|
|
255
|
+
...n.map((m) => ({ value: m.id, label: m.name }))
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ t(
|
|
260
|
+
C,
|
|
261
|
+
{
|
|
262
|
+
value: c,
|
|
263
|
+
onChange: g,
|
|
264
|
+
ariaLabel: "New version",
|
|
265
|
+
className: "h-8 w-full text-[12.5px]",
|
|
266
|
+
options: [
|
|
267
|
+
{ value: p, label: "A copy of this form to change" },
|
|
268
|
+
...F.map((m) => ({ value: String(m.layout_id), label: m.name }))
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
273
|
+
"button",
|
|
274
|
+
{
|
|
275
|
+
type: "button",
|
|
276
|
+
className: R,
|
|
277
|
+
disabled: !s || v,
|
|
278
|
+
onClick: () => void P(),
|
|
279
|
+
children: v ? "Starting…" : "Start test"
|
|
280
|
+
}
|
|
281
|
+
) }),
|
|
282
|
+
c === p && /* @__PURE__ */ t("p", { className: "m-0 text-[11.5px] leading-snug text-slate-500 dark:text-muted-foreground", children: "The copy opens here so you can make your changes. People see each change as soon as it is saved." })
|
|
283
|
+
] });
|
|
284
|
+
}
|
|
285
|
+
function de({
|
|
286
|
+
bundle: e,
|
|
287
|
+
collection: o,
|
|
288
|
+
onOpenLayout: a
|
|
289
|
+
}) {
|
|
290
|
+
const r = Number(e.layout.id), { data: n, isLoading: h, isError: d } = U(r), u = e.layout.layout_type;
|
|
291
|
+
if (u != null && u !== "grouped") return null;
|
|
292
|
+
let s;
|
|
293
|
+
if (h) s = /* @__PURE__ */ t(S, { className: "mx-3 h-12 rounded-lg" });
|
|
294
|
+
else if (d) s = /* @__PURE__ */ t("p", { className: x, children: "The A/B test could not be loaded." });
|
|
295
|
+
else if (!n)
|
|
296
|
+
s = /* @__PURE__ */ t(Z, { bundle: e, collection: o, onOpenLayout: a });
|
|
297
|
+
else {
|
|
298
|
+
const b = n.side === "variant", c = b ? n.control : n.variant;
|
|
299
|
+
s = /* @__PURE__ */ l(k, { children: [
|
|
300
|
+
/* @__PURE__ */ l("p", { "data-ab-running": "", className: x, children: [
|
|
301
|
+
/* @__PURE__ */ t(V, { className: "mr-1 inline h-3.5 w-3.5 align-[-2px] text-slate-400" }),
|
|
302
|
+
/* @__PURE__ */ l("span", { children: [
|
|
303
|
+
b ? /* @__PURE__ */ l(k, { children: [
|
|
304
|
+
"This is the new version: half of",
|
|
305
|
+
" ",
|
|
306
|
+
/* @__PURE__ */ t("b", { className: "font-semibold text-slate-700 dark:text-foreground", children: n.role.name }),
|
|
307
|
+
" ",
|
|
308
|
+
"get it instead of “",
|
|
309
|
+
n.control.name,
|
|
310
|
+
"”."
|
|
311
|
+
] }) : /* @__PURE__ */ l(k, { children: [
|
|
312
|
+
"Half of",
|
|
313
|
+
" ",
|
|
314
|
+
/* @__PURE__ */ t("b", { className: "font-semibold text-slate-700 dark:text-foreground", children: n.role.name }),
|
|
315
|
+
" ",
|
|
316
|
+
"get “",
|
|
317
|
+
n.variant.name,
|
|
318
|
+
"” instead of this form."
|
|
319
|
+
] }),
|
|
320
|
+
" ",
|
|
321
|
+
"Since ",
|
|
322
|
+
I(n.started_at),
|
|
323
|
+
n.started_by ? `, started by ${n.started_by.name}` : "",
|
|
324
|
+
"."
|
|
325
|
+
] }),
|
|
326
|
+
a && " ",
|
|
327
|
+
a && /* @__PURE__ */ l(
|
|
328
|
+
"button",
|
|
329
|
+
{
|
|
330
|
+
type: "button",
|
|
331
|
+
className: "font-medium text-[#0089ad] hover:underline dark:text-nvr-cyan",
|
|
332
|
+
onClick: () => a(c.id),
|
|
333
|
+
children: [
|
|
334
|
+
"Open “",
|
|
335
|
+
c.name,
|
|
336
|
+
"”"
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
] }),
|
|
341
|
+
/* @__PURE__ */ t("div", { className: "pt-2", children: /* @__PURE__ */ t(Q, { test: n, layoutId: r }) }),
|
|
342
|
+
/* @__PURE__ */ t(X, { test: n, layoutId: r, collection: o })
|
|
343
|
+
] });
|
|
344
|
+
}
|
|
345
|
+
return /* @__PURE__ */ l("section", { "data-ab-test": "", "aria-label": "A/B test", children: [
|
|
346
|
+
/* @__PURE__ */ t("p", { className: Y, children: "A/B test" }),
|
|
347
|
+
s
|
|
348
|
+
] });
|
|
349
|
+
}
|
|
350
|
+
export {
|
|
351
|
+
de as AbTestSection,
|
|
352
|
+
_ as MIN_VISITS_PER_HALF,
|
|
353
|
+
G as abRows,
|
|
354
|
+
J as betterSide
|
|
355
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../../lib/utils.js";
|
|
3
|
+
const l = 10;
|
|
4
|
+
function d({ pct: e }) {
|
|
5
|
+
const t = e > 0 && e < 1 ? "<1" : String(Math.round(e)), r = e < l;
|
|
6
|
+
return /* @__PURE__ */ n(
|
|
7
|
+
"span",
|
|
8
|
+
{
|
|
9
|
+
"data-design-fill": t,
|
|
10
|
+
"data-fill-low": r ? "" : void 0,
|
|
11
|
+
"data-tip": r ? "Rarely filled on this collection’s records" : void 0,
|
|
12
|
+
className: i(
|
|
13
|
+
"inline-flex items-center rounded bg-white px-1 text-[10.5px] tabular-nums text-slate-500 ring-1 ring-slate-200 dark:bg-card dark:text-muted-foreground dark:ring-border",
|
|
14
|
+
r && "pointer-events-auto"
|
|
15
|
+
),
|
|
16
|
+
children: [
|
|
17
|
+
t,
|
|
18
|
+
"% filled",
|
|
19
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: " on this collection's records" })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
d as FillChip,
|
|
26
|
+
l as LOW_FILL_PCT
|
|
27
|
+
};
|