impact-nova 2.6.0-alpha.0 → 2.6.0
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/README.md +25 -27
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +3 -28
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.d.ts +3 -0
- package/dist/components/data/ag-grid-react/cell-renderers/date-display-renderer.js +38 -31
- package/dist/components/data/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +65 -75
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +1 -1
- package/dist/components/data/ag-grid-react/headers/advanced-filter/column-filter-section.js +54 -54
- package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +1 -1
- package/dist/components/data/ag-grid-react/headers/components/header-info.d.ts +9 -3
- package/dist/components/data/ag-grid-react/headers/components/header-info.js +69 -61
- package/dist/components/data/ag-grid-react/headers/components/info-modal.js +8 -8
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +119 -122
- package/dist/components/data/ag-grid-react/headers/utils/date-utils.d.ts +1 -2
- package/dist/components/data/ag-grid-react/headers/utils/date-utils.js +20 -25
- package/dist/components/data/ag-grid-react/headers/utils/filter-utils.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +254 -481
- package/dist/components/data/ag-grid-react/theme.js +2 -6
- package/dist/components/data/ag-grid-react/value-formatter.types.d.ts +0 -4
- package/dist/components/data/ag-grid-react/value-formatters.d.ts +19 -0
- package/dist/components/data/ag-grid-react/value-formatters.js +90 -88
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +2 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +64 -58
- package/dist/components/data/data-table/column-picker-authority.d.ts +35 -0
- package/dist/components/data/data-table/column-picker-authority.js +118 -0
- package/dist/components/data/data-table/column-picker-drop-validation.d.ts +7 -0
- package/dist/components/data/data-table/column-picker-drop-validation.js +37 -0
- package/dist/components/data/data-table/column-savability.d.ts +3 -0
- package/dist/components/data/data-table/column-savability.js +10 -0
- package/dist/components/data/data-table/data-table-column-apply.d.ts +2 -0
- package/dist/components/data/data-table/data-table-column-apply.js +84 -73
- package/dist/components/data/data-table/data-table-column-def-pin.js +31 -34
- package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +10 -0
- package/dist/components/data/data-table/data-table-column-list-tree-apply.js +79 -0
- package/dist/components/data/data-table/data-table-column-list.js +122 -64
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +12 -6
- package/dist/components/data/data-table/data-table-column-tree-cache.js +250 -131
- package/dist/components/data/data-table/data-table-context.js +5 -5
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +27 -0
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +196 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +1 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +7 -0
- package/dist/components/data/data-table/data-table-sheet-context.js +1 -1
- package/dist/components/data/data-table/data-table-sheet.js +1 -2
- package/dist/components/data/data-table/index.d.ts +2 -0
- package/dist/components/data/data-table/index.js +32 -28
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +5 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +28 -10
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +12 -0
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +12 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +250 -196
- package/dist/components/data/nested-list/components/NestedListContent.d.ts +10 -2
- package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
- package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
- package/dist/components/data/nested-list/components/SortableItem.js +62 -60
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
- package/dist/components/data/nested-list/nested-list-constants.js +10 -4
- package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
- package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
- package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
- package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
- package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
- package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
- package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
- package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
- package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
- package/dist/components/data/nested-list/nested-list.js +322 -336
- package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
- package/dist/components/data-display/calendar/calendar-available-view.d.ts +6 -2
- package/dist/components/data-display/calendar/calendar-available-view.js +18 -19
- package/dist/components/data-display/calendar/calendar-config.js +21 -22
- package/dist/components/data-display/calendar/calendar-day-button.js +21 -21
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +35 -36
- package/dist/components/data-display/calendar/calendar-fiscal-labels.d.ts +3 -3
- package/dist/components/data-display/calendar/calendar-fiscal-labels.js +62 -50
- package/dist/components/data-display/calendar/calendar-quarter-utils.js +12 -12
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-week-utils.js +33 -33
- package/dist/components/data-display/calendar/calendar-year-panes.js +68 -58
- package/dist/components/data-display/calendar/calendar-year-utils.d.ts +13 -0
- package/dist/components/data-display/calendar/calendar-year-utils.js +59 -50
- package/dist/components/data-display/calendar/calendar.js +156 -153
- package/dist/components/data-display/calendar/fiscal-period-caption-select.js +22 -23
- package/dist/components/data-display/calendar/use-calendar-i18n.d.ts +0 -1
- package/dist/components/data-display/calendar/use-calendar-i18n.js +9 -10
- package/dist/components/data-display/chart/chart.js +72 -72
- package/dist/components/data-display/chart/chart.utils.d.ts +1 -1
- package/dist/components/data-display/chart/chart.utils.js +31 -40
- package/dist/components/feedback/sheet/sheet.js +1 -1
- package/dist/components/feedback/toast/toast.d.ts +1 -1
- package/dist/components/feedback/toast/toast.variants.d.ts +1 -1
- package/dist/components/flows/filter-panel/filter-panel.d.ts +1 -1
- package/dist/components/flows/filter-panel/filter-panel.js +64 -65
- package/dist/components/flows/filter-panel/filter-panel.types.d.ts +0 -1
- package/dist/components/flows/guidance/guidance-layer.js +34 -31
- package/dist/components/flows/guidance/hooks/useGuidanceOverlayGeometry.js +29 -20
- package/dist/components/flows/guidance/renderers/announcement-renderer.d.ts +1 -1
- package/dist/components/flows/guidance/renderers/announcement-renderer.js +74 -28
- package/dist/components/flows/guidance/renderers/guidance-action-tap-icon.d.ts +5 -0
- package/dist/components/flows/guidance/renderers/guidance-action-tap-icon.js +68 -0
- package/dist/components/flows/guidance/renderers/guidance-announcement-surface.d.ts +5 -0
- package/dist/components/flows/guidance/renderers/guidance-announcement-surface.js +76 -0
- package/dist/components/flows/guidance/renderers/guidance-card-shared.d.ts +43 -2
- package/dist/components/flows/guidance/renderers/guidance-card-shared.js +322 -99
- package/dist/components/flows/guidance/renderers/guidance-renderer-shared.d.ts +3 -0
- package/dist/components/flows/guidance/renderers/guidance-renderer-shared.js +189 -148
- package/dist/components/flows/guidance/renderers/guidance-shortcut-display.d.ts +9 -0
- package/dist/components/flows/guidance/renderers/guidance-shortcut-display.js +36 -0
- package/dist/components/flows/guidance/renderers/guidance-tour-overlay.d.ts +2 -1
- package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +152 -89
- package/dist/components/forms/date-picker/date-picker.js +126 -125
- package/dist/components/forms/date-picker/date-range-picker.js +192 -191
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +6 -6
- package/dist/components/forms/date-picker/fiscal-pass-through.js +7 -3
- package/dist/components/forms/date-picker/multi-date-picker.js +67 -66
- package/dist/components/forms/date-picker/multi-quarter-picker.js +87 -87
- package/dist/components/forms/date-picker/multi-week-picker.js +83 -82
- package/dist/components/forms/date-picker/multi-year-picker.js +81 -81
- package/dist/components/forms/date-picker/quarter-range-picker.js +84 -84
- package/dist/components/forms/date-picker/week-picker.js +175 -174
- package/dist/components/forms/date-picker/week-range-picker.js +214 -213
- package/dist/components/forms/date-picker/year-range-picker.js +79 -79
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +0 -1
- package/dist/components/ui/local-raster-icons/rasterIcons.js +25 -27
- package/dist/form-react/Fields/ChipsField.js +49 -48
- package/dist/form-react/Fields/DateRangeField.js +25 -25
- package/dist/form-react/Fields/MonthRangeField.js +57 -57
- package/dist/form-react/Fields/MultiMonthPickerField.js +28 -26
- package/dist/form-react/Fields/MultiWeekPickerField.js +41 -38
- package/dist/form-react/Fields/MultiYearPickerField.js +45 -45
- package/dist/form-react/Fields/SelectField.js +24 -26
- package/dist/form-react/Fields/TextFieldWithBackendValidation.js +27 -26
- package/dist/form-react/Fields/WeekRangePicker.js +18 -16
- package/dist/form-react/Fields/YearPickerField.js +27 -27
- package/dist/form-react/Fields/YearRangePickerField.js +29 -29
- package/dist/form-react/fields.d.ts +3 -0
- package/dist/form-react/fields.js +35 -29
- package/dist/form-react/types/fields.types.d.ts +39 -0
- package/dist/form-react/utils/date.utils.d.ts +52 -2
- package/dist/form-react/utils/date.utils.js +198 -62
- package/dist/i18n/defaultMessages.d.ts +5 -143
- package/dist/i18n/defaultMessages.js +25 -163
- package/dist/i18n/getDateFnsLocale.d.ts +4 -5
- package/dist/i18n/getDateFnsLocale.js +16 -46
- package/dist/i18n/i18n.types.d.ts +0 -13
- package/dist/i18n/impact-nova-i18n-context.d.ts +1 -1
- package/dist/i18n/impact-nova-i18n-context.js +25 -33
- package/dist/i18n/impact-nova-i18n-defaults.js +6 -8
- package/dist/i18n/index.d.ts +1 -4
- package/dist/i18n/index.js +16 -41
- package/dist/i18n/locales/de.js +3 -141
- package/dist/i18n/locales/es.js +3 -141
- package/dist/i18n/locales/hi.js +3 -141
- package/dist/i18n/locales/kn.js +3 -141
- package/dist/impact-nova-components.css +0 -249
- package/dist/impact-nova-tokens.scss +22 -6
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +603 -622
- package/dist/lib/fiscal-calendar/index.d.ts +2 -2
- package/dist/lib/fiscal-calendar/index.js +26 -24
- package/dist/lib/fiscal-calendar/week-selection.d.ts +5 -0
- package/dist/lib/fiscal-calendar/week-selection.js +56 -49
- package/dist/lib/guidance/engine/guidance-engine.d.ts +9 -0
- package/dist/lib/guidance/engine/guidance-engine.js +127 -65
- package/dist/lib/guidance/engine/manifest-validator.js +37 -30
- package/dist/lib/guidance/targets/target-resolver.d.ts +1 -1
- package/dist/lib/guidance/targets/target-resolver.js +32 -30
- package/dist/lib/guidance/types/guidance.types.d.ts +41 -0
- package/dist/lib/hash/fnv1a128.d.ts +16 -0
- package/dist/lib/hash/fnv1a128.js +21 -0
- package/dist/llms/index.js +2 -26
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/migration.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/dist/providers/app-providers.d.ts +1 -3
- package/dist/providers/app-providers.js +11 -22
- package/package.json +2 -13
- package/dist/components/data/ag-grid-react/chat/chat-capabilities.d.ts +0 -9
- package/dist/components/data/ag-grid-react/chat/chat-capabilities.js +0 -22
- package/dist/components/data/ag-grid-react/chat/chat-column.d.ts +0 -20
- package/dist/components/data/ag-grid-react/chat/chat-column.js +0 -81
- package/dist/components/data/ag-grid-react/chat/chat-composer.d.ts +0 -10
- package/dist/components/data/ag-grid-react/chat/chat-composer.js +0 -352
- package/dist/components/data/ag-grid-react/chat/chat-constants.d.ts +0 -17
- package/dist/components/data/ag-grid-react/chat/chat-constants.js +0 -22
- package/dist/components/data/ag-grid-react/chat/chat-format.d.ts +0 -41
- package/dist/components/data/ag-grid-react/chat/chat-format.js +0 -94
- package/dist/components/data/ag-grid-react/chat/chat-host.d.ts +0 -10
- package/dist/components/data/ag-grid-react/chat/chat-host.js +0 -651
- package/dist/components/data/ag-grid-react/chat/chat-host.types.d.ts +0 -13
- package/dist/components/data/ag-grid-react/chat/chat-html.d.ts +0 -2
- package/dist/components/data/ag-grid-react/chat/chat-html.js +0 -40
- package/dist/components/data/ag-grid-react/chat/chat-identity.d.ts +0 -13
- package/dist/components/data/ag-grid-react/chat/chat-identity.js +0 -24
- package/dist/components/data/ag-grid-react/chat/chat-menu.d.ts +0 -13
- package/dist/components/data/ag-grid-react/chat/chat-menu.js +0 -15
- package/dist/components/data/ag-grid-react/chat/chat-notify.d.ts +0 -17
- package/dist/components/data/ag-grid-react/chat/chat-notify.js +0 -124
- package/dist/components/data/ag-grid-react/chat/chat-persist.d.ts +0 -13
- package/dist/components/data/ag-grid-react/chat/chat-persist.js +0 -34
- package/dist/components/data/ag-grid-react/chat/chat-priority.d.ts +0 -13
- package/dist/components/data/ag-grid-react/chat/chat-priority.js +0 -79
- package/dist/components/data/ag-grid-react/chat/chat-summaries.d.ts +0 -2
- package/dist/components/data/ag-grid-react/chat/chat-summaries.js +0 -24
- package/dist/components/data/ag-grid-react/chat/chat-thread-ui.d.ts +0 -72
- package/dist/components/data/ag-grid-react/chat/chat-thread-ui.js +0 -713
- package/dist/components/data/ag-grid-react/chat/chat-toggle.d.ts +0 -6
- package/dist/components/data/ag-grid-react/chat/chat-toggle.js +0 -25
- package/dist/components/data/ag-grid-react/chat/chat-ui-actions.d.ts +0 -13
- package/dist/components/data/ag-grid-react/chat/chat-ui-actions.js +0 -26
- package/dist/components/data/ag-grid-react/chat/chat-window.d.ts +0 -14
- package/dist/components/data/ag-grid-react/chat/chat-window.js +0 -82
- package/dist/components/data/ag-grid-react/chat/chat-workspace.d.ts +0 -91
- package/dist/components/data/ag-grid-react/chat/chat-workspace.js +0 -555
- package/dist/components/data/ag-grid-react/chat/chat.types.d.ts +0 -319
- package/dist/components/data/ag-grid-react/chat/index.d.ts +0 -6
- package/dist/components/data/ag-grid-react/chat/index.js +0 -24
- package/dist/components/data/ag-grid-react/chat.story-data.d.ts +0 -34
- package/dist/components/data/ag-grid-react/chat.story-sources.d.ts +0 -4
- package/dist/components/data/ag-grid-react/comments/assets/comments-no-results.png.js +0 -4
- package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.d.ts +0 -6
- package/dist/components/data/ag-grid-react/comments/comment-mode-toggle.js +0 -29
- package/dist/components/data/ag-grid-react/comments/comments-actions-menu.d.ts +0 -8
- package/dist/components/data/ag-grid-react/comments/comments-actions-menu.js +0 -18
- package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.d.ts +0 -18
- package/dist/components/data/ag-grid-react/comments/comments-ag-grid-presence.js +0 -16
- package/dist/components/data/ag-grid-react/comments/comments-capabilities.d.ts +0 -11
- package/dist/components/data/ag-grid-react/comments/comments-capabilities.js +0 -26
- package/dist/components/data/ag-grid-react/comments/comments-constants.d.ts +0 -12
- package/dist/components/data/ag-grid-react/comments/comments-constants.js +0 -21
- package/dist/components/data/ag-grid-react/comments/comments-format.d.ts +0 -20
- package/dist/components/data/ag-grid-react/comments/comments-format.js +0 -49
- package/dist/components/data/ag-grid-react/comments/comments-generation.d.ts +0 -14
- package/dist/components/data/ag-grid-react/comments/comments-generation.js +0 -18
- package/dist/components/data/ag-grid-react/comments/comments-host.d.ts +0 -10
- package/dist/components/data/ag-grid-react/comments/comments-host.js +0 -343
- package/dist/components/data/ag-grid-react/comments/comments-host.types.d.ts +0 -18
- package/dist/components/data/ag-grid-react/comments/comments-identity.d.ts +0 -7
- package/dist/components/data/ag-grid-react/comments/comments-identity.js +0 -20
- package/dist/components/data/ag-grid-react/comments/comments-menu.d.ts +0 -29
- package/dist/components/data/ag-grid-react/comments/comments-menu.js +0 -35
- package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.d.ts +0 -22
- package/dist/components/data/ag-grid-react/comments/comments-overlay-anchor.js +0 -98
- package/dist/components/data/ag-grid-react/comments/comments-overlay.d.ts +0 -21
- package/dist/components/data/ag-grid-react/comments/comments-overlay.js +0 -406
- package/dist/components/data/ag-grid-react/comments/comments-panel.d.ts +0 -9
- package/dist/components/data/ag-grid-react/comments/comments-panel.js +0 -272
- package/dist/components/data/ag-grid-react/comments/comments-persist.d.ts +0 -11
- package/dist/components/data/ag-grid-react/comments/comments-persist.js +0 -19
- package/dist/components/data/ag-grid-react/comments/comments-reveal.d.ts +0 -11
- package/dist/components/data/ag-grid-react/comments/comments-reveal.js +0 -31
- package/dist/components/data/ag-grid-react/comments/comments-ui-actions.d.ts +0 -18
- package/dist/components/data/ag-grid-react/comments/comments-ui-actions.js +0 -22
- package/dist/components/data/ag-grid-react/comments/comments-window.d.ts +0 -10
- package/dist/components/data/ag-grid-react/comments/comments-window.js +0 -62
- package/dist/components/data/ag-grid-react/comments/comments.types.d.ts +0 -178
- package/dist/components/data/ag-grid-react/comments/index.d.ts +0 -5
- package/dist/components/data/ag-grid-react/comments/index.js +0 -15
- package/dist/components/data/ag-grid-react/comments-cell-renderers-showcase.d.ts +0 -25
- package/dist/components/data/ag-grid-react/comments.story-data.d.ts +0 -37
- package/dist/components/data/ag-grid-react/comments.story-sources.d.ts +0 -11
- package/dist/components/data/ag-grid-react/grid-cell-address.d.ts +0 -21
- package/dist/components/data/ag-grid-react/grid-cell-address.js +0 -21
- package/dist/components/data/ag-grid-react/grid-row-reveal.d.ts +0 -34
- package/dist/components/data/ag-grid-react/grid-row-reveal.js +0 -33
- package/dist/components/data/ag-grid-react/notes/index.d.ts +0 -2
- package/dist/components/data/ag-grid-react/notes/index.js +0 -1
- package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.d.ts +0 -25
- package/dist/components/data/ag-grid-react/notes/notes-ag-grid-adapter.js +0 -32
- package/dist/components/data/ag-grid-react/notes/notes-constants.d.ts +0 -2
- package/dist/components/data/ag-grid-react/notes/notes-constants.js +0 -4
- package/dist/components/data/ag-grid-react/notes/notes.types.d.ts +0 -12
- package/dist/components/data/ag-grid-react/notes.story-sources.d.ts +0 -7
- package/dist/components/data/ag-grid-react/nova-system-column.d.ts +0 -7
- package/dist/components/data/ag-grid-react/nova-system-column.js +0 -18
- package/dist/components/forms/date-picker/use-picker-i18n.d.ts +0 -6
- package/dist/components/forms/date-picker/use-picker-i18n.js +0 -11
- package/dist/components/ui/local-raster-icons/message3d.webp.js +0 -4
- package/dist/i18n/format/collator.d.ts +0 -1
- package/dist/i18n/format/collator.js +0 -7
- package/dist/i18n/format/date-pattern.d.ts +0 -5
- package/dist/i18n/format/date-pattern.js +0 -20
- package/dist/i18n/format/format-date.d.ts +0 -9
- package/dist/i18n/format/format-date.js +0 -56
- package/dist/i18n/format/format-number.d.ts +0 -20
- package/dist/i18n/format/format-number.js +0 -68
- package/dist/i18n/format/formatter-cache.d.ts +0 -9
- package/dist/i18n/format/formatter-cache.js +0 -66
- package/dist/i18n/format/index.d.ts +0 -6
- package/dist/i18n/format/parse-number.d.ts +0 -6
- package/dist/i18n/format/parse-number.js +0 -53
- package/dist/i18n/locale-config.d.ts +0 -28
- package/dist/i18n/locale-config.js +0 -32
- package/dist/i18n/week-start.d.ts +0 -6
- package/dist/i18n/week-start.js +0 -30
- package/dist/llms/rules/data-table-chat.js +0 -1
- package/dist/llms/rules/data-table-comments.js +0 -1
- package/dist/llms/rules/data-table-notes.js +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export interface CommentModeToggleProps {
|
|
2
|
-
pressed: boolean;
|
|
3
|
-
onPressedChange: (pressed: boolean) => void;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function CommentModeToggle({ pressed, onPressedChange, disabled, }: CommentModeToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useImpactNovaI18n as a } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
3
|
-
import { Button as c } from "../../../primitives/button/button.js";
|
|
4
|
-
import { cn as i } from "../../../../lib/utils.js";
|
|
5
|
-
function f({
|
|
6
|
-
pressed: o,
|
|
7
|
-
onPressedChange: t,
|
|
8
|
-
disabled: m
|
|
9
|
-
}) {
|
|
10
|
-
const { t: n } = a();
|
|
11
|
-
return /* @__PURE__ */ e(
|
|
12
|
-
c,
|
|
13
|
-
{
|
|
14
|
-
type: "button",
|
|
15
|
-
size: "sm",
|
|
16
|
-
variant: o ? "default" : "outline",
|
|
17
|
-
"aria-pressed": o,
|
|
18
|
-
disabled: m,
|
|
19
|
-
"data-component": "comment-mode-toggle",
|
|
20
|
-
"data-iv-comments-mode": "",
|
|
21
|
-
className: i(o && "shadow-none"),
|
|
22
|
-
onClick: () => t(!o),
|
|
23
|
-
children: n("comments.commentMode")
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
f as CommentModeToggle
|
|
29
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { CommentMenuItem } from './comments.types';
|
|
3
|
-
export declare function CommentActionsMenu({ label, items, render, align, }: {
|
|
4
|
-
label: string;
|
|
5
|
-
items: CommentMenuItem[];
|
|
6
|
-
render?: (items: CommentMenuItem[]) => ReactNode;
|
|
7
|
-
align?: "start" | "end";
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as n, Fragment as l, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { Button as a } from "../../../primitives/button/button.js";
|
|
3
|
-
import { DropdownMenu as u, DropdownMenuTrigger as c, DropdownMenuContent as s, DropdownMenuItem as p } from "../../../feedback/dropdown-menu/dropdown-menu.js";
|
|
4
|
-
import { ThreeDots as h } from "impact-nova-icons";
|
|
5
|
-
function D({
|
|
6
|
-
label: t,
|
|
7
|
-
items: e,
|
|
8
|
-
render: o,
|
|
9
|
-
align: i
|
|
10
|
-
}) {
|
|
11
|
-
return o ? /* @__PURE__ */ n(l, { children: o(e) }) : e.length === 0 ? null : /* @__PURE__ */ d(u, { children: [
|
|
12
|
-
/* @__PURE__ */ n(c, { asChild: !0, children: /* @__PURE__ */ n(a, { type: "button", size: "iconSm", variant: "ghost", className: "[&_svg]:size-4", "aria-label": t, children: /* @__PURE__ */ n(h, {}) }) }),
|
|
13
|
-
/* @__PURE__ */ n(s, { align: i, children: e.map((r) => /* @__PURE__ */ n(p, { disabled: r.disabled, onSelect: r.onSelect, children: r.label }, r.id)) })
|
|
14
|
-
] });
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
D as CommentActionsMenu
|
|
18
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { GridCellAddress } from '../grid-cell-address';
|
|
2
|
-
import { IV_HAS_CELL_COMMENT } from './comments-constants';
|
|
3
|
-
export { IV_HAS_CELL_COMMENT };
|
|
4
|
-
export type CommentCellClassParams = {
|
|
5
|
-
node?: {
|
|
6
|
-
id?: string | null;
|
|
7
|
-
} | null;
|
|
8
|
-
column?: {
|
|
9
|
-
getColId?: () => string;
|
|
10
|
-
} | null;
|
|
11
|
-
};
|
|
12
|
-
export declare function isCommentPresenceClass(params: CommentCellClassParams, hasIndicator: (address: GridCellAddress) => boolean, onMissingRowId?: () => void): boolean;
|
|
13
|
-
export type CommentsRefreshApi = {
|
|
14
|
-
isDestroyed?: () => boolean;
|
|
15
|
-
getContainer?: () => HTMLElement | null;
|
|
16
|
-
hasIndicator: (address: GridCellAddress) => boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare function refreshCommentsPresence(api: CommentsRefreshApi, address: GridCellAddress): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { cellElementFromAddress as s } from "../grid-cell-address.js";
|
|
2
|
-
import { IV_HAS_CELL_COMMENT as l } from "./comments-constants.js";
|
|
3
|
-
function f(e, n, r) {
|
|
4
|
-
const t = e.node?.id, o = e.column?.getColId?.();
|
|
5
|
-
return t ? o ? n({ rowId: t, colId: o }) : !1 : (r?.(), !1);
|
|
6
|
-
}
|
|
7
|
-
function m(e, n) {
|
|
8
|
-
if (e.isDestroyed?.()) return;
|
|
9
|
-
const r = s(e.getContainer?.() ?? null, n);
|
|
10
|
-
r && r.classList.toggle(l, e.hasIndicator(n));
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
l as IV_HAS_CELL_COMMENT,
|
|
14
|
-
f as isCommentPresenceClass,
|
|
15
|
-
m as refreshCommentsPresence
|
|
16
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CellAddress, CommentsCapabilities } from './comments.types';
|
|
2
|
-
export declare const DEFAULT_NOTES_CAPABILITIES: CommentsCapabilities;
|
|
3
|
-
export declare function resolveCommentsCapabilities(getCapabilities: ((address: CellAddress) => CommentsCapabilities) | undefined, address: CellAddress): CommentsCapabilities;
|
|
4
|
-
export declare function commentsOverlayActions(capabilities: CommentsCapabilities): {
|
|
5
|
-
showOverlay: boolean;
|
|
6
|
-
showComposer: boolean;
|
|
7
|
-
showEdit: boolean;
|
|
8
|
-
showDelete: boolean;
|
|
9
|
-
showResolve: boolean;
|
|
10
|
-
canStartThread: boolean;
|
|
11
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const r = {
|
|
2
|
-
canView: !0,
|
|
3
|
-
canCreate: !0,
|
|
4
|
-
canReply: !0,
|
|
5
|
-
canEdit: !0,
|
|
6
|
-
canDelete: !0,
|
|
7
|
-
canResolve: !0
|
|
8
|
-
};
|
|
9
|
-
function t(e, n) {
|
|
10
|
-
return e?.(n) ?? r;
|
|
11
|
-
}
|
|
12
|
-
function o(e) {
|
|
13
|
-
return {
|
|
14
|
-
showOverlay: e.canView,
|
|
15
|
-
showComposer: e.canView && (e.canCreate || e.canReply),
|
|
16
|
-
showEdit: e.canEdit,
|
|
17
|
-
showDelete: e.canDelete,
|
|
18
|
-
showResolve: e.canResolve,
|
|
19
|
-
canStartThread: e.canCreate
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
r as DEFAULT_NOTES_CAPABILITIES,
|
|
24
|
-
o as commentsOverlayActions,
|
|
25
|
-
t as resolveCommentsCapabilities
|
|
26
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const COMMENTS_WRAPPER_ATTR = "data-iv-comments";
|
|
2
|
-
export declare const IV_HAS_CELL_COMMENT = "iv-has-cell-comment";
|
|
3
|
-
export declare const COMMENTS_HOVER_SHOW_DELAY_MS = 180;
|
|
4
|
-
export declare const COMMENTS_HOVER_HIDE_DELAY_MS = 220;
|
|
5
|
-
export declare const COMMENTS_PANEL_PAGE_SIZE = 50;
|
|
6
|
-
export declare const COMMENTS_THREAD_PAGE_SIZE = 50;
|
|
7
|
-
export declare const COMMENTS_VIRTUALIZE_AFTER = 32;
|
|
8
|
-
export declare const NATIVE_AG_GRID_NOTE_MENU_ITEMS: Set<string>;
|
|
9
|
-
export declare const COMMENTS_MENU_ADD = "iv-comments-add";
|
|
10
|
-
export declare const COMMENTS_MENU_OPEN = "iv-comments-open";
|
|
11
|
-
export declare const COMMENTS_MENU_DELETE = "iv-comments-delete-thread";
|
|
12
|
-
export declare const COMMENTS_MISSING_ROW_ID_WARNING = "[impact-nova] comments requires getRowId so CellAddress.rowId is a stable business key.";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const e = "iv-has-cell-comment", E = 180, _ = 220, t = 50, o = 50, M = 32, N = /* @__PURE__ */ new Set([
|
|
2
|
-
"note",
|
|
3
|
-
"addNote",
|
|
4
|
-
"editNote",
|
|
5
|
-
"deleteNote",
|
|
6
|
-
"viewNote",
|
|
7
|
-
"removeNote"
|
|
8
|
-
]), s = "iv-comments-add", n = "iv-comments-open", S = "iv-comments-delete-thread", c = "[impact-nova] comments requires getRowId so CellAddress.rowId is a stable business key.";
|
|
9
|
-
export {
|
|
10
|
-
_ as COMMENTS_HOVER_HIDE_DELAY_MS,
|
|
11
|
-
E as COMMENTS_HOVER_SHOW_DELAY_MS,
|
|
12
|
-
s as COMMENTS_MENU_ADD,
|
|
13
|
-
S as COMMENTS_MENU_DELETE,
|
|
14
|
-
n as COMMENTS_MENU_OPEN,
|
|
15
|
-
c as COMMENTS_MISSING_ROW_ID_WARNING,
|
|
16
|
-
t as COMMENTS_PANEL_PAGE_SIZE,
|
|
17
|
-
o as COMMENTS_THREAD_PAGE_SIZE,
|
|
18
|
-
M as COMMENTS_VIRTUALIZE_AFTER,
|
|
19
|
-
e as IV_HAS_CELL_COMMENT,
|
|
20
|
-
N as NATIVE_AG_GRID_NOTE_MENU_ITEMS
|
|
21
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare function commentInitials(author: string): string;
|
|
2
|
-
export declare function commentAvatarTone(author: string): string;
|
|
3
|
-
export declare function formatRelativeTime(iso: string, locale: string, now?: number): string;
|
|
4
|
-
export declare function formatPanelTimestamp(iso: string, locale: string): string;
|
|
5
|
-
export declare function commentTextSegments(text: string): ReadonlyArray<{
|
|
6
|
-
mention: boolean;
|
|
7
|
-
value: string;
|
|
8
|
-
}>;
|
|
9
|
-
/** Hover card: Sheets-style first + latest, collapse the middle. Cap 3 DOM rows. */
|
|
10
|
-
export declare const COMMENTS_PREVIEW_VISIBLE = 3;
|
|
11
|
-
export type CommentPreviewSlice<T> = {
|
|
12
|
-
kind: "all";
|
|
13
|
-
messages: readonly T[];
|
|
14
|
-
} | {
|
|
15
|
-
kind: "collapsed";
|
|
16
|
-
head: readonly T[];
|
|
17
|
-
hiddenCount: number;
|
|
18
|
-
tail: readonly T[];
|
|
19
|
-
};
|
|
20
|
-
export declare function commentPreviewSlice<T>(messages: readonly T[]): CommentPreviewSlice<T>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { formatRelativeTime as c, formatDateTime as a } from "../../../../i18n/format/format-date.js";
|
|
2
|
-
function u(t) {
|
|
3
|
-
return (t.trim()[0] ?? "?").toUpperCase();
|
|
4
|
-
}
|
|
5
|
-
const r = [
|
|
6
|
-
"bg-brand text-brand-foreground",
|
|
7
|
-
"bg-success text-success-foreground",
|
|
8
|
-
"bg-secondary text-secondary-foreground"
|
|
9
|
-
];
|
|
10
|
-
function d(t) {
|
|
11
|
-
let n = 0;
|
|
12
|
-
for (const e of t) n = (n + e.charCodeAt(0)) % r.length;
|
|
13
|
-
return r[n] ?? r[0];
|
|
14
|
-
}
|
|
15
|
-
function l(t, n, e = Date.now()) {
|
|
16
|
-
return c(t, n, e) || t;
|
|
17
|
-
}
|
|
18
|
-
function s(t, n) {
|
|
19
|
-
return a(t, n, {
|
|
20
|
-
hour: "numeric",
|
|
21
|
-
minute: "2-digit",
|
|
22
|
-
day: "2-digit",
|
|
23
|
-
month: "2-digit",
|
|
24
|
-
year: "numeric"
|
|
25
|
-
}) || t;
|
|
26
|
-
}
|
|
27
|
-
function T(t) {
|
|
28
|
-
return t.split(/(@[A-Za-z0-9._-]+)/g).flatMap(
|
|
29
|
-
(n) => n ? [{ mention: n.startsWith("@"), value: n }] : []
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
const m = 3, o = 1, i = 2;
|
|
33
|
-
function E(t) {
|
|
34
|
-
return t.length <= m ? { kind: "all", messages: t } : {
|
|
35
|
-
kind: "collapsed",
|
|
36
|
-
head: t.slice(0, o),
|
|
37
|
-
hiddenCount: t.length - o - i,
|
|
38
|
-
tail: t.slice(-i)
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
m as COMMENTS_PREVIEW_VISIBLE,
|
|
43
|
-
d as commentAvatarTone,
|
|
44
|
-
u as commentInitials,
|
|
45
|
-
E as commentPreviewSlice,
|
|
46
|
-
T as commentTextSegments,
|
|
47
|
-
s as formatPanelTimestamp,
|
|
48
|
-
l as formatRelativeTime
|
|
49
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare class CommentsGenerationGate {
|
|
2
|
-
private generation;
|
|
3
|
-
private destroyed;
|
|
4
|
-
next(): number;
|
|
5
|
-
isCurrent(token: number): boolean;
|
|
6
|
-
destroy(): void;
|
|
7
|
-
}
|
|
8
|
-
export declare class ThreadGenerationMap {
|
|
9
|
-
private tokens;
|
|
10
|
-
private destroyed;
|
|
11
|
-
next(threadId: string): number;
|
|
12
|
-
isCurrent(threadId: string, token: number): boolean;
|
|
13
|
-
destroy(): void;
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
class r {
|
|
2
|
-
tokens = /* @__PURE__ */ new Map();
|
|
3
|
-
destroyed = !1;
|
|
4
|
-
next(e) {
|
|
5
|
-
this.destroyed && (this.destroyed = !1, this.tokens.clear());
|
|
6
|
-
const t = (this.tokens.get(e) ?? 0) + 1;
|
|
7
|
-
return this.tokens.set(e, t), t;
|
|
8
|
-
}
|
|
9
|
-
isCurrent(e, t) {
|
|
10
|
-
return !this.destroyed && this.tokens.get(e) === t;
|
|
11
|
-
}
|
|
12
|
-
destroy() {
|
|
13
|
-
this.destroyed = !0, this.tokens.clear();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
r as ThreadGenerationMap
|
|
18
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { GridApi } from 'ag-grid-community';
|
|
3
|
-
import { DataTableCommentsConfig } from './comments.types';
|
|
4
|
-
import { CommentsCellEvent, CommentsHostHandle } from './comments-host.types';
|
|
5
|
-
export type { CommentsCellEvent, CommentsHostHandle };
|
|
6
|
-
export declare const CommentsHost: import('react').ForwardRefExoticComponent<{
|
|
7
|
-
comments: DataTableCommentsConfig;
|
|
8
|
-
gridApi: GridApi | null;
|
|
9
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
10
|
-
} & import('react').RefAttributes<CommentsHostHandle>>;
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import { jsxs as J, jsx as T } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Ce, useRef as O, useState as c, useMemo as we, useCallback as I, useEffect as oe, useImperativeHandle as ye } from "react";
|
|
3
|
-
import { Popover as Oe, PopoverAnchor as Ie, PopoverContent as Ee } from "../../../feedback/popover/popover.js";
|
|
4
|
-
import { subscribeGridApiEvents as Me } from "../grid-api-event-subscription.js";
|
|
5
|
-
import { Button as Te } from "../../../primitives/button/button.js";
|
|
6
|
-
import { toast as be } from "../../../../hooks/use-toast.js";
|
|
7
|
-
import { useImpactNovaI18n as Se } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
-
import { cn as De } from "../../../../lib/utils.js";
|
|
9
|
-
import { resolveCommentsCapabilities as xe, commentsOverlayActions as Ve } from "./comments-capabilities.js";
|
|
10
|
-
import { COMMENTS_HOVER_HIDE_DELAY_MS as se, COMMENTS_HOVER_SHOW_DELAY_MS as Re } from "./comments-constants.js";
|
|
11
|
-
import { boundLoadedThread as Le, commentsThreadPageRequest as L } from "./comments-window.js";
|
|
12
|
-
import { ThreadGenerationMap as Ne } from "./comments-generation.js";
|
|
13
|
-
import { resolveThreadId as Pe, isValidCommentMessageText as _e, mintCommentMessageId as Fe } from "./comments-identity.js";
|
|
14
|
-
import { measureCommentOverlayAnchor as ae, findCommentScrollViewports as He, commentAnchorRectsEqual as Ae } from "./comments-overlay-anchor.js";
|
|
15
|
-
import { CommentsOverlayBody as Be } from "./comments-overlay.js";
|
|
16
|
-
import { CommentsPanel as Ge } from "./comments-panel.js";
|
|
17
|
-
import { commitCommentsPersist as ke } from "./comments-persist.js";
|
|
18
|
-
import { revealCommentCell as je, waitForCommentCell as ze } from "./comments-reveal.js";
|
|
19
|
-
import { cellElementFromAddress as Ye, cellAddressFromGridEvent as le, cellElementFromGridEvent as ie } from "../grid-cell-address.js";
|
|
20
|
-
function qe(N, s, i) {
|
|
21
|
-
return {
|
|
22
|
-
isDestroyed: () => N?.isDestroyed?.() ?? !1,
|
|
23
|
-
getContainer: () => s.current,
|
|
24
|
-
hasIndicator: i
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function Q(N, s) {
|
|
28
|
-
return { threadId: N, address: s, messages: [], resolved: !1, hasMoreOlder: !1, hiddenCount: 0, messageCount: 0 };
|
|
29
|
-
}
|
|
30
|
-
const Ke = [
|
|
31
|
-
"bodyScroll",
|
|
32
|
-
"bodyScrollEnd",
|
|
33
|
-
"gridSizeChanged",
|
|
34
|
-
"modelUpdated",
|
|
35
|
-
"virtualColumnsChanged",
|
|
36
|
-
"columnPinned",
|
|
37
|
-
"columnMoved",
|
|
38
|
-
"columnResized",
|
|
39
|
-
"displayedColumnsChanged"
|
|
40
|
-
], mt = Ce(function({ comments: s, gridApi: i, containerRef: d }, ce) {
|
|
41
|
-
const { t: u } = Se(), E = O(new Ne()), P = O(null), h = O(null), G = O(null), k = O(!1), b = O(!1), [m, j] = c("closed"), [n, X] = c(null), [z, Y] = c(null), [de, _] = c(!0), [o, f] = c(null), [ue, q] = c(!1), [me, S] = c(!1), [fe, D] = c(null), [x, V] = c(""), [F, H] = c(null), [pe, Z] = c(!1), [$, R] = c(!1), [ee, K] = c(!1), [te, U] = c(!1), W = m !== "closed" && n != null, re = W && de, he = we(
|
|
42
|
-
() => ({
|
|
43
|
-
current: {
|
|
44
|
-
getBoundingClientRect: () => z ?? new DOMRect(),
|
|
45
|
-
getClientRects: () => [z ?? new DOMRect()]
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
[z]
|
|
49
|
-
), p = I(() => {
|
|
50
|
-
P.current != null && window.clearTimeout(P.current), h.current != null && window.clearTimeout(h.current), P.current = null, h.current = null;
|
|
51
|
-
}, []), g = I(() => {
|
|
52
|
-
p(), j("closed"), X(null), f(null), V(""), H(null), D(null), q(!1), U(!1), S(!1), R(!1), K(!1), Y(null), _(!0), b.current = !1;
|
|
53
|
-
const e = G.current;
|
|
54
|
-
G.current = null, e?.isConnected && e.focus();
|
|
55
|
-
}, [p]);
|
|
56
|
-
oe(() => {
|
|
57
|
-
const e = E.current;
|
|
58
|
-
return () => {
|
|
59
|
-
e.destroy(), p();
|
|
60
|
-
};
|
|
61
|
-
}, [p]);
|
|
62
|
-
const C = I(
|
|
63
|
-
async (e, t, r = "replace") => {
|
|
64
|
-
const a = Pe(e, s.getThreadId), l = E.current.next(a);
|
|
65
|
-
r === "replace" ? (f(
|
|
66
|
-
(w) => w?.threadId === a ? w : Q(a, e)
|
|
67
|
-
), q(!0)) : U(!0), D(null);
|
|
68
|
-
try {
|
|
69
|
-
const w = await s.loadThread(a, e, t);
|
|
70
|
-
if (!E.current.isCurrent(a, l)) return;
|
|
71
|
-
const y = Le(w ?? Q(a, e), t);
|
|
72
|
-
f(r === "prepend" ? (B) => !B || B.threadId !== a ? y : {
|
|
73
|
-
...y,
|
|
74
|
-
messages: [...y.messages, ...B.messages],
|
|
75
|
-
hasMoreOlder: y.hasMoreOlder,
|
|
76
|
-
hiddenCount: y.hiddenCount,
|
|
77
|
-
messageCount: y.messageCount ?? B.messageCount
|
|
78
|
-
} : y);
|
|
79
|
-
} catch {
|
|
80
|
-
if (!E.current.isCurrent(a, l)) return;
|
|
81
|
-
D(u("comments.loadError")), r === "replace" && f(Q(a, e));
|
|
82
|
-
} finally {
|
|
83
|
-
E.current.isCurrent(a, l) && (q(!1), U(!1));
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
[s, u]
|
|
87
|
-
), v = I(
|
|
88
|
-
(e, t, r) => {
|
|
89
|
-
p();
|
|
90
|
-
const a = r ?? Ye(d.current, e);
|
|
91
|
-
a && (G.current = a);
|
|
92
|
-
const l = ae(d.current, i, e);
|
|
93
|
-
b.current = !l.usable, _(l.usable), Y(l.rect), X(e), j(t), V(""), H(null), R(!1), C(e, L(t === "preview" ? "preview" : "page"));
|
|
94
|
-
},
|
|
95
|
-
[p, d, i, C]
|
|
96
|
-
), M = I(
|
|
97
|
-
async (e, t) => {
|
|
98
|
-
if (!n) return "rejected";
|
|
99
|
-
S(!0), D(null);
|
|
100
|
-
const r = await ke({
|
|
101
|
-
persist: s.persist,
|
|
102
|
-
event: e,
|
|
103
|
-
generations: E.current,
|
|
104
|
-
threadId: e.threadId,
|
|
105
|
-
api: qe(i, d, s.hasIndicator)
|
|
106
|
-
});
|
|
107
|
-
return r === "stale" ? r : r === "rejected" ? (S(!1), r) : r === "failed" || r === "conflict" ? (S(!1), D(u(r === "conflict" ? "comments.conflict" : "comments.saveError")), t && f(t), be({ title: u(r === "conflict" ? "comments.conflict" : "comments.saveError") }), r === "conflict" && C(n, L("page")), r) : (S(!1), V(""), H(null), e.type !== "delete-thread" && C(n, L("page")), r);
|
|
108
|
-
},
|
|
109
|
-
[n, i, C, s.persist, s.hasIndicator, d, u]
|
|
110
|
-
), ve = I(() => {
|
|
111
|
-
if (!n || !o || !_e(x)) return;
|
|
112
|
-
const e = o, t = (/* @__PURE__ */ new Date()).toISOString();
|
|
113
|
-
if (F) {
|
|
114
|
-
const a = { ...F, text: x.trim(), updatedAt: t };
|
|
115
|
-
f({
|
|
116
|
-
...o,
|
|
117
|
-
messages: o.messages.map((l) => l.id === F.id ? a : l)
|
|
118
|
-
}), M(
|
|
119
|
-
{ type: "edit-message", threadId: o.threadId, address: n, message: a },
|
|
120
|
-
e
|
|
121
|
-
);
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
const r = {
|
|
125
|
-
id: Fe(),
|
|
126
|
-
text: x.trim(),
|
|
127
|
-
author: s.getAuthor(),
|
|
128
|
-
createdAt: t
|
|
129
|
-
};
|
|
130
|
-
f({
|
|
131
|
-
...o,
|
|
132
|
-
resolved: !1,
|
|
133
|
-
messages: [...o.messages, r]
|
|
134
|
-
}), M({ type: "add-message", threadId: o.threadId, address: n, message: r }, e);
|
|
135
|
-
}, [n, x, F, s, M, o]);
|
|
136
|
-
ye(
|
|
137
|
-
ce,
|
|
138
|
-
() => ({
|
|
139
|
-
onCellMouseOver(e) {
|
|
140
|
-
if (s.previewOnHover === !1) return;
|
|
141
|
-
const t = le(e);
|
|
142
|
-
if (!t || !s.hasIndicator(t) || m === "expanded" || m === "composer") return;
|
|
143
|
-
const r = ie(e);
|
|
144
|
-
p(), P.current = window.setTimeout(() => {
|
|
145
|
-
v(t, "preview", r);
|
|
146
|
-
}, Re);
|
|
147
|
-
},
|
|
148
|
-
onCellMouseOut() {
|
|
149
|
-
m === "expanded" || m === "composer" || (p(), h.current = window.setTimeout(() => {
|
|
150
|
-
k.current || g();
|
|
151
|
-
}, se));
|
|
152
|
-
},
|
|
153
|
-
onCellClicked(e) {
|
|
154
|
-
const t = le(e);
|
|
155
|
-
if (!t) return;
|
|
156
|
-
const r = ie(e), a = xe(s.getCapabilities, t), l = Ve(a);
|
|
157
|
-
if (s.hasIndicator(t) && l.showOverlay) {
|
|
158
|
-
v(t, "expanded", r);
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
s.commentMode && l.canStartThread && v(t, "composer", r);
|
|
162
|
-
},
|
|
163
|
-
openAt(e, t) {
|
|
164
|
-
v(e, t);
|
|
165
|
-
},
|
|
166
|
-
close: g
|
|
167
|
-
}),
|
|
168
|
-
[p, g, m, s, v]
|
|
169
|
-
);
|
|
170
|
-
const A = O(0), ge = I(
|
|
171
|
-
(e) => {
|
|
172
|
-
const t = ++A.current;
|
|
173
|
-
R(!1), K(!0), (async () => {
|
|
174
|
-
try {
|
|
175
|
-
const r = await je(i, e, {
|
|
176
|
-
locateRow: s.locateRow,
|
|
177
|
-
pagination: i?.getGridOption?.("pagination") === !0
|
|
178
|
-
});
|
|
179
|
-
if (t !== A.current) return;
|
|
180
|
-
if (r === "missing") {
|
|
181
|
-
R(!0);
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
const a = await ze(d.current, e);
|
|
185
|
-
if (t !== A.current) return;
|
|
186
|
-
if (!a) {
|
|
187
|
-
R(!0);
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
v(e, "expanded", a);
|
|
191
|
-
} finally {
|
|
192
|
-
t === A.current && K(!1);
|
|
193
|
-
}
|
|
194
|
-
})();
|
|
195
|
-
},
|
|
196
|
-
[s.locateRow, d, i, v]
|
|
197
|
-
);
|
|
198
|
-
oe(() => {
|
|
199
|
-
if (!W || !n || !i || i.isDestroyed()) return;
|
|
200
|
-
let e = 0;
|
|
201
|
-
const t = () => {
|
|
202
|
-
cancelAnimationFrame(e), e = requestAnimationFrame(() => {
|
|
203
|
-
const l = ae(d.current, i, n);
|
|
204
|
-
if (!l.usable) {
|
|
205
|
-
b.current = !0, _(!1);
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
b.current = !1, _(!0), l.rect && Y((w) => Ae(w, l.rect) ? w : l.rect);
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
t();
|
|
212
|
-
const r = He(d.current);
|
|
213
|
-
for (const l of r) l.addEventListener("scroll", t, { passive: !0 });
|
|
214
|
-
const a = Me(i, Ke, t);
|
|
215
|
-
return () => {
|
|
216
|
-
cancelAnimationFrame(e);
|
|
217
|
-
for (const l of r) l.removeEventListener("scroll", t);
|
|
218
|
-
a();
|
|
219
|
-
};
|
|
220
|
-
}, [n, d, i, W]);
|
|
221
|
-
const ne = !!s.getSummaries;
|
|
222
|
-
return /* @__PURE__ */ J("div", { "data-iv-comments-host": "", className: "contents", children: [
|
|
223
|
-
ne ? /* @__PURE__ */ T("div", { className: "pointer-events-none absolute right-2 top-2 z-20", children: /* @__PURE__ */ T(
|
|
224
|
-
Te,
|
|
225
|
-
{
|
|
226
|
-
type: "button",
|
|
227
|
-
size: "sm",
|
|
228
|
-
variant: "outline",
|
|
229
|
-
className: "pointer-events-auto",
|
|
230
|
-
"data-iv-comments-panel-trigger": "",
|
|
231
|
-
onClick: () => Z(!0),
|
|
232
|
-
children: u("comments.panelTitle")
|
|
233
|
-
}
|
|
234
|
-
) }) : null,
|
|
235
|
-
/* @__PURE__ */ J(
|
|
236
|
-
Oe,
|
|
237
|
-
{
|
|
238
|
-
open: re,
|
|
239
|
-
onOpenChange: (e) => {
|
|
240
|
-
!e && b.current || e || g();
|
|
241
|
-
},
|
|
242
|
-
children: [
|
|
243
|
-
re ? /* @__PURE__ */ T(Ie, { virtualRef: he }) : null,
|
|
244
|
-
/* @__PURE__ */ J(
|
|
245
|
-
Ee,
|
|
246
|
-
{
|
|
247
|
-
container: d.current ?? void 0,
|
|
248
|
-
align: "start",
|
|
249
|
-
side: "right",
|
|
250
|
-
sideOffset: 8,
|
|
251
|
-
collisionPadding: 16,
|
|
252
|
-
className: De(
|
|
253
|
-
"overflow-hidden rounded-none border-0 p-0 shadow-none",
|
|
254
|
-
m === "preview" ? "w-[350px]" : "w-[400px]"
|
|
255
|
-
),
|
|
256
|
-
"data-iv-comments-popover": "",
|
|
257
|
-
"data-slot": "comments-popover",
|
|
258
|
-
onOpenAutoFocus: (e) => {
|
|
259
|
-
m === "preview" && e.preventDefault();
|
|
260
|
-
},
|
|
261
|
-
onMouseEnter: () => {
|
|
262
|
-
k.current = !0, h.current != null && (window.clearTimeout(h.current), h.current = null);
|
|
263
|
-
},
|
|
264
|
-
onMouseLeave: () => {
|
|
265
|
-
k.current = !1, m === "preview" && (h.current = window.setTimeout(g, se));
|
|
266
|
-
},
|
|
267
|
-
children: [
|
|
268
|
-
o && n ? /* @__PURE__ */ T(
|
|
269
|
-
Be,
|
|
270
|
-
{
|
|
271
|
-
thread: o,
|
|
272
|
-
mode: m === "closed" ? "preview" : m,
|
|
273
|
-
loading: ue,
|
|
274
|
-
error: fe,
|
|
275
|
-
saving: me,
|
|
276
|
-
draft: x,
|
|
277
|
-
config: s,
|
|
278
|
-
onDraftChange: V,
|
|
279
|
-
onSave: ve,
|
|
280
|
-
onRetry: () => {
|
|
281
|
-
n && C(n, L("page"));
|
|
282
|
-
},
|
|
283
|
-
onLoadOlder: () => {
|
|
284
|
-
const e = o.messages[0];
|
|
285
|
-
!n || !e || te || !o.hasMoreOlder || C(n, L("page", e.id), "prepend");
|
|
286
|
-
},
|
|
287
|
-
loadingOlder: te,
|
|
288
|
-
onExpand: () => {
|
|
289
|
-
n && v(n, "expanded");
|
|
290
|
-
},
|
|
291
|
-
onEdit: (e) => {
|
|
292
|
-
H(e), V(e.text), j("expanded");
|
|
293
|
-
},
|
|
294
|
-
onDeleteMessage: (e) => {
|
|
295
|
-
if (!o || !n) return;
|
|
296
|
-
const t = o;
|
|
297
|
-
f({ ...o, messages: o.messages.filter((r) => r.id !== e) }), M(
|
|
298
|
-
{ type: "delete-message", threadId: o.threadId, address: n, messageId: e },
|
|
299
|
-
t
|
|
300
|
-
);
|
|
301
|
-
},
|
|
302
|
-
onDeleteThread: () => {
|
|
303
|
-
!o || !n || M(
|
|
304
|
-
{ type: "delete-thread", threadId: o.threadId, address: n },
|
|
305
|
-
o
|
|
306
|
-
).then((e) => {
|
|
307
|
-
e === "applied" && g();
|
|
308
|
-
});
|
|
309
|
-
},
|
|
310
|
-
onClose: g,
|
|
311
|
-
onResolve: (e) => {
|
|
312
|
-
if (!o || !n) return;
|
|
313
|
-
const t = o;
|
|
314
|
-
f({ ...o, resolved: e }), M(
|
|
315
|
-
{ type: "resolve", threadId: o.threadId, address: n, resolved: e },
|
|
316
|
-
t
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
) : null,
|
|
321
|
-
$ ? /* @__PURE__ */ T("p", { className: "text-sm text-content-secondary", children: u("comments.notInView") }) : null
|
|
322
|
-
]
|
|
323
|
-
}
|
|
324
|
-
)
|
|
325
|
-
]
|
|
326
|
-
}
|
|
327
|
-
),
|
|
328
|
-
ne ? /* @__PURE__ */ T(
|
|
329
|
-
Ge,
|
|
330
|
-
{
|
|
331
|
-
open: pe,
|
|
332
|
-
onOpenChange: Z,
|
|
333
|
-
config: s,
|
|
334
|
-
onSelect: ge,
|
|
335
|
-
status: ee ? u("comments.loading") : $ ? u("comments.notInView") : null,
|
|
336
|
-
locating: ee
|
|
337
|
-
}
|
|
338
|
-
) : null
|
|
339
|
-
] });
|
|
340
|
-
});
|
|
341
|
-
export {
|
|
342
|
-
mt as CommentsHost
|
|
343
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CellAddress } from './comments.types';
|
|
2
|
-
export type CommentsCellEvent = {
|
|
3
|
-
node?: {
|
|
4
|
-
id?: string | null;
|
|
5
|
-
} | null;
|
|
6
|
-
column?: {
|
|
7
|
-
getColId?: () => string;
|
|
8
|
-
} | null;
|
|
9
|
-
eventTarget?: EventTarget | null;
|
|
10
|
-
event?: Event | null;
|
|
11
|
-
};
|
|
12
|
-
export type CommentsHostHandle = {
|
|
13
|
-
onCellMouseOver: (event: CommentsCellEvent) => void;
|
|
14
|
-
onCellMouseOut: (event: CommentsCellEvent) => void;
|
|
15
|
-
onCellClicked: (event: CommentsCellEvent) => void;
|
|
16
|
-
openAt: (address: CellAddress, mode: "preview" | "expanded" | "composer") => void;
|
|
17
|
-
close: () => void;
|
|
18
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CellAddress, ThreadId } from './comments.types';
|
|
2
|
-
export { cellAddressFromGridEvent, cellElementFromAddress, cellElementFromGridEvent, } from '../grid-cell-address';
|
|
3
|
-
export declare const THREAD_ID_SEPARATOR = "\0";
|
|
4
|
-
export declare function defaultGetThreadId(address: CellAddress): ThreadId;
|
|
5
|
-
export declare function resolveThreadId(address: CellAddress, getThreadId?: (address: CellAddress) => ThreadId): ThreadId;
|
|
6
|
-
export declare function mintCommentMessageId(): string;
|
|
7
|
-
export declare function isValidCommentMessageText(text: string): boolean;
|