@nivaro/react 0.3.113 → 0.3.115

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.
Files changed (285) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1727 -19
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +544 -504
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/cbv/column-totals.js +75 -67
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/api.js +161 -117
  79. package/dist/shared/components/integrations/console/tone.js +15 -12
  80. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  81. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  82. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  83. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  84. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  85. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  86. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  87. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  88. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  89. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  90. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  91. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  92. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  93. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  94. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  95. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  96. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  97. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  98. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  99. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  100. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  101. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  102. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  103. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  104. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  105. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  106. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  107. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  108. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  109. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  110. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  111. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  112. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  113. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  114. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  115. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  116. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  117. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  118. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  119. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  120. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  121. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  122. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  123. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  124. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  125. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  126. package/dist/shared/components/item-edit/file-live.js +77 -0
  127. package/dist/shared/components/item-edit/file-processing.js +87 -0
  128. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  129. package/dist/shared/components/item-edit/live-related.js +23 -0
  130. package/dist/shared/components/item-edit/live-title.js +66 -0
  131. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  132. package/dist/shared/components/item-edit/removed-line.js +58 -0
  133. package/dist/shared/components/item-edit/render-stability.js +70 -59
  134. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  135. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  136. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  137. package/dist/shared/components/list/InlineEdit.js +504 -208
  138. package/dist/shared/components/list/ListViewers.js +81 -0
  139. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  140. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  141. package/dist/shared/components/merge/merge-values.js +110 -0
  142. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  143. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  144. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  145. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  146. package/dist/shared/components/notifications/bundles.js +21 -19
  147. package/dist/shared/components/notifications/resolved-line.js +25 -0
  148. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  149. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  150. package/dist/shared/components/panels/AlertBanners.js +132 -0
  151. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  152. package/dist/shared/components/panels/BranchLanes.js +82 -54
  153. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  154. package/dist/shared/components/panels/CommentImages.js +219 -0
  155. package/dist/shared/components/panels/CommentPanel.js +649 -530
  156. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  157. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  158. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  159. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  160. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  161. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  162. package/dist/shared/components/panels/SlaClock.js +130 -99
  163. package/dist/shared/components/panels/TaskPanel.js +308 -287
  164. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  165. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  166. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  167. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  168. package/dist/shared/components/profile/AgentNameField.js +141 -0
  169. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  170. package/dist/shared/components/profile/PersonAccess.js +398 -330
  171. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  172. package/dist/shared/components/profile/PersonProfile.js +81 -73
  173. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  174. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  175. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  176. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  177. package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
  178. package/dist/shared/components/queue/queue-totals.js +92 -0
  179. package/dist/shared/components/queue/worklist-helpers.js +18 -14
  180. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  181. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  182. package/dist/shared/components/support/ReportProblem.js +1 -0
  183. package/dist/shared/components/support/ScreenShare.js +554 -0
  184. package/dist/shared/components/support/SupportView.js +160 -129
  185. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  186. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  187. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  188. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  189. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  190. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  191. package/dist/shared/lib/activity-sentence.js +87 -75
  192. package/dist/shared/lib/agent-presence.js +46 -0
  193. package/dist/shared/lib/approval-progress.js +49 -0
  194. package/dist/shared/lib/attention-prefs.js +27 -0
  195. package/dist/shared/lib/cell-locks.js +56 -0
  196. package/dist/shared/lib/co-edit.js +166 -0
  197. package/dist/shared/lib/coedit-registry.js +44 -0
  198. package/dist/shared/lib/comment-awareness.js +124 -0
  199. package/dist/shared/lib/comment-images.js +45 -0
  200. package/dist/shared/lib/config-watch.js +94 -0
  201. package/dist/shared/lib/copy-rules.js +65 -0
  202. package/dist/shared/lib/count-step.js +30 -0
  203. package/dist/shared/lib/deadline-ticker.js +68 -0
  204. package/dist/shared/lib/derived-causes.js +115 -0
  205. package/dist/shared/lib/draft-store.js +114 -85
  206. package/dist/shared/lib/error-hints.js +1 -0
  207. package/dist/shared/lib/field-merge.js +126 -0
  208. package/dist/shared/lib/filter-sentence.js +10 -10
  209. package/dist/shared/lib/focus-mode.js +16 -12
  210. package/dist/shared/lib/grid-cursors.js +77 -0
  211. package/dist/shared/lib/grid-presence.js +182 -0
  212. package/dist/shared/lib/idle-reload.js +100 -73
  213. package/dist/shared/lib/in-step.js +45 -0
  214. package/dist/shared/lib/integration-chip.js +19 -18
  215. package/dist/shared/lib/line-locks.js +141 -0
  216. package/dist/shared/lib/line-split.js +41 -0
  217. package/dist/shared/lib/linked-changes.js +150 -0
  218. package/dist/shared/lib/list-link.js +56 -50
  219. package/dist/shared/lib/list-return.js +231 -0
  220. package/dist/shared/lib/list-viewers.js +52 -0
  221. package/dist/shared/lib/live-announcer.js +86 -0
  222. package/dist/shared/lib/live-counts.js +85 -0
  223. package/dist/shared/lib/live-data-changed.js +108 -0
  224. package/dist/shared/lib/live-deltas.js +81 -0
  225. package/dist/shared/lib/live-findings.js +113 -0
  226. package/dist/shared/lib/live-groups.js +122 -0
  227. package/dist/shared/lib/live-link-labels.js +162 -0
  228. package/dist/shared/lib/live-list-flow.js +334 -0
  229. package/dist/shared/lib/live-list.js +143 -129
  230. package/dist/shared/lib/live-moves.js +51 -0
  231. package/dist/shared/lib/live-ops.js +26 -26
  232. package/dist/shared/lib/live-pickers.js +7 -0
  233. package/dist/shared/lib/live-preference.js +184 -0
  234. package/dist/shared/lib/live-queries.js +226 -181
  235. package/dist/shared/lib/live-screen.js +333 -0
  236. package/dist/shared/lib/live-search.js +108 -0
  237. package/dist/shared/lib/live-seen.js +35 -0
  238. package/dist/shared/lib/live-views.js +100 -0
  239. package/dist/shared/lib/live.js +159 -133
  240. package/dist/shared/lib/missed-updates.js +198 -0
  241. package/dist/shared/lib/newer-file.js +56 -0
  242. package/dist/shared/lib/notification-sound.js +42 -20
  243. package/dist/shared/lib/own-writes.js +59 -41
  244. package/dist/shared/lib/picker-badges.js +94 -0
  245. package/dist/shared/lib/presence-signals.js +131 -84
  246. package/dist/shared/lib/realtime.js +49 -24
  247. package/dist/shared/lib/record-gaps.js +85 -0
  248. package/dist/shared/lib/record-outbox.js +369 -222
  249. package/dist/shared/lib/record-peek.js +75 -0
  250. package/dist/shared/lib/record-tabs.js +92 -72
  251. package/dist/shared/lib/relative-ticker.js +42 -0
  252. package/dist/shared/lib/request-gate.js +119 -119
  253. package/dist/shared/lib/rollup-recalc.js +107 -0
  254. package/dist/shared/lib/room-gaps.js +40 -36
  255. package/dist/shared/lib/rum.js +137 -87
  256. package/dist/shared/lib/save-progress.js +20 -0
  257. package/dist/shared/lib/scheduled-countdown.js +67 -0
  258. package/dist/shared/lib/screen-refresh.js +160 -0
  259. package/dist/shared/lib/screen-share.js +234 -0
  260. package/dist/shared/lib/seen-since.js +74 -0
  261. package/dist/shared/lib/selection-watch.js +205 -0
  262. package/dist/shared/lib/send-status.js +132 -0
  263. package/dist/shared/lib/send-view.js +23 -0
  264. package/dist/shared/lib/socket-liveness.js +155 -0
  265. package/dist/shared/lib/socket-realtime.js +168 -140
  266. package/dist/shared/lib/state-census.js +53 -0
  267. package/dist/shared/lib/summary-mode.js +61 -39
  268. package/dist/shared/lib/tab-attention.js +143 -32
  269. package/dist/shared/lib/table-density.js +64 -0
  270. package/dist/shared/lib/track-travel.js +40 -0
  271. package/dist/shared/lib/unseen-changes.js +68 -0
  272. package/dist/shared/lib/upload-file.js +33 -0
  273. package/dist/shared/lib/upload-presence.js +127 -0
  274. package/dist/shared/lib/urgent-chime.js +65 -0
  275. package/dist/shared/lib/use-online-users.js +32 -11
  276. package/dist/shared/lib/user-sync.js +155 -39
  277. package/dist/shared/lib/waiting-count.js +44 -0
  278. package/dist/shared/lib/watch-desktop.js +83 -0
  279. package/dist/shared/lib/watch-list.js +447 -0
  280. package/dist/shared/lib/widget-image-render.js +64 -0
  281. package/dist/shared/lib/widget-image.js +111 -0
  282. package/dist/shared/lib/worker-socket.js +130 -104
  283. package/dist/shared/lib/write-to-screen.js +133 -0
  284. package/package.json +1 -1
  285. package/styles.css +49 -1
