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,20 +0,0 @@
|
|
|
1
|
-
const o = "\0";
|
|
2
|
-
function e(t) {
|
|
3
|
-
return `${t.rowId}\0${t.colId}`;
|
|
4
|
-
}
|
|
5
|
-
function r(t, n) {
|
|
6
|
-
return n?.(t) ?? e(t);
|
|
7
|
-
}
|
|
8
|
-
function i() {
|
|
9
|
-
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `comment-${Date.now().toString(36)}-${Math.random().toString(16).slice(2)}`;
|
|
10
|
-
}
|
|
11
|
-
function c(t) {
|
|
12
|
-
return t.trim().length > 0;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
o as THREAD_ID_SEPARATOR,
|
|
16
|
-
e as defaultGetThreadId,
|
|
17
|
-
c as isValidCommentMessageText,
|
|
18
|
-
i as mintCommentMessageId,
|
|
19
|
-
r as resolveThreadId
|
|
20
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { CellAddress, DataTableCommentsConfig } from './comments.types';
|
|
2
|
-
export type CommentsMenuItem = string | {
|
|
3
|
-
name?: string;
|
|
4
|
-
action?: () => void;
|
|
5
|
-
[key: string]: unknown;
|
|
6
|
-
};
|
|
7
|
-
export declare function filterNativeAgGridNoteMenuItems(items: readonly CommentsMenuItem[]): CommentsMenuItem[];
|
|
8
|
-
export declare function mergeCommentsContextMenuItems(args: {
|
|
9
|
-
items: readonly CommentsMenuItem[];
|
|
10
|
-
config: DataTableCommentsConfig;
|
|
11
|
-
address: CellAddress | undefined;
|
|
12
|
-
labels: {
|
|
13
|
-
addComment: string;
|
|
14
|
-
openComment: string;
|
|
15
|
-
deleteThread: string;
|
|
16
|
-
};
|
|
17
|
-
onAdd: (address: CellAddress) => void;
|
|
18
|
-
onOpen: (address: CellAddress) => void;
|
|
19
|
-
onDeleteThread: (address: CellAddress) => void;
|
|
20
|
-
preserveNativeNoteItems?: boolean;
|
|
21
|
-
}): CommentsMenuItem[];
|
|
22
|
-
export declare function addressFromMenuParams(params: {
|
|
23
|
-
node?: {
|
|
24
|
-
id?: string | null;
|
|
25
|
-
} | null;
|
|
26
|
-
column?: {
|
|
27
|
-
getColId?: () => string;
|
|
28
|
-
} | null;
|
|
29
|
-
}): CellAddress | undefined;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { COMMENTS_MENU_OPEN as r, COMMENTS_MENU_ADD as a, COMMENTS_MENU_DELETE as c, NATIVE_AG_GRID_NOTE_MENU_ITEMS as m } from "./comments-constants.js";
|
|
2
|
-
import { resolveCommentsCapabilities as d, commentsOverlayActions as l } from "./comments-capabilities.js";
|
|
3
|
-
function f(e) {
|
|
4
|
-
return e.filter((t) => !p(t));
|
|
5
|
-
}
|
|
6
|
-
function p(e) {
|
|
7
|
-
if (typeof e == "string") return m.has(e);
|
|
8
|
-
const t = e.cssClasses;
|
|
9
|
-
if (Array.isArray(t) && t.some((s) => typeof s == "string" && s.startsWith("iv-comments-")))
|
|
10
|
-
return !1;
|
|
11
|
-
const o = typeof e.name == "string" ? e.name : "";
|
|
12
|
-
return /\bnotes?\b/i.test(o);
|
|
13
|
-
}
|
|
14
|
-
function h(e) {
|
|
15
|
-
const t = e.preserveNativeNoteItems ? [...e.items] : f(e.items);
|
|
16
|
-
if (!e.address) return t;
|
|
17
|
-
const o = d(e.config.getCapabilities, e.address), s = l(o), i = e.config.hasIndicator(e.address), n = [];
|
|
18
|
-
return i && s.showOverlay ? n.push({
|
|
19
|
-
name: e.labels.openComment,
|
|
20
|
-
action: () => e.onOpen(e.address),
|
|
21
|
-
cssClasses: [r]
|
|
22
|
-
}) : !i && s.canStartThread && n.push({
|
|
23
|
-
name: e.labels.addComment,
|
|
24
|
-
action: () => e.onAdd(e.address),
|
|
25
|
-
cssClasses: [a]
|
|
26
|
-
}), i && s.showDelete && n.push({
|
|
27
|
-
name: e.labels.deleteThread,
|
|
28
|
-
action: () => e.onDeleteThread(e.address),
|
|
29
|
-
cssClasses: [c]
|
|
30
|
-
}), n.length === 0 ? t : t.length > 0 ? [...t, "separator", ...n] : n;
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
f as filterNativeAgGridNoteMenuItems,
|
|
34
|
-
h as mergeCommentsContextMenuItems
|
|
35
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { GridCellAddress } from '../grid-cell-address';
|
|
2
|
-
export type CommentOverlayAnchorApi = {
|
|
3
|
-
isDestroyed?: () => boolean;
|
|
4
|
-
getColumn: (id: string) => {
|
|
5
|
-
getPinned: () => "left" | "right" | boolean | null | undefined;
|
|
6
|
-
} | null | undefined;
|
|
7
|
-
};
|
|
8
|
-
export type CommentOverlayPin = "left" | "right" | null;
|
|
9
|
-
export declare function copyDomRect(rect: DOMRectReadOnly): DOMRect;
|
|
10
|
-
export declare function intersectDomRects(a: DOMRectReadOnly, b: DOMRectReadOnly): DOMRect;
|
|
11
|
-
/** Visible intersection of the live cell with the usable grid clip. Fully clipped cells are unusable. */
|
|
12
|
-
export declare function stickCommentAnchorRect(cell: DOMRectReadOnly, clip: DOMRectReadOnly): DOMRect;
|
|
13
|
-
export declare function resolveCommentOverlayPin(api: CommentOverlayAnchorApi | null | undefined, colId: string): CommentOverlayPin;
|
|
14
|
-
export declare function findCommentScrollViewports(container: HTMLElement | null): HTMLElement[];
|
|
15
|
-
export declare function commentOverlayClipRect(container: HTMLElement, pinned: CommentOverlayPin): DOMRect | null;
|
|
16
|
-
export declare function isCommentAnchorUsable(cell: DOMRectReadOnly, clip: DOMRectReadOnly): boolean;
|
|
17
|
-
export type CommentOverlayAnchor = {
|
|
18
|
-
usable: boolean;
|
|
19
|
-
rect: DOMRect | null;
|
|
20
|
-
};
|
|
21
|
-
export declare function measureCommentOverlayAnchor(container: HTMLElement | null, api: CommentOverlayAnchorApi | null | undefined, address: GridCellAddress): CommentOverlayAnchor;
|
|
22
|
-
export declare function commentAnchorRectsEqual(a: DOMRectReadOnly | null, b: DOMRectReadOnly | null): boolean;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { cellElementFromAddress as p } from "../grid-cell-address.js";
|
|
2
|
-
const w = [".ag-grid-viewport", ".ag-body-viewport"], M = [
|
|
3
|
-
".ag-grid-viewport",
|
|
4
|
-
".ag-body-viewport",
|
|
5
|
-
".ag-body-vertical-scroll-viewport",
|
|
6
|
-
".ag-body-horizontal-scroll-viewport",
|
|
7
|
-
".ag-center-cols-viewport"
|
|
8
|
-
], m = [".ag-pinned-left-cols-viewport", ".ag-grid-pinned-left-cells"], d = [".ag-pinned-right-cols-viewport", ".ag-grid-pinned-right-cells"];
|
|
9
|
-
function h(t) {
|
|
10
|
-
return new DOMRect(t.x, t.y, t.width, t.height);
|
|
11
|
-
}
|
|
12
|
-
function g(t, n) {
|
|
13
|
-
const r = Math.max(t.left, n.left), e = Math.max(t.top, n.top), o = Math.min(t.right, n.right), i = Math.min(t.bottom, n.bottom);
|
|
14
|
-
return new DOMRect(r, e, Math.max(0, o - r), Math.max(0, i - e));
|
|
15
|
-
}
|
|
16
|
-
function R(t, n) {
|
|
17
|
-
return g(t, n);
|
|
18
|
-
}
|
|
19
|
-
function v(t, n) {
|
|
20
|
-
const r = t?.getColumn?.(n)?.getPinned?.();
|
|
21
|
-
return r === "left" || r === !0 ? "left" : r === "right" ? "right" : null;
|
|
22
|
-
}
|
|
23
|
-
function u(t, n) {
|
|
24
|
-
for (const r of n) {
|
|
25
|
-
const e = t.querySelector(r);
|
|
26
|
-
if (e instanceof HTMLElement) return e;
|
|
27
|
-
}
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
function s(t) {
|
|
31
|
-
if (!t) return null;
|
|
32
|
-
const n = t.getBoundingClientRect();
|
|
33
|
-
return n.width < 2 || n.height < 2 ? null : n;
|
|
34
|
-
}
|
|
35
|
-
function x(t) {
|
|
36
|
-
if (!t) return [];
|
|
37
|
-
const n = [];
|
|
38
|
-
for (const r of M) {
|
|
39
|
-
const e = t.querySelector(r);
|
|
40
|
-
e instanceof HTMLElement && !n.includes(e) && n.push(e);
|
|
41
|
-
}
|
|
42
|
-
return n;
|
|
43
|
-
}
|
|
44
|
-
function f(t, n, r, e) {
|
|
45
|
-
const o = Math.max(t.top, n), i = Math.max(t.left, r), c = Math.min(t.right, e);
|
|
46
|
-
return new DOMRect(i, o, Math.max(0, c - i), Math.max(0, t.bottom - o));
|
|
47
|
-
}
|
|
48
|
-
function C(t, n) {
|
|
49
|
-
const r = u(t, w);
|
|
50
|
-
if (!r) return null;
|
|
51
|
-
let e = h(r.getBoundingClientRect());
|
|
52
|
-
const o = u(t, [".ag-header"]);
|
|
53
|
-
if (o && (e = f(e, o.getBoundingClientRect().bottom, e.left, e.right)), n === "left") {
|
|
54
|
-
const l = s(u(t, m));
|
|
55
|
-
return l && (e = f(e, e.top, l.left, l.right)), e;
|
|
56
|
-
}
|
|
57
|
-
if (n === "right") {
|
|
58
|
-
const l = s(u(t, d));
|
|
59
|
-
return l && (e = f(e, e.top, l.left, l.right)), e;
|
|
60
|
-
}
|
|
61
|
-
const i = s(u(t, m));
|
|
62
|
-
i && (e = f(e, e.top, i.right, e.right));
|
|
63
|
-
const c = s(u(t, d));
|
|
64
|
-
c && (e = f(e, e.top, e.left, c.left));
|
|
65
|
-
const a = s(u(t, [".ag-center-cols-viewport"]));
|
|
66
|
-
if (a) {
|
|
67
|
-
const l = g(e, a);
|
|
68
|
-
if (l.width > 2 && l.height > 2) return l;
|
|
69
|
-
}
|
|
70
|
-
return e;
|
|
71
|
-
}
|
|
72
|
-
function b(t, n) {
|
|
73
|
-
const r = g(t, n);
|
|
74
|
-
return r.width > 1 && r.height > 1;
|
|
75
|
-
}
|
|
76
|
-
function O(t, n, r) {
|
|
77
|
-
if (!t) return { usable: !1, rect: null };
|
|
78
|
-
const e = v(n, r.colId), o = p(t, r), i = C(t, e);
|
|
79
|
-
if (!i)
|
|
80
|
-
return o ? { usable: !0, rect: h(o.getBoundingClientRect()) } : { usable: !0, rect: h(t.getBoundingClientRect()) };
|
|
81
|
-
if (!o) return { usable: !1, rect: null };
|
|
82
|
-
const c = h(o.getBoundingClientRect());
|
|
83
|
-
return b(c, i) ? { usable: !0, rect: R(c, i) } : { usable: !1, rect: null };
|
|
84
|
-
}
|
|
85
|
-
function S(t, n) {
|
|
86
|
-
return t === n ? !0 : !t || !n ? !1 : Math.abs(t.x - n.x) < 0.5 && Math.abs(t.y - n.y) < 0.5 && Math.abs(t.width - n.width) < 0.5 && Math.abs(t.height - n.height) < 0.5;
|
|
87
|
-
}
|
|
88
|
-
export {
|
|
89
|
-
S as commentAnchorRectsEqual,
|
|
90
|
-
C as commentOverlayClipRect,
|
|
91
|
-
h as copyDomRect,
|
|
92
|
-
x as findCommentScrollViewports,
|
|
93
|
-
g as intersectDomRects,
|
|
94
|
-
b as isCommentAnchorUsable,
|
|
95
|
-
O as measureCommentOverlayAnchor,
|
|
96
|
-
v as resolveCommentOverlayPin,
|
|
97
|
-
R as stickCommentAnchorRect
|
|
98
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CellCommentThread, CommentMessage, DataTableCommentsConfig } from './comments.types';
|
|
2
|
-
export declare function CommentsOverlayBody({ thread, mode, loading, error, saving, draft, onDraftChange, onSave, onRetry, onExpand, onEdit, onDeleteMessage, onDeleteThread, onResolve, onClose, onLoadOlder, loadingOlder, config, }: {
|
|
3
|
-
thread: CellCommentThread;
|
|
4
|
-
mode: "preview" | "expanded" | "composer";
|
|
5
|
-
loading: boolean;
|
|
6
|
-
error: string | null;
|
|
7
|
-
saving: boolean;
|
|
8
|
-
draft: string;
|
|
9
|
-
onDraftChange: (value: string) => void;
|
|
10
|
-
onSave: () => void;
|
|
11
|
-
onRetry: () => void;
|
|
12
|
-
onExpand: () => void;
|
|
13
|
-
onEdit: (message: CommentMessage) => void;
|
|
14
|
-
onDeleteMessage: (messageId: string) => void;
|
|
15
|
-
onDeleteThread: () => void;
|
|
16
|
-
onResolve: (resolved: boolean) => void;
|
|
17
|
-
onClose: () => void;
|
|
18
|
-
onLoadOlder: () => void;
|
|
19
|
-
loadingOlder: boolean;
|
|
20
|
-
config: DataTableCommentsConfig;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as s, Fragment as S } from "react/jsx-runtime";
|
|
2
|
-
import { Avatar as j, AvatarFallback as F } from "../../../data-display/avatar/avatar.js";
|
|
3
|
-
import { Button as M } from "../../../primitives/button/button.js";
|
|
4
|
-
import { Textarea as P } from "../../../forms/textarea/textarea.js";
|
|
5
|
-
import { AlertDialog as K, AlertDialogContent as Z, AlertDialogHeader as q, AlertDialogTitle as H, AlertDialogDescription as U, AlertDialogFooter as Y, AlertDialogCancel as $, AlertDialogAction as G } from "../../../feedback/alert-dialog/alert-dialog.js";
|
|
6
|
-
import { useImpactNovaI18n as J } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
-
import { cn as Q } from "../../../../lib/utils.js";
|
|
8
|
-
import { CheckTickcircle as W, Cross as X } from "impact-nova-icons";
|
|
9
|
-
import { resolveCommentsCapabilities as ee, commentsOverlayActions as te } from "./comments-capabilities.js";
|
|
10
|
-
import { commentPreviewSlice as ne, formatRelativeTime as E, commentInitials as le, commentAvatarTone as oe, commentTextSegments as re } from "./comments-format.js";
|
|
11
|
-
import { buildCommentThreadMenuItems as ae, buildCommentMessageMenuItems as se } from "./comments-ui-actions.js";
|
|
12
|
-
import { CommentActionsMenu as _ } from "./comments-actions-menu.js";
|
|
13
|
-
import { useState as ie, useRef as I, useLayoutEffect as ce } from "react";
|
|
14
|
-
import { useVirtualizedList as de } from "../../../../lib/virtualized/useVirtualizedList.js";
|
|
15
|
-
import { COMMENTS_VIRTUALIZE_AFTER as me } from "./comments-constants.js";
|
|
16
|
-
const ue = "!h-8 !w-8 !rounded-md text-sm font-extrabold";
|
|
17
|
-
function he({ text: e }) {
|
|
18
|
-
return re(e).map(
|
|
19
|
-
(o, c) => o.mention ? /* @__PURE__ */ t("span", { className: "font-semibold text-brand", children: o.value }, c) : o.value
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function pe() {
|
|
23
|
-
return /* @__PURE__ */ t("svg", { width: "9", height: "14", viewBox: "0 0 9 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t(
|
|
24
|
-
"path",
|
|
25
|
-
{
|
|
26
|
-
d: "M0.195 4.86167C0.455 5.12167 0.875 5.12167 1.135 4.86167L3.72167 2.28167V12.395C3.72167 12.7617 4.02167 13.0617 4.38833 13.0617C4.755 13.0617 5.055 12.7617 5.055 12.395V2.28167L7.64167 4.86833C7.90167 5.12833 8.32167 5.12833 8.58167 4.86833C8.84167 4.60833 8.84167 4.18833 8.58167 3.92833L4.855 0.195C4.595 -0.065 4.175 -0.065 3.915 0.195L0.195 3.92167C-0.065 4.18167 -0.065 4.60833 0.195 4.86167Z",
|
|
27
|
-
fill: "currentColor"
|
|
28
|
-
}
|
|
29
|
-
) });
|
|
30
|
-
}
|
|
31
|
-
function xe({ author: e }) {
|
|
32
|
-
return /* @__PURE__ */ t(j, { size: "sm", shape: "square", className: ue, children: /* @__PURE__ */ t(F, { className: Q("text-sm font-extrabold", oe(e)), children: le(e) }) });
|
|
33
|
-
}
|
|
34
|
-
function R({
|
|
35
|
-
author: e,
|
|
36
|
-
renderAvatar: o
|
|
37
|
-
}) {
|
|
38
|
-
return o ? o({ author: e }) : /* @__PURE__ */ t(xe, { author: e });
|
|
39
|
-
}
|
|
40
|
-
function O({
|
|
41
|
-
message: e,
|
|
42
|
-
renderMessageBody: o
|
|
43
|
-
}) {
|
|
44
|
-
return o ? o({ message: e }) : /* @__PURE__ */ t(he, { text: e.text });
|
|
45
|
-
}
|
|
46
|
-
function z({
|
|
47
|
-
message: e,
|
|
48
|
-
locale: o,
|
|
49
|
-
config: c
|
|
50
|
-
}) {
|
|
51
|
-
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
52
|
-
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
53
|
-
/* @__PURE__ */ t(R, { author: e.author, renderAvatar: c.renderAvatar }),
|
|
54
|
-
/* @__PURE__ */ t("p", { className: "truncate text-sm font-semibold leading-[21px] text-content", children: e.author }),
|
|
55
|
-
/* @__PURE__ */ t("p", { className: "shrink-0 text-xs font-medium text-content-secondary", children: E(e.updatedAt ?? e.createdAt, o) })
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ t("p", { className: "line-clamp-3 pl-9 text-sm font-medium leading-5 text-content", children: /* @__PURE__ */ t(O, { message: e, renderMessageBody: c.renderMessageBody }) })
|
|
58
|
-
] });
|
|
59
|
-
}
|
|
60
|
-
function fe(e) {
|
|
61
|
-
return (e.hiddenCount ?? 0) > 0 && e.messages.length > 0 ? {
|
|
62
|
-
kind: "collapsed",
|
|
63
|
-
head: e.messages.slice(0, 1),
|
|
64
|
-
tail: e.messages.slice(1),
|
|
65
|
-
hiddenCount: e.hiddenCount ?? 0
|
|
66
|
-
} : ne(e.messages);
|
|
67
|
-
}
|
|
68
|
-
function B({
|
|
69
|
-
message: e,
|
|
70
|
-
thread: o,
|
|
71
|
-
locale: c,
|
|
72
|
-
showEdit: p,
|
|
73
|
-
showDelete: i,
|
|
74
|
-
onEdit: x,
|
|
75
|
-
onDelete: v,
|
|
76
|
-
messageActionsLabel: u,
|
|
77
|
-
editLabel: b,
|
|
78
|
-
deleteLabel: C,
|
|
79
|
-
config: d
|
|
80
|
-
}) {
|
|
81
|
-
const h = {
|
|
82
|
-
address: o.address,
|
|
83
|
-
threadId: o.threadId,
|
|
84
|
-
resolved: o.resolved,
|
|
85
|
-
message: e
|
|
86
|
-
}, A = se({
|
|
87
|
-
showEdit: p,
|
|
88
|
-
showDelete: i,
|
|
89
|
-
editLabel: b,
|
|
90
|
-
deleteLabel: C,
|
|
91
|
-
extras: d.messageActions,
|
|
92
|
-
context: h,
|
|
93
|
-
onEdit: () => x(e),
|
|
94
|
-
onDelete: () => v(e.id)
|
|
95
|
-
});
|
|
96
|
-
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", "data-iv-comments-message": e.id, "data-slot": "comments-message", children: [
|
|
97
|
-
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2", children: [
|
|
98
|
-
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
99
|
-
/* @__PURE__ */ t(R, { author: e.author, renderAvatar: d.renderAvatar }),
|
|
100
|
-
/* @__PURE__ */ t("p", { className: "truncate text-sm font-semibold leading-[21px] text-content", children: e.author }),
|
|
101
|
-
/* @__PURE__ */ t("p", { className: "shrink-0 text-xs font-medium leading-[1.25] text-content-secondary", children: E(e.updatedAt ?? e.createdAt, c) })
|
|
102
|
-
] }),
|
|
103
|
-
/* @__PURE__ */ t(
|
|
104
|
-
_,
|
|
105
|
-
{
|
|
106
|
-
label: u,
|
|
107
|
-
items: A,
|
|
108
|
-
render: d.renderMessageActions ? (y) => d.renderMessageActions({ items: y, context: h }) : void 0
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
] }),
|
|
112
|
-
/* @__PURE__ */ t("p", { className: "whitespace-pre-wrap break-words pl-9 text-sm font-medium leading-5 text-content", children: /* @__PURE__ */ t(O, { message: e, renderMessageBody: d.renderMessageBody }) })
|
|
113
|
-
] });
|
|
114
|
-
}
|
|
115
|
-
function ve({
|
|
116
|
-
messages: e,
|
|
117
|
-
thread: o,
|
|
118
|
-
config: c,
|
|
119
|
-
hasMoreOlder: p,
|
|
120
|
-
loadingOlder: i,
|
|
121
|
-
olderLabel: x,
|
|
122
|
-
onLoadOlder: v,
|
|
123
|
-
locale: u,
|
|
124
|
-
showEdit: b,
|
|
125
|
-
showDelete: C,
|
|
126
|
-
onEdit: d,
|
|
127
|
-
onDelete: h,
|
|
128
|
-
messageActionsLabel: A,
|
|
129
|
-
editLabel: y,
|
|
130
|
-
deleteLabel: g
|
|
131
|
-
}) {
|
|
132
|
-
const T = I(null), w = p || e.length > me, r = de({
|
|
133
|
-
scrollElementRef: T,
|
|
134
|
-
rowCount: w ? e.length : 0,
|
|
135
|
-
getRowId: (l) => e[l]?.id ?? String(l),
|
|
136
|
-
getRowData: (l) => e[l],
|
|
137
|
-
estimateSize: () => 76,
|
|
138
|
-
overscan: 4,
|
|
139
|
-
initialRect: { width: 400, height: 205 }
|
|
140
|
-
}), n = I(0), f = I(!1);
|
|
141
|
-
ce(() => {
|
|
142
|
-
if (!w || e.length === 0) {
|
|
143
|
-
n.current = e.length;
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
if (!f.current) {
|
|
147
|
-
r.scrollToIndex(e.length - 1, { align: "end" }), f.current = !0, n.current = e.length;
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
const l = e.length - n.current;
|
|
151
|
-
l > 0 && r.scrollToIndex(l, { align: "start" }), n.current = e.length;
|
|
152
|
-
}, [r, e.length, w]);
|
|
153
|
-
const D = p ? /* @__PURE__ */ t(
|
|
154
|
-
"button",
|
|
155
|
-
{
|
|
156
|
-
type: "button",
|
|
157
|
-
"data-iv-comments-load-older": "",
|
|
158
|
-
className: "px-1 py-2 text-left text-sm font-semibold text-brand",
|
|
159
|
-
disabled: i,
|
|
160
|
-
"aria-busy": i,
|
|
161
|
-
onClick: v,
|
|
162
|
-
children: x
|
|
163
|
-
}
|
|
164
|
-
) : null;
|
|
165
|
-
return w ? /* @__PURE__ */ s("div", { ref: T, className: "max-h-[205px] overflow-y-auto", "data-iv-comments-virtual": "", "data-slot": "comments-thread", children: [
|
|
166
|
-
D,
|
|
167
|
-
/* @__PURE__ */ t("div", { style: { height: r.totalSize, position: "relative" }, children: r.virtualItems.map((l) => {
|
|
168
|
-
const m = e[l.index];
|
|
169
|
-
return m ? /* @__PURE__ */ t(
|
|
170
|
-
"div",
|
|
171
|
-
{
|
|
172
|
-
ref: r.measureElement,
|
|
173
|
-
"data-index": l.index,
|
|
174
|
-
className: "pb-4",
|
|
175
|
-
style: {
|
|
176
|
-
position: "absolute",
|
|
177
|
-
top: 0,
|
|
178
|
-
left: 0,
|
|
179
|
-
width: "100%",
|
|
180
|
-
transform: `translateY(${l.start}px)`
|
|
181
|
-
},
|
|
182
|
-
children: /* @__PURE__ */ t(
|
|
183
|
-
B,
|
|
184
|
-
{
|
|
185
|
-
message: m,
|
|
186
|
-
thread: o,
|
|
187
|
-
config: c,
|
|
188
|
-
locale: u,
|
|
189
|
-
showEdit: b,
|
|
190
|
-
showDelete: C,
|
|
191
|
-
onEdit: d,
|
|
192
|
-
onDelete: h,
|
|
193
|
-
messageActionsLabel: A,
|
|
194
|
-
editLabel: y,
|
|
195
|
-
deleteLabel: g
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
},
|
|
199
|
-
m.id
|
|
200
|
-
) : null;
|
|
201
|
-
}) })
|
|
202
|
-
] }) : /* @__PURE__ */ s("div", { className: "flex max-h-[205px] flex-col gap-4 overflow-y-auto", "data-slot": "comments-thread", children: [
|
|
203
|
-
D,
|
|
204
|
-
/* @__PURE__ */ t("ul", { className: "flex flex-col gap-4", children: e.map((l) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
205
|
-
B,
|
|
206
|
-
{
|
|
207
|
-
message: l,
|
|
208
|
-
thread: o,
|
|
209
|
-
config: c,
|
|
210
|
-
locale: u,
|
|
211
|
-
showEdit: b,
|
|
212
|
-
showDelete: C,
|
|
213
|
-
onEdit: d,
|
|
214
|
-
onDelete: h,
|
|
215
|
-
messageActionsLabel: A,
|
|
216
|
-
editLabel: y,
|
|
217
|
-
deleteLabel: g
|
|
218
|
-
}
|
|
219
|
-
) }, l.id)) })
|
|
220
|
-
] });
|
|
221
|
-
}
|
|
222
|
-
function Se({
|
|
223
|
-
thread: e,
|
|
224
|
-
mode: o,
|
|
225
|
-
loading: c,
|
|
226
|
-
error: p,
|
|
227
|
-
saving: i,
|
|
228
|
-
draft: x,
|
|
229
|
-
onDraftChange: v,
|
|
230
|
-
onSave: u,
|
|
231
|
-
onRetry: b,
|
|
232
|
-
onExpand: C,
|
|
233
|
-
onEdit: d,
|
|
234
|
-
onDeleteMessage: h,
|
|
235
|
-
onDeleteThread: A,
|
|
236
|
-
onResolve: y,
|
|
237
|
-
onClose: g,
|
|
238
|
-
onLoadOlder: T,
|
|
239
|
-
loadingOlder: w,
|
|
240
|
-
config: r
|
|
241
|
-
}) {
|
|
242
|
-
const { t: n, dateLocale: f } = J(), D = ee(r.getCapabilities, e.address), l = te(D), m = fe(e), [N, k] = ie(
|
|
243
|
-
null
|
|
244
|
-
), L = {
|
|
245
|
-
address: e.address,
|
|
246
|
-
threadId: e.threadId,
|
|
247
|
-
resolved: e.resolved
|
|
248
|
-
}, V = ae({
|
|
249
|
-
showDelete: l.showDelete && e.messages.length > 0,
|
|
250
|
-
deleteLabel: n("comments.deleteThread"),
|
|
251
|
-
extras: r.threadActions,
|
|
252
|
-
context: L,
|
|
253
|
-
onDelete: () => k({ type: "thread" })
|
|
254
|
-
});
|
|
255
|
-
return l.showOverlay ? o === "preview" ? /* @__PURE__ */ t(
|
|
256
|
-
"button",
|
|
257
|
-
{
|
|
258
|
-
type: "button",
|
|
259
|
-
"data-iv-comments-preview": "",
|
|
260
|
-
"data-slot": "comments-preview",
|
|
261
|
-
className: "flex w-full flex-col gap-4 p-3 text-left",
|
|
262
|
-
onClick: C,
|
|
263
|
-
children: m.kind === "all" ? m.messages.map((a) => /* @__PURE__ */ t(z, { message: a, locale: f, config: r }, a.id)) : /* @__PURE__ */ s(S, { children: [
|
|
264
|
-
m.head.map((a) => /* @__PURE__ */ t(z, { message: a, locale: f, config: r }, a.id)),
|
|
265
|
-
/* @__PURE__ */ t("p", { className: "pl-9 text-sm font-semibold text-brand", children: n("comments.moreReplies", { count: m.hiddenCount }) }),
|
|
266
|
-
m.tail.map((a) => /* @__PURE__ */ t(z, { message: a, locale: f, config: r }, a.id))
|
|
267
|
-
] })
|
|
268
|
-
}
|
|
269
|
-
) : /* @__PURE__ */ s("div", { "data-iv-comments-overlay": "", "data-slot": "comments-overlay", className: "flex w-full flex-col", children: [
|
|
270
|
-
/* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-border p-2", "data-slot": "comments-header", children: [
|
|
271
|
-
/* @__PURE__ */ t("h3", { className: "text-sm font-extrabold leading-[21px] text-content", children: n("comments.title") }),
|
|
272
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-3", "data-slot": "comments-actions", children: [
|
|
273
|
-
/* @__PURE__ */ t(
|
|
274
|
-
_,
|
|
275
|
-
{
|
|
276
|
-
label: n("comments.threadActions"),
|
|
277
|
-
items: V,
|
|
278
|
-
render: r.renderThreadActions ? (a) => r.renderThreadActions({ items: a, context: L }) : void 0
|
|
279
|
-
}
|
|
280
|
-
),
|
|
281
|
-
l.showResolve ? /* @__PURE__ */ t(
|
|
282
|
-
M,
|
|
283
|
-
{
|
|
284
|
-
type: "button",
|
|
285
|
-
size: "iconSm",
|
|
286
|
-
variant: "ghost",
|
|
287
|
-
className: "[&_svg]:size-4",
|
|
288
|
-
disabled: i,
|
|
289
|
-
"aria-label": e.resolved ? n("comments.unresolve") : n("comments.resolve"),
|
|
290
|
-
onClick: () => y(!e.resolved),
|
|
291
|
-
children: /* @__PURE__ */ t(W, {})
|
|
292
|
-
}
|
|
293
|
-
) : null,
|
|
294
|
-
/* @__PURE__ */ t(
|
|
295
|
-
M,
|
|
296
|
-
{
|
|
297
|
-
type: "button",
|
|
298
|
-
size: "iconSm",
|
|
299
|
-
variant: "ghost",
|
|
300
|
-
className: "[&_svg]:size-4",
|
|
301
|
-
"aria-label": n("aria.close"),
|
|
302
|
-
onClick: g,
|
|
303
|
-
children: /* @__PURE__ */ t(X, {})
|
|
304
|
-
}
|
|
305
|
-
)
|
|
306
|
-
] })
|
|
307
|
-
] }),
|
|
308
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
309
|
-
c ? /* @__PURE__ */ t("p", { "aria-busy": "true", children: n("comments.loading") }) : e.messages.length > 0 ? /* @__PURE__ */ t(
|
|
310
|
-
ve,
|
|
311
|
-
{
|
|
312
|
-
messages: e.messages,
|
|
313
|
-
thread: e,
|
|
314
|
-
config: r,
|
|
315
|
-
hasMoreOlder: !!e.hasMoreOlder,
|
|
316
|
-
loadingOlder: w,
|
|
317
|
-
olderLabel: (e.hiddenCount ?? 0) > 0 ? n("comments.moreReplies", { count: e.hiddenCount }) : n("comments.viewOlder"),
|
|
318
|
-
onLoadOlder: T,
|
|
319
|
-
locale: f,
|
|
320
|
-
showEdit: l.showEdit,
|
|
321
|
-
showDelete: l.showDelete,
|
|
322
|
-
onEdit: d,
|
|
323
|
-
onDelete: h,
|
|
324
|
-
messageActionsLabel: n("comments.messageActions"),
|
|
325
|
-
editLabel: n("comments.edit"),
|
|
326
|
-
deleteLabel: n("comments.delete")
|
|
327
|
-
}
|
|
328
|
-
) : null,
|
|
329
|
-
p ? /* @__PURE__ */ s("div", { role: "alert", className: "flex items-center justify-between gap-2 text-sm text-destructive", "data-slot": "comments-error", children: [
|
|
330
|
-
/* @__PURE__ */ t("span", { children: p }),
|
|
331
|
-
/* @__PURE__ */ t(M, { type: "button", size: "sm", variant: "outline", onClick: b, children: n("comments.retry") })
|
|
332
|
-
] }) : null,
|
|
333
|
-
l.showComposer ? /* @__PURE__ */ t("div", { className: "flex items-start gap-2.5", "data-slot": "comments-composer", children: r.renderComposer ? r.renderComposer({
|
|
334
|
-
value: x,
|
|
335
|
-
onChange: v,
|
|
336
|
-
onSave: u,
|
|
337
|
-
disabled: i,
|
|
338
|
-
saving: i,
|
|
339
|
-
author: r.getAuthor()
|
|
340
|
-
}) : /* @__PURE__ */ s(S, { children: [
|
|
341
|
-
/* @__PURE__ */ t(R, { author: r.getAuthor(), renderAvatar: r.renderAvatar }),
|
|
342
|
-
/* @__PURE__ */ s(
|
|
343
|
-
"div",
|
|
344
|
-
{
|
|
345
|
-
className: "relative min-w-0 flex-1",
|
|
346
|
-
onKeyDown: (a) => {
|
|
347
|
-
a.key === "Enter" && (a.metaKey || a.ctrlKey) && (a.preventDefault(), u());
|
|
348
|
-
},
|
|
349
|
-
children: [
|
|
350
|
-
/* @__PURE__ */ t(
|
|
351
|
-
P,
|
|
352
|
-
{
|
|
353
|
-
"data-iv-comments-composer": "",
|
|
354
|
-
value: x,
|
|
355
|
-
onChange: (a) => v(a.target.value),
|
|
356
|
-
placeholder: n("comments.composerPlaceholder"),
|
|
357
|
-
disabled: i,
|
|
358
|
-
size: "default",
|
|
359
|
-
className: "h-[100px] min-h-[100px] resize-none rounded-lg !p-3 !pb-10"
|
|
360
|
-
}
|
|
361
|
-
),
|
|
362
|
-
/* @__PURE__ */ t(
|
|
363
|
-
M,
|
|
364
|
-
{
|
|
365
|
-
type: "button",
|
|
366
|
-
size: "iconSm",
|
|
367
|
-
variant: "default",
|
|
368
|
-
className: "absolute bottom-3 right-3 rounded-lg [&_svg]:!h-[14px] [&_svg]:!w-[9px]",
|
|
369
|
-
"data-iv-comments-save": "",
|
|
370
|
-
disabled: i || x.trim().length === 0,
|
|
371
|
-
"aria-busy": i,
|
|
372
|
-
"aria-label": n(i ? "comments.saving" : "comments.save"),
|
|
373
|
-
onClick: u,
|
|
374
|
-
children: /* @__PURE__ */ t(pe, {})
|
|
375
|
-
}
|
|
376
|
-
)
|
|
377
|
-
]
|
|
378
|
-
}
|
|
379
|
-
)
|
|
380
|
-
] }) }) : null
|
|
381
|
-
] }),
|
|
382
|
-
/* @__PURE__ */ t(K, { open: N != null, onOpenChange: (a) => {
|
|
383
|
-
a || k(null);
|
|
384
|
-
}, children: /* @__PURE__ */ s(Z, { children: [
|
|
385
|
-
/* @__PURE__ */ s(q, { children: [
|
|
386
|
-
/* @__PURE__ */ t(H, { children: N?.type === "thread" ? n("comments.confirmDeleteThreadTitle") : n("comments.confirmDeleteTitle") }),
|
|
387
|
-
/* @__PURE__ */ t(U, { children: N?.type === "thread" ? n("comments.confirmDeleteThreadDescription") : n("comments.confirmDeleteDescription") })
|
|
388
|
-
] }),
|
|
389
|
-
/* @__PURE__ */ s(Y, { children: [
|
|
390
|
-
/* @__PURE__ */ t($, { children: n("comments.cancel") }),
|
|
391
|
-
/* @__PURE__ */ t(
|
|
392
|
-
G,
|
|
393
|
-
{
|
|
394
|
-
onClick: () => {
|
|
395
|
-
N?.type === "thread" && A(), N?.type === "message" && h(N.id), k(null);
|
|
396
|
-
},
|
|
397
|
-
children: n("comments.delete")
|
|
398
|
-
}
|
|
399
|
-
)
|
|
400
|
-
] })
|
|
401
|
-
] }) })
|
|
402
|
-
] }) : /* @__PURE__ */ t("p", { className: "text-sm text-content-secondary", children: n("comments.noAccess") });
|
|
403
|
-
}
|
|
404
|
-
export {
|
|
405
|
-
Se as CommentsOverlayBody
|
|
406
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CellAddress, DataTableCommentsConfig } from './comments.types';
|
|
2
|
-
export declare function CommentsPanel({ open, onOpenChange, config, onSelect, status, locating, }: {
|
|
3
|
-
open: boolean;
|
|
4
|
-
onOpenChange: (open: boolean) => void;
|
|
5
|
-
config: DataTableCommentsConfig;
|
|
6
|
-
onSelect: (address: CellAddress, threadId: string) => void;
|
|
7
|
-
status?: string | null;
|
|
8
|
-
locating?: boolean;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|