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,352 +0,0 @@
|
|
|
1
|
-
import { jsx as e, Fragment as G, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as C, useCallback as K, useMemo as V, useEffect as F } from "react";
|
|
3
|
-
import { LexicalComposer as U } from "@lexical/react/LexicalComposer";
|
|
4
|
-
import { RichTextPlugin as q } from "@lexical/react/LexicalRichTextPlugin";
|
|
5
|
-
import { ContentEditable as J } from "@lexical/react/LexicalContentEditable";
|
|
6
|
-
import { HistoryPlugin as Q } from "@lexical/react/LexicalHistoryPlugin";
|
|
7
|
-
import { OnChangePlugin as X } from "@lexical/react/LexicalOnChangePlugin";
|
|
8
|
-
import { LinkPlugin as Y } from "@lexical/react/LexicalLinkPlugin";
|
|
9
|
-
import { LexicalErrorBoundary as ee } from "@lexical/react/LexicalErrorBoundary";
|
|
10
|
-
import { useLexicalComposerContext as v } from "@lexical/react/LexicalComposerContext";
|
|
11
|
-
import { $generateHtmlFromNodes as te, $generateNodesFromDOM as re } from "@lexical/html";
|
|
12
|
-
import { LinkNode as ne, $toggleLink as ie } from "@lexical/link";
|
|
13
|
-
import { FORMAT_TEXT_COMMAND as I, $getSelection as oe, $isRangeSelection as le, $getRoot as z } from "lexical";
|
|
14
|
-
import { DropdownMenu as H, DropdownMenuTrigger as $, DropdownMenuContent as B, DropdownMenuItem as S } from "../../../feedback/dropdown-menu/dropdown-menu.js";
|
|
15
|
-
import { Button as R } from "../../../primitives/button/button.js";
|
|
16
|
-
import { AttachFIleMedia as ae, Image as ce } from "impact-nova-icons";
|
|
17
|
-
import { useImpactNovaI18n as j } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
18
|
-
import { cn as se } from "../../../../lib/utils.js";
|
|
19
|
-
import { isValidChatMessageText as O } from "./chat-identity.js";
|
|
20
|
-
import { sanitizeChatHtml as de } from "./chat-html.js";
|
|
21
|
-
import { ChatPriorityMenu as ue } from "./chat-priority.js";
|
|
22
|
-
const me = {
|
|
23
|
-
paragraph: "m-0 text-sm leading-5",
|
|
24
|
-
text: { bold: "font-bold", italic: "italic" },
|
|
25
|
-
link: "text-brand underline"
|
|
26
|
-
};
|
|
27
|
-
function pe() {
|
|
28
|
-
return /* @__PURE__ */ e("svg", { width: "9", height: "14", viewBox: "0 0 9 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
29
|
-
"path",
|
|
30
|
-
{
|
|
31
|
-
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",
|
|
32
|
-
fill: "currentColor"
|
|
33
|
-
}
|
|
34
|
-
) });
|
|
35
|
-
}
|
|
36
|
-
const he = ["👍", "🙂", "✅", "⚠️", "📌", "📎"];
|
|
37
|
-
function h({
|
|
38
|
-
title: n,
|
|
39
|
-
onClick: o,
|
|
40
|
-
children: a
|
|
41
|
-
}) {
|
|
42
|
-
return /* @__PURE__ */ e(
|
|
43
|
-
"button",
|
|
44
|
-
{
|
|
45
|
-
type: "button",
|
|
46
|
-
title: n,
|
|
47
|
-
"aria-label": n,
|
|
48
|
-
className: "inline-flex size-4 items-center justify-center text-content-secondary hover:text-content [&_svg]:size-4",
|
|
49
|
-
onMouseDown: (i) => {
|
|
50
|
-
i.preventDefault(), o();
|
|
51
|
-
},
|
|
52
|
-
children: a
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
function fe() {
|
|
57
|
-
return /* @__PURE__ */ e("svg", { className: "size-3", viewBox: "0 0 12 7", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
58
|
-
"path",
|
|
59
|
-
{
|
|
60
|
-
d: "M0.666667 4C1.03333 4 1.33333 3.7 1.33333 3.33333C1.33333 2.96667 1.03333 2.66667 0.666667 2.66667C0.3 2.66667 0 2.96667 0 3.33333C0 3.7 0.3 4 0.666667 4ZM0.666667 6.66667C1.03333 6.66667 1.33333 6.36667 1.33333 6C1.33333 5.63333 1.03333 5.33333 0.666667 5.33333C0.3 5.33333 0 5.63333 0 6C0 6.36667 0.3 6.66667 0.666667 6.66667ZM0.666667 1.33333C1.03333 1.33333 1.33333 1.03333 1.33333 0.666667C1.33333 0.3 1.03333 0 0.666667 0C0.3 0 0 0.3 0 0.666667C0 1.03333 0.3 1.33333 0.666667 1.33333ZM3.33333 4H11.3333C11.7 4 12 3.7 12 3.33333C12 2.96667 11.7 2.66667 11.3333 2.66667H3.33333C2.96667 2.66667 2.66667 2.96667 2.66667 3.33333C2.66667 3.7 2.96667 4 3.33333 4ZM3.33333 6.66667H11.3333C11.7 6.66667 12 6.36667 12 6C12 5.63333 11.7 5.33333 11.3333 5.33333H3.33333C2.96667 5.33333 2.66667 5.63333 2.66667 6C2.66667 6.36667 2.96667 6.66667 3.33333 6.66667ZM2.66667 0.666667C2.66667 1.03333 2.96667 1.33333 3.33333 1.33333H11.3333C11.7 1.33333 12 1.03333 12 0.666667C12 0.3 11.7 0 11.3333 0H3.33333C2.96667 0 2.66667 0.3 2.66667 0.666667Z",
|
|
61
|
-
fill: "currentColor"
|
|
62
|
-
}
|
|
63
|
-
) });
|
|
64
|
-
}
|
|
65
|
-
function Ce() {
|
|
66
|
-
return /* @__PURE__ */ c("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
67
|
-
/* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
68
|
-
/* @__PURE__ */ e("circle", { cx: "5.75", cy: "6.5", r: "0.85", fill: "currentColor" }),
|
|
69
|
-
/* @__PURE__ */ e("circle", { cx: "10.25", cy: "6.5", r: "0.85", fill: "currentColor" }),
|
|
70
|
-
/* @__PURE__ */ e("path", { d: "M5.25 9.75c.7 1.15 1.7 1.75 2.75 1.75s2.05-.6 2.75-1.75", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
71
|
-
] });
|
|
72
|
-
}
|
|
73
|
-
function ge() {
|
|
74
|
-
return /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
75
|
-
"path",
|
|
76
|
-
{
|
|
77
|
-
d: "M6.4 9.6 9.6 6.4M7.1 11.3l-.7.7a2.4 2.4 0 1 1-3.4-3.4l.7-.7M8.9 4.7l.7-.7a2.4 2.4 0 1 1 3.4 3.4l-.7.7",
|
|
78
|
-
stroke: "currentColor",
|
|
79
|
-
strokeWidth: "1.3",
|
|
80
|
-
strokeLinecap: "round"
|
|
81
|
-
}
|
|
82
|
-
) });
|
|
83
|
-
}
|
|
84
|
-
function xe({
|
|
85
|
-
tools: n,
|
|
86
|
-
toolContext: o,
|
|
87
|
-
onInsertEmoji: a,
|
|
88
|
-
onPickFiles: i
|
|
89
|
-
}) {
|
|
90
|
-
const { t: l } = j(), [s] = v();
|
|
91
|
-
return /* @__PURE__ */ c("div", { className: "flex items-center gap-3 px-0.5", "data-iv-chat-composer-toolbar": "", children: [
|
|
92
|
-
/* @__PURE__ */ c("div", { className: "flex items-center gap-3", children: [
|
|
93
|
-
/* @__PURE__ */ e(h, { title: l("chat.attachFile"), onClick: () => i("file"), children: /* @__PURE__ */ e(ae, {}) }),
|
|
94
|
-
/* @__PURE__ */ e(h, { title: l("chat.attachImage"), onClick: () => i("image"), children: /* @__PURE__ */ e(ce, {}) }),
|
|
95
|
-
/* @__PURE__ */ c(H, { children: [
|
|
96
|
-
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(
|
|
97
|
-
"button",
|
|
98
|
-
{
|
|
99
|
-
type: "button",
|
|
100
|
-
title: l("chat.insertEmoji"),
|
|
101
|
-
"aria-label": l("chat.insertEmoji"),
|
|
102
|
-
className: "inline-flex size-4 items-center justify-center text-content-secondary hover:text-content",
|
|
103
|
-
onMouseDown: (r) => r.preventDefault(),
|
|
104
|
-
children: /* @__PURE__ */ e(Ce, {})
|
|
105
|
-
}
|
|
106
|
-
) }),
|
|
107
|
-
/* @__PURE__ */ e(B, { align: "start", children: he.map((r) => /* @__PURE__ */ e(S, { onSelect: () => a(r), children: r }, r)) })
|
|
108
|
-
] }),
|
|
109
|
-
/* @__PURE__ */ e(h, { title: l("chat.bold"), onClick: () => s.dispatchCommand(I, "bold"), children: /* @__PURE__ */ e("span", { className: "text-xs font-bold", children: "B" }) }),
|
|
110
|
-
/* @__PURE__ */ e(h, { title: l("chat.italic"), onClick: () => s.dispatchCommand(I, "italic"), children: /* @__PURE__ */ e("span", { className: "text-xs italic", children: "I" }) }),
|
|
111
|
-
/* @__PURE__ */ e(
|
|
112
|
-
h,
|
|
113
|
-
{
|
|
114
|
-
title: l("chat.insertLink"),
|
|
115
|
-
onClick: () => {
|
|
116
|
-
const r = window.prompt(l("chat.insertLink"));
|
|
117
|
-
r && s.update(() => {
|
|
118
|
-
ie(r);
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
children: /* @__PURE__ */ e(ge, {})
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
] }),
|
|
125
|
-
n && n.length > 0 && o ? /* @__PURE__ */ e("div", { className: "ml-auto", children: /* @__PURE__ */ c(H, { children: [
|
|
126
|
-
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ c(R, { type: "button", size: "sm", variant: "outline", className: "h-8 gap-1.5 rounded-full px-3", children: [
|
|
127
|
-
/* @__PURE__ */ e(fe, {}),
|
|
128
|
-
l("chat.quickAction")
|
|
129
|
-
] }) }),
|
|
130
|
-
/* @__PURE__ */ e(B, { align: "end", children: n.map((r) => /* @__PURE__ */ e(
|
|
131
|
-
S,
|
|
132
|
-
{
|
|
133
|
-
disabled: r.disabled,
|
|
134
|
-
icon: r.icon,
|
|
135
|
-
onSelect: () => r.onSelect(o),
|
|
136
|
-
children: r.label
|
|
137
|
-
},
|
|
138
|
-
r.id
|
|
139
|
-
)) })
|
|
140
|
-
] }) }) : null
|
|
141
|
-
] });
|
|
142
|
-
}
|
|
143
|
-
function be({
|
|
144
|
-
html: n,
|
|
145
|
-
seededRef: o
|
|
146
|
-
}) {
|
|
147
|
-
const [a] = v();
|
|
148
|
-
return F(() => {
|
|
149
|
-
if (!O(n)) {
|
|
150
|
-
if (!o.current) return;
|
|
151
|
-
a.update(() => {
|
|
152
|
-
const i = z();
|
|
153
|
-
i.getTextContentSize() !== 0 && i.clear();
|
|
154
|
-
});
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
o.current || (o.current = !0, a.update(() => {
|
|
158
|
-
const i = new DOMParser(), l = /<[a-z][\s\S]*>/i.test(n) ? n : `<p>${ve(n)}</p>`, s = i.parseFromString(l, "text/html"), r = re(a, s), p = z();
|
|
159
|
-
p.clear(), r.length > 0 && p.append(...r);
|
|
160
|
-
}));
|
|
161
|
-
}, [a, n, o]), null;
|
|
162
|
-
}
|
|
163
|
-
function ve(n) {
|
|
164
|
-
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
165
|
-
}
|
|
166
|
-
function ye({ onReady: n }) {
|
|
167
|
-
const [o] = v();
|
|
168
|
-
return F(() => {
|
|
169
|
-
n((a) => {
|
|
170
|
-
o.update(() => {
|
|
171
|
-
const i = oe();
|
|
172
|
-
le(i) && i.insertText(a);
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
}, [o, n]), null;
|
|
176
|
-
}
|
|
177
|
-
function We({
|
|
178
|
-
value: n,
|
|
179
|
-
onChange: o,
|
|
180
|
-
onSave: a,
|
|
181
|
-
disabled: i,
|
|
182
|
-
saving: l,
|
|
183
|
-
author: s,
|
|
184
|
-
placeholder: r,
|
|
185
|
-
render: p,
|
|
186
|
-
tools: Z,
|
|
187
|
-
toolContext: y,
|
|
188
|
-
hideSend: k,
|
|
189
|
-
hideChrome: _,
|
|
190
|
-
priority: M,
|
|
191
|
-
onPriorityChange: g,
|
|
192
|
-
attachments: m = [],
|
|
193
|
-
onAttachmentsChange: f
|
|
194
|
-
}) {
|
|
195
|
-
const { t: x } = j(), b = C(() => {
|
|
196
|
-
}), N = C(!1), w = C(null), L = C(null), P = K(
|
|
197
|
-
(t, u) => {
|
|
198
|
-
N.current = !0, u.read(() => {
|
|
199
|
-
o(de(te(u)));
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
[o]
|
|
203
|
-
), W = V(
|
|
204
|
-
() => ({
|
|
205
|
-
namespace: `iv-chat-composer-${s}`,
|
|
206
|
-
nodes: [ne],
|
|
207
|
-
theme: me,
|
|
208
|
-
editable: !i,
|
|
209
|
-
onError: (t) => console.error("[ChatComposer]", t)
|
|
210
|
-
}),
|
|
211
|
-
[s, i]
|
|
212
|
-
), E = (t, u) => {
|
|
213
|
-
if (!t || t.length === 0 || !f) return;
|
|
214
|
-
const D = [...m];
|
|
215
|
-
for (const d of t)
|
|
216
|
-
D.push({
|
|
217
|
-
id: `${u}-${d.name}-${d.size}-${d.lastModified}`,
|
|
218
|
-
name: d.name,
|
|
219
|
-
kind: u === "image" || d.type.startsWith("image/") ? "image" : "file",
|
|
220
|
-
url: URL.createObjectURL(d),
|
|
221
|
-
mimeType: d.type,
|
|
222
|
-
size: d.size
|
|
223
|
-
});
|
|
224
|
-
f(D);
|
|
225
|
-
};
|
|
226
|
-
if (p)
|
|
227
|
-
return /* @__PURE__ */ e(G, { children: p({ value: n, onChange: o, onSave: a, disabled: i, saving: l, author: s, placeholder: r, priority: M, onPriorityChange: g, attachments: m, onAttachmentsChange: f }) });
|
|
228
|
-
const A = y ? { ...y, insertText: (t) => b.current(t) } : void 0, T = O(n) || m.length > 0;
|
|
229
|
-
return /* @__PURE__ */ c(
|
|
230
|
-
"div",
|
|
231
|
-
{
|
|
232
|
-
className: "flex flex-col gap-2",
|
|
233
|
-
onKeyDown: (t) => {
|
|
234
|
-
t.key === "Enter" && (t.metaKey || t.ctrlKey) && (t.preventDefault(), T && a());
|
|
235
|
-
},
|
|
236
|
-
children: [
|
|
237
|
-
/* @__PURE__ */ e(
|
|
238
|
-
"input",
|
|
239
|
-
{
|
|
240
|
-
ref: w,
|
|
241
|
-
type: "file",
|
|
242
|
-
className: "hidden",
|
|
243
|
-
multiple: !0,
|
|
244
|
-
onChange: (t) => {
|
|
245
|
-
E(t.target.files, "file"), t.target.value = "";
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
),
|
|
249
|
-
/* @__PURE__ */ e(
|
|
250
|
-
"input",
|
|
251
|
-
{
|
|
252
|
-
ref: L,
|
|
253
|
-
type: "file",
|
|
254
|
-
accept: "image/*",
|
|
255
|
-
className: "hidden",
|
|
256
|
-
multiple: !0,
|
|
257
|
-
onChange: (t) => {
|
|
258
|
-
E(t.target.files, "image"), t.target.value = "";
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ c(U, { initialConfig: W, children: [
|
|
263
|
-
_ ? null : /* @__PURE__ */ e(
|
|
264
|
-
xe,
|
|
265
|
-
{
|
|
266
|
-
tools: Z,
|
|
267
|
-
toolContext: A,
|
|
268
|
-
onInsertEmoji: (t) => b.current(t),
|
|
269
|
-
onPickFiles: (t) => (t === "image" ? L.current : w.current)?.click()
|
|
270
|
-
}
|
|
271
|
-
),
|
|
272
|
-
/* @__PURE__ */ e(
|
|
273
|
-
ye,
|
|
274
|
-
{
|
|
275
|
-
onReady: (t) => {
|
|
276
|
-
b.current = t;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
),
|
|
280
|
-
m.length > 0 ? /* @__PURE__ */ e("ul", { className: "flex flex-wrap gap-1.5", children: m.map((t) => /* @__PURE__ */ c(
|
|
281
|
-
"li",
|
|
282
|
-
{
|
|
283
|
-
className: "inline-flex max-w-full items-center gap-1 rounded-md border border-stroke-hairline bg-canvas-subtle px-2 py-1 text-xs text-content",
|
|
284
|
-
children: [
|
|
285
|
-
/* @__PURE__ */ e("span", { className: "truncate", children: t.name }),
|
|
286
|
-
/* @__PURE__ */ e(
|
|
287
|
-
"button",
|
|
288
|
-
{
|
|
289
|
-
type: "button",
|
|
290
|
-
className: "text-content-tertiary hover:text-content",
|
|
291
|
-
"aria-label": x("chat.removeAttachment", { name: t.name }),
|
|
292
|
-
onClick: () => f?.(m.filter((u) => u.id !== t.id)),
|
|
293
|
-
children: "×"
|
|
294
|
-
}
|
|
295
|
-
)
|
|
296
|
-
]
|
|
297
|
-
},
|
|
298
|
-
t.id
|
|
299
|
-
)) }) : null,
|
|
300
|
-
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
301
|
-
/* @__PURE__ */ e(
|
|
302
|
-
q,
|
|
303
|
-
{
|
|
304
|
-
contentEditable: /* @__PURE__ */ e(
|
|
305
|
-
J,
|
|
306
|
-
{
|
|
307
|
-
"data-iv-chat-composer": "",
|
|
308
|
-
className: se(
|
|
309
|
-
"relative h-[76px] min-h-[76px] overflow-auto rounded-xl border border-stroke-hairline p-3 text-sm outline-none",
|
|
310
|
-
k ? "pr-3" : "pr-[5.5rem]",
|
|
311
|
-
i && "opacity-60"
|
|
312
|
-
),
|
|
313
|
-
"aria-label": r,
|
|
314
|
-
"aria-placeholder": r,
|
|
315
|
-
placeholder: /* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-3 top-3 text-sm text-content-tertiary", children: r })
|
|
316
|
-
}
|
|
317
|
-
),
|
|
318
|
-
ErrorBoundary: ee
|
|
319
|
-
}
|
|
320
|
-
),
|
|
321
|
-
/* @__PURE__ */ e(Q, {}),
|
|
322
|
-
/* @__PURE__ */ e(Y, {}),
|
|
323
|
-
/* @__PURE__ */ e(X, { onChange: P }),
|
|
324
|
-
/* @__PURE__ */ e(be, { html: n, seededRef: N }),
|
|
325
|
-
k ? null : /* @__PURE__ */ c("div", { className: "absolute bottom-2.5 right-3 flex items-center gap-1.5", children: [
|
|
326
|
-
g ? /* @__PURE__ */ e(ue, { value: M, onChange: g, disabled: i }) : null,
|
|
327
|
-
/* @__PURE__ */ e(
|
|
328
|
-
R,
|
|
329
|
-
{
|
|
330
|
-
type: "button",
|
|
331
|
-
size: "iconSm",
|
|
332
|
-
variant: "default",
|
|
333
|
-
className: "rounded-lg [&_svg]:!h-[14px] [&_svg]:!w-[9px]",
|
|
334
|
-
"data-iv-chat-send": "",
|
|
335
|
-
disabled: i || !T,
|
|
336
|
-
"aria-busy": l,
|
|
337
|
-
"aria-label": x(l ? "chat.saving" : "chat.send"),
|
|
338
|
-
onClick: a,
|
|
339
|
-
children: /* @__PURE__ */ e(pe, {})
|
|
340
|
-
}
|
|
341
|
-
)
|
|
342
|
-
] })
|
|
343
|
-
] })
|
|
344
|
-
] })
|
|
345
|
-
]
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
export {
|
|
350
|
-
We as ChatComposer,
|
|
351
|
-
pe as ChatSendIcon
|
|
352
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const CHAT_WRAPPER_ATTR = "data-iv-chat";
|
|
2
|
-
export declare const IV_CHAT_COL_ID = "iv-chat";
|
|
3
|
-
export declare const IV_CHAT_COL_WIDTH = 69;
|
|
4
|
-
export declare const CHAT_THREAD_PAGE_SIZE = 50;
|
|
5
|
-
export declare const CHAT_PANEL_PAGE_SIZE = 50;
|
|
6
|
-
export declare const CHAT_VIRTUALIZE_AFTER = 32;
|
|
7
|
-
export declare const CHAT_PEOPLE_PAGE_SIZE = 10;
|
|
8
|
-
export declare const CHAT_MEMBERS_VISIBLE = 40;
|
|
9
|
-
export declare const CHAT_DRAWER_MIN_WIDTH = 280;
|
|
10
|
-
export declare const CHAT_LIST_WIDTH = 340;
|
|
11
|
-
export declare const CHAT_THREAD_MIN_WIDTH = 640;
|
|
12
|
-
export declare const CHAT_PANEL_CATALOG_CLASS = "!w-[840px] !min-w-[840px] !max-w-[840px] sm:!max-w-[840px]";
|
|
13
|
-
export declare const CHAT_PANEL_SPLIT_CLASS = "!w-[980px] !min-w-[980px] !max-w-[980px] sm:!max-w-[980px]";
|
|
14
|
-
export declare const CHAT_PANEL_WIDE_CLASS = "!w-[min(1620px,100vw)] !max-w-[min(1620px,100vw)] sm:!max-w-[min(1620px,100vw)]";
|
|
15
|
-
export declare const CHAT_MENU_OPEN = "iv-chat-open";
|
|
16
|
-
export declare const CHAT_MISSING_ROW_ID_WARNING = "[impact-nova] chat requires getRowId so Chat identity is a stable business key.";
|
|
17
|
-
export declare function defaultChatConversationId(rowId: string): string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const A = "iv-chat", t = 69, n = 50, s = 50, T = 32, I = 10, o = 40, C = 280, E = 340, H = 640, c = "!w-[840px] !min-w-[840px] !max-w-[840px] sm:!max-w-[840px]", x = "!w-[980px] !min-w-[980px] !max-w-[980px] sm:!max-w-[980px]", a = "!w-[min(1620px,100vw)] !max-w-[min(1620px,100vw)] sm:!max-w-[min(1620px,100vw)]", w = "iv-chat-open", i = "[impact-nova] chat requires getRowId so Chat identity is a stable business key.";
|
|
2
|
-
function m(_) {
|
|
3
|
-
return `row:${_}`;
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
C as CHAT_DRAWER_MIN_WIDTH,
|
|
7
|
-
E as CHAT_LIST_WIDTH,
|
|
8
|
-
o as CHAT_MEMBERS_VISIBLE,
|
|
9
|
-
w as CHAT_MENU_OPEN,
|
|
10
|
-
i as CHAT_MISSING_ROW_ID_WARNING,
|
|
11
|
-
c as CHAT_PANEL_CATALOG_CLASS,
|
|
12
|
-
s as CHAT_PANEL_PAGE_SIZE,
|
|
13
|
-
x as CHAT_PANEL_SPLIT_CLASS,
|
|
14
|
-
a as CHAT_PANEL_WIDE_CLASS,
|
|
15
|
-
I as CHAT_PEOPLE_PAGE_SIZE,
|
|
16
|
-
H as CHAT_THREAD_MIN_WIDTH,
|
|
17
|
-
n as CHAT_THREAD_PAGE_SIZE,
|
|
18
|
-
T as CHAT_VIRTUALIZE_AFTER,
|
|
19
|
-
A as IV_CHAT_COL_ID,
|
|
20
|
-
t as IV_CHAT_COL_WIDTH,
|
|
21
|
-
m as defaultChatConversationId
|
|
22
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ChatMember } from './chat.types';
|
|
2
|
-
export declare function chatInitials(author: string): string;
|
|
3
|
-
export declare function chatAvatarTone(author: string): string;
|
|
4
|
-
export declare function formatChatTime(iso: string, locale: string, now?: number): string;
|
|
5
|
-
export declare function formatChatClock(iso: string, locale: string): string;
|
|
6
|
-
export declare function chatDayKey(iso: string): string;
|
|
7
|
-
export declare function formatChatDayLabel(iso: string, locale: string, labels: {
|
|
8
|
-
today: string;
|
|
9
|
-
yesterday: string;
|
|
10
|
-
}, now?: number): string;
|
|
11
|
-
export declare function formatChatStamp(iso: string, locale: string): string;
|
|
12
|
-
export declare function resolveChatMembers(conversation: {
|
|
13
|
-
members?: readonly ChatMember[];
|
|
14
|
-
createdBy?: string;
|
|
15
|
-
messages: readonly {
|
|
16
|
-
author: string;
|
|
17
|
-
deleted?: boolean;
|
|
18
|
-
system?: boolean;
|
|
19
|
-
}[];
|
|
20
|
-
}): ChatMember[];
|
|
21
|
-
export declare function findChatMember(members: readonly ChatMember[], author: string): ChatMember | undefined;
|
|
22
|
-
export declare function selectNewChatMembers(incoming: readonly ChatMember[], current: readonly ChatMember[]): ChatMember[];
|
|
23
|
-
export declare function filterChatPeople(people: readonly ChatMember[], options: {
|
|
24
|
-
members?: readonly ChatMember[];
|
|
25
|
-
query?: string;
|
|
26
|
-
limit?: number;
|
|
27
|
-
}): ChatMember[];
|
|
28
|
-
export declare function uniqueChatAuthors(messages: readonly {
|
|
29
|
-
author: string;
|
|
30
|
-
deleted?: boolean;
|
|
31
|
-
system?: boolean;
|
|
32
|
-
}[], limit?: number): string[];
|
|
33
|
-
export declare function visibleChatMessages<T extends {
|
|
34
|
-
author: string;
|
|
35
|
-
text: string;
|
|
36
|
-
deleted?: boolean;
|
|
37
|
-
}>(messages: readonly T[], search: string): T[];
|
|
38
|
-
export declare function previousMessageDay(messages: readonly {
|
|
39
|
-
createdAt: string;
|
|
40
|
-
}[], index: number): string | undefined;
|
|
41
|
-
export declare function chatRowStatusMessage(status: "ready" | "locating" | "filtered" | "unloaded" | "missing", t: (key: string) => string): string | null;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { formatRelativeTime as m, formatTime as s, formatDate as d } from "../../../../i18n/format/format-date.js";
|
|
2
|
-
function l(e) {
|
|
3
|
-
return (e.trim()[0] ?? "?").toUpperCase();
|
|
4
|
-
}
|
|
5
|
-
const c = [
|
|
6
|
-
"bg-brand text-brand-foreground",
|
|
7
|
-
"bg-success text-success-foreground",
|
|
8
|
-
"bg-secondary text-secondary-foreground"
|
|
9
|
-
];
|
|
10
|
-
function y(e) {
|
|
11
|
-
let t = 0;
|
|
12
|
-
for (const r of e) t = (t + r.charCodeAt(0)) % c.length;
|
|
13
|
-
return c[t] ?? c[0];
|
|
14
|
-
}
|
|
15
|
-
function b(e, t, r = Date.now()) {
|
|
16
|
-
const n = m(e, t, r);
|
|
17
|
-
if (!n) return e;
|
|
18
|
-
const a = new Date(e);
|
|
19
|
-
return Number.isNaN(a.getTime()) ? e : Math.abs(a.getTime() - r) / 1e3 < 86400 * 30 ? n : s(e, t) || e;
|
|
20
|
-
}
|
|
21
|
-
function C(e, t) {
|
|
22
|
-
return s(e, t, { hour: "2-digit", minute: "2-digit" }) || e;
|
|
23
|
-
}
|
|
24
|
-
function o(e) {
|
|
25
|
-
const t = new Date(e);
|
|
26
|
-
return Number.isNaN(t.getTime()) ? e : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
|
|
27
|
-
}
|
|
28
|
-
function S(e, t, r, n = Date.now()) {
|
|
29
|
-
const a = new Date(e);
|
|
30
|
-
if (Number.isNaN(a.getTime())) return e;
|
|
31
|
-
const u = o(new Date(n).toISOString()), i = o(new Date(n - 864e5).toISOString()), f = o(e);
|
|
32
|
-
return f === u ? r.today : f === i ? r.yesterday : d(e, t, { month: "short", day: "numeric", year: "numeric" }) || e;
|
|
33
|
-
}
|
|
34
|
-
function w(e, t) {
|
|
35
|
-
return d(e, t, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" }) || e;
|
|
36
|
-
}
|
|
37
|
-
function p(e) {
|
|
38
|
-
if (e.members && e.members.length > 0) return [...e.members];
|
|
39
|
-
const t = h(e.messages, 50);
|
|
40
|
-
return e.createdBy && !t.includes(e.createdBy) && t.unshift(e.createdBy), t.map((r) => ({ id: r, name: r }));
|
|
41
|
-
}
|
|
42
|
-
function D(e, t) {
|
|
43
|
-
return e.find((r) => r.id === t || r.name === t);
|
|
44
|
-
}
|
|
45
|
-
function N(e, t) {
|
|
46
|
-
return e.filter(
|
|
47
|
-
(r) => !t.some((n) => n.id === r.id || n.name === r.name)
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
function T(e, t) {
|
|
51
|
-
const r = t.query?.trim().toLowerCase() ?? "", n = /* @__PURE__ */ new Set();
|
|
52
|
-
for (const i of t.members ?? [])
|
|
53
|
-
n.add(i.id), n.add(i.name);
|
|
54
|
-
const a = t.limit, u = [];
|
|
55
|
-
for (const i of e)
|
|
56
|
-
if (!(n.has(i.id) || n.has(i.name)) && !(r && !i.name.toLowerCase().includes(r)) && (u.push(i), u.length >= a))
|
|
57
|
-
break;
|
|
58
|
-
return u;
|
|
59
|
-
}
|
|
60
|
-
function h(e, t = 3) {
|
|
61
|
-
const r = /* @__PURE__ */ new Set(), n = [];
|
|
62
|
-
for (const a of e)
|
|
63
|
-
if (!(a.deleted || a.system || r.has(a.author)) && (r.add(a.author), n.push(a.author), n.length >= t))
|
|
64
|
-
break;
|
|
65
|
-
return n;
|
|
66
|
-
}
|
|
67
|
-
function M(e, t) {
|
|
68
|
-
const r = t.trim().toLowerCase();
|
|
69
|
-
return r ? e.filter((n) => n.deleted ? !1 : `${n.author} ${n.text}`.toLowerCase().includes(r)) : [...e];
|
|
70
|
-
}
|
|
71
|
-
function A(e, t) {
|
|
72
|
-
const r = e[t - 1];
|
|
73
|
-
return r ? o(r.createdAt) : void 0;
|
|
74
|
-
}
|
|
75
|
-
function x(e, t) {
|
|
76
|
-
return e === "locating" ? t("chat.locating") : e === "filtered" ? t("chat.hiddenByFilter") : e === "unloaded" ? t("chat.notInCurrentPage") : e === "missing" ? t("chat.rowMissing") : null;
|
|
77
|
-
}
|
|
78
|
-
export {
|
|
79
|
-
y as chatAvatarTone,
|
|
80
|
-
o as chatDayKey,
|
|
81
|
-
l as chatInitials,
|
|
82
|
-
x as chatRowStatusMessage,
|
|
83
|
-
T as filterChatPeople,
|
|
84
|
-
D as findChatMember,
|
|
85
|
-
C as formatChatClock,
|
|
86
|
-
S as formatChatDayLabel,
|
|
87
|
-
w as formatChatStamp,
|
|
88
|
-
b as formatChatTime,
|
|
89
|
-
A as previousMessageDay,
|
|
90
|
-
p as resolveChatMembers,
|
|
91
|
-
N as selectNewChatMembers,
|
|
92
|
-
h as uniqueChatAuthors,
|
|
93
|
-
M as visibleChatMessages
|
|
94
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { GridApi } from 'ag-grid-community';
|
|
3
|
-
import { DataTableChatConfig } from './chat.types';
|
|
4
|
-
import { ChatHostHandle } from './chat-host.types';
|
|
5
|
-
export type { ChatHostHandle };
|
|
6
|
-
export declare const ChatHost: import('react').ForwardRefExoticComponent<{
|
|
7
|
-
chat: DataTableChatConfig;
|
|
8
|
-
gridApi: GridApi | null;
|
|
9
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
10
|
-
} & import('react').RefAttributes<ChatHostHandle>>;
|