@@ -1,38 +1,40 @@
1
- import { jsx as i, jsxs as h } from "react/jsx-runtime";
2
- import { ExternalLink as Ve } from "lucide-react";
3
- import { memo as He, useContext as Ue, useRef as j, useEffect as re, useState as $e, useLayoutEffect as Ge } from "react";
4
- import { useDrilldown as We, useParentDraft as Ye, RelationPathDataContext as ze, useApiFetchConfig as Qe, fieldDrilldownConfig as V } from "../../context.js";
5
- import { getFieldInterface as Ce } from "../../lib/field-interfaces.js";
6
- import { precisionOf as Xe } from "../../lib/format-value.js";
1
+ import { jsx as i, jsxs as g } from "react/jsx-runtime";
2
+ import { ExternalLink as Ue } from "lucide-react";
3
+ import { memo as $e, useContext as Ge, useRef as j, useEffect as re, useState as We, useLayoutEffect as Ye } from "react";
4
+ import { useDrilldown as ze, useParentDraft as Qe, RelationPathDataContext as Ce, useApiFetchConfig as Xe, fieldDrilldownConfig as K } from "../../context.js";
5
+ import { getFieldInterface as Ze } from "../../lib/field-interfaces.js";
6
+ import { precisionOf as Oe } from "../../lib/format-value.js";
7
7
  import { resolveOptionFilterTokens as oe } from "../../lib/option-filter-tokens.js";
8
- import { showsFileDownloads as ne, showsFileUsage as ie, counterOf as Ze } from "../../lib/placement-behaviour.js";
9
- import { choiceLabel as Oe } from "../../lib/utils.js";
10
- import { Badge as et } from "../ui/badge.js";
8
+ import { showsFileDownloads as ne, showsFileUsage as ie, counterOf as et } from "../../lib/placement-behaviour.js";
9
+ import { choiceLabel as tt } from "../../lib/utils.js";
10
+ import { Badge as rt } from "../ui/badge.js";
11
11
  import { Input as B } from "../ui/input.js";
12
- import { Label as tt } from "../ui/label.js";
13
- import { NumberDraftInput as rt } from "../ui/number-draft-input.js";
14
- import { SimpleSelect as ot } from "../ui/SimpleSelect.js";
15
- import { Switch as nt } from "../ui/switch.js";
16
- import { Textarea as ye } from "../ui/textarea.js";
17
- import { CatalogPickerField as it } from "./CatalogPickerField.js";
18
- import { columnMaxLength as _e } from "./column-length.js";
19
- import { useFieldAffordances as at } from "./FieldAffordances.js";
20
- import { ProgressField as ae, RatingScaleField as le, DurationReadOnly as lt, ChecklistReadOnly as st, ColorPackField as se, PhoneField as ce, EmailField as ct, AddressAutocompleteField as dt } from "./FieldPack.js";
21
- import { FilePickerField as ut, FileM2MField as mt } from "./FilePickerField.js";
12
+ import { Label as ot } from "../ui/label.js";
13
+ import { NumberDraftInput as nt } from "../ui/number-draft-input.js";
14
+ import { SimpleSelect as it } from "../ui/SimpleSelect.js";
15
+ import { Switch as at } from "../ui/switch.js";
16
+ import { Textarea as _e } from "../ui/textarea.js";
17
+ import { CatalogPickerField as lt } from "./CatalogPickerField.js";
18
+ import { useCoeditTarget as st } from "./coedit/context.js";
19
+ import { columnMaxLength as fe } from "./column-length.js";
20
+ import { useFieldAffordances as ct } from "./FieldAffordances.js";
21
+ import { ProgressField as ae, RatingScaleField as le, DurationReadOnly as dt, ChecklistReadOnly as ut, ColorPackField as se, PhoneField as ce, EmailField as mt, AddressAutocompleteField as pt } from "./FieldPack.js";
22
+ import { FilePickerField as yt, FileM2MField as _t } from "./FilePickerField.js";
22
23
  import { formatDisplayValue as L } from "./GroupSection.js";
23
- import { parseJson as _, toLocalDatetime as pt } from "./helpers.js";
24
- import { InlineGridField as yt } from "./InlineGridField.js";
25
- import { InlineTableField as _t } from "./InlineTableField.js";
26
- import { checkNumberEntry as ft } from "./line-qty.js";
27
- import { M2MSingleSelectCombobox as bt, M2MCombobox as xt } from "./M2MCombobox.js";
28
- import { MembershipSetField as ht } from "./MembershipSetField.js";
29
- import { PlanGridField as gt } from "./PlanGrid.js";
30
- import { smartParseDate as wt, CountdownChip as vt, DurationField as Nt, FiscalPeriodField as kt, ChecklistField as Ft, RepeaterField as At, RangeSliderField as Rt, DateRangeField as St, AddressField as jt, maskFor as Dt, applyInputMask as de } from "./PolishFields.js";
31
- import { useQuickCreateFollow as It, QuickCreateButton as Mt } from "./QuickCreateButton.js";
32
- import { RelationCombobox as Pt } from "./RelationCombobox.js";
33
- import { RelationGroupedCombobox as Lt } from "./RelationGroupedCombobox.js";
34
- import { RichTextEditor as Bt } from "./RichTextEditor.js";
35
- function Et({
24
+ import { parseJson as f, toLocalDatetime as ft } from "./helpers.js";
25
+ import { InlineGridField as bt } from "./InlineGridField.js";
26
+ import { InlineTableField as xt } from "./InlineTableField.js";
27
+ import { checkNumberEntry as ht } from "./line-qty.js";
28
+ import { M2MSingleSelectCombobox as gt, M2MCombobox as wt } from "./M2MCombobox.js";
29
+ import { MembershipSetField as vt } from "./MembershipSetField.js";
30
+ import { PlanGridField as Nt } from "./PlanGrid.js";
31
+ import { smartParseDate as kt, CountdownChip as Ft, DurationField as At, FiscalPeriodField as Rt, ChecklistField as St, RepeaterField as jt, RangeSliderField as Dt, DateRangeField as It, AddressField as Mt, maskFor as Pt, applyInputMask as de } from "./PolishFields.js";
32
+ import { useQuickCreateFollow as Lt, QuickCreateButton as Bt } from "./QuickCreateButton.js";
33
+ import { recalcStateOf as Tt, RecalcValue as ue } from "./RecalcValue.js";
34
+ import { RelationCombobox as Et } from "./RelationCombobox.js";
35
+ import { RelationGroupedCombobox as qt } from "./RelationGroupedCombobox.js";
36
+ import { RichTextEditor as Vt } from "./RichTextEditor.js";
37
+ function Jt({
36
38
  plugin: m,
37
39
  props: e
38
40
  }) {
@@ -40,96 +42,96 @@ function Et({
40
42
  return p.current = e, re(() => {
41
43
  if (n.current)
42
44
  return n.current.innerHTML = "", a.current = m.mount(n.current, p.current), () => {
43
- var d, c;
44
- (c = (d = a.current) == null ? void 0 : d.destroy) == null || c.call(d), a.current = void 0;
45
+ var d, l;
46
+ (l = (d = a.current) == null ? void 0 : d.destroy) == null || l.call(d), a.current = void 0;
45
47
  };
46
48
  }, [m]), re(() => {
47
- var d, c;
48
- (c = (d = a.current) == null ? void 0 : d.update) == null || c.call(d, e);
49
+ var d, l;
50
+ (l = (d = a.current) == null ? void 0 : d.update) == null || l.call(d, e);
49
51
  }, [e]), /* @__PURE__ */ i("div", { ref: n, "data-custom-interface": m.interface });
50
52
  }
51
- function ue(m) {
52
- const e = m.validation_rules, n = Array.isArray(e) ? e : _(typeof e == "string" ? e : null);
53
+ function me(m) {
54
+ const e = m.validation_rules, n = Array.isArray(e) ? e : f(typeof e == "string" ? e : null);
53
55
  if (!Array.isArray(n)) return {};
54
56
  const a = (d) => {
55
- const c = /* @__PURE__ */ new Date();
56
- c.setDate(c.getDate() + d);
57
- const f = (w) => String(w).padStart(2, "0");
58
- return `${c.getFullYear()}-${f(c.getMonth() + 1)}-${f(c.getDate())}`;
57
+ const l = /* @__PURE__ */ new Date();
58
+ l.setDate(l.getDate() + d);
59
+ const b = (v) => String(v).padStart(2, "0");
60
+ return `${l.getFullYear()}-${b(l.getMonth() + 1)}-${b(l.getDate())}`;
59
61
  }, p = {};
60
62
  for (const d of n) {
61
- const c = Number(d == null ? void 0 : d.value);
62
- Number.isFinite(c) && ((d == null ? void 0 : d.type) === "min_days_from_today" && (p.min = a(c)), (d == null ? void 0 : d.type) === "max_days_from_today" && (p.max = a(c)));
63
+ const l = Number(d == null ? void 0 : d.value);
64
+ Number.isFinite(l) && ((d == null ? void 0 : d.type) === "min_days_from_today" && (p.min = a(l)), (d == null ? void 0 : d.type) === "max_days_from_today" && (p.max = a(l)));
63
65
  }
64
66
  return p;
65
67
  }
66
- function me(m) {
67
- const e = _e(m), n = _(m.options), a = Number(n == null ? void 0 : n.max_length);
68
+ function pe(m) {
69
+ const e = fe(m), n = f(m.options), a = Number(n == null ? void 0 : n.max_length);
68
70
  return Number.isFinite(a) && a > 0 ? e != null ? Math.min(e, a) : a : e ?? void 0;
69
71
  }
70
- function fe(m, e) {
72
+ function be(m, e) {
71
73
  const n = j(null), a = j(m), p = j(m);
72
- p.current = m, Ge(() => {
73
- const c = n.current;
74
- !c || m === a.current || (a.current = m, c.value !== m && (c.value = m));
74
+ p.current = m, Ye(() => {
75
+ const l = n.current;
76
+ !l || m === a.current || (a.current = m, l.value !== m && (l.value = m));
75
77
  }, [m]);
76
- const d = (c) => {
77
- c !== a.current && (e(c), a.current = c, queueMicrotask(() => {
78
- const f = n.current;
79
- !f || a.current !== c || p.current === c || (a.current = p.current, f.value = p.current);
78
+ const d = (l) => {
79
+ l !== a.current && (e(l), a.current = l, queueMicrotask(() => {
80
+ const b = n.current;
81
+ !b || a.current !== l || p.current === l || (a.current = p.current, b.value = p.current);
80
82
  }));
81
83
  };
82
84
  return {
83
85
  ref: n,
84
86
  defaultValue: m,
85
- onChange: (c) => d(c.target.value),
86
- onBlur: (c) => d(c.target.value)
87
+ onChange: (l) => d(l.target.value),
88
+ onBlur: (l) => d(l.target.value)
87
89
  };
88
90
  }
89
- function Tt({
91
+ function Kt({
90
92
  value: m,
91
93
  commit: e,
92
94
  ...n
93
95
  }) {
94
- const a = fe(m, e);
96
+ const a = be(m, e);
95
97
  return /* @__PURE__ */ i(B, { ...n, ...a });
96
98
  }
97
- function pe({
99
+ function ye({
98
100
  value: m,
99
101
  commit: e,
100
102
  ...n
101
103
  }) {
102
- const a = fe(m, e);
103
- return /* @__PURE__ */ i(ye, { ...n, ...a });
104
+ const a = be(m, e);
105
+ return /* @__PURE__ */ i(_e, { ...n, ...a });
104
106
  }
105
- const gr = He(function({
107
+ const Ar = $e(function({
106
108
  field: e,
107
109
  value: n,
108
110
  onChange: a,
109
111
  relations: p,
110
112
  collection: d,
111
- itemId: c,
112
- cascadeFilter: f,
113
- requiredParentLabel: w,
113
+ itemId: l,
114
+ cascadeFilter: b,
115
+ requiredParentLabel: v,
114
116
  narrowedBy: u,
115
117
  onCountChange: N,
116
118
  displayOnly: H,
117
- prefillParentId: be,
119
+ prefillParentId: xe,
118
120
  pinnedOption: U
119
121
  }) {
120
122
  var Y, z, Q, C, X, Z, O, ee, te;
121
- const D = We(), M = at(), k = Ye();
122
- It(k);
123
- const K = Ue(ze), I = k, b = (() => {
123
+ const D = ze(), he = st(d, l, e.field), M = ct(), k = Qe();
124
+ Lt(k);
125
+ const J = Ge(Ce), I = k, x = (() => {
124
126
  try {
125
- return Qe();
127
+ return Xe();
126
128
  } catch {
127
129
  return null;
128
130
  }
129
- })(), s = e.interface ?? "", $ = j(Ce(s)).current;
131
+ })(), s = e.interface ?? "", $ = j(Ze(s)).current;
130
132
  if ($)
131
133
  return /* @__PURE__ */ i(
132
- Et,
134
+ Jt,
133
135
  {
134
136
  plugin: $,
135
137
  props: {
@@ -138,15 +140,16 @@ const gr = He(function({
138
140
  field: { field: e.field, label: e.label, options: e.options },
139
141
  readOnly: !!e.readonly || !!H,
140
142
  collection: d,
141
- itemId: c || null
143
+ itemId: l || null
142
144
  }
143
145
  }
144
146
  );
145
147
  if (s === "file-image" || s === "file") {
146
- const r = _(e.options);
148
+ const r = f(e.options);
147
149
  return /* @__PURE__ */ i(
148
- ut,
150
+ yt,
149
151
  {
152
+ field: e.field,
150
153
  value: n,
151
154
  onChange: a,
152
155
  disabled: e.readonly,
@@ -162,10 +165,10 @@ const gr = He(function({
162
165
  ) : null;
163
166
  if (F != null && F.one_collection) {
164
167
  if (s === "relation-grouped") {
165
- const y = _(e.options);
168
+ const y = f(e.options);
166
169
  if (y != null && y.group_field && (y != null && y.option_field))
167
170
  return /* @__PURE__ */ i(
168
- Lt,
171
+ qt,
169
172
  {
170
173
  collection: F.one_collection,
171
174
  value: n,
@@ -174,18 +177,18 @@ const gr = He(function({
174
177
  optionField: y.option_field,
175
178
  disabled: e.readonly,
176
179
  placeholder: e.placeholder ?? void 0,
177
- extraFilter: f,
180
+ extraFilter: b,
178
181
  pinned: U,
179
182
  narrowedBy: u
180
183
  }
181
184
  );
182
185
  }
183
- const r = D && n != null && n !== "" ? V(e) : null, o = _(e.options), l = oe(
186
+ const r = D && n != null && n !== "" ? K(e) : null, o = f(e.options), c = oe(
184
187
  o != null && o.option_filter && typeof o.option_filter == "object" ? o.option_filter : void 0,
185
188
  k == null ? void 0 : k.draft,
186
- c
187
- ), t = l ? f ? { _and: [l, f] } : l : f, x = /* @__PURE__ */ i(
188
- Pt,
189
+ l
190
+ ), t = c ? b ? { _and: [c, b] } : c : b, _ = /* @__PURE__ */ i(
191
+ Et,
189
192
  {
190
193
  fieldKey: e.field,
191
194
  missPlacement: (M == null ? void 0 : M.layoutId) != null && M.pickerMisses !== !1 ? { layoutId: Number(M.layoutId), collection: d, field: e.field } : null,
@@ -197,7 +200,7 @@ const gr = He(function({
197
200
  extraFilter: t,
198
201
  autoSelectSingle: (o == null ? void 0 : o.auto_select_single) === !0,
199
202
  optionSort: typeof (o == null ? void 0 : o.option_sort) == "string" && o.option_sort ? o.option_sort : void 0,
200
- requiredParent: w ?? void 0,
203
+ requiredParent: v ?? void 0,
201
204
  narrowedBy: u,
202
205
  pinned: U,
203
206
  facets: Array.isArray(o == null ? void 0 : o.picker_facets) ? o.picker_facets.map((y) => ({
@@ -206,17 +209,17 @@ const gr = He(function({
206
209
  // _and clause pruning) as option_filter, resolved from the same
207
210
  // parent draft — keeps facet option lists in sync with the main
208
211
  // option query's eligibility clauses.
209
- filter: y.filter && typeof y.filter == "object" ? oe(y.filter, k == null ? void 0 : k.draft, c) : void 0
212
+ filter: y.filter && typeof y.filter == "object" ? oe(y.filter, k == null ? void 0 : k.draft, l) : void 0
210
213
  })) : void 0
211
214
  }
212
- ), v = o != null && o.quick_create && Array.isArray(o.quick_create.fields) && !e.readonly ? o.quick_create : null;
213
- return !r && !v ? x : /* @__PURE__ */ h("div", { className: "flex items-center gap-1.5", children: [
214
- /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: x }),
215
- v && /* @__PURE__ */ i(
216
- Mt,
215
+ ), h = o != null && o.quick_create && Array.isArray(o.quick_create.fields) && !e.readonly ? o.quick_create : null;
216
+ return !r && !h ? _ : /* @__PURE__ */ g("div", { className: "flex items-center gap-1.5", children: [
217
+ /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: _ }),
218
+ h && /* @__PURE__ */ i(
219
+ Bt,
217
220
  {
218
221
  targetCollection: F.one_collection,
219
- config: v,
222
+ config: h,
220
223
  value: n,
221
224
  field: e.field,
222
225
  onCreated: (y) => a(y)
@@ -234,80 +237,80 @@ const gr = He(function({
234
237
  width: r.width
235
238
  }),
236
239
  className: "shrink-0 rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-nvr-cyan dark:hover:bg-slate-800",
237
- children: /* @__PURE__ */ i(Ve, { className: "h-3.5 w-3.5" })
240
+ children: /* @__PURE__ */ i(Ue, { className: "h-3.5 w-3.5" })
238
241
  }
239
242
  )
240
243
  ] });
241
244
  }
242
- const E = G && !F ? (() => {
245
+ const T = G && !F ? (() => {
243
246
  const r = p.find(
244
- (l) => l.one_collection === d && (l.one_field === e.field || l.junction_field != null && l.many_collection === e.field)
247
+ (c) => c.one_collection === d && (c.one_field === e.field || c.junction_field != null && c.many_collection === e.field)
245
248
  );
246
249
  if (!r) return null;
247
250
  if (r.junction_field) return r;
248
251
  const o = p.find(
249
- (l) => l.many_collection === r.many_collection && l.id !== r.id
252
+ (c) => c.many_collection === r.many_collection && c.id !== r.id
250
253
  );
251
254
  return o ? { ...r, junction_field: o.many_field } : null;
252
255
  })() : null;
253
- if (E) {
256
+ if (T) {
254
257
  if (s === "files-m2m") {
255
- const l = _(e.options);
258
+ const c = f(e.options);
256
259
  return /* @__PURE__ */ i(
257
- mt,
260
+ _t,
258
261
  {
259
- relation: E,
260
- parentId: c,
262
+ relation: T,
263
+ parentId: l,
261
264
  allRelations: p,
262
265
  disabled: e.readonly,
263
- allowUpload: (l == null ? void 0 : l.allow_upload) !== !1,
264
- allowPick: (l == null ? void 0 : l.allow_pick) !== !1,
265
- pendingSave: (l == null ? void 0 : l.pending_save) === !0,
266
+ allowUpload: (c == null ? void 0 : c.allow_upload) !== !1,
267
+ allowPick: (c == null ? void 0 : c.allow_pick) !== !1,
268
+ pendingSave: (c == null ? void 0 : c.pending_save) === !0,
266
269
  showUsage: ie(e._overrides),
267
270
  showDownloads: ne(e._overrides)
268
271
  }
269
272
  );
270
273
  }
271
- const r = _(e.options), o = typeof (r == null ? void 0 : r.option_sort) == "string" && r.option_sort ? r.option_sort : void 0;
274
+ const r = f(e.options), o = typeof (r == null ? void 0 : r.option_sort) == "string" && r.option_sort ? r.option_sort : void 0;
272
275
  return (r == null ? void 0 : r.max_values) === 1 ? /* @__PURE__ */ i(
273
- bt,
276
+ gt,
274
277
  {
275
- relation: E,
276
- parentId: c,
278
+ relation: T,
279
+ parentId: l,
277
280
  allRelations: p,
278
- extraFilter: f,
281
+ extraFilter: b,
279
282
  optionSort: o,
280
- requiredParent: w ?? void 0,
283
+ requiredParent: v ?? void 0,
281
284
  onCountChange: N,
282
285
  readOnly: H
283
286
  }
284
287
  ) : /* @__PURE__ */ i(
285
- xt,
288
+ wt,
286
289
  {
287
- relation: E,
288
- parentId: c,
290
+ relation: T,
291
+ parentId: l,
289
292
  allRelations: p,
290
- extraFilter: f,
293
+ extraFilter: b,
291
294
  optionSort: o,
292
- requiredParent: w ?? void 0,
295
+ requiredParent: v ?? void 0,
293
296
  onCountChange: N,
294
- drilldown: V(e)
297
+ drilldown: K(e)
295
298
  }
296
299
  );
297
300
  }
298
301
  if (e.readonly && s !== "inline-table") {
299
302
  if (s === "relation-path" && n != null && n !== "" && D) {
300
- const l = V(e), t = K == null ? void 0 : K[e.field];
301
- if (l && (t != null && t.target_collection) && t.ids.length > 0)
303
+ const t = K(e), _ = J == null ? void 0 : J[e.field];
304
+ if (t && (_ != null && _.target_collection) && _.ids.length > 0)
302
305
  return /* @__PURE__ */ i("div", { className: "min-h-[36px] flex items-center", children: /* @__PURE__ */ i(
303
306
  "button",
304
307
  {
305
308
  type: "button",
306
309
  onClick: () => D.open({
307
- collection: t.target_collection,
308
- itemId: t.ids[0],
309
- layoutId: l.layout_id,
310
- width: l.width,
310
+ collection: _.target_collection,
311
+ itemId: _.ids[0],
312
+ layoutId: t.layout_id,
313
+ width: t.width,
311
314
  title: String(n)
312
315
  }),
313
316
  className: "text-left text-sm text-slate-700 underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-[#172940] hover:decoration-nvr-cyan dark:text-slate-200 dark:hover:text-nvr-cyan",
@@ -315,56 +318,56 @@ const gr = He(function({
315
318
  }
316
319
  ) });
317
320
  }
318
- const r = (Y = e.options) == null ? void 0 : Y.__live_delta;
321
+ const r = (Y = e.options) == null ? void 0 : Y.__live_delta, o = Tt(e.options);
319
322
  if (r && Number.isFinite(Number(r.live))) {
320
- const l = Number(r.original), t = Number(r.live) - (Number.isFinite(l) ? l : 0), x = Math.round(t * 100) / 100;
321
- return /* @__PURE__ */ h("div", { className: "flex min-h-[36px] flex-wrap items-center gap-x-2 gap-y-0.5", children: [
323
+ const t = Number(r.original), _ = Number(r.live) - (Number.isFinite(t) ? t : 0), h = Math.round(_ * 100) / 100;
324
+ return /* @__PURE__ */ i(ue, { state: o, className: "min-h-[36px]", children: /* @__PURE__ */ g("div", { className: "flex min-h-[36px] flex-wrap items-center gap-x-2 gap-y-0.5", children: [
322
325
  /* @__PURE__ */ i("span", { className: "text-sm text-slate-400 line-through tabular-nums", children: L(r.original, e) }),
323
326
  /* @__PURE__ */ i("span", { className: "text-slate-300", "aria-hidden": !0, children: "→" }),
324
327
  /* @__PURE__ */ i("span", { className: "text-sm font-medium tabular-nums", children: L(r.live, e) }),
325
- x !== 0 && /* @__PURE__ */ h(
328
+ h !== 0 && /* @__PURE__ */ g(
326
329
  "span",
327
330
  {
328
- className: `rounded px-1.5 py-px text-[11px] font-medium tabular-nums ${x > 0 ? "bg-emerald-50 text-emerald-700 dark:bg-emerald-900/20 dark:text-emerald-400" : "bg-red-50 text-red-700 dark:bg-red-900/20 dark:text-red-400"}`,
331
+ className: `rounded px-1.5 py-px text-[11px] font-medium tabular-nums ${h > 0 ? "bg-emerald-50 text-emerald-700 dark:bg-emerald-900/20 dark:text-emerald-400" : "bg-red-50 text-red-700 dark:bg-red-900/20 dark:text-red-400"}`,
329
332
  children: [
330
- x > 0 ? "+" : "−",
331
- L(Math.abs(x), e)
333
+ h > 0 ? "+" : "−",
334
+ L(Math.abs(h), e)
332
335
  ]
333
336
  }
334
337
  )
335
- ] });
338
+ ] }) });
336
339
  }
337
340
  if (s === "progress") return /* @__PURE__ */ i(ae, { value: n, onChange: a, readOnly: !0 });
338
341
  if (s === "rating") {
339
- const l = (z = _(e.options)) == null ? void 0 : z.rating_max;
340
- return /* @__PURE__ */ i(le, { value: n, onChange: a, max: l ?? 5, readOnly: !0 });
342
+ const t = (z = f(e.options)) == null ? void 0 : z.rating_max;
343
+ return /* @__PURE__ */ i(le, { value: n, onChange: a, max: t ?? 5, readOnly: !0 });
341
344
  }
342
- if (s === "duration") return /* @__PURE__ */ i(lt, { value: n });
343
- if (s === "checklist") return /* @__PURE__ */ i(st, { value: n });
345
+ if (s === "duration") return /* @__PURE__ */ i(dt, { value: n });
346
+ if (s === "checklist") return /* @__PURE__ */ i(ut, { value: n });
344
347
  if (s === "color")
345
348
  return /* @__PURE__ */ i(se, { field: e, value: n, onChange: a, readOnly: !0 });
346
349
  if (s === "phone") return /* @__PURE__ */ i(ce, { value: n, onChange: a, readOnly: !0 });
347
- const o = n == null ? /* @__PURE__ */ i("span", { className: "text-muted-foreground italic text-sm", children: "—" }) : typeof n == "boolean" ? /* @__PURE__ */ i(et, { variant: n ? "default" : "secondary", children: n ? "Yes" : "No" }) : /* @__PURE__ */ i("span", { className: "text-sm tabular-nums", children: L(n, e) });
348
- return /* @__PURE__ */ i("div", { className: "min-h-[36px] flex items-center", children: o });
350
+ const c = n == null ? /* @__PURE__ */ i("span", { className: "text-muted-foreground italic text-sm", children: "—" }) : typeof n == "boolean" ? /* @__PURE__ */ i(rt, { variant: n ? "default" : "secondary", children: n ? "Yes" : "No" }) : /* @__PURE__ */ i("span", { className: "text-sm tabular-nums", children: L(n, e) });
351
+ return /* @__PURE__ */ i("div", { className: "min-h-[36px] flex items-center", children: /* @__PURE__ */ i(ue, { state: o, children: c }) });
349
352
  }
350
- const g = n == null ? "" : String(n);
353
+ const w = n == null ? "" : String(n);
351
354
  if (e.type === "boolean")
352
- return /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
353
- /* @__PURE__ */ i(nt, { checked: !!n, onCheckedChange: a }),
354
- /* @__PURE__ */ i(tt, { className: "font-normal text-sm", children: n ? "Yes" : "No" })
355
+ return /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
356
+ /* @__PURE__ */ i(at, { checked: !!n, onCheckedChange: a }),
357
+ /* @__PURE__ */ i(ot, { className: "font-normal text-sm", children: n ? "Yes" : "No" })
355
358
  ] });
356
359
  if (e.type === "datetime" || s === "datetime") {
357
- const r = _(e.options);
360
+ const r = f(e.options);
358
361
  if ((r == null ? void 0 : r.date_mode) === "date") {
359
- const o = ue(e);
362
+ const o = me(e);
360
363
  return /* @__PURE__ */ i(
361
364
  B,
362
365
  {
363
366
  type: "date",
364
- value: g.slice(0, 10),
367
+ value: w.slice(0, 10),
365
368
  min: o.min,
366
369
  max: o.max,
367
- onChange: (l) => a(l.target.value || null),
370
+ onChange: (c) => a(c.target.value || null),
368
371
  placeholder: e.placeholder ?? void 0
369
372
  }
370
373
  );
@@ -373,32 +376,32 @@ const gr = He(function({
373
376
  B,
374
377
  {
375
378
  type: "datetime-local",
376
- value: pt(n),
379
+ value: ft(n),
377
380
  onChange: (o) => a(o.target.value ? new Date(o.target.value).toISOString() : null),
378
381
  placeholder: e.placeholder ?? void 0
379
382
  }
380
383
  );
381
384
  }
382
385
  if (e.type === "date" || s === "date") {
383
- const r = ((Q = _(e.options)) == null ? void 0 : Q.countdown) === !0, o = ue(e);
384
- return /* @__PURE__ */ h("div", { className: "flex items-center", children: [
386
+ const r = ((Q = f(e.options)) == null ? void 0 : Q.countdown) === !0, o = me(e);
387
+ return /* @__PURE__ */ g("div", { className: "flex items-center", children: [
385
388
  /* @__PURE__ */ i(
386
389
  B,
387
390
  {
388
391
  type: "date",
389
- value: g.slice(0, 10),
392
+ value: w.slice(0, 10),
390
393
  min: o.min,
391
394
  max: o.max,
392
- onChange: (l) => a(l.target.value || null),
393
- onPaste: (l) => {
394
- const t = wt(l.clipboardData.getData("text"));
395
- t && (l.preventDefault(), a(t));
395
+ onChange: (c) => a(c.target.value || null),
396
+ onPaste: (c) => {
397
+ const t = kt(c.clipboardData.getData("text"));
398
+ t && (c.preventDefault(), a(t));
396
399
  },
397
400
  placeholder: e.placeholder ?? void 0,
398
401
  className: "flex-1"
399
402
  }
400
403
  ),
401
- r && /* @__PURE__ */ i(vt, { value: g.slice(0, 10) })
404
+ r && /* @__PURE__ */ i(Ft, { value: w.slice(0, 10) })
402
405
  ] });
403
406
  }
404
407
  if ([
@@ -419,19 +422,19 @@ const gr = He(function({
419
422
  ].includes(e.type)) {
420
423
  const r = ["integer", "bigInteger", "int", "bigint", "smallint", "tinyint"].includes(
421
424
  e.type
422
- ), o = r ? 0 : Xe(e.options, -1), l = r ? "1" : o >= 0 ? String(10 ** -o) : "any", t = ft(n, { type: e.type, label: e.label || "Value" }), x = t.ok ? null : t.message;
423
- return /* @__PURE__ */ h("div", { children: [
425
+ ), o = r ? 0 : Oe(e.options, -1), c = r ? "1" : o >= 0 ? String(10 ** -o) : "any", t = ht(n, { type: e.type, label: e.label || "Value" }), _ = t.ok ? null : t.message;
426
+ return /* @__PURE__ */ g("div", { children: [
424
427
  /* @__PURE__ */ i(
425
- rt,
428
+ nt,
426
429
  {
427
430
  type: "number",
428
- "aria-invalid": x ? !0 : void 0,
429
- step: l,
431
+ "aria-invalid": _ ? !0 : void 0,
432
+ step: c,
430
433
  value: n,
431
434
  onValue: a,
432
- onBlur: (v) => {
433
- if (o < 0 || v.target.value === "") return;
434
- const y = Number(v.target.value);
435
+ onBlur: (h) => {
436
+ if (o < 0 || h.target.value === "") return;
437
+ const y = Number(h.target.value);
435
438
  if (!Number.isFinite(y)) return;
436
439
  const q = Number(y.toFixed(o));
437
440
  q !== y && a(q);
@@ -439,16 +442,16 @@ const gr = He(function({
439
442
  placeholder: e.placeholder ?? void 0
440
443
  }
441
444
  ),
442
- x && /* @__PURE__ */ i("p", { className: "mt-1 text-[11.5px] text-red-600 dark:text-red-400", "data-number-entry-error": !0, children: x })
445
+ _ && /* @__PURE__ */ i("p", { className: "mt-1 text-[11.5px] text-red-600 dark:text-red-400", "data-number-entry-error": !0, children: _ })
443
446
  ] });
444
447
  }
445
448
  if (e.type === "json" || s === "code")
446
449
  return /* @__PURE__ */ i(
447
- ye,
450
+ _e,
448
451
  {
449
452
  className: "font-mono text-xs",
450
453
  rows: 4,
451
- value: typeof n == "object" ? JSON.stringify(n, null, 2) : g,
454
+ value: typeof n == "object" ? JSON.stringify(n, null, 2) : w,
452
455
  onChange: (r) => {
453
456
  try {
454
457
  a(JSON.parse(r.target.value));
@@ -461,21 +464,21 @@ const gr = He(function({
461
464
  );
462
465
  if (s === "textarea")
463
466
  return /* @__PURE__ */ i(
464
- pe,
467
+ ye,
465
468
  {
466
469
  rows: 4,
467
- maxLength: me(e),
468
- value: g,
470
+ maxLength: pe(e),
471
+ value: w,
469
472
  commit: a,
470
473
  placeholder: e.placeholder ?? void 0
471
474
  }
472
475
  );
473
476
  if (s === "wysiwyg" || s === "markdown")
474
477
  return /* @__PURE__ */ i(
475
- pe,
478
+ ye,
476
479
  {
477
480
  rows: 6,
478
- value: g,
481
+ value: w,
479
482
  commit: a,
480
483
  placeholder: e.placeholder ?? void 0,
481
484
  className: "font-mono text-sm"
@@ -483,13 +486,14 @@ const gr = He(function({
483
486
  );
484
487
  if (s === "input-rich-text-html" || s === "rich_text" || e.type === "rich_text" || s === "extension-editorjs")
485
488
  return /* @__PURE__ */ i(
486
- Bt,
489
+ Vt,
487
490
  {
488
- value: g,
491
+ value: w,
489
492
  onChange: a,
490
493
  placeholder: e.placeholder ?? void 0,
491
494
  disabled: e.readonly,
492
- pastePlain: ((C = _(e.options)) == null ? void 0 : C.paste_plain) === !0
495
+ pastePlain: ((C = f(e.options)) == null ? void 0 : C.paste_plain) === !0,
496
+ coedit: he
493
497
  }
494
498
  );
495
499
  if (s === "inline-grid" || s === "relation-list" || s === "list-o2m") {
@@ -497,9 +501,9 @@ const gr = He(function({
497
501
  (o) => o.one_collection === d && !o.junction_field && (o.one_field === e.field || o.many_collection === e.field)
498
502
  );
499
503
  if (r) {
500
- const o = r.many_collection ?? null, l = r.many_field ?? null;
501
- if (o && l && c) {
502
- const x = (typeof e.options == "string" ? (() => {
504
+ const o = r.many_collection ?? null, c = r.many_field ?? null;
505
+ if (o && c && l) {
506
+ const _ = (typeof e.options == "string" ? (() => {
503
507
  try {
504
508
  return JSON.parse(e.options);
505
509
  } catch {
@@ -507,12 +511,12 @@ const gr = He(function({
507
511
  }
508
512
  })() : e.options ?? {}).layout_slug ?? null;
509
513
  return /* @__PURE__ */ i(
510
- yt,
514
+ bt,
511
515
  {
512
516
  relatedCollection: o,
513
- manyField: l,
514
- parentId: c,
515
- layoutSlug: x,
517
+ manyField: c,
518
+ parentId: l,
519
+ layoutSlug: _,
516
520
  parentFieldKey: e.field,
517
521
  emptyLabel: e.label || void 0
518
522
  }
@@ -526,22 +530,22 @@ const gr = He(function({
526
530
  (o) => o.one_collection === d && !o.junction_field && (o.one_field === e.field || o.many_collection === e.field)
527
531
  );
528
532
  if (r) {
529
- const o = r.many_collection ?? null, l = r.many_field ?? null;
530
- if (o && l && c) {
533
+ const o = r.many_collection ?? null, c = r.many_field ?? null;
534
+ if (o && c && l) {
531
535
  const t = typeof e.options == "string" ? (() => {
532
536
  try {
533
537
  return JSON.parse(e.options);
534
538
  } catch {
535
539
  return {};
536
540
  }
537
- })() : e.options ?? {}, x = t.layout_id ?? null, v = !!t.show_row_revisions, y = !!t.row_comments, q = t.allow_revision_restore !== !1, he = t.save_mode ?? "immediate", ge = !!t.show_line_numbers, we = t.enable_reorder !== !1, ve = Array.isArray(t.parent_cascades) ? t.parent_cascades : void 0, Ne = Array.isArray(t.row_rules) ? t.row_rules : void 0, ke = Array.isArray(t.column_presets) ? t.column_presets : void 0, Fe = typeof t.default_preset == "string" && t.default_preset ? t.default_preset : void 0, Ae = Array.isArray(t.drawer_relations) ? t.drawer_relations : void 0, Re = Array.isArray(t.parent_context_fields) ? t.parent_context_fields : void 0, Se = Array.isArray(t.unique_by) ? t.unique_by : void 0, je = typeof t.sort_field == "string" && t.sort_field ? t.sort_field : void 0, De = t.sort_dir === "desc" ? "desc" : "asc", Ie = t.freeze_first_column === !0, Me = typeof t.section_group_by == "string" && t.section_group_by.includes(".") ? t.section_group_by : void 0, Pe = t.row_filter && typeof t.row_filter == "object" ? t.row_filter : void 0, Le = t.allocate_drawer && typeof t.allocate_drawer == "object" ? t.allocate_drawer : void 0, Be = t.auto_allocate && typeof t.auto_allocate == "object" ? t.auto_allocate : void 0, Ee = Array.isArray(t.row_bulk_actions) ? t.row_bulk_actions : void 0, Te = typeof t.upload_template == "string" && t.upload_template ? t.upload_template : void 0, qe = t.row_match_panel ?? void 0, Je = t.row_defaults && typeof t.row_defaults == "object" ? t.row_defaults : void 0, Ke = t.submission_errors === !0 ? {} : t.submission_errors && typeof t.submission_errors == "object" ? t.submission_errors : void 0, R = t.membership_set;
541
+ })() : e.options ?? {}, _ = t.layout_id ?? null, h = !!t.show_row_revisions, y = !!t.row_comments, q = t.allow_revision_restore !== !1, we = t.save_mode ?? "immediate", ve = !!t.show_line_numbers, Ne = t.enable_reorder !== !1, ke = Array.isArray(t.parent_cascades) ? t.parent_cascades : void 0, Fe = Array.isArray(t.row_rules) ? t.row_rules : void 0, Ae = Array.isArray(t.column_presets) ? t.column_presets : void 0, Re = typeof t.default_preset == "string" && t.default_preset ? t.default_preset : void 0, Se = Array.isArray(t.drawer_relations) ? t.drawer_relations : void 0, je = Array.isArray(t.parent_context_fields) ? t.parent_context_fields : void 0, De = Array.isArray(t.unique_by) ? t.unique_by : void 0, Ie = typeof t.sort_field == "string" && t.sort_field ? t.sort_field : void 0, Me = t.sort_dir === "desc" ? "desc" : "asc", Pe = t.freeze_first_column === !0, Le = typeof t.section_group_by == "string" && t.section_group_by.includes(".") ? t.section_group_by : void 0, Be = t.row_filter && typeof t.row_filter == "object" ? t.row_filter : void 0, Te = t.allocate_drawer && typeof t.allocate_drawer == "object" ? t.allocate_drawer : void 0, Ee = t.auto_allocate && typeof t.auto_allocate == "object" ? t.auto_allocate : void 0, qe = Array.isArray(t.row_bulk_actions) ? t.row_bulk_actions : void 0, Ve = typeof t.upload_template == "string" && t.upload_template ? t.upload_template : void 0, Je = t.row_match_panel ?? void 0, Ke = t.row_defaults && typeof t.row_defaults == "object" ? t.row_defaults : void 0, He = t.submission_errors === !0 ? {} : t.submission_errors && typeof t.submission_errors == "object" ? t.submission_errors : void 0, R = t.membership_set;
538
542
  if (R != null && R.key_field && (R != null && R.value_field))
539
543
  return /* @__PURE__ */ i(
540
- ht,
544
+ vt,
541
545
  {
542
546
  relatedCollection: o,
543
- manyField: l,
544
- parentId: c,
547
+ manyField: c,
548
+ parentId: l,
545
549
  config: R,
546
550
  readOnly: e.readonly
547
551
  }
@@ -549,11 +553,11 @@ const gr = He(function({
549
553
  const S = t.catalog_mode;
550
554
  if (S != null && S.item_field && (S != null && S.section_by))
551
555
  return /* @__PURE__ */ i(
552
- it,
556
+ lt,
553
557
  {
554
558
  relatedCollection: o,
555
- manyField: l,
556
- parentId: c,
559
+ manyField: c,
560
+ parentId: l,
557
561
  parentCollection: d,
558
562
  field: e.field,
559
563
  config: S,
@@ -562,56 +566,56 @@ const gr = He(function({
562
566
  );
563
567
  const A = t.row_split;
564
568
  if (A != null && A.key_field && (A != null && A.category_field) && Array.isArray(A.value_fields)) {
565
- const J = t.spread_remaining;
569
+ const V = t.spread_remaining;
566
570
  return /* @__PURE__ */ i(
567
- gt,
571
+ Nt,
568
572
  {
569
573
  relatedCollection: o,
570
- manyField: l,
571
- parentId: c,
574
+ manyField: c,
575
+ parentId: l,
572
576
  config: A,
573
577
  compareSeries: t.compare_series && typeof t.compare_series == "object" && typeof t.compare_series.endpoint == "string" ? t.compare_series : null,
574
578
  stats: Array.isArray(t.stats) ? t.stats : null,
575
579
  sumCap: t.sum_cap && typeof t.sum_cap == "object" ? t.sum_cap : null,
576
- remaining: typeof (J == null ? void 0 : J.remaining) == "string" ? J.remaining : null,
580
+ remaining: typeof (V == null ? void 0 : V.remaining) == "string" ? V.remaining : null,
577
581
  readOnly: e.readonly,
578
- showHistory: v,
582
+ showHistory: h,
579
583
  emptyLabel: e.label || void 0
580
584
  }
581
585
  );
582
586
  }
583
587
  return /* @__PURE__ */ i(
584
- _t,
588
+ xt,
585
589
  {
586
590
  relatedCollection: o,
587
- manyField: l,
588
- parentId: c,
591
+ manyField: c,
592
+ parentId: l,
589
593
  parentCollection: d,
590
- layoutId: x,
591
- showRowRevisions: v,
594
+ layoutId: _,
595
+ showRowRevisions: h,
592
596
  rowComments: y,
593
597
  allowRevisionRestore: q,
594
- saveMode: he,
595
- showLineNumbers: ge,
596
- enableReorder: we,
597
- parentCascades: ve,
598
- rowRules: Ne,
599
- columnPresets: ke,
600
- defaultPreset: Fe,
601
- drawerRelations: Ae,
602
- parentContextFields: Re,
603
- uniqueBy: Se,
604
- sortField: je,
605
- sortDir: De,
606
- sectionGroupBy: Me,
607
- freezeFirstColumn: Ie,
608
- rowFilter: Pe,
609
- rowDefaults: Je,
610
- allocateDrawer: Le,
611
- autoAllocate: Be,
612
- rowBulkActions: Ee,
613
- uploadTemplate: Te,
614
- rowMatchPanel: qe,
598
+ saveMode: we,
599
+ showLineNumbers: ve,
600
+ enableReorder: Ne,
601
+ parentCascades: ke,
602
+ rowRules: Fe,
603
+ columnPresets: Ae,
604
+ defaultPreset: Re,
605
+ drawerRelations: Se,
606
+ parentContextFields: je,
607
+ uniqueBy: De,
608
+ sortField: Ie,
609
+ sortDir: Me,
610
+ sectionGroupBy: Le,
611
+ freezeFirstColumn: Pe,
612
+ rowFilter: Be,
613
+ rowDefaults: Ke,
614
+ allocateDrawer: Te,
615
+ autoAllocate: Ee,
616
+ rowBulkActions: qe,
617
+ uploadTemplate: Ve,
618
+ rowMatchPanel: Je,
615
619
  lineSla: t.line_sla ?? null,
616
620
  editorMode: t.editor_mode === "split" ? "split" : "drawer",
617
621
  rowLints: Array.isArray(t.row_lints) ? t.row_lints : null,
@@ -620,8 +624,8 @@ const gr = He(function({
620
624
  setAllRows: Array.isArray(t.set_all_rows) ? t.set_all_rows : null,
621
625
  spreadRemaining: t.spread_remaining && typeof t.spread_remaining == "object" ? t.spread_remaining : null,
622
626
  compareSeries: t.compare_series && typeof t.compare_series == "object" && typeof t.compare_series.endpoint == "string" ? t.compare_series : null,
623
- submissionErrors: Ke,
624
- prefillParentId: be,
627
+ submissionErrors: He,
628
+ prefillParentId: xe,
625
629
  parentFieldKey: e.field,
626
630
  readOnly: e.readonly,
627
631
  emptyLabel: e.label || void 0
@@ -633,36 +637,36 @@ const gr = He(function({
633
637
  }
634
638
  if (s === "color") return /* @__PURE__ */ i(se, { field: e, value: n, onChange: a });
635
639
  if (s === "rating") {
636
- const r = (X = _(e.options)) == null ? void 0 : X.rating_max;
640
+ const r = (X = f(e.options)) == null ? void 0 : X.rating_max;
637
641
  return /* @__PURE__ */ i(le, { value: n, onChange: a, max: r ?? 5 });
638
642
  }
639
643
  if (s === "progress") return /* @__PURE__ */ i(ae, { value: n, onChange: a });
640
644
  if (s === "phone")
641
645
  return /* @__PURE__ */ i(ce, { value: n, onChange: a, placeholder: e.placeholder ?? void 0 });
642
646
  if (s === "email")
643
- return /* @__PURE__ */ i(ct, { value: n, onChange: a, placeholder: e.placeholder ?? void 0 });
647
+ return /* @__PURE__ */ i(mt, { value: n, onChange: a, placeholder: e.placeholder ?? void 0 });
644
648
  if (s === "address-autocomplete")
645
649
  return /* @__PURE__ */ i(
646
- dt,
650
+ pt,
647
651
  {
648
652
  field: e,
649
653
  value: n,
650
654
  onChange: a,
651
- apiBase: b == null ? void 0 : b.apiBase,
652
- authHeaders: b == null ? void 0 : b.authHeaders,
653
- credentials: b == null ? void 0 : b.credentials,
655
+ apiBase: x == null ? void 0 : x.apiBase,
656
+ authHeaders: x == null ? void 0 : x.authHeaders,
657
+ credentials: x == null ? void 0 : x.credentials,
654
658
  placeholder: e.placeholder ?? void 0
655
659
  }
656
660
  );
657
- if (s === "duration") return /* @__PURE__ */ i(Nt, { value: n, onChange: a });
658
- if (s === "fiscal_period") return /* @__PURE__ */ i(kt, { value: n, onChange: a });
659
- if (s === "checklist") return /* @__PURE__ */ i(Ft, { value: n, onChange: a });
661
+ if (s === "duration") return /* @__PURE__ */ i(At, { value: n, onChange: a });
662
+ if (s === "fiscal_period") return /* @__PURE__ */ i(Rt, { value: n, onChange: a });
663
+ if (s === "checklist") return /* @__PURE__ */ i(St, { value: n, onChange: a });
660
664
  if (s === "repeater" || e.repeater_schema && e.type === "json")
661
- return /* @__PURE__ */ i(At, { field: e, value: n, onChange: a });
665
+ return /* @__PURE__ */ i(jt, { field: e, value: n, onChange: a });
662
666
  if (s === "range_slider") {
663
- const r = (Z = _(e.options)) == null ? void 0 : Z.range_end_field;
667
+ const r = (Z = f(e.options)) == null ? void 0 : Z.range_end_field;
664
668
  return /* @__PURE__ */ i(
665
- Rt,
669
+ Dt,
666
670
  {
667
671
  field: e,
668
672
  value: n,
@@ -672,9 +676,9 @@ const gr = He(function({
672
676
  );
673
677
  }
674
678
  if (s === "date_range") {
675
- const r = (ee = _(e.options)) == null ? void 0 : ee.range_end_field;
679
+ const r = (ee = f(e.options)) == null ? void 0 : ee.range_end_field;
676
680
  return /* @__PURE__ */ i(
677
- St,
681
+ It,
678
682
  {
679
683
  field: e,
680
684
  value: n,
@@ -685,66 +689,66 @@ const gr = He(function({
685
689
  }
686
690
  if (s === "address")
687
691
  return /* @__PURE__ */ i(
688
- jt,
692
+ Mt,
689
693
  {
690
694
  field: e,
691
695
  value: n,
692
696
  onChange: a,
693
- apiBase: b == null ? void 0 : b.apiBase,
694
- authHeaders: b == null ? void 0 : b.authHeaders
697
+ apiBase: x == null ? void 0 : x.apiBase,
698
+ authHeaders: x == null ? void 0 : x.authHeaders
695
699
  }
696
700
  );
697
701
  if (s === "tags")
698
- return /* @__PURE__ */ i(qt, { field: e, value: n, onChange: a });
702
+ return /* @__PURE__ */ i(Ht, { field: e, value: n, onChange: a });
699
703
  if (s === "select-dropdown" || s === "radio-buttons") {
700
704
  const r = (() => {
701
- const o = _(e.options);
705
+ const o = f(e.options);
702
706
  return (o == null ? void 0 : o.choices) ?? [];
703
707
  })();
704
708
  if (r.length > 0)
705
709
  return /* @__PURE__ */ i(
706
- ot,
710
+ it,
707
711
  {
708
- value: g,
712
+ value: w,
709
713
  onChange: (o) => a(o || null),
710
714
  options: [
711
715
  { value: "", label: "— Select —" },
712
- ...r.map((o) => ({ value: o.value, label: Oe(o.text) }))
716
+ ...r.map((o) => ({ value: o.value, label: tt(o.text) }))
713
717
  ],
714
718
  ariaLabel: e.label ?? e.field,
715
719
  className: "h-9 rounded-md text-sm"
716
720
  }
717
721
  );
718
722
  }
719
- const T = Dt(e), xe = _e(e), P = (() => {
720
- const r = _(e.options);
723
+ const E = Pt(e), ge = fe(e), P = (() => {
724
+ const r = f(e.options);
721
725
  if (Number.isFinite(Number(r == null ? void 0 : r.max_length))) return Number(r == null ? void 0 : r.max_length);
722
- const o = _(e.validation_rules), l = Array.isArray(o) ? o.find((t) => (t == null ? void 0 : t.type) === "max") : null;
723
- return l && Number.isFinite(Number(l.value)) ? Number(l.value) : xe;
724
- })(), W = T ? /* @__PURE__ */ i(
726
+ const o = f(e.validation_rules), c = Array.isArray(o) ? o.find((t) => (t == null ? void 0 : t.type) === "max") : null;
727
+ return c && Number.isFinite(Number(c.value)) ? Number(c.value) : ge;
728
+ })(), W = E ? /* @__PURE__ */ i(
725
729
  B,
726
730
  {
727
- value: de(T, g).display,
731
+ value: de(E, w).display,
728
732
  onChange: (r) => {
729
- const { clean: o } = de(T, r.target.value);
733
+ const { clean: o } = de(E, r.target.value);
730
734
  a(o || null);
731
735
  },
732
- placeholder: e.placeholder ?? T ?? void 0
736
+ placeholder: e.placeholder ?? E ?? void 0
733
737
  }
734
738
  ) : /* @__PURE__ */ i(
735
- Tt,
739
+ Kt,
736
740
  {
737
- maxLength: me(e),
738
- value: g,
741
+ maxLength: pe(e),
742
+ value: w,
739
743
  commit: (r) => a(r || null),
740
744
  placeholder: e.placeholder ?? void 0
741
745
  }
742
746
  );
743
- if (P != null && P > 0 && !Ze(e._overrides)) {
744
- const r = g.length;
745
- return /* @__PURE__ */ h("div", { children: [
747
+ if (P != null && P > 0 && !et(e._overrides)) {
748
+ const r = w.length;
749
+ return /* @__PURE__ */ g("div", { children: [
746
750
  W,
747
- r >= P * 0.6 && /* @__PURE__ */ h(
751
+ r >= P * 0.6 && /* @__PURE__ */ g(
748
752
  "p",
749
753
  {
750
754
  className: r > P ? "mt-0.5 text-right text-[10.5px] tabular-nums text-red-500" : "mt-0.5 text-right text-[10.5px] tabular-nums text-slate-400",
@@ -759,12 +763,12 @@ const gr = He(function({
759
763
  }
760
764
  return W;
761
765
  });
762
- function qt({
766
+ function Ht({
763
767
  field: m,
764
768
  value: e,
765
769
  onChange: n
766
770
  }) {
767
- const [a, p] = $e(""), d = (() => {
771
+ const [a, p] = We(""), d = (() => {
768
772
  if (Array.isArray(e)) return e.map(String);
769
773
  if (typeof e == "string" && e.trim().startsWith("["))
770
774
  try {
@@ -774,16 +778,16 @@ function qt({
774
778
  return [];
775
779
  }
776
780
  return typeof e == "string" && e.trim() !== "" ? [e] : [];
777
- })(), c = (() => {
778
- const u = _(m.options);
781
+ })(), l = (() => {
782
+ const u = f(m.options);
779
783
  return Array.isArray(u == null ? void 0 : u.tag_options) ? u.tag_options.map(String) : [];
780
- })(), f = (u) => n(u.length > 0 ? JSON.stringify(u) : null), w = (u) => {
784
+ })(), b = (u) => n(u.length > 0 ? JSON.stringify(u) : null), v = (u) => {
781
785
  const N = u.trim();
782
- !N || d.includes(N) || (f([...d, N]), p(""));
786
+ !N || d.includes(N) || (b([...d, N]), p(""));
783
787
  };
784
- return /* @__PURE__ */ h("div", { className: "rounded-md border border-input bg-background px-2 py-1.5", children: [
785
- /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
786
- d.map((u) => /* @__PURE__ */ h(
788
+ return /* @__PURE__ */ g("div", { className: "rounded-md border border-input bg-background px-2 py-1.5", children: [
789
+ /* @__PURE__ */ g("div", { className: "flex flex-wrap items-center gap-1", children: [
790
+ d.map((u) => /* @__PURE__ */ g(
787
791
  "span",
788
792
  {
789
793
  className: "inline-flex items-center gap-1 rounded-full bg-nvr-cyan/10 px-2 py-0.5 text-[11.5px] font-medium text-nvr-navy dark:bg-nvr-cyan/15 dark:text-nvr-cyan",
@@ -794,7 +798,7 @@ function qt({
794
798
  {
795
799
  type: "button",
796
800
  "aria-label": `Remove ${u}`,
797
- onClick: () => f(d.filter((N) => N !== u)),
801
+ onClick: () => b(d.filter((N) => N !== u)),
798
802
  className: "text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
799
803
  children: "×"
800
804
  }
@@ -809,19 +813,19 @@ function qt({
809
813
  value: a,
810
814
  onChange: (u) => p(u.target.value),
811
815
  onKeyDown: (u) => {
812
- (u.key === "Enter" || u.key === ",") && (u.preventDefault(), w(a)), u.key === "Backspace" && a === "" && d.length > 0 && f(d.slice(0, -1));
816
+ (u.key === "Enter" || u.key === ",") && (u.preventDefault(), v(a)), u.key === "Backspace" && a === "" && d.length > 0 && b(d.slice(0, -1));
813
817
  },
814
- onBlur: () => w(a),
818
+ onBlur: () => v(a),
815
819
  placeholder: d.length === 0 ? "Type and press Enter…" : "",
816
820
  className: "h-6 min-w-[120px] flex-1 bg-transparent text-[13px] outline-none"
817
821
  }
818
822
  )
819
823
  ] }),
820
- c.length > 0 && /* @__PURE__ */ i("div", { className: "mt-1 flex flex-wrap gap-1 border-t border-slate-100 pt-1 dark:border-border/60", children: c.filter((u) => !d.includes(u)).map((u) => /* @__PURE__ */ h(
824
+ l.length > 0 && /* @__PURE__ */ i("div", { className: "mt-1 flex flex-wrap gap-1 border-t border-slate-100 pt-1 dark:border-border/60", children: l.filter((u) => !d.includes(u)).map((u) => /* @__PURE__ */ g(
821
825
  "button",
822
826
  {
823
827
  type: "button",
824
- onClick: () => w(u),
828
+ onClick: () => v(u),
825
829
  className: "rounded-full border border-slate-200 px-2 py-0.5 text-[11px] text-slate-500 hover:border-nvr-cyan/50 hover:text-slate-700 dark:border-border dark:text-slate-400",
826
830
  children: [
827
831
  "+ ",
@@ -833,7 +837,7 @@ function qt({
833
837
  ] });
834
838
  }
835
839
  export {
836
- gr as FieldRenderer,
840
+ Ar as FieldRenderer,
837
841
  oe as resolveOptionFilterTokens,
838
- fe as useKeptText
842
+ be as useKeptText
839
843
  };